.notice-banner{
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 99999;

  background: #000;
  color: #fff;

  /* PC: 中央寄せ・1行想定 */
  padding: 10px 52px 10px 16px;
  font-size: 14px;
  line-height: 1.4;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  text-align: center;
}

/* WP管理バーがある時のずれ対策 */
body.admin-bar .notice-banner{
  top: var(--wp-admin--admin-bar--height, 32px);
}

.notice-banner__link{
  color: inherit;
  text-decoration: none;
  cursor: pointer;

  display: block;
  max-width: 100%;
  padding-right: 10px;     /* ×との距離 */
  word-break: break-word;  /* 長文でも折り返し */
}

.notice-banner__link:hover{
  text-decoration: underline;
}

.notice-banner__close{
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);

  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;

  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.notice-banner.is-hidden{
  display: none;
}

/* バナーがある時だけ上を押し下げる（JSが高さを入れます） */
html.has-notice-banner body{
  padding-top: var(--notice-banner-height, 0px);
}

/* ===== Responsive ===== */
@media (max-width: 768px){
  .notice-banner{
    padding: 10px 44px 10px 12px; /* 右の×領域を確保 */
    font-size: 12px;

    text-align: left;
    justify-content: flex-start;
  }

  /* モバイルでは×を右上に固定した方が押しやすい */
  .notice-banner__close{
    right: 0;
    top: 0;
    transform: none;
  }
}

@media (max-width: 375px){
  .notice-banner{
    font-size: 11px;
  }
}
