/* ===========================================================================
   Rip and Clip — Canva-style layout, MTG Precons palette.

   Palette sampled from mtgprecons.co.uk: logo orange #ff9000, white ground,
   near-black ink (#121212), Assistant typeface.

   The idiom is Canva's: white/near-white ground, generously rounded cards,
   soft diffuse shadows, big friendly type, pill buttons with confident fills.
   Not Canva's brand — Canva's *layout language*, wearing MTG Precons colours.

   NOTE ON TOKEN NAMES: --bg-raised, --bg-sunken etc. are inherited from the
   previous dark theme and deliberately kept, because stats.html and the
   JS-generated markup reference them. Their meanings are re-mapped for light
   (raised = white card above the ground, sunken = the tinted well below it).
   Renaming them would be a bigger, riskier diff than living with the names.
   =========================================================================== */

@font-face {
  font-family: 'Assistant';
  font-style: normal;
  font-weight: 200 800;          /* one variable file covers the whole range */
  font-display: swap;
  src: url('/fonts/assistant-var.woff2') format('woff2-variations');
}

:root {
  /* brand */
  --accent: #ff9000;             /* the logo orange, sampled */
  --accent-strong: #e07c00;      /* hover / pressed FILLS only — 2.98:1 on white,
                                    far too light to set text in */
  --accent-text: #a85c00;        /* the orange for links and text: 5.0:1 on white.
                                    Same hue, stepped dark enough to actually read. */
  --accent-soft: #fff4e5;        /* tinted wash */
  --accent-line: #ffd9a6;
  --ink: #121212;                /* MTG Precons body ink */

  /* surfaces — light now */
  --bg: #fbfaf9;                 /* page ground, a hair off pure white */
  --bg-raised: #ffffff;          /* cards sit above the ground */
  --bg-sunken: #f4f2f0;          /* wells sit below it */
  --line: #e6e2de;
  --line-soft: #f0edea;

  --text: #121212;
  --text-dim: #55524e;
  --text-faint: #6e6a64;        /* 5.2:1 on the page, 4.8:1 in a well */

  --good: #12805c;
  --warn: #a35b00;
  --bad: #c3362b;

  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(18,18,18,.06), 0 2px 8px rgba(18,18,18,.04);
  --shadow-md: 0 2px 6px rgba(18,18,18,.06), 0 12px 28px rgba(18,18,18,.08);
  --shadow-accent: 0 6px 20px rgba(255,144,0,.32);

  --font: 'Assistant', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

/* The `hidden` attribute must beat any component's own display rule.
   Without this, `.ratelimit { display: grid }` silently defeats
   <div id="ratelimit" hidden> and the "Daily limit reached" panel shows to
   every first-time visitor — which is exactly what it did in the previous
   theme, live, unnoticed. Any component that sets `display` reintroduces the
   bug, so fix it once here rather than per-component. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.022em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: 1.02rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); }

kbd {
  font: 700 .72em var(--mono);
  background: #fff; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 6px; padding: .15em .45em; color: var(--text-dim);
}

/* --- header --------------------------------------------------------------- */

.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 800; letter-spacing: -.02em; font-size: 1.12rem; }
.brand:hover { text-decoration: none; }
.brand em { color: var(--accent-text); font-style: normal; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 11px; background: var(--accent); color: var(--ink);
  font-weight: 800; font-size: 1.05rem; box-shadow: var(--shadow-accent);
}
.site-head nav { display: flex; gap: 1.4rem; font-size: .96rem; font-weight: 600; }
.site-head nav a { color: var(--text-dim); }
.site-head nav a:hover { color: var(--ink); text-decoration: none; }

main { max-width: 1140px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem) 5rem; }

/* --- hero ----------------------------------------------------------------- */

.hero { padding: clamp(3rem, 8vw, 5.5rem) 0 2.5rem; max-width: 44rem; }
.hero h1 { margin-bottom: .35em; }
.hero h1 .hl {
  background: linear-gradient(180deg, transparent 68%, rgba(255,144,0,.32) 68%, rgba(255,144,0,.32) 96%, transparent 96%);
  padding: 0 .04em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.lede { font-size: clamp(1.1rem, 2.1vw, 1.32rem); color: var(--text-dim); margin: 0 0 1rem; }
.lede-sub { color: var(--text-faint); margin: 0; font-size: 1rem; }

.notice {
  margin: 1.5rem 0 0; padding: .8rem 1.05rem;
  border: 1px solid var(--accent-line); border-radius: var(--radius);
  background: var(--accent-soft); color: #7a4a00; font-size: .95rem;
}

/* --- the tool card -------------------------------------------------------- */

.tool {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--bg-raised); box-shadow: var(--shadow-md);
  padding: clamp(1.1rem, 3vw, 2rem);
}

.controls { display: flex; gap: 1rem; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.field.grow { flex: 1 1 18rem; }

select, input[type="text"], input[type="email"], input[type="password"] {
  font: 400 1rem var(--font); color: var(--text);
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 11px; padding: .6rem .8rem; transition: border-color .15s, box-shadow .15s;
}
select:hover, input:hover { border-color: #d6d1cb; }
select:focus-visible, input:focus-visible, button:focus-visible, .dropzone:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,144,0,.18);
}
.dropzone:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: #7a4a00; border-radius: var(--radius-pill);
  padding: .2rem .4rem .2rem .8rem; font-size: .88rem; font-weight: 600;
}
.chip button { background: none; border: 0; color: inherit; cursor: pointer; font-size: .95em; padding: 0 .3rem; border-radius: 50%; }
.chip button:hover { background: rgba(0,0,0,.07); }

.hint { color: var(--text-faint); font-size: .9rem; margin: .6rem 0 0; }

.dropzone {
  margin-top: 1.35rem; display: grid; gap: .4rem; place-items: center;
  padding: clamp(2.2rem, 6vw, 3.8rem); text-align: center; cursor: pointer;
  border: 2px dashed #ddd7d0; border-radius: var(--radius-lg);
  background: var(--bg-sunken);
  transition: border-color .15s, background .15s, transform .15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); border-style: solid; transform: scale(1.005); }
.dropzone strong { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.dropzone span { color: var(--text-faint); font-size: .93rem; }
.dropzone .dz-icon {
  width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center;
  background: var(--accent); color: var(--ink); font-size: 1.5rem; margin-bottom: .5rem;
  box-shadow: var(--shadow-accent);
}

.turnstile { margin-top: .8rem; }

/* --- progress ------------------------------------------------------------- */

.progress { margin-top: 1.35rem; }
.progress-row { display: flex; justify-content: space-between; font-size: .92rem; font-weight: 600; color: var(--text-dim); margin-bottom: .45rem; }
.bar { height: 10px; border-radius: var(--radius-pill); background: var(--bg-sunken); overflow: hidden; position: relative; }
.bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--fill, 0%);
  background: linear-gradient(90deg, var(--accent), #ffb347);
  border-radius: inherit; transition: width .25s ease;
}
.bar.is-indeterminate::after { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { left: -35%; } 100% { left: 100%; } }

.error {
  margin-top: 1rem; padding: .8rem 1.05rem; border-radius: var(--radius);
  border: 1px solid #f2c4bf; background: #fdf1f0; color: #8e2018; font-weight: 500;
}
.ratelimit {
  margin-top: 1rem; padding: 1rem 1.15rem; border-radius: var(--radius);
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  display: grid; gap: .3rem; font-size: .95rem; color: #7a4a00;
}
.ratelimit strong { color: var(--ink); }

/* --- workspace ------------------------------------------------------------ */

.workspace { display: none; gap: 1.5rem; margin-top: 1.5rem; }
body[data-stage="reviewing"] .workspace,
body[data-stage="rendering"] .workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); }
body[data-stage="reviewing"] .dropzone,
body[data-stage="rendering"] .dropzone,
body[data-stage="working"] .dropzone,
body[data-stage="done"] .dropzone { display: none; }

/* The stage stays dark on purpose: a light UI around a video player washes
   the footage out, and every editor worth using keeps the canvas dark. */
.stage-col { background: #14151a; border-radius: var(--radius-lg); padding: .85rem; }
video { width: 100%; border-radius: 13px; background: #000; display: block; max-height: 60vh; }

.timeline { margin-top: .65rem; }
.tl-track { position: relative; height: 36px; border-radius: 10px; cursor: pointer; background: #222329; border: 1px solid #2c2e36; }
.tl-ticks { position: absolute; inset: 0; }
.tl-tick {
  position: absolute; top: 5px; width: 5px; height: 26px; margin-left: -2.5px;
  padding: 0; border: 0; border-radius: 3px; cursor: pointer; background: var(--accent);
  transition: transform .1s;
}
.tl-tick:hover, .tl-tick.is-selected { transform: scaleX(2.2); }
.tl-tick.status-not_found { background: #ffc75c; }
.tl-tick.status-error { background: #ff6b5e; }
.tl-tick.status-pending { background: #6d6f78; }
.tl-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: .85; pointer-events: none; }

.stage-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .85rem; }
.stage-col .stage-actions { padding: 0 .15rem .15rem; }
.stage-col .summary { color: #a9abb4; }
.stage-col + .hint, .stage-col .hint { color: var(--text-faint); }
.summary { font-size: .95rem; font-weight: 600; margin-right: auto; color: var(--text-dim); }

.btn {
  font: 700 1rem/1 var(--font); border-radius: var(--radius-pill);
  padding: .78rem 1.35rem; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:active { transform: translateY(1px); }
/* Black on orange, not white: white on #ff9000 is 2.27:1, which fails AA and
   looks washed out. Black is 8.24:1 — and it is exactly what the MTG Precons
   logo does with the same orange. */
.btn.primary { background: var(--accent); color: var(--ink); box-shadow: var(--shadow-accent); }
.btn.primary:hover { background: var(--accent-strong); color: #fff; }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-text); }
.stage-col .btn.ghost { background: #21232a; border-color: #33353e; color: #e6e7ea; }
.stage-col .btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.stage-col kbd { background: #2a2c34; border-color: #3a3d46; color: #c9cad1; }

/* --- marker list ---------------------------------------------------------- */

.side-col { min-width: 0; }
.side-col h2 { margin-top: 1.5rem; }
.side-col h2:first-child { margin-top: 0; }

.marker-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; max-height: 42vh; overflow: auto; }
.marker-empty { color: var(--text-faint); font-size: .92rem; padding: 1rem; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; }

.marker {
  border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 13px; background: #fff; padding: .6rem .7rem;
  display: grid; gap: .45rem; box-shadow: var(--shadow-sm);
}
.marker.status-ok { border-left-color: var(--good); }
.marker.status-not_found { border-left-color: var(--warn); }
.marker.status-error { border-left-color: var(--bad); }
.marker.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,144,0,.16); }

.marker-main { display: flex; align-items: center; gap: .5rem; }
.marker-time {
  font: 700 .8rem var(--mono); color: var(--text-dim); background: var(--bg-sunken);
  border: 0; border-radius: 7px; padding: .25rem .45rem; cursor: pointer;
}
.marker-time:hover { color: var(--ink); background: var(--accent); }
.marker-thumb { width: 28px; height: 39px; object-fit: cover; border-radius: 4px; background: var(--bg-sunken); flex: none; }
.marker-thumb.is-empty { display: inline-block; }
.marker-name { flex: 1 1 auto; min-width: 0; font-size: .95rem; padding: .35rem .5rem; }

.marker-meta { display: flex; align-items: center; gap: .35rem; }
.price {
  font: 800 1.05rem var(--font); color: var(--ink); background: none;
  border: 1.5px solid transparent; border-radius: 8px; padding: .15rem .45rem;
  cursor: pointer; margin-right: auto;
}
.price:hover { border-color: var(--line); }
.price.is-manual { color: var(--warn); }
.price-input { width: 7rem; font: 800 .95rem var(--font); margin-right: auto; }
.foil {
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer;
  color: var(--text-faint); padding: .2rem .45rem;
}
.foil.is-on { color: #0a6c94; border-color: #8fd4ec; background: #e8f7fd; }
.marker-sound { font-size: .85rem; padding: .25rem .35rem; border-radius: 8px; }
.marker.sound-manual .marker-sound { border-color: var(--accent); }
.icon-btn {
  background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
  color: var(--text-dim); cursor: pointer; padding: .2rem .45rem; font-size: .82rem;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.icon-btn.danger:hover { color: var(--bad); border-color: var(--bad); }
.marker-note { margin: 0; font-size: .82rem; color: var(--text-faint); }

/* --- sound ladder --------------------------------------------------------- */

.ladder { display: grid; gap: .35rem; }
.rung {
  display: grid; grid-template-columns: auto 4.6rem 1fr auto 4.6rem auto;
  align-items: center; gap: .5rem; font-size: .87rem;
  padding: .4rem .5rem; border: 1px solid var(--line-soft); border-radius: 11px; background: #fff;
}
.rung.is-manual { opacity: .55; }
.rung-name { font-weight: 700; }
.rung-band { color: var(--text-faint); font-family: var(--mono); font-size: .76rem; }
.rung-ceiling { color: var(--text-faint); display: flex; align-items: center; gap: .2rem; }
.ceiling { width: 3.7rem; padding: .2rem .35rem; font-size: .84rem; }
.volume { width: 4.6rem; accent-color: var(--accent); }
.ladder-total { margin: .6rem 0 0; color: var(--text-dim); font-size: .9rem; font-weight: 600; }
input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; }

/* --- banner panel --------------------------------------------------------- */

.banner-panel { display: grid; gap: .55rem; }
.banner-preview {
  border-radius: 12px; border: 1px solid var(--line); display: block;
  background: #17181d;
}
.bp-checks { display: flex; gap: 1.1rem; }
.bp-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .92rem; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.bp-row { display: grid; grid-template-columns: 5.2rem 1fr; align-items: center; gap: .5rem; }
.bp-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.bp-seg { display: flex; background: var(--bg-sunken); border-radius: var(--radius-pill); padding: 3px; gap: 3px; }
.bp-opt {
  flex: 1 1 0; border: 0; background: none; font: 600 .88rem var(--font);
  color: var(--text-dim); padding: .35rem .5rem; border-radius: var(--radius-pill); cursor: pointer;
}
.bp-opt:hover { color: var(--ink); }
.bp-opt.is-on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.bp-reset {
  border: 0; background: none; color: var(--text-faint); font: 600 .82rem var(--font);
  cursor: pointer; justify-self: start; padding: .2rem 0; text-decoration: underline;
}
.bp-reset:hover { color: var(--accent-text); }

/* the nine resting places, laid out as the 3x3 they represent */
.bp-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
  background: var(--bg-sunken); border-radius: 10px; padding: 3px;
  justify-self: start; width: 7.2rem;
}
.bp-cell {
  border: 0; background: none; cursor: pointer; aspect-ratio: 1;
  color: var(--text-faint); font-size: .95rem; line-height: 1;
  border-radius: 7px;
}
.bp-cell:hover { color: var(--ink); background: rgba(0, 0, 0, .05); }
.bp-cell.is-on { background: #fff; color: var(--accent-text); box-shadow: var(--shadow-sm); }

.bp-swatches { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.bp-swatch {
  width: 1.35rem; height: 1.35rem; padding: 0; cursor: pointer;
  border-radius: 50%; background: var(--sw, transparent);
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
}
.bp-swatch.is-auto {
  background: var(--bg-sunken); color: var(--text-faint);
  font: 700 .7rem/1 var(--font);
}
.bp-swatch.is-on { border-color: var(--accent-text); }
.bp-swatch:focus-visible, .bp-cell:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* the custom picker wears the same ring as a selected swatch */
.bp-custom-wrap {
  width: 1.35rem; height: 1.35rem; border-radius: 50%; overflow: hidden;
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
  display: inline-block; position: relative;
}
.bp-custom-wrap.is-on { border-color: var(--accent-text); }
.bp-custom {
  position: absolute; inset: -25%; width: 150%; height: 150%;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.bp-custom::-webkit-color-swatch-wrapper { padding: 0; }
.bp-custom::-webkit-color-swatch { border: 0; }

/* --- autocomplete --------------------------------------------------------- */

.ac-popup {
  position: absolute; z-index: 50; max-height: 15rem; overflow: auto;
  background: #fff; border: 1px solid var(--line);
  border-radius: 13px; box-shadow: var(--shadow-md); padding: .25rem;
}
.ac-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  color: var(--text); font: 500 .92rem var(--font); padding: .4rem .55rem;
  border-radius: 8px; cursor: pointer;
}
.ac-item:hover, .ac-item.is-active { background: var(--accent-soft); color: #7a4a00; }

/* --- done / waitlist / explainer ------------------------------------------ */

.done-card { display: none; margin-top: 1.5rem; text-align: center; padding: 1.5rem 1rem .5rem; }
body[data-stage="done"] .done-card { display: block; }
.done-card h2 { font-size: 2rem; text-transform: none; letter-spacing: -.02em; color: var(--ink); }
.done-card .stage-actions { justify-content: center; }

.waitlist {
  margin-top: 2.5rem; padding: clamp(1.4rem, 3.5vw, 2.4rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff6ea, #fff9f2);
  border: 1px solid var(--accent-line);
}
.waitlist h2 { color: var(--ink); text-transform: none; letter-spacing: -.02em; font-size: clamp(1.5rem, 3vw, 2rem); }
.waitlist p { color: var(--text-dim); max-width: 46rem; }
#waitlist-form { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; }
#waitlist-form input { flex: 1 1 15rem; }

.explainer { margin-top: 3.5rem; max-width: 52rem; }
.explainer h2 { font-size: 1.6rem; text-transform: none; letter-spacing: -.02em; color: var(--ink); }
.explainer p { color: var(--text-dim); }
.explainer strong { color: var(--ink); }

/* numbered steps, Canva-ish: big soft circles */
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem; align-items: start; color: var(--text-dim); }
.steps li::before {
  content: counter(s); display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: 1rem;
}
.steps strong { color: var(--ink); }

.about { border-top: 1px solid var(--line-soft); padding-top: 2.25rem; }
.about p { margin: 0 0 1rem; }
.about .about-lede {
  font-size: 1.12rem; color: var(--ink);
  border-left: 4px solid var(--accent); padding-left: 1rem;
}
.about p:last-of-type { margin-bottom: 0; }

.site-foot {
  border-top: 1px solid var(--line-soft); padding: 2rem clamp(1rem, 4vw, 2.5rem);
  display: grid; gap: .35rem; color: var(--text-faint); font-size: .88rem;
  background: #fff;
}

/* --- responsive / states -------------------------------------------------- */

@media (max-width: 960px) {
  body[data-stage="reviewing"] .workspace,
  body[data-stage="rendering"] .workspace { grid-template-columns: minmax(0, 1fr); }
  .site-head nav { display: none; }
}

body[data-blocked] .tool > *:not(.controls):not(#set-chips):not(#set-hint) { display: none; }
body[data-blocked] .notice { display: block; }

@media (prefers-reduced-motion: reduce) {
  .bar.is-indeterminate::after { animation: none; }
  * { transition: none !important; }
}

/* ---- audio opt-in ------------------------------------------------------- */
.audio-opt {
  display: flex; align-items: flex-start; gap: .5rem; margin-top: .6rem;
  font-size: .9rem; color: var(--text-dim); cursor: pointer; max-width: 46rem;
}
.audio-opt input { margin-top: .2rem; accent-color: var(--accent); }

/* ---- low-confidence markers -------------------------------------------- */
.marker.is-lowconf { border-left: 3px solid var(--warn); }
.marker.is-lowconf .marker-time::after {
  content: '?'; margin-left: .25rem; font-weight: 800; color: var(--warn);
}

/* ---- pack battle -------------------------------------------------------- */
.battle-panel { display: grid; gap: .6rem; }
.battle-sides {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: .6rem;
}
.battle-side { display: grid; gap: .35rem; }
.battle-vs { align-self: center; font-weight: 800; color: var(--text-faint); }
.battle-name, .battle-spend {
  width: 100%; padding: .35rem .5rem; border: 1px solid var(--line, #ddd);
  border-radius: 8px; font: inherit;
}
.battle-spend { font-size: .85rem; }
.battle-total { font-weight: 800; font-size: 1.05rem; }
.grp-pick { display: inline-flex; gap: 2px; }
.grp {
  min-width: 1.6rem; padding: .15rem .3rem; border: 1px solid var(--line, #ddd);
  border-radius: 7px; background: transparent; font-weight: 700; font-size: .8rem;
  color: var(--text-dim); cursor: pointer;
}
.grp:hover { color: var(--ink); border-color: var(--accent); }
.grp.is-on { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* ---- sample demo -------------------------------------------------------- */
.sample-row { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; flex-wrap: wrap; }
.sample-row .hint { margin: 0; }
