/* S·VISION SCAN — precision-instrument HUD on OLED black */

@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap;
  src: url('../vendor/fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap;
  src: url('../vendor/fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap;
  src: url('../vendor/fonts/plexmono-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 700; font-display: swap;
  src: url('../vendor/fonts/plexmono-700.woff2') format('woff2'); }

:root {
  --bg: #000000;
  --ink: #f2f4f1;
  --dim: #8a938c;
  --hair: rgba(255, 255, 255, .13);
  --blue: #0095ff;
  --blue-dk: #002945;
  --blue-ink: #001b30;
  --amber: #ffb340;
  --amber-dk: #3d2800;
  --red: #ff4d3d;
  --red-dk: #3c0f0a;
  --purple: #b26bff;
  --purple-dk: #241033;
  --green: #4ad66d;
  --green-dk: #0e2a15;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--cond);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* iOS's on-screen keyboard doesn't reliably shrink 100dvh, which would
     leave bottom-pinned buttons (.panel-actions, margin-top:auto) hidden
     behind it. js/app.js tracks the real visible height via
     window.visualViewport and writes --app-vh; fall back to 100dvh before
     that first JS write and on browsers without visualViewport. */
  height: var(--app-vh, 100dvh);
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- header ---------- */
.hud-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + var(--safe-t)) 14px 8px;
  border-bottom: 1px solid var(--hair);
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  z-index: 30;
}
.hud-stats { display: flex; align-items: center; gap: 14px; }
.stat { font: 500 13px/1 var(--mono); color: var(--dim); display: flex; align-items: baseline; gap: 2px; }
.stat b { color: var(--ink); font-weight: 700; }
.stat i { font-style: normal; opacity: .5; }
.stat label { font: 500 10px var(--cond); letter-spacing: .14em; text-transform: uppercase; margin-left: 6px; }
.mode-toggle {
  display: flex; border: 1px solid var(--hair); border-radius: 8px; overflow: hidden;
}
.mode-toggle button {
  padding: 7px 11px; font: 500 10px var(--cond); letter-spacing: .1em;
  background: transparent; color: var(--dim); border: 0; cursor: pointer;
}
.mode-toggle button.active { background: var(--blue); color: var(--blue-ink); }

.header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.btn-camtoggle {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  background: transparent; color: var(--dim);
  border: 1px solid var(--hair); border-radius: 8px; cursor: pointer;
}
.btn-camtoggle.active { color: var(--blue); border-color: var(--blue); }
.btn-camtoggle:active { background: rgba(255,255,255,.08); }
.ean-search { display: flex; align-items: center; gap: 6px; position: relative; }
.ean-search input {
  width: 54px; min-width: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hair); border-radius: 8px;
  color: var(--ink);
  font: 600 12px var(--mono); letter-spacing: .03em;
  padding: 7px 6px;
  outline: none;
}
.ean-search input::placeholder { color: var(--dim); }
.ean-search input:focus { border-color: var(--blue); }
.ean-search button {
  width: 28px; height: 28px; display: grid; place-items: center; flex: none;
  background: transparent; color: var(--dim);
  border: 1px solid var(--hair); border-radius: 8px; cursor: pointer;
}

@media (max-width: 400px) {
  .hud-bar { padding-left: 10px; padding-right: 10px; }
  .header-left { gap: 6px; }
  .mode-toggle button { padding: 6px 8px; }
  .hud-stats { gap: 8px; }
  .stat label { display: none; }
  .ean-search input { width: 46px; }
}
.ean-search button:active { background: rgba(255,255,255,.08); }

.ean-search-results {
  position: absolute; top: calc(100% + 6px); left: 0;
  width: max(78vw, 280px); max-height: 60vh; overflow-y: auto;
  background: #0a0c0a; border: 1px solid var(--hair); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  z-index: 40;
}
.ean-result-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; background: transparent; border: 0;
  border-bottom: 1px solid var(--hair); color: var(--ink); text-align: left;
  cursor: pointer;
}
.ean-result-row:last-child { border-bottom: 0; }
.ean-result-row:active { background: rgba(255,255,255,.08); }
.ean-result-code { font: 600 12px var(--mono); letter-spacing: .02em; flex: none; }
.ean-result-name {
  font: 500 12px var(--cond); color: var(--dim); flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ean-result-price { font: 600 12px var(--mono); color: var(--dim); flex: none; }
.ean-result-price.priced { color: var(--blue); }

.btn-icon {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none;
  background: transparent; color: var(--ink);
  border: 1px solid var(--hair); border-radius: 8px;
  font: 500 20px/1 var(--cond); cursor: pointer;
}
.btn-icon:active { background: rgba(255,255,255,.08); }
.scan-back { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: auto; }
.scan-back[hidden] { display: none; }

.btn-export {
  position: relative; width: 40px; height: 34px;
  display: grid; place-items: center;
  background: transparent; color: var(--ink);
  border: 1px solid var(--hair); border-radius: 8px;
  cursor: pointer;
}
.btn-export:active { background: rgba(255,255,255,.08); }
.badge {
  position: absolute; top: -7px; right: -7px;
  background: var(--blue); color: var(--blue-ink);
  font: 700 10px/1 var(--mono); font-style: normal;
  padding: 3px 5px; border-radius: 20px; min-width: 17px; text-align: center;
}

/* ---------- stage / screens ---------- */
#stage { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; }
.screen[hidden] { display: none !important; }

/* scan */
.screen-scan { background: #050705; }
#video { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85); }
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 40%, rgba(0,0,0,.78) 100%);
}
.reticle {
  --w: min(78vw, 380px);
  position: absolute; left: 50%; top: 42%;
  width: var(--w); height: calc(var(--w) * .52);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: box-shadow .15s;
}
.reticle .c { position: absolute; width: 26px; height: 26px; border: 0 solid var(--blue); opacity: .95; }
.reticle .tl { left: 0; top: 0; border-left-width: 2.5px; border-top-width: 2.5px; }
.reticle .tr { right: 0; top: 0; border-right-width: 2.5px; border-top-width: 2.5px; }
.reticle .bl { left: 0; bottom: 0; border-left-width: 2.5px; border-bottom-width: 2.5px; }
.reticle .br { right: 0; bottom: 0; border-right-width: 2.5px; border-bottom-width: 2.5px; }
.laser {
  position: absolute; left: 7%; right: 7%; top: 0; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--blue) 18%, var(--blue) 82%, transparent);
  box-shadow: 0 0 12px 1px rgba(0, 149, 255, .55);
  animation: sweep 2.1s cubic-bezier(.45, 0, .55, 1) infinite alternate;
}
@keyframes sweep { from { top: 6%; } to { top: 94%; } }
.reticle.hit .c { border-color: #fff; }
.reticle.hit .laser { animation-play-state: paused; background: #fff; box-shadow: 0 0 16px 2px #fff; }

.scan-footer {
  position: absolute; left: 0; right: 0; bottom: calc(18px + var(--safe-b));
  display: flex; justify-content: center; pointer-events: none;
}
.status-chip {
  display: flex; align-items: center; gap: 8px;
  font: 500 11px var(--cond); letter-spacing: .2em;
  color: var(--ink);
  border: 1px solid var(--hair); border-radius: 999px;
  padding: 8px 16px;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  pointer-events: none;
}
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: pulse 1.4s infinite; }
.status-chip.err .dot { background: var(--red); animation: none; }
.status-chip.err { pointer-events: auto; cursor: pointer; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }

/* ---------- result panels ----------
   .panel is a plain column: [.panel-scroll (flex:1, scrolls)] then
   [.panel-actions (flex:none, always below/after it)]. Actions are a
   structural sibling of the scroll area, never inside it — that's what
   guarantees they can't be scrolled out of view or overlapped, without
   resorting to position:sticky (buggy in Safari when combined with
   flexbox's margin-top:auto — tried it, it visibly misplaced the actions
   on real hardware; this plain-flow split is the robust version). */
.panel {
  background:
    radial-gradient(140% 100% at 50% 0%, #071018 0%, #000 60%);
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  animation: rise .28s cubic-bezier(.2, .9, .3, 1);
}
.panel-scroll {
  flex: 1; min-height: 0; width: 100%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 26px 22px 12px;
  text-align: center;
}
.panel-photo::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.4) 45%, rgba(0,0,0,.8) 100%);
}
.panel-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.85) saturate(.9);
}
.panel-bg[hidden] { display: none; }
.panel-photo .ean-line, .panel-photo .prod-name, .panel-photo .pvp-hint {
  text-shadow: 0 2px 10px rgba(0,0,0,.9), 0 0 22px rgba(0,0,0,.75);
}
@keyframes rise { from { transform: translateY(26px); opacity: 0 } to { transform: none; opacity: 1 } }

.panel-head {
  display: flex; align-items: center; gap: 10px;
  font: 600 14px var(--cond); letter-spacing: .28em;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--hair);
}
.panel-head.ok   { color: var(--blue); border-color: rgba(0,149,255,.4);  background: var(--blue-dk); }
.panel-head.warn { color: var(--amber); border-color: rgba(255,179,64,.4); background: var(--amber-dk); }
.panel-head.err  { color: var(--red);   border-color: rgba(255,77,61,.4);  background: var(--red-dk); }

.ean-line {
  margin-top: 18px;
  width: 100%;
  font: 700 clamp(26px, 7.4vw, 38px)/1.05 var(--mono);
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ean-line.big { font-size: clamp(34px, 10vw, 50px); margin-top: 34px; }

.prod-name {
  margin-top: 10px;
  font: 600 clamp(20px, 5.6vw, 28px)/1.15 var(--cond);
  letter-spacing: .02em;
  max-width: 30ch;
}
.prod-name.sm { font-size: clamp(17px, 4.6vw, 22px); color: var(--ink); }

.price-hero {
  margin: auto 0;
  padding: 16px 0;
  font-family: var(--mono); font-weight: 700;
  color: var(--blue);
  text-shadow: 0 0 34px rgba(0, 149, 255, .35);
  display: flex; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.price-hero .int { font-size: clamp(84px, 26vw, 148px); line-height: .9; }
.price-hero .dec { font-size: clamp(42px, 13vw, 72px); }
.price-hero .cur { font-size: clamp(30px, 9vw, 48px); color: var(--dim); margin-left: 10px; }

.pvp-hint {
  margin-top: 14px;
  font: 500 11px var(--cond); letter-spacing: .2em; color: var(--dim);
}
.pvp-hint b { font-family: var(--mono); color: var(--amber); margin-left: 4px; }

.miss-note { margin-top: 16px; font: 500 15px/1.5 var(--cond); color: var(--dim); max-width: 30ch; }

/* ---------- price entry ----------
   Real <input type="tel" inputmode="numeric">, not on-screen buttons — this
   is what actually invokes the phone's own numeric keypad. */
.price-input {
  margin: 16px 0 6px;
  width: min(84vw, 330px);
  min-height: 64px;
  display: block; text-align: center;
  font: 700 56px/1 var(--mono);
  color: var(--amber);
  font-variant-numeric: tabular-nums;
  background: transparent; border: 0; outline: none;
  caret-color: var(--amber);
}
.price-input.placeholder { color: rgba(255,255,255,.16); }
.price-input::placeholder { color: rgba(255,255,255,.16); -webkit-text-fill-color: rgba(255,255,255,.16); }

/* ---------- buttons ---------- */
.panel-actions {
  display: flex; gap: 10px; width: min(88vw, 360px); flex: none;
  padding: 10px 0 calc(18px + var(--safe-b));
}
.panel-actions.col { flex-direction: column; }
.btn {
  flex: 1;
  padding: 15px 10px;
  font: 600 15px var(--cond); letter-spacing: .18em;
  border-radius: 12px; border: 1px solid var(--hair);
  cursor: pointer;
  color: var(--ink); background: transparent;
}
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.btn.primary:disabled { background: rgba(255,255,255,.09); border-color: transparent; color: var(--dim); }
.btn.primary:not(:disabled):active { filter: brightness(1.15); }
.btn.ghost:active { background: rgba(255,255,255,.08); }
.btn.wide { width: 100%; }
.btn.danger-link {
  border: 0; background: none; color: var(--red);
  font: 500 12px var(--cond); letter-spacing: .06em;
  text-decoration: underline; text-underline-offset: 3px;
  padding: 10px; opacity: .8;
}

/* ---------- category pickers ---------- */
.panel-list { background: #050705; display: flex; flex-direction: column; }
.list-head {
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 12px;
  border-bottom: 1px solid var(--hair);
  font: 600 13px var(--cond); letter-spacing: .16em; color: var(--dim);
  flex: none;
}
.cat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 12px calc(10px + var(--safe-b)); }
.cat-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 15px 6px; border: 0; border-bottom: 1px solid var(--hair);
  background: transparent; color: var(--ink); text-align: left; cursor: pointer;
}
.cat-row:active { background: rgba(255,255,255,.06); }
.cat-row-name { font: 500 15px/1.3 var(--cond); flex: 1; }
.cat-row-page { font: 500 11px var(--mono); color: var(--dim); opacity: .65; flex: none; margin-right: 8px; }
.cat-row-count { font: 500 12px var(--mono); color: var(--dim); flex: none; }
.cat-row-count.done { color: var(--blue); }

.cat-row-wrap { display: flex; align-items: stretch; border-bottom: 1px solid var(--hair); }
.cat-row-wrap .cat-row { border-bottom: 0; flex: 1; }
.cat-row-grid {
  flex: none; width: 46px; display: grid; place-items: center;
  background: transparent; color: var(--dim); border: 0; border-left: 1px solid var(--hair);
  cursor: pointer;
}
.cat-row-grid:active { background: rgba(255,255,255,.06); color: var(--ink); }

/* ---------- category mosaic (whole main-category shelf at once) ---------- */
/* Fixed tile size, no in-app zoom/density control — use the phone's own
   native pinch-zoom instead (a custom JS pinch handler used to live here
   and fought with it, producing bad crops; removed). No touch-action
   override either, so native pinch-zoom isn't blocked on this element. */
.mosaic-grid {
  flex: 1; min-height: 0; overflow-y: auto;
  column-count: 3; column-gap: 4px;
  padding: 4px calc(4px + var(--safe-b)) calc(4px + var(--safe-b)) 4px;
}
/* masonry via CSS columns, not a fixed-cell grid — each tile keeps the
   photo's real aspect ratio (width:100%, height:auto below) instead of
   being forced into a square and object-fit:cover-cropped. Bigger and
   uncropped, at the cost of tile height varying by column (acceptable:
   this is a photo wall, not a data grid). */
.mosaic-tile {
  position: relative; display: block; width: 100%;
  break-inside: avoid; margin-bottom: 4px;
  border: 0; padding: 0; cursor: pointer;
  background: #0d0d0d; overflow: hidden; border-radius: 4px;
  transition: opacity .15s;
}
.mosaic-tile img {
  width: 100%; height: auto; display: block;
  transition: opacity .15s, filter .15s;
}
/* priced tiles fade back so the ones still needing a price stay visually
   dominant — the fade itself is the "already done" signal, the badge below
   is the explicit one */
.mosaic-tile.priced img { opacity: .4; filter: saturate(.6); }
/* these three states have no photo (yet or ever) to size the tile by, so
   they get a fixed square same as before */
.mosaic-tile.loading, .mosaic-tile.noimg, .mosaic-tile.stalled { aspect-ratio: 1; }
.mosaic-tile.loading::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,.07) 50%, transparent 60%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.mosaic-tile.noimg, .mosaic-tile.stalled { display: grid; place-items: center; font: 600 9px var(--cond); letter-spacing: .06em; }
.mosaic-tile.noimg { color: var(--dim); }
.mosaic-tile.noimg::before { content: 'SIN FOTO'; }
.mosaic-tile.stalled { color: var(--red); font-size: 17px; }
.mosaic-tile.stalled::before { content: '↻'; }
.mosaic-badge {
  position: absolute; top: 5px; right: 5px; width: 18px; height: 18px;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.35); border: 1.5px solid rgba(255,255,255,.6);
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.4);
  transition: background .15s, border-color .15s;
}
.mosaic-badge svg { opacity: 0; transition: opacity .15s; }
.mosaic-tile.priced .mosaic-badge {
  background: var(--blue); border-color: var(--blue);
}
.mosaic-tile.priced .mosaic-badge svg { opacity: 1; }
.mosaic-flags {
  position: absolute; top: 5px; left: 5px; display: flex; gap: 3px;
}
.mosaic-flags .dot {
  width: 7px; height: 7px; border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.5);
}
.mosaic-flags .dot.gluten { background: var(--purple); }
.mosaic-flags .dot.eco { background: var(--green); }
.mosaic-flags .dot.stock { background: var(--red); }
.mosaic-flags .dot.promo { background: var(--amber); }
.mosaic-flags .dot.note { background: var(--ink); }

/* ---------- category image walk ---------- */
.screen-walk { background: #050505; }
.walk-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 14px 20px;
  background: linear-gradient(rgba(0,0,0,.75), transparent);
}
.walk-cat { flex: 1; font: 500 11px var(--cond); letter-spacing: .1em; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.walk-pos { font: 600 12px var(--mono); color: var(--ink); flex: none; }
.walk-frame { position: absolute; inset: 0; background: #0a0a0a; }
#walk-img { width: 100%; height: 100%; object-fit: contain; }
.walk-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 13px var(--cond); letter-spacing: .16em; color: var(--dim);
}
.walk-placeholder[hidden] { display: none; }
.walk-placeholder.stalled { color: var(--red); }
.walk-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 50px; height: 68px; border: 0; background: rgba(0,0,0,.32);
  color: var(--ink); font: 500 30px/1 var(--cond); cursor: pointer;
}
.walk-arrow.left { left: 0; border-radius: 0 12px 12px 0; }
.walk-arrow.right { right: 0; border-radius: 12px 0 0 12px; }
.walk-arrow:active { background: rgba(255,255,255,.18); }
.walk-info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 18px 18px calc(16px + var(--safe-b));
  background: linear-gradient(transparent, rgba(0,0,0,.85) 45%);
}
.walk-info .ean-line { margin-top: 0; font-size: clamp(30px, 9.5vw, 44px); }
.walk-name { margin-top: 8px; font: 700 clamp(17px, 4.8vw, 21px)/1.3 var(--cond); color: var(--ink); max-width: 34ch; }
.walk-price {
  margin-top: 6px; padding: 4px 10px 4px 0;
  border: 0; background: transparent; cursor: pointer;
  font: 700 20px var(--mono); color: var(--amber);
}
.walk-price:active { opacity: .6; }
.walk-price.priced { color: var(--blue); }

/* per-item flags */
.walk-flags { display: flex; gap: 8px; margin-top: 10px; }
.flag-btn {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--hair); background: rgba(0,0,0,.35);
  color: var(--dim); font: 700 14px var(--mono); cursor: pointer;
  display: grid; place-items: center; transition: background .15s, border-color .15s, color .15s;
}
.flag-btn:active { filter: brightness(1.3); }
.flag-gluten.active { background: var(--purple-dk); border-color: var(--purple); color: var(--purple); }
.flag-eco.active { background: var(--green-dk); border-color: var(--green); color: var(--green); }
.flag-stock.active { background: var(--red-dk); border-color: var(--red); color: var(--red); }
.flag-promo.active { background: var(--amber-dk); border-color: var(--amber); color: var(--amber); }
.flag-note.active { background: rgba(242,244,241,.16); border-color: var(--ink); color: var(--ink); }

.overlay-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 40;
}
.overlay-popover {
  position: fixed; z-index: 41; left: 50%; bottom: calc(20px + var(--safe-b));
  transform: translateX(-50%);
  width: min(90vw, 380px); max-height: 70vh; overflow-y: auto;
  background: radial-gradient(140% 100% at 50% 0%, #071018 0%, #000 60%);
  border: 1px solid var(--hair); border-radius: 16px;
  padding: 18px 18px calc(14px + var(--safe-b));
  animation: rise .22s cubic-bezier(.2, .9, .3, 1);
}
.overlay-popover-title {
  font: 600 13px var(--cond); letter-spacing: .22em; color: var(--dim);
  margin-bottom: 14px;
}
.promo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.promo-code {
  padding: 10px 4px; border-radius: 10px; border: 1px solid var(--hair);
  background: transparent; color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.promo-code b { font: 700 20px var(--mono); color: var(--amber); }
.promo-code small { font: 500 9px var(--cond); letter-spacing: .04em; color: var(--dim); text-align: center; }
.promo-code:active, .promo-code.active { background: var(--amber-dk); border-color: var(--amber); }
.note-input {
  width: 100%; min-height: 100px; resize: vertical;
  background: rgba(255,255,255,.05); border: 1px solid var(--hair); border-radius: 10px;
  color: var(--ink); font: 500 15px/1.5 var(--cond); padding: 12px;
}

/* export */
.export-note { margin-top: 22px; font: 500 16px/1.6 var(--cond); color: var(--dim); max-width: 32ch; }
.export-note b { font-family: var(--mono); color: var(--blue); font-size: 19px; }
.export-note u { color: var(--ink); text-decoration-color: var(--blue); text-underline-offset: 3px; }
.prime-status { margin-top: 10px; font: 600 13px var(--mono); color: var(--blue); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--ink); color: #000;
  font: 600 13px var(--cond); letter-spacing: .12em;
  padding: 11px 20px; border-radius: 999px;
  z-index: 99;
  animation: rise .25s;
}
