:root { --bg: #111113; --surface: #19191c; --raised: #232327; --line: #2e2e34; --text: #ededf0; --muted: #9a9aa4; --accent: #e9b44c; --ink: #1a1405;
  --err: #f2766b; --ok: #7fcf9a; --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); }
.shell { max-width: 560px; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.top h1 { font-size: 22px; margin: 0 0 2px; }
.balance { margin: 0; color: var(--muted); }
.balance b { color: var(--text); font-variant-numeric: tabular-nums; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.card:empty { display: none; }
.card h2 { font-size: 17px; margin: 0 0 6px; }
.step-no { font-size: 13px; color: var(--accent); margin: 0 0 4px; font-weight: 600; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
p { margin: 0 0 10px; }
.pick { display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 12px; border: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
  border-radius: 12px; color: var(--accent); font-weight: 650; cursor: pointer; text-align: center; padding: 10px; }
.pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 12px; font: 600 16px var(--sans); cursor: pointer;
  border: 1px solid var(--line); background: var(--raised); color: var(--text); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--ink); border: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.row .btn { flex: 1 1 140px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; padding: 8px 0 0; cursor: pointer; }
.bar { height: 6px; background: var(--raised); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
ul.sum { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
ul.sum li::before { content: "✓ "; color: var(--ok); }
.cost { background: var(--raised); border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.spin { width: 34px; height: 34px; border: 3px solid var(--raised); border-top-color: var(--accent); border-radius: 50%; animation: s 1s linear infinite; margin-bottom: 10px; }
@keyframes s { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.notice { margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid; }
.notice.err { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); background: color-mix(in srgb, var(--err) 8%, transparent); }
.results { display: grid; gap: 14px; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.result video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; display: block; }
.result .row { margin-top: 10px; }
.result.fail { color: var(--muted); }
.foot { color: var(--muted); font-size: 13px; text-align: center; }
