/* Climb the Ladder — "2 AM desk" theme.
   Warm black, one acid accent, one flare red. Tilt (0..1) is driven from JS via --tilt. */

/* Self-hosted fonts (SIL OFL 1.1, see assets/fonts/OFL-*.txt), so no request goes to Google. */
@font-face { font-family: 'Anybody'; font-style: normal; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; src: url(assets/fonts/anybody-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anybody'; font-style: normal; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; src: url(assets/fonts/anybody-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Anybody'; font-style: italic; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; src: url(assets/fonts/anybody-italic-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Anybody'; font-style: italic; font-weight: 100 900; font-stretch: 50% 150%; font-display: swap; src: url(assets/fonts/anybody-italic-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 300 700; font-stretch: 100%; font-display: swap; src: url(assets/fonts/martianmono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 300 700; font-stretch: 100%; font-display: swap; src: url(assets/fonts/martianmono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #0f0d0b;
  --ink-2: #171411;
  --panel: #1b1814;
  --panel-2: #24201b;
  --paper: #f0e7d7;
  --dim: #918676;
  --faint: #5c544a;
  --line: rgba(240, 231, 215, 0.11);
  --line-2: rgba(240, 231, 215, 0.22);
  --acid: #c8ff3a;
  --acid-ink: #1a2200;
  --flare: #ff4b2b;
  --amber: #ffb02e;

  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --mono: 'Martian Mono', ui-monospace, monospace;

  --tilt: 0;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  font-family: var(--display);
  font-variation-settings: 'wdth' 92;
  font-size: 16px;
  line-height: 1.45;
  background:
    radial-gradient(ellipse 70% 45% at 55% -8%, rgba(200, 255, 58, 0.09), transparent 65%),
    radial-gradient(ellipse 50% 60% at 100% 100%, rgba(255, 75, 43, calc(0.04 + var(--tilt) * 0.12)), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--ink-2), var(--ink) 40%);
  background-attachment: fixed;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* film grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* tilt vignette: grows as mental drops */
.vignette {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: var(--tilt);
  background: radial-gradient(ellipse at center, transparent 45%, rgba(255, 40, 20, 0.28) 85%, rgba(120, 0, 0, 0.55));
  transition: opacity 1.2s var(--ease);
}
body.tilted .vignette { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: calc(var(--tilt) * 0.7); } }

/* giant background clock */
#bgclock {
  position: fixed;
  right: -2vw; bottom: -6vw;
  font-family: var(--display);
  font-variation-settings: 'wdth' 50, 'wght' 900;
  font-size: clamp(160px, 30vw, 520px);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(240, 231, 215, 0.06);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: -webkit-text-stroke-color 1s;
}
body.tilted #bgclock { -webkit-text-stroke-color: rgba(255, 75, 43, 0.14); }

kbd {
  font-family: var(--mono);
  font-size: 0.68em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  color: var(--dim);
  border-radius: 3px;
}
code { font-family: var(--mono); font-size: 0.85em; color: var(--acid); }

/* ───────────── top bar ───────────── */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: stretch; gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 13, 11, 0.9), rgba(15, 13, 11, 0.55));
  backdrop-filter: blur(6px);
  animation: drop 0.6s var(--ease) both;
}
@keyframes drop { from { transform: translateY(-100%); opacity: 0; } }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); flex-shrink: 0; }
.brand-mark {
  width: 22px; height: 30px;
  border-left: 3px solid var(--acid); border-right: 3px solid var(--acid);
  background: repeating-linear-gradient(180deg, transparent 0 5px, var(--acid) 5px 8px);
}
.brand-txt { font-variation-settings: 'wdth' 60, 'wght' 850; font-size: 13px; line-height: 1; letter-spacing: 0.06em; }
.home-btn {
  all: unset; box-sizing: border-box; align-self: center; flex-shrink: 0; cursor: pointer;
  padding: 6px 12px; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
  transition: color 0.2s, border-color 0.2s;
}
.home-btn:hover, .home-btn:focus-visible { color: var(--acid); border-color: var(--acid); }
body:not(.in-run) .home-btn { display: none; }
.hud-block.record .num .sep { color: var(--faint); margin: 0 2px; }
.hud-block.record .num .w { color: var(--acid); }
.hud-block.record .num .l { color: var(--flare); }
.hud-block.record.hot .lbl small { color: var(--acid); }
.hud-block.record.cold .lbl small { color: var(--flare); }

.hud { display: flex; flex: 1; justify-content: flex-end; align-items: center; gap: 4px; flex-wrap: wrap; }
.hud-block {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  border-left: 1px solid var(--line);
  animation: fadeUp 0.5s var(--ease) both;
}
.hud-block:nth-child(2) { animation-delay: 60ms; } .hud-block:nth-child(3) { animation-delay: 120ms; }
.hud-block:nth-child(4) { animation-delay: 180ms; } .hud-block:nth-child(5) { animation-delay: 240ms; }
.hud .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); display: block; }
.hud .num { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.hud .num.big { font-family: var(--display); font-variation-settings: 'wdth' 70, 'wght' 800; font-size: 26px; line-height: 1; }
.hud .num small { font-size: 13px; color: var(--dim); font-weight: 400; }
.hud-block:not(.mental):not(.rank) { flex-direction: column; align-items: flex-start; gap: 2px; }
.hud-block.rank > span { display: flex; flex-direction: column; }

.cells { display: flex; gap: 3px; }
.cells i { width: 9px; height: 20px; background: var(--panel-2); transform: skewX(-12deg); transition: background 0.4s; }
.mental .cells i.on { background: var(--acid); box-shadow: 0 0 8px rgba(200, 255, 58, 0.35); }
.mental.mid .cells i.on { background: var(--amber); box-shadow: 0 0 8px rgba(255, 176, 46, 0.35); }
.mental.low .cells i.on { background: var(--flare); box-shadow: 0 0 10px rgba(255, 75, 43, 0.5); }
.mental.low { animation: shake 0.5s steps(2) infinite; }
.clock.late .num { color: var(--flare); }

/* ───────────── layout ───────────── */
.layout {
  position: relative; z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 32px;
  padding: 32px 24px 48px;
  max-width: 1080px; width: 100%;
  margin: 0 auto;
}
body:not(.in-run) .layout { grid-template-columns: 150px minmax(0, 1fr); }

/* ───────────── ladder rail ───────────── */
.ladder {
  position: sticky; top: 24px;
  align-self: start;
  height: min(72vh, 640px);
  display: flex; flex-direction: column-reverse;
  padding-left: 28px;
}
.ladder .rail {
  position: absolute; left: 8px; top: 0; bottom: 0; width: 12px;
  border-left: 2px solid var(--line-2); border-right: 2px solid var(--line-2);
  background: repeating-linear-gradient(180deg, transparent 0 calc(10% - 2px), var(--line-2) calc(10% - 2px) 10%);
}
.rung {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  font-variation-settings: 'wdth' 62, 'wght' 650;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px dashed var(--line);
  animation: rise 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 55ms + 200ms);
  transition: color 0.4s;
}
.rung.done { color: var(--dim); }
.rung.cur { color: var(--c); font-variation-settings: 'wdth' 70, 'wght' 850; }
.rung.cur .emblem { filter: drop-shadow(0 0 5px var(--c)); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.marker {
  position: absolute; left: 0;
  bottom: calc(var(--pos) * 100%);
  transform: translateY(50%);
  transition: bottom 1.1s var(--ease);
  pointer-events: none;
}
.marker.you::before {
  content: '';
  position: absolute; left: 2px; top: -9px;
  width: 0; height: 0;
  border-left: 18px solid var(--acid);
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  filter: drop-shadow(0 0 6px rgba(200, 255, 58, 0.6));
}
.marker span {
  position: absolute; left: -38px; top: -8px;
  font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--acid);
}
body:not(.in-run) .marker.you { opacity: 0; }
.marker.pb { bottom: calc(var(--pb) * 100%); opacity: 0; }
.ladder.has-pb .marker.pb { opacity: 1; }
.marker.pb::before {
  content: ''; position: absolute; left: 0; top: 0; width: 140px;
  border-top: 1px dashed rgba(240, 231, 215, 0.35);
}
.marker.pb span { color: var(--dim); }

/* rank emblem: Riot's ranked art (see emblem() in js/ui/components.js) */
.emblem { --s: 30px; position: relative; display: inline-block; flex-shrink: 0; width: var(--s); height: var(--s); }
.emblem img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* The large emblems sit in the middle of a 1280×720 canvas: show the 360×300 window around the badge. */
.emblem.big { height: calc(var(--s) * 300 / 360); overflow: hidden; }
.emblem.big img { position: absolute; max-width: none; width: calc(100% * 1280 / 360); height: auto; left: calc(-100% * 460 / 360); top: calc(-100% * 185 / 300); }
.emblem.xs { --s: 16px; }
.emblem.sm { --s: 28px; }
.emblem.md { --s: 72px; }
.emblem.xl { --s: 160px; }

/* ───────────── stage + cards ───────────── */
.stage { min-width: 0; }
.stage.enter > * { animation: cardIn 0.45s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.loading { font-family: var(--mono); color: var(--dim); }
.loading span { animation: blink 1s infinite; } .loading span:nth-child(2) { animation-delay: 0.2s; } .loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 50% { opacity: 0; } }

.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 120px),
    var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  padding: 0 32px 32px;
  filter: saturate(calc(1 - var(--tilt) * 0.5));
}
.card::after { /* cut-corner accent */
  content: ''; position: absolute; top: 0; right: 0; width: 31px; height: 2px;
  background: var(--acid); transform-origin: right; transform: rotate(45deg) translate(4px, 11px);
}
.card-head {
  display: flex; align-items: center; gap: 14px;
  margin: 0 -32px 26px; padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--dim);
}
.card-head .phase { color: var(--acid); font-weight: 700; }
.card-head .phase-r { margin-left: auto; text-transform: none; letter-spacing: 0.02em; }
.phase-chaos .card-head .phase { color: var(--flare); }
.phase-chat .card-head .phase { color: var(--amber); }

.pips { display: flex; gap: 4px; }
.pips i { width: 18px; height: 4px; background: var(--line-2); }
.pips i.done { background: var(--dim); }
.pips i.now { background: var(--acid); }

.situation {
  margin: 0 0 22px;
  font-variation-settings: 'wdth' 78, 'wght' 760;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
body.tilted .situation { animation: jitter 3s infinite; }
.sub, .note { color: var(--dim); margin: -8px 0 22px; font-size: 15px; }
.note { font-style: italic; font-variation-settings: 'wdth' 92, 'wght' 400; color: var(--paper); opacity: 0.8; border-left: 2px solid var(--acid); padding-left: 12px; margin: 0 0 22px; }

/* chat log */
.chatlog {
  font-family: var(--mono); font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  border-left: 2px solid var(--amber);
  padding: 10px 14px; margin: -6px 0 24px;
}
.chatlog .line { opacity: 0; animation: fadeUp 0.3s var(--ease) forwards; animation-delay: calc(var(--i) * 380ms + 250ms); }
.chatlog .who { color: var(--amber); }

/* choices */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  all: unset; box-sizing: border-box;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  background: linear-gradient(90deg, var(--acid) 0 0) no-repeat left / 0% 100%, var(--ink-2);
  cursor: pointer;
  transition: background-size 0.28s var(--ease), color 0.2s, border-color 0.2s, transform 0.15s;
  animation: fadeUp 0.4s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms + 120ms);
}
.choice .idx { font-family: var(--mono); font-size: 12px; color: var(--dim); transition: color 0.2s; }
.choice .clabel { font-variation-settings: 'wdth' 80, 'wght' 650; font-size: 19px; line-height: 1.15; }
.choice .clabel small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.02em; margin-top: 3px; font-weight: 400; }
.choice .chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.choice:hover, .choice:focus-visible {
  background-size: 100% 100%;
  color: var(--acid-ink); border-color: var(--acid);
}
.choice:hover .idx, .choice:focus-visible .idx, .choice:hover small, .choice:focus-visible small { color: var(--acid-ink); }
.choice:hover .chip, .choice:focus-visible .chip { border-color: rgba(26, 34, 0, 0.35); color: var(--acid-ink); background: rgba(255, 255, 255, 0.25); }
.choice:active { transform: translateX(4px); }
.choice.locked {
  cursor: not-allowed; opacity: 0.45;
  background: repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255, 75, 43, 0.08) 8px 16px), var(--ink-2);
  border-style: dashed; border-color: rgba(255, 75, 43, 0.4);
}
.choice.locked .clabel { text-decoration: line-through; text-decoration-color: var(--flare); }
.choice.locked .idx { color: var(--flare); }

.chip {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 7px;
  border: 1px solid var(--line-2);
  color: var(--dim);
  white-space: nowrap;
}
.chip.pos { color: var(--acid); border-color: rgba(200, 255, 58, 0.35); }
.chip.neg { color: var(--flare); border-color: rgba(255, 75, 43, 0.4); }
.chip.var { color: var(--amber); border-color: rgba(255, 176, 46, 0.45); background: repeating-linear-gradient(-45deg, transparent 0 4px, rgba(255, 176, 46, 0.1) 4px 8px); }
.chip.q { color: var(--paper); border-style: dashed; }

/* roles + champs */
.roles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.champs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role, .champ {
  all: unset; box-sizing: border-box; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 8px 18px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
  animation: fadeUp 0.4s var(--ease) both;
  animation-delay: calc(var(--i) * 60ms + 100ms);
}
.role .glyph { color: var(--acid); line-height: 0; }
.role .glyph .ricon { width: 34px; height: 34px; }
.role .rname, .champ .cname { font-variation-settings: 'wdth' 70, 'wght' 750; font-size: 18px; text-transform: uppercase; letter-spacing: 0.04em; text-align: center; }
.champ { padding: 20px 8px 18px; }
.champ .cicon { width: 64px; height: 64px; }
.champ .cname { font-size: 22px; }
.role kbd, .champ kbd { position: absolute; top: 6px; right: 6px; }
.role:hover, .champ:hover, .role:focus-visible, .champ:focus-visible { border-color: var(--acid); transform: translateY(-3px); background: var(--panel-2); }

.autofill {
  margin: -6px 0 20px; padding: 12px 16px;
  background: repeating-linear-gradient(-45deg, var(--flare) 0 12px, #e23c1f 12px 24px);
  color: #fff; font-variation-settings: 'wdth' 120, 'wght' 900; font-size: 22px; letter-spacing: 0.02em;
  animation: slam 0.5s var(--ease) both;
}
.autofill small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: 0; opacity: 0.9; }
@keyframes slam { from { transform: scale(1.3) rotate(-2deg); opacity: 0; } }

/* outcome */
.punch {
  margin: 4px 0 24px;
  font-variation-settings: 'wdth' 85, 'wght' 500;
  font-style: italic;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  text-wrap: pretty;
}
.punch::before { content: '“'; color: var(--acid); font-style: normal; font-variation-settings: 'wght' 900; margin-right: 2px; }
.deltas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.deltas .chip { font-size: 12px; padding: 5px 10px; animation: fadeUp 0.35s var(--ease) both; }
.deltas .chip:nth-child(2) { animation-delay: 80ms; } .deltas .chip:nth-child(3) { animation-delay: 160ms; }

/* buttons */
.btn {
  all: unset; box-sizing: border-box;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-variation-settings: 'wdth' 85, 'wght' 750; font-size: 17px; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--line-2);
  color: var(--paper); background: var(--ink-2);
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn small { font-family: var(--mono); font-size: 10px; text-transform: none; letter-spacing: 0; color: var(--dim); font-weight: 400; }
.btn:hover, .btn:focus-visible { border-color: var(--acid); }
.btn.primary { background: var(--acid); color: var(--acid-ink); border-color: var(--acid); box-shadow: 5px 5px 0 rgba(200, 255, 58, 0.18); }
.btn.primary small, .btn.primary kbd { color: rgba(26, 34, 0, 0.7); border-color: rgba(26, 34, 0, 0.3); }
.btn.primary:hover, .btn.primary:focus-visible { box-shadow: 8px 8px 0 rgba(200, 255, 58, 0.25); transform: translate(-2px, -2px); }
.btn.ghost { background: transparent; border-style: dashed; }
.btn:active { transform: translate(2px, 2px) !important; box-shadow: none !important; }

/* ───────────── title ───────────── */
.title { padding: 12px 0 0; max-width: 760px; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acid); margin: 0 0 18px; }
.logo { margin: 0 0 26px; line-height: 0.82; letter-spacing: -0.02em; }
.logo > span { display: block; }
.logo span span { display: inline-block; animation: letterIn 0.6s var(--ease) both; animation-delay: var(--d); }
@keyframes letterIn { from { opacity: 0; transform: translateY(60%) rotate(6deg); filter: blur(6px); } }
.logo .w1 { font-variation-settings: 'wdth' 150, 'wght' 900; font-size: clamp(54px, 9vw, 122px); white-space: nowrap; }
.logo .w2 { font-variation-settings: 'wdth' 50, 'wght' 300; font-size: clamp(28px, 4vw, 46px); letter-spacing: 0.5em; color: var(--dim); margin: 6px 0 4px 4px; }
.logo .w3 {
  font-variation-settings: 'wdth' 112, 'wght' 900; font-style: italic; white-space: nowrap;
  font-size: clamp(50px, 8.2vw, 112px);
  color: transparent; -webkit-text-stroke: 2px var(--acid);
}
.pitch { font-size: 19px; max-width: 54ch; color: var(--paper); opacity: 0; animation: fadeUp 0.6s var(--ease) 0.9s forwards; margin: 0 0 24px; }
.pitch em { color: var(--acid); font-style: normal; font-variation-settings: 'wdth' 92, 'wght' 700; }

.arch {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--amber);
  padding: 14px 18px; background: rgba(0, 0, 0, 0.25);
}
.arch.still { opacity: 1; animation: none; }
.arch-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); writing-mode: vertical-rl; transform: rotate(180deg); }
.arch-name { font-variation-settings: 'wdth' 75, 'wght' 800; font-size: 22px; }
.arch-desc { color: var(--dim); font-size: 15px; }
.arch-desc b { color: var(--paper); font-weight: 600; }
.arch-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.arch-pick {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 5px 9px; border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--dim);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.arch-pick small { font-size: 9px; color: var(--faint); }
.arch-pick:hover, .arch-pick:focus-visible { border-color: var(--amber); color: var(--paper); }
.arch-pick.on { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.arch-pick.locked { border-style: dashed; color: var(--faint); }
.arch-pick.locked.on { background: transparent; border-color: var(--amber); color: var(--amber); }
.arch-twist { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; }
.arch-twist li::before { content: '› '; color: var(--amber); }
.arch-lock { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--amber); }
.arch-note { margin-top: 10px; font-family: var(--mono); font-size: 10px; color: var(--faint); }

/* play area: resume banner, three mode cards, archetype, quiet links */
.play { display: flex; flex-direction: column; gap: 14px; opacity: 0; animation: fadeUp 0.6s var(--ease) 1.05s forwards; }
.resume, .mode {
  all: unset; box-sizing: border-box; position: relative; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; border: 1px solid var(--line-2); background: var(--ink-2);
  transition: transform 0.15s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.mode-k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.resume b, .mode b { font-variation-settings: 'wdth' 85, 'wght' 800; font-size: 22px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.05; }
.resume { background: var(--acid); border-color: var(--acid); color: var(--acid-ink); box-shadow: 5px 5px 0 rgba(200, 255, 58, 0.18); padding-right: 64px; }
.resume .mode-k, .resume .resume-d { color: rgba(26, 34, 0, 0.7); }
.resume-d { font-family: var(--mono); font-size: 11px; }
.resume kbd { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--acid-ink); border-color: rgba(26, 34, 0, 0.35); }
.resume:hover, .resume:focus-visible { box-shadow: 8px 8px 0 rgba(200, 255, 58, 0.25); transform: translate(-2px, -2px); }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mode-d { font-size: 14px; color: var(--dim); line-height: 1.3; flex: 1; }
.mode-f { font-family: var(--mono); font-size: 10px; color: var(--paper); margin-top: 4px; }
.mode-f .pick-arch { color: var(--amber); }
.mode-f .mode-best { display: block; margin-top: 2px; color: var(--dim); }
.mode:hover, .mode:focus-visible { border-color: var(--acid); background: var(--panel-2); transform: translateY(-3px); }
.mode.daily { border-color: rgba(200, 255, 58, 0.5); }
.mode.daily .mode-k { color: var(--acid); }
.mode-k .mode-timer { float: right; color: var(--dim); letter-spacing: 0.06em; }
.countdown { font-variant-numeric: tabular-nums; }
.mode.done { cursor: default; border-style: dashed; background: transparent; }
.mode.done:hover { transform: none; background: transparent; border-color: var(--line-2); }
.mode.done .mode-k { color: var(--acid); }
.mode-share { margin: 0; flex: 1; font-family: var(--mono); font-size: 10px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--dim); }
.title-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding-top: 6px; }
.tl {
  all: unset; cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid transparent; padding: 4px 0; transition: color 0.2s, border-color 0.2s;
}
.tl b { color: var(--paper); font-weight: 600; margin-left: 4px; }
.tl:hover, .tl:focus-visible { color: var(--acid); border-bottom-color: var(--acid); }
.tl.danger:hover, .tl.danger:focus-visible { color: var(--flare); border-bottom-color: var(--flare); }
.tl-meta { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--faint); }

/* achievements page */
.ach-bar { height: 6px; background: var(--line); margin: -6px 0 18px; }
.ach-bar i { display: block; height: 100%; background: var(--acid); }
.achpage .achv { margin-bottom: 8px; }
.achpage .achv .a:not(.got):not(.new) { opacity: 0.55; }
.achv .a { position: relative; }
.achv .a .a-when { display: block; margin-top: 4px; font-family: var(--mono); font-size: 9.5px; color: var(--acid); }

/* between games: patch notes */
.between-tools { display: flex; gap: 8px; margin: -8px 0 18px; }
.pn-sec { margin-bottom: 22px; }
.pn-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pn-row:last-child { border-bottom: 0; }
.pn-row .cicon { width: 36px; height: 36px; }
.pn-row.buff { box-shadow: inset 2px 0 0 var(--acid); padding-left: 10px; }
.pn-row.nerf { box-shadow: inset 2px 0 0 var(--flare); padding-left: 10px; }
.pn-who b { display: block; font-variation-settings: 'wdth' 80, 'wght' 750; font-size: 16px; }
.pn-who small { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.pn-who .ricon { width: 11px; height: 11px; vertical-align: -2px; }
.pn-yours { color: var(--amber); }
.pn-fx { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pn-fx small { font-family: var(--mono); font-size: 9.5px; color: var(--faint); }

.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta.row { flex-direction: row; flex-wrap: wrap; margin-top: 28px; }
.cta .btn { min-width: 320px; justify-content: space-between; }
.cta.row .btn { min-width: 0; width: auto; flex: 0 0 auto; justify-content: center; white-space: nowrap; }

/* ───────────── result ───────────── */
.result { text-align: center; padding: 36px 0 12px; }
.stamp {
  display: inline-block;
  font-variation-settings: 'wdth' 150, 'wght' 900;
  font-size: clamp(52px, 7.6vw, 100px); line-height: 0.9;
  padding: 10px 28px 4px;
  border: 6px solid currentColor;
  transform: rotate(-4deg);
  animation: stamp 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) both;
  mix-blend-mode: screen;
}
.result.win .stamp { color: var(--acid); text-shadow: 0 0 40px rgba(200, 255, 58, 0.4); }
.result.loss .stamp { color: var(--flare); text-shadow: 0 0 40px rgba(255, 75, 43, 0.4); }
.result.remake .stamp { color: var(--dim); border-style: dashed; }
@keyframes stamp { 0% { transform: rotate(-12deg) scale(2.4); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-4deg) scale(1); } }
.result.loss { animation: shake 0.35s 0.4s 1; }

.lp-line { margin: 28px 0 6px; display: flex; justify-content: center; align-items: baseline; gap: 8px; }
.lp-delta { font-family: var(--mono); font-size: 56px; font-weight: 700; letter-spacing: -0.04em; }
.result.win .lp-delta { color: var(--acid); } .result.loss .lp-delta { color: var(--flare); }
.lp-unit { font-family: var(--mono); color: var(--dim); }
.new-rank { display: inline-flex; align-items: center; gap: 12px; text-align: left; font-variation-settings: 'wdth' 75, 'wght' 750; font-size: 24px; margin-bottom: 14px; }
.new-rank small { display: block; font-family: var(--mono); font-size: 12px; color: var(--dim); font-weight: 400; }
.banner { display: block; width: fit-content; margin: 6px auto; padding: 6px 14px; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; animation: slam 0.5s var(--ease) 0.5s both; }
.banner.up { background: var(--acid); color: var(--acid-ink); }
.banner.down { background: var(--flare); color: #fff; }
.banner.shield { border: 1px solid var(--amber); color: var(--amber); }
.recap {
  max-width: 34ch; margin: 22px auto 6px;
  font-variation-settings: 'wdth' 85, 'wght' 500; font-style: italic;
  font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2;
  opacity: 0; animation: fadeUp 0.6s var(--ease) 0.7s forwards;
}
.odds { font-family: var(--mono); font-size: 11px; color: var(--faint); margin: 0 0 26px; }

/* ───────────── between ───────────── */
.strip { display: flex; gap: 3px; margin: -6px 0 20px; flex-wrap: wrap; }
.strip i { width: 22px; height: 22px; display: grid; place-items: center; font-family: var(--mono); font-style: normal; font-size: 10px; font-weight: 700; }
.strip i.w { background: var(--acid); color: var(--acid-ink); }
.strip i.l { background: var(--flare); color: #fff; }
.strip i:last-child { outline: 2px solid var(--paper); outline-offset: 2px; }

/* ───────────── end ───────────── */
.end { max-width: 720px; }
.final { display: flex; align-items: center; gap: 26px; margin: 4px 0 30px; }
.final .emblem { filter: drop-shadow(0 0 24px color-mix(in srgb, var(--c) 45%, transparent)); animation: stamp 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.final-rank { font-variation-settings: 'wdth' 110, 'wght' 900; font-size: clamp(36px, 5.6vw, 66px); white-space: nowrap; line-height: 0.9; color: var(--c); }
.final-lp { font-family: var(--mono); font-size: 13px; color: var(--dim); margin-top: 8px; }
.final-lp b { color: var(--acid); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-bottom: 26px; }
.stats > div { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); animation: fadeUp 0.4s var(--ease) both; }
.stats > div:nth-child(n) { animation-delay: calc(0.3s); }
.stats .num { display: block; font-variation-settings: 'wdth' 75, 'wght' 800; font-size: 22px; }
.stats .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.share { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 30px; }
.share pre {
  width: 100%; margin: 0; padding: 18px 20px;
  font-family: var(--mono); font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
  background: #0a0908; border: 1px solid var(--line); border-left: 3px solid var(--acid);
}
.achv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.achv .a { padding: 10px 12px; border: 1px dashed var(--line); opacity: 0.4; }
.achv .a b { display: block; font-variation-settings: 'wdth' 80, 'wght' 750; font-size: 15px; }
.achv .a span { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.achv .a.got { opacity: 0.85; border-style: solid; }
.achv .a.new { opacity: 1; border: 1px solid var(--acid); background: rgba(200, 255, 58, 0.06); position: relative; }
.achv .a.new::after { content: 'NEW'; position: absolute; top: 8px; right: 8px; font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--acid); }

/* ───────────── toasts + footer ───────────── */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  padding: 10px 16px; background: var(--paper); color: var(--ink);
  box-shadow: 4px 4px 0 var(--acid);
  animation: toast 3.2s var(--ease) both;
}
@keyframes toast { 0% { opacity: 0; transform: translateY(16px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }

/* ───────────── easter egg: the "ff" surrender vote (input.js) ───────────── */
.ffvote {
  position: fixed; top: 84px; right: 24px; z-index: 61; width: 260px;
  display: grid; gap: 8px; padding: 12px 14px;
  font-family: var(--mono); font-size: 11px;
  background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 4px 4px 0 var(--flare);
  animation: toast 4.2s var(--ease) both;
}
.ffvote b { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.ffvote small { color: var(--paper); line-height: 1.4; }
.ffvote .pips { display: flex; gap: 6px; }
.ffvote .pips i { flex: 1; height: 8px; background: var(--line-2); animation: ffNo 0.2s var(--ease) both; }
.ffvote .pips i:first-child { background: var(--acid); animation: none; }
.ffvote .pips i:nth-child(2) { animation-delay: 0.5s; }
.ffvote .pips i:nth-child(3) { animation-delay: 0.9s; }
.ffvote .pips i:nth-child(4) { animation-delay: 1.2s; }
.ffvote .pips i:nth-child(5) { animation-delay: 1.4s; }
.ffvote .verdict { color: var(--flare); font-weight: 700; opacity: 0; animation: fadeIn 0.2s 1.7s both; }
@keyframes ffNo { to { background: var(--flare); } }
@keyframes fadeIn { to { opacity: 1; } }

/* famous players (specials.js) */
.mate.special { border-color: var(--acid); background: rgba(200, 255, 58, 0.08); flex-wrap: wrap; }
.mate.special b { color: var(--acid); }
.sb-row.special { box-shadow: inset 2px 0 0 var(--amber); }
.sb-row.special .r-who small { color: var(--amber); font-weight: 700; }

.foot { position: relative; z-index: 1; padding: 16px 24px 22px; font-family: var(--mono); font-size: 10px; color: var(--faint); text-align: center; }
.foot a { color: var(--dim); }
/* touch screens: no keyboard, so no key hints */
@media (hover: none) and (pointer: coarse) { kbd, .foot .keys { display: none; } }

/* ───────────── tilt effects ───────────── */
@keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
@keyframes jitter { 0%, 92%, 100% { transform: none; } 93% { transform: translate(-2px, 1px) skewX(-2deg); } 95% { transform: translate(2px, -1px); } 97% { transform: translate(-1px, 0) skewX(1deg); } }

/* ───────────── responsive ───────────── */
@media (max-width: 820px) {
  .top { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .hud { justify-content: flex-start; }
  .hud-block { padding: 4px 10px; }
  .hud .num.big { font-size: 20px; }
  .layout, body:not(.in-run) .layout { grid-template-columns: 1fr; padding: 16px 14px 40px; gap: 18px; }
  .ladder {
    position: relative; top: 0; height: 44px;
    flex-direction: row; padding: 0;
    border-bottom: 2px solid var(--line-2);
  }
  .ladder .rail { display: none; }
  .rung { flex-direction: column; justify-content: flex-end; gap: 3px; border-bottom: 0; border-right: 1px dashed var(--line); font-size: 8.5px; padding-bottom: 6px; }
  .rung span { display: none; }
  .rung.cur span { display: block; }
  .marker { bottom: -9px !important; left: calc(var(--pos) * 100%); transform: translateX(-50%); transition: left 1.1s var(--ease); }
  .marker.pb { left: calc(var(--pb) * 100%); }
  .marker.you::before { left: -9px; top: -6px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 14px solid var(--acid); border-top: 0; }
  .marker span, .marker.pb::before { display: none; }
  .card { padding: 0 18px 22px; }
  .card-head { margin: 0 -18px 20px; padding: 10px 18px; flex-wrap: wrap; }
  .choice { grid-template-columns: 30px 1fr; }
  .choice .chips { grid-column: 2; justify-content: flex-start; }
  .roles { grid-template-columns: repeat(3, 1fr); }
  .champs { grid-template-columns: 1fr; }
  .cta .btn { min-width: 0; width: 100%; }
  .modes { grid-template-columns: 1fr; }
  .tl-meta { margin-left: 0; flex-basis: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .final { gap: 16px; } .emblem.xl { --s: 110px; }
}

/* ───────────── people: lobby, marks, roster ───────────── */
.lobby { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 22px; }
.mate { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; animation: fadeUp 0.35s var(--ease) both; }
.mate b { font-weight: 600; }
.mate.you { border-color: var(--acid); color: var(--acid); }
.mate.known { border-color: var(--amber); background: rgba(255, 176, 46, 0.07); }
.mate.duo { border-color: #7eb2ff; background: rgba(126, 178, 255, 0.07); }
.r-glyph { color: var(--dim); font-size: 11px; }
.mark { font-family: var(--mono); font-size: 10px; font-weight: 700; }
.mark.friend { color: var(--acid); }
.mark.foe { color: var(--flare); }
.mark.duo { color: #7eb2ff; border: 1px solid currentColor; padding: 0 4px; font-size: 8.5px; letter-spacing: 0.08em; }
.chatlog .who small { color: var(--dim); }
.chatlog .line.sys .who { color: var(--dim); }
.chatlog .line.enemy .who { color: var(--flare); }
.chip.mem { color: #7eb2ff; border-color: rgba(126, 178, 255, 0.4); }
.hud-block.duo .num { color: #7eb2ff; font-size: 11px; }

.roster { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.person { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; font-size: 15px; }
.person b { font-variation-settings: 'wdth' 80, 'wght' 700; }
.person small { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.pg-head { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.pg-head small { text-transform: none; letter-spacing: 0; color: var(--faint); margin-left: 6px; }

/* ───────────── live match timeline ───────────── */
.timeline .phase.live { color: var(--flare); animation: blink 1.2s infinite; }
.gold-wrap { position: relative; margin: -6px 0 18px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
.gold { display: block; width: 100%; height: 120px; }
.g-zero { stroke: var(--line-2); stroke-dasharray: 4 4; }
.g-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw var(--dur) linear forwards; }
.g-line.pos { stroke: var(--acid); filter: drop-shadow(0 0 4px rgba(200, 255, 58, 0.5)); }
.g-line.neg { stroke: var(--flare); filter: drop-shadow(0 0 4px rgba(255, 75, 43, 0.5)); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.g-lbl { position: absolute; left: 8px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.g-lbl.g-up { top: 5px; } .g-lbl.g-down { bottom: 5px; }

.feed { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12.5px; }
.feed li {
  display: grid; grid-template-columns: 50px 16px 1fr; gap: 8px; align-items: baseline;
  padding: 7px 10px; background: var(--ink-2); border-left: 2px solid var(--line-2);
  opacity: 0; animation: fadeUp 0.3s var(--ease) forwards; animation-delay: calc(var(--i) * 330ms);
}
.feed time { color: var(--faint); }
.feed li.good { border-left-color: var(--acid); } .feed li.good .ico { color: var(--acid); }
.feed li.bad { border-left-color: var(--flare); } .feed li.bad .ico { color: var(--flare); }
.feed li.call { background: rgba(255, 176, 46, 0.07); border-left-color: var(--amber); }
.feed li.call .ico { color: var(--amber); }
.feed li.call small { display: block; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.feed li.end { font-family: var(--display); font-variation-settings: 'wdth' 110, 'wght' 900; font-size: 22px; text-transform: uppercase; padding: 10px; }
.feed li.end time { font-family: var(--mono); font-size: 12px; font-variation-settings: normal; }
.feed li.end.good { color: var(--acid); } .feed li.end.bad { color: var(--flare); }
.timeline .reveal { opacity: 0; animation: fadeUp 0.4s var(--ease) forwards; animation-delay: var(--dur); }

/* ───────────── post-game lobby ───────────── */
.res-top { display: flex; align-items: center; justify-content: center; gap: 36px; flex-wrap: wrap; }
.res-top .stamp { font-size: clamp(44px, 6.4vw, 84px); }
.res-side { text-align: left; }
.res-side .lp-line { margin: 0 0 6px; justify-content: flex-start; }
.res-side .new-rank { margin: 0; }
.stage.enter > .result.settled, .result.settled .stamp, .result.settled .banner { animation: none; }
.result.settled .recap { animation: none; opacity: 1; }

.board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; margin: 6px 0 16px; }
.team { border: 1px solid var(--line); background: var(--panel); }
.team-head { display: flex; justify-content: space-between; padding: 8px 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); }
.team.won .team-head span:last-child { color: var(--acid); }
.team.lost .team-head span:last-child { color: var(--flare); }
.sb-row {
  display: grid; grid-template-columns: 14px 28px minmax(0, 1fr) auto 30px 32px; gap: 8px; align-items: center;
  padding: 7px 12px; border-bottom: 1px solid var(--line);
  animation: fadeUp 0.35s var(--ease) both; animation-delay: calc(var(--i) * 50ms + 0.3s);
}
.result.settled .sb-row { animation: none; }
.sb-row:last-child { border-bottom: 0; }
.sb-row.you { background: rgba(200, 255, 58, 0.07); box-shadow: inset 2px 0 0 var(--acid); }
.r-who { min-width: 0; }
.r-who b { display: block; font-variation-settings: 'wdth' 80, 'wght' 700; font-size: 15px; line-height: 1.1; }
.r-who small { display: block; font-family: var(--mono); font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-kda { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.r-cs { font-family: var(--mono); font-size: 10.5px; color: var(--dim); text-align: right; }
.mvp { font-family: var(--mono); font-size: 8.5px; font-weight: 700; background: var(--amber); color: var(--ink); padding: 2px 3px; text-align: center; }

.post { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; text-align: left; margin-bottom: 26px; }
.pgchat { font-family: var(--mono); font-size: 12px; background: rgba(0, 0, 0, 0.35); border-left: 2px solid var(--amber); padding: 10px 14px; }
.pgchat .line { margin: 4px 0; opacity: 0; animation: fadeUp 0.3s var(--ease) forwards; animation-delay: calc(var(--i) * 400ms + 0.8s); }
.result.settled .pgchat .line { animation: none; opacity: 1; }
.pgchat .who { color: var(--amber); }
.pgchat .enemy .who { color: var(--flare); }
.pgchat small { color: var(--dim); }
.pgchat .line.sys { color: var(--dim); font-style: italic; }
.honor { padding: 10px 0; }
.honor-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.hbtn { all: unset; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--line-2); background: var(--ink-2); cursor: pointer; transition: border-color 0.2s, background 0.2s; min-width: 0; }
.hbtn b { display: block; font-variation-settings: 'wdth' 80, 'wght' 700; font-size: 14px; }
.hbtn small { display: block; font-family: var(--mono); font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbtn:hover:not([disabled]), .hbtn:focus-visible { border-color: var(--acid); }
.hbtn.on { border-color: var(--acid); background: rgba(200, 255, 58, 0.1); }
.hbtn.on::after { content: '♥ honored'; display: block; margin-top: 2px; font-family: var(--mono); font-size: 9px; color: var(--acid); }
.hbtn[disabled]:not(.on) { opacity: 0.35; cursor: default; }

@media (max-width: 820px) {
  .board, .post { grid-template-columns: 1fr; }
  .res-top { gap: 10px; }
  .res-side { text-align: center; }
  .res-side .lp-line { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .chatlog .line, .pitch, .play, .recap, .feed li, .timeline .reveal, .pgchat .line { opacity: 1; }
  .g-line { stroke-dashoffset: 0; }
}

/* ───────────── champion mastery ───────────── */
.mastery { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.mastery b { font-weight: 700; color: var(--paper); }
.mastery.m0 b { color: var(--faint); }
.m-pips { letter-spacing: 1px; font-size: 9px; color: var(--faint); }
.mastery:not(.m0) .m-pips { color: var(--acid); }
.mastery.m5 b { color: var(--acid); text-shadow: 0 0 10px rgba(200, 255, 58, 0.5); }
.m-fx { font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; }
.m-fx.pos { color: var(--acid); } .m-fx.neg { color: var(--flare); }
.pool { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -10px 0 26px; }
.pool .lbl { width: 100%; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.pool-c { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); animation: fadeUp 0.4s var(--ease) both; animation-delay: 0.35s; }
.pool-c.main { border-color: var(--acid); }
.pool-c b { font-variation-settings: 'wdth' 75, 'wght' 800; font-size: 16px; text-transform: uppercase; }
.pool-c small { font-family: var(--mono); font-size: 10px; color: var(--dim); }

/* ── campaign: objectives, off-season ── */
.objs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.objs li { display: flex; align-items: baseline; gap: 10px; font-size: 15px; }
.objs li small { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.objs .o-mark { font-family: var(--mono); width: 1.2em; color: var(--dim); }
.objs .done .o-mark, .objs .done small, .objs .track .o-mark { color: var(--acid); }
.objs .failed { opacity: 0.55; }
.objs .failed .o-mark, .objs .failed small { color: var(--flare); }
.camp-end { margin: -6px 0 26px; }
.offseason .stats { margin: 4px 0 20px; }
.offseason .pool.patch { margin: 0 0 22px; }
.offseason > .pg-head { margin-top: 4px; }
.odds.mmr { color: var(--acid); }

/* ───────────── break cards, lessons, mental bands ───────────── */
.hand-head { margin: 10px 0 0; }
.brk-card { grid-template-columns: 44px 1fr auto; border-style: dashed; }
.brk-card:disabled { cursor: default; opacity: 0.35; background: var(--ink-2); color: inherit; border-color: var(--line-2); transform: none; }
.brk-card:disabled .idx, .brk-card:disabled small { color: var(--dim); }
.brk-card:disabled .chip { color: inherit; background: none; border-color: var(--line-2); }
.brk-card.played:disabled { opacity: 1; border-style: solid; border-color: var(--acid); }
.brk-card.played .idx { color: var(--acid); }

.lesson {
  display: flex; gap: 12px; align-items: baseline;
  margin: -6px 0 18px; padding: 10px 14px;
  border-left: 2px solid #7eb2ff; background: rgba(126, 178, 255, 0.07);
  font-size: 14px;
}
.lesson b { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #7eb2ff; }

.hud .lbl small { display: block; font-size: 9px; letter-spacing: 0.08em; color: var(--faint); }
.mental.locked .cells i.on { background: #7eb2ff; box-shadow: 0 0 10px rgba(126, 178, 255, 0.55); }
.mental.locked .lbl small { color: #7eb2ff; }
.hud-block.clock.ending .lbl { color: var(--flare); }

/* ───────────── lobby scouting, conduct, duo bond, patch, series ───────────── */
.btn.sm { padding: 8px 12px; font-size: 13px; gap: 8px; }
.btn.sm kbd { font-size: 9px; }
.btn[disabled] { opacity: 0.45; cursor: default; border-style: solid; }
.btn[disabled]:hover { border-color: var(--line-2); }
.lobby-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 20px; }
.mate.scouted { flex-wrap: wrap; }
.mate .trait { flex-basis: 100%; font-size: 9.5px; color: var(--dim); }
.mate .trait.bad { color: var(--flare); }
.mate .trait.good { color: var(--acid); }
.lobby:has(.scouted) { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lobby:has(.scouted) .mate.you { justify-content: center; }
.mate .prefs { flex-basis: 100%; font-size: 9.5px; color: var(--paper); }
.mate .prefs i { font-style: normal; color: var(--dim); }
.mate .prefs .ricon { width: 11px; height: 11px; vertical-align: -2px; }
.note.bad { border-left-color: var(--flare); }
.banner.series { border: 1px solid #c97bff; color: #c97bff; display: flex; align-items: center; gap: 10px; }
.banner.series .strip { margin: 0; }
.banner.series .strip i { width: 18px; height: 18px; border: 1px solid #c97bff; }
.banner.series .strip i:last-child { outline: 0; }
.pregame .banner.series, .between .banner.series { margin: -6px 0 18px; }
.patchnote { border: 1px solid var(--amber); background: rgba(255, 176, 46, 0.06); padding: 12px 14px; margin: -6px 0 20px; animation: fadeUp 0.4s var(--ease) both; }
.patchnote b { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.patchnote > span { font-size: 14px; }
.patchnote .pool.patch { margin: 8px 0 0; }
.conduct { margin: 0 0 4px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.conduct .neg { color: var(--flare); font-weight: 600; }
.bond { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.bond-bar { flex: 0 1 220px; height: 8px; border: 1px solid var(--line-2); }
.bond-bar i { display: block; height: 100%; background: #7eb2ff; box-shadow: 0 0 8px rgba(126, 178, 255, 0.45); }
.bond .btn { margin-left: auto; }
.odds.honors { color: var(--acid); }
.share-btns { margin-top: 10px; }

/* ───────────── stats page ───────────── */
.statspage .stats .num { display: flex; align-items: center; gap: 8px; }
.st-row { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1.4fr 1.4fr; gap: 10px; padding: 5px 0; font-family: var(--mono); font-size: 11px; color: var(--dim); border-bottom: 1px solid var(--line); }
.st-row b { font-family: var(--display); font-variation-settings: 'wdth' 80, 'wght' 700; font-size: 15px; color: var(--paper); }
.st-champ { display: grid; grid-template-columns: 130px 1fr 80px 110px; gap: 12px; align-items: center; padding: 4px 0; font-family: var(--mono); font-size: 11px; color: var(--dim); animation: fadeUp 0.35s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.st-champ b { font-family: var(--display); font-variation-settings: 'wdth' 80, 'wght' 700; font-size: 15px; color: var(--paper); }
.st-champ .pos { color: var(--acid); } .st-champ .neg { color: var(--flare); }
.st-bar { height: 6px; background: var(--ink-2); }
.st-bar i { display: block; height: 100%; background: var(--acid); opacity: 0.75; }
.st-run { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); animation: fadeUp 0.35s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.st-run-main b { display: block; font-variation-settings: 'wdth' 80, 'wght' 700; font-size: 16px; }
.st-run-main small { display: block; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.st-strip { display: flex; gap: 2px; margin-top: 5px; }
.st-strip i { width: 8px; height: 8px; background: var(--flare); }
.st-strip i.w { background: var(--acid); }
.st-peak { font-family: var(--mono); font-size: 10px; color: var(--faint); text-align: right; }
@media (max-width: 820px) {
  .st-row { grid-template-columns: 1fr 1fr; }
  .st-champ { grid-template-columns: 1fr 1fr; }
  .st-champ .st-bar { display: none; }
}

/* Official role icons and champion portraits (see tools/icons.mjs) */
.ricon { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.28em; flex: none; }
.r-glyph { display: inline-flex; line-height: 0; }
.r-glyph .ricon { width: 14px; height: 14px; }
.cicon {
  display: inline-block; flex: none; width: 28px; height: 28px; object-fit: cover;
  border: 1px solid var(--line-2); background: var(--ink-2);
}
.cicon.sm { width: 18px; height: 18px; vertical-align: -0.35em; margin-right: 6px; }
.champ:hover .cicon, .champ:focus-visible .cicon { border-color: var(--acid); }
.hbtn { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; align-items: center; }
.hbtn .cicon { grid-row: span 2; }
.hbtn.on::after { grid-column: 1 / -1; }
.pool-c .cicon.sm { margin-right: 0; }

/* archetypes: OTP main pick, Streamer viewers, storyline endings */
.chip.hype { color: #ff6fd8; border-color: rgba(255, 111, 216, 0.45); }
.hud-block.viewers .num { color: #ff6fd8; }
.main-roles { display: grid; gap: 14px; }
.main-role .pg-head { display: flex; align-items: center; gap: 8px; }
.main-role .pg-head .ricon { width: 16px; height: 16px; color: var(--acid); }
.main-champs { display: flex; flex-wrap: wrap; gap: 6px; }
.main-pick { display: inline-flex; align-items: center; gap: 6px; }
.main-pick .cicon.sm { width: 22px; height: 22px; }
.role.main-role-pick { border-color: var(--acid); }
.role .rname small { display: block; font-family: var(--mono); font-size: 10px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--acid); }
.ending {
  display: grid; gap: 4px; margin: 0 0 22px; padding: 14px 18px;
  border: 1px solid var(--c, var(--acid)); border-left-width: 4px; background: var(--ink-2);
  animation: fadeUp 0.5s var(--ease) both; animation-delay: 0.2s;
}
.ending .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.ending b { font-variation-settings: 'wdth' 75, 'wght' 850; font-size: 28px; text-transform: uppercase; color: var(--paper); }
.ending span:last-child { color: var(--dim); font-size: 15px; }
