/* 刻度 · Modernist tokens（来自 _ds/styles.css）+ App 样式。零圆角、2px 分割线、一切左对齐。 */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;600;800&display=swap');
:root{
  --bg:#f3f2f2;--surface:#eae9e9;--fg:#201e1d;--acc:#ec3013;--line:rgba(32,30,29,.4);--line1:rgba(32,30,29,.4);
  --track:#d7d3d3;--muted:#7d7979;--acc-text:#ae1800;--acc-soft:#fff2ef;--acc-600:#dd2b0f;--acc-700:#ae1800;--acc-400:#ff9783;
  --n400:#bab6b6;--n700:#605d5d;--n800:#444141;--n900:#2d2b2b;
  --font:"Archivo",-apple-system,"PingFang SC","Noto Sans CJK SC","Noto Sans SC","Source Han Sans SC","Microsoft YaHei",system-ui,sans-serif;
  --shadow-lg:0 12px 32px rgba(45,43,43,.22);
  --sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);
}
[data-theme="dark"]{--bg:#201e1d;--fg:#f3f2f2;--line:rgba(243,242,242,.4);--surface:#2d2b2b;--track:#444141;--acc-text:#ff9783;--acc-soft:rgba(236,48,19,.16);--muted:#bab6b6}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font-family:var(--font);font-size:14px;line-height:1.4;overscroll-behavior:none}
body{position:fixed;inset:0;overflow:hidden}
#app{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--bg);color:var(--fg);padding-top:var(--sat)}
h1,h2,h3,.h{font-family:var(--font);font-weight:800;letter-spacing:-.02em;margin:0}
button,input{font-family:inherit;color:inherit}
input[type=number],input[type=text],input[type=password],input[type=search]{-webkit-appearance:none;appearance:none;border:0;border-radius:0;background:var(--surface);color:var(--fg);padding:10px 12px;font-size:15px;width:100%;outline:none}
input:focus{outline:2px solid var(--acc);outline-offset:-2px}
input::placeholder{color:var(--muted)}
[data-act],.tap{cursor:pointer;user-select:none;-webkit-user-select:none}
[data-act]:active,.tap:active{opacity:.7}
.disabled{opacity:.45;pointer-events:none}

/* 结构 */
.topbar{display:flex;justify-content:space-between;align-items:baseline;padding:10px 20px 10px;border-bottom:2px solid var(--line);flex:none}
.topbar .brand{font-weight:800;font-size:18px;letter-spacing:-.02em}
.topbar .kicker{font-size:11px}
.kicker{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.kicker.acc{color:var(--acc-text)}
.screen{flex:1;display:flex;flex-direction:column;min-height:0}
.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;min-height:0}
.muted{color:var(--muted)}
.acc{color:var(--acc-text)}
.accfg{color:var(--acc)}
.big{font-weight:800;letter-spacing:-.02em;line-height:1;font-variant-numeric:tabular-nums}
.tab{font-variant-numeric:tabular-nums}
.nav{flex:none;display:grid;grid-template-columns:1fr 1fr auto 1fr 1fr;align-items:center;height:calc(64px + var(--sab));padding-bottom:var(--sab);border-top:2px solid var(--line);background:var(--bg)}
.nav .item{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;color:var(--muted);height:64px;justify-content:center}
.nav .item.on{color:var(--acc)}
.nav .item svg{width:20px;height:20px}
.nav .cam{width:52px;height:52px;background:var(--acc);color:#fff;display:flex;align-items:center;justify-content:center;margin:0 12px}
.nav .cam svg{width:24px;height:24px}
.btn{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 16px;font-weight:800;font-size:15px;letter-spacing:-.01em;background:var(--acc);color:#fff;border:0;width:100%;text-align:left}
.btn:active{background:var(--acc-600);opacity:1}
.btn.ghost{background:transparent;color:var(--fg);border:1px solid var(--line)}
.btn.ghost:active{background:var(--surface)}
.btn.sm{padding:8px 10px;font-size:12px;width:auto;display:inline-flex}
.btn.inv{background:#fff;color:var(--acc)}
.btn svg{width:16px;height:16px;flex:none}
.footer{padding:12px 20px calc(16px + var(--sab));border-top:2px solid var(--line);flex:none;background:var(--bg)}
.row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.grid2{display:grid;grid-template-columns:1fr 1fr}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr}
.cell{padding:18px 16px}
.link{color:var(--acc-text);font-size:12px;font-weight:600}
.bar{height:4px;background:var(--track);position:relative}
.bar>i{position:absolute;left:0;top:0;bottom:0;background:var(--fg)}
.bar>i.acc{background:var(--acc)}
.pill{display:inline-block;padding:2px 6px;background:var(--fg);color:var(--bg);font-size:10px;font-weight:800;letter-spacing:.05em}
.step{width:48px;height:44px;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:600}
.step svg{width:18px;height:18px}
.toast{position:absolute;left:20px;right:20px;bottom:calc(76px + var(--sab));background:var(--fg);color:var(--bg);padding:10px 14px;font-size:13px;box-shadow:var(--shadow-lg);z-index:50;animation:tin .18s ease-out}
@keyframes tin{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
@keyframes scan{0%{top:0}100%{top:calc(100% - 2px)}}
.scanline{position:absolute;left:0;right:0;height:2px;background:var(--acc);box-shadow:0 0 12px var(--acc);animation:scan 1.4s linear infinite;z-index:2}
.overlay{position:absolute;inset:0;background:var(--bg);color:var(--fg);display:flex;flex-direction:column;z-index:20;padding-top:var(--sat)}
.sheet-mask{position:absolute;inset:0;background:rgba(32,30,29,.5);z-index:30;display:flex;flex-direction:column;justify-content:flex-end}
.sheet{background:var(--bg);color:var(--fg);border-top:4px solid var(--acc);padding-bottom:var(--sab)}
.stripes{background:repeating-linear-gradient(135deg,#2d2b2b 0 6px,#444141 6px 12px)}
.gray{filter:grayscale(1) contrast(1.08)}
.chip{display:inline-block;border:1px solid var(--acc);color:var(--acc-text);padding:6px 10px;font-size:12px;font-weight:600;margin:0 6px 6px 0}
.list-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-top:1px solid var(--line)}
.seg{display:flex;border:1px solid var(--line)}
.seg>div{flex:1;padding:8px 6px;font-size:12px;text-align:center;font-weight:600;border-right:1px solid var(--line)}
.seg>div:last-child{border-right:0}
.seg>div.on{background:var(--acc);color:#fff}
.opt{flex:1 1 auto;min-width:80px;padding:12px 14px;font-size:14px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.field label{font-size:11px;color:var(--muted);letter-spacing:.05em}
.numrow{display:flex;align-items:center;gap:8px}
.numrow input{flex:1;text-align:left;font-weight:800;font-size:22px;padding:6px 10px}
.spark{display:block}
.hidden{display:none!important}
.sk{background:linear-gradient(90deg,var(--surface) 25%,var(--track) 50%,var(--surface) 75%);background-size:200% 100%;animation:sk 1.2s infinite}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}
.wk-cell{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 0 6px;border-right:1px solid var(--line);font-size:10px}
.wk-cell:last-child{border-right:0}
.wk-cell.sel{background:var(--acc);color:#fff}
.wk-cell .d{font-size:15px;font-weight:700}
.wk-cell .dot{width:10px;height:10px}
.wk-cell .s{font-size:9px;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis;padding:0 2px}
.badge{width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;border:1px solid var(--fg);flex:none}
.badge.on{background:var(--acc);color:#fff;border-color:var(--acc)}
.corner{position:absolute;width:24px;height:24px;border:2px solid #fff}
.corner.tl{top:0;left:0;border-right:0;border-bottom:0}.corner.tr{top:0;right:0;border-left:0;border-bottom:0}
.corner.bl{bottom:0;left:0;border-right:0;border-top:0}.corner.br{bottom:0;right:0;border-left:0;border-top:0}
video{object-fit:cover;width:100%;height:100%;filter:grayscale(1) contrast(1.08)}
.plan-ex{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-top:1px solid var(--line);gap:8px}
.plan-ex .nm{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:600;flex:1;min-width:0}
.plan-ex .nm svg{width:12px;height:12px;flex:none}
.plan-ex .spec{font-size:12px;color:var(--muted);white-space:nowrap}

/* 动效：只在页面切换 / 覆盖层打开时播放一次 */
.screen.enter{animation:fade .18s ease-out}
.overlay.enter{animation:up .22s cubic-bezier(.2,.8,.2,1)}
.sheet.enter{animation:up .22s cubic-bezier(.2,.8,.2,1)}
.row-in{animation:rowin .28s ease-out both}
@keyframes fade{from{opacity:0}}
@keyframes up{from{transform:translateY(28px);opacity:0}}
@keyframes rowin{from{transform:translateY(8px);opacity:0}}
.btn:active{transform:scale(.985)}
.step:active,.opt:active,.chip:active{background:var(--surface)}
.chip.on{background:var(--acc);color:#fff}
.sheet .scroll{max-height:60vh}
@media (prefers-reduced-motion:reduce){.screen.enter,.overlay.enter,.sheet.enter,.row-in{animation:none}}
