/* お知らせの本文（ブロックエディターの標準ブロック）。表示側の .news-content と編集画面の本文で共通。
   Figma 詳細 PC 1534:17012・1534:17719／SP 1534:17406・1534:18113。
   使えるブロックは inc/news.php の allowed_block_types_all で限定している。 */
:is(.news-content, .editor-styles-wrapper .is-root-container) {
  --news-ink: #2b2a28;
  --news-orange: #fd6b0c;
  --news-line: #f0e6c6;
  --news-pale: #ffeaa1;
  --news-muted: #5f5a50;
  color: var(--news-ink);
  font-size: 18px;
  line-height: 2;
  letter-spacing: 0.02em;
}

/* ---------- 余白の規則 ---------- */
:is(.news-content, .editor-styles-wrapper .is-root-container) > * {
  margin-block: 0;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) > * + * {
  margin-top: 24px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) > * + h2 {
  margin-top: 56px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) > h2 + * {
  margin-top: 28px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) > * + h3 {
  margin-top: 36px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) > h2 + h3 {
  margin-top: 28px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) > h3 + * {
  margin-top: 12px;
}

/* ---------- 段落・リスト・リンク ---------- */
:is(.news-content, .editor-styles-wrapper .is-root-container) p {
  font-size: 18px;
  line-height: 2;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(ul, ol):not([class*='wp-block-button']) {
  padding-left: 1.5em;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) li + li {
  margin-top: 4px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) li::marker {
  color: var(--news-orange);
}
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(p, li, td, th) a {
  color: var(--news-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) strong {
  font-weight: 700;
}
/* 電話番号のリンクは本文と同じ色で、途中で改行しない */
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(p, li, td) a[href^='tel:'] {
  color: inherit;
  white-space: nowrap;
}
/* 注記（段落の文字サイズ「小」） */
:is(.news-content, .editor-styles-wrapper .is-root-container) .has-small-font-size {
  color: var(--news-muted);
  font-size: 15px !important;
  line-height: 28px;
}

/* ---------- 見出し ---------- */
:is(.news-content, .editor-styles-wrapper .is-root-container) h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) h2::before {
  content: '';
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--news-pale) url('../images/lower/symbol-sun.png') center / 30px no-repeat;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) h3 {
  padding-left: 16px;
  border-left: 4px solid var(--news-orange);
  font-size: 22px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0.04em;
}

/* ---------- 画像 ---------- */
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-image img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 24px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-image figcaption {
  margin: 12px 0 0;
  color: var(--news-muted);
  font-size: 15px;
  line-height: 28px;
  text-align: left;
}

/* ---------- 表（1列目を項目名にする） ---------- */
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table {
  margin-inline: 0;
  overflow-x: auto;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table table {
  width: 100%;
  border: 2px solid var(--news-line);
  border-radius: 20px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table :is(th, td) {
  padding: 22px 32px;
  border: 0;
  font-size: 18px;
  line-height: 30px;
  text-align: left;
  vertical-align: top;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table tr + tr :is(th, td),
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table thead + tbody tr:first-child :is(th, td) {
  border-top: 2px solid var(--news-line);
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table :is(th, td):first-child {
  width: 240px;
  padding-inline: 28px;
  background: var(--news-pale);
  font-weight: 700;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table thead {
  border: 0;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table figcaption {
  margin-top: 12px;
  color: var(--news-muted);
  font-size: 15px;
  line-height: 28px;
}

/* ---------- ボタン（ボタンブロックのスタイル：LINE／応募フォーム／アウトライン） ---------- */
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons:has(.is-style-hinode-line, .is-style-hinode-form) {
  gap: 24px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-button:is(.is-style-hinode-line, .is-style-hinode-form, .is-style-hinode-outline) {
  flex: 1 1 0;
  min-width: 0;
  max-width: 488px;
  margin: 0;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form, .is-style-hinode-outline) .wp-block-button__link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-decoration: none;
  transition: filter 200ms ease, background-color 200ms ease, color 200ms ease;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form) .wp-block-button__link {
  min-height: 85px;
  padding: 14px 14px 14px 34px;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1.4;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-line .wp-block-button__link {
  background: #06c755;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-form .wp-block-button__link {
  background: var(--news-orange);
}
/* 左のアイコン */
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form) .wp-block-button__link::before {
  content: '';
  flex: none;
  width: 32px;
  height: 32px;
  background: #fff;
  -webkit-mask: url('../images/lower/line-icon.svg') center / contain no-repeat;
  mask: url('../images/lower/line-icon.svg') center / contain no-repeat;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-form .wp-block-button__link::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
}
/* 右の矢印の丸 */
:is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form, .is-style-hinode-outline) .wp-block-button__link::after {
  content: '';
  flex: none;
  width: 57px;
  height: 57px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff center / 100% no-repeat;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-line .wp-block-button__link::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%2306c755' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.2 20h19.6M20.9 11.1l8.9 8.9-8.9 8.9'/%3E%3C/svg%3E");
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-form .wp-block-button__link::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23fd6b0c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.2 20h19.6M20.9 11.1l8.9 8.9-8.9 8.9'/%3E%3C/svg%3E");
}
/* アウトライン：白地・橙の線、橙の丸に白い矢印 */
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-outline .wp-block-button__link {
  min-height: 64px;
  padding: 8px 10px 8px 32px;
  border: 2px solid var(--news-orange);
  background: #fff;
  color: var(--news-orange);
  font-size: 18px;
  line-height: 1.4;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-outline .wp-block-button__link::after {
  width: 44px;
  height: 44px;
  background-color: var(--news-orange);
  background-size: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.2 20h19.6M20.9 11.1l8.9 8.9-8.9 8.9'/%3E%3C/svg%3E");
}
/* アウトラインが3個以上並ぶときは、PCで2個ずつ中央寄せ（1個は最大360px） */
@media (min-width: 768px) {
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons:has(> .is-style-hinode-outline:nth-child(3)) {
    justify-content: center;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons:has(> .is-style-hinode-outline:nth-child(3)) > .wp-block-button.is-style-hinode-outline {
    display: flex;
    flex: 0 0 min(360px, calc(50% - 8px));
    max-width: none;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons:has(> .is-style-hinode-outline:nth-child(3)) > .wp-block-button.is-style-hinode-outline > .wp-block-button__link {
    flex: 1 1 auto;
  }
}
/* 外部リンク（新しいタブで開く）は丸を付けず「↗」 */
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-button:has(> .wp-block-button__link[target='_blank']) {
  flex: none;
  max-width: 100%;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-button .wp-block-button__link[target='_blank'] {
  min-height: 0;
  padding: 18px 32px 18px 36px;
}
:is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-button .wp-block-button__link[target='_blank']::after {
  content: '↗\FE0E';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  font-size: 1em;
  line-height: 1;
}
@media (hover: hover) {
  .news-content :is(.is-style-hinode-line, .is-style-hinode-form) .wp-block-button__link:hover {
    filter: brightness(1.06);
  }
  .news-content .is-style-hinode-outline .wp-block-button__link:hover {
    background: #fff4ec;
  }
}
.news-content .wp-block-button__link:focus-visible {
  outline: 2px solid var(--news-orange);
  outline-offset: 3px;
}

/* ---------- SP ---------- */
@media (max-width: 767px) {
  :is(.news-content, .editor-styles-wrapper .is-root-container) {
    font-size: 15px;
    line-height: 28px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) p {
    font-size: 15px;
    line-height: 28px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) > * + * {
    margin-top: 20px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) > * + h2 {
    margin-top: 40px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) > h2 + *,
  :is(.news-content, .editor-styles-wrapper .is-root-container) > h2 + h3 {
    margin-top: 20px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) > * + h3 {
    margin-top: 28px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) > h3 + * {
    margin-top: 8px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) h2 {
    gap: 10px;
    font-size: 21px;
    letter-spacing: 0.04em;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) h2::before {
    width: 40px;
    height: 40px;
    background-size: 22px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) h3 {
    padding-left: 12px;
    border-left-width: 3px;
    font-size: 18px;
    line-height: 28px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .has-small-font-size {
    font-size: 13px !important;
    line-height: 22px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-image img {
    border-radius: 16px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table table {
    border-radius: 16px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table :is(th, td) {
    padding: 14px;
    font-size: 15px;
    line-height: 26px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-table :is(th, td):first-child {
    width: 100px;
    padding: 14px 10px 14px 14px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons,
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-buttons:has(.is-style-hinode-line, .is-style-hinode-form) {
    flex-direction: column;
    gap: 12px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .wp-block-button:is(.is-style-hinode-line, .is-style-hinode-form, .is-style-hinode-outline) {
    flex: none;
    width: 100%;
    max-width: none;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form) .wp-block-button__link {
    gap: 10px;
    min-height: 76px;
    padding: 10px 10px 10px 24px;
    font-size: 17px;
    letter-spacing: 0.02em;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form) .wp-block-button__link::before {
    width: 28px;
    height: 28px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) :is(.is-style-hinode-line, .is-style-hinode-form) .wp-block-button__link::after {
    width: 56px;
    height: 56px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-outline .wp-block-button__link {
    min-height: 56px;
    padding: 8px 8px 8px 24px;
    font-size: 16px;
  }
  :is(.news-content, .editor-styles-wrapper .is-root-container) .is-style-hinode-outline .wp-block-button__link::after {
    width: 40px;
    height: 40px;
  }
}
