/* 存錢時光機 — 手機直式、一次只看一張卡。亮色、圓潤、像桌遊的出牌感。
   紅與綠只留給台股的漲（紅）與跌（綠）；介面自己的顏色是靛藍與太陽黃。 */
:root {
  --bg: #FFF4DC; --card: #FFFFFF; --soft: #F7F2E6; --line: #EAE2D0;
  --ink: #1D2A4D; --muted: #66708A; --gray: #A5ADBD;
  --pri: #3B5BDB; --pri-deep: #2A43AE; --pri-tint: #E9EEFF;
  --sun: #FFC533; --sun-deep: #E0A100; --sun-tint: #FFF1C2; --sun-ink: #7A5600;
  --up: #D63B30; --down: #1E8E5A; --err: #B42318;
  --r: 24px; --ease: cubic-bezier(.2, .7, .3, 1);
  --sans: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: .01em; }
h2 { font-size: 20px; line-height: 1.4; font-weight: 800; }
button, input { font-family: inherit; font-variant-numeric: inherit; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
svg { flex: none; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); }

/* ── 骨架：桌機把手機畫面置中 ── */
.desk { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.side { display: none; }
.phone { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.top { flex: none; height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px 0 10px; }
.scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.stage { padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 12px; outline: none; min-width: 0; }
.dock { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 2px solid var(--line); }
.legal { padding: 6px 18px 22px; font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.legal p { margin: 0 0 4px; }
.si-legal-main { font-weight: 700; color: var(--ink); }
.si-legal-demo { background: var(--sun-tint); color: var(--sun-ink); border-radius: 8px; padding: 4px 8px; font-weight: 700; }

.brand { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 6px; border: 0; background: none; font-size: 17px; font-weight: 800; color: var(--ink); cursor: pointer; border-radius: 12px; }
.brand svg { width: 28px; height: 28px; }
.modechip { position: relative; min-height: 34px; padding: 4px 12px 4px 26px; border: 0; border-radius: 999px; font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.modechip::before { content: ""; position: absolute; left: 10px; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translateY(-50%); }
.modechip.demo { background: var(--sun-tint); color: var(--sun-ink); } .modechip.demo::before { background: var(--sun-deep); }
.modechip.live { background: var(--pri-tint); color: var(--pri-deep); } .modechip.live::before { background: var(--pri); }

.dock button { position: relative; min-width: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.dock svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dock button.on { color: var(--pri-deep); }
.dock button.on::before { content: ""; position: absolute; top: -2px; left: 28%; right: 28%; height: 4px; border-radius: 0 0 4px 4px; background: var(--pri); }
.dock button:focus-visible { outline-offset: -4px; }

@media (min-width: 900px) {
  body { background: radial-gradient(900px 600px at 18% 12%, #FFE7A8 0, transparent 60%), radial-gradient(800px 600px at 88% 90%, #DCE4FF 0, transparent 60%), var(--bg); }
  .desk { grid-template-columns: minmax(0, 1fr) 412px minmax(0, 1fr); align-items: center; gap: 48px; padding: 0 40px; }
  .side { display: block; }
  .side-l { justify-self: end; max-width: 330px; }
  .side-r { justify-self: start; max-width: 280px; }
  .phone { height: min(860px, calc(100vh - 36px)); border: 10px solid var(--ink); border-radius: 46px; overflow: hidden; box-shadow: 0 30px 80px rgba(29, 42, 77, .28); }
  .top { padding-top: 4px; }
}
.side-eyebrow { font-size: 13px; font-weight: 800; color: var(--pri-deep); letter-spacing: .06em; }
.side-title { margin-top: 8px; font-size: 68px; line-height: 1.04; font-weight: 900; }
.side-lead { margin-top: 18px; font-size: 17px; }
.side-steps { list-style: none; counter-reset: s; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.side-steps li { counter-increment: s; position: relative; padding-left: 42px; font-size: 14.5px; }
.side-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); box-shadow: 0 3px 0 var(--sun-deep); display: grid; place-items: center; font-weight: 800; }
.side-steps b { display: block; font-size: 15.5px; }
.side-keys { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
kbd { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 6px; background: #fff; box-shadow: 0 2px 0 var(--line); font: 12px var(--mono); }
.side-note { margin-top: 20px; font-size: 12.5px; color: var(--muted); }

/* ── 共用零件 ── */
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: 0 3px 0 var(--line), 0 12px 30px rgba(29, 42, 77, .06); min-width: 0; }
.eyebrow { font-size: 12.5px; font-weight: 800; color: var(--pri-deep); letter-spacing: .04em; }
.lead { margin-top: 10px; font-size: 14.5px; }
.cap { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.fine { margin-top: 10px; font-size: 12px; color: var(--muted); }
.fine a { color: var(--pri-deep); font-weight: 700; }
.sub-h { margin-top: 14px; font-size: 13px; font-weight: 800; color: var(--muted); }
.find { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--pri-tint); font-size: 14px; line-height: 1.65; }
.warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--sun-tint); font-size: 12.5px; }
.warn svg, .tr-note svg, .saved svg, .verif svg, .btn svg, .mc-undo svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.warn svg { color: var(--sun-ink); margin-top: 1px; }
.tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0; vertical-align: 1px; white-space: nowrap; }
.tag.demo { background: var(--sun-tint); color: var(--sun-ink); box-shadow: inset 0 0 0 1px #EFD27C; }
.tag.calc { background: var(--pri-tint); color: var(--pri-deep); }
.hl-b { color: var(--ink); background: linear-gradient(transparent 60%, var(--sun) 60%); padding: 0 2px; }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn { flex: 1 1 130px; min-width: 0; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: 16px; font-size: 16px; font-weight: 800; cursor: pointer; transition: transform .08s var(--ease), box-shadow .08s var(--ease); }
.btn.pri { background: var(--pri); color: #fff; box-shadow: 0 4px 0 var(--pri-deep); }
.btn.cta { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 var(--sun-deep); font-size: 17px; min-height: 56px; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), 0 4px 0 var(--line); }
.btn:active:not(:disabled), .ch:active, .ticket:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkbtn { min-height: 36px; padding: 4px 6px; border: 0; background: none; font-size: inherit; font-weight: 800; color: var(--pri-deep); text-decoration: underline; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { min-height: 40px; padding: 5px 14px; border: 2px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.chip.on { border-color: var(--pri); background: var(--pri-tint); color: var(--pri-deep); }
.chip:disabled { opacity: .5; cursor: not-allowed; }
.chip small { display: block; font-size: 10.5px; font-weight: 500; line-height: 1.2; }
.field { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-l { font-size: 13px; font-weight: 800; color: var(--muted); }
.inp { width: 100%; min-width: 0; min-height: 46px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font-size: 16px; color: var(--ink); }
.inp:focus { border-color: var(--pri); outline: none; }
.inp:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.inp:disabled { background: var(--soft); color: var(--muted); }
.err { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--err); }
.err:empty { display: none; }
.mascot { display: block; width: 56px; height: 56px; }

.tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 2px 0 var(--line); }
.tabs button { flex: 1 1 0; min-width: 0; min-height: 36px; padding: 4px 2px; border: 0; border-radius: 999px; background: transparent; font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button.on { background: var(--ink); color: #fff; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pg { min-width: 92px; min-height: 44px; padding: 6px 14px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 var(--line); font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-n { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.again { text-align: center; }

.loading, .launch { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 18px; text-align: center; }
.loading p, .launch p { font-size: 14px; color: var(--muted); }
.launch-sub { font-size: 12.5px !important; }
.spinner { width: 44px; height: 44px; margin-bottom: 6px; border: 5px solid var(--pri-tint); border-top-color: var(--pri); border-radius: 50%; animation: spin .9s linear infinite; }
.skeleton { display: grid; place-items: center; height: 190px; margin-top: 12px; border-radius: 16px; background: var(--soft); font-size: 13px; color: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
.errwrap { margin-top: 12px; }
.errcard h2 { font-size: 18px; }
.si-error { padding: 10px 12px; border-left: 5px solid var(--err); border-radius: 12px; background: #FDEEEA; font-size: 13.5px; }
.si-error b { display: block; font-size: 14.5px; }
.si-error p { margin-top: 4px; }
.si-error ul { margin: 4px 0 0; padding-left: 18px; }
.si-error-trace { font: 11px var(--mono); color: var(--muted); }

/* ── 封面 ── */
.hero-top { display: flex; align-items: center; gap: 14px; }
.hero-txt { min-width: 0; }
.dial { position: relative; flex: none; width: 104px; height: 104px; }
.dial > svg:first-child { display: block; width: 100%; height: 100%; }
.dial .dial-m { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -52%); }
.dial-hand { transform-origin: 60px 60px; animation: spin 16s linear infinite; }
.dial.spin .dial-hand { animation-duration: 1.1s; animation-direction: reverse; }
.launch .dial { width: 148px; height: 148px; margin-bottom: 8px; } .launch .dial .dial-m { width: 80px; height: 80px; }
.say { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 54px; margin-top: 12px; padding: 10px 14px; border: 2px dashed #D9CDB0; border-radius: 16px; background: var(--soft); font-size: 15.5px; line-height: 1.7; color: var(--ink); text-align: left; cursor: pointer; }
.say span { min-width: 0; }
.say svg { width: 20px; height: 20px; fill: none; stroke: var(--pri); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tok { font-weight: 800; color: var(--pri-deep); border-bottom: 2px solid var(--pri); white-space: nowrap; }
.say-sub { margin: 6px 2px 0; font-size: 12.5px; color: var(--muted); }
.tix h2 { margin: 2px 4px 10px; font-size: 15.5px; }
.tix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.ticket { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; min-height: 78px; padding: 10px 12px 10px 14px; border: 0; border-left: 7px solid var(--pri); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--line); color: var(--ink); text-align: left; cursor: pointer; transition: transform .08s var(--ease), box-shadow .08s var(--ease); }
.ticket::after { content: ""; position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); transform: translateY(-50%); }
.ticket b { font-size: 15.5px; line-height: 1.35; }
.ticket small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.ticket.blind { background: var(--ink); color: #fff; border-left-color: var(--sun); box-shadow: 0 4px 0 #0E1730; }
.ticket.blind small { color: #C9D1E6; }
.ticket:disabled { opacity: .6; cursor: not-allowed; }
.tk-tag { position: absolute; right: 12px; top: -9px; padding: 0 9px; border-radius: 999px; background: var(--sun); font-size: 11px; font-weight: 800; color: var(--ink); }
.tix-note { margin: 10px 4px 0; font-size: 12px; color: var(--muted); }

/* ── 逐月出牌 ── */
.mc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mc-no { padding: 2px 12px; border-radius: 999px; background: var(--ink); font-size: 14px; font-weight: 800; color: #fff; white-space: nowrap; }
.mc-no b { font-size: 17px; color: var(--sun); } .mc-no small { font-weight: 500; opacity: .75; }
.mc-when { flex: 1 1 60px; min-width: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.mc-undo { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 10px; border: 0; border-radius: 12px; background: var(--soft); font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.mc-undo:disabled { opacity: .35; cursor: default; }
.stamps { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin: 12px 0 0; padding: 0; }
.st { display: grid; place-items: center; height: 22px; border-radius: 7px; background: var(--soft); font-size: 10.5px; font-weight: 800; color: #B9AF98; }
.st.now { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); }
.st.c0 { background: #fff; box-shadow: inset 0 0 0 2px var(--gray); color: var(--gray); }
.st.c1 { background: var(--pri); color: #fff; }
.st.c2 { background: var(--sun); color: var(--ink); }
.mc-toast { min-height: 20px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.news { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px; border-radius: 18px; background: var(--soft); }
.news-m .mascot { width: 68px; height: 68px; }
.news-t { min-width: 0; }
.news-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.news-v { font-size: 34px; line-height: 1.15; font-weight: 800; }
.news-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.news-tags span { padding: 1px 9px; border-radius: 999px; background: #fff; font-size: 11.5px; font-weight: 700; }
.jar { margin-top: 12px; }
.jar-h { font-size: 14px; font-weight: 800; } .jar-h small { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.jar-empty { margin-top: 4px; font-size: 14px; color: var(--muted); }
.jb { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin-top: 5px; font-size: 13px; }
.jb i { display: block; height: 14px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.jb em { display: block; height: 100%; border-radius: 999px; background: var(--ink); opacity: .8; }
.jb.now.up em { background: var(--up); opacity: 1; } .jb.now.down em { background: var(--down); opacity: 1; } .jb.now.flat em { background: var(--gray); opacity: 1; }
.jb b { min-width: 62px; font-size: 14px; text-align: right; }
.jar-pnl { margin-top: 6px; font-size: 15px; font-weight: 800; }
.ask { margin: 14px 0 8px; font-size: 16px; font-weight: 800; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ch { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 76px; padding: 8px 4px; border: 0; border-radius: 18px; cursor: pointer; transition: transform .08s var(--ease), box-shadow .08s var(--ease); }
.ch b { font-size: 19px; font-weight: 800; line-height: 1.3; } .ch small { font-size: 12px; font-weight: 700; opacity: .9; }
.ch kbd { display: none; }
.ch.skip { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--gray), 0 4px 0 var(--gray); }
.ch.keep { background: var(--pri); color: #fff; box-shadow: 0 4px 0 var(--pri-deep); }
.ch.more { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 var(--sun-deep); }
@media (min-width: 900px) { .ch kbd { display: block; position: absolute; top: 6px; right: 6px; margin: 0; opacity: .75; color: var(--ink); } }
.mc-foot { margin-top: 12px; font-size: 13px; }
.mc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.mc-tags .tag { margin-left: 0; } .mc-tags .fine { margin-top: 0; }

/* ── 成績單 ── */
.reveal { margin-top: 4px; font-size: 19px; line-height: 1.4; } .reveal b { font-weight: 800; }
.r-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.attend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 18px; background: var(--soft); }
.attend .mascot { width: 52px; height: 52px; }
.att-t { flex: 1 1 110px; min-width: 0; } .att-t p { font-size: 13px; font-weight: 700; }
.att-n { font-size: 15px !important; } .att-n b { font-size: 30px; line-height: 1; color: var(--pri); }
.att-badge { padding: 3px 11px; border-radius: 999px; background: var(--sun); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.lanes { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.l-you { --c: var(--pri); } .l-base { --c: var(--ink); } .l-rule { --c: var(--sun-deep); }
.lane { padding: 7px 10px 6px; border-left: 6px solid var(--c); border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.lane-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.lane-top b { font-size: 14.5px; } .lane-ret { font-size: 15px; font-weight: 800; }
.lane-dots { display: block; width: 100%; height: auto; margin: 2px 0; }
.lane-line { stroke: var(--line); stroke-width: 2; }
.lane-dots .d1 { fill: var(--c); } .lane-dots .d0 { fill: #fff; stroke: var(--gray); stroke-width: 1.6; stroke-dasharray: 2.5 2; }
.lane-sub { font-size: 12px; color: var(--muted); }
.lane-key { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.verif { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 10px; padding: 8px 12px; border: 0; border-radius: 14px; font-size: 12.5px; font-weight: 700; line-height: 1.5; text-align: left; cursor: pointer; }
.verif.ok { background: var(--pri-tint); color: var(--pri-deep); } .verif.bad { background: var(--sun-tint); color: var(--sun-ink); }
.sbars { list-style: none; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; height: 128px; margin: 12px 0 0; padding: 0; }
.sb { display: grid; grid-template-rows: 14px minmax(0, 1fr) 16px; justify-items: center; min-width: 0; height: 100%; }
.sb i { align-self: end; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--pri); }
.sb.c0 i { background: repeating-linear-gradient(-45deg, #D5DAE4 0 4px, #EDF0F5 4px 8px); } .sb.c2 i { background: var(--sun); }
.sb em { font-style: normal; font-size: 10px; font-weight: 800; line-height: 14px; color: var(--muted); }
.sb span { font-size: 10.5px; line-height: 16px; color: var(--muted); }
.costs { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cost { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 7px 10px; border-left: 6px solid var(--c); border-radius: 10px; background: var(--soft); font-size: 13px; }
.cost span { flex: 1 1 96px; min-width: 0; font-weight: 700; } .cost b { font-size: 14.5px; } .cost small { color: var(--muted); }
.laters { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.later { padding: 8px 10px; border-left: 6px solid var(--c); border-radius: 12px; background: var(--soft); }
.later b { font-size: 14px; }
.later p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 2px; font-size: 13px; }
.later i { margin-left: 6px; font-style: normal; font-weight: 800; }
.later .arrow { color: var(--muted); }
.plans { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 56px; padding: 10px 12px 10px 40px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); text-align: left; cursor: pointer; }
.plan::before { content: ""; position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--gray); }
.plan.on { background: var(--pri-tint); box-shadow: inset 0 0 0 2.5px var(--pri); }
.plan.on::before { box-shadow: inset 0 0 0 5.5px var(--pri); }
.plan b { font-size: 15px; } .plan small { font-size: 12.5px; line-height: 1.55; color: var(--muted); }
.plan:disabled { opacity: .5; cursor: not-allowed; }
.shot { margin-top: 10px; border-radius: 16px; overflow: hidden; background: var(--soft); box-shadow: 0 2px 0 var(--line), 0 8px 24px rgba(29, 42, 77, .12); }
.shot canvas { display: block; width: 100%; height: auto; }
.linkout { margin-top: 6px; font-size: 13px; }
.recon { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 12.5px; }
.recon th, .recon td { padding: 7px 3px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: bottom; }
.recon th[scope=row] { text-align: left; font-weight: 700; }
.recon thead th { font-size: 11.5px; font-weight: 700; line-height: 1.35; color: var(--muted); }
.recon td.ok { font-weight: 800; color: var(--pri-deep); white-space: nowrap; } .recon td.bad { font-weight: 800; color: var(--err); white-space: nowrap; }
.vlinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vlink { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 5px 12px; border-radius: 12px; background: var(--pri-tint); font-size: 13px; font-weight: 800; color: var(--pri-deep); text-decoration: none; }
.vlink small { font: 500 10.5px var(--mono); color: var(--muted); }
.vlink.inline { display: inline-flex; min-height: 0; margin-left: 6px; padding: 0 9px; border-radius: 999px; font-size: 12px; vertical-align: 1px; }
.rules { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }

/* ── 今天（回訪卡）── */
.saved { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; padding: 9px 12px; border-radius: 14px; background: var(--pri-tint); font-size: 13px; font-weight: 700; color: var(--pri-deep); }
.ans { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ans .mascot { width: 64px; height: 64px; }
.ans > div { min-width: 0; }
.ans-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.ans h1 { font-size: 26px; }
.ans-say { margin-top: 10px; font-size: 14px; }
.ans-items { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; }
.ans-items li { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: var(--sun-tint); font-size: 13px; }
.ans-meta { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.tdiv { height: 2px; margin-top: 14px; border-radius: 2px; background: var(--line); }
.ichips { margin-top: 8px; }
.tr-name { margin-top: 6px; font-size: 14.5px; font-weight: 800; }
.tr-wait { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.trial { margin-top: 8px; }
.trial.waiting { display: flex; align-items: center; gap: 12px; }
.count { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: var(--sun); box-shadow: 0 4px 0 var(--sun-deep); }
.count b { font-size: 30px; line-height: 1.05; } .count span { font-size: 12px; font-weight: 700; }
.tr-body { min-width: 0; } .tr-body p { font-size: 13.5px; }
.tr-will { margin-top: 4px; color: var(--muted); }
.mstamps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.mstamps li { flex: 1 1 46px; display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 6px 4px; border-radius: 12px; background: var(--pri-tint); font-size: 11.5px; line-height: 1.4; color: var(--pri-deep); }
.mstamps li b { font-size: 13px; } .mstamps svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mstamps li.next { background: #fff; box-shadow: inset 0 0 0 2px var(--sun-deep); color: var(--ink); } .mstamps em { font-style: normal; font-size: 11px; font-weight: 800; }
.tr-this { margin-top: 10px; font-size: 14px; font-weight: 700; }
.tr-nums, .ends { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.tr-nums div, .ends div { min-width: 0; padding: 7px 8px; border-radius: 12px; background: var(--soft); }
.tr-nums span, .ends span { display: block; font-size: 11.5px; color: var(--muted); } .tr-nums b, .ends b { display: block; font-size: 15px; } .tr-nums small { font-size: 11px; }
.tr-official { margin-top: 8px; font-size: 12px; color: var(--muted); } .tr-official span { margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--soft); font-weight: 700; }
.tr-brief { margin-top: 8px; padding-left: 10px; border-left: 3px solid var(--line); font-size: 12.5px; color: var(--muted); }
.tr-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--sun-ink); }
.dlist { list-style: none; margin: 8px 0 0; padding: 0; } .dlist li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; } .dlist small { color: var(--muted); }
.tcard .si-cta-list { margin-top: 12px; padding: 12px 14px; }

/* ── 時光機（存錢山）── */
.hcard .chips, .gcard .chips { margin-top: 10px; }
.field .chips { margin-top: 0; }
.hillsvg { display: block; width: 100%; height: auto; margin-top: 12px; overflow: visible; }
.hbase { stroke: var(--line); stroke-width: 2; }
.hl { font: 10px var(--sans); fill: var(--muted); }
.hc { cursor: pointer; outline: none; }
.hc .hit { fill: transparent; }
.hc .inv { fill: var(--sun); } .hc .gain { fill: var(--pri); } .hc .short { fill: none; stroke: var(--down); stroke-width: 1.5; stroke-dasharray: 3 2; }
.hc .flag { fill: var(--ink); stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.hc.on .hit { fill: rgba(29, 42, 77, .07); }
.hc:focus-visible .hit { stroke: var(--ink); stroke-width: 2; }
.stage.enter .hc { transform-box: fill-box; transform-origin: 50% 100%; animation: rise .5s var(--ease) both; }
.legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.lg { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
.lg.inv { background: var(--sun); } .lg.gain { background: var(--pri); } .lg.short { border: 1.5px dashed var(--down); } .lg.flag { border-radius: 1px 5px 5px 1px; background: var(--ink); }
.lg.band { background: #CBD6FF; } .lg.med { height: 3px; background: var(--pri); vertical-align: 3px; } .lg.invl { height: 3px; background: var(--gray); vertical-align: 3px; }
.hill-detail { margin-top: 8px; padding: 7px 10px; border-radius: 10px; background: var(--soft); font-size: 13px; font-weight: 700; }
.hard-top { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.hard-top .mascot { width: 72px; height: 72px; } .hard-top > div { min-width: 0; } .hard-top p { margin-top: 2px; font-size: 14px; }
.miles { list-style: none; display: flex; flex-direction: column; gap: 7px; margin: 12px 0 0; padding: 0; }
.miles li, .miles-ref { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; }
.miles i, .miles-ref i { display: block; height: 16px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.miles em { display: block; height: 100%; border-radius: 999px; background: var(--pri); }
.miles-ref { margin-top: 10px; color: var(--muted); } .miles-ref em { display: block; height: 100%; border-radius: 999px; background: var(--gray); }
.miles b, .miles-ref b { min-width: 58px; font-size: 13px; text-align: right; }

/* ── 目標 ── */
.mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.mini .inp { width: 74px; min-height: 40px; padding: 4px 8px; text-align: right; }
.goal-pre { color: var(--muted); font-size: 13.5px; }
.goal-text { margin-top: 16px; font-size: 24px; font-weight: 800; line-height: 1.35; } .goal-text.off { font-size: 16px; color: var(--muted); }
.gdots { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin: 10px 0 0; padding: 0; }
.gd { display: grid; place-items: center; width: 100%; min-height: 30px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; cursor: pointer; }
.gd.on { background: var(--sun); box-shadow: 0 2px 0 var(--sun-deep); color: var(--ink); } .gd.off { background: #fff; box-shadow: inset 0 0 0 2px var(--gray); }
.gd.sel { outline: 3px solid var(--ink); outline-offset: 1px; }
.gd svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fan { display: block; width: 100%; height: auto; margin-top: 12px; }
.fan .band { fill: #CBD6FF; opacity: .75; } .fan .med { fill: none; stroke: var(--pri); stroke-width: 2.5; stroke-linejoin: round; } .fan .inv { fill: none; stroke: var(--gray); stroke-width: 2; stroke-dasharray: 4 3; }
.fan .tgt { stroke: var(--sun-deep); stroke-width: 2; stroke-dasharray: 6 4; } .fan .tgt-t { font: 800 10.5px var(--sans); fill: var(--sun-ink); }
.stale { margin-top: 12px; padding: 9px 12px; border-radius: 12px; background: var(--sun-tint); font-size: 13px; font-weight: 700; }

/* ── 設定視窗（從下面滑上來）── */
dialog.sheet { width: min(420px, 100vw); max-width: 100vw; max-height: 88vh; max-height: 88dvh; margin: auto auto 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); border: 0; border-radius: 26px 26px 0 0; background: #fff; color: var(--ink); overflow: auto; }
dialog.sheet::backdrop { background: rgba(29, 42, 77, .5); }
@media (min-width: 900px) { dialog.sheet { margin: auto; border-radius: 26px; } }
.sheet h2 { margin-bottom: 6px; }
.sheet p { margin-top: 8px; font-size: 14px; }
.sheet .field-l { margin-top: 14px; margin-bottom: 6px; display: block; }
.sheet .fine { font-size: 12px; } .sheet .cap { font-size: 12.5px; } .sheet .err { font-size: 13px; }
.amt { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; } .amt .inp { flex: 1 1 auto; }
.warnbox { padding: 9px 12px; border-radius: 12px; background: var(--sun-tint); font-size: 13px !important; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .6; } }
@keyframes cardin { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.stage.enter > * { animation: cardin .26s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── 第二輪調整 ── */
.chips.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.chips.seg .chip { padding: 5px 2px; font-size: 13.5px; text-align: center; }
.key { display: inline-block; width: 11px; height: 11px; margin: 0 4px 0 8px; border-radius: 3px; vertical-align: -1px; }
.key.k0 { background: repeating-linear-gradient(-45deg, #C9CFDB 0 3px, #EDF0F5 3px 6px); } .key.k2 { background: var(--sun); }
.sb em { font-size: 9.5px; font-weight: 700; color: var(--ink); }
.gd { font-size: 10.5px; font-weight: 800; }
.gd.off { color: var(--gray); }
.attend { padding: 8px 12px; } .attend .mascot { width: 46px; height: 46px; }
.lane { padding: 6px 10px 5px; }
.lanes { gap: 6px; }
.tr-px { margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.tcard .si-cta-list { margin-top: 0; padding: 0; border: 0; background: none; }
.tcard .si-cta-list h3 { font-size: 18px; }
.vlink.inline { background: #fff; box-shadow: inset 0 0 0 1.5px var(--pri); white-space: nowrap; }
.att-n { font-weight: 800 !important; }
.linkbtn.quiet { font-weight: 700; color: var(--muted); font-size: 13px; }
.tcard .dlist + .fine + #cta-slot .si-cta-list { margin-top: 14px; }
.hero-more { margin-top: 4px; }
.hero-more .linkbtn { padding-left: 2px; font-size: 13px; text-align: left; line-height: 1.5; }
button.vlink { border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.fine .linkbtn { padding-left: 0; }
.ends.life { margin-top: 10px; }
.attend { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 0 10px; }
.attend .mascot { grid-row: 1 / span 2; }
.attend .att-n { grid-column: 2; font-size: 16px !important; line-height: 1.1; }
.attend .att-badge { grid-column: 3; justify-self: end; }
.attend .att-s { grid-column: 2 / span 2; font-size: 13px; font-weight: 700; }
/* 封面的指針一秒跳一格（像時鐘），不連續重畫；出發時才快轉 */
.dial-hand { animation: spin 60s steps(60) infinite; }
.dial.spin .dial-hand { animation: spin 1.1s linear infinite reverse; }
.tcard #cta-slot .si-cta-list { margin-top: 20px; }

/* ══════════ 第二輪（r2）：回訪卡重寫、分享成績單、術語、列印 ══════════ */
.print-only { display: none; }
.modechip.down { background: #FDEEEA; color: var(--err); } .modechip.down::before { background: var(--err); }
.dock button.has svg { position: relative; }
.dock button.has::after { content: ""; position: absolute; top: 9px; left: calc(50% + 9px); width: 9px; height: 9px; border-radius: 50%; background: var(--sun-deep); box-shadow: 0 0 0 2px #fff; }

/* 封面：第二個入口「值得開始嗎」、有條件時的提示列、分享連結的說明卡 */
.worth { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-top: 12px; padding: 10px 12px 10px 14px; border: 0; border-radius: 18px; background: var(--sun); box-shadow: 0 4px 0 var(--sun-deep); color: var(--ink); text-align: left; cursor: pointer; transition: transform .08s var(--ease), box-shadow .08s var(--ease); }
.worth:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-deep); }
.worth svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.worth svg:last-child { width: 20px; height: 20px; }
.worth span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.worth b { font-size: 15.5px; line-height: 1.4; } .worth small { font-size: 12px; line-height: 1.45; }
.tix-note { margin-top: 8px; }
.notebar { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-radius: 16px; background: var(--pri-tint); color: var(--pri-deep); font-size: 13.5px; font-weight: 800; text-align: left; cursor: pointer; }
.notebar span { flex: 1 1 auto; min-width: 0; }
.notebar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.linknote h2 { font-size: 18px; margin-top: 2px; }
.linknote .stamps { margin-top: 10px; }

/* 出牌卡：大盤位置自己一列，標明是 6 日；名詞小卡 */
.news-k small { display: block; font-size: 11.5px; font-weight: 500; line-height: 1.3; }
.mkt { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; padding: 9px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 13.5px; }
.mkt-d { flex: none; min-width: 44px; padding: 3px 0; border-radius: 9px; background: var(--ink); color: #fff; font-size: 12.5px; text-align: center; line-height: 1.5; }
.mkt span { min-width: 0; } .mkt span b { font-weight: 800; }
.mkt small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.gloss { margin-top: 10px; border-radius: 12px; background: var(--soft); font-size: 12.5px; }
.gloss summary { min-height: 40px; padding: 9px 12px; font-weight: 700; color: var(--pri-deep); cursor: pointer; }
.gloss dl { margin: 0; padding: 0 12px 10px; }
.gloss dt { margin-top: 6px; font-weight: 800; } .gloss dd { margin: 0; color: var(--muted); line-height: 1.6; }
.gloss .rules { padding: 0 12px 10px 28px; margin: 0; }

/* 成績單 */
.find.soft { background: var(--soft); font-size: 13px; }
.tag.ro { background: var(--ink); color: #fff; }
.ro-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 9px 12px; border-radius: 12px; background: var(--sun-tint); font-size: 12.5px; font-weight: 700; color: var(--sun-ink); }
.ro-note svg { width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aibox { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
.aibox .btn { width: 100%; } .aibox .fine { margin-top: 8px; }
#iname-hint:empty { display: none; }

/* 「驗」：夠大的按鈕（手機至少 44px 高），先講會開另一個工具 */
.vbtn { display: inline-flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 6px 14px; border: 0; border-radius: 14px; background: var(--pri-tint); box-shadow: inset 0 0 0 2px var(--pri); color: var(--pri-deep); font-size: 14px; text-align: left; cursor: pointer; }
.vbtn b { font-weight: 800; } .vbtn small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.vlinks .vbtn { flex: 1 1 140px; min-width: 0; } .vlinks .vbtn small { font-family: var(--mono); font-size: 10.5px; overflow-wrap: anywhere; }
.vrow { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--line); }
.vrow .vbtn { width: 100%; } .vrow .fine { margin-top: 6px; }

/* 回訪卡 */
.tr-plan { margin-top: 2px; font-size: 13px; color: var(--muted); }
.count.wait { background: var(--pri-tint); box-shadow: 0 4px 0 #C9D4FF; color: var(--pri-deep); }
.count.wait b { font-size: 22px; }
.mstamps li.wait { background: #fff; box-shadow: inset 0 0 0 2px var(--pri); color: var(--pri-deep); }
.tr-note span { font-weight: 700; }
.tcard .skeleton { height: 150px; padding: 0 16px; text-align: center; }
.ans-items li b { overflow-wrap: anywhere; }

/* 桌機：確認視窗與設定視窗不超出手機框 */
@media (min-width: 900px) {
  dialog.si-cta, dialog.sheet { width: 372px; max-width: 372px; }
}

/* 列印：只印內容卡與頁尾（警語、來源、資料日期），不印導覽與按鈕 */
@media print {
  html, body { height: auto; overflow: visible; background: #fff; }
  body { color: #000; }
  .desk { display: block; height: auto; padding: 0; }
  .side, .top, .dock, .tabs, .pager, .again, .row, .choices, .mc-undo, .mc-toast, .aibox, .vrow, .vlinks, .verif, .gloss summary, dialog { display: none !important; }
  .phone { display: block; height: auto; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: #fff; }
  .scroll { overflow: visible; }
  .stage { padding: 0; }
  .stage.enter > * { animation: none; }
  .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .gloss[open] dl, .gloss dl { display: block; }
  .print-only { display: block; margin: 0 0 8px; font-size: 10pt; font-weight: 700; }
  .legal { padding: 10px 0 0; font-size: 9.5pt; color: #000; }
  .legal p { color: #000; }
  .si-legal-demo { background: none; border: 1px solid #999; }
}

/* 平台的確認視窗套這個 app 的主題（結構、警語、固定回覆不變；只換配色與圓角） */
:root {
  --si-cta-bg: #FFFFFF; --si-cta-fg: #1D2A4D; --si-cta-muted: #66708A; --si-cta-line: #EAE2D0; --si-cta-soft: #F7F2E6;
  --si-cta-accent: #3B5BDB; --si-cta-accent-fg: #FFFFFF; --si-cta-radius: 24px;
}
.saved.done { align-items: flex-start; }
.saved.done > div { min-width: 0; }
.saved-reply { display: block; font-size: 16px; font-weight: 800; }
.saved.done p { margin-top: 2px; font-weight: 500; color: var(--ink); }
.saved.done .saved-note { font-weight: 700; }
.ans-say.lead1 { font-size: 15.5px; font-weight: 800; }
.ans-say + .ans-say { margin-top: 6px; }

/* 我設定的條件（自己畫：人話、已撤回的收成一疊） */
.mylist { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 12px 0 0; padding: 0; }
.mylist li { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font-size: 13.5px; }
.mylist li b { font-size: 15px; overflow-wrap: anywhere; } .mylist li small { color: var(--muted); }
.row.sm { margin-top: 8px; gap: 8px; } .row.sm .btn { min-height: 44px; padding: 6px 10px; font-size: 14px; }
.btn.armed { background: var(--sun-tint); box-shadow: inset 0 0 0 2px var(--sun-deep), 0 4px 0 var(--sun-deep); }
.gloss.wd { margin-top: 12px; } .gloss.wd .dlist { margin: 0; padding: 0 10px 10px; }
.gloss.wd .dlist li { background: #fff; }
.dlist { display: flex; flex-direction: column; gap: 6px; }

/* ══════════ 第三輪 ══════════ */

/* 手指按得到：會按的東西一律至少 44×44 */
.modechip { min-height: 44px; }
.tabs button { min-height: 44px; }
.chip { min-height: 44px; }
.mc-undo { min-height: 44px; min-width: 76px; justify-content: center; }
.linkbtn { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 8px 8px; text-align: left; }
.gloss summary { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; }
.mini .inp { min-height: 44px; }
.inp.linkout { min-height: 44px; }
.pg.sm { min-width: 0; min-height: 44px; padding: 4px 8px; font-size: 13px; }
.modechip.shared { background: var(--ink); color: #fff; } .modechip.shared::before { background: var(--sun); }

/* 小轉圈（正在算、正在存） */
.spin-s { display: inline-block; flex: none; width: 16px; height: 16px; margin-right: 6px; border: 3px solid #C9D4FF; border-top-color: var(--pri); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -3px; }
.btn .spin-s { margin-right: 0; }

/* 存下條件：剛存過同一個 */
.warn.dup { background: var(--pri-tint); color: var(--ink); }
.warn.dup svg { color: var(--pri-deep); }
.warn.dup > div { min-width: 0; }
.warn.dup b { display: block; font-size: 14px; }
.warn.dup p { margin-top: 2px; }

/* 朋友分享的成績單：說明、提醒、正在重算 */
.ro-note > div, .ro-note > span { min-width: 0; }
.ro-note.ok { background: var(--pri-tint); color: var(--pri-deep); }
.ro-note.bad { background: #FDEEEA; color: var(--err); }
.ro-note ul { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
.ro-note .spin-s { margin-top: 1px; }

/* 封面最上面那一格：今天要不要做事（大小固定，查到之後只換裡面的字） */
.hometoday { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 108px; padding: 12px 14px; border: 0; border-radius: var(--r); background: var(--card); box-shadow: 0 3px 0 var(--line), 0 12px 30px rgba(29, 42, 77, .06); color: var(--ink); font: inherit; text-align: left; }
button.hometoday { cursor: pointer; box-shadow: inset 0 0 0 2.5px var(--pri), 0 4px 0 var(--pri-deep); }
button.hometoday:active { transform: translateY(3px); box-shadow: inset 0 0 0 2.5px var(--pri), 0 1px 0 var(--pri-deep); }
.hometoday .mascot { width: 52px; height: 52px; }
.hometoday > span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hometoday small { font-size: 12px; font-weight: 700; color: var(--muted); }
.hometoday b { font-size: 17px; line-height: 1.35; }
.hometoday > span > span { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.hometoday em { font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--pri-deep); }
.hometoday > svg:last-child { width: 20px; height: 20px; fill: none; stroke: var(--pri-deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hometoday.wait b { color: var(--muted); animation: pulse 1.2s ease-in-out infinite; }
.hometoday.none b { font-size: 15.5px; }

/* 今天卡：兩筆以上的條件，一筆一格 */
.icards { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; padding: 0; }
.icard { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 56px; padding: 10px 12px 10px 40px; position: relative; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); color: var(--ink); font-size: 13px; line-height: 1.55; text-align: left; cursor: pointer; }
.icard::before { content: ""; position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--gray); }
.icard.on { background: var(--pri-tint); box-shadow: inset 0 0 0 2.5px var(--pri); }
.icard.on::before { box-shadow: inset 0 0 0 5.5px var(--pri); }
.icard b { font-size: 15px; overflow-wrap: anywhere; }
.icard small { font-size: 12px; color: var(--muted); }
.icard .ic-lead { font-weight: 700; }
.cap.assumed { margin-top: 4px; padding: 4px 8px; border-radius: 8px; background: var(--sun-tint); font-weight: 700; color: var(--sun-ink); }
.tr-name small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.tr-nums b small { display: block; font-weight: 700; }
.tr-px { margin-top: 8px; font-size: 13px; }

/* 存錢山：兩種算法並列、上一階下一階 */
.divs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.divs > div { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.divs > div.on { background: var(--pri-tint); box-shadow: inset 0 0 0 2px var(--pri); }
.divs span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.divs b { display: block; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.divs i { font-style: normal; font-size: 13px; font-weight: 800; }
.divs .na b { font-size: 14px; color: var(--muted); } .divs .na i { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.hstep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.hstep .hill-detail { grid-column: 1 / -1; order: -1; margin-top: 0; }

/* 目標：兩種算法並列；每一段一格（手指按得到） */
.gres { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.gres.div { margin-top: 8px; background: var(--pri-tint); }
.gres-k { font-size: 12.5px; font-weight: 800; color: var(--muted); } .gres-k small { margin-left: 6px; font-weight: 500; }
.gres .goal-text { margin-top: 2px; font-size: 19px; } .gres .goal-text.off { font-size: 14px; }
.gdots { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gd { min-height: 46px; aspect-ratio: auto; font-size: 12px; }
.gd.half { background: repeating-linear-gradient(135deg, var(--sun-tint) 0 6px, #fff 6px 12px); box-shadow: inset 0 0 0 2px var(--sun-deep); color: var(--sun-ink); }
.lg.gon { background: var(--sun); } .lg.goff { background: #fff; box-shadow: inset 0 0 0 1.5px var(--gray); }
.lg.ghalf { background: repeating-linear-gradient(135deg, var(--sun-tint) 0 3px, #fff 3px 6px); box-shadow: inset 0 0 0 1.5px var(--sun-deep); }

/* 列印（第三輪）：一張卡盡量留在同一頁；圖卡縮到一頁放得下，後面不會多出空白頁 */
@media print {
  @page { margin: 12mm; }
  .stage { display: block; }
  .stage > * { margin: 0 0 8px; }
  .scroll { display: block; height: auto; flex: none; }
  .phone, .desk, .scroll, .stage { min-height: 0 !important; max-height: none !important; }
  .card { padding: 12px 14px; }
  .shot { width: 100mm; max-width: 100%; margin: 8px auto 0; box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  .rc-4 { break-inside: avoid; }
  .hometoday, .icards button, .hstep button, .gdots button, .modechip { box-shadow: none; }
  .hstep .pg, .mylist .row { display: none !important; }
  .spin-s, .hometoday.wait b { animation: none; }
}
.gd small { font-size: 10.5px; font-weight: 700; opacity: .75; }
/* 列印：卡片太長時讓它自然跨頁（整張卡不准斷的話，第一頁會只剩頁首一行）；小區塊各自不被切開 */
@media print {
  .card { break-inside: auto; }
  .print-only { break-after: avoid; }
  .rc-4 { break-inside: avoid; }
  .gres, .ends, .tr-nums, .divs, .find, .lane, .jar, .gdots, .mstamps, .shot, .ro-note, .warn, .trial, .saved, .ans, .icard, .miles li, .dlist li, .mylist li, .hillsvg, .fan, .legend, .tr-px, .tr-note, .hero-top, .ticket, .news, .stamps, .hard-top, .gloss { break-inside: avoid; }
  .fan, .hillsvg { max-width: 130mm; margin-left: auto; margin-right: auto; }
  .gd { min-height: 26px; }
  h1, h2, .sub-h, .eyebrow { break-after: avoid; }
}
/* 封面那一格（第三輪定稿）：固定三行、固定高度，每一行都不折行 */
.hometoday { height: 86px; min-height: 0; padding: 10px 14px; }
.hometoday .mascot { width: 46px; height: 46px; }
.hometoday b { font-size: 16.5px; }
.hometoday.none b { font-size: 16.5px; }
.hometoday small, .hometoday b, .hometoday > span > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.hometoday > span > span { color: var(--pri-deep); font-weight: 700; }

/* ══════════ 第四輪 ══════════ */
/* 「上次算的；正在更新」／「已經更新」那一條 */
.memo { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--sun-tint); color: var(--sun-ink); font-size: 12.5px; font-weight: 700; line-height: 1.55; }
.memo > span { min-width: 0; }
.memo svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.memo .spin-s { margin-top: 2px; }
.memo.ok { background: var(--pri-tint); color: var(--pri-deep); }
.memo.bad { background: #FDEEEA; color: var(--err); }
.memo .linkbtn { min-height: 32px; padding: 0 4px; font-size: inherit; }
/* 封面：第二個入口緊接在封面卡下面 */
.stage > .worth { margin-top: 0; }
/* 驗：兩顆按鈕上下排 */
.vrow .vbtn + .vbtn { margin-top: 8px; }
.aibox .sub-h { margin-top: 0; }
.aibox .btn { margin-top: 8px; width: 100%; }
@media print {
  .noprint, .tcard .gloss, .hcard .gloss, .icard::before { display: none !important; }
  .icard { padding-left: 12px; }
  .hillsvg { max-width: 105mm; }
  .legal { font-size: 8.5pt; }
  .legal p { margin-bottom: 2px; }
  .memo { padding: 4px 8px; }
}
