/*
 * 資產配置儀表板（聰明投 API 3.0・Grace）
 * 型態：全螢幕簡報。紙感亮色、襯線標題，像私人銀行的提案文件。墨色是海軍藍黑，點題用黃銅；紅與綠只留給台股的漲與跌。
 * 三段畫面：會前準備（卷宗）→ 會議簡報（.deck，以 1440×900 為基準等比縮放）→ 會後文件（A4 列印）。
 */
:root {
  --paper: #F5F0E4; --paper-2: #FAF6EC; --sheet: #FFFDF7; --ink: #1B2333; --ink-2: #454E5E; --mute: #737A88; --line: #DBD1BB; --hair: #C7B48A;
  --brass: #8F6F35; --brass-2: #B8975A; --brass-bg: #F1E6CC;
  --navy: #1F2F4A; --steel: #6E8CAB; --steel-bg: #E3EAF1; --stone: #CFC6B2;
  --up: #B8322A; --down: #1E7F4F; --down-bg: #DCEDE2;
  --warn: #855600; --warn-bg: #F7ECD0; --warn-line: #E3CF9E;
  --serif: "Noto Serif TC", "PMingLiU", "Songti TC", serif;
  --sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
  --shadow: 0 1px 2px rgba(27, 35, 51, .05), 0 8px 28px rgba(27, 35, 51, .07);
  --si-cta-bg: #FFFDF7; --si-cta-fg: #1B2333; --si-cta-accent: #1F2F4A; --si-cta-accent-fg: #FFFFFF; --si-cta-muted: #737A88; --si-cta-line: #DBD1BB; --si-cta-soft: #FAF6EC; --si-cta-radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); background-image: radial-gradient(1100px 520px at 85% -8%, rgba(255, 255, 255, .75), transparent 62%), repeating-linear-gradient(0deg, rgba(120, 100, 60, .022) 0 1px, transparent 1px 3px); font: 15px/1.7 var(--sans); font-variant-numeric: tabular-nums; }
body[data-view="meeting"] { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:where(#app, #deck) :where(h1, h2, h3, p, ol, ul, dl, dd, figure) { margin: 0; }
:where(#app, #deck) :where(ol, ul) { padding: 0; list-style: none; }
kbd { display: inline-block; min-width: 1.6em; padding: 0 .35em; border: 1px solid var(--hair); border-bottom-width: 2px; border-radius: 3px; background: var(--sheet); font: 600 .82em/1.5 var(--mono); text-align: center; color: var(--ink-2); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 6px 12px; z-index: 99; }
.skip:focus { left: 8px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.dia { display: inline-block; width: .62em; height: .62em; background: var(--brass-2); transform: rotate(45deg); margin-right: .6em; vertical-align: .08em; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--ink-2); }
.trace { font-family: var(--mono); font-size: .92em; word-break: break-all; }
.n { white-space: nowrap; }
.fn { font: 600 .56em/1 var(--sans); color: var(--brass); margin-left: .12em; vertical-align: super; letter-spacing: 0; }
.fn-calc { color: var(--mute); }
.demo-chip { display: inline-block; font: 700 11.5px/1.7 var(--sans); letter-spacing: .08em; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 0 8px; border-radius: 2px; white-space: nowrap; }
.c-tw { background: var(--navy); } .c-gl { background: var(--steel); } .c-bd { background: var(--brass-2); }
.c-tw.v2 { background: #3D5275; } .c-tw.v3 { background: #5F7396; } .c-tw.v4 { background: #8493AE; }
.c-gl.v2 { background: #93ABC3; } .c-gl.v3 { background: #B4C5D6; } .c-bd.v2 { background: #D0B785; } .c-bd.v3 { background: #E0CFA9; }
.lg { display: inline-block; width: .8em; height: .8em; margin: 0 .35em 0 .2em; vertical-align: -.05em; border-radius: 1px; }
.rib { display: flex; height: 10px; overflow: hidden; border-radius: 1px; }
.rib-s { flex: none; min-width: 0; box-shadow: inset -1px 0 0 rgba(255, 255, 255, .55); }
.rib-s:last-child { box-shadow: none; }
.toast { position: fixed; left: 50%; bottom: 76px; transform: translate(-50%, 20px); z-index: 90; max-width: min(520px, calc(100vw - 32px)); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 4px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 24px; }
.boot { min-height: 60vh; display: grid; place-content: center; text-align: center; }
.boot-mark { font: 700 28px/1.4 var(--serif); }
.boot-note { color: var(--mute); }
#app:focus { outline: none; }

/* ───────── 按鈕 ───────── */
.btn-ghost, .btn-mini, .btn-ctl { display: inline-flex; align-items: center; gap: .4em; background: var(--sheet); border: 1px solid var(--hair); border-radius: 3px; padding: .42em .95em; font-weight: 600; color: var(--ink); min-height: 38px; transition: border-color .16s, background .16s; }
.btn-ghost:hover:not(:disabled), .btn-mini:hover:not(:disabled), .btn-ctl:hover:not(:disabled) { border-color: var(--navy); }
.btn-ghost:disabled, .btn-mini:disabled, .btn-ctl:disabled { opacity: .45; }
.btn-ghost.block { display: flex; width: 100%; justify-content: center; margin-top: 8px; }
.btn-mini { min-height: 32px; padding: .2em .7em; font-size: 13px; margin: 0 .5em; vertical-align: middle; font-family: var(--sans); }
.btn-link { background: none; border: 0; padding: 0 .2em; color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 28px; }
.btn-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; background: transparent; border: 1px solid transparent; border-radius: 3px; color: var(--mute); flex: none; }
.btn-icon:hover:not(:disabled) { border-color: var(--hair); color: var(--ink); }
.btn-icon:disabled { opacity: .3; }
.btn-fix { background: var(--sheet); border: 1px solid var(--brass-2); border-radius: 3px; color: var(--brass); font-weight: 700; font-size: 13px; padding: .25em .8em; min-height: 32px; text-align: left; }
.btn-fix:hover { background: var(--brass-bg); }
.btn-go { display: flex; width: 100%; align-items: center; justify-content: center; gap: .5em; min-height: 54px; padding: .6em 1.2em; border: 0; border-radius: 3px; background: var(--navy); color: #fff; font: 700 17px/1.4 var(--sans); letter-spacing: .04em; box-shadow: 0 8px 20px rgba(31, 47, 74, .22); transition: transform .16s var(--ease), background .16s; }
.btn-go:hover:not(:disabled) { transform: translateY(-1px); background: #172338; }
.btn-go:disabled { background: #A9AFB9; box-shadow: none; }
.btn-go.alt { background: var(--sheet); color: var(--navy); border: 1.5px solid var(--navy); box-shadow: none; }

/* ───────── 會前準備 ───────── */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: rgba(250, 246, 236, .86); }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.brand b { font: 700 20px/1.3 var(--serif); letter-spacing: .06em; }
.brand span { color: var(--mute); font-size: 13px; }
.hub-link { font-size: 13px; font-weight: 500; color: var(--mute); min-height: 24px; }
.keybar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.kstate { display: inline-flex; align-items: center; gap: .4em; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 2px; }
.kstate.ok { color: var(--navy); background: var(--steel-bg); }
.kstate.demo { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.kfield input { width: min(300px, 62vw); min-height: 38px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 3px; background: var(--sheet); }
.keymsg { flex: 1 1 100%; color: var(--up); font-size: 13.5px; }
.prep { max-width: 1296px; margin: 0 auto; padding: 0 32px 72px; }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; padding: 20px 0 16px; }
.hero h1 { font-size: 40px; }
.eyebrow { color: var(--brass); font-weight: 700; letter-spacing: .22em; font-size: 13px; }
.hero h1, .after-head h1 { font: 700 44px/1.28 var(--serif); letter-spacing: .02em; margin-top: 8px; }
.lead { color: var(--ink-2); font-size: 16px; margin-top: 12px; max-width: 34em; }
.hero-go { display: none; margin-top: 16px; }
.hero-r { min-width: 0; display: grid; gap: 14px; }
.board { background: var(--sheet); border: 1px solid var(--ink); box-shadow: var(--shadow); padding: 9px 16px 6px; min-width: 0; }
.bd-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding-bottom: 4px; border-bottom: 1.5px solid var(--ink); font-size: 12.5px; color: var(--mute); }
.bd-h b { font: 700 16px/1.4 var(--serif); letter-spacing: .08em; color: var(--ink); }
.bd-lg { margin-left: auto; white-space: nowrap; } .bd-lg .lg { margin-left: .7em; }
.bd-row { display: grid; grid-template-columns: 6.4em minmax(0, 1fr) minmax(0, 15.5em); gap: 0 12px; align-items: center; padding: 4px 0 3px; border-bottom: 1px dotted var(--hair); }
.bd-row:last-child { border-bottom: 0; }
.bd-n { font-size: 12.5px; color: var(--mute); white-space: nowrap; } .bd-n b { font: 700 15px/1.3 var(--serif); color: var(--ink); margin-left: .2em; }
.bd-row.now .bd-n { font: 700 15px/1.3 var(--serif); color: var(--ink); }
.bd-row .rib { height: 14px; border: 1px solid var(--ink); }
.bd-row.now .rib { height: 18px; }
.bd-ph { background: repeating-linear-gradient(45deg, var(--sheet) 0 6px, rgba(27, 35, 51, .14) 6px 7.5px); }
.bd-t { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-x { grid-column: 2 / -1; font-size: 11.5px; line-height: 1.45; color: var(--mute); }
.nb { white-space: nowrap; }
/* 數字本身就能按「驗」 */
button.nv { all: unset; box-sizing: border-box; display: inline; white-space: nowrap; cursor: pointer; border-bottom: 1px dotted rgba(31, 47, 74, .35); }
button.nv:hover { border-bottom: 1.5px solid var(--navy); background: rgba(227, 234, 241, .7); }
button.nv:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.cls-note { font-size: .78em; color: var(--mute); }
.rib-big .rib-s.tiny b, .rib-big .rib-s.tiny i { display: none; }
.rb-bar.now .rib-s.tiny b { display: none; }
.side-warn.late { border-left-color: var(--up); background: #FBEDEA; } .side-warn.late b { color: var(--up); }
.late-acts { display: grid; gap: 6px; justify-items: start; margin-top: 6px; }
.bd-load { display: flex; align-items: center; gap: .5em; color: var(--ink-2); font-weight: 600; white-space: normal; }
.bd-row.now.wait { grid-template-columns: 6.4em minmax(0, 1fr); }
.doc-q { font: 700 15px/1.5 var(--serif); margin: 14px 0 4px; }
.fp-src textarea { width: 100%; min-height: 9em; font: 11px/1.5 var(--mono); border: 1px solid var(--line); background: var(--paper-2); padding: 6px 8px; }
.fp-src summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: 13px; }
.kb-only { display: inline; }
.lev-tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 0 8px; margin-top: 6px; }
.deck .lev-tag { font-size: .82em; margin-top: .35em; align-self: flex-start; }
.pcol-h .lev-tag { margin: 0 0 0 auto; font-style: normal; letter-spacing: 0; align-self: center; white-space: nowrap; }
.lev-in { color: var(--warn); font-weight: 700; }
.doc-lev { font-size: 11.5px; font-weight: 700; color: var(--warn); }
.m-only { display: none; }
.story { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; counter-reset: st; }
.story li { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.th { position: relative; display: block; width: 100%; flex: none; aspect-ratio: 16 / 8.2; background: var(--sheet); border: 1px solid var(--line); box-shadow: var(--shadow); }
.th em { position: absolute; left: 6px; top: 3px; font: 700 12px/1.4 var(--serif); font-style: normal; color: var(--brass); }
.th svg { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.th svg .br { stroke: var(--brass-2); } .th svg .soft { stroke: var(--line); }
.th svg .fill { fill: var(--navy); stroke: none; } .th svg .fill2 { fill: var(--steel); stroke: none; } .th svg .fill3 { fill: var(--brass-2); stroke: none; }
.story b { font: 700 13px/1.4 var(--serif); margin-top: 5px; overflow-wrap: anywhere; }
.story i { font-style: normal; font-size: 12px; color: var(--mute); }
.prep-grid { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 28px; align-items: start; }
.prep-main { min-width: 0; }
.sec { background: var(--sheet); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); padding: 22px 28px 24px; margin-bottom: 18px; }
.sec h2 { display: flex; align-items: center; gap: 12px; font: 700 20px/1.4 var(--serif); letter-spacing: .04em; }
.sec h2 i { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--brass-2); color: var(--brass); font: 700 15px/1 var(--serif); font-style: normal; flex: none; }
.sec-note { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; }
.sec.back { display: none; border-color: var(--hair); background: var(--paper-2); }
.sec.back.has { display: block; padding-top: 14px; padding-bottom: 14px; }
.back-h { all: unset; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; width: 100%; min-height: 36px; cursor: pointer; }
.back-h:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.back-h h2 { font-size: 17px; } .back-h h2 i { width: 26px; height: 26px; font-size: 13px; }
.back-chips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.back-chips span { background: var(--sheet); border: 1px solid var(--line); padding: 0 9px; border-radius: 999px; white-space: nowrap; }
.back-chips span.on { border-color: var(--brass-2); color: var(--brass); font-weight: 700; }
.back-tog { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.back-last { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; overflow-wrap: anywhere; }
.back-body { margin-top: 12px; }
.sec.resume { border: 1.5px solid var(--navy); background: var(--steel-bg); margin: 18px 0 0; padding: 14px 20px; }
.resume-acts { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 10px; } .resume-acts .btn-go { width: auto; min-height: 44px; font-size: 15px; }
.sec-tools { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 4px 14px; font: 500 13px/1.6 var(--sans); letter-spacing: 0; }
.mark-opt { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; } .mark-opt input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--navy); }
.ws-list .ws-id { flex: 1 1 100%; font-size: 12px; }
.hold-u input[aria-invalid="true"], .adv input[aria-invalid="true"] { border-color: var(--up); color: var(--up); }
/* 回訪：一位客戶一張卡 */
.cl-top { font-size: 13.5px; color: var(--ink-2); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.cl-list { display: grid; gap: 8px; }
.cl { border: 1px solid var(--line); background: var(--sheet); min-width: 0; } .cl.open { border-color: var(--hair); }
.cl-h { all: unset; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%; padding: 9px 14px; min-height: 42px; cursor: pointer; }
.cl-h:focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.cl-h > b { font: 700 16px/1.4 var(--serif); }
.cl-h > i { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.cl-chips span { border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; background: var(--paper-2); white-space: nowrap; }
.cl-chips span.on { border-color: var(--brass-2); color: var(--brass); font-weight: 700; }
.cl-b { padding: 2px 14px 12px; border-top: 1px dashed var(--line); }
.cl-sec { margin-top: 10px; min-width: 0; }
.cl-sec h4 { margin: 0 0 4px; font: 700 13px/1.5 var(--sans); letter-spacing: .06em; color: var(--brass); }
.cl-files li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.cl-facts { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.cl-conds { display: grid; gap: 6px; }
.cl-cond { border: 1px solid var(--line); background: var(--paper-2); padding: 8px 12px; min-width: 0; } .cl-cond.off { opacity: .8; }
.cl-cond-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; } .cl-cond-h b { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.cl-pill { font-size: 12px; font-weight: 700; background: var(--steel-bg); color: var(--navy); padding: 0 8px; white-space: nowrap; }
.cl-state { margin-left: auto; font-size: 12px; font-weight: 700; padding: 0 8px; white-space: nowrap; } .cl-state.on { background: var(--brass-bg); color: var(--brass); } .cl-state.off { background: var(--line); color: var(--ink-2); }
.cl-meta { font-size: 12.5px; color: var(--mute); margin-top: 2px; overflow-wrap: anywhere; }
.cl-what { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.cl-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .cl-acts .btn-mini, .cl-ask .btn-mini { margin: 0; }
.btn-mini.danger { border-color: var(--up); color: var(--up); }
.cl-trial { margin-top: 6px; font-size: 13.5px; background: var(--sheet); border-left: 3px solid var(--steel); padding: 6px 10px; }
.cl-ask { margin-top: 8px; background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 8px 12px; font-size: 13.5px; } .cl-ask div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cl-offtog { display: inline-block; margin-top: 6px; font-size: 13px; }
.cl-today li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 14px; } .cl-today li div { min-width: 0; }
.cl-today li b { font-weight: 600; } .cl-today li p { font-size: 13px; color: var(--ink-2); }
.cl-sev { flex: none; font-size: 12px; font-weight: 700; padding: 0 8px; margin-top: 2px; white-space: nowrap; background: var(--line); color: var(--ink-2); } .cl-sev.act { background: var(--warn-bg); color: var(--warn); } .cl-sev.watch { background: var(--steel-bg); color: var(--navy); }
.cl-fine { font-size: 12.5px; color: var(--mute); margin-top: 6px; display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.cl-msg { font-size: 13.5px; font-weight: 600; color: var(--navy); background: var(--steel-bg); padding: 5px 10px; margin-bottom: 8px; }
.cl-more { margin-top: 8px; }
.spin.sm { display: inline-block; flex: none; width: 1em; height: 1em; border-width: 2px; }
.demo-note { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.demo-note.sample { background: var(--steel-bg); padding: 6px 12px; border-radius: 2px; }
.blank { font: 500 19px/2.5 var(--serif); margin-top: 8px; }
.blank.small { font-size: 16px; line-height: 2.2; margin-top: 4px; }
.blank-f { display: inline-block; margin: 0 .25em; vertical-align: baseline; }
.blank-f input, .blank-f select { height: 1.9em; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; background: transparent; font: 700 1em/1.4 var(--sans); text-align: center; padding: 0 .3em; color: var(--navy); max-width: 100%; }
.blank-f select { padding-right: .2em; text-align-last: center; }
.blank-f input:hover, .blank-f select:hover { background: var(--paper-2); }
.blank-f input:disabled, .blank-f select:disabled { color: var(--ink-2); border-bottom-style: dashed; opacity: 1; -webkit-text-fill-color: var(--ink-2); }
.blank-f.wide input { width: 7.4em; } .blank-f.narrow input { width: 2.6em; } .blank-f.money input { width: 7.2em; }
.blank-f input[aria-invalid="true"] { border-bottom-color: var(--up); color: var(--up); }
.help { display: flex; gap: .4em; align-items: flex-start; color: var(--mute); font-size: 13px; margin-top: 6px; }
.help .ico { margin-top: .22em; }
.field-err { color: var(--up); font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.empty { color: var(--ink-2); margin-top: 10px; padding: 10px 14px; background: var(--paper-2); border: 1px dashed var(--line); }
.quiz { margin-top: 10px; }
.quiz-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 9px 0; border-top: 1px dashed var(--line); }
.quiz-t { flex: 1 1 250px; min-width: 0; font-weight: 600; }
.quiz-t b { display: inline-block; width: 1.5em; color: var(--brass); font-family: var(--serif); }
.quiz-a { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.quiz-a label { position: relative; }
.quiz-a input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.quiz-a span { display: block; padding: 4px 13px; border: 1px solid var(--hair); border-radius: 999px; background: var(--sheet); font-size: 14px; min-height: 34px; line-height: 24px; transition: background .15s, color .15s; }
.quiz-a input:hover + span { border-color: var(--navy); }
.quiz-a input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.quiz-a input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.fitline { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-top: 12px; padding: 9px 14px; background: var(--brass-bg); border-left: 3px solid var(--brass-2); }
.fitline b { font-family: var(--serif); font-size: 16px; }
.fitline span, .fitline.wait { color: var(--ink-2); font-size: 13.5px; }
.fitline.wait { background: var(--paper-2); border-left-color: var(--line); }
.plan-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.plan-mini { min-width: 0; border: 1px solid var(--line); padding: 12px 14px; background: var(--paper-2); }
.plan-mini.fit { border: 1.5px solid var(--brass-2); background: var(--sheet); }
.pm-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-bottom: 8px; }
.pm-h span { font-size: 12.5px; color: var(--mute); } .pm-h b { font: 700 19px/1.3 var(--serif); }
.pm-h em { font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: var(--brass); padding: 0 7px; margin-left: auto; white-space: nowrap; }
.plan-mini ul { margin-top: 8px; font-size: 13.5px; }
.plan-mini li { display: flex; justify-content: space-between; gap: 8px; }
.plan-mini li span { min-width: 0; overflow-wrap: anywhere; }
.plan-edit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.pe { min-width: 0; border: 1px solid var(--line); padding: 8px 12px 12px; margin: 0; }
.pe legend { font: 700 15px/1.4 var(--serif); padding: 0 6px; }
.pe-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.pe-row select { flex: 1 1 0; min-width: 0; height: 36px; border: 1px solid var(--hair); border-radius: 3px; background: var(--sheet); padding: 0 4px; }
.pe-w { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.pe-w input { width: 3.2em; height: 36px; border: 1px solid var(--hair); border-radius: 3px; background: var(--sheet); text-align: right; padding: 0 6px; font-weight: 700; }
.pe-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.pe-foot .btn-mini { margin: 0; }
.pe-sum { font-size: 13px; font-weight: 700; } .pe-sum.ok { color: var(--ink-2); } .pe-sum.bad { color: var(--up); }
.adv { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 14px; padding-top: 4px; }
.adv input { width: 3em; height: 32px; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; text-align: center; font-weight: 700; }
.adv-from { background: var(--warn-bg); padding: 2px 10px; }
.hold { margin-top: 10px; }
.hold-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px dashed var(--line); }
.hold-row select { flex: 1 1 220px; min-width: 0; height: 38px; border: 1px solid var(--hair); border-radius: 3px; background: var(--sheet); padding: 0 8px; }
.hold-row select:disabled, .hold-u input:disabled { background: var(--paper-2); color: var(--ink-2); opacity: 1; }
.hold-u { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.hold-u input { width: 7.5em; height: 38px; border: 1px solid var(--hair); border-radius: 3px; background: var(--sheet); text-align: right; padding: 0 8px; font-weight: 700; }
.hold-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.paste { margin-top: 12px; display: grid; gap: 6px; }
.paste textarea { width: 100%; border: 1px solid var(--hair); border-radius: 3px; background: var(--sheet); padding: 8px 10px; font-family: var(--mono); resize: vertical; }
.paste code { font-family: var(--mono); background: var(--paper-2); padding: 0 4px; }
.ws-list { margin-top: 10px; display: grid; gap: 6px; }
.ws-list button { width: 100%; text-align: left; background: var(--paper-2); border: 1px solid var(--line); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; }
.ws-list button:hover { border-color: var(--navy); }
.ws-list span { color: var(--mute); font-size: 13px; }
.today { margin-top: 10px; padding: 10px 14px; background: var(--sheet); border: 1px solid var(--line); }
.today-k { font-size: 12.5px; font-weight: 700; color: var(--brass); letter-spacing: .08em; }
.today > p { font-weight: 600; }
.today ul { margin-top: 4px; font-size: 13.5px; }
.today li { padding: 4px 0; border-top: 1px dashed var(--line); display: grid; }
.today li span { color: var(--ink-2); }
.files { margin-top: 12px; }
.files h3 { font-size: 13.5px; color: var(--ink-2); font-weight: 700; }
.files li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.files-a { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sec.back .si-cta-list { margin-top: 10px; border-radius: 3px; }
.side { position: sticky; top: 14px; min-width: 0; background: var(--sheet); border: 1px solid var(--ink); border-radius: 3px; box-shadow: var(--shadow); padding: 20px 22px 22px; }
.side h2 { font: 700 20px/1.4 var(--serif); letter-spacing: .06em; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.ready { margin: 10px 0 12px; font-size: 13.5px; }
.ready li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.ready li > i { flex: none; width: 18px; height: 18px; margin-top: 2px; border: 1.5px solid var(--hair); border-radius: 50%; display: grid; place-items: center; color: #fff; }
.ready li > i .ico { width: 12px; height: 12px; stroke-width: 3; }
.ready li.ok { color: var(--ink); } .ready li.ok > i { background: var(--navy); border-color: var(--navy); }
.ready li.run > i { border-color: var(--brass-2); border-top-color: transparent; animation: spin .8s linear infinite; }
.ready li.later { color: var(--mute); } .ready li.later > i { border-style: dashed; }
.ready li span { flex: 1 1 auto; min-width: 0; } .ready li em { font-style: normal; font-weight: 700; color: var(--brass); }
@keyframes spin { to { transform: rotate(360deg); } }
.side-note { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.side-note.ok { color: var(--navy); font-weight: 600; } .side-note.warn { color: var(--warn); font-weight: 600; }
.side-warn { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.issues { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; }
.issues > b { color: var(--warn); }
.issues li { display: grid; gap: 4px; padding: 6px 0; border-top: 1px dashed var(--warn-line); }
.issues li:first-child { border-top: 0; }
.issues .btn-fix { justify-self: start; }
.keys { margin-top: 16px; font-size: 12.5px; color: var(--ink-2); display: grid; gap: 4px; }
.keys dt { font-weight: 700; letter-spacing: .08em; color: var(--mute); }
.si-error, .errbox .si-error { background: #FBEDEA; border-left: 3px solid var(--up); padding: 10px 14px; font-size: 14px; margin-bottom: 10px; }
.si-error p { margin-top: 2px; } .si-error ul { list-style: disc; padding-left: 18px; margin-top: 2px; }
.si-error-trace { font-family: var(--mono); font-size: 12px; color: var(--mute); }
.err-acts { display: grid; gap: 6px; margin-bottom: 12px; justify-items: start; }
.err-step { font-size: 13px; color: var(--ink-2); }
.legal { color: var(--mute); font-size: 12px; line-height: 1.6; }
.prep-legal { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ───────── 會議簡報 ───────── */
.deck { position: fixed; inset: 0; z-index: 20; overflow: hidden; background: var(--paper); background-image: radial-gradient(60em 30em at 88% -6%, rgba(255, 255, 255, .8), transparent 62%), repeating-linear-gradient(0deg, rgba(120, 100, 60, .022) 0 1px, transparent 1px 3px); font-size: clamp(11px, min(1.1111vw, 1.7778vh), 30px); line-height: 1.6; }
.deck[hidden] { display: none; }
.stage { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 1.5em 4.6em 3.5em; opacity: 0; visibility: hidden; transform: translateX(1.6%); transition: opacity .32s var(--ease), transform .32s var(--ease), visibility 0s .32s; }
.slide.before { transform: translateX(-1.6%); }
.slide.on { opacity: 1; visibility: visible; transform: none; transition: opacity .32s var(--ease), transform .32s var(--ease), visibility 0s; }
.s-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3em 1.4em; font-size: .8em; color: var(--mute); letter-spacing: .1em; padding-bottom: .6em; border-bottom: 1px solid var(--hair); }
.s-brand { color: var(--ink); font-family: var(--serif); font-weight: 700; }
.s-client { color: var(--ink-2); font-weight: 700; }
.s-head .demo-chip { font-size: .92em; }
.s-page { margin-left: auto; font-family: var(--serif); color: var(--ink-2); }
.s-body { min-height: 0; min-width: 0; padding-top: 1.1em; display: flex; flex-direction: column; }
.s-eyebrow { color: var(--brass); font-weight: 700; letter-spacing: .24em; font-size: .92em; }
.s-title { font: 700 2.85em/1.26 var(--serif); letter-spacing: .02em; margin-top: .12em; }
.s-title em, .cv-title em, .hand h2 em { font-style: normal; background: linear-gradient(transparent 64%, var(--brass-bg) 64%); padding: 0 .08em; }
.s-lead { font-size: 1.22em; color: var(--ink-2); margin-top: .5em; }
.s-fine { font-size: .82em; color: var(--mute); padding: .6em 0 .5em; }
.s-mid { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; padding-bottom: 1.2em; }
.s-foot { font-size: .7em; color: var(--mute); padding-top: .55em; border-top: 1px solid var(--line); min-width: 0; }
.fnotes { display: flex; flex-wrap: wrap; align-items: center; gap: .3em 1.6em; margin-bottom: .2em; color: var(--ink-2); }
.s-foot .verify, .qs-foot .verify { margin-top: -6px; margin-bottom: -6px; } /* 點按範圍 28px，但不把註腳那一行撐高 */
.fnotes b { color: var(--brass); margin-right: .5em; }
.verify { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; padding: 0 .4em; margin-left: .15em; vertical-align: middle; background: var(--sheet); border: 1px solid var(--hair); border-radius: 3px; font: inherit; color: var(--navy); font-weight: 700; cursor: pointer; }
.verify:hover { border-color: var(--navy); background: var(--steel-bg); }
.si-error-retry { margin-top: 8px; background: var(--sheet); border: 1px solid var(--brass-2); border-radius: 3px; color: var(--brass); font-weight: 700; font-size: 13px; padding: .3em .9em; min-height: 32px; }
.si-error-retry:disabled { opacity: .55; }
.s-foot .legal, .qs-foot .legal { font-size: 1em; line-height: 1.5; }
.s-foot .legal p, .qs-foot .legal p { display: inline; }
.s-foot .legal p + p::before, .qs-foot .legal p + p::before { content: "　"; }
.block { position: relative; }
.block > .demo-chip, .pcol > .demo-chip { position: absolute; top: -.85em; left: 1em; z-index: 2; font-size: .68em; }
.deck .demo-chip { font-size: .72em; line-height: 1.6; }

.s-wait { max-width: 46em; margin: 0 auto; }
.s-wait-acts { display: flex; flex-wrap: wrap; gap: .6em; margin-top: .8em; }
.nx-note.warn { color: var(--warn); font-weight: 700; }
.ch-load { white-space: nowrap; font-weight: 700; } .ch-load:empty { display: none; }
.ch-load.on { color: var(--brass); } .ch-load.on::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .4em; vertical-align: -.08em; border: 2px solid var(--brass-2); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.ch-load.err { color: var(--warn); background: var(--warn-bg); padding: 0 .5em; border: 1px solid var(--warn-line); }
.ch-load.on ~ .ch-clock .ch-pg, .ch-load.err ~ .ch-clock .ch-pg { display: none; } /* 備妥中先讓位給進度，底列不擠出去 */
/* 封面 */
.cover { height: 100%; display: grid; align-content: center; padding-left: 5%; border-left: 3px solid var(--brass-2); margin: 3% 0 3% 2%; }
.cv-eyebrow { color: var(--brass); font-weight: 700; letter-spacing: .5em; font-size: 1.05em; }
.cv-title { font: 700 4.9em/1.2 var(--serif); letter-spacing: .03em; margin-top: .1em; }
.cv-date { font: 500 1.35em/1.6 var(--serif); color: var(--ink-2); margin-top: .5em; }
.cv-agenda { display: flex; flex-wrap: wrap; gap: .6em 2.2em; margin-top: 2.6em; counter-reset: cv; }
.cv-agenda li { display: flex; align-items: baseline; gap: .55em; }
.cv-agenda i { font: 700 1em/1 var(--serif); font-style: normal; color: var(--brass); border: 1px solid var(--brass-2); width: 1.7em; height: 1.7em; display: inline-grid; place-items: center; }
.cv-agenda b { font: 700 1.3em/1.4 var(--serif); }
.cv-note { margin-top: 2.6em; font-size: 1.1em; color: var(--ink-2); max-width: 44em; }
.cv-hint { margin-top: 1.4em; color: var(--mute); }

/* 你的目標 */
.s-goal .block > .demo-chip { top: -2.1em; left: 0; }
.path-ends { display: flex; justify-content: space-between; gap: 1em; font: 700 1.05em/1.6 var(--serif); color: var(--ink-2); margin-bottom: .3em; }
.path-bar { display: flex; height: 4.4em; border: 1.5px solid var(--ink); background: var(--sheet); }
.pb { flex: none; min-width: 0; } .pb.have { background: var(--navy); } .pb.put { background: var(--steel); }
.pb.gap { background: repeating-linear-gradient(45deg, var(--sheet) 0 7px, rgba(27, 35, 51, .2) 7px 8.5px); }
.path-leg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em 2em; margin-top: 1.2em; font-size: 1.12em; }
.path-leg > div { min-width: 0; display: grid; gap: .1em; align-content: start; grid-template-columns: auto minmax(0, 1fr); column-gap: .6em; }
.path-leg .k { width: .95em; height: .95em; margin-top: .42em; border: 1px solid var(--ink); }
.k.have { background: var(--navy); } .k.put { background: var(--steel); } .k.gap { background: repeating-linear-gradient(45deg, var(--sheet) 0 3px, rgba(27, 35, 51, .35) 3px 4px); } .k.ok { background: var(--brass-2); }
.path-leg span { color: var(--ink-2); }
.path-leg b { grid-column: 2; font: 700 2.3em/1.3 var(--serif); }
.goal-say { margin-top: 1.1em; padding-top: .7em; border-top: 1px solid var(--hair); font: 500 1.5em/1.6 var(--serif); }
.goal-say b { font-size: 1.12em; }
.gw-base { font: 400 .62em/1.6 var(--sans); color: var(--ink-2); margin-top: .2em; }
.s-goal .block.wi-on .path-bar { border-style: dashed; }
.wi-chip { position: absolute; top: -2.1em; right: 0; font: 700 .82em/1.7 var(--sans); letter-spacing: .04em; background: var(--navy); color: #fff; padding: 0 .9em; white-space: nowrap; }
.goal-wi { margin-top: .9em; background: var(--sheet); border: 1px solid var(--line); box-shadow: var(--shadow); padding: .7em 1.2em .55em; }
.gw-h { font-size: .98em; color: var(--ink-2); } .gw-h b { color: var(--ink); font-family: var(--serif); font-size: 1.1em; }
.gw-row { display: flex; flex-wrap: wrap; gap: .6em 1.8em; align-items: flex-end; margin-top: .45em; }
.gw-c { display: grid; gap: .15em; min-width: 0; }
.gw-l { font-size: .86em; font-weight: 700; color: var(--ink-2); }
.gw-step { display: inline-flex; align-items: stretch; border: 1.5px solid var(--ink); background: #fff; }
.gw-step button { width: 2.5em; min-height: 2.3em; border: 0; background: var(--paper-2); font: 700 1.25em/1 var(--sans); color: var(--navy); }
.gw-step button:hover { background: var(--brass-bg); }
.gw-step b { display: grid; place-items: center; min-width: 7.4em; padding: 0 .6em; font: 700 1.18em/1 var(--serif); white-space: nowrap; }
.gw-c > i { font-style: normal; font-size: .74em; color: var(--mute); }
.gw-x { display: flex; flex-wrap: wrap; gap: .5em; margin-left: auto; align-self: center; }
.gw-st { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; min-height: 1.6em; margin-top: .35em; font-size: .86em; color: var(--ink-2); }

/* 你現在的配置 */
.rib-big { height: 5em; border: 1.5px solid var(--ink); font-size: 1.15em; }
.s-now .s-lead { margin-top: 1.2em; }
.rib-big .rib-s { display: flex; flex-direction: column; justify-content: center; color: #fff; overflow: hidden; white-space: nowrap; line-height: 1.3; }
.rib-big .rib-s b { font-size: .95em; padding: 0 .7em; } .rib-big .rib-s i { font-style: normal; font-size: .85em; opacity: .9; padding: 0 .82em; }
.rib-big .c-bd { color: var(--ink); }
.cls-line { display: flex; flex-wrap: wrap; gap: .3em 2.4em; margin: 1em 0 .9em; font-size: 1.25em; color: var(--ink-2); }
.cls-line b { color: var(--ink); font-size: 1.15em; }
.tbl { width: 100%; border-collapse: collapse; font-size: 1.02em; }
.tbl th { text-align: left; font-weight: 600; font-size: .86em; color: var(--mute); border-bottom: 1.5px solid var(--ink); padding: .35em .6em; white-space: nowrap; }
.tbl td { padding: .42em .6em; border-bottom: 1px solid var(--line); }
.tbl .r { text-align: right; }
.now-tbl { font-size: 1.3em; }
.now-tbl td { padding: .55em .6em; }

/* 三個方案／最壞情況 */
.pcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5em; margin-top: 1.3em; }
.pcol { position: relative; min-width: 0; background: var(--sheet); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 1em 1.3em 1.05em; display: flex; flex-direction: column; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.pcol.focus { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy), 0 14px 34px rgba(27, 35, 51, .14); transform: translateY(-.25em); }
.fit-tag { position: absolute; top: -.75em; right: 1em; background: var(--brass); color: #fff; font-size: .78em; font-weight: 700; letter-spacing: .12em; padding: .05em .8em; }
.pcol-h { all: unset; cursor: pointer; display: flex; align-items: baseline; gap: .7em; }
.pcol-h:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.pcol-h span { font-size: .85em; color: var(--mute); letter-spacing: .1em; }
.pcol-h b { font: 700 2.1em/1.25 var(--serif); letter-spacing: .08em; }
.pcol .rib { height: .7em; margin-top: .55em; }
.pcol-mix { margin-top: .45em; font-weight: 600; font-size: .98em; }
.pcol-sym { font-size: .8em; color: var(--mute); }
.pcol-end { display: flex; align-items: baseline; gap: .5em; margin-top: .7em; padding-top: .6em; border-top: 1.5px solid var(--ink); }
.pcol-end span { font-size: .85em; color: var(--ink-2); } .pcol-end b { font: 700 2.15em/1.2 var(--serif); margin-left: auto; } .pcol-end i { font-style: normal; font-size: .85em; color: var(--ink-2); }
.pcol-in { text-align: right; font-size: .85em; color: var(--mute); }
.pcol-dl { margin-top: .5em; }
.pcol-dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding: .26em 0; border-top: 1px dotted var(--hair); }
.pcol-dl dt { color: var(--ink-2); font-size: .92em; white-space: nowrap; } .pcol-dl dd { font-weight: 700; text-align: right; font-size: 1.04em; }
.pref { margin-top: .9em; font-size: .92em; color: var(--ink-2); }
.pref-fine { color: var(--mute); margin-left: .6em; font-size: .92em; }
.wcols { margin-top: 1em; }
.wcol .uw { max-height: 9.4em; }
.uw { width: 100%; height: auto; margin-top: .5em; overflow: visible; }
.uw-area { fill: var(--down-bg); } .uw-line { fill: none; stroke: var(--down); stroke-width: 1.6; stroke-linejoin: round; }
.uw-grid { stroke: var(--line); stroke-width: .6; } .uw-tick { stroke: var(--mute); stroke-width: .6; }
.uw-tol { stroke: var(--ink); stroke-width: 1.1; stroke-dasharray: 5 3; }
.uw-dot { fill: var(--down); stroke: var(--sheet); stroke-width: 1.4; }
.uw-t { font: 500 8.5px var(--sans); fill: var(--mute); } .uw-t.mid { text-anchor: middle; } .uw-t.end { text-anchor: end; } .uw-t.tol { fill: var(--ink); font-weight: 700; font-size: 9px; paint-order: stroke; stroke: var(--sheet); stroke-width: 3px; stroke-linejoin: round; }
.w-deep { display: flex; align-items: baseline; gap: .6em; margin-top: .3em; }
.w-deep span { color: var(--ink-2); } .w-deep b { font: 700 2.3em/1.2 var(--serif); white-space: nowrap; } .w-deep i { font-style: normal; color: var(--mute); margin-left: auto; white-space: nowrap; }
.w-tol { display: inline-block; align-self: flex-start; font-size: .9em; font-weight: 700; padding: .05em .7em; margin: .2em 0 .35em; }
.w-tol.over { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); } .w-tol.in { background: var(--steel-bg); color: var(--navy); }
.w-row { font-size: .9em; color: var(--ink-2); padding: .3em 0; border-top: 1px dotted var(--hair); }

/* 再平衡 */
.rb { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 1.4em; margin-top: 1.5em; min-height: 0; font-size: 1.1em; }
.rb-stage, .rb-slips { background: var(--sheet); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 1.2em 1.5em; min-width: 0; }
.rb-when { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3em 1em; }
.rb-when b { font: 700 1.9em/1.3 var(--serif); }
.rb-phase { font-weight: 600; color: var(--ink-2); padding: .05em .7em; }
.rb-phase.warn { background: var(--warn-bg); color: var(--warn); } .rb-phase.done { background: var(--steel-bg); color: var(--navy); }
.rb-bars { display: grid; gap: .35em; margin: 1.1em 0 .4em; }
.rb-row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); align-items: center; gap: .6em; }
.rb-lab { font-size: .82em; font-weight: 700; color: var(--ink-2); text-align: right; }
.rb-bar { display: flex; overflow: hidden; border: 1.5px solid var(--ink); background: var(--sheet); }
.rb-bar.tgt { height: .95em; border-width: 1px; }
.rb-bar.now { height: 3.7em; }
.rb-bar.now .rib-s { display: flex; align-items: center; color: #fff; overflow: hidden; white-space: nowrap; transition: width .45s var(--ease); }
.rb-bar.now.snap .rib-s { transition-duration: 1.1s; }
.rb-bar.now .rib-s b { padding: 0 .7em; font-size: 1.05em; } .rb-bar.now .rib-s.tiny b { display: none; }
.rb-bar.now .c-bd { color: var(--ink); }
.rb-bar.now.alert { box-shadow: 0 0 0 .25em var(--warn-bg), 0 0 0 .33em var(--warn); }
.rb-leg { display: flex; flex-wrap: wrap; gap: .25em 1.8em; margin: .75em 0 .15em 3.2em; font-size: .95em; }
.rb-leg li { display: inline-flex; align-items: baseline; gap: .5em; white-space: nowrap; }
.rb-leg strong { font: 700 1.3em/1.2 var(--serif); color: var(--ink); }
.rb-leg span { color: var(--ink-2); }
.rb-leg em { font-style: normal; font-size: .86em; color: var(--mute); min-width: 7.6em; } .rb-leg em.over { color: var(--warn); font-weight: 700; }
.rb-tgt { font-size: .82em; color: var(--mute); margin-left: 3.9em; }
.rb-meter { display: flex; align-items: center; gap: .9em; margin-top: 1em; font-size: .95em; color: var(--ink-2); }
.rb-track { position: relative; flex: 1 1 auto; height: .6em; background: var(--line); border-radius: 1em; }
#rb-fill { display: block; height: 100%; width: 0; background: var(--steel); border-radius: 1em; transition: width .4s var(--ease), background .2s; }
#rb-fill.over { background: var(--warn); }
.rb-th { position: absolute; top: -.45em; bottom: -.45em; width: 2px; background: var(--ink); }
.rb-dev b { font: 700 1.5em/1 var(--serif); color: var(--ink); }
.rb-line { display: flex; align-items: flex-end; gap: 2px; height: 2.6em; margin-top: 1.7em; padding-bottom: .9em; }
.rb-m { position: relative; flex: 1 1 0; min-width: 0; height: .5em; background: var(--line); border: 0; padding: 0; border-radius: 1px; }
.rb-m.past { background: var(--steel); } .rb-m.now { background: var(--navy); height: 1.1em; }
.rb-m.yr::after { content: attr(data-y); position: absolute; left: 0; top: 100%; margin-top: .25em; font-size: .62em; color: var(--mute); }
button.rb-m { cursor: pointer; overflow: visible; }
.rb-m.ev i { position: absolute; left: 50%; top: -1.25em; width: .78em; height: .78em; margin-left: -.39em; background: var(--brass-2); transform: rotate(45deg); border: 1px solid var(--sheet); }
.rb-m.ev.now i { background: var(--warn); transform: rotate(45deg) scale(1.35); }
.rb-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: .6em; margin-top: 1.2em; }
.deck .btn-ctl { min-height: 2.5em; font-size: .92em; }
.btn-ctl.main { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-ctl.main kbd, .btn-hand kbd { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .4); color: #fff; }
.rb-count { margin-left: auto; color: var(--mute); font-size: .9em; }
.slip h3 { font: 700 1.3em/1.4 var(--serif); padding-bottom: .3em; border-bottom: 1.5px solid var(--ink); }
.slip p { margin-top: .6em; font-size: .92em; color: var(--ink-2); }
.slip-hint { color: var(--mute); }
.slip-why { font-weight: 600; color: var(--ink); }
.slip-tbl { font-size: .9em; margin-top: .5em; }
.slip-tbl td:first-child b { display: inline-block; width: 1.7em; text-align: center; font-size: .92em; }
.slip-tbl tr.sell td:first-child b { background: var(--brass-bg); color: var(--brass); } .slip-tbl tr.buy td:first-child b { background: var(--steel-bg); color: var(--navy); }
.slip-sum { font-weight: 600; }
.slip-api { font-size: .78em; color: var(--mute); border-top: 1px dashed var(--line); padding-top: .5em; }

/* 下一步 */
.nx-points { counter-reset: nx; max-width: 52em; }
.nx-points li { counter-increment: nx; position: relative; padding: .7em 0 .7em 2.6em; font: 500 1.75em/1.6 var(--serif); border-top: 1px solid var(--line); }
.nx-points li::before { content: counter(nx); position: absolute; left: 0; top: .78em; width: 1.6em; height: 1.6em; display: grid; place-items: center; border: 1px solid var(--brass-2); color: var(--brass); font-weight: 700; font-size: .85em; }
.nx-act { margin-top: 2.4em; display: flex; flex-wrap: wrap; gap: .8em 1.2em; align-items: center; }
.btn-hand { display: inline-flex; align-items: center; gap: .6em; border: 0; border-radius: 3px; background: var(--navy); color: #fff; font: 700 1.3em/1.4 var(--sans); padding: .7em 1.5em; letter-spacing: .04em; box-shadow: 0 10px 26px rgba(31, 47, 74, .25); transition: transform .16s var(--ease); }
.btn-hand:hover:not(:disabled) { transform: translateY(-1px); }
.btn-hand:disabled { background: #A9AFB9; box-shadow: none; }
.btn-hand.ghost { background: var(--sheet); color: var(--navy); border: 1.5px solid var(--navy); box-shadow: none; }
.nx-note { flex: 1 1 22em; color: var(--mute); font-size: .95em; }
.receipt { position: relative; margin-top: 1.1em; max-width: 52em; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1em 1.4em; }
.receipt.demo { border-style: dashed; }
.receipt > .demo-chip { position: absolute; top: -.85em; right: 1em; }
.receipt dl div { display: flex; flex-wrap: wrap; gap: .2em 1.2em; padding: .28em 0; border-bottom: 1px dotted var(--hair); }
.receipt dt { flex: 0 0 6.5em; color: var(--mute); } .receipt dd { flex: 1 1 14em; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.receipt-note { margin-top: .7em; font-size: .9em; color: var(--ink-2); background: var(--paper-2); padding: .5em .8em; }
.receipt-more { margin-top: .5em; font-size: .88em; }
.receipt-more summary { cursor: pointer; color: var(--navy); font-weight: 600; min-height: 28px; }
.receipt-more dl { margin-top: .2em; }

/* 控制列 */
.chrome { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: .55em; height: 3.3em; padding: 0 1.1em; font-size: .8em; background: rgba(245, 240, 228, .94); border-top: 1px solid var(--line); color: var(--ink-2); }
.deck.client .chrome { visibility: hidden; }
.ch-btn { display: inline-grid; place-items: center; width: 2.5em; height: 2.5em; background: transparent; border: 1px solid transparent; border-radius: 3px; color: var(--ink-2); }
.ch-btn:hover:not(:disabled) { border-color: var(--hair); color: var(--ink); } .ch-btn:disabled { opacity: .3; }
.ch-agenda { display: flex; align-items: center; gap: .1em; min-width: 0; flex: none; }
.ch-agenda button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .3em .42em; color: var(--mute); white-space: nowrap; }
.ch-agenda button i { font-style: normal; font-family: var(--serif); margin-right: .35em; color: var(--brass); }
.ch-agenda button[aria-current] { color: var(--ink); font-weight: 700; border-bottom-color: var(--navy); }
.ch-agenda button:hover { color: var(--ink); }
.ch-pos { display: none; font-weight: 700; color: var(--ink); white-space: nowrap; }
.ch-gap { flex: 1 1 auto; }
.ch-focus { display: inline-flex; border: 1px solid var(--hair); border-radius: 3px; overflow: hidden; flex: none; }
.ch-focus button { display: inline-flex; align-items: center; gap: .35em; background: var(--sheet); border: 0; border-right: 1px solid var(--hair); padding: .28em .7em; color: var(--ink-2); white-space: nowrap; }
.ch-focus button:last-child { border-right: 0; }
.ch-focus button[aria-pressed="true"] { background: var(--navy); color: #fff; font-weight: 700; }
.ch-focus button[aria-pressed="true"] kbd { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; }
.ch-focus kbd, .ch-q kbd { font-size: .8em; min-width: 1.5em; }
.ch-q { display: inline-flex; align-items: center; gap: .45em; background: var(--sheet); border: 1px solid var(--brass-2); border-radius: 3px; padding: .3em .8em; font-weight: 700; color: var(--brass); white-space: nowrap; }
.ch-q:hover { background: var(--brass-bg); }
.ch-clock { display: inline-flex; align-items: center; gap: .35em; white-space: nowrap; }
.ch-clock b { color: var(--ink); } .ch-clock i { font-style: normal; color: var(--mute); }
.ch-clock.over b { color: var(--warn); } .ch-clock.over > i { color: var(--warn); font-weight: 700; background: var(--warn-bg); padding: 0 .45em; border: 1px solid var(--warn-line); }
.ch-pg { margin-left: .45em; padding: .05em .6em; border: 1px solid var(--line); border-radius: 999px; background: var(--sheet); color: var(--ink-2); }
.ch-pg.over { background: var(--warn); border-color: var(--warn); color: #fff; font-weight: 700; }
.ch-end { background: none; border: 1px solid var(--hair); border-radius: 3px; padding: .3em .8em; color: var(--ink-2); white-space: nowrap; }
.ch-end:hover { border-color: var(--ink); color: var(--ink); }

/* 蓋在簡報上的東西 */
#ovl:empty { display: none; }
.ov-back { position: absolute; inset: 0; z-index: 30; background: rgba(27, 35, 51, .62); }
.tray { position: absolute; z-index: 31; left: 50%; bottom: 4.6em; transform: translateX(-50%); width: min(66em, 94vw); text-align: center; }
.tray-h { color: #fff; font: 700 1.5em/1.5 var(--serif); letter-spacing: .1em; }
.tray-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3em; margin-top: .8em; }
.qcard { position: relative; text-align: left; border: 1px solid var(--ink); border-radius: 2px; padding: 1.2em 1.3em 1.1em; min-height: 11em; display: grid; align-content: start; gap: .3em; background: var(--sheet); background-image: linear-gradient(var(--sheet) 2.9em, transparent 2.9em), repeating-linear-gradient(0deg, transparent 0 1.55em, rgba(110, 140, 171, .28) 1.55em calc(1.55em + 1px)); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); transition: transform .2s var(--ease); }
.qcard:nth-child(1) { transform: rotate(-1.6deg); } .qcard:nth-child(3) { transform: rotate(1.4deg); }
.qcard:hover, .qcard:focus-visible { transform: translateY(-.5em) rotate(0); outline-color: #fff; }
.qcard kbd { position: absolute; top: .8em; right: .9em; }
.qcard q { font: 700 1.5em/1.4 var(--serif); quotes: "「" "」"; }
.qcard b { font-size: 1.05em; color: var(--navy); } .qcard i { font-style: normal; font-size: .88em; color: var(--mute); }
.tray-foot { margin-top: 1em; color: rgba(255, 255, 255, .86); font-size: .9em; }
.qsheet { position: absolute; z-index: 31; inset: 2.4% 4.5% 4.6em 4.5%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--sheet); border: 1.5px solid var(--ink); box-shadow: 0 30px 80px rgba(27, 35, 51, .4); }
.qs-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6em 1.2em; padding: .9em 1.6em .8em; border-bottom: 1px solid var(--hair); }
.qs-q { flex: 1 1 16em; min-width: 0; }
.qs-quote { color: var(--brass); font: 700 1.05em/1.4 var(--serif); letter-spacing: .06em; }
.qs-head h2 { font: 700 1.9em/1.3 var(--serif); }
.qs-tabs { display: inline-flex; gap: .4em; flex-wrap: wrap; font-size: .82em; }
.qs-tabs button { display: inline-flex; align-items: center; gap: .4em; background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; padding: .25em .7em; color: var(--ink-2); white-space: nowrap; }
.qs-tabs button[aria-pressed="true"] { border-color: var(--ink); background: var(--sheet); color: var(--ink); font-weight: 700; }
.qs-head .ch-focus { font-size: .82em; }
.qs-x { display: inline-grid; place-items: center; width: 2.4em; height: 2.4em; background: none; border: 1px solid var(--hair); border-radius: 3px; }
.qs-body { overflow: auto; padding: .9em 1.6em .5em; min-height: 0; }
.qs-foot { font-size: .7em; color: var(--mute); padding: .5em 1.6em .7em; border-top: 1px solid var(--line); }
.qs-load { display: grid; place-content: center; justify-items: center; gap: .5em; min-height: 16em; text-align: center; font-size: 1.15em; }
.spin { width: 2em; height: 2em; border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
.fine { font-size: .82em; color: var(--mute); margin-top: .45em; }
.qs-body .block { background: var(--paper-2); border: 1px solid var(--line); padding: .8em 1.1em; margin-top: .6em; }
.c1 { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 1.4em; align-items: start; }
.c1-l.block { margin-top: .6em; }
.c1-how { font-size: .9em; color: var(--ink-2); }
.c1-bars { margin-top: .5em; }
.c1-bars li { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) 4.4em 7.6em 2.6em; gap: .6em; align-items: center; padding: .1em 0; font-size: .92em; }
.c1-from { color: var(--ink-2); white-space: nowrap; }
.c1-track { position: relative; height: .95em; background: var(--sheet); border: 1px solid var(--line); }
.c1-track i { position: absolute; top: 0; bottom: 0; } .c1-track i.up { background: var(--up); opacity: .82; } .c1-track i.down { background: var(--down); opacity: .82; } .c1-track i.flat { background: var(--mute); }
.c1-track u { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: var(--ink); text-decoration: none; }
.c1-bars b { text-align: right; } .c1-fin { text-align: right; color: var(--ink-2); font-size: .92em; white-space: nowrap; }
.c1-bars em { font-style: normal; font-size: .78em; font-weight: 700; text-align: center; white-space: nowrap; } .c1-bars em.ok { color: var(--navy); } .c1-bars em.no { color: var(--warn); }
.c1-count { font: 600 1.15em/1.55 var(--sans); color: var(--ink); } .c1-count + .c1-count { margin-top: .3em; }
.c1-def, .c1-ext { margin-top: .35em; font-size: .95em; color: var(--ink-2); }
.c1-fanh { font-size: .85em; color: var(--ink-2); }
.fan { display: block; width: 100%; height: auto; max-height: 10.5em; margin-top: .3em; overflow: visible; }
.fan-band { fill: var(--steel-bg); stroke: var(--steel); stroke-width: .6; } .fan-mid { fill: none; stroke: var(--navy); stroke-width: 1.8; } .fan-target { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 5 3; }
.c1-fanl { font-size: .86em; color: var(--ink-2); }
.c1-re { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .7em; margin-top: .8em; font-size: .92em; }
.c1-re input { width: 8.5em; height: 2.3em; border: 0; border-bottom: 1.5px solid var(--ink); background: transparent; text-align: right; font-weight: 700; }
.c2.block { padding: .6em 1em; }
.c2-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.c2-tbl thead th { text-align: left; padding: .4em .8em; border-bottom: 1.5px solid var(--ink); }
.c2-tbl thead th:first-child { width: 8.5em; }
.c2-tbl thead b { display: block; font: 700 1.25em/1.3 var(--serif); } .c2-tbl thead i { font-style: normal; font-size: .82em; color: var(--mute); font-weight: 500; }
.c2-tbl tbody th { text-align: left; padding: .6em .8em; border-bottom: 1px solid var(--line); vertical-align: middle; }
.c2-tbl tbody th span { display: block; font-size: .8em; color: var(--mute); font-weight: 500; } .c2-tbl tbody th b { font: 700 1.5em/1.2 var(--serif); }
.c2-tbl td { padding: .6em .8em; border-bottom: 1px solid var(--line); vertical-align: top; }
.c2-tbl tr.focus th, .c2-tbl tr.focus td { background: var(--sheet); box-shadow: inset 0 2px 0 var(--navy), inset 0 -2px 0 var(--navy); }
.c2-tbl td { display: table-cell; }
.c2-tbl td > .c2-bar { float: left; width: .9em; height: 5.6em; margin-right: .9em; background: var(--sheet); border: 1px solid var(--line); position: relative; }
.c2-bar i { position: absolute; left: 0; right: 0; top: 0; background: var(--down); opacity: .8; }
.c2-n { display: grid; grid-template-columns: auto auto; justify-content: start; gap: .05em 1em; align-items: baseline; }
.c2-n em { font-style: normal; font-size: .85em; color: var(--ink-2); } .c2-n b { font-size: 1.1em; }
.c2-tbl td.na b { display: block; color: var(--warn); } .c2-tbl td.na span { display: block; font-size: .85em; color: var(--ink-2); } .c2-tbl td.na i { font-style: normal; display: block; font-size: .8em; color: var(--mute); }
.c2-ref { margin-top: .8em; padding: .6em 1em; border-left: 3px solid var(--brass-2); background: var(--brass-bg); font-size: .98em; }
.c3-lead { font-size: 1em; font-weight: 600; }
.c3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; font-size: .88em; }
.c3-col { min-width: 0; } .c3-col.off { opacity: .6; }
.c3-col h3 { display: inline; font: 700 1.25em/1.35 var(--serif); margin-right: .5em; }
.c3-badge { display: inline-block; font-size: .78em; font-weight: 700; padding: 0 .7em; margin-top: .25em; white-space: nowrap; }
.c3-badge.sell { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); } .c3-badge.keep { background: var(--steel-bg); color: var(--navy); border: 1px solid #C6D3E0; }
.c3-sum { font-size: .9em; line-height: 1.5; color: var(--ink-2); margin-top: .3em; }
.c3-col dl { margin-top: .4em; font-size: .92em; }
.c3-col dl div { display: flex; justify-content: space-between; gap: 1em; padding: .08em 0; border-top: 1px dotted var(--hair); }
.c3-col dt { color: var(--ink-2); } .c3-col dd { font-weight: 700; text-align: right; }
.c3-legs { margin-top: .3em; font-size: .88em; line-height: 1.45; border-top: 1px dotted var(--hair); padding-top: .25em; }
.c3-legs li b { display: inline-block; width: 1.6em; text-align: center; margin-right: .3em; } .c3-legs li.sell b { background: var(--brass-bg); color: var(--brass); } .c3-legs li.buy b { background: var(--steel-bg); color: var(--navy); }
.c3-ph { font-size: .8em; color: var(--mute); margin-top: .35em; } .c3-ph.warn { color: var(--warn); font-weight: 700; }
.c3-plain { font-size: .9em; font-weight: 600; color: var(--navy); margin-top: .15em; }
.c3-cash { font-size: .92em; color: var(--ink-2); margin: .3em 0 .5em; }
.c3-rule { display: block; font-size: .86em; color: var(--mute); }
.c3-bud { font-size: .86em; color: var(--mute); margin-left: .2em; white-space: nowrap; }
.c3-cash { margin: .2em 0 .4em; }
.qs-body .c3-col.block { padding: .65em 1em; }
.c3-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin-bottom: .6em; }
.c3-tabs button { background: var(--paper-2); border: 1px solid var(--line); border-radius: 3px; padding: .3em .9em; color: var(--ink-2); font-weight: 600; min-height: 2.3em; }
.c3-tabs button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.c3-tabs .fine { margin: 0 0 0 .4em; }
.c3-hist .tbl td:first-child b { display: block; }
.spark { display: block; width: 100%; max-width: 17em; height: auto; overflow: visible; }
.sp-line { fill: none; stroke: var(--navy); stroke-width: 1.8; } .sp-th { stroke: var(--ink); stroke-width: .8; stroke-dasharray: 4 3; } .sp-sold { fill: var(--warn); stroke: var(--sheet); stroke-width: 1; }
.c3-hist .tbl { font-size: .98em; }
.c3-hist .tbl td { padding: .5em .7em; }
.qs-body .fine { line-height: 1.45; }
.sheet { position: absolute; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(40em, 92vw); max-height: 88vh; overflow: auto; background: var(--sheet); border: 1.5px solid var(--ink); padding: 1.6em 2em; box-shadow: 0 30px 80px rgba(27, 35, 51, .4); }
.sheet h2 { font: 700 1.6em/1.4 var(--serif); }
.sheet p { margin-top: .6em; color: var(--ink-2); }
.sheet-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7em; margin-top: 1.2em; }
.hp { margin: .8em 0 1.1em; }
.hp div { display: flex; gap: 1em; padding: .35em 0; border-top: 1px dotted var(--hair); }
.hp dt { flex: 0 0 8.5em; white-space: nowrap; }

/* 交接：畫面交給客戶本人 */
.hand { position: absolute; inset: 0; z-index: 40; overflow: auto; display: grid; place-items: center; padding: 2em 1.2em; background: var(--paper); }
.hand-gate { background: var(--navy); color: #F5F0E4; }
.hand-in { width: min(58em, 100%); background: var(--sheet); border: 1.5px solid var(--ink); border-top: .5em solid var(--navy); padding: 1.6em 2.2em 1.8em; box-shadow: 0 24px 60px rgba(27, 35, 51, .18); }
.hand-gate .hand-in { background: transparent; border: 0; box-shadow: none; text-align: center; }
.hd-eyebrow { color: var(--brass); font-weight: 700; letter-spacing: .2em; font-size: .92em; }
.hand-gate .hd-eyebrow { color: var(--brass-2); letter-spacing: .5em; }
.hand h2 { font: 700 2.1em/1.35 var(--serif); margin-top: .15em; }
.hand-gate h2 { font-size: 3.3em; }
.hand-gate h2 em { background: none; color: #E9C987; }
.hd-lead { margin-top: .6em; font-size: 1.1em; color: var(--ink-2); }
.hand-gate .hd-lead { color: #D6D0C2; font-size: 1.25em; max-width: 34em; margin-left: auto; margin-right: auto; }
.hd-acts { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8em 1.2em; margin-top: 1.4em; }
.hand-gate .hd-acts { flex-direction: column; justify-content: center; margin-top: 2.4em; }
.hand-gate .btn-hand { background: #F5F0E4; color: var(--navy); font-size: 1.45em; }
.hand-gate .btn-link { color: #D6D0C2; }
.hand-gate :focus-visible { outline-color: #E9C987; }
.hd-plans, .hd-ways, .hd-attest { border: 0; padding: 0; margin: 1.1em 0 0; min-width: 0; }
.hd-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9em; }
.hd-ways { display: grid; gap: .6em; }
.hd-ways legend, .hd-attest legend { font: 700 1.2em/1.5 var(--serif); padding: 0; margin-bottom: .3em; }
.hd-opt { position: relative; display: block; min-width: 0; }
.hd-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.hd-opt-b { display: grid; gap: .25em; height: 100%; border: 1.5px solid var(--line); background: var(--paper-2); padding: .8em 1em; transition: border-color .15s, background .15s; }
.hd-opt-b i { font-style: normal; font-size: .82em; color: var(--mute); letter-spacing: .1em; } .hd-opt-b b { font: 700 1.55em/1.3 var(--serif); } .hd-opt-b em { font-style: normal; font-size: .85em; color: var(--ink-2); }
.hd-opt.wide .hd-opt-b { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .hd-opt.wide .hd-opt-b b { font-size: 1.15em; } .hd-opt.wide .hd-opt-b em { grid-column: 1 / -1; }
.hd-opt .rib { height: .6em; }
.hd-opt input:hover + .hd-opt-b { border-color: var(--steel); }
.hd-opt input:checked + .hd-opt-b { border-color: var(--navy); background: var(--sheet); box-shadow: 0 0 0 1px var(--navy); }
.hd-opt input:focus-visible + .hd-opt-b { outline: 2px solid var(--navy); outline-offset: 3px; }
.hd-wait { margin-top: 1em; color: var(--mute); }
.btn-hand.wait, .hand-gate .btn-hand.wait { opacity: .45; cursor: progress; box-shadow: none; }
.hd-lump { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hd-lump legend { grid-column: 1 / -1; }
.hand-choose { padding-top: .8em; padding-bottom: .8em; }
.hand-choose .hand-in { padding: 1.1em 2.2em 1.1em; }
.hand-choose .hd-lead { margin-top: .3em; font-size: 1em; }
.hand-choose .hd-plans, .hand-choose .hd-ways { margin-top: .75em; }
.hand-choose .hd-ways { gap: .45em; }
.hand-choose .hd-opt-b { padding: .55em 1em; }
.hand-choose .hd-opt-b b { font-size: 1.4em; } .hand-choose .hd-opt.wide .hd-opt-b b { font-size: 1.1em; }
.hand-choose .hd-acts { margin-top: .9em; }
.hd-lump .hd-opt.wide .hd-opt-b { grid-template-columns: minmax(0, 1fr); }
.hd-check { margin-top: .7em; font-size: .95em; }
.hd-check.ok { color: var(--navy); font-weight: 600; display: flex; gap: .4em; align-items: flex-start; } .hd-check.ok .ico { margin-top: .25em; }
.hd-check.bad { background: var(--warn-bg); border-left: 3px solid var(--warn); padding: .6em 1em; } .hd-check.bad ul { list-style: disc; padding-left: 1.3em; }
.hand h2:focus { outline: none; }
.hand-in:focus { outline: none; }
.hd-kbd { margin-top: 1.8em; font-size: .92em; color: #C9C2B2; }
.hd-next { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5em 1em; min-width: 0; }
.hd-need { color: var(--warn); font-weight: 700; font-size: .95em; }
.hd-lines { margin-top: .9em; border-top: 1.5px solid var(--ink); }
.hd-lines div { display: flex; flex-wrap: wrap; gap: .2em 1.4em; padding: .42em 0; border-bottom: 1px solid var(--line); }
.hd-lines dt { flex: 0 0 7.5em; color: var(--mute); } .hd-lines dd { flex: 1 1 16em; font-weight: 700; font-size: 1.08em; min-width: 0; }
.hd-attest label { display: flex; gap: .7em; align-items: flex-start; padding: .35em 0; font-size: 1.05em; cursor: pointer; }
.hd-attest input { flex: none; width: 1.35em; height: 1.35em; margin: .2em 0 0; accent-color: var(--navy); }
.hd-msg { min-height: 1.5em; margin-top: .4em; color: var(--warn); font-weight: 600; font-size: .95em; }
.hd-fine { margin-top: .6em; font-size: .85em; color: var(--mute); text-align: right; }
.btn-hold { position: relative; overflow: hidden; border: 0; border-radius: 3px; background: var(--navy); color: #fff; font: 700 1.3em/1.4 var(--sans); padding: .75em 1.7em; letter-spacing: .04em; touch-action: none; user-select: none; -webkit-user-select: none; }
.btn-hold i { position: absolute; inset: 0; background: var(--brass-2); transform-origin: left center; transform: scaleX(var(--p, 0)); }
.btn-hold span { position: relative; }
.btn-hold:disabled { background: #A9AFB9; }
.btn-hold.holding { box-shadow: 0 0 0 3px var(--brass-bg); }

/* ───────── 會後：文件 ───────── */
.after { max-width: 980px; margin: 0 auto; padding: 0 24px 72px; }
.after-head { padding: 30px 0 18px; }
.after-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.after-acts .btn-go { width: auto; flex: 0 1 auto; min-height: 48px; font-size: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1.5px solid var(--ink); margin-top: 8px; }
.tabs button { background: none; border: 1px solid transparent; border-bottom: 0; padding: 8px 18px; font: 700 15px/1.5 var(--serif); color: var(--mute); margin-bottom: -1.5px; }
.tabs button[aria-selected="true"] { color: var(--ink); background: #fff; border-color: var(--ink); }
.doc { background: #fff; border: 1px solid var(--ink); border-top: 0; padding: 44px 56px 40px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.75; }
.doc[hidden], .doc-side[hidden] { display: none; }
.doc-side { background: #fff; border: 1px solid var(--ink); border-top: 0; padding: 20px 28px 24px; }
.save-steps { margin-top: 14px; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.save-steps li { display: flex; gap: 8px; align-items: flex-start; } .save-steps li span { min-width: 0; }
.save-steps li > i { flex: none; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; border: 1.5px solid var(--hair); }
.save-steps li.ok > i { background: var(--navy); border-color: var(--navy); }
.save-steps li.run > i { border-color: var(--brass-2); border-top-color: transparent; animation: spin .8s linear infinite; }
.save-steps li.bad { color: var(--up); font-weight: 600; } .save-steps li.bad > i { background: var(--up); border-color: var(--up); }
.save-steps li.na > i { border-style: dashed; }
.doc-goal { display: block; width: 100%; height: 26px; margin: 8px 0 4px; }
.doc-key { display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 12.5px; color: var(--ink-2); } .doc-key i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1px solid var(--ink); vertical-align: -1px; }
.doc-rib.tall { height: 16px; margin: 8px 0 6px; }
.doc-uw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 10px 0; }
.doc-uw figure { margin: 0; min-width: 0; border: 1px solid var(--line); padding: 8px 10px 4px; } .doc-uw figcaption { font-size: 12.5px; font-weight: 600; }
.dt-wrap { min-width: 0; } .dt-hint { display: none; }
.doc .receipt-more { font-size: 13px; }
.doc-head { border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.doc-kind { color: var(--brass); font-weight: 700; letter-spacing: .4em; font-size: 13px; }
.doc-head h1 { font: 700 30px/1.35 var(--serif); margin-top: 2px; }
.doc-meta { color: var(--ink-2); margin-top: 4px; font-size: 13.5px; }
.doc-flag { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); padding: 1px 10px; }
.doc section { margin-top: 24px; min-width: 0; }
.doc h2 { font: 700 18px/1.5 var(--serif); border-left: 3px solid var(--brass-2); padding-left: 10px; margin-bottom: 8px; }
.doc p { margin-top: 6px; }
.doc-fine { font-size: 12.5px; color: var(--mute); }
.doc-src { font-size: 12px; color: var(--mute); margin-top: 6px; }
.src-i { display: inline-block; margin-right: 1.2em; max-width: 100%; }
.doc-warn { color: var(--warn); font-weight: 700; background: var(--warn-bg); padding: 4px 10px; }
.doc-uw .uw-t { font-size: 12.5px; } .doc-uw .uw-t.tol { font-size: 13px; }
.doc-reply { font: 700 18px/1.5 var(--serif); }
.doc-rib { display: block; width: 100%; height: 7px; margin: 2px 0 5px; }
.doc, .doc * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-fit { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--brass); padding: 0 6px; }
ul.doc-ul, ul.doc-list { list-style: disc; padding-left: 20px; background: none; border: 0; }
ul.doc-ul li, ul.doc-list li { margin-top: 3px; }
.dt { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.dt th, .dt td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; vertical-align: top; }
.dt thead th { background: var(--paper-2); font-weight: 700; white-space: nowrap; }
.dt .r { text-align: right; white-space: nowrap; } .dt .t { width: 6.2em; white-space: nowrap; } .dt .v { width: 3em; text-align: center; }
.dt.cmp .r { white-space: normal; }
.dt.cmp th:first-child { width: 9.5em; }
.dt.kv th { width: 7.5em; background: var(--paper-2); white-space: nowrap; }
.dt tr.grp th { background: var(--steel-bg); font-family: var(--serif); }
.dt .how { color: var(--mute); font-size: 12px; }
.dt .trace { font-size: 11.5px; }
.rc-ok { color: var(--navy); font-weight: 700; } .rc-bad { color: var(--up); font-weight: 700; } .rc-miss { color: var(--mute); }
.doc .receipt { font-size: 14px; max-width: none; margin-top: 8px; }
.doc-end { border-top: 1px solid var(--line); padding-top: 12px; }
.doc-fp { font-size: 12px; color: var(--mute); margin-top: 8px; word-break: break-all; }
.doc-fp span { font-family: var(--mono); color: var(--ink-2); }

/* ───────── 手機與窄螢幕 ───────── */
@media (max-width: 1100px) {
  .prep-grid { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: -1; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 760px) {
  .top { padding: 12px 16px; }
  .prep { padding: 0 16px 56px; }
  .hero { padding: 22px 0 18px; }
  .hero h1, .after-head h1 { font-size: 30px; }
  .story { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-go { display: block; }
  .sec { padding: 18px 16px 20px; }
  .blank { font-size: 17px; line-height: 2.5; }
  .plan-row, .plan-edit { grid-template-columns: minmax(0, 1fr); }
  .keys { display: none; }
  .kfield input { width: min(210px, 50vw); min-height: 36px; font-size: 13px; }
  .keybar .btn-ghost { min-height: 36px; padding: .3em .8em; }
  .brand span { font-size: 12px; }
  .after { padding: 0 12px 56px; }
  .doc { padding: 22px 16px 24px; }
  .after-acts .btn-go { flex: 1 1 100%; }
  .tabs button { padding: 8px 12px; }

  .deck { font-size: 14px; }
  .slide { display: block; overflow-y: auto; overflow-x: hidden; padding: 12px 16px 124px; -webkit-overflow-scrolling: touch; }
  .s-head { font-size: 11.5px; gap: 2px 10px; letter-spacing: .04em; }
  .s-tag { display: none; }
  .s-title { font-size: 1.72em; }
  .s-lead { font-size: 1.05em; }
  .s-foot { margin-top: 18px; font-size: 11px; }
  .cover { height: auto; min-height: 70vh; padding-left: 16px; margin: 12px 0; }
  .cv-title { font-size: 2.5em; } .cv-agenda { margin-top: 1.6em; gap: .5em 1.2em; } .cv-agenda b { font-size: 1.1em; } .cv-note { margin-top: 1.6em; font-size: 1em; }
  .cv-hint kbd { display: none; }
  .path-leg { grid-template-columns: minmax(0, 1fr); } .path-leg b { font-size: 1.6em; }
  .goal-say { font-size: 1.2em; }
  .tbl { font-size: .92em; } .tbl th, .tbl td { padding: .4em .35em; } .now-tbl { font-size: .9em; }
  .s-now .block { overflow-x: auto; }
  .pcols { grid-template-columns: minmax(0, 1fr); gap: 1.3em; }
  .pcol.focus { transform: none; }
  .rb { grid-template-columns: minmax(0, 1fr); }
  .rb-bar.now { height: 3em; } .rb-bar.now .rib-s b { padding: 0 .4em; }
  .rb-row { grid-template-columns: 2.4em minmax(0, 1fr); gap: .4em; } .rb-leg { margin-left: 0; gap: .2em 1.2em; display: grid; } .rb-leg li { flex-wrap: wrap; white-space: normal; } .rb-leg em { min-width: 0; } .rb-tgt { margin-left: 0; }
  .rb-meter { flex-wrap: wrap; gap: .3em .9em; } .rb-track { order: 3; flex: 1 1 100%; }
  .gw-row { gap: .6em 1em; } .gw-x { margin-left: 0; } .gw-step b { min-width: 6.4em; } .gw-step button { width: 44px; min-height: 40px; } .wi-chip { position: static; display: inline-block; margin-bottom: .5em; white-space: normal; }
  .sec-tools { margin-left: 0; flex: 1 1 100%; }
  .doc-uw { grid-template-columns: minmax(0, 1fr); }
  .dt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; } .dt-hint { display: block; font-size: 12px; color: var(--mute); margin: 6px 0 0; } .dt-wrap > .dt { min-width: 540px; } .dt-wrap > .dt.xw { min-width: 780px; } .dt.xw td:first-child { min-width: 9em; }
  .doc-side { padding: 14px 12px 18px; }
  .hd-next { justify-content: stretch; } .hd-next .btn-hand { width: 100%; }
  .cl-h { padding: 9px 10px; } .cl-b { padding: 2px 10px 12px; }
  .rb-stage, .rb-slips { padding: 1em; }
  .rb-slips { overflow-x: auto; }
  .btn-ctl kbd, .btn-hand kbd { display: none; }
  .nx-points li { font-size: 1.15em; } .btn-hand { font-size: 1.1em; width: 100%; justify-content: center; }
  .chrome { flex-wrap: wrap; height: auto; min-height: 96px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); gap: 6px; font-size: 13px; background: var(--paper); box-shadow: 0 -6px 18px rgba(27, 35, 51, .08); }
  .ch-agenda, .ch-full, .ch-btn[data-act="help"], .ch-clock { display: none; }
  .ch-end { margin-left: auto; }
  .ch-pos { display: inline; flex: 1 1 auto; text-align: center; overflow: hidden; text-overflow: ellipsis; }
  .ch-btn { width: 44px; height: 40px; border-color: var(--hair); background: var(--sheet); }
  .ch-gap { flex: 1 1 100%; height: 0; }
  .ch-focus button, .ch-q, .ch-end { min-height: 38px; }
  .ch-focus kbd, .ch-q kbd { display: none; }
  .ch-clock { margin-left: auto; }
  .tray { bottom: 110px; width: calc(100vw - 24px); }
  .tray-cards { grid-template-columns: minmax(0, 1fr); gap: .7em; }
  .qcard { min-height: 0; padding: .9em 1em; } .qcard:nth-child(n) { transform: none; } .qcard q { font-size: 1.25em; }
  .qsheet { inset: 0; border: 0; display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .qs-head { position: sticky; top: 0; z-index: 3; background: var(--sheet); padding: 10px 14px; gap: 8px; } .qs-head h2 { font-size: 1.45em; }
  .qs-body { overflow: visible; }
  .c1 { display: flex; flex-direction: column; } .c1-r { order: -1; }
  .qs-tabs button { padding: .3em .55em; } .qs-tabs kbd { display: none; }
  .qs-x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; background: var(--sheet); }
  .qs-q { padding-right: 46px; }
  .qs-body { padding: 12px 14px; } .qs-foot { padding: 8px 14px 10px; font-size: 11px; }
  .c1, .c3 { grid-template-columns: minmax(0, 1fr); }
  .c1-bars li { grid-template-columns: 5.2em minmax(0, 1fr) 4.2em 2.6em; } .c1-fin { display: none; }
  .m-only { display: inline; } .m-hide { display: none !important; }
  /* 寬表格在手機上不硬擠：一筆一張卡，每一格前面寫欄名 */
  table.stack-m, table.stack-m tbody, table.stack-m tr { display: block; width: auto; }
  table.stack-m thead { display: none; }
  table.stack-m tr { border: 1px solid var(--line); background: var(--sheet); padding: .5em .8em; margin-top: .6em; }
  table.stack-m td { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; border: 0; border-top: 1px dotted var(--hair); padding: .32em 0; text-align: right; }
  table.stack-m td:first-child { display: block; border-top: 0; text-align: left; font-weight: 700; }
  table.stack-m td[data-th]::before { content: attr(data-th); color: var(--ink-2); font-weight: 400; text-align: left; flex: 0 1 auto; }
  .s-now .block { overflow: visible; } .rb-slips { overflow: visible; }
  .c3-hist.block { padding: 0; border: 0; background: none; } .c3-hist .tbl { font-size: 1em; }
  .c2.block { overflow: visible; padding: 0; border: 0; background: none; }
  .c2-tbl, .c2-tbl tbody, .c2-tbl tr, .c2-tbl tbody th, .c2-tbl td { display: block; width: auto; }
  .c2-tbl { min-width: 0; table-layout: auto; } .c2-tbl thead { display: none; }
  .c2-tbl tr { border: 1px solid var(--line); background: var(--paper-2); padding: .6em .9em .3em; margin-top: .7em; }
  .c2-tbl tr.focus { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
  .c2-tbl tr.focus th, .c2-tbl tr.focus td { background: none; box-shadow: none; }
  .c2-tbl tbody th { border: 0; padding: 0 0 .2em; } .c2-tbl tbody th span { display: inline; margin-right: .5em; }
  .c2-tbl td { border: 0; border-top: 1px dotted var(--hair); padding: .5em 0; overflow: hidden; }
  .c2-tbl td[data-th]::before { content: attr(data-th); display: block; font: 700 1em/1.4 var(--serif); margin-bottom: .25em; }
  .c2-tbl td > .c2-bar { height: 4.2em; }
  .board { padding: 10px 12px 8px; } .bd-row { grid-template-columns: 5.6em minmax(0, 1fr); } .bd-t { grid-column: 2; white-space: normal; } .bd-x { grid-column: 1 / -1; margin-top: 0; } .bd-lg { margin-left: 0; }
  .hd-lump { grid-template-columns: minmax(0, 1fr); }
  .ch-load { order: -1; flex: 1 1 100%; text-align: center; font-size: 12px; }
  .s-wait-acts > * { flex: 1 1 100%; justify-content: center; }
  .hand { padding: 0; place-items: stretch; }
  .hand-in { border-left: 0; border-right: 0; border-bottom: 0; padding: 18px 16px 28px; box-shadow: none; min-height: 100%; }
  .hand-gate .hand-in { display: grid; align-content: center; }
  .hand h2 { font-size: 1.6em; } .hand-gate h2 { font-size: 2.1em; }
  .hd-plans { grid-template-columns: minmax(0, 1fr); }
  .hd-acts { flex-direction: column-reverse; align-items: stretch; } .hd-acts > * { justify-content: center; }
  .btn-hold { font-size: 1.1em; }
  .hd-fine { text-align: left; }
  .sheet { padding: 1.2em 1.1em; }
  .hp dt { flex-basis: 6.5em; }
  .toast { bottom: 110px; }
}
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .kb-only { display: none !important; } .m-only { display: inline !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ───────── 列印：A4 直式 ───────── */
@page { size: A4 portrait; margin: 17mm 14mm 17mm; }
@media print {
  body { background: #fff !important; font-size: 11pt; }
  .top, .after-head, .tabs, .doc-side, .toast, .skip, #deck, .dt-hint { display: none !important; }
  .after { max-width: none; padding: 0; margin: 0; }
  .doc { display: none !important; border: 0; box-shadow: none; padding: 0; font-size: 10pt; }
  body[data-print="record"] #doc-record, body[data-print="proposal"] #doc-proposal, body:not([data-print]) .doc:not([hidden]) { display: block !important; }
  .doc-uw figure, .doc-goal, .doc-key { break-inside: avoid; }
  .dt.keep, .doc-ul li { break-inside: avoid; }
  .doc .receipt { break-inside: auto; } .doc .receipt dl div, .doc .receipt-note { break-inside: avoid; }
  .doc-end .legal { font-size: 7.5pt; line-height: 1.45; } .doc-end { padding-top: 6px; }
  .no-print { display: none !important; }
  .doc-q { break-after: avoid; } button.nv { border: 0; }
  .doc-reply, .doc p:has(+ .dt-wrap), .doc p:has(+ .doc-uw), .doc p:has(+ .receipt) { break-after: avoid; }
  .doc-uw .uw-t { font-size: 15px; } .doc-uw .uw-t.tol { font-size: 15px; }
  .doc h2 + p, .doc h2 + .dt-wrap, .doc h2 + svg { break-before: avoid; }
  .doc .receipt-more[open] > summary { list-style: none; }
  .doc-uw { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px; break-inside: avoid; }
  .dt-wrap { overflow: visible !important; } .dt-wrap > .dt { min-width: 0 !important; }
  .doc section { overflow: visible; break-inside: auto; }
  .doc h2 { break-after: avoid; }
  .dt { font-size: 8.5pt; } .dt tr { break-inside: avoid; } .dt thead { display: table-header-group; }
  .dt .trace { font-size: 7pt; }
  .receipt { break-inside: avoid; box-shadow: none; }
  .verify, .dt .v { display: none !important; }
}
