/* SPICA 角宿一 v4 — 前衛藝廊 × 液態玻璃・冷軟色(DESIGN.md):大色塊改冷調柔和(霧藍 × 薄荷冰,危險動作=冷藕粉)、深靛灰/霧白為底、粗無襯線超大字;
   內容=牆上的展品(直角、實色),控制=浮在前面的液態玻璃(膠囊、強折射、高光邊)。斷點/間距照 FMU 版面規格基準(600 / 820 側欄 / 1100) */
:root {
  --bg: var(--bone); --bg2: #f8fafc; --bg3: #e1e7ee; --bg4: #cfd8e3;
  --fg: var(--ink); --fg2: #4a5364; --fg3: #626c7e; --line: rgba(var(--ink-rgb),.2); --line2: rgba(var(--ink-rgb),.09);
  --accent: var(--ink); --accent-d: #141a26; --on-accent: var(--bone); --accent-soft: rgba(var(--ink-rgb),.06);
  --hot: #a9bfea; --hot-d: #4f6fb8; --pop: #c2efdf; --bad: #f1bfcf; --ink: #222a3a; --ink-rgb: 34,42,58; --ink2: #2f384a; --ink3: #3f495c; --warn-on: #7a1f40; --bone: #eef1f5; --bone-rgb: 238,241,245;
  --warn: #a8355a; --warn-soft: rgba(241,191,207,.38); --seal: #a9bfea; --ok: var(--ink); --info: var(--ink);
  --tint: var(--ink); --tint-soft: rgba(194,239,223,.65);
  /* 字體預設=「圓潤」(Unbounded × 昭源環方);其他風格在 themes.css 的 :root[data-font],表在 server/themes.js */
  --display: 'Unbounded', 'Chiron GoRound TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --serif: 'Chiron GoRound TC', 'Noto Sans TC', 'Microsoft JhengHei', system-ui, sans-serif; --mono: 'Space Grotesk', system-ui, sans-serif; --dscale: .76;
  --r-frame: 0px; --r-glass: 28px; --r-in: 0px; --r-tag: 0px;
  --nav-h: 66px;
  /* 液態玻璃(加強版):更透、更飽和、雙層高光邊 */
  --glass-bg: rgba(248,250,252,.22); --glass-bg-mid: rgba(248,250,252,.46); --glass-bg-strong: rgba(248,250,252,.68);
  --glass-sheen: linear-gradient(135deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.10) 36%, rgba(255,255,255,0) 58%, rgba(255,255,255,.22) 100%);
  --glass-brd: rgba(255,255,255,.75);
  --glass-hi: inset 0 1.5px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(var(--ink-rgb),.08), inset 0 12px 18px -12px rgba(255,255,255,.75), inset 0 -10px 16px -10px rgba(255,255,255,.4);
  --glass-shadow: 0 18px 50px rgba(var(--ink-rgb),.2), 0 3px 10px rgba(var(--ink-rgb),.08);
  --glass-blur: blur(14px) saturate(2.4) brightness(1.08);
  --blob-hot: rgba(169,191,234,.8); --blob-pop: rgba(194,239,223,.95);
  --ease-in: cubic-bezier(.05,.7,.1,1); --ease-out: cubic-bezier(.3,0,.8,.15);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10141c; --bg2: #181d28; --bg3: #222937; --bg4: #2e3646;
    --fg: #e9edf4; --fg2: #b3bccb; --fg3: #8b95a7; --line: rgba(233,237,244,.22); --line2: rgba(233,237,244,.1);
    --accent: #e9edf4; --accent-d: #fff; --on-accent: #10141c; --accent-soft: rgba(233,237,244,.08);
    --hot: #9fb7e8; --hot-d: #9fb7e8; --bad: #eeb4c6; --warn: #f0a8c0; --warn-soft: rgba(238,180,198,.16); --ok: #c2efdf; --info: #e9edf4;
    --tint: #c2efdf; --tint-soft: rgba(194,239,223,.14); --pale: .62;
    --glass-bg: rgba(22,27,38,.26); --glass-bg-mid: rgba(22,27,38,.5); --glass-bg-strong: rgba(22,27,38,.7);
    --glass-sheen: linear-gradient(135deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,.03) 36%, rgba(255,255,255,0) 58%, rgba(255,255,255,.08) 100%);
    --glass-brd: rgba(255,255,255,.2);
    --glass-hi: inset 0 1.5px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(0,0,0,.4), inset 0 12px 18px -12px rgba(255,255,255,.2), inset 0 -10px 16px -10px rgba(255,255,255,.08);
    --glass-shadow: 0 18px 50px rgba(0,0,0,.6), 0 3px 10px rgba(0,0,0,.35);
    --blob-hot: rgba(159,183,232,.4); --blob-pop: rgba(194,239,223,.22);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-synthesis-weight: none; font-variant-numeric: lining-nums; } /* 只有單一字重的展示字(滑油字等)不要被瀏覽器硬加粗糊掉;價格數字一律等高(Cormorant 預設是高低不齊的舊體數字) */
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--serif); font-size: 14px; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; position: relative; }
/* 牆面色塊光:右上朱紅、左下萊姆,固定不動;玻璃浮在上面才有東西可折射 */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(46vw 34vh at 104% 4%, var(--blob-hot), transparent 68%), radial-gradient(52vw 38vh at -6% 100%, var(--blob-pop), transparent 66%); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i, .i svg, #nav svg, .btn svg, .icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--fg); text-underline-offset: 3px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--fg3); }
.hint { color: var(--fg2); font-size: 12px; line-height: 1.6; margin: 6px 0; }
.err { color: var(--warn); font-size: 12.5px; font-weight: 700; }
.empty { color: var(--fg2); font-size: 13px; padding: 44px 12px; text-align: center; line-height: 1.7; }
h1 { font-family: var(--display); font-size: 34px; font-weight: 800; margin: 6px 0 14px; letter-spacing: -.01em; line-height: 1.05; }
h2 { font-size: 11px; font-family: var(--mono); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fg); margin: 28px 0 10px; padding-top: 12px; border-top: 2px solid var(--fg); }
.money { font-family: var(--display); font-variant-numeric: lining-nums tabular-nums; font-weight: 700; letter-spacing: -.01em; }
.tag { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: var(--r-tag); border: 1px solid var(--fg); color: var(--fg); white-space: nowrap; }
.tag.ok { border-color: transparent; background: var(--pop); color: var(--ink); } .tag.warn { border-color: transparent; background: var(--bad); color: var(--ink); } .tag.info { border-color: transparent; background: var(--fg); color: var(--bg); } .tag.dim { opacity: .5; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
/* 色塊內的文字一律墨黑(不跟著深色模式反白) */
.on-color { --fg: var(--ink); --fg2: var(--ink2); --fg3: var(--ink3); --line: rgba(var(--ink-rgb),.3); --line2: rgba(var(--ink-rgb),.15); --accent: var(--ink); --accent-d: #000; --on-accent: var(--bone); --warn: var(--warn-on); color: var(--ink); }

/* ---------- 液態玻璃(只給浮在內容上的控制層) ---------- */
.top, #nav, #toast, #updatebar, .mbox, .logincard, .bsum, .btabs, .scard, .glass {
  background: var(--glass-sheen), var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd); box-shadow: var(--glass-hi), var(--glass-shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top, #nav, #toast, #updatebar, .mbox, .logincard, .bsum, .btabs, .scard, .glass { background: var(--bg2); }
}
@media (prefers-reduced-transparency: reduce) {
  .top, #nav, #toast, #updatebar, .mbox, .logincard, .bsum, .btabs, .scard, .glass { background: var(--bg2); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--line); }
  body::before { display: none; }
}

/* 頂列 / 導覽 */
.top { background: var(--glass-sheen), var(--glass-bg-mid); position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; border-width: 0 0 1px; border-radius: 0; box-shadow: var(--glass-hi); }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-family: var(--display); font-weight: 800; letter-spacing: .16em; font-size: 15px; }
.brand .sub { color: var(--fg2); font-size: 12px; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; border-left: 1px solid var(--line); }
.live { width: 8px; height: 8px; border-radius: 999px; background: var(--line); }
.live.on { background: var(--hot-d); box-shadow: 0 0 0 3px var(--accent-soft); }
#nav { position: fixed; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 10px); z-index: 6; display: flex; border-radius: 999px; padding: 5px; }
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; min-height: 48px; border-radius: 999px; color: var(--fg); text-decoration: none; font-size: 10.5px; font-weight: 500; letter-spacing: .06em; transition: background .2s var(--ease-in), color .15s; -webkit-tap-highlight-color: transparent; }
#nav a svg { width: 20px; height: 20px; }
#nav a.on { color: var(--on-accent); font-weight: 900; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 14px rgba(var(--ink-rgb),.25); }
#view { padding: 18px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 40px); animation: viewIn .22s var(--ease-in); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 按鈕(控制=膠囊) / 表單(粗底線欄位) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1.5px solid var(--fg); background: var(--glass-bg-strong); color: var(--fg); font-size: 13px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; text-decoration: none; transition: transform .12s, background .15s, color .15s, opacity .15s; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .chip:active, .icon:active { transform: scale(.96); }
.btn:hover { background: var(--pop); color: var(--ink); border-color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 900; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 26px rgba(var(--ink-rgb),.28); }
.btn.primary:hover { background: var(--hot); color: var(--ink); }
.btn.danger { color: var(--warn); border-color: var(--warn); }
.btn.danger:hover { background: var(--bad); color: var(--ink); border-color: transparent; }
.btn.danger.solid { background: var(--bad); color: var(--ink); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: 12px; }
.btn.tiny { min-height: 30px; padding: 4px 11px; font-size: 11px; }
.btn.big { min-height: 56px; padding: 12px 26px; font-size: 16px; letter-spacing: .14em; }
.btn.block { width: 100%; }
.btn.line { background: #06C755; color: #fff; border-color: transparent; font-weight: 900; }
.btn.line:hover { background: #05b34c; color: #fff; }
.btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.btn:disabled:hover { background: var(--glass-bg-strong); color: var(--fg); border-color: var(--fg); } .btn.primary:disabled:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 999px; border: 2px solid currentColor; border-right-color: transparent; color: var(--on-accent); animation: spin .7s linear infinite; }
.btn:not(.primary).busy::after { color: var(--fg); }
@keyframes spin { to { transform: rotate(360deg); } }
.icon { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--fg); background: var(--glass-bg-strong); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--fg); transition: background .15s, transform .12s; }
.icon:hover { background: var(--pop); color: var(--ink); border-color: var(--ink); }
.field { display: flex; flex-direction: column; gap: 2px; margin: 14px 0; }
.field > span { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--fg3); }
.field > span em { font-style: normal; color: var(--warn); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]) { background: transparent; border: 0; border-bottom: 2px solid var(--fg); border-radius: 0; padding: 10px 0; color: var(--fg); width: 100%; min-width: 0; min-height: 44px; font-size: 15px; font-weight: 500; transition: border-color .15s, background .15s; }
select { padding-right: 18px; }
select option { background: var(--bg2); color: var(--fg); }
textarea { min-height: 72px; resize: vertical; border: 1.5px solid var(--fg); padding: 10px 12px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--hot-d); background: var(--accent-soft); }
::placeholder { color: var(--fg3); opacity: .85; font-weight: 400; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--fg); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line2); font-size: 13.5px; font-weight: 500; min-height: 50px; }
.switch:last-child { border-bottom: 0; }
.switch small { display: block; color: var(--fg2); font-size: 11.5px; font-weight: 400; margin-top: 3px; line-height: 1.55; }
.switch input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--fg); background: transparent; color: var(--fg); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; transition: transform .12s, background .15s, color .15s; }
.chip.on { background: var(--fg); color: var(--bg); }
.seg { display: flex; border: 1.5px solid var(--fg); border-radius: 999px; padding: 3px; }
.seg button { flex: 1; min-height: 34px; border: 0; background: transparent; border-radius: 999px; padding: 6px 8px; color: var(--fg); font-size: 12.5px; font-weight: 700; }
.seg button.on { background: var(--fg); color: var(--bg); }

/* 展板(內容區塊:無框、上緣一條粗墨線) / 清單 */
.card { background: transparent; border: 0; border-top: 2px solid var(--fg); border-radius: 0; padding: 14px 0 6px; margin: 22px 0; }
.card.pad0 { padding: 0; }
.card h3 { margin: 0 0 10px; font-size: 17px; font-weight: 900; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
.card h3 .grow { flex: 1; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1.5px solid var(--fg); border-left: 1.5px solid var(--fg); }
.kpi { background: transparent; border: 0; border-right: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); border-radius: 0; padding: 12px 14px; }
.kpi span { display: block; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fg3); }
.kpi b { display: block; font-family: var(--display); font-size: 30px; font-weight: 800; margin-top: 2px; line-height: 1.05; letter-spacing: -.02em; }
.kpi b small { font-family: var(--serif); font-size: 12px; color: var(--fg2); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; transition: padding .18s var(--ease-in), background .18s; } .li.click:hover { padding-left: 10px; background: var(--pop); color: var(--ink); --fg2: var(--ink2); }
.li b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .sub { display: block; font-size: 12px; color: var(--fg2); margin-top: 2px; }
.avatar { width: 44px; height: 44px; border-radius: 0; background: var(--fg); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 18px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 72px; height: 96px; font-size: 32px; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { text-align: left; color: var(--fg); font-family: var(--mono); font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 8px; border-bottom: 2px solid var(--fg); }
table.t td { padding: 9px 8px; border-bottom: 1px solid var(--line2); }
.notice { border-left: 6px solid var(--fg); background: var(--tint-soft); border-radius: 0; padding: 10px 14px; font-size: 13px; line-height: 1.65; margin: 12px 0; }
.notice.warn { border-left-color: var(--warn); background: var(--warn-soft); color: var(--fg); }
.notice code { font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.seal { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: var(--ink); color: var(--pop); border-radius: 0; font-weight: 900; font-size: 16px; line-height: 1; font-family: var(--serif); }

/* 登入:色塊牆 + 一張玻璃卡 */
#loginwall { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px; overflow: auto; background: var(--bg); }
#loginwall::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(52vw 62vh at 78% 22%, var(--blob-hot), transparent 66%), radial-gradient(56vw 60vh at 20% 84%, var(--blob-pop), transparent 64%); }
.logincard { position: relative; width: 100%; max-width: 410px; border-radius: var(--r-glass); padding: 40px 30px 30px; display: flex; flex-direction: column; gap: 6px; }
.loginhero { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 18px; }
.loginhero img { width: 60px; height: 60px; border-radius: 14px; margin-bottom: 14px; }
.loginhero b { font-family: var(--display); font-size: 56px; font-weight: 800; letter-spacing: -.02em; line-height: .95; }
.loginhero span { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--fg2); letter-spacing: .28em; text-transform: uppercase; margin-top: 8px; }
.logincard input { font-size: 16px; }
.logincard .btn { min-height: 54px; font-size: 14px; letter-spacing: .2em; margin-top: 18px; }

/* 更新橫幅 / 吐司 / 彈窗(玻璃) */
#updatebar { position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; align-items: center; border-radius: 999px; padding: 6px 6px 6px 16px; font-size: 13px; font-weight: 700; }
#updatebar button { border: 0; background: var(--fg); color: var(--bg); border-radius: 999px; padding: 7px 14px; font-weight: 900; min-height: 34px; letter-spacing: .08em; }
#toast { position: fixed; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 76px); left: 50%; transform: translateX(-50%); z-index: 30; background: var(--fg); color: var(--bg); border-color: transparent; border-radius: 999px; padding: 11px 20px; font-size: 13.5px; font-weight: 700; letter-spacing: .04em; max-width: 90vw; animation: viewIn .22s var(--ease-in); -webkit-backdrop-filter: none; backdrop-filter: none; }
#toast.warn { background: var(--bad); color: var(--ink); }
#toast button { border: 0; background: transparent; color: inherit; font-weight: 900; margin-left: 12px; text-decoration: underline; text-underline-offset: 3px; }
#modal { position: fixed; inset: 0; z-index: 25; background: rgba(var(--ink-rgb),.3); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(46px); opacity: .3; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.mbox { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--glass-sheen), var(--glass-bg-strong); border-radius: var(--r-glass) var(--r-glass) 0 0; border-bottom: 0; padding: 12px 22px calc(env(safe-area-inset-bottom) + 20px); animation: sheetUp .28s var(--ease-in); }
.mbox::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--fg); opacity: .25; margin: 0 auto 14px; }
.mbox h3 { margin: 0 0 12px; padding-bottom: 12px; border-bottom: 2px solid var(--fg); font-size: 20px; font-weight: 900; letter-spacing: .01em; display: flex; align-items: center; gap: 10px; }
.mbox h3 .grow { flex: 1; }
.mbox h2 { margin-top: 20px; }
.mbox .actions { display: flex; gap: 8px; margin-top: 20px; }
.mbox .actions .btn { flex: 1; }
.mbox .actions.wrap { flex-wrap: wrap; } .mbox .actions.wrap .btn { flex: 1 1 40%; }
.slotgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1.5px solid var(--fg); border-left: 1.5px solid var(--fg); }
.slotgrid button { min-height: 48px; border-radius: 0; border: 0; border-right: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); background: transparent; font-family: var(--mono); font-size: 14.5px; font-weight: 500; letter-spacing: .02em; color: var(--fg); transition: background .15s, color .15s; }
.slotgrid button:hover { background: var(--accent-soft); }
.slotgrid button.on { background: var(--pop); color: var(--ink); font-weight: 700; }
.slotgrid button:disabled { opacity: .3; }

/* 預約簿:手機清單 */
.daybar { position: relative; display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.daybar .d { flex: 1; text-align: left; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -.02em; line-height: 1.05; min-height: 44px; display: inline-flex; align-items: baseline; gap: 10px; cursor: pointer; padding: 4px 0; }
.daybar .d small { font-family: var(--mono); font-weight: 700; background: var(--hot); color: var(--ink); padding: 2px 8px; font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; }
.daybar input[type=date] { position: absolute; left: 50%; top: 0; opacity: 0; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; pointer-events: none; }
.bklist { display: flex; flex-direction: column; border-top: 2px solid var(--fg); }
.bk { display: flex; gap: 16px; align-items: center; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0; cursor: pointer; transition: padding .18s var(--ease-in), background .18s; }
.bk:hover { padding-left: 10px; background: var(--pop); color: var(--ink); --fg2: var(--ink2); --fg3: var(--ink3); }
.bk .tm { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.02em; min-width: 66px; line-height: 1.05; }
.bk .tm small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--fg3); font-weight: 500; letter-spacing: .06em; margin-top: 3px; }
.bk .grow b { font-size: 16px; font-weight: 900; display: block; }
.bk .grow .sub { font-size: 12px; color: var(--fg2); display: block; margin-top: 3px; }
.bk.done { opacity: .5; } .bk.no_show, .bk.cancelled { opacity: .45; } .bk.cancelled .grow b { text-decoration: line-through; }
.bk .st { align-self: center; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 22px); z-index: 7; min-height: 54px; padding: 0 24px 0 18px; border-radius: 999px; background: var(--pop); border: 1.5px solid var(--ink); color: var(--ink); font-weight: 900; font-size: 14px; letter-spacing: .1em; display: inline-flex; align-items: center; gap: 8px; box-shadow: inset 0 1.5px 0 rgba(255,255,255,.8), 0 14px 34px rgba(var(--ink-rgb),.3); transition: transform .12s, background .15s; }
.fab:hover { background: var(--hot); }
.fab:active { transform: scale(.96); }
.fab svg { width: 18px; height: 18px; stroke-width: 2.4; }
.tl { display: none; }
.sumstrip { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; border-top: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); }
.sumstrip::-webkit-scrollbar { display: none; }
.sumstrip .kpi { flex: 1 0 auto; min-width: 104px; padding: 10px 14px; border: 0; border-right: 1px solid var(--line); }
.sumstrip .kpi:last-child { border-right: 0; }
.sumstrip .kpi b { font-size: 26px; }
.stpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.stpick button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 0; border: 1.5px solid var(--fg); background: transparent; text-align: left; min-height: 48px; font-weight: 700; }
.stpick button.on { background: var(--pop); color: var(--ink); }
.stpick .avatar { width: 30px; height: 30px; font-size: 13px; }
.wk { display: grid; grid-template-columns: 54px 1fr; gap: 2px 12px; align-items: center; font-size: 13px; }
.wk span { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--fg2); }
.wk input { min-height: 40px; padding: 7px 0; font-family: var(--mono); font-size: 13px; border-bottom-width: 1.5px; }
.detail dl { display: grid; grid-template-columns: 76px 1fr; gap: 8px 12px; margin: 8px 0; font-size: 13.5px; }
.detail dt { font-family: var(--mono); color: var(--fg3); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; padding-top: 3px; } .detail dd { margin: 0; font-weight: 500; }
.statusbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 14px; border: 1.5px solid var(--fg); border-radius: 999px; overflow: hidden; }
.statusbtns .btn { min-height: 48px; border-radius: 0; border: 0; border-right: 1.5px solid var(--fg); background: transparent; box-shadow: none; }
.statusbtns .btn:last-child { border-right: 0; }
.statusbtns .btn.on { background: var(--pop); color: var(--ink); font-weight: 900; }
.statusbtns .btn.on.bad { background: var(--bad); color: var(--ink); }

/* 三段版面 */
@media (min-width: 600px) {
  #view { padding: 22px 24px calc(var(--nav-h) + env(safe-area-inset-bottom) + 44px); }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .mbox { border-radius: var(--r-glass); border-bottom: 1px solid var(--glass-brd); margin-bottom: 16px; animation-name: pop; }
  .mbox::before { display: none; }
  #modal { align-items: center; }
  .slotgrid { grid-template-columns: repeat(6, 1fr); }
  #nav { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, calc(100% - 40px)); }
}
@media (min-width: 820px) {
  :root { --nav-h: 0px; --side-w: 96px; }
  #nav { position: fixed; top: 51px; bottom: 0; left: 0; right: auto; transform: none; width: var(--side-w); flex-direction: column; border-width: 0 1px 0 0; border-radius: 0; padding: 18px 10px; gap: 6px; box-shadow: none; }
  #nav a { flex: none; padding: 12px 4px 10px; border-radius: 18px; font-size: 11px; gap: 5px; }
  #nav a svg { width: 22px; height: 22px; }
  #nav a:hover:not(.on) { background: var(--pop); color: var(--ink); }
  #view { margin-left: var(--side-w); padding: 30px 36px 48px; max-width: 1480px; }
  #toast { bottom: 40px; }
  .fab { bottom: 30px; right: 32px; }
  h1 { font-size: 52px; }
  /* 時間軸:設計師欄 × 時間列 */
  .bklist { display: none; }
  .tl { display: grid; grid-template-columns: 60px 1fr; border-top: 2px solid var(--fg); background: transparent; }
  .tl-head { display: grid; position: sticky; top: 51px; z-index: 2; background: var(--bg); border-bottom: 1.5px solid var(--fg); grid-column: 2; }
  .tl-head div { padding: 12px 10px; font-weight: 900; font-size: 15px; letter-spacing: .02em; text-align: left; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
  .tl-head .avatar { width: 30px; height: 30px; font-size: 14px; }
  .tl-corner { grid-column: 1; position: sticky; top: 51px; z-index: 2; background: var(--bg); border-bottom: 1.5px solid var(--fg); }
  .tl-times { grid-column: 1; position: relative; }
  .tl-times div { position: absolute; left: 0; right: 0; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; color: var(--fg3); text-align: right; padding-right: 10px; transform: translateY(-50%); }
  .tl-body { grid-column: 2; display: grid; position: relative; }
  .tl-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line2) 1px, transparent 1px); background-size: 100% var(--hour-h); cursor: cell; }
  .tl-col.off { background-color: var(--accent-soft); cursor: default; }
  .tl-ev { position: absolute; left: 6px; right: 6px; border-radius: 0; background: var(--fg); color: var(--bg); --fg2: var(--bg3); border: 0; padding: 7px 10px; font-size: 12px; line-height: 1.35; overflow: hidden; cursor: pointer; transition: box-shadow .18s, transform .18s var(--ease-in); }
  .tl-ev:hover { box-shadow: 0 12px 30px rgba(var(--ink-rgb),.3); transform: translateY(-2px); z-index: 1; }
  .tl-ev b { display: block; font-size: 13.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tl-ev span { color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .tl-ev.arrived { background: var(--pop); color: var(--ink); --fg2: var(--ink3); }
  .tl-ev.done { background: var(--bg3); color: var(--fg); --fg2: var(--fg3); opacity: .8; }
  .tl-ev.no_show { background: var(--bad); color: var(--ink); --fg2: var(--ink3); opacity: .75; }
  .tl-ev.leave { background: repeating-linear-gradient(45deg, transparent, transparent 6px, var(--accent-soft) 6px, var(--accent-soft) 12px); color: var(--fg2); cursor: default; }
  .tl-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--hot-d); z-index: 1; pointer-events: none; }
  .tl-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 999px; background: var(--hot-d); }
  .grid2.wide { grid-template-columns: 1fr 1fr 1fr; }
  .settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
  .settings .card { margin: 0 0 30px; }
}
@media (min-width: 1100px) {
  :root { --side-w: 220px; }
  #nav { padding: 22px 14px; }
  #nav a { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 16px; font-size: 15px; letter-spacing: .08em; font-weight: 700; border-radius: 999px; }
  #nav a svg { width: 20px; height: 20px; }
  #view { padding: 34px 48px 56px; }
}
@media (hover: none) { .btn:hover { background: var(--glass-bg-strong); color: var(--fg); border-color: var(--fg); } .btn.primary:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; } .btn.danger:hover { background: var(--glass-bg-strong); color: var(--warn); border-color: var(--warn); } .btn.danger.solid:hover { background: var(--bad); color: var(--ink); } .btn.line:hover { background: #06C755; } .icon:hover { background: var(--glass-bg-strong); color: var(--fg); } .li.click:hover, .bk:hover { padding-left: 0; background: transparent; color: inherit; } .fab:hover { background: var(--pop); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .btn.busy::after { animation: none; border-right-color: currentColor; opacity: .5; } }
/* 配色主題選擇器(設定頁):每格一張小色票=底色+開場牆色塊+選取色圓點;12 套的值在 themes.css(由 server/themes.js 產出) */
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin-top: 12px; }
.theme { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 44px; padding: 0 0 9px; border: 1.5px solid var(--line); border-radius: 0; background: var(--t-paper); color: var(--t-ink); font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease-in); }
.theme .sw { position: relative; display: block; height: 46px; margin-bottom: 9px; background: var(--t-hot); }
.theme .sw i { position: absolute; right: 8px; bottom: -9px; width: 22px; height: 22px; border-radius: 999px; background: var(--t-pop); border: 2px solid var(--t-paper); }
.theme b { padding: 0 9px; font-weight: 900; font-size: 13.5px; letter-spacing: .04em; }
.theme small { padding: 0 9px; font-size: 10.5px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme:hover:not(:disabled) { transform: translateY(-2px); }
.theme.on { outline: 2.5px solid var(--fg); outline-offset: 2px; }
.theme.on b::after { content: '使用中'; margin-left: 6px; padding: 1px 5px; background: var(--t-ink); color: var(--t-paper); font-size: 9.5px; font-weight: 700; letter-spacing: .08em; vertical-align: 1px; }
.theme:disabled { cursor: default; }
@media (min-width: 600px) { .themes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 字體風格選擇器(設定頁):每格用該套的展示字寫樣張 */
.fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin-top: 10px; }
.fontopt { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 84px; padding: 12px 12px 10px; border: 1.5px solid var(--line); border-radius: 0; background: var(--bg2); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease-in); }
.fontopt b { font-size: 24px; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; }
.fontopt small { font-size: 11px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fontopt:hover:not(:disabled) { transform: translateY(-2px); }
.fontopt.on { outline: 2.5px solid var(--fg); outline-offset: 2px; background: var(--pop); color: var(--ink); } .fontopt.on small { color: var(--ink2); }
.fontopt:disabled { cursor: default; }
@media (min-width: 600px) { .fonts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
