/* =====================================================================
   VoltariTek app look (round 7): front page + configurator.
   Dark studio, faint grid, brand red as the only accent, glass panels.
   Every tap target >= 44px. Motion is off under prefers-reduced-motion.
   ===================================================================== */
:root {
  --bg: #0c0c0e; --bg-2: #141418; --panel: rgba(255,255,255,.045); --panel-2: rgba(255,255,255,.075);
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --text: #f3f0ea; --mute: #a39f97; --dim: #6f6b65;
  --brand: #fd1d25; --brand-2: #ff4b52; --glow: rgba(253,29,37,.45);
  --ok: #38d27a; --warn: #ffb020;
  --r: 14px; --ease: cubic-bezier(.2,.8,.2,1);
  --bar-h: 84px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body.app {
  min-height: 100vh; color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(253,29,37,.10), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  font: 400 16px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Sora", system-ui, sans-serif; letter-spacing: -.02em; margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, env(safe-area-inset-left));
  background: rgba(12,12,14,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font: 800 17px/1 "Sora", system-ui, sans-serif; }
.brand img { width: 30px; height: 30px; }
.top-links { margin-left: auto; display: flex; gap: 6px; }
.top-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--mute); font-weight: 600; font-size: 14px; }
.top-links a:hover { color: var(--text); background: var(--panel); }

/* ---------- buttons ---------- */
.btn-buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, var(--brand-2), var(--brand)); color: #fff;
  font: 800 17px/1 "Sora", system-ui, sans-serif; letter-spacing: .01em;
  box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn-buy:hover { box-shadow: 0 14px 40px -10px var(--glow), inset 0 1px 0 rgba(255,255,255,.3); filter: brightness(1.05); }
.btn-buy:active { transform: scale(.97); }
.btn-buy.is-blocked { background: #3a3a40; box-shadow: none; color: #cfcac2; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; }
.btn-ghost:hover { background: var(--panel-2); }

/* ---------- tooltip (vt-ui.js) ---------- */
.vt-tip { position: fixed; left: 0; top: 0; z-index: 90; max-width: min(320px, 90vw); padding: 10px 12px; border-radius: 10px;
  background: #f3f0ea; color: #141418; font: 500 13.5px/1.4 "Inter", system-ui, sans-serif; pointer-events: none;
  box-shadow: 0 12px 40px -12px rgba(0,0,0,.6); opacity: 0; transition: opacity .15s; }
.vt-tip.is-on { opacity: 1; }

/* ---------- 3D stage, app variant ---------- */
.stage { border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 30px 80px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); }

/* =========================== FRONT PAGE =========================== */
.front { width: min(1200px, 100%); margin: 0 auto; padding: 18px 16px 64px; }
.front-hero { display: grid; gap: 18px; align-items: center; padding: 8px 0 28px; }
.front-hero h1 { font-size: clamp(30px, 6.4vw, 60px); line-height: 1.02; font-weight: 800; }
.front-hero h1 em { font-style: normal; color: var(--brand-2); }
.front-sub { margin: 0; color: var(--mute); font-size: clamp(16px, 2.2vw, 19px); }
.front-3d { aspect-ratio: 16 / 10; width: 100%; }
.front-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.front-h2 { font-size: 15px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .14em; margin: 8px 0 14px; }
.ind-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ind-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 18px;
  min-height: 104px; padding: 14px; border-radius: var(--r); text-decoration: none; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); transition: transform .18s var(--ease), border-color .18s, background .18s;
  -webkit-touch-callout: none; user-select: none;
}
.ind-tile svg { width: 28px; height: 28px; stroke: var(--brand-2); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ind-tile span { font: 700 15px/1.2 "Sora", system-ui, sans-serif; }
.ind-tile:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--panel-2); }
.ind-tile:active { transform: scale(.97); }
.front-foot { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--dim); font-size: 13px; }
.front-foot a { color: var(--mute); }
@media (min-width: 900px) {
  .front-hero { grid-template-columns: 1fr 1.25fr; padding: 34px 0 40px; }
  .ind-grid { grid-template-columns: repeat(6, 1fr); }
}

/* =========================== CONFIGURATOR =========================== */
body.cfg { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
.rail { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.rail button { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 14px 0 6px;
  border: 0; border-radius: 999px; background: none; cursor: pointer; color: var(--mute); font: 700 14px/1 "Sora", system-ui, sans-serif; transition: background .2s, color .2s; }
.rail .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); font-size: 13px; transition: background .2s, color .2s; }
.rail button.is-done .n { background: rgba(253,29,37,.18); color: var(--brand-2); }
.rail button[aria-current="step"] { background: var(--text); color: #121214; }
.rail button[aria-current="step"] .n { background: var(--brand); color: #fff; }
@media (max-width: 560px) { .rail { margin-left: 0; width: 100%; justify-content: space-between; } .rail button { padding: 0 10px 0 6px; } .top.cfg-top { flex-wrap: wrap; gap: 6px; } }

.cfg-main { width: min(1380px, 100%); margin: 0 auto; padding: 14px 14px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cfg-main > * { min-width: 0; }   /* the horizontal tile scroller must not widen the column */
@media (min-width: 980px) { .cfg-main { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; padding: 20px 24px 24px; } .cfg-panel { position: sticky; top: 84px; } }

.cfg-3d { aspect-ratio: 16 / 9; width: 100%; }
@media (min-width: 980px) { .cfg-3d { aspect-ratio: 16 / 8; } }

/* the set: interactive true-shape tiles */
.set { min-height: 146px; display: flex; gap: 10px; margin-top: 12px; padding: 2px 2px 10px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
@media (min-width: 980px) { .set { flex-wrap: wrap; overflow: visible; } }
.tile { position: relative; flex: none; scroll-snap-align: start; display: grid; gap: 6px; padding: 10px 10px 8px; min-width: 196px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s, background .2s, opacity .25s; touch-action: pan-y; }
.tile.is-sel { border-color: var(--brand); background: rgba(253,29,37,.07); box-shadow: 0 0 0 1px var(--brand), 0 12px 30px -16px var(--glow); }
.tile.is-new { animation: tile-pop .45s var(--ease); }
.tile.is-gone { opacity: 0; transform: translateX(-60px) scale(.9); }
.tile.is-over { border-color: var(--warn); }
@keyframes tile-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.05); opacity: 1; } 100% { transform: none; } }
.tile-face { position: relative; display: grid; place-items: center; min-height: 64px; padding: 4px; border: 0; border-radius: 10px; background: none; cursor: pointer; container-type: inline-size; }
/* Round 10: one mm-to-px scale for the whole list (the longest Large label fills the tile),
   never per label, so every style and size keeps its true proportions side by side. */
.tile-face .vl { --s: calc(96cqw / 246.2); }
.tile-text { position: absolute; left: 10px; right: 10px; top: 10px; height: 64px; border: 0; background: none; cursor: text; display: none; border-radius: 8px; }
.tile.is-sel .tile-text { display: block; }
.tile.is-sel .tile-text:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.tile-input { position: absolute; left: 10px; right: 10px; top: 10px; height: 64px; z-index: 2; border: 0; border-radius: 8px; outline: none; text-align: center;
  background: rgba(12,12,14,.86); color: #fff; box-shadow: inset 0 0 0 2px var(--brand-2), 0 0 24px -4px var(--glow);
  font: italic 800 24px/1 "VT Serpentine", "Arial Black", sans-serif; caret-color: var(--brand-2); }
.tile-input.f-block { font: 800 21px/1 "Sora", sans-serif; } .tile-input.f-condensed { font: 600 24px/1 "Oswald", sans-serif; } .tile-input.f-legible { font: 700 22px/1 "Atkinson Hyperlegible", sans-serif; }
.tile-input.is-bad { box-shadow: inset 0 0 0 2px var(--warn); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tile-ctl { display: flex; align-items: center; gap: 4px; }
.tile-ctl button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: 700 18px/1 "Sora", sans-serif; transition: transform .12s, background .15s; }
.tile-ctl button:active { transform: scale(.92); }
.tile-ctl button:hover { background: var(--panel-2); }
.tile-qty { width: 52px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); text-align: center; font: 700 16px/1 "Inter", sans-serif; -moz-appearance: textfield; }
.tile-qty::-webkit-inner-spin-button, .tile-qty::-webkit-outer-spin-button { -webkit-appearance: none; }
.tile-ctl .tile-rm { margin-left: auto; color: var(--mute); }
.tile-ctl .tile-rm:hover { color: var(--brand-2); }

/* panels */
.cfg-panel { border-radius: 20px; padding: 16px; background: var(--panel); border: 1px solid var(--line); }
.pane { animation: pane-in .3s var(--ease); }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pane-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; font: 700 13px/1 "Inter", sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.pane-h + .pane-h, .pane-sec + .pane-h { margin-top: 18px; }
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick-grid .ind-tile { min-height: 84px; padding: 10px; gap: 10px; }
.pick-grid .ind-tile span { font-size: 13px; }
.pick-grid .ind-tile[aria-pressed="true"] { border-color: var(--brand); background: rgba(253,29,37,.1); }

.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { display: grid; justify-items: center; gap: 8px; min-height: 96px; padding: 12px 6px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: 600 13px/1.2 "Inter", sans-serif; color: var(--mute); transition: transform .15s var(--ease), border-color .2s; }
.swatch i { width: 46px; height: 46px; border-radius: 50%; box-shadow: inset 0 -6px 12px rgba(0,0,0,.35), inset 0 2px 4px rgba(255,255,255,.3); transition: transform .25s var(--ease), box-shadow .25s; }
.swatch[aria-checked="true"] { border-color: var(--text); color: var(--text); }
.swatch[aria-checked="true"] i { transform: scale(1.12); box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px var(--sw, var(--text)), 0 0 26px -2px var(--glow); }
.swatch[data-color="black"] i { box-shadow: inset 0 -6px 12px rgba(0,0,0,.35), inset 0 2px 4px rgba(255,255,255,.3), 0 0 0 1px rgba(255,255,255,.25); }
.swatch[data-color="black"][aria-checked="true"] i { box-shadow: 0 0 0 3px var(--bg-2), 0 0 0 5px #f3f0ea, 0 0 26px -2px rgba(255,255,255,.3); }
.swatch:active { transform: scale(.95); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.seg button { min-height: 44px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 800 16px/1 "Sora", sans-serif; color: var(--mute); transition: background .2s, color .2s; }
.seg button[aria-checked="true"] { background: var(--text); color: #121214; }
.fonts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.font-pill { display: grid; place-items: center; gap: 4px; min-height: 64px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .2s, transform .15s; }
.font-pill b { font-size: 24px; line-height: 1; color: var(--text); }
.font-pill small { font-size: 11px; color: var(--mute); }
.font-pill[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.font-pill:active { transform: scale(.95); }

.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; min-height: 52px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); color: var(--text); font: 600 17px/1 "Inter", sans-serif; }
.add input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(253,29,37,.2); }
.add input.is-bad { border-color: var(--warn); }
.add button { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--text); color: #121214; font: 800 26px/1 "Sora", sans-serif; cursor: pointer; transition: transform .15s; }
.add button:active { transform: scale(.92); }
.add-hint { min-height: 20px; margin: 6px 6px 0; font-size: 13px; color: var(--mute); }
.add-hint.is-bad { color: var(--warn); }
.cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cloud button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; cursor: pointer; font: 600 15px/1 "Inter", sans-serif; color: var(--text); transition: transform .15s var(--ease), background .2s, border-color .2s; }
.cloud button::before { content: "+ "; color: var(--brand-2); }
.cloud button:hover { background: var(--panel-2); border-style: solid; }
.cloud button:active { transform: scale(.94); }
.packs { display: grid; gap: 6px; margin-top: 8px; }
.packs button { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; }
.packs button span { color: var(--brand-2); font-size: 13px; }
.fly { position: fixed; z-index: 80; pointer-events: none; padding: 10px 16px; border-radius: 999px; color: #fff; font: italic 800 16px/1 "VT Serpentine", sans-serif; box-shadow: 0 10px 30px -8px var(--glow); }

/* buy bar */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(12,12,14,.86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.bb-sum { display: grid; gap: 2px; min-width: 0; }
.bb-total { font: 800 24px/1 "Sora", sans-serif; font-variant-numeric: tabular-nums; transition: color .3s; }
.bb-total.is-bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); color: var(--brand-2); } }
.bb-count { font-size: 13px; color: var(--mute); }
.buybar .btn-buy { margin-left: auto; min-width: 150px; min-height: 56px; font-size: 19px; }
@media (min-width: 980px) { .buybar { padding-left: max(24px, calc((100vw - 1380px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 1380px) / 2 + 24px)); } }

/* buy sheet */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); animation: fade .25s; }
.sheet-card { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0; background: #17171b; border: 1px solid var(--line-2); box-shadow: 0 -30px 80px -30px rgba(0,0,0,.8); animation: sheet-up .35s var(--ease); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-card { border-radius: 22px; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sheet-head h2 { font-size: 20px; }
.sheet-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 20px; }
.sheet-set { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 12px; border-radius: var(--r); background: rgba(0,0,0,.28); container-type: inline-size; max-height: 180px; overflow: auto; }
.sheet-set .vl { --s: .5px; }
.sheet-set .q { font: 700 12px/1 "Inter", sans-serif; color: var(--mute); align-self: center; margin-left: -4px; }
.sheet-meta { margin: 10px 2px 0; color: var(--mute); font-size: 14px; }
.sheet-total { display: flex; align-items: baseline; gap: 10px; margin: 12px 2px; }
.sheet-total strong { font: 800 30px/1 "Sora", sans-serif; }
.sheet-total span { color: var(--mute); font-size: 14px; }
.info { width: 44px; height: 44px; margin-left: auto; border-radius: 50%; border: 1px solid var(--line-2); background: none; cursor: help; font: 700 13px/1 "Sora", sans-serif; color: var(--mute); position: relative; }
.info::after { content: ""; position: absolute; inset: -8px; }
.note { display: block; margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: rgba(255,176,32,.12); color: #ffd27a; font-size: 14px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; margin: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 14.5px; }
.opt input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.sheet-note summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--mute); font-weight: 600; font-size: 14.5px; }
.sheet-note textarea { width: 100%; min-height: 80px; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,.3); color: var(--text); font: 400 15px/1.4 "Inter", sans-serif; }
.confirm { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 10px 0; padding: 0 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--brand); background: rgba(253,29,37,.08); font: 700 16px/1 "Sora", sans-serif; text-align: left; transition: background .2s, border-color .2s; }
.confirm i { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--brand-2); display: grid; place-items: center; transition: background .2s, transform .2s var(--ease); }
.confirm[aria-pressed="true"] { border-color: var(--ok); background: rgba(56,210,122,.1); }
.confirm[aria-pressed="true"] i { background: var(--ok); border-color: var(--ok); transform: scale(1.08); }
.confirm[aria-pressed="true"] i::after { content: ""; width: 7px; height: 12px; border: solid #0c0c0e; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.sheet .btn-buy.wide { width: 100%; min-height: 58px; font-size: 19px; }
.sheet-fine { margin: 10px 2px 0; color: var(--dim); font-size: 12.5px; text-align: center; }
.done { margin-top: 12px; padding: 14px; border-radius: var(--r); background: rgba(56,210,122,.1); border: 1px solid rgba(56,210,122,.35); }
.done p { margin: 0 0 10px; }
.done .row { display: flex; flex-wrap: wrap; gap: 8px; }
.done pre { max-height: 260px; overflow: auto; margin: 10px 0 0; padding: 10px; border-radius: 10px; background: #0c0c0e; color: #cfc9be; font: 400 11.5px/1.45 ui-monospace, Consolas, monospace; }

.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 14px); z-index: 70; transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  max-width: min(92vw, 440px); padding: 8px 8px 8px 16px; border-radius: 999px; background: #f3f0ea; color: #141418; font: 600 14px/1.3 "Inter", sans-serif; box-shadow: 0 12px 40px -12px rgba(0,0,0,.7); animation: sheet-up .25s var(--ease); }
.toast button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: #141418; color: #fff; font-weight: 700; cursor: pointer; }
.toast:not(:has(button)) { padding: 12px 16px; pointer-events: none; }   /* info only: never blocks the colour / size row */

/* =========================== ROUND 8: MAGIC BOX LAYOUT =========================== */
/* Until builder.js has rendered once, the app keeps its space but stays invisible:
   the first visible paint is the finished layout (no layout shift). */
.is-booting .app-main, .is-booting .buybar { visibility: hidden; }
.card { border-radius: 20px; padding: 14px; background: var(--panel); border: 1px solid var(--line); }
.app-main { width: min(1440px, 100%); margin: 0 auto; padding: 12px 12px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.app-main > * { min-width: 0; }
.col-left { display: grid; gap: 14px; align-content: start; }
.col-left > *, .magic > *, .col-center > * { min-width: 0; }   /* the genre strip scrolls; it must not widen the column */
.col-center { display: grid; gap: 10px; align-content: start; }
@media (min-width: 980px) {
  .app-main { grid-template-columns: 360px minmax(0, 1fr) 330px; padding: 18px 22px 24px; align-items: start; }
  .col-left { position: sticky; top: 84px; }
  .col-center { position: sticky; top: 84px; }
  .col-right { position: sticky; top: 84px; height: calc(100vh - 190px); max-height: 640px; display: flex; flex-direction: column; }
}
@media (max-width: 979px) { .col-center { order: -1; } }

/* magic box */
.magic { display: grid; gap: 10px; box-shadow: 0 0 0 1px rgba(253,29,37,.12), 0 20px 50px -30px var(--glow); }
.magic-row { display: flex; gap: 8px; }
.magic-row input { flex: 1; min-width: 0; min-height: 58px; padding: 0 18px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(0,0,0,.35);
  color: var(--text); font: 800 22px/1 "Sora", system-ui, sans-serif; letter-spacing: -.01em; caret-color: var(--brand-2); }
.magic-row input::placeholder { color: var(--dim); font-weight: 600; }
.magic-row input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(253,29,37,.18); }
.magic-row input.is-bad { border-color: var(--warn); }
.magic-row .btn-buy { min-height: 58px; min-width: 88px; border-radius: 16px; padding: 0 18px; }
.magic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 44px; }
.infer-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.04); color: var(--mute); font: 600 14px/1 "Inter", sans-serif; cursor: pointer; animation: fade .25s; }
.infer-chip b { color: var(--text); font-weight: 700; }
.infer-chip i { font-style: normal; font-size: 11px; color: var(--dim); }
.infer-chip[data-state="ambiguous"] { border-style: dashed; }
.fix { font-size: 14px; color: var(--mute); }
.fix button { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--brand-2); font-weight: 700; text-decoration: underline; cursor: pointer; }
.cands { display: grid; gap: 4px; padding: 6px; border-radius: 14px; background: #1c1c21; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.7); }
.cands button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; font-weight: 600; }
.cands button:hover { background: var(--panel-2); }
.cands svg { width: 20px; height: 20px; stroke: var(--brand-2); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.genres { min-height: 68px; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scroll-snap-type: x proximity; }
.genre { position: relative; flex: none; display: grid; justify-items: center; gap: 4px; min-width: 76px; min-height: 64px; padding: 8px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0,0,0,.2); cursor: pointer; scroll-snap-align: start; transition: border-color .2s, transform .15s; container-type: inline-size; }
.genre .vl { --s: .9px; }
.genre span { font: 600 11.5px/1.1 "Inter", sans-serif; color: var(--mute); white-space: nowrap; }
.genre[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.genre[aria-checked="true"] span { color: var(--text); }
.genre:active { transform: scale(.95); }
.genre .pending { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.suggest { min-height: 0; opacity: 0; transform: translateY(6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.suggest.is-on { opacity: 1; transform: none; }
.suggest-h { margin: 2px 2px 6px; font: 700 12px/1 "Inter", sans-serif; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.suggest-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sug { display: inline-grid; place-items: center; min-height: 44px; min-width: 44px; padding: 4px 6px; border-radius: 12px; border: 1px dashed var(--line-2); background: transparent; cursor: pointer; transition: transform .15s var(--ease), border-color .2s; }
.sug .vl { --s: .42px; }
.sug:hover { border-style: solid; border-color: var(--line-2); background: var(--panel-2); }
.sug:active { transform: scale(.93); }

/* fit meter on the 3D stage */
.fit { position: absolute; z-index: 3; left: 14px; right: 14px; top: 12px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.fit i { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.fit b { display: block; height: 100%; width: 0; border-radius: 2px; background: #6fd39a; transition: width .2s var(--ease), background .2s; }
.fit span { font: 600 12px/1 "Inter", sans-serif; color: var(--mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fit[data-state="near"] b { background: var(--warn); }
.fit[data-state="over"] b { background: var(--brand-2); }
.fit[data-state="over"] span { color: var(--brand-2); }
.fit[data-state="empty"] { opacity: 0; }

/* welcome back */
.welcome { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(253,29,37,.16), rgba(255,255,255,.04)); border: 1px solid var(--line-2); animation: sheet-up .35s var(--ease); }
.welcome span { font-weight: 700; }
.btn-buy.small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.link { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--mute); text-decoration: underline; cursor: pointer; font-size: 14px; }

/* the list (right column; bottom sheet on phones) */
.col-right { border-radius: 20px; padding: 12px; background: var(--panel); border: 1px solid var(--line); }
.list-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 8px; }
.list-head h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--brand); color: #fff; font: 800 13px/1 "Sora", sans-serif; }
.col-right .set { flex-direction: column; flex-wrap: nowrap; overflow-y: auto; overflow-x: hidden; min-height: 0; margin: 0; padding: 2px; }
.col-right .tile { min-width: 0; width: 100%; }
.empty-list { padding: 16px 6px; }
.list-close { display: none; }
.listbtn { display: none; }
@media (max-width: 979px) {
  .col-right { position: fixed; left: 0; right: 0; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); z-index: 45; max-height: 68vh; display: flex; flex-direction: column;
    border-radius: 22px 22px 0 0; background: #17171b; transform: translateY(calc(100% + var(--bar-h) + 60px)); visibility: hidden;
    transition: transform .32s var(--ease), visibility 0s .32s; box-shadow: 0 -30px 80px -30px rgba(0,0,0,.8); }
  .col-right.is-open { visibility: visible; transition: transform .32s var(--ease); }
  .col-right.is-open { transform: none; }
  .list-close { display: inline-block; }
  .listbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 56px; min-height: 52px; padding: 0 10px; border-radius: 14px;
    border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; }
  .listbtn b { font: 800 18px/1 "Sora", sans-serif; }
  .listbtn span { font-size: 11px; color: var(--mute); }
  .listbtn.is-bump { animation: bump .4s var(--ease); }
}

/* ---- round 9 ---------------------------------------------------------- */
/* colour row + size, directly under the 3D (both pages) */
/* Fixed row heights and no wrapping: a font swap or a longer palette can never move the page (CLS 0). */
.look-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 8px 12px; }
.swatches.crow { display: flex; flex-wrap: nowrap; gap: 6px; height: 60px; align-items: center; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding: 0 2px; }
.crow .swatch { flex: none; }
@media (max-width: 560px) { .look-row { grid-template-columns: minmax(0, 1fr); } .seg.sizes { height: 56px; } }
.crow .swatch { min-height: 44px; min-width: 52px; padding: 6px 6px 5px; gap: 4px; border-radius: 12px; font-size: 11px; }
.crow .swatch i { width: 26px; height: 26px; }
.crow .swatch[aria-checked="true"] i { transform: scale(1.08); box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--sw, var(--text)), 0 0 18px -2px var(--glow); }
.crow .swatch[data-color="black"][aria-checked="true"] i { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px #f3f0ea; }
.seg.sizes { grid-template-columns: repeat(3, minmax(64px, 1fr)); flex: 0 0 auto; border-radius: 16px; }
.seg.sizes button { display: grid; place-items: center; gap: 2px; min-height: 48px; padding: 4px 10px; border-radius: 12px; }
.seg.sizes button b { font: 800 16px/1 "Sora", sans-serif; }
.seg.sizes button small { font: 600 11px/1 "Inter", sans-serif; opacity: .8; }
/* dimension readouts: "Label size" + Height + Length (stage and every tile) */
.dims { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0; font: 500 12px/1.3 "Inter", sans-serif; color: var(--mute); font-variant-numeric: tabular-nums; }
.dims small { width: 100%; font: 700 10px/1 "Inter", sans-serif; text-transform: uppercase; letter-spacing: .14em; opacity: .8; }
.dims b { color: var(--text); font-weight: 700; }
.stage-dims { position: absolute; z-index: 3; left: 14px; top: 26px; padding: 6px 10px; border-radius: 10px; background: rgba(10,10,12,.55); pointer-events: none; }
.tile-dims { padding: 0 4px; }
.tile-dims small { width: auto; }
/* Cart (n) + Checkout: always above the list (and the phone sheet's header) */
.cart-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cartbtn { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; font: 700 15px/1 "Sora", sans-serif; }
.cartbtn b { font-weight: 800; }
.cart-head .btn-buy { margin-left: auto; }
.cart-head .btn-buy.is-blocked, .btn-buy.is-blocked { opacity: .55; }
.cart-head .list-close { margin-left: 4px; }
/* label sets for the trade */
.sets[hidden] { display: none; }
.set-row { display: flex; flex-wrap: wrap; gap: 6px; }
.set-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); cursor: pointer; font: 600 14px/1.1 "Inter", sans-serif; transition: transform .15s var(--ease), background .2s; }
.set-chip span { font: 800 12px/1 "Sora", sans-serif; color: var(--mute); }
.set-chip.is-on { border-color: var(--brand); background: rgba(253,29,37,.08); }
.set-chip:hover { background: var(--panel-2); }
.set-chip:active { transform: scale(.95); }
@media (max-width: 979px) {
  .listbtn { display: inline-block; white-space: nowrap; padding: 0 12px; line-height: 52px; font: 700 15px/52px "Sora", sans-serif; color: var(--text); }
  .listbtn b { font-size: 15px; }
  /* one compact line under the fit meter, clear of the label */
  .stage-dims { top: 24px; left: 10px; right: auto; padding: 3px 8px; font-size: 11px; flex-wrap: nowrap; white-space: nowrap; gap: 8px; }
  .stage-dims small { width: auto; font-size: 9px; }
}

/* ---- round 10 / 13: fixed physical scale on the stage ------------------------
   The static label uses --ppm from vt-label.css (same px-per-mm as label-3d.js). */
/* faint scale reference: the current size's height and a 50mm ruler, same scale */
.stage-ruler { --s: var(--ppm); position: absolute; z-index: 3; left: 14px; bottom: 12px; display: flex; align-items: flex-end; gap: 5px;
  pointer-events: none; color: rgba(255,255,255,.42); font: 600 10px/1 "Inter", sans-serif; font-variant-numeric: tabular-nums; }
.stage-ruler .ruler-h { display: block; width: 5px; height: calc(var(--size-hmm, 34) * var(--s)); border: 1px solid rgba(255,255,255,.32); border-left: 0; }
.stage-ruler .ruler-50 { display: block; margin-left: 8px; width: calc(50 * var(--s)); height: 6px; border: 1px solid rgba(255,255,255,.32); border-top: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.32) 0 1px, transparent 1px calc(10 * var(--s))); }
.stage-ruler span { display: block; height: 11px; line-height: 11px; margin-bottom: -1px; white-space: nowrap; }   /* fixed box: no shift when Inter loads */
.stage-ruler .ruler-h + span { width: 40px; }

/* fly-in ghost */
.fly-layer { position: fixed; inset: 0; pointer-events: none; z-index: 85; }
.fly-ghost { position: fixed; container-type: inline-size; filter: drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
.fly-ghost .vl { --s: calc(100cqw / var(--mm)); }

/* front page */
.front-head { width: min(1440px, 100%); margin: 0 auto; padding: 18px 22px 0; }
.front-head h1 { font-size: clamp(28px, 4.4vw, 50px); line-height: 1.04; font-weight: 800; }
.front-head h1 em { font-style: normal; color: var(--brand-2); }
.front-head .front-sub { margin: 6px 0 0; }
.front-tiles { padding-top: 10px; padding-bottom: calc(var(--bar-h) + 40px); }
.front-page .cfg-3d { aspect-ratio: 16 / 10; }

/* print sheet (unchanged look: paper) */
.ps { position: fixed; inset: 0; z-index: 95; background: #8f8a80; overflow: auto; padding: 1rem; color: #000; }
.ps-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 auto 1rem; max-width: 279mm; }
.ps-sheet { background: #fff; width: 279mm; max-width: 100%; margin: 0 auto; padding: 10mm; overflow-x: auto; font-family: "Inter", sans-serif; }
.ps-head { display: flex; justify-content: space-between; gap: 6mm; border-bottom: .6mm solid #000; padding-bottom: 3mm; margin-bottom: 4mm; }
.ps-head h2 { font-size: 16pt; }
.ps-head dl { display: grid; grid-template-columns: auto auto; gap: .6mm 4mm; margin: 0; font-size: 9pt; }
.ps-head dt { font-weight: 700; } .ps-head dd { margin: 0; }
.ps-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.ps-table th { text-align: left; border-bottom: .4mm solid #000; padding: 1.5mm 2mm; }
.ps-table td { border-bottom: .2mm solid #bbb; padding: 2.5mm 2mm; vertical-align: middle; }
.ps-table .vl { --s: 1mm; }
.ps-box { display: inline-block; width: 5mm; height: 5mm; border: .4mm solid #000; }
@media print {
  @page { size: letter landscape; margin: 8mm; }
  body.is-printing > *:not(.ps) { display: none !important; }
  .ps { position: static; background: #fff; padding: 0; }
  .ps-sheet { width: auto; padding: 0; } .no-print { display: none !important; }
}

/* ---- round 14: the set creator list, set chips in the bar, "Apply to" ------------- */
/* Below the Cart/Checkout header: one small set header row, the dense label rows, then
   "Add set to cart". The whole column scrolls as one. */
.rlist { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; overflow-x: hidden; }
.col-right .rlist .set { flex: none; overflow: visible; min-height: 0; gap: 2px; }
.set-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 4px; padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.set-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.set-meta { grid-column: 1; margin: 2px 0 0; font: 500 12px/1.3 "Inter", sans-serif; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-ic { grid-row: 1 / span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.set-ic:nth-of-type(1) { grid-column: 2; } .set-ic:nth-of-type(2) { grid-column: 3; }
.set-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.set-ic:hover:not(:disabled) { background: var(--panel-2); }
.set-ic:disabled { opacity: .3; cursor: default; }
.addset { width: 100%; flex: none; min-height: 48px; font-size: 16px; }
.addset:disabled { opacity: .4; cursor: default; box-shadow: none; }
/* one dense row per label: the image fills the row (one scale for the list: the set's longest
   label fills it, capped), qty stepper far right; text / size live in the tooltip. */
.col-right .tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; min-width: 0; width: 100%;
  padding: 2px 2px 2px 4px; border-radius: 10px; border: 1px solid transparent; background: none; box-shadow: none; }
.col-right .tile:hover { background: rgba(255,255,255,.03); }
.col-right .tile.is-sel { border-color: var(--brand); background: rgba(253,29,37,.07); box-shadow: none; }
.col-right .tile.is-own .tile-face::after { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 60%; transform: translateY(-50%); border-radius: 2px; background: var(--warn); }
.tile-main { position: relative; min-width: 0; }
.col-right .tile-face { display: flex; justify-content: flex-start; align-items: center; width: 100%; min-height: 36px; padding: 2px 0 2px 6px; cursor: text; }
.col-right .tile-face .vl { --s: var(--cs, .8px); }
.col-right .tile-input { left: 0; right: 0; top: 0; bottom: 0; height: auto; }
.col-right .tile-ctl { gap: 2px; }
.col-right .tile-qty { width: 40px; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 979px) { .col-right .tile-face { min-height: 44px; } .col-right .tile-qty { width: 44px; } }
@media (min-width: 980px) and (pointer: fine) {
  .col-right .tile-ctl button { width: 30px; height: 30px; border-radius: 8px; font-size: 15px; }
  .col-right .tile-qty { width: 38px; height: 30px; border-radius: 8px; font-size: 14px; }
}
/* "Apply to: Whole set | This label" under the 3D */
.seg.scope { display: flex; align-items: center; gap: 4px; padding: 4px; }
.seg.scope span { padding: 0 6px 0 4px; font: 600 11px/1 "Inter", sans-serif; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.seg.scope button { min-height: 44px; padding: 0 10px; border-radius: 12px; white-space: nowrap; font: 600 13px/1 "Inter", sans-serif; }
.seg.scope button:disabled { opacity: .4; cursor: default; }
.look-row { grid-template-columns: minmax(0, 1fr) auto; }
.look-row .seg.scope { grid-column: 1 / -1; justify-self: start; }
/* set chips in the bottom bar: Set 1, Set 2 ... style swatches + label count */
.bb-sets { display: flex; align-items: center; gap: 6px; min-width: 0; height: 48px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.chip-set { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); cursor: pointer; font: 600 13px/1 "Inter", sans-serif; transition: background .15s, border-color .15s; }
.chip-set b { font: 800 13px/1 "Sora", sans-serif; }
.chip-set:hover { background: var(--panel-2); }
.chip-set.is-cur { border-color: var(--brand); background: rgba(253,29,37,.12); box-shadow: 0 0 0 1px var(--brand); }
.chip-set.is-empty .chip-n { color: var(--mute); font-weight: 500; }
.chip-dots { display: inline-flex; }
.chip-dots i { width: 12px; height: 12px; border-radius: 50%; margin-left: -3px; box-shadow: 0 0 0 2px #121214; }
.chip-dots i:first-child { margin-left: 0; }
.chip-n { font: 800 13px/1 "Sora", sans-serif; }
.chip-new { border-style: dashed; color: var(--mute); }
@media (min-width: 980px) { .bb-sets { flex: 1 1 auto; } }
@media (max-width: 979px) {
  /* phone: the chips get their own row on top of the bar (always there: no layout shift);
     Cart, total and Checkout stay on one row below it */
  :root { --bar-h: 136px; }
  .buybar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "sets sets sets" "list sum buy"; row-gap: 6px; column-gap: 12px; }
  .bb-sets { grid-area: sets; }
  .buybar .listbtn { grid-area: list; }
  .buybar .bb-sum { grid-area: sum; }
  .buybar .btn-buy { grid-area: buy; margin-left: 0; min-width: 0; padding: 0 20px; }
  /* the hint moves right so it never sits on the ruler's "50 mm" */
  .cfg-3d .vt3d-hint { left: auto; right: 12px; text-align: right; }
}
/* ---- round 15: words in more than one place --------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; padding: 16px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); animation: fade .2s; }
.modal-card { position: relative; width: min(460px, 100%); max-height: 86vh; overflow: auto; padding: 20px; border-radius: 20px; background: #17171b;
  border: 1px solid var(--line-2); box-shadow: 0 30px 90px -20px rgba(0,0,0,.9); animation: sheet-up .25s var(--ease); }
.modal-card h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.3; }
.dupes { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.dupes > li { padding: 10px 12px; border-radius: 12px; background: rgba(255,170,0,.08); border: 1px solid rgba(255,170,0,.35); }
.dupes > li > b { font: 800 16px/1.2 "Sora", sans-serif; }
.dupes ul { margin: 6px 0 0; padding-left: 18px; color: var(--mute); font-size: 14px; line-height: 1.5; }
/* round 16: the two buttons side by side, equal width; stacked only on very narrow screens */
.modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal-row button { min-height: 48px; min-width: 0; padding: 6px 10px; font-size: 15px; line-height: 1.2; white-space: normal; text-align: center; }
@media (max-width: 319px) { .modal-row { grid-template-columns: 1fr; } }
/* round 16: "Copy this line" on every row */
.tile-ctl .tile-copy { display: grid; place-items: center; color: var(--mute); }
.tile-ctl .tile-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile-ctl .tile-copy:hover { color: var(--text); }
/* round 16: repeats are marked in the order summary and on the print sheet */
.sheet-set .rep { align-self: center; margin-left: -4px; padding: 2px 6px; border-radius: 999px; background: rgba(255,176,32,.16); color: var(--warn); font: 700 11px/1.2 "Inter", sans-serif; }
.sheet-rep { width: 100%; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.35); font: 500 13px/1.4 "Inter", sans-serif; }
.ps-rep { display: block; margin-top: 1mm; padding: .6mm 1.5mm; border: .3mm solid #000; font-size: 7.5pt; font-weight: 700; }
/* "Go back and fix": the duplicate rows and their set chips glow until fixed */
.col-right .tile.is-dupe { border-color: var(--warn); background: rgba(255,170,0,.1); }
.chip-set.is-dupe { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }
.chip-set.is-dupe.is-cur { box-shadow: 0 0 0 1px var(--brand), 0 0 0 3px var(--warn); }
/* "+ New set" stays visible at the right end of the chip row (phones scroll the row) */
.chip-set.chip-new { position: sticky; right: 0; z-index: 1; background: #17171b; box-shadow: -14px 0 14px -4px rgba(12,12,14,.95); }
.sheet-grp { width: 100%; margin: 6px 0 0; font: 600 12px/1.3 "Inter", sans-serif; color: var(--mute); }
.sheet-grp:first-child { margin-top: 0; }
.ps-set { margin: 5mm 0 1mm; font-size: 10pt; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
