/* ===== Study Partner 新設計層（draft 2026-08-10）=====
   建議書 ui-ux-proposal-20260810 的 1–5 落地。文案零變動，只動樣式。
   token 來源＝主站 :root（--navy #0B1E8A / --accent-blue #3B82F6 / Noto Sans JP / lh 1.8） */

/* ── 1. 文字永不壓照片：hero 白字進 navy 實色帶（對比 白/#0B1E8A = 12.6:1）── */
.hero__label{
  background:var(--navy,#0B1E8A) !important;
  color:#fff !important;
  display:inline-block;
  padding:.55rem 1.1rem;
  border-radius:8px;
  font-size:1rem !important;
  line-height:1.7;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}

/* ── 2. 字級地板：內文 16px、註記 14px（分級提升，保留層級）── */
body{font-size:16px;line-height:1.8}
.hero__s{font-size:1rem !important}
/* 極小字（9.6–10.9px）→ 14px */
[style*="font-size:.6rem"],[style*="font-size:.62rem"],[style*="font-size:.65rem"],
[style*="font-size:.68rem"],[style*="font-size:.7rem"],[style*="font-size:.72rem"],
[style*="font-size:.74rem"],[style*="font-size:.75rem"],[style*="font-size:.76rem"],
[style*="font-size:.78rem"]{font-size:.875rem !important}
/* 次小字（12.8–15.7px）→ 16px */
[style*="font-size:.8rem"],[style*="font-size:.82rem"],[style*="font-size:.84rem"],
[style*="font-size:.85rem"],[style*="font-size:.88rem"],[style*="font-size:.9rem"],
[style*="font-size:.92rem"],[style*="font-size:.93rem"],[style*="font-size:.95rem"],
[style*="font-size:.98rem"]{font-size:1rem !important}

/* 內部 CSS 類別的小字（12–13px）→ 14px 地板（:not(#_) 為特異度加壓）*/
.sec-title__en,.stat-callout__label,.tbl-hint,.lm-num,.gal__tag,.ft__s,.ft__c{font-size:.875rem !important}
/* 通用文字地板：任何文字元素 ≥14px（1em=繼承值，正常字不受影響）*/
:where(p,li,dd,dt,td,th,span,a,b,i,em,strong,label,figcaption,div.label):not(#_):not(#__){
  font-size:max(.875rem,1em) !important
}
/* small 單獨處理：1em 會繼承大字父層（如 .amount 2rem）而爆大，改用固定地板 */
small:not(#_):not(#__){font-size:.875rem !important}
/* header 商標區豁免地板（品牌字非內文；地板會把 320px 版面擠破）*/
header strong:not(#_):not(#__),.hd strong:not(#_):not(#__){font-size:.78rem !important}
header small:not(#_):not(#__),.hd small:not(#_):not(#__){font-size:.75rem !important}

/* ── 3. type scale：h2 斷崖修復（不動 .sec-title__jp 的 40px 級）── */
h2{font-size:clamp(1.5rem,2.2vw,1.75rem)}
h2[style*="font-size:1.2rem"]{font-size:clamp(1.5rem,2.2vw,1.75rem) !important}
h3{font-size:clamp(1.15rem,1.6vw,1.3rem)}

/* ── 4. 行寬收斂：長文 40 字上下（表格/卡片/網格不受限）── */
.wrap p{max-width:46em}
.wrap [style*="text-align:center"] p{margin-inline:auto}

/* ── 5. ハオ式收口：手機固定底欄 CTA ── */
.sp-cta-dock{display:none}
@media(max-width:768px){
  /* 底欄啟用時隱藏既有浮動 CTA（.line-fab z9990 會蓋住底欄；.fab 被蓋但仍在焦點順序＝隱形重複 CTA） */
  .line-fab,.fab{display:none !important}
  .sp-cta-dock{
    display:flex;gap:.6rem;position:fixed;left:0;right:0;bottom:0;z-index:1200;
    padding:.6rem .9rem calc(.6rem + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.96);border-top:1px solid #E2E8F0;
    box-shadow:0 -4px 16px rgba(11,30,138,.10);
  }
  .sp-cta-dock a{
    flex:1;display:flex;align-items:center;justify-content:center;
    min-height:46px;border-radius:50px;font-size:.95rem;font-weight:800;
    text-decoration:none;letter-spacing:.02em;
  }
  .sp-cta-dock a:first-child{background:var(--grad-navy-btn,#0B1E8A);color:#fff}
  .sp-cta-dock a:last-child{background:#06C755;color:#fff}
  body{padding-bottom:76px}
}
@media(prefers-reduced-motion:reduce){
  .sp-cta-dock a{transition:none}
}

/* ── 6. 課程介紹編號區塊：置中・閱讀行寬・節奏（書籍版面原則：先易用）── */
/* :where()=零特異度：首頁自帶的 .lm-* 規則優先，課程頁（無自帶規則）吃這套 */
:where(.lm-timeline){max-width:720px;margin-left:auto;margin-right:auto}
:where(.lm-step){margin-bottom:2.4rem}
:where(.lm-step) :where(.lm-num){display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;border-radius:50%;background:var(--navy,#0B1E8A);color:#fff;margin-bottom:.6rem}
/* 藍色強調句 → 抽言式視覺喘息點（完形：與上文接近、以左框線分層） */
:where(.lm-card) p[style*="color:#0B1E8A"]{border-left:3px solid var(--accent-blue,#3B82F6);padding-left:.9em}

/* ── 7. FAQ 統一元件：截圖視覺＋原生摺疊（copy 零變動，Q./A. 由偽元素標示）── */
details.faq-acc{border-bottom:1px solid var(--border-soft,#E2E8F0);padding:0}
details.faq-acc:last-of-type{border-bottom:none}
details.faq-acc>summary{list-style:none;cursor:pointer;display:flex;align-items:baseline;gap:.4em;
  font-weight:700;color:var(--navy,#0B1E8A);font-size:1rem;line-height:1.7;padding:1.05rem .2rem;position:relative}
details.faq-acc>summary::-webkit-details-marker{display:none}
details.faq-acc>summary::before{content:"Q. ";flex-shrink:0}
details.faq-acc>summary::after{content:"＋";position:absolute;right:.3rem;top:50%;transform:translateY(-50%);
  color:var(--accent-blue,#3B82F6);font-weight:700;font-size:1.05rem;transition:transform .2s}
details.faq-acc[open]>summary::after{content:"−"}
details.faq-acc>summary:hover{color:var(--accent-blue,#3B82F6)}
details.faq-acc>.faq-body{padding:0 .2rem 1.15rem;color:var(--text-body,#334155);font-size:1rem;line-height:1.9}
details.faq-acc>.faq-body::before{content:"A. ";font-weight:700;color:var(--text-body,#334155)}

/* ===== §8 言語切替（EN / 日本語）2026-08-12 ===== */
/* 全24頁のヘッダーから英語ページへ到達できるようにする。
   hreflang は「同一内容の別言語版」を示すタグなので、ページ対ページで対応が取れている
   トップ ↔ /en/ にのみ設置し、ここは純粋な導線として扱う。 */
.hd__nav a.hd__lang{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:2.6em;padding:.18em .6em;margin-left:.2em;
  border:1.5px solid var(--navy,#0B1E8A);border-radius:999px;
  color:var(--navy,#0B1E8A)!important;font-weight:800;font-size:.78rem;
  letter-spacing:.04em;line-height:1.6;text-decoration:none;white-space:nowrap
}
.hd__nav a.hd__lang:hover{background:var(--navy,#0B1E8A);color:#fff!important}
@media(max-width:900px){.hd__nav a.hd__lang{display:none}}
