/**
 * ブロックエディタ本文（お役立ち情報・ブログ詳細）
 * 固定ページの .page-section-lead-title / .line / 客室 spec 本文に合わせたタイポ
 */

@layer components {
  .hotel-prose,
  .article-single-body.entry-content {
    font-family: var(--font-serif);
    font-size: var(--text-base);
    font-weight: 500;
    letter-spacing: var(--tracking-base);
    line-height: var(--leading-200);
    color: var(--color-text);
  }

  .hotel-prose > *:first-child,
  .article-single-body.entry-content > *:first-child {
    margin-top: 0;
  }

  .hotel-prose > * + *,
  .article-single-body.entry-content > * + * {
    margin-top: 1.5em;
  }

  /* 段落 */
  .hotel-prose :is(p, .wp-block-paragraph),
  .article-single-body.entry-content :is(p, .wp-block-paragraph) {
    margin: 0;
    font-weight: 500;
    line-height: var(--leading-200);
  }

  /* h2: セクション見出し（中央 + 下線 40px … components .line 相当） */
  .hotel-prose :is(h2, h2.wp-block-heading),
  .article-single-body.entry-content :is(h2, h2.wp-block-heading) {
    margin: 3em 0 0;
    padding: 0 0 20px;
    border: none;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: var(--tracking-base);
    line-height: var(--leading-160);
    text-align: center;
    color: var(--color-text);
  }

  .hotel-prose :is(h2, h2.wp-block-heading)::after,
  .article-single-body.entry-content :is(h2, h2.wp-block-heading)::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    margin: 20px auto 0;
    background-color: var(--color-text);
  }

  .hotel-prose > :is(h2, h2.wp-block-heading):first-child,
  .article-single-body.entry-content > :is(h2, h2.wp-block-heading):first-child {
    margin-top: 0;
  }

  /* h3: 左アクセント（客室 spec タグのボーダー色を流用） */
  .hotel-prose :is(h3, h3.wp-block-heading),
  .article-single-body.entry-content :is(h3, h3.wp-block-heading) {
    margin: 2.5em 0 0;
    padding: 0 0 0 12px;
    border: none;
    border-left: 3px solid var(--color-main);
    font-family: var(--font-serif);
    font-size: var(--text-medium);
    font-weight: 700;
    letter-spacing: var(--tracking-base);
    line-height: var(--leading-160);
    text-align: left;
    color: var(--color-text);
  }

  /* h4 */
  .hotel-prose :is(h4, h4.wp-block-heading),
  .article-single-body.entry-content :is(h4, h4.wp-block-heading) {
    margin: 2em 0 0;
    font-family: var(--font-serif);
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: var(--tracking-base);
    line-height: var(--leading-160);
    color: var(--color-muted);
  }

  .hotel-prose :is(h2, h3, h4) + *,
  .article-single-body.entry-content :is(h2, h3, h4) + * {
    margin-top: 1.25em;
  }

  /* リスト（注意書きマーカー色・客室 notes と同系） */
  .hotel-prose :is(ul, ol, .wp-block-list),
  .article-single-body.entry-content :is(ul, ol, .wp-block-list) {
    margin: 0;
    padding-left: 1.75em;
    font-weight: 500;
    line-height: var(--leading-160);
  }

  .hotel-prose ul,
  .article-single-body.entry-content ul {
    list-style-type: disc;
  }

  .hotel-prose ol,
  .article-single-body.entry-content ol {
    list-style-type: decimal;
  }

  .hotel-prose :is(ul, ol) ::marker,
  .article-single-body.entry-content :is(ul, ol) ::marker {
    color: var(--color-main);
    font-weight: 700;
  }

  .hotel-prose ul ul,
  .article-single-body.entry-content ul ul {
    list-style-type: circle;
    margin-top: 0.5em;
  }

  .hotel-prose ol ol,
  .article-single-body.entry-content ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.5em;
  }

  .hotel-prose li,
  .article-single-body.entry-content li {
    padding-left: 0.25em;
  }

  .hotel-prose li + li,
  .article-single-body.entry-content li + li {
    margin-top: 0.5em;
  }

  .hotel-prose li > :is(ul, ol),
  .article-single-body.entry-content li > :is(ul, ol) {
    margin-top: 0.5em;
  }

  /* リンク */
  .hotel-prose a,
  .article-single-body.entry-content a {
    color: var(--color-main);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity var(--duration-base) ease;
  }

  .hotel-prose a:hover,
  .article-single-body.entry-content a:hover {
    opacity: 0.75;
  }

  /* 強調 */
  .hotel-prose :is(strong, b),
  .article-single-body.entry-content :is(strong, b) {
    font-weight: 700;
    color: var(--color-text);
  }

  .hotel-prose :is(em, i),
  .article-single-body.entry-content :is(em, i) {
    font-style: italic;
  }

  /* 画像（客室スライダーと同じ角丸 16px） */
  .hotel-prose :is(img, .wp-block-image img),
  .article-single-body.entry-content :is(img, .wp-block-image img) {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
  }

  .hotel-prose .wp-block-image,
  .article-single-body.entry-content .wp-block-image {
    margin: 2.5em 0;
  }

  .hotel-prose .wp-block-image figcaption,
  .article-single-body.entry-content .wp-block-image figcaption {
    margin-top: 0.75em;
    font-size: var(--text-small);
    font-weight: 500;
    line-height: var(--leading-160);
    letter-spacing: var(--tracking-base);
    color: var(--color-muted);
    text-align: center;
  }

  /* 引用 */
  .hotel-prose :is(.wp-block-quote, blockquote),
  .article-single-body.entry-content :is(.wp-block-quote, blockquote) {
    margin: 2em 0;
    padding: 20px 24px;
    border: none;
    border-left: 3px solid var(--color-main);
    border-radius: 3px;
    background: var(--color-white);
    box-shadow: 0 0 15px 0 rgb(0 0 0 / 0.08);
    font-weight: 500;
    line-height: var(--leading-160);
  }

  .hotel-prose :is(.wp-block-quote p, blockquote p),
  .article-single-body.entry-content :is(.wp-block-quote p, blockquote p) {
    margin: 0;
  }

  .hotel-prose :is(.wp-block-quote cite, blockquote cite),
  .article-single-body.entry-content :is(.wp-block-quote cite, blockquote cite) {
    display: block;
    margin-top: 0.75em;
    font-size: var(--text-small);
    font-style: normal;
    color: var(--color-muted);
  }

  /* 区切り線 */
  .hotel-prose :is(.wp-block-separator, hr),
  .article-single-body.entry-content :is(.wp-block-separator, hr) {
    margin: 3em auto;
    border: none;
    border-top: 1px solid var(--color-border);
    max-width: 100%;
  }

  .hotel-prose .wp-block-separator.is-style-wide,
  .article-single-body.entry-content .wp-block-separator.is-style-wide {
    max-width: 100%;
  }

  .hotel-prose .wp-block-separator:not(.is-style-wide):not(.is-style-dots),
  .article-single-body.entry-content .wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
    width: 80px;
    border-top-color: #9e9e9e;
  }

  /* テーブル */
  .hotel-prose .wp-block-table,
  .article-single-body.entry-content .wp-block-table {
    margin: 2em 0;
    overflow-x: auto;
    font-size: var(--text-small);
    line-height: var(--leading-160);
  }

  .hotel-prose .wp-block-table :is(th, td),
  .article-single-body.entry-content .wp-block-table :is(th, td) {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    vertical-align: top;
  }

  .hotel-prose .wp-block-table th,
  .article-single-body.entry-content .wp-block-table th {
    background: color-mix(in srgb, var(--color-main) 8%, var(--color-white));
    font-weight: 700;
  }

  /* コード・プレフォーマット */
  .hotel-prose :is(code, kbd),
  .article-single-body.entry-content :is(code, kbd) {
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    border-radius: 3px;
    background: color-mix(in srgb, var(--color-bg) 60%, #fff);
  }

  .hotel-prose pre,
  .article-single-body.entry-content pre {
    margin: 1.5em 0;
    padding: 16px 20px;
    overflow-x: auto;
    border-radius: 3px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    font-size: var(--text-small);
    line-height: var(--leading-160);
  }

  .hotel-prose pre code,
  .article-single-body.entry-content pre code {
    padding: 0;
    background: transparent;
  }

  /* 注釈・小文字 */
  .hotel-prose :is(small, .has-small-font-size),
  .article-single-body.entry-content :is(small, .has-small-font-size) {
    font-size: var(--text-small);
    font-weight: 500;
    line-height: var(--leading-160);
    color: var(--color-muted);
  }

  /* ボタンブロック（テーマの long-arrow とは別・簡素な枠線） */
  .hotel-prose .wp-block-button__link,
  .article-single-body.entry-content .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 8px 32px;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-btn);
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-serif);
    font-size: var(--text-base);
    font-weight: 500;
    letter-spacing: var(--tracking-base);
    line-height: var(--leading-140);
    text-decoration: none;
    transition:
      color var(--duration-base) ease,
      background-color var(--duration-base) ease;
  }

  .hotel-prose .wp-block-button__link:hover,
  .article-single-body.entry-content .wp-block-button__link:hover {
    opacity: 1;
    background-color: var(--color-main);
    color: var(--color-white);
    border-color: var(--color-main);
  }

  /* カラム・グループの余白 */
  .hotel-prose :is(.wp-block-columns, .wp-block-group),
  .article-single-body.entry-content :is(.wp-block-columns, .wp-block-group) {
    margin-top: 1.5em;
    margin-bottom: 0;
  }

  .hotel-prose .wp-block-columns + *,
  .article-single-body.entry-content .wp-block-columns + * {
    margin-top: 1.5em;
  }

  @media (max-width: 768px) {
    .hotel-prose,
    .article-single-body.entry-content {
      font-size: 15px;
      line-height: 1.95;
    }

    .hotel-prose :is(h2, h2.wp-block-heading),
    .article-single-body.entry-content :is(h2, h2.wp-block-heading) {
      font-size: 22px;
      margin-top: 2.5em;
      padding-bottom: 16px;
    }

    .hotel-prose :is(h2, h2.wp-block-heading)::after,
    .article-single-body.entry-content :is(h2, h2.wp-block-heading)::after {
      margin-top: 16px;
    }

    .hotel-prose :is(h3, h3.wp-block-heading),
    .article-single-body.entry-content :is(h3, h3.wp-block-heading) {
      font-size: 18px;
      margin-top: 2em;
    }

    .hotel-prose :is(ul, ol),
    .article-single-body.entry-content :is(ul, ol) {
      padding-left: 1.5em;
    }
  }
}
