/* 玄因 app 樣式：4B 炭銅，明暗兩套；吉凶用 B 方案（吉綠底、凶灰底紅字、大凶淡紅底）；全部字用 rem 跟 --scale */
:root {
  --bg: #F1EFEA; --surface: #FFFFFF; --sunken: #E6E3DC; --sunken-line: #E6E3DC; --line: #D6D2C9;
  --text: #1A1A1A; --text2: #3A3833; --text3: #625E56;
  --accent: #7D6229; --accent-surface: #FFFFFF; --danger: #A33A31;
  --good: #2C6A4D; --good-bg: #E7F1EB; --good-line: #BFD9CA; --bad-bg: #F7E6E3; --bad-line: #E9C3BD;
  --peach: #9C4A63; --peach-core: #F6E9EC;
  --ink: #1A1A1A; --on-ink: #F1EFEA; --scrim: rgba(26, 24, 20, 0.36); --glow: rgba(125, 98, 41, 0.38); --handle: #D6D2C9;
  --wx-red: #B23A30; --wx-purple: #6B4A78; --wx-yellow: #C9A24A; --wx-green: #4E6B48; --wx-blue: #2F4C6B; --wx-white: #F5F3EE; --wx-gold: #C2A158; --wx-black: #1A1A1A; --wx-brown: #7A5A3A;
  --sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --num: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --scale: 1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1C1C1C; --sunken: #0C0C0C; --sunken-line: #242424; --line: #2E2E2E;
    --text: #EDE8DD; --text2: #C9C4B8; --text3: #8A867C;
    --accent: #C9A962; --accent-surface: #1E1C18; --danger: #D9665C;
    --good: #74B894; --good-bg: #15241C; --good-line: #2B4636; --bad-bg: #2A1614; --bad-line: #4A2723;
    --peach: #E79AB0; --peach-core: #2A1A1F;
    --ink: #EDE8DD; --on-ink: #121212; --scrim: rgba(0, 0, 0, 0.62); --glow: rgba(201, 169, 98, 0.5); --handle: #3A3A3A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1C1C1C; --sunken: #0C0C0C; --sunken-line: #242424; --line: #2E2E2E;
  --text: #EDE8DD; --text2: #C9C4B8; --text3: #8A867C;
  --accent: #C9A962; --accent-surface: #1E1C18; --danger: #D9665C;
  --good: #74B894; --good-bg: #15241C; --good-line: #2B4636; --bad-bg: #2A1614; --bad-line: #4A2723;
    --peach: #E79AB0; --peach-core: #2A1A1F;
  --ink: #EDE8DD; --on-ink: #121212; --scrim: rgba(0, 0, 0, 0.62); --glow: rgba(201, 169, 98, 0.5); --handle: #3A3A3A; color-scheme: dark;
}

html { font-size: calc(16px * var(--scale)); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; text-wrap: pretty; overscroll-behavior: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--text); }
[hidden] { display: none !important; }

/* 舞台 */
.app { position: relative; height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; background: var(--bg); scrollbar-width: none; padding-left: max(0px, env(safe-area-inset-left, 0px)); padding-right: max(0px, env(safe-area-inset-right, 0px)); }
.screen::-webkit-scrollbar { display: none; }
.tabs { min-height: 84px; flex-shrink: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 8px calc(18px + env(safe-area-inset-bottom, 0px)); background: var(--bg); position: relative; z-index: 2; }
.tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: none; background: transparent; color: var(--text3); font-size: 0.8125rem; letter-spacing: 0.1em; transition: color .35s var(--ease); }
.tabs button[aria-current="page"] { color: var(--accent); }
.tabs svg { stroke: currentColor; transition: transform .35s var(--ease); }
.tabs button[aria-current="page"] svg { transform: translateY(-1px); }

/* 通用 */
.pad { padding: 0 24px; }
.top { padding: calc(28px + env(safe-area-inset-top, 0px)) 24px 0; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; margin-left: -12px; border: none; background: transparent; font-size: 0.8125rem; white-space: nowrap; }
.back svg { stroke: currentColor; }
h1.title { margin: 0; font-size: 1.5rem; font-weight: 500; letter-spacing: 0.06em; line-height: 1.1; text-wrap: balance; }
.eyebrow { font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--text3); }
.sub { font-size: 0.8125rem; color: var(--text3); }
.body { font-size: 1rem; font-weight: 400; line-height: 1.75; color: var(--text2); }
.headline { margin: 0; font-size: 1.3125rem; font-weight: 700; line-height: 1.45; letter-spacing: 0.02em; color: var(--text); }
.support { margin: 0; font-size: 1rem; font-weight: 400; line-height: 1.7; color: var(--text2); }
.detail { margin: 0; font-size: 0.8125rem; font-weight: 300; line-height: 1.65; color: var(--text3); }
.concl { margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.65; color: var(--text); }
.card { border-radius: 14px; background: var(--surface); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.primary { min-height: 52px; border: none; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.12em; padding: 8px 0 8px 0.12em; width: 100%; transition: background .4s var(--ease), color .4s var(--ease); }
.primary:disabled { background: var(--sunken); color: var(--text3); cursor: default; }
.secondary { min-height: 52px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 0.9375rem; letter-spacing: 0.12em; width: 100%; }
.link { min-height: 44px; border: none; background: transparent; color: var(--text2); font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); white-space: nowrap; }
.pill { min-height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 0.6875rem; letter-spacing: 0.2em; white-space: nowrap; }
.seg { display: flex; padding: 3px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--sunken-line); }
.seg button { flex: 1; min-height: 32px; border: none; border-radius: 999px; background: transparent; color: var(--text3); font-size: 0.75rem; letter-spacing: 0.06em; transition: color .25s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 500; }
.tag { min-height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--text3); font-size: 0.6875rem; letter-spacing: 0.12em; display: inline-flex; align-items: center; white-space: nowrap; }
.tag.bad { border-color: var(--danger); color: var(--danger); }
.tag.good { border-color: var(--good); color: var(--good); }
.tag.gold { border-color: var(--accent); color: var(--accent); }
.list { border-radius: 14px; background: var(--surface); overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; border: none; width: 100%; background: transparent; text-align: left; text-decoration: none; }
.list > * + * { box-shadow: inset 0 1px 0 var(--line); }
.list .lab { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.list svg.chev { stroke: var(--text3); flex-shrink: 0; }
.spacer { flex: 1; }
.sw { width: 8px; height: 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); display: inline-block; flex-shrink: 0; }
.summary { display: flex; gap: 6px; flex-wrap: wrap; }
.summary span { min-height: 2rem; padding: 0.2rem 0.75rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.summary i { width: 6px; height: 6px; border-radius: 999px; display: inline-block; }
.words { word-break: keep-all; }
.nw { white-space: nowrap; }
/* 術語：撳落去睇白話解釋 */
.term { text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--accent); text-underline-offset: 3px; cursor: pointer; }
.headline, .support, .detail, .concl, .body { line-break: strict; }

/* 羅盤 */
#dial { display: block; width: min(300px, 100%); margin: 18px auto 0; overflow: visible; }
#dial .minor { stroke: var(--text3); } #dial .major { stroke: var(--text); } #dial .inner { stroke: var(--line); }
#dial .idx { fill: var(--accent); transform-box: view-box; transform-origin: 150px 4px; animation: idx 2.6s ease-in-out infinite; }
@keyframes idx { 50% { opacity: 0.45; } }
#dial text { font-family: var(--sans); fill: var(--text3); font-size: 12px; transition: fill .3s; }
#dial text.on { fill: var(--accent); font-weight: 500; }
#deg { font-family: var(--num); font-size: 52px; font-weight: 200; fill: var(--text); letter-spacing: -0.02em; }
#deg-sub { font-size: 12px; letter-spacing: 0.2em; }
.status-chip { min-height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 8px; font-size: 0.6875rem; color: var(--text2); white-space: nowrap; transition: color .4s var(--ease); }
.status-chip i, .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); display: inline-block; transition: background .4s var(--ease); flex-shrink: 0; }
.status-chip.ok i { background: var(--good); }
.status-chip.warn i { background: var(--danger); }
.status-chip.wait { color: var(--text3); }
.status-chip.wait i { background: var(--text3); animation: idx 1.4s ease-in-out infinite; }
.hint { margin: 0; min-height: 1.7em; text-align: center; font-size: 0.9375rem; line-height: 1.7; color: var(--text2); transition: color .3s; }
.hint.warn { color: var(--danger); }
.pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pick button { min-height: 4.25rem; border-radius: 12px; border: 1px solid var(--surface); background: var(--surface); font-size: 1.0625rem; font-weight: 500; letter-spacing: 0.06em; transition: border-color .3s, color .3s; }
.pick button:hover, .pick button:focus-visible { border-color: var(--accent); color: var(--accent); }
.pick .me { background: transparent; border: 1px dashed var(--line); color: var(--text3); font-size: 0.8125rem; font-weight: 400; cursor: default; }

/* 九宮格 */
.door { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.door span { font-size: 0.6875rem; letter-spacing: 0.4em; padding-left: 0.4em; color: var(--accent); white-space: nowrap; }
.door i { width: 60px; height: 1px; background: var(--accent); display: block; }
.grid-wrap { position: relative; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cell { --i: 0; position: relative; min-height: 7.25rem; min-width: 0; padding: 12px 10px; border-radius: 12px; border: 1px solid var(--surface); background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 6px; text-align: left; transition: background .55s var(--ease) calc(var(--i) * 45ms), border-color .55s var(--ease) calc(var(--i) * 45ms), opacity .3s, transform .35s var(--ease), box-shadow .35s; }
.cell > span { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; width: 100%; transition: opacity .45s var(--ease) calc(var(--i) * 45ms + 120ms); }
.cell > .c-mid { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; }
.c-dir, .c-luck { font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--text3); transition: color .6s var(--ease) calc(var(--i) * 45ms); }
.c-luck { font-weight: 500; }
.c-star { font-size: 1.375rem; font-weight: 500; line-height: 1.2; color: var(--text); transition: color .6s var(--ease) calc(var(--i) * 45ms), opacity .3s; }
.c-tag { font-size: 0.8125rem; font-weight: 500; line-height: 1.3; color: var(--danger); white-space: nowrap; }
.c-bot { gap: 6px; justify-content: flex-start !important; align-items: center !important; flex-wrap: wrap; font-size: 0.8125rem; line-height: 1.35; color: var(--text2); }
.c-item { min-width: 0; text-wrap: balance; }
.grid.settled .cell.k-good { background: var(--good-bg); border-color: var(--good-line); }
.grid.settled .cell.k-good .c-star, .grid.settled .cell.k-good .c-luck { color: var(--good); }
.grid.settled .cell.k-bad { background: var(--sunken); border-color: var(--sunken-line); }
.grid.settled .cell.k-bad .c-star { color: var(--text3); }
.grid.settled .cell.k-bad .c-luck { color: var(--danger); }
.grid.settled .cell.k-worst { background: var(--bad-bg); border-color: var(--bad-line); }
.grid.settled .cell.k-worst .c-star, .grid.settled .cell.k-worst .c-luck { color: var(--danger); }
.grid.settled .cell.is-door { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.grid.settled .cell.is-door .c-dir { color: var(--accent); font-weight: 500; }
.grid.pre .cell { opacity: 0; }
.grid:not(.settled) .cell > .c-top, .grid:not(.settled) .cell > .c-bot, .grid:not(.settled) .c-tag { opacity: 0; }
.grid:not(.settled) .cell:not(.lit) .c-star { opacity: 0; }
.grid:not(.settled) .cell.lit .c-star { color: var(--accent); }
.cell.center { background: transparent; border: 1px dashed var(--line); align-items: center; justify-content: center; }
.center .c-star { position: absolute; inset: 0; display: grid; place-items: center; }
.center .c-you { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 0.6875rem; letter-spacing: 0.12em; color: var(--text3); transition: opacity .5s var(--ease) .4s; }
.grid.settled .center .c-star { opacity: 0; }
.grid:not(.settled) .center .c-you { opacity: 0; }
.center svg .ring { stroke: var(--accent); } .center svg .me { fill: var(--text); } .center svg path { stroke: var(--text); }
.grid.focus .cell:not(.picked) { opacity: 0.32; }
.cell.picked { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 30px -14px var(--glow); z-index: 2; }
.cell.is-door.picked { box-shadow: inset 0 0 0 1px var(--accent), 0 14px 30px -14px var(--glow); }
.ripple { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 999px; border: 1px solid var(--accent); pointer-events: none; }
.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.trail line { stroke: var(--accent); stroke-width: 1; stroke-opacity: 0.55; stroke-linecap: round; }
.flier { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 14px 5px var(--glow); opacity: 0; pointer-events: none; }

/* 面板 */
/* 面板放喺 .app 最外層，貼住螢幕底；z-index 由 router 按疊幾層設定 */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 10; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 11; background: var(--surface); border-radius: 20px 20px 0 0; padding: 10px 24px calc(30px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; max-height: 88%; overflow-y: auto; overflow-x: hidden; box-shadow: 0 -20px 40px -30px rgba(0,0,0,.4); }
.handle { width: 36px; height: 4px; border-radius: 999px; background: var(--handle); margin: 0 auto; flex-shrink: 0; }
.icon-btn { width: 44px; height: 44px; border: none; background: transparent; display: grid; place-items: center; flex-shrink: 0; }
.icon-btn svg { stroke: var(--text3); }
.yiji { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.yiji .k { font-size: 0.8125rem; letter-spacing: 0.12em; padding-top: 3px; font-weight: 500; }
.yiji .k.yi { color: var(--good); } .yiji .k.ji { color: var(--danger); }
.yiji ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.yiji li { font-size: 0.9375rem; line-height: 1.6; display: flex; flex-direction: column; gap: 2px; }
.yiji li .why { font-size: 0.8125rem; color: var(--text3); }
.overlay { border-radius: 12px; background: var(--sunken); border: 1px solid var(--sunken-line); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
/* 家人 */
.fam-list { display: flex; flex-direction: column; margin: 0 -18px; }
.fam-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 18px; border: none; background: transparent; width: 100%; text-align: left; }
.fam-list .fam-row + .fam-row, .list .fam-row + .fam-row { box-shadow: inset 0 1px 0 var(--line); }
.fam-row .lab { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fam-row .lab b { font-size: 0.9375rem; font-weight: 500; }
.fam-row .lab small { font-size: 0.8125rem; color: var(--text3); }
.fam-row svg.chev { stroke: var(--text3); flex-shrink: 0; }
.fam-glyph { width: 2.5rem; height: 2.5rem; flex-shrink: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; font-size: 1.0625rem; font-weight: 500; }
.fam-glyph.big { width: 4rem; height: 4rem; font-size: 1.75rem; box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.fam-status { font-size: 0.8125rem; font-weight: 500; text-align: right; max-width: 45%; }
.fam-status.bad { color: var(--danger); } .fam-status.good { color: var(--good); } .fam-status.plain { color: var(--text3); font-weight: 400; }
.zodiac-pick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.zodiac-pick button { min-height: 2.75rem; border-radius: 12px; border: 1px solid var(--line); background: transparent; font-size: 1rem; transition: border-color .25s, color .25s, background .25s; }
.zodiac-pick button[aria-checked="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-surface); font-weight: 500; }
.field { min-height: 48px; border-radius: 12px; border: 1px solid var(--sunken-line); background: var(--sunken); padding: 0 14px; font-size: 1rem; outline: none; }
.field:focus { border-color: var(--accent); }
.field.area { padding: 12px 14px; line-height: 1.7; resize: none; min-height: 9rem; }
.type-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.type-pick button { min-height: 2.5rem; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 0.875rem; white-space: nowrap; transition: border-color .25s, color .25s, background .25s; }
.type-pick button[aria-checked="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-surface); font-weight: 500; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
/* 用 inline-block：flex 會將術語 span 拆成獨立一截 */
.mini { display: inline-block; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--sunken); font-size: 0.8125rem; line-height: 1.4; }
.aspect { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 0; }
.aspect + .aspect { box-shadow: inset 0 1px 0 var(--line); }
.aspect .k { font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--text3); padding-top: 2px; white-space: nowrap; }
/* 桃花：獨立嘅桃花粉，唔同吉凶紅綠、亦唔用品牌銅色 */
.c-fam { display: inline-flex; align-items: center; margin-left: 5px; color: var(--peach); vertical-align: -1px; }
.peach-icon { flex-shrink: 0; display: inline-block; vertical-align: -1px; }
.grid:not(.settled) .c-fam { opacity: 0; }
.fam-row .lab small .peach-icon { color: var(--peach); margin-right: 3px; }

/* 延伸同玄因 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ask-entry { display: flex; flex-direction: column; gap: 10px; }
.ask-title { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 500; }
.ask-chip { min-height: 2.25rem; padding: 0.35rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 0.8125rem; line-height: 1.4; text-align: left; transition: border-color .25s, color .25s; }
.ask-chip:hover, .ask-chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.ask-topic { align-self: flex-start; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 0.8125rem; letter-spacing: 0.06em; color: var(--text3); }
.thread { display: flex; flex-direction: column; gap: 18px; }
.bubble { align-self: flex-end; max-width: 82%; border-radius: 16px 16px 4px 16px; background: var(--sunken); border: 1px solid var(--sunken-line); padding: 12px 14px; font-size: 0.9375rem; line-height: 1.65; overflow-wrap: anywhere; }
.answer { display: flex; flex-direction: column; gap: 10px; }
.answer p { margin: 0; font-size: 1rem; line-height: 1.85; color: var(--text2); }
.answer p b { font-weight: 500; color: var(--text); }
.ask-note { border-radius: 14px; border: 1px solid var(--accent); background: var(--accent-surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.wait { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: var(--text3); }
.wait svg { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ask-foot { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 24px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ask-box { display: flex; align-items: flex-end; gap: 8px; }
.ask-box textarea { flex: 1; min-height: 48px; padding: 13px 16px; border-radius: 24px; border: 1px solid var(--sunken-line); background: var(--sunken); font-size: 1rem; line-height: 1.4; resize: none; outline: none; }
.ask-box textarea:focus { border-color: var(--accent); }
.send { width: 48px; height: 48px; flex-shrink: 0; border: none; border-radius: 999px; background: var(--ink); display: grid; place-items: center; }
.send svg { stroke: var(--on-ink); }
.quota { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; color: var(--text3); padding: 0 4px; }
@media (prefers-reduced-motion: reduce) { .wait svg { animation: none; } }

.toast { position: absolute; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-size: 0.875rem; z-index: 9; white-space: nowrap; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  #dial .idx, .status-chip.wait i { animation: none; }
  .cell, .cell > span, .c-star, .center .c-you { transition: none; }
}

/* 品牌：F2 新月。開 app 畫面蓋住成個 app（連底部選單），霧化走之後先見第一個畫面 */
:root { --serif: 'Noto Serif TC', 'Songti TC', 'PMingLiU', serif; }
.splash { position: absolute; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: env(safe-area-inset-top, 0px) 24px env(safe-area-inset-bottom, 0px); cursor: default; }
.splash-mark { width: 116px; }
.splash-mark svg { width: 100%; height: auto; display: block; overflow: visible; }
.splash-word { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.splash-word .zh { font-family: var(--serif); font-weight: 700; font-size: 1.875rem; letter-spacing: 0.42em; padding-left: 0.42em; line-height: 1.2; }
.splash-word .en { font-family: var(--num); font-weight: 300; font-size: 0.75rem; letter-spacing: 0.38em; padding-left: 0.38em; text-transform: uppercase; color: var(--text3); }
.splash-slogan { position: absolute; left: 0; right: 0; bottom: calc(9% + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 0.8125rem; letter-spacing: 0.24em; padding-left: 0.24em; color: var(--text3); line-height: 1.9; }
.lockup { display: flex; align-items: center; justify-content: center; gap: 14px; }
.lockup svg.lm { width: 40px; height: 40px; flex-shrink: 0; overflow: visible; }
.lockup-text { display: flex; flex-direction: column; gap: 4px; }
.lockup .zh { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.3em; line-height: 1.2; }
.lockup .en { font-family: var(--num); font-weight: 300; font-size: 0.6875rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--text3); }
.me-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 24px 32px; text-align: center; }
.me-brand .slogan { margin: 0; font-size: 0.8125rem; letter-spacing: 0.2em; padding-left: 0.2em; color: var(--text3); line-height: 1.8; }
.me-brand .sub { margin: 0; line-height: 1.7; }

/* 延伸（藥櫃即答）同玄因（收費答問） */
.free-tag { margin-left: 8px; padding: 1px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--good-line); color: var(--good); font-size: 0.6875rem; letter-spacing: 0.08em; white-space: nowrap; }
.faq-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.faq-items li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.faq-items li + li { box-shadow: inset 0 1px 0 var(--line); }
.faq-items .t { font-size: 0.9375rem; font-weight: 500; color: var(--text); }
.faq-items .b { font-size: 0.8125rem; line-height: 1.6; color: var(--text3); }
.foot-lab { font-size: 0.8125rem; letter-spacing: 0.08em; color: var(--text3); }
.deep-entry { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-align: left; transition: border-color .25s var(--ease); }
.deep-entry:hover, .deep-entry:focus-visible { border-color: var(--accent); }
.deep-entry .lab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.deep-entry .lab b { font-size: 0.9375rem; font-weight: 500; }
.deep-entry .lab span { font-size: 0.8125rem; color: var(--text3); }
.deep-entry svg.chev { stroke: var(--text3); flex-shrink: 0; }
.hint-list { margin: 0; padding: 0 0 0 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; line-height: 1.6; color: var(--text2); }
.num { font-family: var(--num); font-weight: 500; color: var(--text); }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.note-actions .pill { min-height: 40px; font-size: 0.8125rem; letter-spacing: 0.08em; }
.note-actions .pill.go { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.clarify-opts .ask-chip.picked { border-color: var(--accent); color: var(--accent); background: var(--accent-surface); }
.clarify-opts .ask-chip:disabled { cursor: default; }
#ask-cost.free { color: var(--good); }
.nw { white-space: nowrap; }
.ask-box textarea { scrollbar-width: none; }
.ask-box textarea::-webkit-scrollbar { display: none; }
/* 玄因額度 */
.quota-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 10px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-surface); color: var(--accent); font-size: 0.8125rem; letter-spacing: 0.06em; white-space: nowrap; }
.quota-pill svg { flex-shrink: 0; }
.quota-pill.muted { border-color: var(--line); background: transparent; color: var(--text3); }
.quota-head { margin: 6px 0 0; font-size: 1.25rem; font-weight: 500; letter-spacing: 0.04em; line-height: 1.4; }
.quota-rows { margin: 0; display: flex; flex-direction: column; border-radius: 12px; background: var(--sunken); border: 1px solid var(--sunken-line); }
.quota-rows > div { display: grid; grid-template-columns: 3.5em minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
.quota-rows > div + div { box-shadow: inset 0 1px 0 var(--sunken-line); }
.quota-rows dt { font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--text3); padding-top: 1px; }
.quota-rows dd { margin: 0; font-size: 0.9375rem; line-height: 1.55; }
.quota-rules { margin: 8px 0 0; padding: 0 0 0 1.1em; display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; line-height: 1.65; color: var(--text2); }
#ask-cost { background: none; border: none; padding: 0; font: inherit; color: var(--text3); cursor: pointer; }
#ask-cost.low { color: var(--accent); }
/* 玄因 PRO：掣右上角一粒細細嘅金色字，唔用膠囊框（用家 2026-10-21） */
.deep-entry { position: relative; }
.deep-entry .pro { position: absolute; top: 8px; right: 12px; font-family: var(--num); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.14em; line-height: 1; color: var(--accent); }
/* 返回掣淨係箭咀（用家 2026-10-21：擺明嘅嘢唔使講） */
.back { min-width: 44px; justify-content: flex-start; }

/* 會員：方案、比較表、會員卡、成功畫面 */
.plan { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--surface); background: var(--surface); text-align: left; transition: border-color .3s var(--ease), background .3s var(--ease); }
.plan[aria-checked="true"] { border-color: var(--accent); background: var(--accent-surface); }
.plan-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.plan-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.plan-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.plan-n b, .plan-l > b { font-size: 1rem; font-weight: 500; white-space: nowrap; }
.plan .best { font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--accent); white-space: nowrap; }
.plan-p { display: flex; align-items: baseline; gap: 2px; flex-shrink: 0; white-space: nowrap; }
.num-l { font-family: var(--num); font-size: 1.25rem; font-weight: 300; }
.rd { width: 18px; height: 18px; flex-shrink: 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; }
.rd i { width: 10px; height: 10px; border-radius: 999px; background: var(--accent); transform: scale(0); transition: transform .3s var(--ease); }
.plan[aria-checked="true"] .rd { box-shadow: inset 0 0 0 1px var(--accent); }
.plan[aria-checked="true"] .rd i { transform: scale(1); }
.cmp { border-radius: 14px; background: var(--surface); padding: 4px 18px; }
.cmp > div { display: grid; grid-template-columns: minmax(0, 1fr) 4.2em 5.4em; gap: 8px; align-items: center; min-height: 44px; font-size: 0.875rem; }
.cmp > div > span:first-child { line-height: 1.5; padding: 8px 0; }
.cmp > div + div { box-shadow: inset 0 1px 0 var(--line); }
.cmp .h { font-size: 0.8125rem; letter-spacing: 0.14em; color: var(--text3); text-align: center; }
.cmp .h.m { color: var(--accent); }
.cmp .c { text-align: center; color: var(--text2); }
.cmp .c.no { color: var(--text3); }
.cmp .m { text-align: center; font-weight: 500; color: var(--accent); }
.legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 18px; }
.legal .link { min-height: 40px; }
.pay-note { text-align: center; color: var(--text2); }
.member-card { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--accent); background: var(--accent-surface); text-align: left; }
.member-card .mc-t { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0.04em; }
.member-card .mc-p { font-family: var(--num); font-size: 0.9375rem; color: var(--accent); white-space: nowrap; }
.paid { position: absolute; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; padding: calc(96px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.paid-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 26px; text-align: center; }
.paid-foot { display: flex; flex-direction: column; }
