/* forest-platform.css — 新卜森平台殼樣式（masthead 平台按鈕、⚙️ 設定面板、減少動態、英文防破版）
 * 🔴 自訂 class 一律 forest- 前綴，避免與 no-web-quirks／平台樣式撞名。
 * 🔴 不改 forest.css 的任何座標、尺寸、動畫時長（原作 V5～V15 數值）。 */

/* ── masthead：safe-area + 平台按鈕 ── */
.masthead{height:calc(68px + env(safe-area-inset-top,0px));padding-top:env(safe-area-inset-top,0px);padding-left:calc(14px + env(safe-area-inset-left,0px));padding-right:calc(14px + env(safe-area-inset-right,0px));gap:8px}
.masthead .brand{min-width:0;flex:0 1 auto;overflow:hidden}
.masthead .brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.forest-exit{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;min-width:40px;min-height:40px;padding:0 12px;border:1px solid rgba(255,255,255,.18);border-radius:999px;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;font-size:13px;font-weight:800;line-height:1;text-decoration:none;white-space:nowrap}
.forest-exit-icon{font-size:17px;line-height:1}
.forest-exit:focus-visible,#forest-settings-btn:focus-visible{outline:3px solid #ffe070;outline-offset:3px}
.masthead #forest-settings-btn{flex:0 0 auto;width:40px;height:40px;margin-left:auto;padding:0;border:1px solid rgba(255,255,255,.18);border-radius:50%;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;font-size:19px;line-height:1;transition:transform .15s}
.masthead #forest-settings-btn[aria-expanded="true"]{transform:rotate(25deg)}
@media (max-width:389px){
  .forest-exit{padding:0;justify-content:center;width:40px}
  .forest-exit-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}

/* ── ⚙️ 設定面板（比照 astro-play #settings-panel：深色霧面、圓角 14px）── */
.forest-settings{position:absolute;z-index:80;top:calc(62px + env(safe-area-inset-top,0px));right:calc(12px + env(safe-area-inset-right,0px));width:min(250px,calc(100% - 24px));padding:10px;border:1px solid rgba(255,255,255,.14);border-radius:14px;background:rgba(18,18,18,.92);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 10px 28px rgba(0,0,0,.45);color:#fff;max-height:calc(100dvh - 74px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain}
.forest-set-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 4px 8px 8px}
.forest-set-title{font-size:14px;font-weight:900;letter-spacing:1px;color:#ffe27b}
.forest-set-x{width:40px;height:40px;border:0;border-radius:10px;background:rgba(255,255,255,.06);color:#fff;font-size:16px;line-height:1}
.forest-set-row{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:9px 8px;border:0;border-radius:10px;background:none;color:#fff;font:inherit;text-align:left;transition:background .15s}
.forest-set-row:hover,.forest-set-x:hover{background:rgba(255,255,255,.1)}
.forest-set-row:focus-visible,.forest-set-x:focus-visible,.forest-lang-pill:focus-visible{outline:3px solid #ffe070;outline-offset:1px}
.forest-set-icon{flex:0 0 20px;width:20px;font-size:16px;text-align:center}
.forest-set-label{flex:1;min-width:0;font-size:13px;font-weight:700;overflow-wrap:anywhere}
.forest-set-state{flex:0 0 auto;font-size:12px;font-weight:800;color:#ffd166}
.forest-set-row[aria-pressed="false"] .forest-set-state{color:#9fb3b8}
/* 音樂列：全域靜音（音效關）時一定不出聲 → 真正 disabled＋淡化＋aria-disabled，提示先打開音效 */
.forest-set-row--disabled .forest-set-icon,.forest-set-row--disabled .forest-set-label{opacity:.45}
.forest-set-row--disabled .forest-set-state{color:#6f8388}
.forest-set-row:disabled{cursor:not-allowed}
.forest-set-row:disabled:hover{background:none}
.forest-set-divider{height:1px;margin:6px 4px;background:rgba(255,255,255,.12)}
.forest-set-lang-head{display:flex;align-items:center;gap:8px;padding:6px 8px}
.forest-set-langs{display:flex;flex-direction:column;gap:5px;padding:0 8px 4px}
.forest-lang-pill{min-height:40px;padding:7px 10px;border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.06);color:#fff;font:inherit;font-size:12px;font-weight:700;text-align:left;transition:background .15s,border-color .15s,color .15s}
.forest-lang-pill:hover{background:rgba(255,255,255,.14)}
.forest-lang-pill.is-active{border-color:#ffcf54;background:rgba(255,207,84,.2);color:#ffe27b}

/* ── 結尾卡分享鈕（位於「再次走進森林」上方）── */
.fortune-card .forest-share-result{margin-bottom:14px;background:linear-gradient(#e8f7e4,#bfe6b3)}

/* ── 減少動態效果（設定可切換；計時器不縮短）── */
html.forest-rm *,html.forest-rm *:before,html.forest-rm *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}

/* ── 英文／長字串防破版（驗收寬度 360px）── */
.scene h1,.scene h2,.scene p,.prop-cue,.lever-hint,.roulette-touch-hint,.sicbo-touch-hint,.sicbo-result,.ritual-touch span,.helper-meta strong,.helper-meta em,.offer-bubble p,.offer-note,.offer-accept,.offer-change,.card-helper-row p,.helper-cameo p,.hero-label strong,.hero-label span,.hero-label small,.choice-caption strong,.choice-caption em,.eyebrow,.gold-button,.form-error,.book-draw-hint,.scene-footnote,.report-coming,.card-omen{overflow-wrap:anywhere}
html:lang(en) .scene .omen-title{font-size:clamp(46px,12.5vw,72px)!important;letter-spacing:1px!important;line-height:1.02!important}
html:lang(en) .scene .eyebrow{letter-spacing:1.2px}
html:lang(en) .hero-label strong{font-size:clamp(26px,8vw,40px)}
html:lang(en) .summons-copy h1{font-size:clamp(24px,6.6vw,32px)}
html:lang(en) .summons-copy p{font-size:13px}
html:lang(en) .omen-kicker{letter-spacing:1.5px}
.story-game .game-prelude h1 em{white-space:nowrap}
/* ── 資料頁：記住的生日＋清除連結（forest-profile-memory.js）── */
.forest-remembered,.forest-forget-status{font-size:11px;line-height:1.45;font-weight:700;margin-top:4px}
.forest-remembered{color:#577b79}
.forest-forget-link{display:inline-flex;align-items:center;min-height:32px;padding:0 2px;border:0;background:none;color:#2f6b4f;font:inherit;font-weight:900;text-decoration:underline;text-underline-offset:2px;cursor:pointer;touch-action:manipulation}
.forest-forget-link:focus-visible{outline:3px solid #2f6b4f;outline-offset:2px;border-radius:4px}
.forest-forget-status{color:#2f6b4f}
/* ── ⚙️ 字體大小：中／大（forest-font.js；大字規則全在 forest-font-lg.css）── */
.forest-set-font-head{display:flex;align-items:center;gap:8px;padding:6px 8px}
.forest-set-icon-aa{font-size:13px;font-weight:900;letter-spacing:-.5px;color:#ffe27b}
.forest-set-fonts{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 8px 8px}
.forest-font-pill{min-height:40px;padding:6px 10px;border:1px solid rgba(255,255,255,.14);border-radius:9px;background:rgba(255,255,255,.06);color:#fff;font:inherit;font-size:12px;font-weight:800;line-height:1.2;text-align:center;transition:background .15s,border-color .15s,color .15s}
.forest-font-pill--lg{font-size:15px}
.forest-font-pill:hover{background:rgba(255,255,255,.14)}
.forest-font-pill:focus-visible{outline:3px solid #ffe070;outline-offset:1px}
.forest-font-pill.is-active{border-color:#ffcf54;background:rgba(255,207,84,.2);color:#ffe27b}

/* 西元生日：年／月／日下拉選單（forest-date-select.js；PM 2026-10-01）。字級沿用 input（繼承 body），大字模式自動跟著放大。 */
.forest-date-select{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:6px}
.forest-time-select{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.forest-date-select select,.forest-time-select select{width:100%;min-height:48px;padding:9px 8px;border:2px solid #649293;border-radius:10px;background:#fffdf5;color:#173e4b;font:inherit;font-weight:800}
