/* ============ Design tokens ============ */
:root {
  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --r-sm: 10px; --r: 16px; --r-lg: 22px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tab-h: 64px;

  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f6f7fb;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --line: #e4e8ef;
  --primary: #2563eb;
  --primary-ink: #1d4ed8;
  --primary-soft: #eaf1ff;
  --on-primary: #ffffff;
  --ok: #047857; --ok-soft: #e6f6ef;
  --warn: #b45309; --warn-soft: #fff3e0;
  --bad: #c62828; --bad-soft: #fdecec;
  --hero-1: #0b1736; --hero-2: #1e3a8a;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2: 0 6px 24px rgba(15, 23, 42, .08);
  --plate: #f7c600;
  --chart-1: #2563eb; --chart-2: #0ea5a4; --chart-3: #f59e0b; --chart-4: #8b5cf6; --chart-5: #ef4444; --chart-6: #64748b;
}
:root[data-theme="dark"] {
  --bg: #0b0f17;
  --surface: #141a24;
  --surface-2: #1b2230;
  --text: #e9eef6;
  --text-2: #b4bfd0;
  --muted: #8b97ab;
  --line: #263142;
  --primary: #5b93ff;
  --primary-ink: #84adff;
  --primary-soft: rgba(91, 147, 255, .14);
  --on-primary: #06122b;
  --ok: #34d399; --ok-soft: rgba(52, 211, 153, .13);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13);
  --bad: #f87171; --bad-soft: rgba(248, 113, 113, .13);
  --hero-1: #0d1b3d; --hero-2: #1a2f6b;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, .35);
}

/* ============ Base ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--s4));
  min-height: 100dvh;
}
body.has-cta { padding-bottom: calc(var(--tab-h) + 84px + env(safe-area-inset-bottom)); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--primary); text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 24px; height: 24px; }
.flip { transform: scaleX(-1); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ App bar ============ */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: var(--s3) var(--s4);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px);
}
.top .title { font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: var(--s2); letter-spacing: -.2px; }
.top .title .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: #fff; }
.chip-credit { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-pill); padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--text); min-height: 36px; }
.chip-credit .ic { color: var(--primary); }

main { padding: 0 var(--s4); max-width: 620px; margin: 0 auto; }
.view-enter { animation: enter .28s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

/* ============ Tab bar ============ */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); min-height: 48px; }
.tabs button .pillbg { width: 52px; height: 30px; border-radius: var(--r-pill); display: grid; place-items: center; transition: background .2s var(--ease); }
.tabs button.on { color: var(--primary); }
.tabs button.on .pillbg { background: var(--primary-soft); }

/* ============ Surfaces ============ */
.card { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); margin: var(--s3) 0; box-shadow: var(--shadow-1);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.card.flat { box-shadow: none; }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: 0 0 var(--s3); }
.sec-h h3 { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: var(--s2); letter-spacing: -.2px; }
.sec-h h3 .ic { color: var(--primary); }
.label { font-size: 13px; font-weight: 600; color: var(--muted); margin: var(--s5) 4px var(--s2); }
.muted { color: var(--muted); }
.t2 { color: var(--text-2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.row { display: flex; align-items: center; gap: var(--s2); }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: var(--s3); }
.divider { height: 1px; background: var(--line); margin: var(--s4) 0; }

/* ============ Buttons & inputs ============ */
.btn { border: 0; border-radius: 14px; min-height: 50px; padding: 0 var(--s5); display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2); font-weight: 700; font-size: 16px; background: var(--primary); color: var(--on-primary);
  transition: transform .12s var(--ease), background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 var(--s4); border-radius: 12px; }
.btn.icon { width: 50px; padding: 0; }
.btn.white { background: #fff; color: #0b1736; }
.btn.glass { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .18); }
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.input { width: 100%; min-height: 50px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2);
  padding: 0 var(--s4); outline: none; transition: border-color .15s, background .15s; font-size: 16px; }
.input:focus { border-color: var(--primary); background: var(--surface); }
.input-ic { position: relative; }
.input-ic .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-ic .input { padding-inline-start: 44px; }
textarea.input { min-height: 120px; padding: var(--s3) var(--s4); direction: ltr; text-align: right; resize: vertical; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: none; min-height: 40px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background .2s var(--ease), color .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.hero .seg { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); }
.hero .seg button { color: rgba(255, 255, 255, .7); }
.hero .seg button.on { background: #fff; color: #0b1736; }
.chips { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-pill); min-height: 38px; padding: 0 14px;
  font-size: 14px; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: all .15s var(--ease); }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-pill); padding: 3px 10px; font-size: 12.5px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.pri { background: var(--primary-soft); color: var(--primary-ink); }
input[type=range] { width: 100%; accent-color: var(--primary); height: 32px; }

/* ============ Hero (home + car) ============ */
.hero { position: relative; overflow: hidden; color: #fff; border-radius: var(--r-lg); padding: var(--s5); margin: var(--s2) 0 var(--s3);
  background: radial-gradient(120% 90% at 100% 0%, var(--hero-2) 0%, var(--hero-1) 60%); box-shadow: var(--shadow-2); }
.hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 147, 255, .35), transparent 70%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.hero p { margin: 6px 0 0; color: rgba(255, 255, 255, .72); font-size: 14.5px; }
.hero .muted { color: rgba(255, 255, 255, .66); }

/* plate */
.plate { display: flex; align-items: stretch; height: 64px; border-radius: 12px; overflow: hidden; background: var(--plate);
  border: 3px solid #0b0b0b; direction: ltr; box-shadow: 0 2px 0 rgba(0, 0, 0, .25) inset, 0 6px 18px rgba(0, 0, 0, .25); }
.plate .il { width: 40px; background: #1747b8; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; letter-spacing: .5px; gap: 2px; }
.plate .il svg { width: 16px; height: 16px; }
.plate input { flex: 1; min-width: 0; border: 0; background: transparent; text-align: center; color: #0b0b0b; font-size: 30px; font-weight: 800;
  letter-spacing: 3px; outline: none; font-variant-numeric: tabular-nums; }
.plate input::placeholder { color: rgba(0, 0, 0, .28); }
.plate-sm { display: inline-flex; align-items: center; direction: ltr; height: 28px; border: 2px solid #0b0b0b; border-radius: 6px;
  background: var(--plate); color: #0b0b0b; font-weight: 800; font-size: 14px; letter-spacing: 1px; overflow: hidden; white-space: nowrap; }
.plate-sm::before { content: "IL"; align-self: stretch; display: grid; place-items: center; padding: 0 4px; background: #1747b8; color: #fff; font-size: 9px; }
.plate-sm span { padding: 0 8px; }

/* ============ Lists ============ */
.list { margin: 0; padding: 0; list-style: none; }
.li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.li:last-child { border-bottom: 0; }
.li.tap { cursor: pointer; border-radius: 12px; transition: background .15s; }
.li.tap:active { background: var(--surface-2); }
.li .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary); }
.li .ico.ok { background: var(--ok-soft); color: var(--ok); }
.li .ico.warn { background: var(--warn-soft); color: var(--warn); }
.li .ico.bad { background: var(--bad-soft); color: var(--bad); }
.li .tt { font-weight: 700; line-height: 1.3; }
.li .st { font-size: 13px; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.li .end { margin-inline-start: auto; text-align: left; flex: none; }
.chev { color: var(--muted); }
.hscroll { display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px var(--s2); margin: 0 -2px;
  scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.mini { flex: none; width: 76%; max-width: 280px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: var(--s4); cursor: pointer; box-shadow: var(--shadow-1); }
.mini .tt { font-weight: 800; margin-top: var(--s2); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.tile { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: var(--s4); text-align: right; box-shadow: var(--shadow-1); }
.tile .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.tile .tt { font-weight: 800; margin-top: var(--s3); }
.tile .st { font-size: 13px; color: var(--muted); }

/* ============ Car report ============ */
.car-hero .hd { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); }
.car-hero h1 { font-size: 22px; margin-top: var(--s3); }
.score { position: relative; width: 74px; height: 74px; flex: none; }
.score svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.score .bgc { stroke: rgba(255, 255, 255, .14); }
.score .fgc { transition: stroke-dashoffset .8s var(--ease); }
.score .v { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1; }
.score .v b { font-size: 22px; font-weight: 800; }
.score .v small { display: block; font-size: 10px; color: rgba(255, 255, 255, .75); margin-top: 3px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-top: var(--s4); }
.kpi { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; padding: 10px; }
.kpi .k { font-size: 11.5px; color: rgba(255, 255, 255, .66); display: flex; align-items: center; gap: 4px; }
.kpi .v { font-weight: 800; font-size: 15px; margin-top: 2px; }
.kpi .v.ok { color: #6ee7b7; } .kpi .v.warn { color: #fcd34d; } .kpi .v.bad { color: #fca5a5; }
.qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); margin: var(--s3) 0; }
.qa button { border: 0; background: var(--surface); border-radius: 16px; min-height: 76px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text-2); box-shadow: var(--shadow-1);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); transition: transform .12s var(--ease); padding: 6px 2px; }
.qa button:active { transform: scale(.96); }
.qa button .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.qa button.on .ico { background: var(--ok-soft); color: var(--ok); }
.subnav { position: sticky; top: 58px; z-index: 15; margin: var(--s2) calc(-1 * var(--s4)); padding: var(--s2) var(--s4);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.subnav .seg { background: var(--surface); }
.anchor { scroll-margin-top: 120px; }

.value { font-size: 38px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.value.md { font-size: 28px; }
.rangebar { position: relative; height: 10px; border-radius: var(--r-pill); margin: var(--s5) 0 var(--s2);
  background: linear-gradient(90deg, var(--bad-soft), var(--ok-soft) 35%, var(--ok-soft) 65%, var(--warn-soft)); direction: ltr; }
.rangebar i { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); border: 4px solid var(--surface);
  box-shadow: var(--shadow-2); transform: translate(-50%, -50%); }
.rangebar .mark { position: absolute; top: -6px; bottom: -6px; width: 3px; border-radius: 3px; background: var(--text); transform: translateX(-50%); }
.range-l { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); direction: ltr; }
.adj { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.adj:last-child { border-bottom: 0; }
.delta { font-weight: 800; font-size: 13px; border-radius: 8px; padding: 2px 8px; direction: ltr; }
.delta.neg { color: var(--bad); background: var(--bad-soft); }
.delta.pos { color: var(--ok); background: var(--ok-soft); }
.locked { position: relative; overflow: hidden; }
.blur { filter: blur(9px); user-select: none; opacity: .8; }
.lock-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primary-ink); background: var(--primary-soft);
  border-radius: var(--r-pill); padding: 4px 10px; font-size: 13px; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: var(--s4) 0; }
.feat div { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); line-height: 1.35; }
.feat .ic { color: var(--ok); margin-top: 1px; }
.verdict { border-radius: var(--r); padding: var(--s4); margin-top: var(--s4); border: 1px solid transparent; }
.verdict.fair, .verdict.low { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.verdict.high { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.verdict.very_high { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.verdict .vt { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: var(--s2); }
.alert { display: flex; gap: var(--s3); align-items: flex-start; border-radius: var(--r); padding: var(--s4); background: var(--bad-soft); color: var(--bad);
  font-weight: 600; margin-top: var(--s3); font-size: 14.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; }
.kv > div { display: contents; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 14.5px; }
.kv dt { color: var(--muted); padding-inline-end: var(--s4); white-space: nowrap; }
.kv dd { font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.kv > div:last-child dt, .kv > div:last-child dd { border-bottom: 0; }
.stackbar { display: flex; height: 14px; border-radius: var(--r-pill); overflow: hidden; margin: var(--s4) 0 var(--s3); gap: 2px; direction: ltr; }
.legend .li { min-height: 44px; padding: 8px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
details.acc { border-top: 1px solid var(--line); margin-top: var(--s4); }
details.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px;
  font-weight: 700; color: var(--primary-ink); }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .ic { transition: transform .2s var(--ease); }
details.acc[open] summary .ic { transform: rotate(180deg); }
ol.q { margin: 0; padding: 0; list-style: none; counter-reset: q; }
ol.q li { counter-increment: q; display: flex; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
ol.q li:last-child { border-bottom: 0; }
ol.q li::before { content: counter(q); flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-ink);
  font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* ============ Charts ============ */
.chart { width: 100%; height: auto; display: block; direction: ltr; touch-action: pan-y; }
.chart text { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.f { stroke-dasharray: 5 5; opacity: .6; }
.chart .pt { fill: var(--surface); stroke: var(--primary); stroke-width: 2.2; }
.chart .pt.now { fill: var(--primary); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .bar { fill: var(--primary); opacity: .85; }
.chart .bar.dim { opacity: .3; }
.chart .lbl { fill: var(--text); font-weight: 700; font-size: 10px; }
.chart-tip { text-align: center; font-size: 13px; color: var(--text-2); min-height: 20px; margin-top: 4px; }
.chart-tip b { color: var(--text); }

/* ============ Compare ============ */
.cmp-head { display: grid; gap: var(--s2); }
.cmp-grid { display: grid; gap: 0; }
.cmp-row { display: grid; align-items: center; border-bottom: 1px solid var(--line); min-height: 48px; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row .lab { font-size: 13px; color: var(--muted); font-weight: 600; }
.cmp-row .c { text-align: center; font-weight: 700; font-size: 14px; padding: 8px 4px; }
.cmp-row .c.best { color: var(--ok); }
.cmp-row .c.best::after { content: " ✓"; }
.cmp-car { text-align: center; padding: var(--s3) 4px; border-radius: 14px; background: var(--surface-2); position: relative; }
.cmp-car .tt { font-weight: 800; font-size: 13px; line-height: 1.25; margin-top: 6px; }
.cmp-car .x { position: absolute; top: 4px; inset-inline-end: 4px; border: 0; background: none; color: var(--muted); width: 32px; height: 32px; }

/* ============ Sheet / CTA / toast / misc ============ */
.cta { position: fixed; inset: auto 0 calc(var(--tab-h) + env(safe-area-inset-bottom)) 0; z-index: 25; padding: var(--s3) var(--s4);
  background: linear-gradient(0deg, var(--bg) 60%, transparent); }
.cta .btn { box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 35%, transparent); max-width: 588px; margin: 0 auto; display: flex; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(5, 10, 20, .5); opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.sheet { position: fixed; inset: auto 0 0 0; z-index: 51; background: var(--surface); border-radius: 24px 24px 0 0; max-height: 86dvh; overflow: auto;
  padding: var(--s3) var(--s5) calc(var(--s5) + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .28s var(--ease); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto var(--s4); }
.sheet h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.hand-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s4) 0; min-height: 34px; align-items: center; }
.hand-steps .tag { padding: 6px 10px; font-size: 13px; }
.hand-steps .arrow { color: var(--muted); }
.typegrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.typegrid button { border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 14px; min-height: 54px; display: flex; align-items: center;
  gap: var(--s2); padding: 0 var(--s3); font-weight: 700; font-size: 14.5px; text-align: right; }
.typegrid button:active { border-color: var(--primary); background: var(--primary-soft); }
.toast { position: fixed; inset: auto 16px calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)) 16px; z-index: 60; display: flex; align-items: center;
  gap: var(--s2); justify-content: center; max-width: 520px; margin: 0 auto; background: #0f172a; color: #fff; border-radius: 14px;
  padding: 12px 16px; font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(12px);
  transition: opacity .2s, transform .25s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.skel { border-radius: var(--r-lg); margin: var(--s3) 0; background: linear-gradient(90deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 300% 100%; animation: sk 1.3s infinite linear; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.empty { text-align: center; padding: var(--s8) var(--s4); color: var(--muted); }
.empty .ico { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto var(--s3); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty .ico .ic { width: 28px; height: 28px; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.foot { text-align: center; font-size: 12.5px; color: var(--muted); margin: var(--s5) 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.pack { border: 1.5px solid var(--line); border-radius: var(--r); padding: var(--s4); background: var(--surface-2); text-align: right; width: 100%; }
.pack .tt { font-weight: 800; }
.pack .price { font-weight: 800; color: var(--primary-ink); font-size: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .qa { grid-template-columns: repeat(3, 1fr); }
  .value { font-size: 32px; }
  .feat { grid-template-columns: 1fr; }
}
