/**
 * その他・下層ページ専用スタイル (assets/css/subpage.css)
 * ネイティブCSSネスト記法を使用
 */

/* ==========================================================================
   1. 固定ページ共通：ブロックの既定余白リセット (templates/page.html)
   ========================================================================== */
.page-main {

  /* メイン・グループ直下のブロック間余白は各セクションで個別に指定する */
  &.wp-block-group>*,
  .wp-block-post-content>*,
  .wp-block-group>* {
    margin-block: 0;
  }

  .section-body>*+* {
    margin-top: 2em;
  }
}

/* 下層ページのCTAは上下80px（トップは100px） */
@media (min-width: 769px) {
  .page-main .cta-section {
    padding-block: 80px;
  }
}

/* ==========================================================================
   2. ページヘッダー（ページタイトルの帯）
   ========================================================================== */
.page-header {
  padding: 87px var(--sb-gutter);
  background-color: #f6f7f8;

  .page-header-title {
    max-width: var(--sb-container);
    margin: 0 auto;
    font-size: clamp(1.625rem, 3.34vw, 48px);
    font-weight: 700;
    line-height: 1.7;
    color: var(--sb-color-blue);
  }
}

/* ==========================================================================
   3. サービスページ (patterns/service-*.php)
   ========================================================================== */
/* ---- 導入 ---- */
.service-intro {
  padding: 80px 0;

  .section-body {
    margin-top: 40px;

    .service-intro-lead {
      margin-top: 40px;
      font-size: clamp(1.25rem, 2.22vw, 32px);
      font-weight: 700;
      line-height: 1.4;
      letter-spacing: 0.05em;
      color: var(--sb-color-blue);
    }

    .service-intro-note {
      margin-top: 8px;
      font-size: 14px;
    }
  }
}

/* ---- 3つのサービス詳細 ---- */
.service-details {
  padding: 80px 0;

  .service-detail-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-inline: var(--sb-indent);
  }

  .service-detail {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 40px;
    background-color: #f8f8f8;
    border: 1px solid var(--sb-color-grey);
    font-size: 16px;
    line-height: 1.7;
    color: var(--sb-color-black);
    scroll-margin-top: 120px;
    /* トップページからの #pm 等のリンクで追従ヘッダーに隠れないように */

    /* 段落の間は1行分あける */
    >p+p {
      margin-top: 9px;
    }
  }

  /* 番号 / タイトル｜キャッチ */
  .service-detail-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sb-color-grey);

    .service-detail-num {
      grid-column: 1 / -1;
      margin-bottom: -5px;
      font-family: 'Futura PT', Futura, 'Century Gothic', var(--sb-font-sans);
      font-size: 16px;
      font-weight: 800;
      line-height: 1.7;
      color: var(--sb-color-accent);
    }

    .service-detail-title {
      font-size: clamp(1.5rem, 2.08vw, 30px);
      font-weight: 700;
      line-height: 1.7;
      color: var(--sb-color-blue);
    }

    .service-detail-catch {
      display: flex;
      align-items: center;
      gap: 24px;
      font-size: 16px;
      font-weight: 700;

      /* タイトルとの区切り線 */
      &::before {
        content: '';
        flex-shrink: 0;
        width: 1.5px;
        height: 16px;
        background-color: var(--sb-color-black);
      }
    }
  }

  /* 小見出し＋補足を横並び、本文は下段 */
  .service-detail-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;

    .service-detail-sub-title {
      font-size: 20px;
      font-weight: 700;
      line-height: 1.7;
      color: var(--sb-color-blue);
    }

    .service-detail-sub-note {
      font-size: 14px;
      font-weight: 700;
      line-height: 1.6;
      letter-spacing: 0.07em;
      color: var(--sb-color-blue);

      &::before {
        content: '- ';
      }
    }

    >p:not(.service-detail-sub-note) {
      flex-basis: 100%;
    }
  }

  /* アセスメント（ロゴ＋説明） */
  .service-assessment {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
    background-color: #f1f1f1;

    .service-assessment-logo {
      flex: 1;
      display: flex;
      justify-content: center;
      padding: 16px;

      img {
        width: 254px;
        height: auto;
      }
    }

    .service-assessment-body {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .service-assessment-text {
      font-size: 14px;
      font-weight: 700;
      line-height: 1.6;
      letter-spacing: 0.07em;
      color: var(--sb-color-blue);
    }
  }

  /* 継続支援の内容（ダッシュ付きリスト） */
  .service-detail-points {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background-color: #f1f1f1;

    p {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.6;
      letter-spacing: 0.07em;
      color: var(--sb-color-blue);

      &::before {
        content: '';
        flex-shrink: 0;
        width: 8px;
        height: 2px;
        background-color: var(--sb-color-blue);
      }
    }
  }
}

/* ---- ご一緒するうえでの原則（番号は CSS カウンターで自動表示） ---- */
.service-principles {
  padding: 80px 0;

  .service-principles-title {
    padding-inline: var(--sb-indent);
    font-size: clamp(1.375rem, 2.08vw, 30px);
    font-weight: 700;
    line-height: 1.7;
    color: var(--sb-color-blue);
  }

  .service-principles-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 27px;
    padding-inline: var(--sb-indent);
    counter-reset: principle;
  }

  .service-principle {
    counter-increment: principle;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 176px;
    box-sizing: border-box;
    padding: 30px;
    background-color: #f8f8f8;
    border: 1px solid var(--sb-color-grey);
  }

  .service-principle-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.05em;
    color: var(--sb-color-blue);

    &::before {
      content: counter(principle);
      flex-shrink: 0;
      display: grid;
      place-items: center;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background-color: var(--sb-color-blue);
      color: var(--sb-color-white);
      font-family: 'Futura PT', Futura, 'Century Gothic', var(--sb-font-sans);
      font-size: 17px;
      font-weight: 500;
      line-height: 1;
    }
  }

  .service-principle-text {
    padding-left: 40px;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.07em;
    color: var(--sb-color-black);
  }
}

/* ---- 固定ページのレスポンシブ ---- */
@media (max-width: 992px) {
  .service-principles .service-principles-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .page-main .section-body>*+* {
    margin-top: 1em;
  }

  .page-header {
    padding: 80px var(--sb-gutter);

    .page-header-title {
      font-size: 26px;
      line-height: 1.3;
      letter-spacing: 0.02em;
    }
  }

  /* SPは手動改行を外して流し込み */
  .service-intro .section-body br,
  .service-details .service-detail p br {
    display: none;
  }

  .service-intro {
    padding: 56px 0 48px;

    .section-body {
      margin-top: 28px;

      .service-intro-lead {
        margin-top: 1em;
        font-size: 20px;
        letter-spacing: 0.04em;
        word-break: auto-phrase;
      }

      .service-intro-note {
        font-size: 12px;
        line-height: 1.7;
      }
    }
  }

  .service-details {
    padding: 64px 0 56px;

    .service-detail-list {
      gap: 20px;
    }

    .service-detail {
      padding: 15px;
      font-size: 14px;
      line-height: 1.75;
      letter-spacing: 0.03em;

      >p+p {
        margin-top: 0;
      }
    }

    .service-detail-head {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;

      .service-detail-num {
        margin-bottom: 0;
        font-family: inherit;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.5;
      }

      .service-detail-title {
        font-size: 28px;
        line-height: 1.3;
      }

      .service-detail-catch {
        font-size: 13px;
        line-height: 1.5;
        letter-spacing: 0.04em;

        &::before {
          display: none;
        }
      }
    }

    .service-detail-sub {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      margin-top: 0;

      .service-detail-sub-title {
        font-size: 18px;
        line-height: 1.5;
        letter-spacing: 0.02em;
        word-break: auto-phrase;
      }

      .service-detail-sub-note {
        font-size: 12px;
        line-height: 1.5;
        letter-spacing: 0.04em;

        &::before {
          content: none;
        }
      }
    }

    .service-assessment {
      flex-direction: column;
      gap: 16px;
      padding: 15px;

      .service-assessment-logo {
        padding: 0;
      }

      .service-assessment-body {
        gap: 16px;
        width: 100%;
      }

      .service-assessment-text {
        font-size: 12px;
        line-height: 1.75;
        letter-spacing: 0.03em;
        text-align: center;
      }
    }

    .service-detail-points {
      gap: 10px;
      padding: 15px;

      p {
        align-items: flex-start;
        line-height: 1.5;
        letter-spacing: 0.03em;

        &::before {
          height: 1px;
          margin-top: 10px;
          background-color: var(--sb-color-black);
        }
      }
    }
  }

  .service-principles {
    padding: 64px 0;

    .service-principles-title {
      font-size: 22px;
      line-height: 1.4;
      letter-spacing: 0.03em;
    }

    .service-principles-list {
      gap: 28px;
      margin-top: 28px;
    }

    .service-principle {
      gap: 12px;
      min-height: 0;
      padding: 15px;
    }

    .service-principle-title {
      align-items: flex-start;
      gap: 10px;
      font-size: 18px;
      line-height: 1.5;
      letter-spacing: 0.03em;

      &::before {
        width: 28px;
        height: 28px;
        font-family: inherit;
        font-size: 14px;
      }
    }

    .service-principle-text {
      padding-left: 0;
      line-height: 1.75;
      letter-spacing: 0.03em;
    }
  }
}

/* ==========================================================================
   3-2. 代表についてページ (patterns/about-*.php)
   ========================================================================== */
/* 「01　プロフィール」などの小見出し */
.about-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--sb-color-accent);
}

/* ---- プロフィール（白いカード＋写真。写真はページヘッダーに少し重ねる） ---- */
.about-profile {
  padding-bottom: 102px;
  background-color: #f6f7f8;

  .about-profile-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 483px);
    align-items: start;
    padding: 0 21px 0 18px;
  }

  .about-profile-card {
    display: flex;
    flex-direction: column;
    gap: 31px;
    min-height: 395px;
    box-sizing: border-box;
    margin-top: 161px;
    padding: 48px 45px;
    background-color: var(--sb-color-white);
    color: var(--sb-color-blue);
  }

  .about-profile-name {
    font-size: clamp(1.5rem, 2.08vw, 30px);
    font-weight: 700;
    line-height: 1.7;
  }

  .about-profile-qualification {
    font-size: clamp(1.25rem, 1.67vw, 24px);
    font-weight: 700;
    line-height: 1.4;
  }

  .about-profile-text {
    font-size: 15px;
    line-height: 1.7;
  }

  .about-profile-photo {
    position: relative;
    /* ページヘッダーの背景より前面に出す */
    margin-top: -17px;

    img {
      display: block;
      width: 100%;
      height: auto;
    }
  }
}

/* ---- 経歴（見出し左・本文右） ---- */
.about-career {
  padding: 80px 0;

  .about-career-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-inline: 40px;
  }

  .about-career-item {
    display: grid;
    grid-template-columns: minmax(0, 400fr) minmax(0, 660fr);
    column-gap: 60px;
    color: var(--sb-color-blue);
  }

  .about-career-title {
    font-size: clamp(1.375rem, 2.08vw, 30px);
    font-weight: 700;
    line-height: 1.7;
  }

  .about-career-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-size: 15px;
    line-height: 1.7;
  }
}

@media (max-width: 992px) {
  .about-profile .about-profile-card {
    margin-top: 80px;
    padding: 40px 32px;
  }

  .about-career .about-career-list {
    padding-inline: 0;
  }
}

@media (max-width: 768px) {

  /* SPは写真を上、カードを写真の下端に重ねて縦積み */
  .about-profile {
    padding-bottom: 56px;

    .about-profile-inner {
      display: flex;
      flex-direction: column;
      padding: 0;
    }

    .about-profile-photo {
      order: -1;
      margin: -40px 0 0 40px;
    }

    .about-profile-card {
      position: relative;
      gap: 12px;
      min-height: 0;
      margin: -48px 40px 0 0;
      padding: 24px 20px;
    }

    .about-profile-name {
      font-size: 22px;
      line-height: 1.5;
      letter-spacing: 0.03em;
    }

    .about-profile-qualification {
      font-size: 16px;
      line-height: 1.5;
    }

    .about-profile-text {
      font-size: 14px;
      line-height: 1.75;
      letter-spacing: 0.03em;

      br {
        display: none;
      }
    }
  }

  .about-career {
    padding: 64px 0 56px;

    .about-career-list {
      gap: 40px;
    }

    .about-career-item {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .about-career-title {
      font-size: 22px;
      line-height: 1.5;
      letter-spacing: 0.03em;
      word-break: auto-phrase;
    }

    .about-career-body {
      gap: 1em;
      font-size: 14px;
      line-height: 1.75;
      letter-spacing: 0.03em;
    }
  }
}

/* ==========================================================================
   3-3. 私たちの考え方ページ (patterns/philosophy-*.php)
   ========================================================================== */
/* 白背景／紺背景（is-dark）のセクションを交互に並べる */
.philosophy-block {
  padding: 80px 0;
  color: var(--sb-color-blue);

  &.is-dark {
    --sb-link-color: var(--sb-color-white);
    background-color: var(--sb-color-blue);
    color: var(--sb-color-white);

    .philosophy-label {
      color: var(--sb-color-white);
    }
  }

  /* ラベル＋見出し */
  .philosophy-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-inline: var(--sb-indent);

    /* 改行位置を .is-phrase / br で制御するため flex をやめ、記号は左に絶対配置 */
    .section-title {
      display: block;
      position: relative;
      padding-left: calc(0.648em + 20px);

      &::before {
        position: absolute;
        top: 0;
        left: 0;
      }
    }

    .section-head {
      align-items: center;
    }
  }

  .philosophy-label {
    font-size: 16px;
    font-weight: 700;
    line-height: 2;
    letter-spacing: 0.07em;
    color: var(--sb-color-accent);
  }

  /* 本文（段落の間は1行分あける） */
  .philosophy-text {
    margin-top: 40px;
    padding-inline: var(--sb-indent);
    font-size: 16px;
    line-height: 2;
    letter-spacing: 0.07em;

    >p+p {
      margin-top: 2em;
    }
  }

  /* 右側のロゴマークの透かし */
  &.has-watermark {
    position: relative;
    overflow: hidden;

    &::before {
      content: '';
      position: absolute;
      top: 56px;
      left: calc(50% + 80px);
      width: 616px;
      aspect-ratio: 100 / 98;
      background: url('../images/logo-mark.svg') no-repeat center / 100% 100%;
      opacity: 1.0;
      pointer-events: none;
    }

    .section-container {
      position: relative;
    }
  }
}

/* ---- バリュー：三つのBOWのカード ---- */
.philosophy-block .value-card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 18px;
  margin-top: 40px;
  padding-inline: var(--sb-indent);
}

.value-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 312px;
  box-sizing: border-box;
  padding: 24px;
  background-color: #f8f8f8;
  border: 1px solid var(--sb-color-grey);
  color: var(--sb-color-black);

  /* 見出し行：記号 / タイトル・英字（記号は疑似要素） */
  .value-card-head {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    column-gap: 4px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sb-color-grey);

    &::before {
      content: '';
      grid-column: 1;
      grid-row: 1 / 3;
      width: 12px;
      height: 30px;
      background: url('../images/card-mark.svg') no-repeat center / 100% 100%;
    }
  }

  .value-card-title {
    grid-column: 2;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.05em;
    color: var(--sb-color-black);
  }

  .value-card-sub {
    grid-column: 2;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.07em;
  }

  .value-card-text {
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.07em;
  }
}

.philosophy-block .philosophy-closing {
  margin-top: 40px;
  padding-inline: var(--sb-indent);
  font-size: clamp(1.375rem, 2.22vw, 32px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

@media (max-width: 992px) {
  .philosophy-block .value-card-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .value-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {

  /* SPはセクション内を縦並び・間隔20px、リンクはセクション末尾 */
  .philosophy-block {
    padding: 56px 0;

    .section-container {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .philosophy-head {
      display: contents;

      /* 記号との間隔はSPでは10px */
      .section-title {
        padding-left: calc(0.648em + 10px);
        letter-spacing: 0.02em;
      }

      .section-head .wp-block-buttons {
        order: 1;
      }
    }

    .philosophy-label {
      font-size: 14px;
      line-height: 1.5;
    }

    /* 改行位置の調整：この単位で折り返す */
    .is-phrase {
      display: inline-block;
    }

    /* 本文は手動改行を外して流し込み（強調の帯は common.css で独立した行になる） */
    .philosophy-text {
      margin-top: 0;
      font-size: 14px;
      line-height: 1.9;
      letter-spacing: 0.03em;

      >p+p {
        margin-top: 24px;
      }

      br {
        display: none;
      }
    }

    /* SPは透かしなし */
    &.has-watermark {
      padding-bottom: 64px;

      &::before {
        display: none;
      }
    }
  }

  .philosophy-block .value-card-list {
    gap: 16px;
    margin-top: 0;
  }

  .value-card {
    gap: 8px;
    padding: 15px;

    .value-card-head {
      row-gap: 2px;
      padding-bottom: 8px;
    }

    .value-card-sub {
      font-size: 12px;
      line-height: 1.5;
    }

    .value-card-text {
      line-height: 1.75;
      letter-spacing: 0.03em;

      br {
        display: none;
      }
    }
  }

  .philosophy-block .philosophy-closing {
    margin-top: 0;
    font-size: 20px;
    line-height: 1.5;
    letter-spacing: 0.04em;
  }
}

/* ==========================================================================
   3-4. ご紹介・ご検討にあたってページ (patterns/referral-*.php)
   ========================================================================== */
/* ---- 共通：セクション・見出し・白いボックス・番号付きの説明 ---- */
.referral-section {
  padding: 52px 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--sb-color-blue);

  &.is-surface {
    background-color: #f6f7f8;
  }

  &.is-navy {
    background-color: #1c3645;
    color: var(--sb-color-white);
  }

  &.is-grey {
    background-color: #829099;
    color: var(--sb-color-white);
  }

  .referral-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-inline: 40px;
  }

  .referral-title {
    font-size: clamp(1.375rem, 2.08vw, 30px);
    font-weight: 700;
    line-height: 1.7;
    color: inherit;
  }

  .referral-box {
    box-sizing: border-box;
    padding: 24px;
    background-color: var(--sb-color-white);
    border: 1px solid #d8dee2;
    color: var(--sb-color-blue);
  }

  /* 番号（左）＋説明（右） */
  .referral-numbered {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: start;
    column-gap: 32px;
  }

  .referral-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--sb-color-accent);
  }

  .referral-numbered-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .referral-item-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--sb-color-blue);
  }
}

/* ---- リード ---- */
.referral-lead .referral-inner {
  max-width: 920px;
  margin-inline: auto;
  padding-inline: 0;
}

/* ---- ひとことで言うと（写真＋説明） ---- */
/* このセクションのみコンテンツ幅1280px（写真400＋間隔60＋本文820） */
.referral-overview {
  padding: 52px 0 30px;

  .section-container {
    max-width: calc(1280px + var(--sb-gutter) * 2);
  }

  .referral-overview-inner {
    display: grid;
    grid-template-columns: minmax(0, 400px) minmax(0, 820px);
    align-items: start;
    gap: 60px;
  }

  .referral-overview-photo img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
  }

  .referral-overview-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    letter-spacing: -0.01em;
  }
}

/* ---- 入り方（写真＋番号付きの説明） ---- */
.referral-roles {
  .referral-role-list {
    display: flex;
    flex-direction: column;
    gap: 44px;
    width: 100%;
    max-width: 1030px;
    margin-inline: auto;
  }

  .referral-role {
    display: grid;
    grid-template-columns: 273px minmax(0, 1fr);
  }

  .referral-role-photo {
    min-height: 205px;

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .referral-numbered {
    column-gap: 0;
    padding: 24px 48px 24px 24px;
    background-color: var(--sb-color-white);
    border: 1px solid #d8dee2;
    border-left: none;
  }
}

/* ---- お引き受けしていないもの ---- */
.referral-exclusions .referral-box {
  padding: 32px;
}

/* ---- 私たちについて（写真に白い本文面を重ねる＋実績の表） ---- */
.referral-about {
  padding: 80px 0 132px;
  color: var(--sb-color-blue);

  .section-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .referral-about-media {
    position: relative;
    min-height: 440px;
  }

  .referral-about-photo {
    position: absolute;
    top: -11px;
    right: 0;
    width: 56.67%;
    /* 680 / 1200 */
    height: 440px;

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }

  .referral-about-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 32px;
    box-sizing: border-box;
    width: min(640px, 53.34%);
    margin: 101px 0 0 22px;
    padding: 40px;
    background-color: var(--sb-color-white);
    font-size: 16px;
    line-height: 2;
  }

  .referral-table {
    table {
      width: 100%;
      border-collapse: collapse;
    }

    th,
    td {
      padding: 20px;
      border: none;
      font-size: 16px;
      line-height: 2;
      text-align: left;
      vertical-align: top;
    }

    th:nth-child(1) {
      width: 240px;
    }

    th:nth-child(2) {
      width: 230px;
    }

    thead {
      border-bottom: none;

      th {
        background-color: var(--sb-color-blue);
        color: var(--sb-color-white);
        font-weight: 700;
      }
    }

    tbody tr:nth-child(odd) {
      background-color: #f6f7f8;
    }
  }

  .referral-about-note {
    font-size: 16px;
    line-height: 2;
  }
}

/* ---- ご紹介をお考えの方へ（紺の斜めパネル＋写真） ---- */
.referral-band {
  position: relative;
  overflow: hidden;
  background-color: #1c3645;
  color: var(--sb-color-white);

  &::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    width: 70.9%;
    /* 1021 / 1440 */
    clip-path: polygon(0 0, 100% 0, 79.24% 100%, 0 100%);
    background: linear-gradient(175deg, #1c3645 66%, #325b72 106%);
  }

  .referral-band-photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 51.7%;
    /* 744 / 1440 */

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: 0 69%;
    }
  }

  .section-container {
    position: relative;
    z-index: 2;
  }

  .referral-band-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-height: 488px;
    box-sizing: border-box;
    padding: 132px 0 100px 48px;

    .section-title::before {
      display: none;
    }
  }

  .referral-band-text {
    max-width: 557px;
    font-size: 15px;
    line-height: 1.7;
  }
}

/* ---- こんな言葉を聞いたら（引用2列） ---- */
.referral-triggers .referral-quote-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

/* ---- 領域について（対象｜説明） ---- */
.referral-domains .referral-domain {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  column-gap: 60px;
}

/* ---- ご紹介いただくメリット（アイコン付きカード3列） ---- */
.referral-merits {
  .referral-merit-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .referral-merit {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 333px;
  }

  .referral-merit-icon img {
    display: block;
  }
}

/* ---- ご紹介の流れ（ステップ＋ボタン） ---- */
.referral-flow {
  .section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .referral-flow-box {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
    padding: 40px 32px;
  }

  .referral-flow-action {
    justify-content: center;
  }
}

/* 紺の塗りボタン（テキスト＋→） */
.wp-block-button.referral-button .wp-block-button__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 280px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 18px 24px;
  border-radius: 0;
  background-color: var(--sb-color-blue);
  color: var(--sb-color-white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  text-decoration: none;
  transition: opacity 0.2s ease;

  &::after {
    content: '→';
    transition: transform 0.25s ease;
  }

  &:hover {
    opacity: 0.85;

    &::after {
      transform: translateX(4px);
    }
  }
}

@media (max-width: 992px) {
  .referral-overview .referral-overview-inner {
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 40px;
  }

  .referral-roles .referral-role {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .referral-about .referral-about-panel {
    width: 60%;
  }

  .referral-domains .referral-domain {
    grid-template-columns: 200px minmax(0, 1fr);
    column-gap: 32px;
  }

  .referral-merits {
    .referral-merit-list {
      grid-template-columns: minmax(0, 1fr);
      gap: 20px;
    }

    .referral-merit {
      min-height: 0;
    }
  }
}

@media (max-width: 768px) {

  /* SPは本文14px・ボックス余白15px、横並びは縦積みにする */
  .referral-section {
    padding: 56px 0;
    font-size: 14px;
    line-height: 1.75;
    letter-spacing: 0.03em;

    .referral-inner {
      gap: 20px;
      padding-inline: 0;
    }

    .referral-title {
      font-size: 22px;
      line-height: 1.5;
      letter-spacing: 0.03em;
      word-break: auto-phrase;
    }

    .referral-box {
      padding: 15px;
    }

    .referral-numbered {
      grid-template-columns: minmax(0, 1fr);
      row-gap: 8px;
    }

    .referral-num {
      font-size: 20px;
      line-height: 1.4;
    }

    .referral-numbered-body {
      gap: 12px;
    }

    .referral-item-title {
      font-size: 15px;
      line-height: 1.6;
      word-break: auto-phrase;
    }
  }

  .referral-overview {
    padding: 56px 0;

    .referral-overview-inner {
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
    }

    .referral-overview-photo img {
      height: auto;
      aspect-ratio: 4 / 3;
    }

    .referral-overview-body {
      gap: 16px;
    }
  }

  .referral-roles {
    .referral-role-list {
      gap: 20px;
    }

    .referral-role {
      grid-template-columns: minmax(0, 1fr);
    }

    .referral-role-photo {
      min-height: 0;

      img {
        aspect-ratio: 4 / 3;
      }
    }

    .referral-numbered {
      padding: 15px;
      border-top: none;
      border-left: 1px solid #d8dee2;
    }
  }

  .referral-exclusions .referral-box {
    padding: 15px;
  }

  .referral-about {
    padding: 56px 0 64px;

    .section-container {
      gap: 20px;
    }

    .referral-about-media {
      min-height: 0;
    }

    .referral-about-photo {
      position: static;
      width: 100%;
      height: auto;

      img {
        height: auto;
        aspect-ratio: 680 / 440;
      }
    }

    .referral-about-panel {
      gap: 1em;
      width: auto;
      margin: -40px 20px 0;
      padding: 20px;
      font-size: 14px;
      line-height: 1.9;
      letter-spacing: 0.03em;
    }

    /* 表は1行＝1ブロックに組み替え、列名は疑似要素で補う */
    .referral-table {
      thead {
        display: none;
      }

      table,
      tbody,
      tr,
      td {
        display: block;
      }

      tr {
        padding: 15px;
      }

      td {
        padding: 0;
        font-size: 14px;
        line-height: 1.75;
        letter-spacing: 0.03em;
      }

      td:nth-child(1) {
        margin-bottom: 4px;
        font-weight: 700;
      }

      td:nth-child(2)::before {
        content: '担った領域：';
      }

      td:nth-child(3)::before {
        content: '役割：';
      }
    }

    .referral-about-note {
      font-size: 12px;
      line-height: 1.75;
    }
  }

  /* SPは写真を上に置き、その下に紺地のテキスト */
  .referral-band {
    &::before {
      display: none;
    }

    .referral-band-photo {
      position: static;
      width: 100%;

      img {
        height: auto;
        aspect-ratio: 16 / 10;
        object-position: 70% 60%;
      }
    }

    .referral-band-content {
      gap: 20px;
      min-height: 0;
      padding: 40px 0 56px;
    }

    .referral-band-text {
      font-size: 14px;
      line-height: 1.75;
      letter-spacing: 0.03em;
    }
  }

  .referral-triggers .referral-quote-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .referral-domains .referral-domain {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }

  .referral-merits {
    .referral-merit-list {
      gap: 16px;
    }

    .referral-merit {
      gap: 12px;
    }
  }

  .referral-flow {
    .section-container {
      gap: 24px;
    }

    .referral-flow-box {
      gap: 20px;
      padding: 24px 15px;
    }

    /* ステップは短文なので番号と本文を横並びのまま詰める */
    .referral-numbered {
      grid-template-columns: 36px minmax(0, 1fr);
      column-gap: 12px;
    }

    .referral-flow-action,
    .wp-block-button.referral-button,
    .wp-block-button.referral-button .wp-block-button__link {
      width: 100%;
    }
  }
}

/* ==========================================================================
   3-5. プライバシーポリシーページ (patterns/privacy-*.php)
   ========================================================================== */
/* 番号付き見出し（section-title）＋本文の項目を縦に並べる */
.privacy-policy {
  color: var(--sb-color-blue);

  .privacy-item {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-block: 44px;
  }

  /* 本文：段落の間はあけずに行を続ける */
  .privacy-body {
    padding-left: var(--sb-indent);
    font-size: 16px;
    line-height: 2;

    a {
      color: inherit;
      text-decoration: underline;
      text-underline-offset: 0.2em;

      &:hover {
        text-decoration: none;
      }
    }
  }

  /* 「・」付きの箇条書き（折り返し行は記号の後ろに揃える） */
  .privacy-list {
    padding: 0;
    list-style: none;

    li {
      padding-left: 1em;
      text-indent: -1em;

      &::before {
        content: '・';
      }
    }
  }
}

@media (max-width: 768px) {
  .privacy-policy {
    padding-block: 20px 36px;

    .privacy-item {
      gap: 20px;
      padding-block: 20px;
    }

    .privacy-body {
      font-size: 14px;
      line-height: 1.9;
      letter-spacing: 0.03em;
    }
  }
}

/* ==========================================================================
   3-6. 会社概要・お問い合わせページ (patterns/contact-*.php)
   ========================================================================== */
/* ---- 会社概要（項目名｜内容の表、行は白／グレーの交互） ---- */
.contact-company {
  padding: 80px 0;
  color: var(--sb-color-blue);

  .section-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .contact-company-table {
    padding-inline: 40px;

    table {
      width: 100%;
      border-collapse: collapse;
    }

    td {
      padding: 20px;
      border: none;
      font-size: 16px;
      line-height: 2;
      text-align: left;
      vertical-align: top;
    }

    td:first-child {
      width: 240px;
      box-sizing: border-box;
    }

    tr:nth-child(even) {
      background-color: #f6f7f8;
    }

    a {
      color: inherit;
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }
  }
}

/* ---- お問い合わせ（案内文＋白い枠のフォーム） ---- */
.contact-form {
  padding: 80px 0;
  background-color: #f6f7f8;
  color: var(--sb-color-blue);

  .section-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .contact-form-lead {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-left: var(--sb-indent);
    font-size: 16px;
    line-height: 2;
  }

  .contact-form-box {
    width: 100%;
    max-width: 920px;
    box-sizing: border-box;
    margin-inline: auto;
    padding: 80px 90px;
    background-color: var(--sb-color-white);
  }

  /* 編集用メモはサイト上では表示しない */
  .contact-form-placeholder {
    display: none;
  }
}

/* ---- Snow Monkey Forms の見た目（ラベルは入力欄の上、入力欄はグレー地） ---- */
.contact-form-box {
  --smf-border: #d1d9de;
  --smf-muted: #636e75;

  .smf-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .smf-form .smf-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: none;
  }

  .smf-form .smf-item__col {
    flex: none;
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .smf-item__label {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--sb-color-blue);
  }

  .smf-item__description,
  .smf-item__controls + * {
    font-size: 12px;
    line-height: 1.7;
    color: var(--smf-muted);
  }

  .smf-form .smf-text-control__control,
  .smf-form .smf-textarea-control__control {
    display: block;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--smf-border);
    border-radius: 0;
    background-color: #f6f7f8;
    box-shadow: none;
    color: var(--sb-color-blue);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;

    &:focus {
      outline: 2px solid var(--sb-color-blue);
      outline-offset: -1px;
      background-color: var(--sb-color-white);
    }
  }

  .smf-form .smf-text-control__control {
    height: 56px;
  }

  .smf-form .smf-textarea-control__control {
    min-height: 176px;
    resize: vertical;
  }

  /* 同意チェックは中央寄せ（ラベルは他の項目と同じく左揃えのまま） */
  .smf-checkboxes-control__control {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* 1つの項目に複数の入力を置いた場合も間隔をあける */
  .smf-item__controls > .smf-placeholder + .smf-placeholder {
    margin-top: 32px;
  }

  .smf-checkbox-control {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
  }

  .smf-form .smf-checkbox-control__control {
    appearance: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1px solid var(--sb-color-blue);
    border-radius: 0;
    background-color: var(--sb-color-white);
    cursor: pointer;

    &:checked {
      background-color: var(--sb-color-blue);
      box-shadow: inset 0 0 0 3px var(--sb-color-white);
    }

    &:focus-visible {
      outline: 2px solid var(--sb-color-accent);
      outline-offset: 2px;
    }
  }

  .smf-checkbox-control__label {
    font-size: 15px;
    line-height: 1.7;
    color: var(--sb-color-blue);
  }

  /* Turnstile のウィジェットも中央寄せ（Snow Monkey Forms が出力する枠） */
  .snow-monkey-forms-turnstile,
  .cf-turnstile {
    display: flex;
    justify-content: center;
    margin-top: 32px;
  }

  /* 完了画面では Turnstile は不要なので隠す（入力・確認画面では表示） */
  .snow-monkey-form[data-screen="complete"] :is(.snow-monkey-forms-turnstile, .cf-turnstile) {
    display: none;
  }

  /* 送信・確認・戻るボタン：テキスト＋金の矢印＋下線（トップのリンクと同じ形） */
  .smf-action {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 32px;
    margin-top: 32px;
  }

  .smf-action .smf-button-control__control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 280px;
    max-width: 100%;
    min-height: 40px;
    padding: 0 0 4px;
    border: none;
    border-bottom: 1px solid var(--smf-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--sb-color-blue);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-align: left;
    cursor: pointer;

    &::after {
      content: '';
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      background: url('../images/icon-arrow-box.svg') no-repeat center / 100% 100%;
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    &:hover::after {
      transform: translate(3px, -3px);
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }

  /* 確認画面の「戻る」は矢印なし */
  .smf-action .smf-button-control__control[data-action="back"]::after {
    display: none;
  }

  /* 入力エラー（項目の下に小さく） */
  .smf-error-messages {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.7;
    color: #b3261e;
  }

  /* 確認画面：入力内容をグレー地のテキストで表示 */
  .snow-monkey-form[data-screen="confirm"] .smf-placeholder {
    padding: 14px 16px;
    background-color: #f6f7f8;
    font-size: 16px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* 完了画面：中央寄せの見出し＋本文＋トップへのリンク */
  .smf-complete-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-block: 24px;
    text-align: center;
    color: var(--sb-color-blue);

    > * {
      margin: 0;
    }

    h2,
    h3 {
      font-size: clamp(1.375rem, 1.67vw, 24px);
      font-weight: 700;
      line-height: 1.5;
    }

    p {
      font-size: 16px;
      line-height: 2;
    }

    .contact-complete-note {
      font-size: 13px;
      line-height: 1.8;
      color: var(--smf-muted);
    }

    .wp-block-buttons {
      justify-content: center;
      margin-top: 8px;
    }
  }

  /* 送信失敗時のメッセージ */
  .smf-system-error-content {
    padding: 16px;
    background-color: #fdf2f1;
    color: #b3261e;
    font-size: 14px;
    line-height: 1.8;
  }
}

@media (max-width: 768px) {
  .contact-company {
    padding: 56px 0;

    .section-container {
      gap: 20px;
    }

    /* 表は1行＝1ブロック（項目名を上、内容を下） */
    .contact-company-table {
      padding-inline: 0;

      table,
      tbody,
      tr,
      td {
        display: block;
      }

      tr {
        padding: 12px 15px;
      }

      td {
        padding: 0;
        font-size: 14px;
        line-height: 1.75;
        letter-spacing: 0.03em;
      }

      td:first-child {
        width: auto;
        margin-bottom: 2px;
        font-size: 12px;
        font-weight: 700;
      }
    }
  }

  .contact-form {
    padding: 56px 0 64px;

    .section-container {
      gap: 20px;
    }

    .contact-form-lead {
      gap: 0;
      font-size: 14px;
      line-height: 1.9;
      letter-spacing: 0.03em;
    }

    .contact-form-box {
      padding: 32px 15px;
    }
  }

  .contact-form-box {
    .smf-form {
      gap: 24px;
    }

    .smf-item__label {
      font-size: 14px;
    }

    .smf-form .smf-text-control__control {
      height: 48px;
    }

    .smf-form .smf-textarea-control__control {
      min-height: 160px;
    }

    .smf-checkbox-control__label {
      font-size: 14px;
      text-align: left;
    }

    .snow-monkey-form[data-screen="confirm"] .smf-placeholder {
      padding: 12px;
      font-size: 14px;
    }

    .smf-complete-content {
      gap: 16px;

      p {
        font-size: 14px;
        line-height: 1.9;
        text-align: left;
      }
    }

    .smf-action .smf-button-control__control {
      width: 100%;
    }
  }
}

/* ==========================================================================
   3-7. 実績一覧ページ (patterns/works-*.php、表は inc/works.php の [sum_bow_works])
   ========================================================================== */
/* ---- これまでの主な支援（グレー地に白いパネル＋表） ---- */
.works-list {
  padding: 61px var(--sb-gutter) 0;
  background-color: #f6f7f8;
  color: var(--sb-color-blue);

  .works-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1327px;
    box-sizing: border-box;
    margin-inline: auto;
    padding: 80px clamp(24px, 7.2vw, 103px);
    background-color: var(--sb-color-white);
  }

  .works-title {
    font-size: clamp(1.375rem, 2.08vw, 30px);
    font-weight: 700;
    line-height: 1.7;
  }

  .works-table table {
    width: 100%;
    border-collapse: collapse;
  }

  .works-table th {
    padding: 20px;
    background-color: var(--sb-color-blue);
    color: var(--sb-color-white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.7;
    text-align: left;

    &:nth-child(1) {
      width: 240px;
    }

    &:nth-child(2) {
      width: 230px;
    }
  }

  .works-table td {
    padding: 40px 20px;
    font-size: 15px;
    line-height: 1.7;
    vertical-align: top;
  }

  .works-table tbody tr:not(:last-child) {
    border-bottom: 1px solid #d1d9de;
  }

  .works-table-name {
    font-size: 14px;
    font-weight: 700;
  }

  .works-table-note {
    display: block;
  }

  .works-note {
    font-size: 13px;
    line-height: 1.7;
  }
}

/* ---- 補足とサービスへのリンク ---- */
.works-summary {
  padding: 80px 0;
  background-color: #f6f7f8;
  color: var(--sb-color-blue);

  .works-summary-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1100px;
    margin-inline: auto;
  }

  .works-summary-text {
    max-width: 485px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.7;
  }

  /* リンクは小さめ（14px・細い下線） */
  .wp-block-button.is-style-link-arrow {
    width: 280px;

    .wp-block-button__link {
      border-bottom: 1px solid #d1d9de;
      font-size: 14px;
    }
  }
}

@media (max-width: 768px) {
  .works-list {
    padding-top: 40px;

    .works-panel {
      gap: 20px;
      padding: 32px 15px;
    }

    .works-title {
      font-size: 22px;
      line-height: 1.5;
      letter-spacing: 0.03em;
    }

    /* 表は1件＝1ブロック（業種・規模を上、領域と役割を下） */
    .works-table {
      thead {
        display: none;
      }

      table,
      tbody,
      tr,
      td {
        display: block;
      }

      tr {
        padding: 16px 0;
      }

      td {
        padding: 0;
        font-size: 14px;
        line-height: 1.75;
        letter-spacing: 0.03em;
      }

      .works-table-name {
        margin-bottom: 6px;
        font-size: 15px;
      }

      .works-table-note {
        font-size: 12px;
      }

      .works-table-area::before {
        content: '担った領域：';
      }

      .works-table-role::before {
        content: '役割：';
      }
    }

    .works-note {
      font-size: 12px;
    }
  }

  .works-summary {
    padding: 48px 0 64px;

    .works-summary-inner {
      flex-direction: column;
      align-items: stretch;
      gap: 24px;
    }

    .works-summary-text {
      font-size: 14px;
      line-height: 1.75;
      letter-spacing: 0.03em;

      br {
        display: none;
      }
    }

    .wp-block-button.is-style-link-arrow {
      width: 100%;
    }
  }
}

/* ==========================================================================
   4. 【投稿・一覧用】ページヘッダー & パンくずリスト (Subpage Header & Breadcrumbs)
   ========================================================================== */
.subpage-header {
  background: var(--wp--preset--color--surface, #f8fafc);
  border-bottom: 1px solid var(--wp--preset--color--border, #e2e8f0);
  padding: 3.5rem 1.5rem;

  .header-inner {
    max-width: var(--wp--style--global--content-size, 860px);
    margin: 0 auto;

    .breadcrumbs {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.85rem;
      color: var(--wp--preset--color--text-muted, #64748b);
      margin-bottom: 1.25rem;

      a {
        color: var(--wp--preset--color--secondary, #475569);
        text-decoration: none;
        transition: color 0.2s ease;

        &:hover {
          color: var(--wp--preset--color--accent, #2563eb);
        }
      }

      .separator {
        opacity: 0.5;
      }

      .current {
        font-weight: 500;
        color: var(--wp--preset--color--primary, #1e293b);
      }
    }

    .page-title {
      font-size: clamp(1.85rem, 3.5vw, 2.5rem);
      font-weight: 800;
      line-height: 1.25;
      margin: 0 0 1rem;
      color: var(--wp--preset--color--primary, #1e293b);
    }

    .post-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 1.25rem;
      font-size: 0.875rem;
      color: var(--wp--preset--color--text-muted, #64748b);

      .meta-item {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
      }
    }
  }
}

/* ==========================================================================
   5. 【投稿・一覧用】下層メインコンテンツ & 本文スタイリング (Entry Content)
   ========================================================================== */
.subpage-main {
  padding: 4rem 1.5rem;

  .content-container {
    max-width: var(--wp--style--global--content-size, 860px);
    margin: 0 auto;
  }

  .featured-image-wrapper {
    margin-bottom: 2.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);

    img {
      width: 100%;
      height: auto;
      display: block;
    }
  }

  /* 本文記事内の要素に対する洗練されたスタイル定義 */
  .entry-content {
    line-height: 1.85;
    font-size: 1.05rem;
    color: #334155;

    &>*+* {
      margin-top: 1.5rem;
    }

    /* 見出しスタイル (H2〜H4) */
    h2 {
      font-size: 1.75rem;
      font-weight: 700;
      color: var(--wp--preset--color--primary, #1e293b);
      margin-top: 3.5rem;
      margin-bottom: 1.25rem;
      padding-bottom: 0.5rem;
      border-bottom: 2px solid var(--wp--preset--color--accent, #2563eb);
      position: relative;
    }

    h3 {
      font-size: 1.4rem;
      font-weight: 700;
      color: var(--wp--preset--color--primary, #1e293b);
      margin-top: 2.75rem;
      margin-bottom: 1rem;
      padding-left: 0.85rem;
      border-left: 4px solid var(--wp--preset--color--accent, #2563eb);
    }

    h4 {
      font-size: 1.15rem;
      font-weight: 600;
      margin-top: 2rem;
      margin-bottom: 0.75rem;
    }

    /* 引用ブロック (Blockquote) */
    blockquote {
      margin: 2rem 0;
      padding: 1.25rem 1.75rem;
      background-color: var(--wp--preset--color--surface, #f8fafc);
      border-left: 4px solid var(--wp--preset--color--accent, #2563eb);
      border-radius: 0 12px 12px 0;
      font-style: italic;
      color: var(--wp--preset--color--secondary, #475569);

      p {
        margin: 0;
      }
    }

    /* リスト */
    ul,
    ol {
      padding-left: 1.5rem;
      margin: 1.25rem 0;

      li {
        margin-bottom: 0.5rem;

        &::marker {
          color: var(--wp--preset--color--accent, #2563eb);
        }
      }
    }

    /* コードブロック & インラインコード */
    pre.wp-block-code {
      background-color: #0f172a;
      color: #e2e8f0;
      padding: 1.25rem 1.5rem;
      border-radius: 12px;
      overflow-x: auto;
      font-size: 0.9rem;
      line-height: 1.6;

      code {
        background: transparent;
        color: inherit;
        padding: 0;
      }
    }

    code {
      background-color: var(--wp--preset--color--surface, #f8fafc);
      color: #e11d48;
      border: 1px solid var(--wp--preset--color--border, #e2e8f0);
      padding: 0.15rem 0.4rem;
      border-radius: 4px;
      font-size: 0.9em;
    }

    /* テーブル */
    table {
      width: 100%;
      border-collapse: collapse;
      margin: 2rem 0;

      th,
      td {
        padding: 0.85rem 1rem;
        border: 1px solid var(--wp--preset--color--border, #e2e8f0);
        text-align: left;
      }

      th {
        background-color: var(--wp--preset--color--surface, #f8fafc);
        font-weight: 600;
        color: var(--wp--preset--color--primary, #1e293b);
      }
    }
  }
}

/* ==========================================================================
   6. 【投稿用】自動生成目次 (Table of Contents)
   ========================================================================== */
.toc-container {
  background-color: var(--wp--preset--color--surface, #f8fafc);
  border: 1px solid var(--wp--preset--color--border, #e2e8f0);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 3rem;

  .toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;

    &::after {
      content: '▲';
      font-size: 0.75rem;
      transition: transform 0.25s ease;
    }
  }

  &.is-collapsed {
    .toc-title::after {
      transform: rotate(180deg);
    }

    .toc-list {
      display: none;
    }
  }

  .toc-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: decimal;

    li {
      margin-bottom: 0.5rem;

      a {
        color: var(--wp--preset--color--secondary, #475569);
        text-decoration: none;
        transition: color 0.2s ease;

        &:hover {
          color: var(--wp--preset--color--accent, #2563eb);
          text-decoration: underline;
        }
      }

      /* H3のサブインデント */
      &.toc-h3 {
        margin-left: 1rem;
        list-style-type: circle;
        font-size: 0.95rem;
      }
    }
  }
}

/* ==========================================================================
   7. 404 エラーページ (Error 404)
   ========================================================================== */
.error-404-wrapper {
  text-align: center;
  padding: 6rem 1.5rem;

  .error-code {
    font-size: clamp(5rem, 15vw, 9rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
  }

  .error-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--wp--preset--color--primary, #1e293b);
  }

  .error-desc {
    color: var(--wp--preset--color--secondary, #475569);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
  }
}