/*
 * K2R site.css — 独立テーマの全ページ共通スタイル
 *
 * 適用範囲: トップと下層ページの両方（body.k2r-site-shell）。
 * 設計方針:
 *  - ヘッダー／フッターの外観はこのファイルを唯一の正とする。
 *  - DigiPress固有セレクタや非表示上書きを持たない。
 *  - WordPressが出力する固定ページ本文を安全に表示する。
 *  - 予約iframe、Contact Form 7、画像、表のレスポンシブ表示を保護する。
 */

/* ============ 1. body の土台（トークンは tokens.css が唯一の正） ============ */
body.k2r-site-shell {
    margin: 0;
    background: var(--bg-white);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-body);
    line-height: 1.7;
}

/* メニュー開閉時のガタつき防止：スクロールバー分の幅を常に確保しておく */
html { scrollbar-gutter: stable; }

body.k2r-site-shell *,
body.k2r-site-shell *::before,
body.k2r-site-shell *::after {
    box-sizing: border-box;
}

body.k2r-site-shell img {
    max-width: 100%;
    height: auto;
}

/* ベースのリンク色は低特異性(:where)にして、ボタン等のクラス側が必ず勝てるようにする
   （そうしないと「全リンク=紺」がボタン文字の白を打ち消し、紺ボタンで文字が同化する） */
:where(body.k2r-site-shell) a {
    color: var(--accent-primary);
}

/* ============ 2. chrome限定リセット ============ */
body.k2r-site-shell :where(header, .mobile-menu, .menu-backdrop, footer.k2r-footer, .mobile-trial-cta),
body.k2r-site-shell :where(header, .mobile-menu, footer.k2r-footer) * {
    box-sizing: border-box;
}
body.k2r-site-shell :where(header, .mobile-menu, footer.k2r-footer) * {
    margin: 0;
    padding: 0;
}

/* ============ 3. ヘッダー（画面上部固定・高さ56px） ============ */
body.k2r-site-shell > header {
    background-color: var(--bg-white);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    padding: 6px 0;
    z-index: 1200;
}
body.k2r-site-shell.admin-bar > header { top: 32px; }
body.k2r-site-shell { padding-top: 56px; }

body.k2r-site-shell > header .k2r-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-3);
}
body.k2r-site-shell .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
}
body.k2r-site-shell .logo a { display: inline-flex; align-items: center; }
body.k2r-site-shell .logo img { height: 40px; }

/* ヘッダー内 電話・LINE（モバイルは非表示・PCで表示） */
body.k2r-site-shell .header-contact {
    display: none;
    align-items: center;
    gap: var(--spacing-1);
    margin-left: auto;
    margin-right: var(--spacing-3);
}
body.k2r-site-shell .header-contact a {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    min-height: 44px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-base);
    font-weight: var(--weight-medium);
    padding: 0 15px;
    white-space: nowrap;
    transition: color 0.3s ease;
}
body.k2r-site-shell .header-contact a:hover { color: var(--accent-primary); }
body.k2r-site-shell .header-contact i { font-size: 20px; }
body.k2r-site-shell .header-contact .fa-line { color: #06C755; }

/* ============ 5. ハンバーガー ============ */
body.k2r-site-shell .hamburger {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 11px;
    background: none;
    border: none;
    cursor: pointer;
}
body.k2r-site-shell .hamburger span {
    position: absolute;
    top: 21px;
    left: 11px;
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.15s ease;
}
body.k2r-site-shell .hamburger span:nth-child(1) { transform: translateY(-7px); }
body.k2r-site-shell .hamburger span:nth-child(3) { transform: translateY(7px); }
body.k2r-site-shell .hamburger.active span:nth-child(1) { transform: rotate(45deg); }
body.k2r-site-shell .hamburger.active span:nth-child(2) { opacity: 0; visibility: hidden; }
body.k2r-site-shell .hamburger.active span:nth-child(3) { transform: rotate(-45deg); }

/* ============ 6. モバイルメニュー（右からスライドイン） ============ */
body.k2r-site-shell .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    right: 0;
    width: min(45vw, 480px);
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    background-color: var(--bg-white);
    z-index: 999;
    padding: var(--spacing-3) var(--spacing-3) var(--spacing-4);
    overflow-y: auto;
    box-shadow: -18px 24px 40px rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.32s ease, opacity 0.24s ease, visibility 0s linear 0.32s;
}
body.k2r-site-shell.admin-bar .mobile-menu {
    top: 88px;
    height: calc(100vh - 88px);
    height: calc(100dvh - 88px);
}
body.k2r-site-shell .mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
}
body.k2r-site-shell .mobile-menu nav {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}
body.k2r-site-shell .mobile-menu .nav-link {
    color: var(--text-primary);
    font-size: var(--font-h4);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    transition: color 0.3s ease;
}
body.k2r-site-shell .mobile-menu .nav-link:hover { color: var(--accent-primary); }
body.k2r-site-shell .mobile-menu .nav-link:last-child { border-bottom: 1px solid var(--border-light); }

/* モバイルメニュー最下部の連絡ブロック */
body.k2r-site-shell .mobile-contact {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: var(--spacing-1);
    margin-top: var(--spacing-3);
    padding-top: var(--spacing-3);
    border-top: 0;
    background: var(--bg-white);
}
body.k2r-site-shell .mobile-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: var(--weight-semibold);
    font-size: var(--font-base);
    text-align: center;
}
body.k2r-site-shell .mobile-contact-btn i { width: 20px; font-size: 18px; text-align: center; }
body.k2r-site-shell .mobile-contact-btn.tel { color: var(--text-primary); border: 1px solid var(--border-medium); background: #ffffff; }
body.k2r-site-shell .mobile-contact-btn.line { color: #ffffff; background: #06C755; }
body.k2r-site-shell .mobile-contact-btn.line i { color: #ffffff; }

/* ============ 7. backdrop（メニュー背後の暗幕） ============ */
body.k2r-site-shell .menu-backdrop {
    display: block;
    position: fixed;
    inset: 56px 0 0;
    z-index: 998;
    padding: 0;
    border: 0;
    background: rgba(14, 24, 18, 0.46);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0s linear 0.32s;
}
body.k2r-site-shell.admin-bar .menu-backdrop { inset: 88px 0 0; }
body.k2r-site-shell.k2r-menu-open .menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}
body.k2r-site-shell.k2r-menu-open { overflow: hidden; }

/* ============ 8. フッター（アクセント青・トップと同一） ============ */
body.k2r-site-shell > footer.k2r-footer {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: var(--spacing-6) 0;
    text-align: center;
}
body.k2r-site-shell > footer.k2r-footer .k2r-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-3);
}

/* 住所はタップでアクセスページへ（文字色は継承・下線なし） */
body.k2r-site-shell .footer-address a { color: inherit; text-decoration: none; }
body.k2r-site-shell .footer-address a:hover { text-decoration: underline; }

body.k2r-site-shell .footer-logo { margin-bottom: var(--spacing-3); }
body.k2r-site-shell .footer-logo img { height: 40px; filter: brightness(0) invert(1); }
body.k2r-site-shell .footer-info p { margin: var(--spacing-1) 0; font-size: var(--font-base); }
body.k2r-site-shell .footer-gym-name { font-size: 24px; font-weight: var(--weight-bold); line-height: 1.35; }
body.k2r-site-shell .footer-gym-name a { color: inherit; text-decoration: none; }
body.k2r-site-shell .footer-gym-name a:hover { text-decoration: underline; }
body.k2r-site-shell .footer-address { font-size: 16px; font-weight: var(--weight-normal); line-height: 1.65; }
body.k2r-site-shell .footer-address-main { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 0.4em; }
body.k2r-site-shell .footer-address-main > span,
body.k2r-site-shell .footer-address-building { white-space: nowrap; }
body.k2r-site-shell .footer-address-building { display: block; }
body.k2r-site-shell .footer-phone { font-size: 20px; font-weight: var(--weight-semibold); line-height: 1.5; }
body.k2r-site-shell .footer-phone a,
body.k2r-site-shell .footer-phone a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; }
body.k2r-site-shell .footer-sns { display: flex; justify-content: center; gap: var(--spacing-2); margin: var(--spacing-4) 0; }
body.k2r-site-shell .footer-sns-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    color: var(--accent-primary);
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease;
}
body.k2r-site-shell .footer-sns-icon:hover { transform: scale(1.1); }
body.k2r-site-shell .footer-copyright { margin-top: var(--spacing-3); font-size: 12px; opacity: 0.8; }

/* ============ 8.5 固定ページ ============ */
body.k2r-page .k2r-page-main {
    min-height: 60vh;
}

body.k2r-page .k2r-page-container {
    width: min(100% - 48px, 1100px);
    margin-inline: auto;
}

body.k2r-page .k2r-page-hero {
    display: grid;
    min-height: 220px;
    margin: 0;
    padding: 48px 0;
    place-items: center;
    background: var(--button-bg);
    color: var(--button-text);
    text-align: center;
}

body.k2r-page .k2r-page-hero h1 {
    margin: 0;
    color: inherit;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: var(--weight-bold);
    line-height: 1.3;
}

body.k2r-page .k2r-page-eyebrow {
    margin: 0 0 8px;
    font-weight: var(--weight-semibold);
    letter-spacing: 0.12em;
}

body.k2r-page .k2r-page-article {
    padding: 56px 0 72px;
    background: var(--bg-white);
}

body.k2r-page .k2r-entry-content {
    overflow-wrap: anywhere;
}

body.k2r-page .k2r-entry-content > :first-child {
    margin-top: 0;
}

body.k2r-page .k2r-entry-content > :last-child {
    margin-bottom: 0;
}

body.k2r-page .k2r-entry-content h2,
body.k2r-page .k2r-entry-content h3,
body.k2r-page .k2r-entry-content h4 {
    color: var(--text-primary);
    line-height: 1.4;
}
/* design.md §10の余白基準（セクション間72px/48px/32pxモバイルは60%程度）に合わせる。
   旧ルールは全見出し一律2em(約34px)で、セクションの区切りが弱く見えていた */
body.k2r-page .k2r-entry-content h2 { margin-top: 72px; }
body.k2r-page .k2r-entry-content h3 { margin-top: 56px; }
body.k2r-page .k2r-entry-content h4 { margin-top: 40px; }
@media (max-width: 768px) {
    body.k2r-page .k2r-entry-content h2 { margin-top: 52px; }
    body.k2r-page .k2r-entry-content h3 { margin-top: 40px; }
    body.k2r-page .k2r-entry-content h4 { margin-top: 32px; }
}

/* 見出しのサイズ階層＋下余白（上余白は上のルールで設定済み）。design.mdトークン */
body.k2r-page .k2r-entry-content h2 { font-size: var(--font-h2); font-weight: var(--weight-bold); margin-bottom: 0.6em; }
body.k2r-page .k2r-entry-content h3 { font-size: var(--font-h3); font-weight: var(--weight-bold); margin-bottom: 0.5em; }
body.k2r-page .k2r-entry-content h4 { font-size: var(--font-h4); font-weight: var(--weight-semibold); margin-bottom: 0.4em; }

body.k2r-page .k2r-entry-content p,
body.k2r-page .k2r-entry-content li {
    line-height: 1.8;
    /* 日本語は空白が無いため任意の文字位置で折り返す。対応ブラウザでは文節単位で折る */
    word-break: auto-phrase;
}
body.k2r-page .k2r-entry-content p { margin-bottom: 1.2em; }
body.k2r-page .k2r-entry-content .k2r-recaptcha-notice {
    margin-top: 24px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}
/* 問い合わせページにGoogle指定の説明文を表示するため、固定バッジは全画面で隠す。 */
body.k2r-site-shell .grecaptcha-badge { visibility: hidden; }
body.k2r-page .k2r-entry-content li { margin-bottom: 0.4em; }

/* 本文テキストは読み幅を絞る（表・iframe・特典ブロックは対象外＝広いまま）。根拠: Baymard 行長 */
body.k2r-page .k2r-entry-content > :where(p, ul, ol, h2, h3, h4, blockquote) { max-width: 42em; }

/* 体験ページの導入文は短い訴求文のため、長文用の42em制限を適用しない。 */
body.page-id-1143 .k2r-entry-content > p:first-child {
    width: 100%;
    max-width: none;
    overflow-wrap: normal;
    word-break: auto-phrase;
}

/* Gutenbergの中央揃え段落は本文の読み幅制限を外し、ページ本文幅の中央に置く。 */
body.k2r-page .k2r-entry-content > p.has-text-align-center {
    width: 100%;
    max-width: none;
    text-align: center;
}

body.k2r-page .k2r-entry-content figure {
    max-width: 100%;
    margin: 1.5em auto;
}

body.k2r-page .k2r-entry-content .wp-block-table {
    overflow-x: auto;
}

body.k2r-page .k2r-entry-content :where(video, object, embed) {
    max-width: 100%;
}

body.k2r-page .k2r-entry-content iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
}

/* SELECTTYPEの予約画面は外部サービス側の縦長UIを切らない */
body.k2r-page .k2r-entry-content iframe[src*="select-type.com"] {
    min-height: 1000px;
}

body.k2r-page .k2r-entry-content table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

body.k2r-page .k2r-entry-content th,
body.k2r-page .k2r-entry-content td {
    padding: 10px 12px;
    border: 1px solid var(--border-medium);
    vertical-align: top;
}

body.k2r-page .k2r-entry-content input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.k2r-page .k2r-entry-content select,
body.k2r-page .k2r-entry-content textarea {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text-primary);
    font: inherit;
}

body.k2r-page .k2r-entry-content textarea {
    min-height: 180px;
    resize: vertical;
}

body.k2r-page .k2r-entry-content label {
    display: block;
    margin-bottom: 1.2em;
    font-weight: var(--weight-semibold);
}

body.k2r-page .k2r-entry-content .wpcf7-form-control-wrap {
    display: block;
    margin-top: 6px;
}

body.k2r-page .k2r-entry-content .wpcf7-not-valid-tip {
    color: #b42318;
    font-size: 0.9em;
}

body.k2r-page .k2r-entry-content .wpcf7-response-output {
    margin: 1.5em 0 0;
    padding: 12px 16px;
}

body.k2r-page .k2r-entry-content input[type="submit"],
body.k2r-page .k2r-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border: 0;
    border-radius: 999px;
    background: var(--button-bg);
    color: var(--button-text);
    font: inherit;
    font-weight: var(--weight-semibold);
    text-decoration: none;
    cursor: pointer;
}

/* Contact Form 7 の送信ボタンをPC・モバイルとも中央配置する。 */
body.k2r-page .k2r-entry-content .wpcf7 input[type="submit"] {
    display: block;
    margin-inline: auto;
}

body.k2r-page .k2r-entry-content .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-block: 1.5em;
}

/*
 * カスタムHTML内のボタンも、通常のGutenbergボタンブロックと同じ配置にする。
 * WordPress標準のブロックCSSが条件付きで未読込でも環境差を出さない。
 */
body.k2r-page .k2r-entry-content .wp-block-buttons.is-content-justification-center {
    justify-content: center;
}

body.k2r-page .k2r-entry-content .wp-block-button {
    margin: 0;
}

body.k2r-page .k2r-entry-content .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 14px 32px;
    border-radius: var(--radius-button, 12px); /* ピル(999px)をやめて角丸長方形に */
    background: var(--button-bg);
    color: var(--button-text);
    font-weight: var(--weight-bold, 700);
    white-space: nowrap;            /* 「体験の予約はこ／ちら」の途中改行を禁止 */
    text-decoration: none;
    transition: filter .2s ease;
}
body.k2r-page .k2r-entry-content .wp-block-button__link:hover { filter: brightness(1.08); }

/* モバイルはボタンを全幅（最大360px）にして中央寄せ。width:50%で狭まって折り返す事故を防ぐ */
@media (max-width: 768px) {
    body.k2r-page .k2r-entry-content .wp-block-button.has-custom-width,
    body.k2r-page .k2r-entry-content .wp-block-button {
        width: 100%;
        max-width: 360px;
    }
    body.k2r-page .k2r-entry-content .wp-block-button .wp-block-button__link { width: 100%; }
}

/* アンカーで飛んだ先が固定ヘッダー(56px)に隠れないように余白を確保 */
body.k2r-page .k2r-entry-content #reserve { scroll-margin-top: 72px; }

/* 補助ボタン（白枠）：主ボタンと横並びにする画面で使用。例：料金ページの「入会のご案内」 */
body.k2r-page .k2r-entry-content .k2r-btn-secondary .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

/* 体験CTA専用の青グラデ（トップの「まずは体験してみる」と同じ配色）。体験ボタンにのみ使用する */
body.k2r-page .k2r-entry-content .k2r-btn-cta .wp-block-button__link {
    background: linear-gradient(135deg, var(--cta-from) 0%, var(--cta-mid) 48%, var(--cta-to) 100%);
    color: #ffffff;
    gap: 8px;
}
body.k2r-page .k2r-entry-content .k2r-btn-cta .wp-block-button__link .fa-person-running {
    font-size: .9em;
}

/* 入会特典：強い色面バナーの代わりに、薄い背景＋左のアクセント線＋大きめアイコンで存在感を出す
   （design.md「強い影・全面色を避ける」方針を守りつつ、視認性を確保。将来的にアイコンはSVGイラストへ差し替え予定） */
body.k2r-page .k2r-entry-content .k2r-benefits {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 16px;
    margin: 0 0 24px;
}
@media (max-width: 768px) {
    body.k2r-page .k2r-entry-content .k2r-benefits { grid-template-columns: 1fr; }
}
body.k2r-page .k2r-entry-content .k2r-benefit {
    background: var(--bg-light);
    border-left: 5px solid var(--accent-primary);
    border-radius: 0 var(--radius-card, 10px) var(--radius-card, 10px) 0;
    padding: 22px 22px 20px;
    margin: 0;
}
body.k2r-page .k2r-entry-content .k2r-benefit > *:last-child { margin-bottom: 0; }
body.k2r-page .k2r-entry-content .k2r-benefit-title {
    font-size: var(--font-h4);
    font-weight: 700;
    margin: 0 0 10px !important;
}
body.k2r-page .k2r-entry-content .k2r-benefit-reward {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-primary);
    font-size: clamp(19px, 2vw, 23px);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: .01em;
    text-wrap: balance;
}
/* 料金・入会ページ：独立した各セクションをH2に揃え、左線で一貫して区切る。 */
body:is(.page-id-1143, .page-id-1145, .page-id-1148) .k2r-entry-content > h2 {
    padding-left: 14px;
    border-left: 4px solid var(--accent-primary);
    margin-top: 88px;
    margin-bottom: 24px;
    font-size: clamp(26px, 2.4vw, 34px);
}

/* 体験ページ：冒頭CTAと注記を一組として配置する。 */
body.page-id-1143 .k2r-entry-content .wp-block-buttons:has(.k2r-btn-jump) {
    margin-bottom: .5em;
}
body.page-id-1143 .k2r-entry-content .wp-block-buttons:has(.k2r-btn-jump) + .k2r-note {
    margin-top: 0;
    margin-inline: auto;
    text-align: center;
}

/* 料金表：ラベル列を広く、金額列は「12,100円」が改行なしで収まる幅を確保 */
body.k2r-page .k2r-entry-content .k2r-price-table td:first-child { width: 58%; }
body.k2r-page .k2r-entry-content .k2r-price-table td:last-child {
    width: 42%; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* 表の直下に密着させる補足（税込み表記・案内文など）。価格列に揃えて右寄せ */
body.k2r-page .k2r-entry-content .k2r-table-footnote {
    width: 100%;
    max-width: none;
    margin-top: -8px;
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
    text-align: right;
}

/* 注意書き（※）：本文より弱く見せて優先度を下げる（design.md「注意は主文より弱く」） */
body.k2r-page .k2r-entry-content .k2r-note {
    max-width: 42em;
    color: var(--text-secondary);
    font-size: var(--font-small);
    line-height: 1.7;
}

/* 体験料金など目立たせたい金額のまとまり（薄背景＋細い線・カードにはしない＝design.md） */
body.k2r-page .k2r-entry-content .k2r-price-callout {
    max-width: 42em;
    margin: 1.5em 0;
    padding: 20px 24px;
    background: var(--bg-light);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: var(--radius-card, 10px);
}
body.k2r-page .k2r-entry-content .k2r-price-callout .k2r-price-amount {
    font-size: var(--font-h3);
    font-weight: var(--weight-bold);
    color: var(--accent-primary);
}

/* 体験の流れ：01〜04 の番号つきステップ（PC 2×2 / モバイル1列。.k2r-benefitと同じ薄背景カード） */
body.k2r-page .k2r-entry-content .k2r-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: none;
    margin: 1.2em 0 1em;
}
@media (max-width: 768px) {
    body.k2r-page .k2r-entry-content .k2r-steps { grid-template-columns: 1fr; gap: 14px; }
}
body.k2r-page .k2r-entry-content .k2r-step {
    background: var(--bg-light);
    border-radius: var(--radius-card, 10px);
    padding: 0;                 /* 写真を上端に密着させるため本文側で余白を持つ */
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
body.k2r-page .k2r-entry-content .k2r-step-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}
body.k2r-page .k2r-entry-content .k2r-step-body {
    padding: 20px 22px 24px;
}
body.k2r-page .k2r-entry-content .k2r-step-num {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .1em;
    color: var(--accent-primary);
    margin: 0 0 8px;
}
body.k2r-page .k2r-entry-content .k2r-step-title {
    font-size: var(--font-h4);
    font-weight: 700;
    margin: 0 0 8px !important;
}
body.k2r-page .k2r-entry-content .k2r-step-text {
    font-size: var(--font-small, 14px);
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* 体験ページ導入文：助詞だけが次行へ残らないよう、短い引用句をひとまとまりにする。 */
body.page-id-1143 .k2r-trial-lead .k2r-keep-together {
    white-space: nowrap;
}

/* 設備・アメニティ：注釈的な控えめブロック（更衣室・シャワーの安心感を軽く添える） */
body.k2r-page .k2r-entry-content .k2r-facility {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: none;
    margin: 0.4em 0 0.4em;
}
@media (max-width: 768px) {
    body.k2r-page .k2r-entry-content .k2r-facility { grid-template-columns: 1fr 1fr; gap: 10px; }
}
body.k2r-page .k2r-entry-content .k2r-facility figure { margin: 0; }
body.k2r-page .k2r-entry-content .k2r-facility img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: var(--radius-card, 10px);
    display: block;
}
/* 設備の見出しは注釈っぽく小さめ（h2の重い見出しにしない） */
body.k2r-page .k2r-entry-content .k2r-facility-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--text-secondary);
    margin: 0 0 8px;
}
body.k2r-page .k2r-entry-content .k2r-facility figcaption {
    font-size: var(--font-small, 13px);
    color: var(--text-secondary);
    text-align: center;
    margin-top: 6px;
}

body.k2r-page .wp-block-gallery,
body.k2r-page .blocks-gallery-grid {
    max-width: 100%;
}

body.k2r-page .k2r-entry-content pre {
    max-width: 100%;
    padding: 16px;
    overflow-x: auto;
}

body.k2r-page .alignwide {
    width: min(1200px, 100%);
    max-width: 1200px;
}

body.k2r-page .alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

body.k2r-page .k2r-not-found {
    text-align: center;
}

body.k2r-page .k2r-booking-fallback {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-light);
    text-align: center;
}

body.k2r-page .k2r-booking-fallback p {
    margin: 0 0 12px;
}

/* ============ 9. モバイル固定CTA（トップだけ表示） ============ */
body.k2r-site-shell .mobile-trial-cta { display: none; }
body.k2r-site-shell .trial-cta-icon {
    flex: none;
    font-size: 18px;
    line-height: 1;
}

/* ============ 10. レスポンシブ ============ */
@media (min-width: 768px) {
    /* PCではヘッダー内の電話・LINEを表示 */
    body.k2r-site-shell .header-contact { display: flex; }
}
@media (min-width: 769px) {
    body.k2r-site-shell > header .k2r-container { width: 100%; max-width: none; }
    body.k2r-site-shell .header-contact .header-line {
        height: 40px;
        min-height: 40px;
        padding: 0 20px;
        border: 1px solid #06c755;
        border-radius: 999px;
        background: #06c755;
        color: #ffffff;
    }
    body.k2r-site-shell .header-contact .header-line .fa-line { color: #ffffff; }
    body.k2r-site-shell .header-contact .header-line:hover { border-color: #05b04c; background: #05b04c; color: #ffffff; }
}

/* WordPress管理バーは782px以下で46pxになるため、共通Chromeだけここで補正する。 */
@media (max-width: 782px) {
    body.k2r-site-shell.admin-bar > header { top: 46px; }
    body.k2r-site-shell.admin-bar .mobile-menu {
        top: 102px;
        height: calc(100vh - 102px);
        height: calc(100dvh - 102px);
    }
    body.k2r-site-shell.admin-bar .menu-backdrop { inset: 102px 0 0; }
}

@media (max-width: 768px) {
    body.k2r-page .k2r-entry-content .k2r-benefit {
        padding: 20px 18px 18px;
    }
    body:is(.page-id-1145, .page-id-1148) .k2r-entry-content > h2 {
        margin-top: 60px;
        font-size: clamp(24px, 6.4vw, 26px);
    }

    /* 料金ページの主・副CTAは操作面積を統一し、色だけで優先順位を示す。 */
    body.k2r-page .k2r-entry-content .wp-block-buttons:has(.k2r-btn-cta):has(.k2r-btn-secondary) {
        flex-direction: column;
        align-items: stretch;
    }
    body.k2r-page .k2r-entry-content .wp-block-buttons:has(.k2r-btn-cta):has(.k2r-btn-secondary) .wp-block-button,
    body.k2r-page .k2r-entry-content .wp-block-buttons:has(.k2r-btn-cta):has(.k2r-btn-secondary) .wp-block-button__link {
        width: 100%;
    }
    body.k2r-page .k2r-entry-content .wp-block-buttons:has(.k2r-btn-cta):has(.k2r-btn-secondary) .wp-block-button__link {
        min-height: 52px;
        box-sizing: border-box;
    }

    body.k2r-site-shell .hamburger { margin-left: auto; }

    body.k2r-site-shell .mobile-menu {
        width: 90vw;
        max-width: 360px;
        padding: 16px 20px 24px;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: -16px 20px 36px rgba(0, 0, 0, 0.2);
        overscroll-behavior: contain;
    }
    body.k2r-site-shell .mobile-menu nav { flex: 0 0 auto; min-height: auto; overflow: visible; }
    body.k2r-site-shell .mobile-menu .nav-link {
        display: flex;
        align-items: center;
        min-height: 60px;
        padding: 12px 0;
        font-size: 19px;
        line-height: 1.35;
    }
    body.k2r-site-shell .mobile-menu .nav-link:last-child { border-bottom: 1px solid var(--border-light); }
    body.k2r-site-shell .menu-backdrop { inset: 56px 0 0; }

    /* モバイル固定CTA（画面下に追従） */
    body.k2r-lp .mobile-trial-cta {
        position: fixed;
        right: 16px;
        bottom: max(12px, env(safe-area-inset-bottom));
        left: 16px;
        z-index: 1100;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        min-height: 58px;
        padding: 14px 20px;
        border-radius: 999px;
        background: linear-gradient(135deg, #003f9e 0%, #0076f5 48%, #58b8ff 100%);
        box-shadow: 0 10px 28px rgba(0, 77, 184, 0.38);
        color: #ffffff;
        font-size: 17px;
        font-weight: var(--weight-bold);
        line-height: 1.4;
        text-decoration: none;
        text-align: center;
    }
    body.k2r-lp.k2r-menu-open .mobile-trial-cta { display: none; }
    /* 固定CTAの下に本文/フッターが隠れないよう余白 */
    body.k2r-lp { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }

    body.k2r-site-shell .footer-gym-name { font-size: 22px; }
    body.k2r-site-shell .footer-address { font-size: 15px; }
}

@media (max-width: 767px) {
    body.k2r-site-shell { --font-base: 17px; }
    body.k2r-page .k2r-page-container { width: min(100% - 32px, 1100px); }
    body.k2r-page .k2r-page-hero { min-height: 150px; padding: 32px 0; }
    body.k2r-page .k2r-page-hero h1 { font-size: clamp(26px, 8vw, 34px); }
    body.k2r-page .k2r-page-article { padding: 36px 0 56px; }
    body.k2r-page .k2r-entry-content iframe[src*="select-type.com"] { min-height: 1100px; }
    body.k2r-site-shell .mobile-contact { margin-top: var(--spacing-1); padding-top: var(--spacing-1); }
    body.k2r-site-shell .mobile-contact-btn { min-height: 40px; padding: 7px 0; }
    body.k2r-site-shell > header .k2r-container,
    body.k2r-site-shell > footer.k2r-footer .k2r-container { padding: 0 var(--spacing-2); }
}
