/* finesse · register=h5 · morph=A.1-daily-desk(app-shell furniture, real phone: no fake status bar)
 * A=burnt-orange on warm paper (Amber Ops, accent darkened to #C4561F for 4.5:1 outdoors)
 * B=system CJK 800/400 + tabular mono figures · C=today-hero + one-question wizard + edge bar w/ center FAB
 * D=feedback-only (press, slide, check) · E=weighbridge ticket (磅单) · SOUL=6 SPECTACLE=2 DENSITY=5 */
:root {
  --page: #f3eee6;
  --bg: #fffdf9;
  --panel-2: #f8f3eb;
  --line: rgba(48, 32, 20, .10);
  --line-2: rgba(48, 32, 20, .16);
  --ink-1: #1f1710;
  --ink-2: #4a3f34;
  --ink-3: #75655a;
  --accent: #c4561f;
  --accent-press: #a9461a;
  --accent-soft: rgba(196, 86, 31, .11);
  --on-accent: #fffaf4;
  --glow: rgba(196, 86, 31, .34);
  --teal: #2e6b63;
  --teal-soft: rgba(46, 107, 99, .11);
  --up: #2f7a55;
  --up-soft: rgba(47, 122, 85, .12);
  --down: #b8402f;
  --down-soft: rgba(184, 64, 47, .10);
  --warn: #9a6512;
  --shadow: 0 1px 3px rgba(60, 38, 20, .06), 0 1px 1px rgba(60, 38, 20, .03);
  --shadow-lg: 0 24px 60px -28px rgba(60, 38, 20, .45);
  --ease: cubic-bezier(.32, .86, .28, 1);
  --r: 18px;
  --r-sm: 13px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", "Noto Sans Mono", Menlo, Consolas, monospace;
  --tabbar-h: 64px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow-x: clip; }
body {
  overflow: hidden; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink-1);
  background: #2a231c; display: flex; align-items: center; justify-content: center;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* ── the frame: locked body, one scrolling child per view ───────────── */
.phone { position: relative; width: 100%; height: 100%; overflow: hidden; overflow: clip; background: var(--page); display: flex; flex-direction: column; }
.push, .login { overflow: hidden; overflow: clip; }
@media (min-width: 560px) {
  body { background: radial-gradient(120% 90% at 50% 0%, #3a3027 0%, #1c1712 62%); }
  .phone { width: 406px; height: min(880px, 94vh); border-radius: 44px; border: 1px solid rgba(255, 240, 220, .12);
           box-shadow: 0 46px 120px -30px rgba(10, 6, 2, .9), 0 0 0 10px #15110d; }
}
.view { position: absolute; inset: 0; overflow-y: auto; overflow-x: clip; -webkit-overflow-scrolling: touch;
        padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 30px); }
.view::-webkit-scrollbar, .push-body::-webkit-scrollbar, .sheet::-webkit-scrollbar { width: 0; }
.view:not(.on) { display: none; }

/* ── type ──────────────────────────────────────────────────────────── */
.h-screen { font-size: 24px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.h-sec { font-size: 16px; font-weight: 800; margin: 24px 2px 10px; display: flex; align-items: baseline; gap: 8px; }
.h-sec small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.meta { font-size: 13.5px; color: var(--ink-3); }
.muted { color: var(--ink-3); }

/* ── today hero: the 磅单 slip ─────────────────────────────────────── */
.top { display: flex; justify-content: space-between; align-items: flex-end; margin: 4px 2px 14px; }
.top .who { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.notice { background: var(--bg); border: 1px solid var(--line); border-left: 0; border-radius: var(--r-sm); padding: 11px 14px;
          font-size: 14.5px; color: var(--ink-2); display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--shadow); }
.notice b { color: var(--accent); font-weight: 800; flex: none; }
.slip { margin-top: 12px; background: var(--bg); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.slip-main { padding: 18px 18px 14px; }
.slip-label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); display: flex; justify-content: space-between; }
.slip-big { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.slip-big .n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.slip-big .of { font-family: var(--mono); font-size: 24px; color: var(--ink-3); font-weight: 600; }
.slip-big .say { margin-left: auto; text-align: right; font-size: 14px; font-weight: 700; line-height: 1.35; }
.slip-big .say.ok { color: var(--up); }
.slip-big .say.todo { color: var(--accent); }
.slots { display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 5px; margin-top: 14px; }
.slots i { height: 9px; border-radius: 3px; background: var(--panel-2); border: 1px solid var(--line); }
.slots i.on { background: var(--accent); border-color: transparent; }
.slots i.over { background: var(--teal); border-color: transparent; }
.perf { border-top: 1px dashed var(--line-2); display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.perf::before, .perf::after { content: ""; position: absolute; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--page); border: 1px solid var(--line); }
.perf::before { left: -10px; } .perf::after { right: -10px; }
.perf > div { padding: 11px 14px 13px; }
.perf > div + div { border-left: 1px solid var(--line); }
.perf .k { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.perf .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; margin-top: 1px; }

/* ── rows & cards ──────────────────────────────────────────────────── */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.rows { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 64px; width: 100%; text-align: left; transition: background .15s; }
.row + .row { border-top: 1px solid var(--line); }
.row:active { background: var(--panel-2); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.row .s { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.row .go { flex: none; color: var(--ink-3); }
.row .act { flex: none; height: 40px; padding: 0 14px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.row .act:active { transform: scale(.95); }
.empty { padding: 22px 18px; text-align: center; color: var(--ink-3); font-size: 14.5px; line-height: 1.6; }
.empty b { color: var(--ink-1); display: block; font-size: 16px; margin-bottom: 4px; }

.badge { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 9px; font-family: var(--mono); font-weight: 800; font-size: 15px; flex: none; }
.i5 { background: var(--accent); color: var(--on-accent); }
.i4 { background: var(--accent-soft); color: var(--accent); }
.i3 { background: var(--teal-soft); color: var(--teal); }
.i2, .i1, .i0 { background: var(--panel-2); color: var(--ink-3); border: 1px solid var(--line); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: 1px; }
.tag.first { background: var(--teal-soft); color: var(--teal); border-color: transparent; }

.outbox { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--down-soft); color: var(--down); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.outbox button { margin-left: auto; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--down); color: var(--on-accent); font-weight: 800; font-size: 13.5px; }

/* ── search & segmented ────────────────────────────────────────────── */
.search { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 14px; margin-top: 14px; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; min-width: 0; }
.seg { display: flex; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 13px; margin-top: 12px; }
.seg button { flex: 1; height: 40px; border-radius: 10px; font-weight: 700; font-size: 15px; color: var(--ink-3); }
.seg button.on { background: var(--bg); color: var(--ink-1); box-shadow: var(--shadow); }

/* ── buttons ───────────────────────────────────────────────────────── */
.btn { height: 54px; border-radius: 15px; padding: 0 20px; font-size: 17px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s var(--ease), background .15s; }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 28px -14px var(--glow); }
.btn-main:active { background: var(--accent-press); }
.btn-main:disabled { background: #d9cfc3; color: var(--bg); box-shadow: none; }
.btn-ghost { background: var(--bg); color: var(--ink-1); border: 1px solid var(--line-2); }
.btn-text { color: var(--ink-2); height: 48px; padding: 0 12px; font-weight: 700; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ── tab bar: edge bar, filled active state, center record button ── */
.tabbar { position: absolute; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
          padding: 0 6px env(safe-area-inset-bottom); background: rgba(255, 252, 247, .94); backdrop-filter: blur(18px) saturate(150%);
          -webkit-backdrop-filter: blur(18px) saturate(150%); border-top: 1px solid var(--line-2); display: flex; align-items: center; }
.tabbar > button { flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); border-radius: 14px; }
.tabbar > button svg { width: 24px; height: 24px; padding: 2px; border-radius: 9px; transition: background .2s, color .2s; }
.tabbar > button.on { color: var(--ink-1); }
.tabbar > button.on svg { background: var(--ink-1); color: var(--bg); width: 40px; height: 26px; padding: 3px 10px; }
.tabbar > button:active { transform: scale(.94); }
.tabbar .fab { flex: none; align-self: flex-start; width: 62px; height: 62px; margin: -22px 6px 0; border-radius: 22px; background: var(--accent); color: var(--on-accent);
               display: grid; place-items: center; box-shadow: 0 16px 30px -14px var(--glow), 0 0 0 5px var(--page); }
.tabbar .fab svg { width: 30px; height: 30px; }
.tabbar .fab:active { transform: scale(.92); background: var(--accent-press); }
.fab-label { position: absolute; z-index: 41; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 3px); font-size: 11.5px; font-weight: 800; color: var(--accent); pointer-events: none; }

/* ── push layers (wizard, details) ─────────────────────────────────── */
.push { position: absolute; inset: 0; z-index: 60; background: var(--page); transform: translateX(100%); transition: transform .42s var(--ease); display: flex; flex-direction: column; }
.push.on { transform: none; }
.push.z2 { z-index: 70; }
.push-head { flex: none; padding: calc(env(safe-area-inset-top) + 8px) 8px 8px; display: flex; align-items: center; gap: 4px; background: var(--page); }
.push-head .title { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.icon-btn { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--ink-1); flex: none; }
.icon-btn:active { background: rgba(48, 32, 20, .07); }
.icon-btn.script { width: auto; padding: 0 12px; gap: 5px; display: flex; align-items: center; font-size: 14px; font-weight: 800; color: var(--teal); background: var(--teal-soft); height: 38px; border-radius: 99px; margin-right: 6px; }
.push-body { flex: 1; overflow-y: auto; overflow-x: clip; padding: 6px 18px 24px; }
.push-foot { flex: none; padding: 10px 18px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(to top, var(--page) 70%, rgba(243, 238, 230, 0)); }

/* progress: segmented like a ticket counter */
.prog { height: 6px; margin: 2px 18px 0; border-radius: 99px; background: rgba(48, 32, 20, .08); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .35s var(--ease); }
.prog-meta { display: flex; justify-content: space-between; margin: 7px 20px 0; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }

/* question */
.q { padding-top: 18px; animation: qin .34s var(--ease) both; }
.q.back { animation-name: qback; }
@keyframes qin { from { opacity: 0; transform: translateX(26px); } }
@keyframes qback { from { opacity: 0; transform: translateX(-26px); } }
.q-title { font-size: 23px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.q-title .req { color: var(--accent); margin-left: 4px; }
.q-hint { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); line-height: 1.6; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.q-hint b { color: var(--teal); }
.q-body { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.q-sub { font-size: 14px; font-weight: 800; color: var(--ink-2); margin: 10px 2px -2px; }

.choices { display: grid; gap: 10px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices.three { grid-template-columns: 1fr 1fr 1fr; }
.choice { min-height: 58px; padding: 12px 16px; border-radius: 15px; background: var(--bg); border: 1.5px solid var(--line-2); text-align: left; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; transition: transform .12s var(--ease), border-color .15s, background .15s; }
.choices.two .choice, .choices.three .choice { justify-content: center; text-align: center; }
.choice small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.choice:active { transform: scale(.97); }
.choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink-1); }
.choice .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.choice.on .dot { border-color: var(--accent); background: var(--accent); }
.choice.on .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent); }
.choice.multi .dot { border-radius: 7px; }
.choice.multi.on .dot::after { width: 10px; height: 6px; border-radius: 0; background: none; border: solid var(--on-accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.intent .choice { align-items: flex-start; }
.intent .badge { margin-top: 1px; }

.field { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 16px; background: var(--bg); border: 1.5px solid var(--line-2); border-radius: 15px; }
.field:focus-within { border-color: var(--accent); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 19px; font-weight: 700; }
.field input::placeholder { color: #b3a698; font-weight: 500; }
.field .unit { color: var(--ink-3); font-weight: 700; font-size: 15px; flex: none; }
.field.num-f input { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { height: 40px; padding: 0 14px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.quick button.on { background: var(--ink-1); color: var(--bg); border-color: transparent; }
.quick button:active { transform: scale(.95); }

/* voice text */
.vt { background: var(--bg); border: 1.5px solid var(--line-2); border-radius: 15px; overflow: hidden; }
.vt:focus-within { border-color: var(--accent); }
.vt textarea { width: 100%; min-height: 108px; border: 0; outline: 0; resize: none; background: none; padding: 14px 16px 6px; font-size: 17px; line-height: 1.55; }
.vt-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px 16px; border-top: 1px dashed var(--line); }
.vt-bar .tip { flex: 1; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.mic { flex: none; height: 52px; padding: 0 18px 0 14px; border-radius: 99px; background: var(--ink-1); color: var(--bg); font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 7px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mic svg { width: 22px; height: 22px; }
.mic.rec { background: var(--accent); }
.mic.busy { opacity: .6; }

.rec-layer { position: absolute; inset: 0; z-index: 90; background: rgba(31, 23, 16, .55); display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .18s; }
.rec-layer.on { opacity: 1; }
.rec-card { width: 230px; padding: 26px 20px 20px; border-radius: 26px; background: var(--bg); text-align: center; box-shadow: var(--shadow-lg); }
.rec-card .ring { width: 86px; height: 86px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); position: relative; }
.rec-card .ring::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--accent-soft); animation: pulse 1.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.rec-card .ring svg { width: 38px; height: 38px; }
.rec-card .tm { font-family: var(--mono); font-size: 26px; font-weight: 700; margin-top: 14px; }
.rec-card .hint { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.rec-layer.cancel .ring { background: var(--down); }
.rec-layer.cancel .hint { color: var(--down); font-weight: 800; }

/* photo */
.photo-box { border-radius: var(--r); overflow: hidden; background: var(--bg); border: 1.5px dashed var(--line-2); aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; color: var(--ink-3); position: relative; }
.photo-box img { width: 100%; height: 100%; object-fit: contain; display: block; background: #2a231c; }
.photo-box .ph { display: grid; gap: 8px; place-items: center; font-size: 15px; font-weight: 700; }
.photo-box .ph svg { width: 40px; height: 40px; color: var(--ink-2); }
.loc { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.loc.ok { color: var(--up); font-weight: 700; }

/* review */
.review { margin-top: 14px; }
.review .row { min-height: 54px; padding: 10px 14px; align-items: flex-start; }
.review .k { width: 92px; flex: none; font-size: 13.5px; color: var(--ink-3); font-weight: 700; padding-top: 2px; }
.review .v { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.review .v.miss { color: var(--down); }
.meter { display: flex; align-items: center; gap: 12px; padding: 14px; }
.meter .bar { flex: 1; height: 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--teal); }
.meter b { font-family: var(--mono); font-size: 18px; }

/* done stamp */
.done { position: absolute; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(243, 238, 230, .92); opacity: 0; pointer-events: none; transition: opacity .2s; }
.done.on { opacity: 1; pointer-events: auto; }
.stamp { width: 168px; height: 168px; border-radius: 50%; border: 5px solid var(--up); color: var(--up); display: grid; place-items: center; text-align: center; transform: rotate(-8deg) scale(.6); opacity: 0; transition: transform .45s var(--ease), opacity .2s; font-weight: 900; font-size: 26px; line-height: 1.2; }
.stamp small { display: block; font-size: 13px; font-weight: 700; }
.done.on .stamp { transform: rotate(-8deg) scale(1); opacity: 1; }
.done.queued .stamp { border-color: var(--warn); color: var(--warn); }

/* sheet */
.scrim { position: absolute; inset: 0; z-index: 80; background: rgba(31, 23, 16, .42); opacity: 0; pointer-events: none; transition: opacity .28s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 85; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 18px);
         transform: translateY(102%); transition: transform .42s var(--ease); max-height: 86%; overflow-y: auto; box-shadow: var(--shadow-lg); }
.sheet.on { transform: none; }
.grab { width: 42px; height: 4px; border-radius: 99px; background: rgba(48, 32, 20, .16); margin: 0 auto 12px; }
.sheet h3 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.sheet .form { display: flex; flex-direction: column; gap: 10px; }
.sheet .field input { font-size: 17px; }
.lbl { font-size: 13.5px; font-weight: 800; color: var(--ink-2); margin: 4px 2px -4px; }

/* scripts (rendered markdown) */
.md { font-size: 16px; line-height: 1.7; color: var(--ink-1); }
.md h2 { font-size: 19px; margin: 18px 0 8px; } .md h3 { font-size: 17px; margin: 16px 0 6px; } .md h4 { font-size: 16px; margin: 14px 0 4px; }
.md p { margin: 8px 0; }
.md ul, .md ol { padding-left: 22px; margin: 8px 0; }
.md li { margin: 5px 0; }
.md li > ul, .md li > ol { margin: 4px 0; }
.md strong { font-weight: 800; }
.md q { quotes: "「" "」"; background: var(--teal-soft); color: var(--ink-1); padding: 0 3px; border-radius: 4px; }
.md blockquote { border-left: 3px solid var(--teal); padding: 6px 12px; margin: 10px 0; background: var(--bg); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.md hr { border: 0; border-top: 1px dashed var(--line-2); margin: 16px 0; }
.md-table { overflow-x: auto; margin: 10px -18px; padding: 0 18px; }
.md table { border-collapse: collapse; font-size: 14px; line-height: 1.5; min-width: 100%; background: var(--bg); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.md th { background: var(--panel-2); text-align: left; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.md th, .md td { padding: 9px 11px; border-bottom: 1px solid var(--line); vertical-align: top; min-width: 84px; }
.script-card { padding: 16px; display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; }
.script-card + .script-card { border-top: 1px solid var(--line); }
.script-card .no { font-family: var(--mono); font-weight: 800; color: var(--accent); font-size: 15px; width: 24px; flex: none; }
.script-card .t { font-weight: 800; font-size: 16.5px; flex: 1; }

/* login */
.login { position: absolute; inset: 0; z-index: 100; background: var(--page); display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 40px) 22px calc(env(safe-area-inset-bottom) + 20px); overflow-y: auto; }
.login .brand { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .08em; }
.login h1 { font-size: 28px; font-weight: 800; margin-top: 8px; line-height: 1.25; }
.names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.names button { height: 60px; border-radius: 15px; background: var(--bg); border: 1.5px solid var(--line-2); font-size: 18px; font-weight: 800; }
.names button:active { transform: scale(.97); }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 26px 0 8px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-2); }
.pin-dots i.on { background: var(--ink-1); border-color: var(--ink-1); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.keypad button { height: 64px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 26px; font-weight: 700; box-shadow: var(--shadow); }
.keypad button:active { background: var(--panel-2); transform: scale(.96); }
.keypad button.fn { font-family: var(--sans); font-size: 16px; background: none; border: 0; box-shadow: none; color: var(--ink-2); }
.err { color: var(--down); font-weight: 700; font-size: 14.5px; text-align: center; min-height: 22px; }

/* toast */
.toast { position: absolute; z-index: 99; left: 50%; bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 18px); transform: translate(-50%, 16px); max-width: calc(100% - 40px);
         background: var(--ink-1); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* tower detail */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 14px 16px; font-size: 15px; }
.kv dt { color: var(--ink-3); font-weight: 700; font-size: 13.5px; padding-top: 1px; }
.kv dd { font-weight: 700; overflow-wrap: anywhere; }
.call { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-weight: 800; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.stat { padding: 14px 16px; }
.stat .k { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.stat .v { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 700; margin-top: 2px; }
.stat .v small { font-size: 14px; color: var(--ink-3); margin-left: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rec-card .ring::before { display: none; }
}
