/* Roast Battle Tracker. Corny on the outside (WordArt, starbursts, a ticker, a hit counter),
 * dead serious on the scorecard: big targets, high contrast, dark for a dark room. */
:root {
  --bg: #0c0706;
  --bg2: #150b09;
  --panel: #1b100d;
  --panel2: #241512;
  --line: #3b2520;
  --ink: #fff6ea;
  --dim: #cdb8a6;
  --mute: #8f7a6c;
  --fire: #ff5a1f;
  --fire2: #ffb020;
  --gold: #ffd84a;
  --red: #ff3b30;
  --red-d: #8f1610;
  --blue: #3d8bff;
  --blue-d: #123c80;
  --green: #44d17a;
  --r0: #6b7684;
  --r1: #c9a227;
  --r2: #ff7a1a;
  --r3: #ff3d2e;
  --r4: #b04dff;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "sans-serif-condensed", "Roboto Condensed", "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rad: 14px;
  --gut: 16px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--body);
  background-image: radial-gradient(120% 60% at 50% 115%, rgb(255 90 31 / 0.22), transparent 60%),
    radial-gradient(70% 40% at 10% -10%, rgb(255 59 48 / 0.12), transparent 70%);
  background-attachment: fixed;
  overflow-x: hidden;
}
a { color: var(--fire2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: 0.4; cursor: default; }
input, select, textarea {
  background: #0f0807; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%;
  min-width: 0; max-width: 100%;
}
/* Date fields. iPhone Safari draws a native control that ignores width: 100%, sizes itself to its text and centres
   it, so it can sit narrower than the other fields or push past the card. Make it an ordinary full-width box. */
input[type="date"] { display: block; line-height: 1.3; text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
@supports (-webkit-touch-callout: none) { input[type="date"] { -webkit-appearance: none; appearance: none; } }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--fire); outline-offset: 1px; border-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 10px; }
h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.02em; font-size: 1.5rem; text-transform: uppercase; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 10px; }
.dim { color: var(--dim); }
.hint { color: var(--mute); font-size: 0.88rem; margin-top: 10px; }
.kicker { font: 700 0.75rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fire2); margin: 0 0 8px; }
.lede { font-size: 1.08rem; color: var(--dim); max-width: 62ch; }

/* ---------- header, ticker, footer */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; justify-content: space-between;
  padding: 8px var(--gut); background: rgb(12 7 6 / 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; overflow: hidden; }
.logo img { width: 34px; height: 34px; flex: none; }
.logo b { font: 400 1.25rem/0.9 var(--display); letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.logo b span { color: var(--fire); }
.logo b i { font-style: normal; }
.nav { display: flex; gap: 2px; flex: none; }
@media (max-width: 560px) { .logo i { display: none; } }
.nav a { color: var(--dim); text-decoration: none; font-weight: 700; font-size: 0.86rem; padding: 8px 9px; border-radius: 9px; white-space: nowrap; }
.nav a.on, .nav a:hover { color: var(--ink); background: var(--panel2); }
.ticker { overflow: hidden; background: linear-gradient(90deg, var(--red-d), #5a0d08); border-bottom: 2px solid var(--gold); white-space: nowrap; }
.ticker__track { display: inline-flex; gap: 48px; padding: 6px 0; animation: tick 90s linear infinite; font: 700 0.82rem/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.04em; }
.ticker__track span { color: #ffe9c7; }
@keyframes tick { to { transform: translateX(-50%); } }
body[data-view="battle"] .ticker, body[data-view="screen"] .ticker, body[data-view="screen"] .top, body[data-view="screen"] .foot { display: none; }
main { max-width: 980px; margin: 0 auto; padding: 18px var(--gut) 40px; }
.foot { max-width: 980px; margin: 0 auto; padding: 24px var(--gut) 40px; color: var(--mute); font-size: 0.85rem; text-align: center; border-top: 1px dashed var(--line); }
.foot .ring { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-bottom: 10px; font-weight: 700; }
.foot .badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.foot .badges span { border: 1px solid var(--line); background: #120a08; padding: 3px 8px; font: 700 0.68rem/1.2 monospace; color: var(--dim); }
#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; z-index: 90;
  background: var(--ink); color: #1a0d0a; font-weight: 700; padding: 11px 18px; border-radius: 999px; pointer-events: none;
  transition: 0.25s; max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 8px 30px rgb(0 0 0 / 0.5);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.update { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--gold); color: #1a0d0a; text-align: center; padding: 10px; font-weight: 800; border: 0; width: 100%; }
.livechip {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
  background: var(--red); color: #fff; font-weight: 800; text-decoration: none; padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 6px 24px rgb(255 59 48 / 0.45); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 6px 34px rgb(255 59 48 / 0.85); } }

/* ---------- buttons, chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 18px; border-radius: 12px;
  font-weight: 800; text-decoration: none; border: 1px solid var(--line); background: var(--panel2); color: var(--ink); text-align: center;
}
.btn--fire {
  border: 1px solid #ffb27a; color: #2a0c03; text-shadow: 0 1px 0 rgb(255 255 255 / 0.35);
  background: linear-gradient(180deg, #ffe08a 0%, #ffab2e 42%, #ff6a1a 52%, #ff4a12 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 4px 0 #9e2a06, 0 8px 20px rgb(255 90 31 / 0.35);
}
.btn--fire:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6), 0 2px 0 #9e2a06; }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--panel2); }
.btn--xl { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.03em; text-transform: uppercase; min-height: 56px; padding: 12px 22px; }
.btn--block { display: flex; width: 100%; margin-bottom: 14px; }
.btn--a { border-color: rgb(255 59 48 / 0.6); }
.btn--b { border-color: rgb(61 139 255 / 0.6); }
.btn--a.on { background: var(--red); color: #fff; }
.btn--b.on { background: var(--blue); color: #fff; }
.btn--danger { background: #3a0c09; border-color: var(--red); color: #ffd6d2; }
.mini {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel2); font-weight: 700; text-decoration: none; color: var(--ink); font-size: 0.9rem;
}
.mini.on { background: var(--fire); color: #200a03; border-color: var(--fire); }
.linkish { background: none; border: 0; color: var(--fire2); text-decoration: underline; padding: 4px; font-weight: 700; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 800; background: var(--panel2); border: 1px solid var(--line); color: var(--dim); white-space: nowrap; }
.chip--win { background: rgb(255 216 74 / 0.15); border-color: var(--gold); color: var(--gold); }
.chip--live { background: rgb(255 59 48 / 0.15); border-color: var(--red); color: #ff8a80; }
.chip--next { background: rgb(255 90 31 / 0.15); border-color: var(--fire); color: var(--fire2); }
.cn { font-weight: 800; }
.cn--a { color: #ff7a70; }
.cn--b { color: #7fb2ff; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.row--center { justify-content: center; }
.row--split { justify-content: space-between; }
.row--tools { justify-content: center; }
.row--tools .btn { min-height: 42px; padding: 8px 12px; font-size: 0.88rem; }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }
.inline .btn { flex: none; }

/* ---------- panels */
.panel { background: linear-gradient(180deg, var(--panel), #160c0a); border: 1px solid var(--line); border-radius: var(--rad); padding: 18px; margin-bottom: 16px; }
.panel--hot { border-color: var(--fire); box-shadow: 0 0 0 3px rgb(255 90 31 / 0.15); }
.page-head { padding: 10px 0 8px; }
.h1 { font: 400 clamp(2.2rem, 1.4rem + 4vw, 3.6rem)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 10px; overflow-wrap: anywhere; }
.fire-text { background: linear-gradient(180deg, var(--gold), var(--fire) 55%, var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.two { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } .two > .panel { margin-bottom: 0; } .two { margin-bottom: 16px; } }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.list a { text-decoration: none; color: var(--ink); }
.list em { color: var(--mute); font-style: normal; font-size: 0.85rem; }
.arrow { font-weight: 800; text-decoration: none; }

/* ---------- home */
.hero { text-align: center; padding: 22px 0 18px; position: relative; }
.hero__badges { display: flex; justify-content: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.burst {
  display: inline-grid; place-items: center; width: 92px; height: 92px; padding: 14px; text-align: center; color: #3a0800;
  font: 400 1rem/0.95 var(--display); text-transform: uppercase; background: var(--gold);
  clip-path: polygon(50% 0, 61% 14%, 79% 7%, 80% 25%, 98% 28%, 88% 44%, 100% 58%, 83% 66%, 86% 85%, 67% 82%, 57% 100%, 45% 87%, 27% 96%, 24% 78%, 5% 76%, 13% 59%, 0 45%, 15% 35%, 9% 17%, 28% 17%, 36% 2%);
  animation: wobble 2.4s ease-in-out infinite;
}
.burst:first-child { background: var(--red); color: #fff; animation: blink 1s steps(2, start) infinite, wobble 2.4s ease-in-out infinite; }
.burst--gold { width: 116px; height: 116px; font-size: 0.9rem; }
@keyframes wobble { 50% { transform: rotate(-8deg) scale(1.05); } }
@keyframes blink { 50% { color: var(--gold); } }
.wordart { margin: 4px 0 14px; display: grid; justify-items: center; line-height: 0.82; font-family: var(--display); font-weight: 400; text-transform: uppercase; transform: perspective(500px) rotateX(10deg); }
.wordart span {
  font-size: clamp(2.4rem, 1.2rem + 6vw, 4.6rem); letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff7c2 0%, var(--gold) 30%, var(--fire) 60%, var(--red) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px #3b0a02; filter: drop-shadow(3px 4px 0 #5a0d08) drop-shadow(0 0 18px rgb(255 90 31 / 0.5));
}
.wordart .wordart__big { font-size: clamp(3.6rem, 1.4rem + 11vw, 8rem); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 14px; }
.counter { color: var(--mute); font-size: 0.85rem; }
.odo { display: inline-flex; gap: 2px; vertical-align: middle; }
.odo i { font: 700 0.95rem/1 monospace; font-style: normal; background: #000; color: #5cff6a; border: 1px solid #2a3a2a; padding: 3px 4px; border-radius: 3px; text-shadow: 0 0 6px #5cff6a; }
.tonight h2 small { font: 400 0.9rem var(--body); text-transform: none; letter-spacing: 0; }
.feat { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 6px 0 16px; }
.feat__c { background: var(--panel); border: 1px dashed #5a3a2e; border-radius: var(--rad); padding: 16px; }
.feat__c h3 { font: 400 1.25rem/1 var(--display); text-transform: uppercase; margin: 8px 0 6px; color: var(--gold); }
.feat__c p { color: var(--dim); font-size: 0.92rem; margin: 0; }
.feat__e { font-size: 1.9rem; }
.mboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mboard li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #120a08; border-radius: 10px; }
.mboard li:first-child { border: 1px solid var(--gold); }
.mboard a { flex: 1; text-decoration: none; color: var(--ink); font-weight: 700; }
.mboard__r { font: 400 1.3rem/1 var(--display); color: var(--fire2); width: 24px; text-align: center; }
.asseen { text-align: center; color: var(--mute); font-size: 0.9rem; padding: 10px; border: 1px dashed var(--line); border-radius: var(--rad); }
.asseen span { font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; margin-right: 6px; }

/* burn scale + colors per rating */
.jk--r0 { --c: var(--r0); } .jk--r1 { --c: var(--r1); } .jk--r2 { --c: var(--r2); } .jk--r3 { --c: var(--r3); } .jk--r4 { --c: var(--r4); }
.scale { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.scale__i { display: grid; grid-template-columns: 36px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding: 8px 12px; border-radius: 10px; background: #120a08; border-left: 5px solid var(--c); }
.scale__e { grid-row: span 2; font-size: 1.6rem; text-align: center; }
.scale__i b { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.1rem; letter-spacing: 0.03em; }
.scale__i small { color: var(--mute); grid-column: 2; }
.scale__i em { grid-row: 1 / span 2; grid-column: 3; font: 400 1.5rem var(--display); font-style: normal; color: var(--c); }

/* rules */
.steps-list, .howto { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: s; }
.steps-list li { display: flex; gap: 12px; align-items: flex-start; }
.steps-list li > span { font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; background: #120a08; border-radius: 12px; flex: none; }
.steps-list p { margin: 2px 0 0; color: var(--dim); }
.howto li { counter-increment: s; padding-left: 38px; position: relative; color: var(--dim); }
.howto li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--fire); color: #200a03; display: grid; place-items: center; font-weight: 900; }
.taglist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.taglist li { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; }
.taglist em { font-style: normal; font-weight: 800; color: var(--gold); min-width: 36px; }
.taglist small { color: var(--mute); }
.catlist, .rlist { padding-left: 18px; margin: 0; display: grid; gap: 8px; color: var(--dim); }
.catlist li b { display: block; color: var(--ink); }

/* ---------- night card */
.cardlist { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.brow { display: flex; align-items: stretch; gap: 6px; background: #120a08; border: 1px solid var(--line); border-radius: 12px; }
.brow__main { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.brow__n { font: 400 1.4rem/1 var(--display); color: var(--fire2); }
.brow__names { flex: 1; min-width: 150px; }
.brow__names em { color: var(--mute); font-style: normal; font-size: 0.85rem; margin: 0 4px; }
.brow__tools { display: flex; gap: 4px; align-items: center; padding-right: 6px; }
.brow__tools .mini { min-width: 34px; min-height: 34px; padding: 4px; }
.addb { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.addb .btn { grid-column: 1 / -1; }
.addb__vs { font: 400 1.2rem var(--display); color: var(--fire); text-transform: uppercase; }
@media (min-width: 620px) { .addb { grid-template-columns: 1fr auto 1fr auto; } .addb .btn { grid-column: auto; } }
.bulk { margin-top: 12px; }
.bulk summary { cursor: pointer; color: var(--fire2); font-weight: 700; }
.bulk textarea { margin: 10px 0 0; }
.judges { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.judges li { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; background: #120a08; border-radius: 10px; min-height: 48px; }
.judges li b { flex: 0 1 auto; }
.judges li .mini { margin-left: auto; }
.presets { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.preset { text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #120a08; display: grid; gap: 2px; }
.preset small { color: var(--mute); }
.preset.on { border-color: var(--fire); box-shadow: 0 0 0 2px rgb(255 90 31 / 0.35); }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.fields label { display: grid; gap: 6px; font-weight: 700; font-size: 0.9rem; color: var(--dim); min-width: 0; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper b { font: 400 1.8rem/1 var(--display); color: var(--ink); min-width: 28px; text-align: center; }
.tog { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.tog input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--fire); }
.hist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.hist li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; }
/* Past-record form: name on its own row on phones, one row from 480px up. */
.addh { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.addh input[name="name"], .addh .btn { grid-column: 1 / -1; }
@media (min-width: 480px) { .addh { grid-template-columns: minmax(0, 1fr) 72px 72px auto; } .addh input[name="name"], .addh .btn { grid-column: auto; } }
details summary { cursor: pointer; }

/* ---------- battle chrome */
body[data-view="battle"] main { padding-top: 8px; }
.bhead { display: flex; align-items: center; gap: 10px; justify-content: space-between; color: var(--mute); font-size: 0.85rem; margin-bottom: 8px; }
.bhead span { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { font-weight: 800; text-decoration: none; white-space: nowrap; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 12px; }
.step { border: 1px solid var(--line); background: #120a08; border-radius: 9px; padding: 8px 2px; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dim); }
.step.on { background: var(--fire); color: #200a03; border-color: var(--fire); }

/* toss */
.toss { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 8px 0; }
.matchup { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; width: 100%; }
.corner { padding: 16px 10px; border-radius: var(--rad); display: grid; gap: 4px; min-width: 0; }
.corner small { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; opacity: 0.85; }
.corner b { font: 400 min(clamp(1.5rem, 1rem + 3vw, 2.4rem), calc(min(34vw, 380px) / (var(--len, 8) * 0.6)))/1 var(--display); text-transform: uppercase; overflow-wrap: break-word; }
.corner--a { background: linear-gradient(160deg, #ff4d42, var(--red-d)); }
.corner--b { background: linear-gradient(200deg, #4f97ff, var(--blue-d)); }
.vs { font: 400 2.2rem var(--display); color: var(--gold); text-shadow: 0 0 18px rgb(255 216 74 / 0.6); }
.coin { width: 110px; height: 110px; position: relative; transform-style: preserve-3d; transition: transform 0.6s; margin: 6px 0; }
.coin__f {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; backface-visibility: hidden;
  background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 45%, #b07d06); border: 4px solid #8a6200; box-shadow: inset 0 0 0 4px rgb(255 255 255 / 0.25);
}
.coin__f--b { transform: rotateY(180deg); }
.coin.show-b { transform: rotateY(180deg); }
.coin.spin.land-a { animation: flipA 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.coin.spin.land-b { animation: flipB 1.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
@keyframes flipA { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-90px) rotateY(1080deg); } 100% { transform: translateY(0) rotateY(1800deg); } }
@keyframes flipB { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-90px) rotateY(1080deg); } 100% { transform: translateY(0) rotateY(1980deg); } }
.toss__res { font: 400 1.8rem var(--display); text-transform: uppercase; margin: 0; }

/* score strip + meter */
.strip { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.strip__s { display: flex; align-items: baseline; gap: 8px; font-weight: 800; white-space: nowrap; }
.strip__s span { font-size: 0.85rem; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.strip__s b { font: 400 1.7rem/1 var(--display); }
.strip__s--a b { color: #ff7a70; }
.strip__s--b b { color: #7fb2ff; }
.meter { position: relative; height: 16px; border-radius: 999px; background: var(--blue); overflow: hidden; border: 1px solid #000; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--red-d), var(--red) 70%, var(--fire2)); transition: width 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); }
.meter i::after { content: '🔥'; position: absolute; right: -9px; top: 50%; transform: translateY(-52%); font-size: 15px; }
.meter span { position: absolute; inset: 0; display: grid; place-items: center; font: 800 0.66rem/1 var(--body); color: #fff; text-shadow: 0 1px 2px #000; }

/* turn banner */
.up { border-radius: var(--rad); padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; margin-bottom: 10px; }
.up small { grid-column: 1 / -1; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.9; }
.up b { font: 400 min(clamp(1.9rem, 1.2rem + 4vw, 2.8rem), calc(min(64vw, 700px) / (var(--len, 8) * 0.6)))/1 var(--display); text-transform: uppercase; overflow-wrap: break-word; min-width: 0; }
.up--a { background: linear-gradient(160deg, #ff4d42, var(--red-d)); }
.up--b { background: linear-gradient(200deg, #4f97ff, var(--blue-d)); }
.up--riff { outline: 3px dashed var(--gold); outline-offset: -6px; }
.up--done { background: var(--panel2); border: 1px solid var(--gold); grid-template-columns: 1fr; text-align: center; }
.up--done small { font-size: 0.95rem; color: var(--gold); }
.up .linkish { color: #fff; }
.clock { font: 400 1.9rem/1 var(--display); background: rgb(0 0 0 / 0.3); padding: 6px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.clock.warn { background: var(--gold); color: #200a03; }
.clock.over { background: #fff; color: var(--red); animation: blink 0.5s steps(2, start) infinite; }

/* burn buttons */
.burns { display: grid; gap: 8px; margin-bottom: 12px; }
.burn {
  display: grid; grid-template-columns: 44px 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px; text-align: left;
  min-height: 62px; padding: 8px 16px 8px 12px; border-radius: 14px; border: 2px solid var(--c); color: var(--ink);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 30%, #120a08), #120a08 75%);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.burn:active { transform: scale(0.98); background: var(--c); }
.burn__e { grid-row: span 2; font-size: 2rem; text-align: center; }
.burn__l { font: 400 1.45rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; }
.burn__s { color: var(--dim); font-size: 0.82rem; grid-column: 2; }
.burn__p { grid-row: 1 / span 2; grid-column: 3; font: 400 1.8rem/1 var(--display); color: var(--c); }
.burn.jk--r4 { box-shadow: 0 0 18px rgb(176 77 255 / 0.35); }
@media (min-width: 700px) {
  .burns { grid-template-columns: repeat(5, 1fr); }
  .burn { grid-template-columns: 1fr; grid-template-rows: auto; text-align: center; justify-items: center; padding: 14px 6px; min-height: 130px; }
  .burn__e, .burn__p, .burn__s { grid-row: auto; grid-column: auto; }
}

/* joke editor */
.jed { background: #120a08; border: 1px solid var(--line); border-radius: var(--rad); padding: 12px; margin-bottom: 12px; display: grid; gap: 10px; }
.jed--a { border-left: 5px solid var(--red); }
.jed--b { border-left: 5px solid var(--blue); }
.jed--empty { color: var(--mute); font-size: 0.9rem; }
.jed__h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; }
.jed__rates { display: flex; gap: 6px; }
.jed__rates .mini { flex: 1; font-size: 1.25rem; padding: 4px; }
.jed__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); background: var(--panel2); border-radius: 999px; padding: 7px 11px; font-size: 0.84rem; font-weight: 700; min-height: 36px; white-space: nowrap; display: inline-block; }
.tag.on { background: var(--green); color: #04210f; border-color: var(--green); }
.tag--neg.on { background: #ff8a3d; color: #2a0c03; border-color: #ff8a3d; }
.jed__foot { display: flex; gap: 6px; }
.jed__note { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; }

/* log */
.log { border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; margin-bottom: 4px; }
.log__r { display: grid; grid-template-columns: 34px 1fr 1fr; align-items: center; border-top: 1px solid var(--line); }
.log__r:first-child { border-top: 0; }
.log__r--h { background: #120a08; font-size: 0.8rem; padding: 6px 0; text-align: center; }
.log__r.now { background: rgb(255 90 31 / 0.08); }
.log__n { text-align: center; font: 400 1.2rem var(--display); color: var(--mute); }
.log__c { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; padding: 6px 4px; border-left: 1px solid var(--line); min-height: 50px; align-items: center; }
.jk { display: inline-flex; align-items: center; gap: 3px; border-radius: 10px; padding: 5px 8px; border: 1px solid var(--c, var(--line)); background: color-mix(in srgb, var(--c, #222) 22%, #120a08); font-size: 1.05rem; min-height: 38px; }
.jk small { font-weight: 800; font-size: 0.8rem; }
.jk i { font-style: normal; font-size: 0.75rem; }
.jk.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.jk--riff { border-style: dashed; }
.jk--up { --c: var(--fire); color: var(--fire2); font-weight: 900; text-transform: uppercase; font-size: 0.75rem; animation: pulse2 1.2s ease-in-out infinite; }
.jk--empty { border: 0; background: none; color: var(--line); }
@keyframes pulse2 { 50% { opacity: 0.45; } }

/* tape */
.tape__names { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; font-size: 0.95rem; }
.tape__names span:nth-child(2) { color: var(--mute); }
.trow { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.trow__l b { font-size: 1rem; }
.trow__l small { display: block; color: var(--mute); font-size: 0.82rem; }
.auto { display: inline-block; margin-left: 8px; font: 800 0.65rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.1em; padding: 3px 6px; border-radius: 6px; background: var(--panel2); color: var(--gold); border: 1px solid var(--gold); vertical-align: middle; }
.seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.seg__b { border: 1px solid var(--line); background: #120a08; border-radius: 10px; padding: 6px 2px; display: grid; gap: 1px; justify-items: center; min-height: 52px; }
.seg__b span { font-size: 1rem; letter-spacing: -2px; }
.seg__b small { font-size: 0.68rem; color: var(--mute); text-transform: uppercase; font-weight: 800; }
.seg__b--a.on { background: var(--red); border-color: var(--red); }
.seg__b--b.on { background: var(--blue); border-color: var(--blue); }
.seg__b--e.on { background: var(--dim); border-color: var(--dim); color: #200a03; }
.seg__b.on small { color: #fff; }
.seg__b--e.on small { color: #200a03; }

/* tale of the tape table */
.tot { width: 100%; border-collapse: collapse; text-align: center; font-variant-numeric: tabular-nums; }
.tot th, .tot td { padding: 8px 4px; border-top: 1px solid var(--line); }
.tot thead th { border-top: 0; font-size: 0.95rem; }
.tot tbody th { color: var(--mute); font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tot td { font: 400 1.35rem var(--display); width: 30%; }
.tot td.lead { color: var(--gold); }
.tot td.lead::after { content: ' ★'; font-size: 0.8rem; }

/* decision */
.mathsays { background: #120a08; border-radius: 10px; padding: 10px 12px; color: var(--dim); }
.vote { display: grid; grid-template-columns: minmax(80px, 1fr) 1fr 1fr; gap: 6px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.vote__n { font-weight: 800; overflow-wrap: anywhere; }
.vote__n small { color: var(--mute); font-weight: 600; }
.vbtn { min-height: 50px; border-radius: 12px; border: 2px solid var(--line); background: #120a08; font-weight: 800; padding: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbtn--a.on { background: var(--red); border-color: #ffb3ad; color: #fff; }
.vbtn--b.on { background: var(--blue); border-color: #b3d1ff; color: #fff; }
.clap { display: grid; gap: 10px; }
.clap__s { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; }
.clap__s .btn { padding: 8px; min-height: 44px; white-space: nowrap; overflow: hidden; }
.clap__s b { font: 400 1.5rem var(--display); text-align: right; }
.vu { height: 22px; border-radius: 6px; background: repeating-linear-gradient(90deg, #120a08 0 9px, #000 9px 11px); overflow: hidden; border: 1px solid var(--line); }
.vu i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold) 60%, var(--red)); transition: width 0.08s; }
.verdict { text-align: center; padding: 20px 16px; border-radius: var(--rad); background: var(--panel); border: 2px dashed var(--line); margin-bottom: 16px; }
.verdict small { display: block; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-size: 0.8rem; }
.verdict b { display: block; font: 400 min(clamp(2rem, 1.3rem + 4vw, 3rem), calc(min(82vw, 880px) / (var(--len, 8) * 0.6)))/1 var(--display); text-transform: uppercase; margin: 6px 0; overflow-wrap: break-word; }
.verdict--a { border: 2px solid var(--red); background: linear-gradient(180deg, rgb(255 59 48 / 0.18), var(--panel)); }
.verdict--b { border: 2px solid var(--blue); background: linear-gradient(180deg, rgb(61 139 255 / 0.18), var(--panel)); }
.warn { color: var(--gold); font-weight: 700; }
.cue__c { border-radius: 12px; padding: 12px 14px; background: #fff8dc; color: #2a1a10; margin-bottom: 10px; box-shadow: 3px 4px 0 rgb(0 0 0 / 0.4); transform: rotate(-0.4deg); }
.cue__c:nth-of-type(2) { transform: rotate(0.5deg); }
.cue__c h3 { font: 400 1.4rem var(--display); text-transform: uppercase; margin-bottom: 6px; }
.cue__c--a h3 { color: #c0150b; }
.cue__c--b h3 { color: #0f4fb5; }
.cue__line { font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive; font-size: 1.05rem; }
.cue__c ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.95rem; }

/* result */
.win { text-align: center; padding: 26px 16px; border-radius: var(--rad); margin-bottom: 12px; position: relative; overflow: hidden; }
.win--a { background: linear-gradient(160deg, #ff4d42, var(--red-d)); }
.win--b { background: linear-gradient(200deg, #4f97ff, var(--blue-d)); }
.win::before { content: ''; position: absolute; inset: auto 0 -40% 0; height: 90%; background: radial-gradient(60% 60% at 50% 100%, rgb(255 216 74 / 0.45), transparent 70%); }
.win .kicker { color: #fff; position: relative; }
.win__name { font: 400 min(clamp(2.6rem, 1.4rem + 7vw, 5rem), calc(min(82vw, 880px) / (var(--len, 8) * 0.6)))/0.9 var(--display); text-transform: uppercase; margin: 6px 0; position: relative; overflow-wrap: break-word; text-shadow: 3px 4px 0 rgb(0 0 0 / 0.35); }
.win__def { font-weight: 800; position: relative; }
.win__m { display: inline-block; background: rgb(0 0 0 / 0.3); padding: 5px 12px; border-radius: 999px; font-weight: 800; position: relative; margin: 0; }

/* reveal overlay */
.reveal { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 60%, #2a0905, #000 70%); display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; padding: 24px; overflow: hidden; cursor: pointer; }
.reveal p, .reveal__w { opacity: 0; transition: opacity 0.5s, transform 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
.reveal__t { font: 400 clamp(1.6rem, 1rem + 4vw, 3rem)/1 var(--display); text-transform: uppercase; color: var(--dim); }
.reveal__and { font: 400 clamp(1.4rem, 1rem + 3vw, 2.4rem)/1 var(--display); text-transform: uppercase; color: var(--gold); }
.reveal__w { transform: scale(0.3); display: grid; gap: 6px; }
.reveal__w b { font: 400 min(clamp(3rem, 1.5rem + 11vw, 9rem), calc(88vw / (var(--len, 8) * 0.6)))/0.9 var(--display); text-transform: uppercase; overflow-wrap: break-word; }
.reveal__w small { font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.reveal__w--a b { color: #ff6a5f; text-shadow: 0 0 30px rgb(255 59 48 / 0.7), 4px 5px 0 #4a0703; }
.reveal__w--b b { color: #6aa8ff; text-shadow: 0 0 30px rgb(61 139 255 / 0.7), 4px 5px 0 #08224d; }
.reveal.s1 .reveal__t { opacity: 1; }
.reveal.s2 .reveal__and { opacity: 1; }
.reveal.s2 .reveal__t { opacity: 0.4; }
.reveal.s3 .reveal__w { opacity: 1; transform: scale(1); }
.reveal.s3 { animation: flare 0.6s ease-out; }
.reveal__skip { position: absolute; bottom: 18px; left: 0; right: 0; color: var(--mute); font-size: 0.8rem; opacity: 1 !important; }
@keyframes flare { 0% { background-color: #fff; } }
.confetto { position: absolute; top: -40px; animation: fall 3s linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* rating flash */
.flash { position: fixed; left: 50%; top: 40%; z-index: 60; pointer-events: none; transform: translate(-50%, -50%) scale(0.6); opacity: 0; display: grid; justify-items: center; gap: 4px; padding: 16px 24px; border-radius: 18px; background: rgb(12 7 6 / 0.85); border: 3px solid var(--c); text-align: center; }
.flash span { font-size: 3rem; line-height: 1; }
.flash b { font: 400 2rem/1 var(--display); text-transform: uppercase; color: var(--c); white-space: nowrap; }
.flash--r0 { --c: var(--r0); } .flash--r1 { --c: var(--r1); } .flash--r2 { --c: var(--r2); } .flash--r3 { --c: var(--r3); } .flash--r4 { --c: var(--r4); }
.flash.go { animation: pop 0.75s ease-out forwards; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(0.95); } }
.flash--scr.go { animation-duration: 2.2s; }
.flash--scr span { font-size: 9rem; }
.flash--scr b { font-size: 6rem; }
.shake main { animation: shake 0.45s; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }

/* ---------- leaderboard */
.champ { text-align: center; padding: 22px 16px; border-radius: var(--rad); border: 2px solid var(--gold); background: linear-gradient(180deg, rgb(255 216 74 / 0.14), var(--panel)); margin-bottom: 16px; }
.champ--plain { border-color: var(--line); background: var(--panel); }
.champ__belt { font-size: 3rem; display: block; animation: wobble 2.4s ease-in-out infinite; }
.champ h2 { font-size: clamp(2rem, 1.2rem + 4vw, 3rem); }
.champ h2 a { color: var(--ink); text-decoration: none; }
.champ__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 10px; margin: 10px 0; }
.champ__stats b { display: block; font: 400 2rem/1 var(--display); color: var(--gold); }
.champ__stats span { font-size: 0.72rem; color: var(--mute); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 800; }
.lb { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lb th { text-align: left; font-size: 0.75rem; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; padding: 6px; }
.lb td { padding: 10px 6px; border-top: 1px solid var(--line); }
.lb td:first-child { font: 400 1.3rem var(--display); color: var(--fire2); width: 30px; }
.lb tbody tr:first-child td { background: rgb(255 216 74 / 0.08); }
.lb a { color: var(--ink); font-weight: 800; text-decoration: none; }
.st-up { color: var(--green); font-weight: 800; }
.st-down { color: #ff8a80; font-weight: 800; }

/* ---------- big screen */
body[data-view="screen"] main { max-width: none; padding: 0; }
body[data-view="screen"] .livechip { display: none; }
.scr { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 3vh; padding: 4vh 4vw; text-align: center; position: relative; }
.scr__ctl { position: fixed; top: 10px; right: 10px; display: flex; gap: 6px; opacity: 0.2; transition: opacity 0.3s; z-index: 5; }
.scr__ctl:hover, .scr__ctl:focus-within { opacity: 1; }
.scr__night { font: 700 clamp(1rem, 0.6rem + 1.4vw, 1.8rem) var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fire2); margin: 0; }
.scr__match { display: grid; grid-template-columns: 1fr auto 1fr; gap: 3vw; align-items: center; width: 100%; }
.scr__c { padding: 3vh 2vw; border-radius: 2vw; display: grid; gap: 1vh; min-width: 0; }
.scr__c small { font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; font-size: clamp(0.8rem, 0.5rem + 1vw, 1.4rem); }
.scr__c b { font: 400 min(clamp(2.4rem, 1rem + 6vw, 8rem), calc(36vw / (var(--len, 8) * 0.6)))/0.9 var(--display); text-transform: uppercase; overflow-wrap: break-word; }
.scr__c em { font: 400 clamp(2rem, 1rem + 4vw, 5rem)/1 var(--display); font-style: normal; color: var(--gold); }
.scr__c--a { background: linear-gradient(160deg, #ff4d42, var(--red-d)); }
.scr__c--b { background: linear-gradient(200deg, #4f97ff, var(--blue-d)); }
.scr__vs { font: 400 clamp(2.4rem, 1rem + 5vw, 7rem) var(--display); color: var(--gold); text-shadow: 0 0 30px rgb(255 216 74 / 0.6); }
.meter--scr { width: 80vw; height: 3vh; }
.scr__msg { font: 400 clamp(2rem, 1rem + 4vw, 5rem)/1 var(--display); text-transform: uppercase; color: var(--ink); }
.dots i { font-style: normal; animation: pulse2 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 0.2s; }
.dots i:nth-child(3) { animation-delay: 0.4s; }
.scr__up { display: grid; gap: 1vh; justify-items: center; padding: 2vh 4vw; border-radius: 2vw; }
.scr__up small { font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; font-size: clamp(1rem, 0.6rem + 1.4vw, 2rem); color: var(--gold); }
.scr__up b { font: 400 min(clamp(3rem, 1rem + 8vw, 10rem), calc(88vw / (var(--len, 8) * 0.6)))/0.9 var(--display); text-transform: uppercase; overflow-wrap: break-word; }
.scr__up .clock { font-size: clamp(2rem, 1rem + 3vw, 4rem); }
.scr__up--a b { color: #ff6a5f; }
.scr__up--b b { color: #6aa8ff; }
.scr__win { display: grid; gap: 1vh; }
.scr__win small { font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-size: clamp(1rem, 0.6rem + 1.4vw, 2rem); }
.scr__win b { font: 400 min(clamp(3.4rem, 1rem + 10vw, 12rem), calc(90vw / (var(--len, 8) * 0.6)))/0.9 var(--display); text-transform: uppercase; overflow-wrap: break-word; }
.scr__win span { font: 400 clamp(1.6rem, 1rem + 2vw, 3rem) var(--display); text-transform: uppercase; }
.scr__win--a b { color: #ff6a5f; } .scr__win--b b { color: #6aa8ff; }
.wordart--scr .wordart__big { font-size: clamp(4rem, 2rem + 12vw, 14rem); }
.wordart--scr span { font-size: clamp(2.4rem, 1rem + 6vw, 7rem); }
.scr__lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 1vh; width: min(900px, 90vw); }
.scr__lb li { display: grid; grid-template-columns: 3em 1fr auto; align-items: center; background: var(--panel); border-radius: 1vw; padding: 1.2vh 2vw; font-size: clamp(1.2rem, 0.6rem + 1.6vw, 2.4rem); }
.scr__lb li:first-child { border: 2px solid var(--gold); }
.scr__lb span { font-family: var(--display); color: var(--fire2); }
.scr__lb b { text-align: left; }
.scr__lb em { font: 400 1.2em var(--display); font-style: normal; color: var(--gold); }

@media (max-width: 420px) {
  .nav a { padding: 8px 6px; font-size: 0.8rem; }
  .logo b { font-size: 1.05rem; }
  .logo img { width: 28px; height: 28px; }
  .clap__s { grid-template-columns: 110px 1fr 38px; }
}
@media (max-width: 360px) { .logo b { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ticker__track { animation: none; }
}
@media print {
  .top, .ticker, .foot, .row, .steps, .bhead, .livechip { display: none !important; }
  body { background: #fff; color: #000; }
}
