/* yavender.com · League client look · left-biased layout
   Checked against the Hallmark slop test (github.com/Nutlope/hallmark):
   tokens only, 4px spacing scale, no gradient text, one hover effect per element,
   stacked section heads, no horizontal scroll from 320px up. */

:root {
  /* colour */
  --ink: #010a13;
  --navy: #0a1428;
  --panel: #0b1a2c;
  --well: #030d17;
  --line: #1e2328;
  --gold-1: #f0e6d2;
  --gold-2: #c8aa6e;
  --gold-3: #c89b3c;
  --gold-4: #785a28;
  --gold-5: #463714;
  --blue-1: #cdfafa;
  --blue-2: #0ac8b9;
  --blue-4: #005a82;
  --teal-fill: #0f2a33;
  --teal-fill-2: #17414d;
  --text: #a09b8c;
  --text-2: #c7c1b2;
  --text-3: #8a8577;
  --danger: #e0736b;
  --loss: #5b2a2a;
  --scrim: rgba(1, 10, 19, .88);
  --live: #3ecf6e;
  --danger-hover: #7a3333;
  /* Rift Tactics: teams and effect kinds (damage numbers, log, vfx) */
  --team-blue: #2f9bd6;
  --team-red: #c94a43;
  --heal: #6be38a;
  --shield: #e9eef2;
  --buff: #5fd3a0;
  --phys: #ff9f6b;
  --magic: #7fb4ff;
  --magic-strong: #2f9dff;
  --crit: #ffd36b;
  --crit-strong: #ffc400;
  --annul: #c48bff;
  --annul-strong: #a050ff;
  --gold-wash: rgba(200, 170, 110, .08);

  /* type */
  --serif: "Philosopher", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* type scale; site text never under --fs-xs, the two hud steps are only for Rift Tactics badges */
  --fs-hud-xs: 9px;
  --fs-hud-sm: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 28px;
  --fs-4xl: 32px;
  --fs-5xl: 40px;
  --fs-lead: clamp(19px, 2.2vw, 26px);
  --fs-h3: clamp(24px, 3vw, 36px);
  --fs-h2: clamp(28px, 4vw, 44px);
  --fs-h1: clamp(34px, 5.4vw, 64px);
  --fs-display: clamp(38px, 6.4vw, 84px);
  --fs-hero: clamp(48px, 9vw, 112px);

  /* space: 4px base */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;

  --nav-h: 64px;
  --gutter: clamp(16px, 4vw, 48px);
  --page: 1240px;
  /* inline padding that puts full-bleed bars (nav, hero) on the same column as .block */
  --edge: max(var(--gutter), calc((100% - var(--page)) / 2));
  --section-y: clamp(48px, 7vw, 88px);
  --control: 44px;

  /* elevation */
  --shadow-1: 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-2: 0 12px 40px rgba(0, 0, 0, .6);
  --shadow-3: 0 16px 48px rgba(0, 0, 0, .7);

  --z-raised: 10;
  --z-sticky: 200;
  --z-nav: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; overflow-x: clip;
  background: var(--ink); color: var(--text);
  font: 400 var(--fs-base)/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
::selection { background: var(--gold-4); color: var(--gold-1); }

h1, h2, h3, .brand, .tabs a, .eyebrow, .btn-hex, .btn-gold, .btn-play, .foot-brand {
  font-family: var(--serif); font-weight: 700; text-transform: uppercase;
}
h1, h2, h3 { overflow-wrap: anywhere; min-width: 0; line-height: 1.1; color: var(--gold-1); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav); height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s4); padding: 0 var(--edge);
  background: color-mix(in srgb, var(--ink) 94%, transparent); border-bottom: 1px solid var(--gold-5);
}
.brand { display: flex; flex: none; align-items: center; gap: var(--s3); font-size: var(--fs-lg); letter-spacing: .14em; line-height: 1; color: var(--gold-1); }
.brand img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold-3); }
.tabs { display: flex; height: 100%; margin-right: auto; }
.tabs a {
  position: relative; display: flex; align-items: center; padding: 0 var(--s3);
  font-size: var(--fs-sm); letter-spacing: .12em; line-height: 1; white-space: nowrap; color: var(--gold-2);
  transition: color .15s;
}
.tabs a:hover, .tabs a.is-active { color: var(--gold-1); }
.tabs a.is-active::after { content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 0; height: 2px; background: var(--gold-2); }
.nav-account { position: relative; flex: none; }

/* ---------- Buttons ---------- */
.btn-play, .btn-hex, .btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  letter-spacing: .12em; line-height: 1; white-space: nowrap; border: 0; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-play {
  height: 36px; padding: 0 var(--s5); font-size: var(--fs-sm); color: var(--blue-1);
  background: var(--teal-fill); border: 2px solid var(--blue-2); border-radius: 18px;
}
.btn-play:hover { background: var(--teal-fill-2); }
.btn-hex {
  position: relative; z-index: 0; min-height: var(--control); padding: 0 var(--s6); font-size: var(--fs-md); color: var(--blue-1);
  background: var(--blue-2);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
}
.btn-hex::before {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: var(--teal-fill);
  clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
  transition: background-color .15s;
}
.btn-hex:hover::before { background: var(--teal-fill-2); }
.btn-gold {
  min-height: var(--control); padding: 0 var(--s5); font-size: var(--fs-sm); color: var(--gold-2);
  background: color-mix(in srgb, var(--line) 70%, transparent); border: 1px solid var(--gold-4);
}
.btn-gold:hover { color: var(--gold-1); border-color: var(--gold-2); }
.btn-hex:active, .btn-gold:active, .btn-play:active { transform: translateY(1px); }
.btn-hex:disabled, .btn-gold:disabled, .btn-play:disabled, button:disabled { opacity: .55; cursor: not-allowed; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; min-height: var(--control); padding: 0 var(--s5); font: 700 var(--fs-sm)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-1); background: var(--loss); border: 1px solid var(--danger); cursor: pointer; transition: background-color .15s; }
.btn-danger:hover { background: var(--danger-hover); }
.ask { width: min(460px, calc(100% - 24px)); }
.ask-detail { color: var(--text-2); }
.link { padding: 0; font: inherit; color: var(--blue-2); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--blue-1); }

/* ---------- Hero (home, about) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(92svh, 860px); display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + var(--s7)) var(--edge) var(--s9);
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Yasuo_0.jpg") 62% 18% / cover no-repeat;
}
.hero-home .hero-bg { background-image: url("https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Yasuo_87.jpg"); background-position: 70% 20%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 86%, transparent) 34%, color-mix(in srgb, var(--ink) 20%, transparent) 70%, color-mix(in srgb, var(--ink) 50%, transparent) 100%),
    linear-gradient(0deg, var(--ink) 0%, transparent 36%);
}
.wind { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { width: 100%; max-width: 720px; }
.eyebrow { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); letter-spacing: .22em; line-height: 1; color: var(--blue-2); }
.gem { width: 7px; height: 7px; flex: none; background: var(--gold-2); transform: rotate(45deg); }
.eyebrow .gem:last-child { display: none; }
.hero h1 { margin-top: var(--s3); font-size: var(--fs-hero); line-height: 1.02; letter-spacing: .03em; color: var(--gold-1); }
.hero-home h1 { font-size: var(--fs-display); }
.tagline { margin-top: var(--s2); font: 400 var(--fs-lead)/1.3 var(--serif); letter-spacing: .03em; color: var(--gold-2); }
.lede { margin-top: var(--s4); max-width: 54ch; color: var(--text-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6); }
.hero-cta .btn-hex { min-height: 52px; font-size: var(--fs-base); }
.hero-cta .btn-gold { min-height: 52px; }
.stats { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s7); margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--gold-5); }
.stats dt { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; }
.stats dd { font: 700 var(--fs-4xl)/1.2 var(--serif); color: var(--gold-1); }
.scroll-cue { display: none; }

/* ---------- Sections and heads ---------- */
.block { display: grid; grid-template-columns: minmax(0, var(--page)); justify-content: center; padding: var(--section-y) var(--gutter) clamp(56px, 8vw, 104px); }
.block-alt { background: var(--navy); border-block: 1px solid var(--gold-5); }
.block + .block:not(.block-alt) { padding-top: 0; }
.block-alt + .block:not(.block-alt) { padding-top: var(--section-y); }

/* A section head is one left-aligned stack: heading, then an optional line of text. */
.title { margin-bottom: var(--s6); }
.title h2, .subhead { display: flex; align-items: center; gap: var(--s4); font: 700 var(--fs-h3)/1.1 var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.title h2::after, .subhead::after { content: ""; flex: 1; min-width: var(--s5); height: 1px; background: linear-gradient(90deg, var(--gold-4), transparent); }
.sub { margin-top: var(--s2); max-width: 62ch; color: var(--text); }
.kicker { display: none; }
.subhead { margin: var(--s7) 0 var(--s5); font-size: var(--fs-2xl); letter-spacing: .08em; }
.subhead:first-child { margin-top: 0; }
.subhead span { font: 400 var(--fs-base) var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); }
.footnote { margin-top: var(--s5); font-size: var(--fs-sm); color: var(--text-3); }
.center { margin-top: var(--s6); }
.empty { padding: var(--s6) var(--s4); border: 1px dashed var(--gold-5); color: var(--text); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.toolbar .title, .toolbar .subhead { flex: 1; min-width: 200px; margin: 0; }
.more { flex: none; font-size: var(--fs-md); color: var(--gold-2); text-decoration: underline; text-underline-offset: 4px; }
.more:hover { color: var(--gold-1); }

.frame { position: relative; background: var(--panel); border: 1px solid var(--gold-4); }

/* Page head on inner pages: text on the left, champion art fading in from the right. */
.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--nav-h) + var(--s8)) var(--gutter) var(--s7); border-bottom: 1px solid var(--gold-5);
}
.page-head::before { content: ""; position: absolute; inset: 0 0 0 30%; z-index: -2; background: var(--art) center 22% / cover no-repeat; opacity: .6; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 30%, color-mix(in srgb, var(--ink) 55%, transparent) 70%, color-mix(in srgb, var(--ink) 80%, transparent)), linear-gradient(0deg, var(--ink), transparent 50%); }
.page-head .title { max-width: var(--page); margin: 0 auto; }
.page-head h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: .04em; }
.page-head .sub { margin-top: var(--s3); font-size: var(--fs-lg); color: var(--text-2); }
.plain-page, .mod-page, .admin-main { padding-top: var(--nav-h); }

/* ---------- Community feed ---------- */
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s7); align-items: start; }
.feed-side { position: sticky; top: calc(var(--nav-h) + var(--s5)); display: grid; gap: var(--s4); padding: var(--s5); background: var(--panel); border: 1px solid var(--gold-5); }
.feed-side h2 { font-size: var(--fs-base); letter-spacing: .12em; }
.feed-side p, .feed-side li { font-size: var(--fs-md); }
.feed-side ul { display: grid; gap: var(--s2); padding-left: var(--s4); list-style: square; }
.feed-side .btn-hex { width: 100%; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.filters button {
  min-height: 36px; padding: 0 var(--s4); background: transparent; border: 1px solid var(--gold-5);
  font: 700 var(--fs-xs)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2);
  transition: border-color .15s, color .15s;
}
.filters button:hover { border-color: var(--gold-2); color: var(--gold-1); }
.filters button[aria-selected="true"] { color: var(--ink); background: var(--gold-2); border-color: var(--gold-2); }

.posts { display: grid; gap: var(--s4); }
.post {
  display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; padding: 0; text-align: left; color: inherit;
  background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s;
}
.post:has(.post-media) { grid-template-columns: 220px minmax(0, 1fr); }
.post:hover { border-color: var(--gold-2); }
.post-media { min-height: 124px; background: var(--well) center / cover no-repeat; border-right: 1px solid var(--gold-5); }
.post-body { display: grid; gap: var(--s1); align-content: start; padding: var(--s4) var(--s5); }
.post-type { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-2); }
.post h3 { font: 600 var(--fs-lg)/1.35 var(--sans); text-transform: none; color: var(--gold-1); }
.post-text { font-size: var(--fs-md); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-by { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin-top: var(--s2); font-size: var(--fs-sm); color: var(--text-3); }
.post-by b { font-weight: 600; color: var(--gold-2); }
.post-by a:hover { color: var(--gold-1); text-decoration: underline; }
.post-stats { display: flex; gap: var(--s4); margin-top: var(--s1); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.post-stats b { color: var(--text-2); font-weight: 600; }

/* ---------- Members ---------- */
.ava { flex: none; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-4); background: var(--ink); vertical-align: middle; }
.ava-blank { display: inline-grid; place-items: center; font-family: var(--serif); font-weight: 700; line-height: 1; color: var(--gold-1); background: var(--teal-fill); }
.role { padding: 2px var(--s2); font: 700 var(--fs-xs)/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; vertical-align: middle; color: var(--ink); }
.role-admin { background: var(--gold-2); }
.role-mod { background: var(--blue-2); }
.account-menu summary { display: flex; align-items: center; gap: var(--s2); max-width: 220px; padding-left: var(--s2); list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary span { overflow: hidden; text-overflow: ellipsis; }
.account-menu summary .ava { border-color: var(--blue-2); }
.account-menu > div { position: absolute; right: 0; top: calc(100% + var(--s3)); z-index: var(--z-raised); min-width: 200px; display: grid; background: var(--panel); border: 1px solid var(--gold-3); }
.account-menu > div > * { padding: var(--s3) var(--s4); text-align: left; font: 700 var(--fs-sm)/1.2 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); background: none; border: 0; border-bottom: 1px solid var(--gold-5); }
.account-menu > div > *:last-child { border-bottom: 0; }
.account-menu > div > *:hover { color: var(--gold-1); background: var(--gold-wash); }
.member-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s6); align-items: center; padding: var(--s6); margin-bottom: var(--s7); }
.member-head .ava { border: 2px solid var(--gold-3); }
.member-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); font-size: var(--fs-h2); letter-spacing: .03em; text-transform: none; }
.member-bio { margin-top: var(--s2); max-width: 62ch; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.member-facts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); margin-top: var(--s3); font-size: var(--fs-sm); letter-spacing: .08em; text-transform: uppercase; }
.member-facts b { color: var(--gold-1); font-weight: 600; }
.settings { grid-template-columns: minmax(0, 860px); }
.settings-card { display: grid; gap: var(--s4); padding: var(--s6); margin-bottom: var(--s5); }
.settings-card h2 { font-size: var(--fs-xl); letter-spacing: .08em; }
.avatar-row { display: flex; align-items: center; gap: var(--s5); }
.avatar-row .ava { border: 2px solid var(--gold-3); }
.ava-presets { display: grid; gap: var(--s2); margin-top: var(--s4); }
.ava-presets > div { display: flex; flex-wrap: wrap; gap: var(--s3); }
.ava-presets button { padding: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--ink); cursor: pointer; line-height: 0; transition: border-color .15s; }
.ava-presets button:hover { border-color: var(--gold-4); }
.ava-presets button[aria-pressed="true"] { border-color: var(--gold-1); box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--gold-3); }
.ava-presets button:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.ava-presets img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.file-btn { display: inline-flex !important; margin-right: var(--s3); cursor: pointer; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.settings-list { display: grid; gap: var(--s2); }
.settings-list div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s3); }
.settings-list dt { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; }
.settings-list dd { color: var(--gold-1); overflow-wrap: anywhere; }

/* ---------- Forms and dialogs ---------- */
.crop { justify-items: center; }
.crop h2 { justify-self: start; }
.crop-stage { width: min(320px, 100%); aspect-ratio: 1; border: 1px solid var(--gold-4); background: var(--ink); }
.crop-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }
.form .crop-zoom { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3); width: min(320px, 100%); }
.crop-zoom input { width: 100%; accent-color: var(--gold-2); }
.crop .form-actions { justify-self: stretch; }
.sheet { width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: auto; color: var(--text); background: var(--panel); border: 1px solid var(--gold-3); }
.sheet-wide { width: min(900px, calc(100% - 24px)); }
.sheet::backdrop { background: var(--scrim); }
.form { display: grid; gap: var(--s4); padding: var(--s6); }
.form h2 { font-size: var(--fs-2xl); letter-spacing: .06em; }
.form label { display: grid; gap: var(--s2); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.form small { letter-spacing: 0; text-transform: none; color: var(--text-3); }
.form input:not([type=radio]):not([type=file]):not([type=hidden]), .form textarea, .form select, .score-form input {
  width: 100%; min-height: var(--control); padding: var(--s2) var(--s3); font: 400 var(--fs-base)/1.5 var(--sans); color: var(--gold-1);
  background: var(--well); border: 1px solid var(--gold-5); border-radius: 0; outline: 2px solid transparent; outline-offset: 1px; color-scheme: dark;
}
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus, .score-form input:focus { border-color: var(--gold-2); outline-color: var(--blue-2); }
.form input[type=file] { font: 400 var(--fs-md) var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.choice { display: flex; gap: var(--s2); margin: 0; padding: 0; border: 0; }
.choice legend { margin-bottom: var(--s2); padding: 0; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.choice label { display: block; flex: 1; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; place-items: center; min-height: var(--control); font: 700 var(--fs-sm)/1 var(--serif); letter-spacing: .12em; color: var(--gold-2); border: 1px solid var(--gold-5); cursor: pointer; }
.choice input:checked + span { color: var(--ink); background: var(--gold-2); border-color: var(--gold-2); }
.choice input:focus-visible + span { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.trap { position: absolute !important; left: -9999px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); }
.form-msg { min-height: 1lh; font-size: var(--fs-md); color: var(--danger); }
.form-msg.ok { color: var(--blue-2); }
.form-note { font-size: var(--fs-sm); color: var(--text-3); }
.form-inline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; max-width: 520px; padding: 0; }
.form-inline .form-msg { grid-column: 1 / -1; }

.view { padding: var(--s6); }
.view h2 { margin-top: var(--s1); font-size: var(--fs-3xl); letter-spacing: .03em; text-transform: none; }
.view .post-by { margin-top: var(--s3); }
.view-media { margin: var(--s4) 0; aspect-ratio: 16 / 9; background: var(--well); }
.view-media iframe { width: 100%; height: 100%; border: 0; }
.view img:not(.ava) { margin: var(--s4) 0; max-height: 70vh; }
.view-text { margin-top: var(--s4); max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.view-link { display: inline-block; margin-top: var(--s3); color: var(--blue-2); text-decoration: underline; overflow-wrap: anywhere; }
.view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--gold-5); }
.view-bar .btn-gold { margin-left: auto; }
.like { display: inline-flex; align-items: center; min-height: var(--control); padding: 0 var(--s4); font: 700 var(--fs-sm)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); background: none; border: 1px solid var(--gold-5); transition: border-color .15s, color .15s; }
.like:hover { color: var(--gold-1); border-color: var(--gold-2); }
.like[aria-pressed="true"] { color: var(--ink); background: var(--gold-2); border-color: var(--gold-2); }
.comments { margin-top: var(--s5); }
.comments h3 { font-size: var(--fs-base); letter-spacing: .12em; }
.comment { position: relative; padding: var(--s3) 0 var(--s3) 40px; border-bottom: 1px solid var(--line); }
.comment > .ava { position: absolute; left: 0; top: var(--s3); }
.comment b { color: var(--gold-2); font-weight: 600; }
.comment b a:hover { text-decoration: underline; }
.comment .role { margin-left: var(--s2); }
.comment time { margin-left: var(--s2); font-size: var(--fs-xs); color: var(--text-3); }
.comment .link { margin-left: var(--s3); font-size: var(--fs-xs); }
.comment p { margin-top: var(--s1); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.comments .empty { margin-top: var(--s3); padding: var(--s4); }
.comments [data-signin] { margin-top: var(--s4); }
.comment-form { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); margin-top: var(--s4); padding: 0; }
.comment-form .form-msg { grid-column: 1 / -1; }

/* ---------- Videos ---------- */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s5); }
.video { background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.video:hover { border-color: var(--gold-2); }
.thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--well); aspect-ratio: 16 / 9; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid var(--gold-2);
  background: color-mix(in srgb, var(--ink) 72%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l10 6-10 6z' fill='%23f0e6d2'/%3E%3C/svg%3E") center / 24px no-repeat;
  transition: border-color .15s;
}
.thumb:hover::after { border-color: var(--blue-2); }
.dur { position: absolute; right: var(--s2); bottom: var(--s2); padding: 0 var(--s2); font-size: var(--fs-xs); color: var(--gold-1); background: color-mix(in srgb, var(--ink) 85%, transparent); }
.video-meta { padding: var(--s3) var(--s4) var(--s4); }
.video-cat { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--blue-2); }
.video h3 { margin-top: var(--s1); font: 600 var(--fs-base)/1.4 var(--sans); text-transform: none; }
.video-views { margin-top: var(--s1); font-size: var(--fs-sm); }

/* ---------- Home ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.duo .subhead { margin-top: 0; }
.duo .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.duo-side { display: grid; gap: var(--s6); }
.duo-more { margin-top: var(--s4); font-size: var(--fs-md); }
.duo-more a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 4px; }
.duo-more a:hover { color: var(--gold-1); }
.board { padding: var(--s4) var(--s5); background: var(--panel); border: 1px solid var(--gold-5); }
.board h2 { padding-bottom: var(--s3); margin-bottom: var(--s2); font-size: var(--fs-lg); letter-spacing: .1em; border-bottom: 1px solid var(--gold-5); }
.board ol { counter-reset: s; }
.board li { counter-increment: s; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--s2); padding: var(--s2) 0; font-size: var(--fs-md); border-bottom: 1px solid var(--line); }
.board li:last-child { border-bottom: 0; }
.board li::before { content: counter(s); font-family: var(--serif); color: var(--gold-4); }
.board li:first-child::before, .board li:first-child b, .board li:first-child em { color: var(--gold-1); }
.board li { align-items: center; }
.board-ver { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s1); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.board-ver select { flex: 1; min-height: 32px; padding: 0 var(--s2); font: 500 var(--fs-sm) var(--sans); letter-spacing: 0; text-transform: none; color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.board-old { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--gold-5); }
.board-old h3 { font: 700 var(--fs-md)/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); }
.board-old h3 span { margin-left: var(--s2); font: 400 var(--fs-xs) var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-3); }
.board-old ol { counter-reset: s; }
.board-old li { opacity: .85; }
.board-note { margin-bottom: var(--s2); font-size: var(--fs-xs); color: var(--text-3); }
.board-scroll { max-height: calc(10 * 41px); overflow-y: auto; padding-right: var(--s1); scrollbar-width: thin; scrollbar-color: var(--gold-4) transparent; }
.board-scroll li { grid-template-columns: 28px minmax(0, 1fr) auto; padding-left: var(--s2); padding-right: var(--s2); }
.board li.is-me { background: var(--gold-wash); box-shadow: inset 3px 0 0 var(--blue-2); }
.board li.is-me em { color: var(--gold-1); }
.board-who { display: flex; align-items: center; gap: var(--s2); min-width: 0; color: var(--text-2); }
.board-who em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.board-who:hover em { color: var(--gold-1); text-decoration: underline; text-underline-offset: 3px; }
.board-who .role { margin: 0; }
.board li b { color: var(--gold-2); font-variant-numeric: tabular-nums; }
.board .empty { padding: var(--s4) 0; border: 0; }
.board-best { margin-top: var(--s3); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }
.board-best b { color: var(--gold-1); }

/* ---------- Events ---------- */
.events { display: grid; gap: var(--s4); }
.event { display: grid; grid-template-columns: 96px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--gold-5); }
.event-date { display: grid; place-content: center; padding: var(--s3); text-align: center; background: var(--gold-wash); border-right: 1px solid var(--gold-5); }
.event-date b { font: 700 var(--fs-4xl)/1 var(--serif); color: var(--gold-1); }
.event-date span { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.event-body { padding: var(--s4) var(--s5); }
.event-when { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-2); }
.event h3 { margin-top: var(--s1); font-size: var(--fs-2xl); letter-spacing: .03em; }
.event-text { margin-top: var(--s2); max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.event-link { display: inline-block; margin-top: var(--s3); color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.events-past .event { opacity: .7; }

/* ---------- Custom skins ---------- */
.skins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--s5); }
.skin { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.skin:hover { border-color: var(--gold-2); }
.skin-art { display: block; aspect-ratio: 4 / 5; background: var(--well) center 12% / cover no-repeat; border-bottom: 1px solid var(--gold-5); }
.skin-art-none { display: grid; place-items: center; font: 700 var(--fs-5xl) var(--serif); color: var(--gold-5); }
.skin-body { display: flex; flex-direction: column; flex: 1; padding: var(--s4) var(--s5) var(--s5); }
.skin h3 { font-size: var(--fs-xl); letter-spacing: .03em; text-transform: none; }
.skin h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.skin-by { margin-top: var(--s1); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.skin-desc { margin-top: var(--s2); font-size: var(--fs-md); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.skin-meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin-top: auto; padding-top: var(--s4); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.skin-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2); margin-top: var(--s3); }
.skin-actions .btn-gold { padding: 0 var(--s3); }
.skin-actions .btn-hex { padding: 0 var(--s4); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--s4) var(--s7); counter-reset: step; max-width: 1040px; justify-self: start; width: 100%; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 var(--s4); padding: var(--s4) 0; border-top: 1px solid var(--gold-5); }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: span 2; font: 700 var(--fs-2xl)/1.2 var(--serif); color: var(--gold-3); }
.steps h3 { font-size: var(--fs-lg); letter-spacing: .06em; }
.steps p { grid-column: 2; margin-top: var(--s1); font-size: var(--fs-base); color: var(--text-2); }
.steps b { color: var(--gold-1); font-weight: 600; }
.steps a { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s5) var(--s7); margin-top: var(--s7); max-width: 1040px; justify-self: start; width: 100%; }
.notes h3 { font-size: var(--fs-md); letter-spacing: .12em; color: var(--gold-2); }
.notes p { margin-top: var(--s1); font-size: var(--fs-md); }
kbd { padding: 0 var(--s2); font: 600 var(--fs-sm) var(--sans); color: var(--gold-1); border: 1px solid var(--gold-4); background: var(--well); }

.mod { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s7); align-items: start; }
.mod > .empty { grid-column: 1 / -1; }
.mod-media { margin-bottom: var(--s5); border: 1px solid var(--gold-4); }
.mod-media:has(.skin-art) { width: min(100%, 340px); }
.mod-media .skin-art { border: 0; aspect-ratio: 308 / 560; background-position: center; }
.mod-pending { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s4); padding: var(--s3) var(--s4); font-size: var(--fs-md); color: var(--gold-1); background: var(--gold-wash); border: 1px solid var(--gold-3); }
.mod-box p a { display: inline-flex; align-items: center; gap: var(--s2); }
.mod-box p a:hover { text-decoration: underline; }
.mod-crumb { font-size: var(--fs-sm); color: var(--gold-2); text-decoration: underline; text-underline-offset: 4px; }
.mod-crumb:hover { color: var(--gold-1); }
.mod-main h1 { margin-top: var(--s2); font-size: var(--fs-h2); letter-spacing: .03em; }
.mod-sub { margin-top: var(--s2); color: var(--text-2); }
.mod-stats { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin-top: var(--s5); padding: var(--s3) 0; border-block: 1px solid var(--gold-5); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }
.mod-stats b { margin-right: var(--s2); font: 700 var(--fs-xl) var(--serif); letter-spacing: 0; color: var(--gold-1); }
.mod-article { margin-top: var(--s6); max-width: 70ch; color: var(--text-2); overflow-wrap: anywhere; }
.mod-article h2 { margin: var(--s6) 0 var(--s2); font-size: var(--fs-lg); letter-spacing: .08em; }
.mod-article h2:first-child { margin-top: 0; }
.mod-article p { margin-top: var(--s2); }
.mod-article ul { margin-top: var(--s2); padding-left: var(--s5); list-style: square; }
.mod-article li { margin-top: var(--s1); }
.mod-article b { color: var(--gold-1); }
.mod-article a { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; }
.mod-side { position: sticky; top: calc(var(--nav-h) + var(--s5)); display: grid; gap: var(--s5); padding: var(--s5); background: var(--panel); border: 1px solid var(--gold-5); }
.mod-box + .mod-box { padding-top: var(--s5); border-top: 1px solid var(--gold-5); }
.mod-box h2 { margin-bottom: var(--s2); font: 600 var(--fs-xs) var(--sans); letter-spacing: .14em; color: var(--text-3); }
.mod-box .btn-hex { width: 100%; }
.mod-note { margin: var(--s3) 0 var(--s1); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; }
.mod-tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.mod-tags li { padding: var(--s1) var(--s3); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--gold-5); }
.mod-box dl { display: grid; gap: var(--s2); font-size: var(--fs-md); }
.mod-box dl div { display: flex; justify-content: space-between; gap: var(--s3); }
.mod-box dd { color: var(--gold-1); text-align: right; }
.mod-box p { font-size: var(--fs-md); color: var(--gold-1); overflow-wrap: anywhere; }

/* ---------- Tutorial ---------- */
.lessons { display: grid; gap: var(--s5); counter-reset: lesson; }
.lesson { counter-increment: lesson; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: var(--s5); padding: var(--s5); background: var(--panel); border: 1px solid var(--gold-5); }
.lesson.no-video { grid-template-columns: minmax(0, 1fr); }
.lesson h3 { margin-top: var(--s1); font-size: var(--fs-2xl); letter-spacing: .03em; }
.lesson h3::before { content: counter(lesson, decimal-leading-zero); margin-right: var(--s3); color: var(--gold-4); }
.lesson-meta { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.lesson-text { margin-top: var(--s3); max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.lesson .link { display: inline-block; margin-top: var(--s3); }
.pointer { display: grid; gap: var(--s1); max-width: 640px; padding: var(--s5) var(--s6); justify-self: start; width: 100%; transition: border-color .15s; }
.pointer span { font-size: var(--fs-md); }
.pointer b { font: 700 var(--fs-2xl)/1.2 var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-1); }
.pointer:hover { border-color: var(--gold-2); }

/* ---------- Games ---------- */
.arcade { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s5); align-items: start; }
.stage { position: relative; border: 1px solid var(--gold-4); background: var(--well); touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
.hud { position: absolute; left: var(--s3); top: var(--s2); right: var(--s3); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s5); font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); pointer-events: none; }
.hud b { font: 700 var(--fs-lg) var(--serif); color: var(--gold-1); }
.meter { display: flex; align-items: center; gap: var(--s2); }
.meter i { width: 88px; height: 6px; background: color-mix(in srgb, var(--gold-1) 15%, transparent); }
.meter u { display: block; width: 0; height: 100%; background: var(--blue-2); }
.wall-btn { position: absolute; right: var(--s4); bottom: var(--s4); width: 64px; height: 64px; display: none; border-radius: 50%; font: 700 var(--fs-2xl) var(--serif); color: var(--blue-1); background: var(--teal-fill); border: 2px solid var(--blue-2); }
@media (pointer: coarse) { .wall-btn { display: block; } }
.dash-btn { bottom: calc(var(--s4) + 64px + var(--s3)); }
.emote-btn { position: absolute; left: var(--s4); bottom: var(--s4); width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: var(--well); border: 1px solid var(--gold-4); cursor: pointer; }
.emote-btn:hover, .emote-btn:focus-visible { border-color: var(--gold-2); }
.emote-btn img { width: 40px; height: 40px; pointer-events: none; }
.overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: var(--s4); padding: var(--s5); text-align: center; background: var(--scrim); }
.overlay h2 { font-size: var(--fs-h2); letter-spacing: .06em; }
.overlay p { max-width: 44ch; color: var(--text-2); }
.score-form { display: flex; gap: var(--s2); }
.score-form input { width: 180px; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s4) var(--s6); margin-top: var(--s6); font-size: var(--fs-md); }
.rules b { display: block; font: 700 var(--fs-sm) var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.roll { max-width: 980px; justify-self: start; width: 100%; padding: var(--s6); }
.roll-out { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s6); min-height: 200px; align-items: start; }
.roll-out > .empty { grid-column: 1 / -1; align-self: center; border: 0; padding: 0; }
.roll h3 { margin-bottom: var(--s3); font: 600 var(--fs-xs) var(--sans); letter-spacing: .14em; color: var(--text-3); }
.roll-runes { display: grid; gap: var(--s4); }
.roll-tree { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.roll-tree img { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); border: 1px solid var(--gold-5); }
.roll-tree img.is-key { width: 56px; height: 56px; border-color: var(--gold-3); }
.roll-tree span { flex-basis: 100%; font-size: var(--fs-sm); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.roll-spells { display: flex; gap: var(--s2); margin-bottom: var(--s5); }
.roll-spells img, .roll-item img { width: 44px; height: 44px; border: 1px solid var(--gold-4); background: var(--ink); }
.roll-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s3); }
.roll-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: var(--s3); align-items: center; font-size: var(--fs-md); line-height: 1.3; color: var(--gold-1); }
.roll-actions { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--gold-5); }

/* ---------- More games ---------- */
.games-nav-wrap { padding-block: var(--s6) var(--s7); }
.games-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--s3); }
.games-nav a { display: grid; gap: var(--s1); padding: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.games-nav a:hover { border-color: var(--gold-2); }
.games-nav b { font: 700 var(--fs-base)/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-1); }
.games-nav span { font-size: var(--fs-sm); }
.my-stats-wrap { margin-top: var(--s6); }
.my-stats-wrap .subhead { margin-top: 0; }
.my-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.my-stat { display: grid; gap: var(--s2); align-content: start; padding: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); }
a.my-stat { transition: border-color .15s; }
a.my-stat:hover { border-color: var(--gold-2); }
.my-stat > b { font: 700 var(--fs-md)/1.2 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-1); }
.my-stat dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1) var(--s3); }
.my-stat dt { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.my-stat dd { font: 700 var(--fs-lg)/1.2 var(--serif); color: var(--gold-1); font-variant-numeric: tabular-nums; }
.my-stat p { font-size: var(--fs-sm); color: var(--text-3); }
.my-recent { display: flex; flex-wrap: wrap; gap: var(--s1); }
.my-recent i { padding: 0 var(--s2); font: 400 var(--fs-xs)/20px var(--sans); font-style: normal; color: var(--text-2); background: var(--well); border: 1px solid var(--line); }
.my-guest { padding: var(--s4); font-size: var(--fs-md); background: var(--panel); border: 1px dashed var(--gold-5); }
.mini { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s5); align-items: start; }
.board-none { display: block !important; color: var(--text-3); }
.board-none::before { content: none !important; }
.quiz, .timing { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); justify-items: center; padding: var(--s6); text-align: center; }
.quiz-q { display: grid; place-items: center; width: 100%; min-height: 240px; }
.quiz-splash { width: 100%; max-width: 560px; aspect-ratio: 16 / 9; background-size: 340%; background-repeat: no-repeat; border: 1px solid var(--gold-4); }
/* the question keeps one size whatever it shows, so the four answers never move */
.quiz-kind { display: grid; align-content: center; min-height: 40px; margin-bottom: var(--s2); font-size: var(--fs-sm); line-height: 20px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-2); }
/* the page already keeps the header clear when it scrolls; this adds the sticky game bar */
.quiz { scroll-margin-top: calc(48px + var(--s3)); }
.quiz-stage { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; width: 100%; min-width: 0; max-width: 560px; aspect-ratio: 16 / 9; }
.quiz-q { align-content: center; }
.quiz-splash.is-blur { background-size: cover; background-position: center !important; filter: blur(14px) saturate(1.2); }
.quiz-splash.is-strip { aspect-ratio: 16 / 2.2; background-size: 160%; }
.quiz-load { width: 200px; aspect-ratio: 308 / 300; background-size: 100% auto; background-repeat: no-repeat; border: 1px solid var(--gold-4); }
.quiz-zoom { width: 160px; height: 160px; background-size: 250%; background-repeat: no-repeat; image-rendering: auto; border: 2px solid var(--gold-3); }
.quiz-clue { display: grid; gap: var(--s2); max-width: 460px; max-height: 100%; overflow-y: auto; padding: var(--s4) var(--s5); text-align: left; background: var(--well); border: 1px solid var(--gold-5); }
ul.quiz-clue li { font: 600 var(--fs-base)/1.4 var(--sans); color: var(--gold-1); }
.quiz-clue b { font: 700 var(--fs-md) var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-2); }
.quiz-clue p { color: var(--text-2); }
.quiz-recipe { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s3); }
.quiz-recipe img { width: 56px; height: 56px; border: 1px solid var(--gold-4); }
.quiz-recipe span { font: 700 var(--fs-2xl) var(--serif); color: var(--gold-4); }
.quiz-recipe b { display: grid; place-items: center; width: 56px; height: 56px; font: 700 var(--fs-3xl) var(--serif); color: var(--gold-1); border: 2px dashed var(--gold-3); }
.quiz-item { width: 96px; height: 96px; border: 2px solid var(--gold-3); }
.quiz-end { font: 700 var(--fs-2xl)/1.3 var(--serif); letter-spacing: .04em; color: var(--gold-1); }
.quiz-end b { font-size: var(--fs-5xl); }
.quiz-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s3); width: 100%; max-width: 560px; }
.quiz-clock { position: relative; min-width: 44px; font: 700 var(--fs-lg) var(--serif); text-align: right; color: var(--gold-1); font-variant-numeric: tabular-nums; }
.quiz-clock.is-hit::after { content: attr(data-flash); position: absolute; right: 0; top: -18px; font: 700 var(--fs-sm) var(--sans); color: var(--danger); animation: rise .9s ease-out forwards; }
@keyframes rise { to { transform: translateY(-14px); opacity: 0; } }
.quiz-end small { display: block; margin-top: var(--s1); font: 400 var(--fs-md) var(--sans); color: var(--text-2); }
.quiz-time { width: 100%; max-width: 560px; height: 4px; background: var(--line); }
.quiz-time u { display: block; width: 0; height: 100%; background: var(--blue-2); }
.quiz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); width: 100%; max-width: 560px; }
.quiz-opts:empty { display: none; }
.quiz-opts .btn-gold { white-space: normal; height: 56px; overflow: hidden; padding: var(--s1) var(--s3); line-height: 1.3; text-transform: none; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.quiz-opts .btn-gold.is-right { color: var(--ink); background: var(--blue-2); border-color: var(--blue-2); opacity: 1; }
.quiz-opts .btn-gold.is-wrong { color: var(--gold-1); background: var(--loss); border-color: var(--danger); opacity: 1; }
.quiz-status, .tm-status { color: var(--text-2); }
.quiz-restart { min-height: 36px; padding: 0 var(--s4); font-size: var(--fs-xs); }
.quiz-status b, .tm-status b { color: var(--gold-1); }
.mini-name { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s3); }
.mini-name input { min-height: var(--control); padding: 0 var(--s3); font: 400 var(--fs-base) var(--sans); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.tm-track { position: relative; width: 100%; max-width: 640px; height: 48px; margin-top: var(--s5); background: var(--well); border: 1px solid var(--gold-4); }
.tm-zone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--gold-2) 35%, transparent); border-inline: 2px solid var(--gold-2); }
.tm-mark { position: absolute; top: -8px; bottom: -8px; width: 4px; margin-left: -2px; left: 0; background: var(--blue-1); }
.timing.is-hit .tm-track { border-color: var(--blue-2); }
.timing.is-miss .tm-track { border-color: var(--danger); }

/* small phones: the picture and all four answers still fit on one screen */
@media (max-width: 640px) and (max-height: 700px) {
  .quiz.quiz { gap: var(--s3); padding-top: var(--s3); }
  .quiz .quiz-q { min-height: 0; }
  .quiz .quiz-stage { height: 150px; }
  .quiz-load { width: 150px; }
  .quiz-zoom { width: 130px; height: 130px; }
  .quiz-opts { gap: var(--s2); }
  .quiz-opts .btn-gold { height: 48px; }
}

/* ---------- Game hub ---------- */
.game-switch { position: sticky; top: var(--nav-h); z-index: var(--z-raised); display: grid; grid-template-columns: minmax(0, var(--page)); justify-content: center; padding: 0 var(--gutter); background: var(--ink); border-bottom: 1px solid var(--gold-5); }
.game-switch div { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; }
.game-switch div::-webkit-scrollbar { display: none; }
.game-switch a { position: relative; flex: none; display: flex; align-items: center; min-height: 48px; padding: 0 var(--s4); font: 700 var(--fs-sm)/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--gold-2); transition: color .15s; }
.game-switch a:hover { color: var(--gold-1); }
.game-switch a { gap: var(--s2); }
.gs-icon { flex: none; width: 22px; height: 22px; }
img.gs-icon { border: 1px solid var(--gold-4); opacity: .75; transition: opacity .15s; }
.game-switch a:hover img.gs-icon, .game-switch a[aria-current] img.gs-icon { opacity: 1; border-color: var(--gold-2); }
.game-switch a[aria-current] { color: var(--gold-1); }
.game-switch a[aria-current]::after { content: ""; position: absolute; left: var(--s4); right: var(--s4); bottom: 0; height: 2px; background: var(--gold-2); }
.game-switch .game-switch-all { padding-left: 0; margin-right: var(--s3); color: var(--text-3); border-right: 1px solid var(--gold-5); padding-right: var(--s4); }
.game-switch + .block { padding-top: clamp(32px, 5vw, 56px); }
.game-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s4); }
.game-live { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4); min-height: 20px; font: 600 var(--fs-xs)/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.game-live b, .game-hero-body .game-live b, .game-card .game-live b { padding: 0; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: inherit; color: var(--gold-1); }
.game-live span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.live-now.has-who { position: relative; cursor: help; }
.live-who { position: absolute; left: 0; top: calc(100% + var(--s1)); z-index: 30; display: none; min-width: 140px; max-height: 240px; overflow-y: auto; padding: var(--s2) var(--s3); font: 500 var(--fs-sm)/1.5 var(--sans); letter-spacing: 0; text-transform: none; text-align: left; color: var(--text-2); background: var(--well); border: 1px solid var(--gold-4); }
.live-who u { display: block; text-decoration: none; white-space: nowrap; }
.live-now.has-who:hover .live-who, .live-now.has-who:focus .live-who { display: block; }
.live-now i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.live-now.is-on i { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 20%, transparent); }
.game-card > .game-live { margin-top: var(--s2); font-size: var(--fs-xs); }
.page-head .title .game-live { margin-top: var(--s3); }
.board > .game-live { padding: var(--s2) 0 var(--s3); margin-bottom: var(--s2); border-bottom: 1px solid var(--gold-5); }
.game-hero-body .game-live { color: var(--text-2); }
.tc-lobby-live { margin: 0 0 var(--s4); }
.game-card { display: grid; gap: var(--s1); align-content: start; padding-bottom: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.game-card:hover { border-color: var(--gold-2); }
.game-art { display: block; aspect-ratio: 16 / 9; margin-bottom: var(--s3); background: var(--well) center 20% / cover no-repeat; border-bottom: 1px solid var(--gold-5); }
.game-card > :not(.game-art) { padding-inline: var(--s4); }
.game-card b { font: 700 var(--fs-lg)/1.2 var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.game-card > span:not(.game-art, .game-live) { font-size: var(--fs-md); }
.page-head .mod-crumb { display: inline-block; margin-bottom: var(--s3); }

/* ---------- Forum ---------- */
.forum { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); align-items: start; }
.forum-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.forum-bar .filters { margin: 0; }
.forum-new { display: none !important; width: 100%; }
.filters button i { margin-left: var(--s1); font: 400 var(--fs-xs) var(--sans); font-style: normal; letter-spacing: 0; opacity: .75; }
.order { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.order select { min-height: 36px; padding: 0 var(--s2); font: 500 var(--fs-sm) var(--sans); text-transform: none; letter-spacing: 0; color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.threads { display: grid; border: 1px solid var(--gold-5); background: var(--panel); }
.thread { display: grid; grid-template-columns: auto minmax(0, 1fr) 150px; gap: var(--s4); align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); transition: background-color .15s; }
.thread:last-child { border-bottom: 0; }
.thread:hover { background: var(--gold-wash); }
.thread-main { display: grid; gap: 2px; min-width: 0; }
.thread-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--fs-xs); color: var(--text-3); }
.thread-meta b { font-weight: 600; color: var(--gold-2); }
.thread-title { font: 600 var(--fs-lg)/1.35 var(--sans); color: var(--gold-1); overflow-wrap: anywhere; }
.thread-text { font-size: var(--fs-md); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-stats { display: grid; gap: 2px; font-size: var(--fs-sm); text-align: right; }
.thread-stats b { color: var(--gold-1); font-weight: 600; }
.thread-stats small { font-size: var(--fs-xs); color: var(--text-3); }
.cat { padding: 1px var(--s2); font: 700 var(--fs-xs)/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); border: 1px solid var(--gold-5); }
.cat-question { color: var(--blue-2); border-color: var(--blue-4); }
.cat-play { color: var(--gold-1); border-color: var(--gold-3); }
.cat-offtopic { color: var(--text); }
.forum-side { position: sticky; top: calc(var(--nav-h) + var(--s5)); display: grid; gap: var(--s4); }
.forum-side > .btn-hex { width: 100%; }
.lounge { display: grid; gap: var(--s3); padding: var(--s4); }
.lounge h2 { font-size: var(--fs-base); letter-spacing: .1em; }
.lounge h2 span { margin-left: var(--s2); font: 400 var(--fs-xs) var(--sans); letter-spacing: 0; text-transform: none; color: var(--blue-2); }
.lounge h2 span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: var(--s1); border-radius: 50%; background: var(--blue-2); vertical-align: 1px; }
.chat-log { display: grid; align-content: start; gap: var(--s3); max-height: 380px; min-height: 160px; overflow-y: auto; padding-right: var(--s1); scrollbar-width: thin; scrollbar-color: var(--gold-4) transparent; }
.chat-log li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: var(--s2); align-items: start; }
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--fs-xs); }
.chat-head a { font-weight: 600; color: var(--gold-2); }
.chat-head time { color: var(--text-3); }
.chat-head .link { font-size: var(--fs-xs); }
.chat-body { font-size: var(--fs-md); color: var(--text-2); overflow-wrap: anywhere; }
.chat-log li.is-mine .chat-head a { color: var(--blue-2); }
.chat-empty { font-size: var(--fs-sm); color: var(--text-3); }
.chat-form { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s2); }
.emo-btn { min-width: var(--control); min-height: var(--control); padding: 0; font: 400 var(--fs-xl)/1 var(--sans); color: var(--text-2); background: var(--well); border: 1px solid var(--gold-5); cursor: pointer; }
.emo-btn:hover, .emo-btn[aria-expanded="true"] { color: var(--gold-1); border-color: var(--gold-2); }
.emo-btn:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 1px; }
.emo-pop { position: absolute; right: 0; bottom: calc(100% + var(--s1)); z-index: 3; display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; padding: var(--s2); background: var(--panel); border: 1px solid var(--gold-4); box-shadow: var(--shadow-1); }
.emo-pop button { width: 36px; height: 36px; padding: 0; font-size: var(--fs-xl); line-height: 1; background: none; border: 0; cursor: pointer; }
.emo-pop button:hover, .emo-pop button:focus-visible { background: var(--well); outline: 1px solid var(--gold-4); }
.chat-form input { min-height: var(--control); padding: 0 var(--s3); font: 400 var(--fs-md) var(--sans); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.chat-form input:focus { border-color: var(--gold-2); outline: 2px solid var(--blue-2); outline-offset: 1px; }
.forum-rules { display: grid; gap: var(--s2); padding-left: var(--s4); font-size: var(--fs-sm); list-style: square; }
.mention { color: var(--blue-2); font-weight: 600; }

/* ---------- Thread page ---------- */
.thread-page { display: grid; gap: var(--s4); max-width: 860px; }
.op { display: grid; gap: var(--s3); padding: var(--s6); }
.op h1 { font-size: var(--fs-h3); letter-spacing: .02em; text-transform: none; }
.op-img { max-height: 70vh; border: 1px solid var(--gold-5); }
.op-body { max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); font-size: var(--fs-base); }
.replies { display: grid; }
.reply { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.reply.is-child { margin-left: var(--s7); padding-left: var(--s4); border-left: 2px solid var(--gold-5); }
.reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--fs-sm); }
.reply-head b { font-weight: 600; color: var(--gold-2); }
.reply-head a:hover { text-decoration: underline; }
.reply-head time { color: var(--text-3); }
.reply-body { margin-top: var(--s1); max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.reply-actions { display: flex; gap: var(--s4); margin-top: var(--s2); }
.act { padding: 0; font: 600 var(--fs-xs) var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); background: none; border: 0; transition: color .15s; }
.act:hover { color: var(--gold-1); }
.act[aria-pressed="true"] { color: var(--blue-2); }
.reply-form { padding: var(--s5); }
.reply-form .form-actions { align-items: center; justify-content: space-between; }
.replying { font-size: var(--fs-sm); color: var(--text-2); }
.replying b { color: var(--gold-1); }

/* ---------- Search and notifications ---------- */
.nav-search, .bell summary { display: grid; place-items: center; width: 40px; height: 40px; flex: none; color: var(--gold-2); border-radius: 50%; cursor: pointer; list-style: none; transition: color .15s, background-color .15s; }
.nav-search:hover, .bell summary:hover, .bell[open] summary { color: var(--gold-1); background: var(--gold-wash); }
.bell { position: relative; flex: none; }
.bell summary::-webkit-details-marker { display: none; }
.bell summary { position: relative; }
.bell summary i { position: absolute; top: 2px; right: 0; min-width: 18px; padding: 0 4px; font: 700 var(--fs-xs)/18px var(--sans); font-style: normal; text-align: center; color: var(--ink); background: var(--blue-2); border-radius: 9px; }
.bell-list { position: absolute; right: 0; top: calc(100% + var(--s3)); z-index: var(--z-raised); width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--gold-3); }
.note { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s3); padding: var(--s3) var(--s4); font-size: var(--fs-sm); line-height: 1.4; color: var(--text-2); border-bottom: 1px solid var(--line); }
.note:hover { background: var(--gold-wash); }
.note.is-new { box-shadow: inset 3px 0 0 var(--blue-2); }
.note b { color: var(--gold-1); font-weight: 600; }
.note small, .note time { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-empty { padding: var(--s4); font-size: var(--fs-sm); color: var(--text-3); }
.search-box { display: flex; align-items: center; gap: var(--s3); max-width: 760px; padding: 0 var(--s4); background: var(--panel); border: 1px solid var(--gold-3); }
.search-box svg { flex: none; color: var(--gold-2); }
.search-box input { flex: 1; min-width: 0; min-height: 60px; font: 400 var(--fs-lg) var(--sans); color: var(--gold-1); background: transparent; border: 0; outline: none; }
.search-box:focus-within { border-color: var(--gold-1); outline: 2px solid var(--blue-2); outline-offset: 2px; }
.search-count { margin: var(--s4) 0; color: var(--text-2); }
.search-results { display: grid; gap: var(--s5); max-width: 760px; }
.sr-group h2 { margin-bottom: var(--s2); font: 600 var(--fs-xs) var(--sans); letter-spacing: .14em; color: var(--text-3); }
.sr-group ul { display: grid; border: 1px solid var(--gold-5); background: var(--panel); }
.sr { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); transition: background-color .15s; }
.sr-group li:last-child .sr { border-bottom: 0; }
.sr:hover { background: var(--gold-wash); }
.sr img { width: 48px; height: 48px; object-fit: cover; object-position: center 15%; border: 1px solid var(--gold-5); }
.sr-kind { display: grid; place-items: center; width: 48px; height: 48px; font: 700 var(--fs-lg) var(--serif); color: var(--gold-2); background: var(--well); border: 1px solid var(--gold-5); }
.sr b { display: block; font-weight: 600; color: var(--gold-1); }
.sr span span { font-size: var(--fs-sm); color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr mark, .search-results mark { color: var(--ink); background: var(--gold-2); padding: 0 1px; }
.search-tip { margin-top: var(--s5); max-width: 760px; }

/* ---------- Search field, section search, breadcrumbs, lessons ---------- */
.nav-find { position: relative; display: flex; align-items: center; flex: 0 1 220px; min-width: 0; height: 38px; padding: 0 var(--s2) 0 var(--s3); gap: var(--s2); color: var(--gold-2); background: var(--well); border: 1px solid var(--gold-4); border-radius: 19px; transition: border-color .15s; }
.nav-find:focus-within { border-color: var(--gold-1); outline: 2px solid var(--blue-2); outline-offset: 1px; }
.nav-find svg { flex: none; }
.nav-find input { flex: 1; min-width: 0; height: 100%; font: 400 var(--fs-md) var(--sans); color: var(--gold-1); background: transparent; border: 0; outline: none; }
.nav-find input::placeholder { color: var(--text-3); }
.nav-find kbd { flex: none; font-size: var(--fs-xs); color: var(--text-3); }
.nav-find:focus-within kbd { display: none; }
.section-find { flex: 1 1 220px; min-width: 0; max-width: 340px; min-height: 40px; padding: 0 var(--s3) 0 36px; font: 400 var(--fs-md) var(--sans); color: var(--gold-1); background: var(--well) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%23c8aa6e' stroke-width='2'/%3E%3Cpath d='M16.5 16.5L21 21' stroke='%23c8aa6e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 12px center / 16px no-repeat; border: 1px solid var(--gold-4); }
.section-find:focus { border-color: var(--gold-1); outline: 2px solid var(--blue-2); outline-offset: 1px; }
.section-find-wide { display: block; width: 100%; max-width: 420px; margin-bottom: var(--s4); }
.toolbar .section-find { margin-right: auto; }
.crumbs { margin-bottom: var(--s3); font-size: var(--fs-sm); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); }
.crumbs li { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.crumbs li + li::before { content: "›"; color: var(--gold-4); }
.crumbs a { color: var(--gold-2); }
.crumbs a:hover { color: var(--gold-1); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.lesson h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lesson-teaser { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s7); align-items: start; }
.lesson-wrap > .empty { grid-column: 1 / -1; }
.lesson-page { display: grid; gap: var(--s4); }
.lesson-page h1 { font-size: var(--fs-h2); letter-spacing: .03em; }
.lesson-video { margin: 0; border: 1px solid var(--gold-4); }
.lesson-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.lesson-nav a { display: grid; gap: var(--s1); padding: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.lesson-nav a:hover { border-color: var(--gold-2); }
.lesson-nav a.is-next { text-align: right; }
.lesson-nav small { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.lesson-nav b { font-weight: 600; color: var(--gold-1); }
.lesson-list { position: sticky; top: calc(var(--nav-h) + var(--s5)); padding: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); }
.lesson-list h2 { margin-bottom: var(--s3); font: 600 var(--fs-xs) var(--sans); letter-spacing: .14em; color: var(--text-3); }
.lesson-list a { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s2); padding: var(--s2) 0; font-size: var(--fs-md); color: var(--text-2); border-bottom: 1px solid var(--line); }
.lesson-list li:last-child a { border-bottom: 0; }
.lesson-list a:hover { color: var(--gold-1); }
.lesson-list i { font: 700 var(--fs-sm) var(--serif); font-style: normal; color: var(--gold-4); }
.lesson-list [aria-current] a { color: var(--gold-1); font-weight: 600; }
.lesson-list [aria-current] i { color: var(--blue-2); }

/* ---------- Rift Tactics ---------- */
html:not(.is-dev) [data-dev] { display: none !important; }
.tc-dev { display: grid; gap: var(--s3); justify-items: center; padding: var(--s8) var(--s4); text-align: center; color: var(--text-2); }
.tc-dev h3 { font-size: var(--fs-2xl); letter-spacing: .06em; }
.game-hero { position: relative; isolation: isolate; display: grid; min-height: 260px; margin-bottom: var(--s5); overflow: hidden; border: 1px solid var(--gold-3); }
.game-hero-art { position: absolute; inset: 0; z-index: -2; background: center 25% / cover no-repeat; transition: transform .6s; }
.game-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 15%, color-mix(in srgb, var(--ink) 60%, transparent) 55%, color-mix(in srgb, var(--ink) 20%, transparent)); }
.game-hero:hover .game-hero-art { transform: scale(1.03); }
.game-hero-body { display: grid; gap: var(--s2); align-content: center; justify-items: start; max-width: 520px; padding: var(--s6); }
.game-hero-body b { font: 700 var(--fs-h2)/1.05 var(--serif); letter-spacing: .04em; text-transform: uppercase; color: var(--gold-1); }
.game-hero-body > span { color: var(--text-2); }
.game-hero-body em { margin-top: var(--s2); font-style: normal; }
.tactics.is-shake { animation: tcShake .45s; }
@keyframes tcShake { 0%, 100% { transform: none; } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, 0); } }
.tc-fx { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.tc-fx-top { z-index: 5; }
.unit.is-casting { z-index: 2; border-color: var(--gold-1); }
.unit.is-hit { animation: tcHit .38s; }
.unit.is-hit::after { content: ""; position: absolute; inset: 0; background: rgba(255, 70, 50, .45); animation: tcFlash .38s forwards; pointer-events: none; }
@keyframes tcHit { 0%, 100% { transform: none; } 20% { transform: translateX(-6px) rotate(-2deg); } 45% { transform: translateX(5px) rotate(1.5deg); } 70% { transform: translateX(-3px); } }
@keyframes tcFlash { from { opacity: 1; } to { opacity: 0; } }
.unit.is-heal::before, .unit.is-shield::before { content: ""; position: absolute; inset: -3px; border: 2px solid var(--heal); box-shadow: 0 0 18px var(--heal); animation: tcGlow .7s forwards; pointer-events: none; }
.unit.is-shield::before { border-color: var(--gold-1); box-shadow: 0 0 18px var(--gold-1); }
@keyframes tcGlow { from { opacity: 1; transform: scale(.94); } to { opacity: 0; transform: scale(1.06); } }
.unit.is-dying { animation: tcDie .6s forwards; }
@keyframes tcDie { 0% { transform: none; filter: none; } 30% { transform: scale(1.08); filter: brightness(2.2); } 100% { transform: scale(.92); opacity: .3; filter: grayscale(1); } }
.tc-shot { position: absolute; width: 30px; height: 8px; border-radius: 8px; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent, #ffb36b 50%, #fff); box-shadow: 0 0 12px var(--phys); }
.tc-shot-magic { width: 18px; height: 18px; background: radial-gradient(circle, #fff 0 20%, var(--magic) 45%, transparent 70%); box-shadow: 0 0 18px #4f8dff; }
.tc-shot-true { background: linear-gradient(90deg, transparent, #fff); box-shadow: 0 0 14px #fff; }
.tc-shot.is-big { width: 48px; height: 16px; }
.tc-shot-magic.is-big { width: 36px; height: 36px; }
.tc-vfx-gl { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.tc-vfx { position: absolute; width: var(--w, 120px); height: var(--w, 120px); transform: translate(-50%, -50%); pointer-events: none; mix-blend-mode: screen; will-change: transform, opacity; }
.vfx-hit { background: radial-gradient(circle, #fff 0 10%, var(--c) 34%, transparent 68%); animation: vfxHit .5s ease-out forwards; }
.vfx-hit.has-img { background: radial-gradient(circle, #fff 0 22%, var(--c) 58%); -webkit-mask: var(--img) center / contain no-repeat; mask: var(--img) center / contain no-repeat; }
@keyframes vfxHit { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(.35); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.25); } }
.vfx-ring { border-radius: 50%; border: 3px solid var(--c); box-shadow: 0 0 22px var(--c), inset 0 0 26px var(--c); animation: vfxRing .7s ease-out forwards; }
.vfx-ring.is-big { border-width: 5px; }
.vfx-ring.is-late { animation-duration: .9s; animation-delay: .12s; opacity: 0; }
@keyframes vfxRing { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.15); } 70% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.vfx-beam { height: 16px; border-radius: 16px; transform: translate(0, -50%); background: linear-gradient(90deg, transparent, var(--c) 12%, #fff 50%, var(--c) 88%, transparent); box-shadow: 0 0 26px var(--c), 0 0 60px var(--c); transform-origin: left center; animation: vfxBeam .6s ease-out forwards; }
.vfx-beam.is-big { height: 34px; border-radius: 34px; }
@keyframes vfxBeam { 0% { opacity: 1; transform: translate(0, -50%) rotate(var(--ang, 0rad)) scaleX(0); } 35% { opacity: 1; transform: translate(0, -50%) rotate(var(--ang, 0rad)) scaleX(1); } 100% { opacity: 0; transform: translate(0, -50%) rotate(var(--ang, 0rad)) scaleX(1) scaleY(.2); } }
.vfx-pillar { width: 70px; height: var(--w, 300px); border-radius: 70px; background: linear-gradient(90deg, transparent, var(--c) 30%, #fff 50%, var(--c) 70%, transparent); box-shadow: 0 0 40px var(--c); transform-origin: center top; animation: vfxPillar .6s ease-out forwards; }
.vfx-pillar.is-big { width: 110px; }
@keyframes vfxPillar { 0% { opacity: 1; transform: translate(-50%, -50%) scaleY(0); } 30% { opacity: 1; transform: translate(-50%, -50%) scaleY(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scaleX(.2); } }
.vfx-cast { height: calc(var(--w, 130px) * .42); border-radius: 50%; border: 2px solid var(--c); box-shadow: 0 0 18px var(--c), inset 0 0 22px var(--c); animation: vfxCast .55s ease-in forwards; }
@keyframes vfxCast { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } }
.vfx-aura { border-radius: 50%; background: radial-gradient(ellipse at 50% 85%, var(--c) 0, transparent 62%); animation: vfxAura .8s ease-out forwards; }
@keyframes vfxAura { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7, .4); } 25% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%, -85%) scale(1, 1.25); } }
.tc-shot.is-themed { width: 54px; height: 12px; background: linear-gradient(90deg, transparent, var(--c) 55%, #fff); box-shadow: 0 0 16px var(--c), 0 0 34px var(--c); mix-blend-mode: screen; }
.tc-shot-magic.is-themed { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #fff 0 20%, var(--c) 52%, transparent 72%); }
.tc-shot.is-themed.is-big { width: 84px; height: 20px; }
.tc-shot-magic.is-themed.is-big { width: 48px; height: 48px; }
.tc-slash { position: absolute; width: 90px; height: 4px; transform: translate(-50%, -50%) rotate(-35deg) scaleX(0); background: linear-gradient(90deg, transparent, #fff 40%, var(--crit) 60%, transparent); box-shadow: 0 0 10px #fff; animation: tcSlash .32s ease-out forwards; }
@keyframes tcSlash { 0% { transform: translate(-50%, -50%) rotate(-35deg) scaleX(0); opacity: 1; } 60% { transform: translate(-50%, -50%) rotate(-35deg) scaleX(1); opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-35deg) scaleX(1.1); opacity: 0; } }
.tc-burst { position: absolute; width: 90px; height: 90px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid #ff6b5a; animation: tcBurst .6s ease-out forwards; }
@keyframes tcBurst { from { transform: translate(-50%, -50%) scale(.2); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.4); opacity: 0; } }
.tc-banner { position: absolute; display: flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3) var(--s1) var(--s1); white-space: nowrap; background: var(--ink); border: 1px solid var(--blue-2); transform: translate(-50%, -100%); animation: tcBanner 1s ease-out forwards; }
.tc-banner-e { border-color: var(--danger); }
.tc-banner span { display: grid; }
.tc-banner small { font-size: var(--fs-hud-sm); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.tc-banner b { font: 700 var(--fs-md) var(--serif); color: var(--gold-1); }
@keyframes tcBanner { 0% { opacity: 0; transform: translate(-50%, -80%); } 15%, 75% { opacity: 1; transform: translate(-50%, -100%); } 100% { opacity: 0; transform: translate(-50%, -115%); } }
.tc-banner.is-big { padding: var(--s3) var(--s6) var(--s3) var(--s3); gap: var(--s3); border-width: 2px; box-shadow: 0 0 40px color-mix(in srgb, var(--gold-2) 45%, transparent); transform: translate(-50%, -50%); animation: tcUlt 1.4s ease-out forwards; }
.tc-banner.is-big b { font-size: var(--fs-3xl); letter-spacing: .06em; text-transform: uppercase; }
.tc-banner.is-big small { font-size: var(--fs-xs); }
@keyframes tcUlt { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.96); } }
.tc-modes { display: flex; gap: var(--s1); margin-bottom: var(--s5); border-bottom: 1px solid var(--gold-5); }
.tc-modes button { padding: var(--s2) var(--s4); margin-bottom: -1px; font: 700 var(--fs-md) var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); background: none; border: 0; border-bottom: 2px solid transparent; }
.tc-modes button:hover { color: var(--gold-1); }
.tc-modes button[aria-selected="true"] { color: var(--gold-1); border-bottom-color: var(--gold-1); }
.tc-duel { display: grid; gap: var(--s3); max-width: 560px; }
.tc-duel h3 { font-size: var(--fs-2xl); letter-spacing: .06em; }
.tc-name-row { display: grid; gap: var(--s1); max-width: 280px; font-size: var(--fs-sm); color: var(--text-2); }
.tc-name-row input, .tc-link input { padding: var(--s2) var(--s3); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.tc-link { display: flex; gap: var(--s2); }
.tc-link input { flex: 1; min-width: 0; }
.tc-wait { display: flex; align-items: center; gap: var(--s3); color: var(--gold-1); }
.tc-spin { width: 18px; height: 18px; border: 2px solid var(--gold-5); border-top-color: var(--gold-1); border-radius: 50%; animation: tcSpin .8s linear infinite; }
/* queue: your banner facing the opponent's place, as in the game's lobby */
.q-room { display: grid; justify-items: center; gap: var(--s5); width: 100%; min-width: 0; padding: var(--s5) 0; text-align: center; }
.q-head { display: grid; justify-items: center; gap: var(--s1); min-height: 92px; align-content: center; }
.q-label { font: 700 var(--fs-sm) var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.q-clock { font: 700 var(--fs-5xl)/1 var(--serif); color: var(--gold-1); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.q-mode { font-size: var(--fs-sm); color: var(--text-3); }
.q-found { font: 700 var(--fs-h1)/1 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--blue-1); text-shadow: 0 0 24px color-mix(in srgb, var(--blue-2) 50%, transparent); animation: qPop .5s ease-out; }
.q-banners { display: flex; align-items: center; justify-content: center; gap: var(--s5); width: 100%; }
.q-vs { flex: none; font: 700 var(--fs-2xl) var(--serif); text-transform: uppercase; color: var(--gold-3); }
/* a pennant: the gold edge is the outer shape, the panel sits 1px inside it */
.q-banner { --cut: 28px; flex: 0 1 200px; min-width: 0; padding: 1px; background: linear-gradient(180deg, var(--gold-3), var(--gold-4) 40%, var(--gold-5));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 50% 100%, 0 calc(100% - var(--cut))); }
.q-in { display: grid; justify-items: center; align-content: start; gap: var(--s1); min-height: 340px; padding: var(--s2) var(--s3) var(--s6);
  background: linear-gradient(180deg, var(--panel), var(--navy) 70%, var(--well)); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 50% 100%, 0 calc(100% - var(--cut))); }
.q-banner.is-empty { background: var(--gold-5); }
.q-banner.is-empty .q-in { background: linear-gradient(180deg, var(--well), var(--ink)); }
.q-banner.is-found { background: linear-gradient(180deg, var(--blue-1), var(--blue-2) 40%, var(--blue-4)); animation: qPop .5s ease-out; }
.q-crest { display: grid; place-items: center; height: 96px; }
.q-crest .tc-crest { width: 72px; height: 72px; }
.q-crest-none { display: block; width: 40px; height: 40px; border: 2px solid var(--gold-5); transform: rotate(45deg); }
.q-face { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--gold-3); background: var(--well); overflow: hidden; }
.q-face img { width: 100%; height: 100%; object-fit: cover; }
.q-banner.is-empty .q-face { border-color: var(--gold-5); }
.q-banner.is-found .q-face { border-color: var(--blue-2); }
.q-name { margin-top: var(--s3); font: 700 var(--fs-lg) var(--serif); color: var(--gold-1); overflow-wrap: anywhere; }
.q-in small { font-size: var(--fs-sm); color: var(--text-2); }
.q-banner.is-empty .q-name { color: var(--text-2); }
.q-radar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--gold-4); border-top-color: var(--gold-1); animation: tcSpin 1.2s linear infinite; }
.q-ready { font: 700 var(--fs-5xl) var(--sans); color: var(--blue-1); }
.q-foot { display: grid; justify-items: center; gap: var(--s4); width: 100%; max-width: 560px; min-width: 0; }
.q-invite { display: grid; gap: var(--s2); width: 100%; min-width: 0; padding: var(--s3) var(--s4); text-align: left; background: var(--glass); border: 1px solid var(--gold-5); }
.q-invite-t { display: grid; gap: 2px; }
.q-invite-t b { font: 700 var(--fs-base) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.q-invite-t small { font-size: var(--fs-sm); color: var(--text-2); }
.q-cancel { display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--control); padding: 0 var(--s5); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-4); font: 600 var(--fs-md) var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.q-cancel:hover { border-color: var(--gold-2); }
@keyframes qPop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .q-banners { gap: var(--s2); }
  .q-banner { --cut: 20px; flex-basis: 160px; }
  .q-in { min-height: 270px; padding: var(--s2) var(--s2) var(--s5); }
  .q-crest { height: 64px; } .q-crest .tc-crest { width: 52px; height: 52px; }
  .q-face { width: 64px; height: 64px; }
  .q-name { font-size: var(--fs-base); }
  .q-vs { font-size: var(--fs-base); }
  .q-clock { font-size: var(--fs-4xl); }
  .q-invite { padding: var(--s3); }
  .q-invite .tc-link { flex-wrap: wrap; }
  .q-invite .tc-link input { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .q-radar, .q-found, .q-banner.is-found { animation: none; } }
@keyframes tcSpin { to { transform: rotate(360deg); } }
.tc-error { color: var(--danger); }
.tc-body .tc-error { position: sticky; top: 0; z-index: 3; margin: 0; padding: var(--s2) var(--s3); background: rgba(8, 12, 18, .94); border: 1px solid var(--danger); }
.tc-vs { text-transform: none; letter-spacing: .02em; }
.tc-timer { margin-left: auto; font: 800 var(--fs-xl) var(--sans); font-variant-numeric: tabular-nums; color: var(--gold-1); }
.tc-timer.is-low { color: var(--danger); }
@media (prefers-reduced-motion: reduce) { .tactics.is-shake { animation: none; } }
.tc-loading { padding: var(--s8) 0; text-align: center; color: var(--text-2); }
.float { position: absolute; z-index: 3; transform: translateX(-50%); font: 900 var(--fs-lg) var(--sans); white-space: nowrap; -webkit-text-stroke: 4px #03070c; paint-order: stroke fill; text-shadow: 0 2px 6px #000; animation: floatUp 1.2s ease-out forwards; }
.float.buff { color: var(--blue-2); font-size: var(--fs-xs); }
.float.phys { color: #ff6a1a; }
.float.magic { color: var(--magic-strong); }
.float.true { color: #fff; }
.float.crit { color: var(--crit-strong); }
/* a magic crit keeps its own colour, apart from the yellow of physical crits */
.float.magic.crit { color: #d06bff; }
.float.true.crit { color: #fff; }
.float.heal { color: #2fe06a; }
.float.shield { color: var(--gold-1); font-size: var(--fs-xs); }
.float.annul { color: var(--annul); font-size: var(--fs-lg); font-weight: 800; text-shadow: 0 0 8px color-mix(in srgb, var(--annul-strong) 90%, transparent), 0 1px 2px #000; }
.float.annul .ic, .float.annul .ic-img { filter: drop-shadow(0 0 4px var(--annul-strong)); }
/* a dodge: a big word that pops, and a blur where the champion stood */
.float.dodge { color: #e8fbff; font: italic 900 var(--fs-2xl)/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 0 10px rgba(80, 200, 255, .95), 0 2px 0 #0a3550, 0 3px 6px #000; animation-name: tcDodgeWord; }
@keyframes tcDodgeWord { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 18% { opacity: 1; transform: translate(-50%, -60%) scale(1.25); } 35% { transform: translate(-50%, -70%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -150%) scale(1); } }
.tc-dodge-ghost { position: absolute; width: 70px; height: 120px; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(140, 220, 255, .45), transparent); animation: tcDodgeGhost .55s ease-out forwards; }
@keyframes tcDodgeGhost { from { opacity: .9; } to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -50%) scaleX(1.6); } }
/* spell shield (Banshee's Veil, Edge of Night): a purple bubble while it is up, a purple burst when it blocks */
.fx-veil { color: #b76bff; }
.unit.has-veil .unit-fig::after { content: ''; position: absolute; left: 50%; bottom: 6%; width: 74%; height: 78%; transform: translateX(-50%); border-radius: 50% 50% 46% 46%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 52%, rgba(170, 90, 255, .22) 70%, rgba(190, 120, 255, .5) 86%, transparent 100%); box-shadow: 0 0 14px color-mix(in srgb, var(--annul-strong) 35%, transparent); animation: tcVeil 2.4s ease-in-out infinite; }
@keyframes tcVeil { 50% { opacity: .65; } }
.tc-veil-pop { position: absolute; width: 120px; height: 120px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; border: 3px solid var(--annul); box-shadow: 0 0 22px var(--annul-strong), inset 0 0 22px color-mix(in srgb, var(--annul-strong) 60%, transparent); animation: tcVeilPop .65s ease-out forwards; }
@keyframes tcVeilPop { from { opacity: 1; transform: translate(-50%, -50%) scale(.6); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }
.float.cc { color: var(--gold-2); font-size: var(--fs-xs); }
.tc-call { position: absolute; top: 16%; left: 50%; display: grid; justify-items: center; gap: 2px; padding: var(--s2) var(--s7); text-align: center; white-space: nowrap; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 88%, transparent) 22%, color-mix(in srgb, var(--ink) 88%, transparent) 78%, transparent); border-top: 1px solid var(--ally); border-bottom: 1px solid var(--ally); transform: translateX(-50%); animation: tcCall 2.6s ease-out forwards; }
.tc-call-e { border-color: var(--foe); }
.tc-call b { font: 700 var(--fs-h3)/1.1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--ally); text-shadow: 0 2px 12px #000; }
.tc-call-e b { color: var(--foe); }
.tc-call.is-penta b, .tc-call.is-ace b, .tc-call.is-quadra b { color: var(--gold-1); }
.tc-call small { font: 600 var(--fs-xs) var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
@keyframes tcCall { 0% { opacity: 0; transform: translateX(-50%) scale(1.5); } 10% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }
.tc-total { position: absolute; z-index: 3; display: grid; padding: var(--s2) var(--s4); background: color-mix(in srgb, var(--ink) 82%, transparent); border-left: 3px solid var(--ally); animation: tcTotal 2.4s ease-out forwards; }
.tc-total-e { transform: translateX(-100%); text-align: right; border-left: 0; border-right: 3px solid var(--foe); }
.tc-total b { display: inline-block; transform-origin: left center; }
.tc-total-e b { transform-origin: right center; }
.tc-total b.is-done { animation: tcTotalPop .32s ease-out; }
@keyframes tcTotalPop { 0% { transform: scale(1.35); filter: brightness(1.5); } 100% { transform: none; filter: none; } }
.tc-total.is-magic b { color: var(--magic-strong); }
.tc-total.is-true b { color: #fff; }
.tc-total small { font-size: var(--fs-hud-sm); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.tc-total b { font: 900 var(--fs-5xl)/1.1 var(--sans); font-variant-numeric: tabular-nums; color: #ff6a1a; -webkit-text-stroke: 4px #03070c; paint-order: stroke fill; }
@keyframes tcTotal { 0% { opacity: 0; } 8%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); } 30% { transform: translate(-50%, -8px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -46px); } }
.info-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.info-head b { display: block; font: 700 var(--fs-lg) var(--serif); text-transform: uppercase; color: var(--gold-1); }
.info-head small { font-size: var(--fs-sm); color: var(--text-2); }
.info-skills { display: grid; gap: var(--s2); }
.info-skills li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s3); font-size: var(--fs-sm); color: var(--text-2); }
.info-skills img { border: 1px solid var(--gold-4); }
/* key words in descriptions, coloured by kind */
.kw { font-weight: 600; white-space: nowrap; }
.kw-phys { color: #ff8a3d; } .kw-magic { color: var(--magic-strong); } .kw-true { color: #fff; } .kw-heal { color: var(--heal); } .kw-vamp { color: #ff5d73; }
.kw-armor { color: #f2c94c; } .kw-mr { color: #6fe3e1; } .kw-speed { color: #e8e0c8; } .kw-mana { color: #5aa7ff; } .kw-fury { color: #ff4a3d; }
.kw-flow { color: #6fd6c4; } .kw-energy { color: #ffd84a; } .kw-crit { color: var(--crit-strong); } .kw-shield { color: var(--shield); } .kw-cc { color: #c99bff; } .kw-turn { color: var(--gold-1, var(--gold-1)); }
/* free play: item picker under the team in the draft */
.tc-free { display: grid; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--gold-5, color-mix(in srgb, var(--gold-2) 25%, transparent)); }
.tc-free h4 { margin: 0; font: 700 var(--fs-sm) var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-1); }
.tc-free-team { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tc-free-champ { display: grid; justify-items: center; gap: 2px; padding: 3px; background: color-mix(in srgb, var(--ink) 60%, transparent); border: 1px solid var(--gold-4); color: inherit; cursor: pointer; }
.tc-free-champ.is-on { border-color: var(--gold-1); box-shadow: 0 0 0 1px var(--gold-1); }
.tc-free-champ span { display: flex; gap: 1px; }
.tc-free-champ span img, .tc-free-champ span i { width: 14px; height: 14px; background: rgba(255, 255, 255, .08); }
.tc-free .tc-load-items { display: flex; flex-wrap: wrap; gap: var(--s1); }
.tc-free .tc-load-slots { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: var(--s2); }
.tc-free .tc-load-slots .tc-slot small { display: none; }
.tc-free .tc-slot { min-height: 0; padding: 4px; }
.tc-free .tc-load-items .tc-slot { width: 78px; }
.tc-free .tc-slot small { font-size: var(--fs-hud-sm); line-height: 1.2; }
/* amounts in ability text, coloured like the floating numbers */
.dv { font-weight: 600; }
.info-skills .dv b, .act-btn .tip .dv b, .tip .dv b { display: inline; margin: 0; font: inherit; font-weight: 800; text-transform: none; color: inherit; }
.dv-f { font-weight: 500; color: #fff; }
.dv-phys { color: #ff8a3d; }
.dv-magic { color: var(--magic-strong); }
.dv-true { color: #fff; }
.dv-heal { color: var(--heal); }
.dv-shield { color: var(--shield); }
.info-skills b { display: block; font-weight: 600; color: var(--gold-1); }
.info-skills i { font-style: normal; font-weight: 400; color: var(--blue-2); }

/* effects as icons */
.ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-img { width: 16px; height: 16px; object-fit: contain; border: 0; }
.ic-mask { display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-energy { color: #f5d547; }
.ic-healpower { color: var(--heal); }
.fx .ic-img { width: 15px; height: 15px; }
.float .ic-img { width: 26px; height: 26px; filter: drop-shadow(0 2px 3px #000); }
.float.crit .ic-img { display: inline-block; width: 1.65em; height: auto; max-width: none; margin-right: 0.05em; vertical-align: -0.28em; }
.stat-grid .ic-img { width: 18px; height: 18px; }
.fx { position: relative; display: inline-grid; place-items: center; width: 20px; height: 18px; font-style: normal; border: 1px solid currentColor; background: color-mix(in srgb, var(--ink) 85%, transparent); }
.fx b { position: absolute; right: -4px; bottom: -5px; min-width: 11px; font: 700 var(--fs-hud-xs)/11px var(--sans); text-align: center; color: var(--ink); background: currentColor; border-radius: 6px; }
.fx b { color: #fff; background: var(--ink); border: 1px solid currentColor; }
.fx s { position: absolute; top: -6px; right: -3px; font-size: var(--fs-hud-xs); text-decoration: none; }
.fx-cc { color: var(--gold-2); }
.fx-dot { color: #ff7a4d; }
.fx-buff { color: var(--buff); }
.fx-debuff { color: #c993ff; }
.float .ic { width: 22px; height: 22px; stroke-width: 2.4; }
.float.cc { color: var(--gold-2); }
/* resource bars */
.bar-res { height: 4px; }
.bar-mana u { background: #3b8cff; }
.bar-energy u { background: #f5d547; }
.bar-flow u { background: #e8f1f8; }
.bar-fury u { background: #e2412f; }
.bar-grit u { background: #f2e3b0; }
.arena .cell { position: relative; }
.kick-dirs { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.kick-dir { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; font: 700 var(--fs-lg)/1 var(--serif); color: var(--ink, var(--ink)); background: var(--gold-1); border: 1px solid var(--gold-4); border-radius: 50%; cursor: pointer; pointer-events: auto; }
.kick-dir:hover, .kick-dir:focus-visible { background: #fff; }
.kick-1 { right: -6px; top: 55%; } .kick-2 { left: -6px; top: 55%; }
.kick-3 { left: calc(50% - 17px); top: 12%; } .kick-4 { left: calc(50% - 17px); bottom: -4px; }
.kick-5 { right: -10px; top: 26%; } .kick-6 { right: -10px; bottom: 4px; } .kick-7 { left: -10px; top: 26%; } .kick-8 { left: -10px; bottom: 4px; }
.bar-none { height: 4px; visibility: hidden; }
/* full stats card */
.tc-card { position: absolute; top: var(--s4); right: var(--s4); z-index: 4; width: min(360px, calc(100% - 2 * var(--s4))); max-height: calc(100% - 2 * var(--s4)); overflow-y: auto; padding: var(--s4); background: var(--ink); box-shadow: var(--shadow-2); }
.tc-card-x { position: absolute; top: var(--s2); right: var(--s2); width: 32px; height: 32px; font-size: var(--fs-2xl); line-height: 1; color: var(--text-2); background: none; border: 0; }
.tc-card-x:hover { color: var(--gold-1); }
.stat-pager { display: flex; align-items: center; gap: var(--s1); margin-bottom: var(--s2); }
.stat-pager button { padding: 3px var(--s3); font: 600 var(--fs-hud-sm) var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); background: none; border: 1px solid var(--line); cursor: pointer; }
.stat-pager button[aria-pressed="true"] { color: var(--gold-1); border-color: var(--gold-3, var(--gold-2)); }
.stat-pager .stat-next { margin-left: auto; min-width: 32px; font-size: var(--fs-base); line-height: 1; color: var(--gold-1); }
.stat-grid.stat-adv li:first-child, .stat-grid.stat-adv li:nth-child(2) { grid-column: auto; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s1) var(--s3); margin-bottom: var(--s3); font-size: var(--fs-sm); }
.stat-grid li { display: flex; align-items: center; gap: var(--s2); padding: 3px 0; border-bottom: 1px solid var(--line); }
.stat-grid li:first-child, .stat-grid li:nth-child(2) { grid-column: 1 / -1; }
.stat-grid .ic:not(.ic-energy):not(.ic-healpower) { color: var(--gold-2); }
.stat-grid span { color: var(--text-2); }
.stat-grid b { margin-left: auto; font-weight: 600; color: var(--gold-1); font-variant-numeric: tabular-nums; }
.stat-fx { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.stat-items { display: grid; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--fs-xs); color: var(--text-2); }
.stat-items li { display: flex; gap: var(--s2); }
.stat-items b { display: block; color: var(--gold-1); }
.gs-tool { position: sticky; right: 0; background: var(--ink); flex: none; display: flex; align-items: center; gap: var(--s2); min-height: 48px; margin-left: auto; padding: 0 var(--s4); font: 700 var(--fs-sm)/1 var(--serif); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--gold-2); border: 0; border-left: 1px solid var(--gold-5); }
.gs-tool:hover, .tc-panel-open .gs-tool { color: var(--gold-1); }
.tc-side-x { position: absolute; top: var(--s2); right: var(--s2); width: 36px; height: 36px; font-size: var(--fs-2xl); line-height: 1; color: var(--text-2); background: none; border: 0; }
.tc-side-x:hover { color: var(--gold-1); }
.tc-how h2 { margin-bottom: var(--s3); font-size: var(--fs-lg); letter-spacing: .08em; }
.tc-scrim { position: fixed; inset: var(--nav-h) 0 0 0; z-index: calc(var(--z-nav) - 2); display: none; background: color-mix(in srgb, var(--ink) 50%, transparent); }
.tc-panel-open .tc-scrim { display: block; }
/* Rift Tactics: levels, collection, ladder */
.tc-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); margin-top: var(--s4); }
.tc-level { display: grid; justify-items: center; gap: 2px; padding: var(--s3) var(--s2); color: inherit; background: var(--well); border: 1px solid var(--gold-5); }
/* match history: one row a fight, the result coloured on its left edge */
.hist-list { display: grid; gap: var(--s2); margin-top: var(--s4); padding: 0; list-style: none; }
.hist-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); background: var(--well); border: 1px solid var(--gold-5); border-left: 3px solid var(--ally); }
.hist-row.is-loss { border-left-color: var(--foe); }
.hist-res, .hist-mode { display: grid; gap: 2px; min-width: 0; }
.hist-res b { font: 700 var(--fs-base) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--ally); }
.hist-row.is-loss .hist-res b { color: var(--foe); }
.hist-res small, .hist-mode small { font-size: var(--fs-xs); color: var(--text-3); }
.hist-mode { color: var(--text); overflow-wrap: anywhere; }
.hist-teams { display: flex; align-items: center; gap: var(--s2); }
.hist-teams i { font-style: normal; font-size: var(--fs-xs); text-transform: uppercase; color: var(--text-3); }
.hist-team { display: flex; gap: 2px; }
.hist-team img { width: 32px; height: 32px; border: 1px solid var(--gold-5); }
.hist-foot { margin-top: var(--s4); }
.hist-empty { margin-top: var(--s4); color: var(--text-2); }
.tc-replay-ctl { display: flex; gap: var(--s2); margin-left: auto; }
@media (max-width: 760px) {
  .hist-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hist-teams { grid-column: 1 / -1; grid-row: 3; flex-wrap: wrap; }
  .hist-watch { grid-column: 2; grid-row: 1; }
  .hist-mode { grid-column: 1 / -1; grid-row: 2; }
  .hist-team img { width: 28px; height: 28px; }
}
.tc-level b { font: 700 var(--fs-2xl) var(--serif); color: var(--gold-1); }
.tc-level small { font-size: var(--fs-xs); color: var(--text-2); }
.tc-level:hover:not(:disabled) { border-color: var(--gold-1); background: var(--gold-wash); }
.tc-level.is-done { border-color: var(--gold-4); }
.tc-level.is-done small { color: var(--buff); }
.tc-level:disabled { opacity: .4; }
.tc-itip { position: fixed; z-index: var(--z-toast); width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: hidden; padding: var(--s3) var(--s4); background: var(--ink); box-shadow: var(--shadow-2); pointer-events: none; }
.tc-itip[hidden] { display: none; }
.tc-itip.is-pinned { overflow-y: auto; pointer-events: auto; user-select: text; -webkit-user-select: text; border-color: var(--gold-1); }
.tc-itip.is-pinned .itip-head { padding-right: 28px; }
.itip-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.itip-head img { flex: none; border: 1px solid var(--gold-4); }
.itip-head span { display: grid; gap: 2px; min-width: 0; }
.itip-head b { font: 700 var(--fs-base)/1.2 var(--serif); color: var(--gold-1); }
.itip-head small { font-size: var(--fs-hud-sm); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
/* item text the way the game's tooltips show it: stat lines with icons, then named passives */
.itx-stats { display: grid; gap: 3px; margin: 0 0 var(--s2); padding: 0 0 var(--s2); list-style: none; border-bottom: 1px solid var(--line); }
.itx-stats li { display: flex; align-items: center; gap: var(--s1); font-size: var(--fs-sm); line-height: 1.3; color: var(--text-2); }
.itx-stats li > img, .itx-stats li > .ic-mask { flex: none; width: 16px; height: 16px; }
.tc-shop .itx-stats b, .itx-stats b { min-width: 2.4em; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blue-1); }
.itx-stats small { color: var(--text-3); }
.itx { margin: 0 0 var(--s2); font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); text-align: left; }
.itx > b { font-weight: 700; color: var(--gold-1); }
.itx > b small { margin-left: 2px; padding: 0 4px; font-size: var(--fs-hud-sm); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); border: 1px solid var(--gold-3); }
.itx.is-active { padding-left: var(--s2); border-left: 2px solid var(--gold-3); }
.tc-shop-items { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tc-shop .tc-item-tile { display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: var(--s2); }
.tc-shop .tc-item-tile .itc-head { display: flex; align-items: center; gap: var(--s2); }
.tc-shop .tc-item-tile .itc-head span { display: grid; gap: 2px; min-width: 0; }
.tc-shop .tc-item-tile .itc-head b { font: 700 var(--fs-base)/1.2 var(--serif); color: var(--gold-1); }
.tc-shop .tc-item-tile .itc-head small { display: flex; align-items: center; gap: 4px; min-height: 0; font-size: var(--fs-xs); color: var(--gold-2); }
.tc-shop .tc-item-tile .itc-head em { font-style: normal; color: var(--blue-2); }
.tc-shop .tc-item-tile .itx-stats { margin: 0; }
.tc-shop .tc-item-tile .itc-body { flex: 1; }
.tc-shop .tc-item-tile .btn-gold { align-self: end; margin-top: auto; }
.itip-stats { display: grid; gap: 2px; margin: 0 0 var(--s3); padding: 0; list-style: none; }
.itip-stats li { display: flex; justify-content: space-between; gap: var(--s3); padding: 3px 0; font-size: var(--fs-sm); color: var(--text-2); border-bottom: 1px solid var(--line); }
.itip-stats b { font-variant-numeric: tabular-nums; color: var(--gold-1); }
.itip-stats small { font-weight: 400; color: var(--text-3); }
.itip-text { margin: 0 0 var(--s2); font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
.itip-limit { margin: 0; padding-top: var(--s2); font-size: var(--fs-xs); line-height: 1.45; color: var(--text-3); border-top: 1px solid var(--line); }
.tc-shop-item[data-item-info] { cursor: pointer; }
.tc-item-card { padding-top: var(--s6); }
@media (min-width: 900px) { .tc-view:has(> .tc-item-card) > .tc-body { padding-right: calc(360px + 2 * var(--s4)); } }
.tc-cats { display: flex; flex-wrap: wrap; gap: var(--s1); margin-bottom: var(--s3); }
.tc-cats button { min-height: 32px; padding: 0 var(--s3); font: 600 var(--fs-xs) var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: var(--well); border: 1px solid var(--gold-5); cursor: pointer; }
.tc-cats button small { font-size: var(--fs-hud-sm); color: var(--text-3); }
.tc-cats button:hover { color: var(--gold-1); border-color: var(--gold-4); }
.tc-cats button[aria-pressed="true"] { color: var(--ink); background: var(--gold-1); border-color: var(--gold-1); }
.tc-cats button[aria-pressed="true"] small { color: var(--ink); }
.tc-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: var(--s3); }
.tc-shop-item { display: grid; justify-items: center; align-content: start; gap: var(--s1); padding: var(--s3); text-align: center; background: var(--well); border: 1px solid var(--gold-5); }
.tc-shop-item img { border: 1px solid var(--gold-4); }
.tc-shop-item b { color: var(--gold-1); }
.tc-shop-item small { min-height: 2.6em; font-size: var(--fs-xs); color: var(--text-2); }
.tc-shop-item .btn-gold { width: 100%; }
.tc-shop-item.is-owned { border-color: var(--gold-4); }
.tc-owned { font-size: var(--fs-xs); font-weight: 600; color: var(--buff); }
.tc-loadout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s5); }
.tc-load-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: var(--s2); align-content: start; }
.tc-load-edit h4 { margin-bottom: var(--s3); font: 700 var(--fs-lg) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.tc-load-slots, .tc-load-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.tc-slot { display: grid; justify-items: center; gap: 2px; min-height: 84px; padding: var(--s2); text-align: center; color: inherit; background: var(--well); border: 1px solid var(--gold-5); }
.tc-slot small { font-size: var(--fs-hud-sm); color: var(--text-2); }
.tc-slot.is-empty { place-content: center; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); border-style: dashed; }
button.tc-slot:hover:not(:disabled) { border-color: var(--gold-1); }
.tc-slot:disabled, .tc-slot[aria-disabled="true"] { opacity: .4; }
.tc-item-info, .tc-item-card { user-select: text; -webkit-user-select: text; }
.tc-item-info { position: relative; padding: var(--s4); background: var(--well); border: 1px solid var(--gold-4); }
.tc-item-info .itip-head { padding-right: 28px; }
.tc-delta { color: var(--gold-1); }
.board .ladder-row { grid-template-columns: 22px 28px minmax(0, 1fr) auto auto; align-items: center; gap: 0 var(--s2); padding: var(--s2) 0; font-size: var(--fs-sm); }
.board .ladder-row::before { content: none; }
.board .ladder-row a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .ladder-row small { grid-column: 3 / -1; margin-top: -2px; font-size: var(--fs-hud-sm); color: var(--text-3); }
.ladder-tabs { display: flex; flex-wrap: wrap; gap: var(--s1); margin: var(--s2) 0; }
.ladder-tabs button { min-height: 32px; padding: 0 var(--s2); font: 600 var(--fs-xs) var(--sans); color: var(--text); background: none; border: 1px solid var(--gold-5); }
.ladder-tabs button:hover { color: var(--text-2); border-color: var(--gold-4); }
.ladder-tabs [aria-selected="true"] { color: var(--gold-1); border-color: var(--gold-2); background: var(--gold-wash); }
.ladder-me { margin-bottom: var(--s2); font-size: var(--fs-sm); color: var(--text-2); }
.ladder-me b { color: var(--gold-1); }
.lobby-level { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2); }
.lobby-level b { font: 700 var(--fs-md) var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-1); }
.lobby-level small { font-size: var(--fs-xs); color: var(--text); font-variant-numeric: tabular-nums; }
.lobby-xp { height: 6px; background: var(--teal-fill); border: 1px solid var(--gold-5); }
.lobby-xp i { display: block; height: 100%; background: var(--blue-2); }
.ladder-n { font-weight: 700; color: var(--gold-2); text-align: right; }
.ladder-tier { display: flex; align-items: center; gap: var(--s1); font-size: var(--fs-xs); white-space: nowrap; color: var(--text-2); }
.ladder-row b { color: var(--gold-1); font-variant-numeric: tabular-nums; }

/* ---------- Rift Tactics: shell, battlefield, HUD ---------- */
/* The page never scrolls; once the game has loaded, the site chrome steps aside and the game owns the screen. */
body.fullgame { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
body.fullgame > main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: var(--nav-h); }
body.fullgame .page-head, body.fullgame .foot { display: none; }
body.fullgame .game-switch { position: static; flex: none; grid-template-columns: minmax(0, 1fr); }
body.fullgame main > .block { flex: 1; min-height: 0; padding: var(--s3) var(--gutter); grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body.tc-live { --nav-h: 0px; }
body.tc-live .nav, body.tc-live .game-switch, body.tc-live .crumbs { display: none; }
body.tc-live main > .block { padding: 0; }
body.tc-live .tactics { border: 0; }
body.tc-live .sound { top: var(--s1); right: var(--s3); bottom: auto; }

.tc-wrap { height: 100%; min-height: 0; }
.tactics {
  --ally: var(--team-blue); --foe: var(--team-red); --glass: color-mix(in srgb, var(--ink) 78%, transparent); --bar-h: 52px;
  position: relative; height: 100%; min-height: 0; overflow: hidden; background: var(--ink);
}
.tactics[data-phase="menu"] { background: linear-gradient(90deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 86%, transparent) 36%, color-mix(in srgb, var(--ink) 15%, transparent) 80%), url(https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Yasuo_68.jpg) 70% 18% / cover no-repeat var(--ink); }
.tc-view { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.tc-body, .tc-log, .tc-card, .tc-side { scrollbar-width: thin; scrollbar-color: var(--gold-4) transparent; }
/* no scroll anchoring: a pressed button's :active nudge made the list jump away from under the pointer, so the click was lost */
.tc-body { min-height: 0; overflow-y: auto; overflow-anchor: none; padding: var(--s5) var(--gutter); }
.tc-page { display: grid; gap: var(--s4); width: 100%; max-width: var(--page); margin: 0 auto; }
.tag { padding: 0 var(--s1); font: 700 var(--fs-hud-sm)/16px var(--sans); font-style: normal; letter-spacing: .04em; }
.tag-buff { color: var(--ink); background: var(--blue-2); }

/* leaderboard and rules drawer */
.tc-side { position: fixed; top: var(--nav-h); right: 0; bottom: 0; z-index: calc(var(--z-nav) - 1); display: grid; align-content: start; gap: var(--s5); width: min(360px, 100%); padding: var(--s6) var(--s5) var(--s5); overflow-y: auto; background: var(--ink); border-left: 1px solid var(--gold-4); box-shadow: -12px 0 40px rgba(0, 0, 0, .5); transform: translateX(105%); transition: transform .25s ease-out; }
.tc-panel-open .tc-side { transform: none; }
.tc-side .board { padding: 0; border: 0; background: none; }
.tc-side .rules { grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin: 0; font-size: var(--fs-sm); }

/* top bar: the same on every screen */
.tc-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s4); min-height: var(--bar-h); padding: 0 calc(var(--s3) * 2 + 44px) 0 var(--s4); background: var(--glass); border-bottom: 1px solid var(--gold-5); }
.tc-top-l, .tc-top-r { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.tc-top-r { justify-content: flex-end; }
.tc-top-c { display: flex; justify-content: center; min-width: 0; }
.tc-back { flex: none; padding: var(--s2) 0; font: 700 var(--fs-sm) var(--serif); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--gold-2); background: none; border: 0; }
.tc-back:hover { color: var(--gold-1); }
.tc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-lg); letter-spacing: .1em; }
.tc-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.tc-info b { font: 700 var(--fs-base) var(--serif); color: var(--gold-1); }
.tc-info .lg-p { color: var(--ally); }
.tc-info .lg-e { color: var(--danger); }
@media (max-width: 1599px) { .is-fight .tc-mode { display: none; } }
.tc-ess, .tc-rank { display: flex; align-items: center; gap: var(--s1); white-space: nowrap; }
.tc-ess b, .tc-rank b { font: 700 var(--fs-base) var(--serif); color: var(--gold-1); }
.tc-tool { flex: none; display: flex; align-items: center; gap: var(--s2); min-height: 36px; padding: 0 var(--s3); font: 700 var(--fs-xs) var(--serif); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--gold-2); background: none; border: 1px solid var(--gold-5); transition: border-color .15s; }
.tc-tool:hover { border-color: var(--gold-2); }
.tc-tool svg { width: 16px; height: 16px; }

/* lobby */
.tc-lobby { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: var(--s7); align-items: center; min-height: 100%; }
.lobby-title { font: 700 var(--fs-display)/1 var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-1); text-shadow: 0 4px 24px rgba(0, 0, 0, .7); }
.lobby-sub { margin-top: var(--s2); color: var(--text-2); }
.lobby-menu { display: grid; gap: var(--s2); margin-top: var(--s5); }
.lobby-item { display: grid; gap: 2px; padding: var(--s3) var(--s4); text-align: left; color: inherit; background: var(--glass); border: 1px solid var(--gold-5); border-left: 3px solid var(--gold-4); transition: border-color .15s; }
.lobby-item b { font: 700 var(--fs-lg) var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-1); }
.lobby-item small { font-size: var(--fs-sm); color: var(--text-2); }
.lobby-item:hover { border-color: var(--gold-1); }
.lobby-item.is-primary { padding-block: var(--s4); background: var(--teal-fill); border-color: var(--blue-2); }
.lobby-item.is-primary b { font-size: var(--fs-2xl); }
.lobby-item.is-primary:hover { border-color: var(--blue-1); }
.lobby-side { align-self: end; justify-self: end; width: min(100%, 340px); }
.lobby-card { display: grid; gap: var(--s3); padding: var(--s4); background: var(--glass); border: 1px solid var(--gold-4); }
.tc-crest { flex: none; object-fit: contain; }
.tc-be { width: 18px; height: 18px; }
.lobby-card dd { display: flex; align-items: center; gap: var(--s1); }
.lobby-gifts { margin-bottom: var(--s3); }
.gift-title { font: 700 var(--fs-md) var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-1); }
.gift-note { font-size: var(--fs-sm); color: var(--text); }
.gift-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.gift-row span { display: grid; gap: 2px; min-width: 0; }
.gift-row b { font-size: var(--fs-md); color: var(--text-2); }
.gift-row small { font-size: var(--fs-xs); color: var(--text); }
.gift-claim { flex: none; display: inline-flex; align-items: center; gap: var(--s1); min-height: 36px; padding: 0 var(--s3); }
.gift-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.gift-days li { display: grid; justify-items: center; gap: 2px; padding: var(--s1) 0; border: 1px solid var(--gold-5); }
.gift-days small { font-size: var(--fs-hud-sm); color: var(--text); white-space: nowrap; }
.gift-days b { font-size: var(--fs-xs); color: var(--text-2); }
.gift-days .is-done { opacity: .45; }
.gift-days .is-next { border-color: var(--gold-1); background: var(--teal-fill); }
.lobby-tier { display: flex; align-items: center; gap: var(--s3); font: 700 var(--fs-2xl) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.lobby-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.lobby-card dt { font-size: var(--fs-hud-sm); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.lobby-card dd { font: 700 var(--fs-lg) var(--serif); color: var(--gold-1); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lobby-champs { display: flex; flex-wrap: wrap; gap: var(--s1); }
.lobby-champs img { width: 36px; height: 36px; border: 1px solid var(--gold-4); }
.tc-level.is-next { border-color: var(--blue-2); background: var(--teal-fill); }
@media (min-width: 900px) { .tc-view:has(> .tc-card) > .tc-body { padding-right: calc(360px + 2 * var(--s4)); } }
.tc-champ-open { display: grid; justify-items: center; gap: var(--s1); width: 100%; padding: 0; color: inherit; background: none; border: 0; cursor: pointer; }
.tc-champ-open b { color: var(--gold-1); }
.tc-champ-open small { font-size: var(--fs-xs); color: var(--text-2); }
.tc-champ-open:hover .tc-champ-art { border-color: var(--gold-1); }
.tc-shop-item.is-open { border-color: var(--gold-1); }
.tc-champ-art { display: block; transition: border-color .15s; width: 100%; aspect-ratio: 5 / 6; background: center top / cover no-repeat var(--well); border: 1px solid var(--gold-4); }
.tc-shop-item:not(.is-owned) .tc-champ-art { filter: saturate(.45) brightness(.7); }

/* turn order */
.order { display: flex; align-items: center; gap: var(--s1); max-width: 100%; overflow: hidden; }
.order li { flex: none; width: 32px; height: 32px; overflow: hidden; border: 2px solid var(--ally); border-radius: 50%; opacity: .8; }
.order li img { display: block; width: 100%; height: 100%; }
.order li.ord-e { border-color: var(--foe); }
.order li.is-now { width: 42px; height: 42px; margin-right: var(--s2); opacity: 1; border-color: var(--gold-1); box-shadow: 0 0 12px color-mix(in srgb, var(--gold-1) 50%, transparent); }

/* battlefield: blue side left, red side right, three lanes across */
.arena { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) var(--s5) minmax(0, 1fr); gap: var(--s2); min-height: 0; padding: var(--s3) var(--s4); overflow: hidden; }
.arena::before { content: ""; position: absolute; inset: -24px; z-index: -2; background: url(https://ddragon.leagueoflegends.com/cdn/6.8.1/img/map/map11.png) center / cover no-repeat; filter: blur(12px) brightness(.34) saturate(.9); }
.arena::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--team-blue) 18%, transparent), transparent 44%, transparent 56%, color-mix(in srgb, var(--team-red) 20%, transparent)); pointer-events: none; }
.vs { align-self: stretch; justify-self: center; width: 1px; overflow: hidden; font-size: 0; background: linear-gradient(transparent, var(--gold-4) 20%, var(--gold-4) 80%, transparent); }
.side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: var(--s2); min-height: 0; }
.cell { display: grid; min-width: 0; min-height: 0; }
/* the aim indicator: the shape of the ability being aimed, drawn on the ground under the champions */
.tc-aim { --aim: #8fe3ff; --aim-edge: rgba(214, 246, 255, .95); position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; filter: drop-shadow(0 0 7px rgba(110, 215, 255, .6)); animation: tcAimIn .14s ease-out; }
.tc-aim.is-ally { --aim: #8dffc0; --aim-edge: rgba(215, 255, 232, .95); filter: drop-shadow(0 0 7px rgba(110, 255, 180, .55)); }
.tc-aim .aim-shape { stroke: var(--aim-edge); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tc-aim .aim-ring { stroke-width: 2.5; }
.tc-aim .aim-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tc-aim .aim-core { stroke-width: 1.5; opacity: .7; }
@keyframes tcAimIn { from { opacity: 0; } to { opacity: 1; } }
.side .l0 { grid-row: 1; } .side .l1 { grid-row: 2; } .side .l2 { grid-row: 3; }
.side-p .cb, .side-e .cf { grid-column: 1; }
.side-p .cf, .side-e .cb { grid-column: 2; }

/* the field: scenery behind, the champions standing on it */
.tc-field { position: relative; isolation: isolate; display: grid; min-height: 0; overflow: hidden; background: var(--ink); }
.tc-field::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url(/assets/rift-field.jpg) center 82% / cover no-repeat; filter: brightness(1.35) saturate(1.1); }
.tc-field::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 55%, transparent), transparent 30%, transparent 70%, color-mix(in srgb, var(--ink) 60%, transparent)); pointer-events: none; }
.arena::before, .arena::after { display: none; }
.arena .vs { visibility: hidden; }

/* battle tables: every champion's numbers for this fight */
.tc-team { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; background: var(--ink); border: 1px solid var(--gold-5); --cols: 40px minmax(0, 1fr) repeat(3, 52px); }
.tm-head, .tm-total, .tm-row button { display: grid; grid-template-columns: var(--cols); column-gap: var(--s2); align-items: center; }
.tm-head, .tm-total { padding: var(--s2) var(--s3); }
.tm-head { border-bottom: 1px solid var(--gold-5); }
.tm-head h3 { grid-column: 1 / 3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-md); letter-spacing: .1em; color: var(--ally); }
.tc-team-e .tm-head h3 { color: var(--danger); }
.tm-head span { font-size: var(--fs-hud-sm); letter-spacing: .08em; text-align: right; text-transform: uppercase; color: var(--text-3); }
.tm-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-4) transparent; }
.tm-row { border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.tm-row button { row-gap: 3px; width: 100%; padding: var(--s2) var(--s3) var(--s2) calc(var(--s3) - 3px); text-align: left; color: inherit; background: none; border: 0; }
.tm-row button:hover { background: var(--gold-wash); }
.tm-row.is-now { border-left-color: var(--gold-1); background: color-mix(in srgb, var(--gold-1) 6%, transparent); }
.tm-row.is-dead { filter: grayscale(1); opacity: .5; }
.tm-pic { grid-row: 1 / 3; width: 40px; height: 40px; border: 1px solid var(--ally); }
.tc-team-e .tm-pic { border-color: var(--foe); }
.tm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--fs-sm) var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-1); }
.tm-n, .tm-total span { font: 700 var(--fs-sm) var(--sans); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tm-dealt { color: var(--phys); }
.tm-taken { color: var(--text); }
.tm-healed { color: var(--heal); }
.tm-life { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s2); }
.tc-team-e .bar-hp u { background: var(--foe); }
.tm-hp { font: 600 var(--fs-hud-sm) var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.tm-stats { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: var(--s1); font: 600 var(--fs-xs) var(--sans); font-variant-numeric: tabular-nums; color: var(--text); }
.tm-stats span { display: flex; align-items: center; gap: 3px; }
.tm-share { grid-column: 1 / -1; display: block; height: 3px; background: rgba(0, 0, 0, .5); }
.tm-share u { display: block; height: 100%; background: var(--phys); transition: width .35s; }
.tm-total { border-top: 1px solid var(--gold-5); }
.tm-total b { grid-column: 1 / 3; font: 700 var(--fs-xs) var(--serif); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.tm-total span { color: var(--gold-1); }
.tc-stats-btn[aria-pressed="true"], .tc-auto-btn[aria-pressed="true"], .tc-speed-btn[aria-pressed="true"] { color: var(--gold-1); border-color: var(--gold-1); }
.tc-auto-btn[aria-pressed="true"] { background: var(--teal-fill); }
.tc-speed-btn { min-width: 3em; font-variant-numeric: tabular-nums; }
.tc-report { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); width: min(100%, 860px); min-height: 0; text-align: left; }
.reward .tm-stats { display: none; }
.reward .tc-team .tm-head h3 { font-size: var(--fs-md); line-height: 1.4; letter-spacing: .1em; color: var(--ally); text-shadow: none; }
.reward .tc-team-e .tm-head h3 { color: var(--danger); }
.tc-chat { position: absolute; right: var(--s3); top: calc(var(--bar-h) + var(--s2)); z-index: 5; display: grid; gap: var(--s2); width: min(320px, calc(100% - 2 * var(--s3))); }
.tc-chat-btn { position: relative; }
.tc-chat-btn .tcc-dot { position: absolute; top: -7px; right: -7px; }
.tcc-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font: 600 var(--fs-sm) var(--sans); color: var(--text-2); }
.tcc-title b { color: var(--gold-1); }
.tcc-x { width: 30px; height: 30px; padding: 0; font-size: var(--fs-xl); line-height: 1; color: var(--text-2); background: none; border: 1px solid var(--line); cursor: pointer; }
.tcc-x:hover { color: var(--gold-1); border-color: var(--gold-4); }
.tc-chat[hidden] { display: none; }
.tcc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 36px; padding: 0 var(--s3); font: 600 var(--fs-sm) var(--sans); color: var(--text-2); text-align: left; background: var(--glass); border: 1px solid var(--gold-5); cursor: pointer; }
.tcc-head b { color: var(--gold-1); }
.tcc-head:hover, .tcc-head:focus-visible { border-color: var(--gold-2); outline: none; }
.tcc-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; font: 700 var(--fs-hud-sm)/1 var(--sans); font-style: normal; color: var(--ink); background: var(--blue-2); border-radius: 9px; }
.tcc-dot[hidden] { display: none; }
.tcc-body { display: none; gap: var(--s2); padding: var(--s3); background: var(--panel); border: 1px solid var(--gold-5); box-shadow: var(--shadow-1); }
.tc-chat.is-open .tcc-body { display: grid; }
.tcc-log { display: grid; align-content: start; gap: var(--s1); max-height: 180px; overflow-y: auto; font-size: var(--fs-sm); color: var(--text-2); overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: var(--gold-4) transparent; }
.tcc-log:empty::before { content: "Nothing yet. Good luck, have fun."; color: var(--text-3); }
.tcc-log b { color: var(--foe); }
.tcc-log .is-mine b { color: var(--ally); }
.tcc-form { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--s2); }
.tcc-form .emo-btn { min-width: 36px; min-height: 36px; font-size: var(--fs-lg); }
.tcc-form .emo-pop { top: calc(100% + var(--s1)); bottom: auto; }
.tcc-form input { min-height: 36px; padding: 0 var(--s2); font: 400 var(--fs-sm) var(--sans); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.tcc-form input:focus { border-color: var(--gold-2); outline: none; }
.tcc-form .btn-gold { min-height: 36px; }
.tcc-err:empty { display: none; }
.tcc-err { font-size: var(--fs-xs); color: var(--foe); }
.tcc-peek { padding: var(--s2) var(--s3); font-size: var(--fs-sm); color: var(--text); background: var(--panel); border-left: 2px solid var(--foe); overflow-wrap: anywhere; }
.tcc-peek b { color: var(--foe); }
.tcc-peek[hidden] { display: none; }
.tc-help { position: absolute; inset: 0; z-index: 6; display: grid; justify-items: center; align-content: safe center; padding: calc(var(--bar-h) + var(--s2)) var(--s3) 88px; overflow-y: auto; background: var(--scrim); }
.tc-help[hidden] { display: none; }
.tc-help-card { position: relative; width: min(100%, 720px); padding: var(--s5); text-align: left; background: var(--panel); border: 1px solid var(--gold-5); }
.tc-help-card h2 { margin-bottom: var(--s4); padding-right: 40px; font: 700 var(--fs-lg) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.tc-help-card .rules { margin: 0; gap: var(--s4) var(--s5); }
.tc-sheet { position: absolute; inset: 0; z-index: 4; display: grid; justify-items: center; align-content: safe center; padding: var(--s3); overflow-y: auto; background: var(--scrim); }
.tc-sheet .tc-report { max-height: 100%; }
.tc-drill-btn[aria-pressed="true"] { color: var(--gold-1); border-color: var(--gold-1); }
.tc-drill { display: grid; gap: var(--s3); width: min(100%, 780px); padding: var(--s5); text-align: left; background: var(--panel); border: 1px solid var(--gold-5); }
.tc-drill h3 { font: 700 var(--fs-lg) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.tc-drill h4 { margin-top: var(--s2); padding-top: var(--s3); font: 700 var(--fs-xs) var(--serif); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); border-top: 1px solid var(--line); }
.drill-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.drill-cols > div { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.drill-cols > div > h4:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 760px) {
  .tc-drill { width: min(100%, 380px); }
  .drill-cols { grid-template-columns: 1fr; gap: var(--s3); }
  .drill-cols > div > h4:first-child { margin-top: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line); }
}
.drill-check { display: flex; align-items: flex-start; gap: var(--s3); min-height: var(--control); cursor: pointer; }
.drill-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold-3); }
.drill-check b { display: block; font-weight: 600; color: var(--gold-1); }
.drill-check small { font-size: var(--fs-sm); color: var(--text); }
.drill-num { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); color: var(--text-2); }
.drill-num span { display: flex; align-items: center; gap: var(--s2); }
.drill-num .ic-img { width: 18px; height: 18px; }
.drill-num input { width: 120px; height: var(--control); padding: 0 var(--s3); font: 600 var(--fs-base) var(--sans); font-variant-numeric: tabular-nums; text-align: right; color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.drill-num input:focus-visible, .drill-num select:focus-visible { outline: none; border-color: var(--gold-2); }
.drill-num select { width: 120px; height: var(--control); padding: 0 var(--s3); font: 600 var(--fs-base) var(--sans); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.drill-hits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.drill-hit { display: flex; align-items: center; gap: var(--s2); min-height: var(--control); padding: var(--s1) var(--s2); text-align: left; color: var(--text-2); background: var(--well); border: 1px solid var(--gold-5); cursor: pointer; }
.drill-hit:hover:not(:disabled), .drill-hit:focus-visible { outline: none; border-color: var(--gold-2); }
.drill-hit:disabled { opacity: .45; cursor: default; }
.drill-hit img { flex: none; width: 32px; height: 32px; }
.drill-hit b { display: block; font-weight: 600; color: var(--gold-1); }
.drill-hit small { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; color: var(--text); }
.drill-foot { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s2); }
/* a fight's top bar on a phone: the turn order keeps its room */
@media (max-width: 480px) {
  .is-fight .tc-leave span { display: none; }
  .is-fight .tc-tool { letter-spacing: 0; }
}
@media (max-width: 360px) {
  .is-fight [data-tc-panel], .tc-top:has(.tc-title) [data-tc-panel] { display: none; }
  .tc-top .tc-title { font-size: var(--fs-md); letter-spacing: 0; }
  .tc-top:has(.tc-title) { gap: var(--s1); }
  .drill-num input { width: 96px; }
}
.tc-result-win, .tc-result-lose { overflow-y: auto; }
.stat-battle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.stat-battle li { display: grid; gap: 2px; padding: var(--s2); text-align: center; background: var(--well); border: 1px solid var(--gold-5); }
.stat-battle span { font-size: var(--fs-hud-sm); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.stat-battle b { font: 700 var(--fs-base) var(--sans); font-variant-numeric: tabular-nums; }

/* a champion on the field: status on top, bars, the figure on its mark, abilities and items below */
.unit { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; min-height: 0; padding: 0; text-align: center; color: inherit; background: none; border: 0; }
/* status icons stay on one row, never wider than the health bar; a longer row scrolls sideways (mouse wheel or swipe) */
.unit-tags { display: flex; flex-wrap: nowrap; gap: 4px; width: 100%; max-width: 96px; min-height: 18px; box-sizing: content-box; padding: 6px 0 5px; margin: -6px 0 -5px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.unit-tags::-webkit-scrollbar { display: none; }
.unit-tags > * { flex: none; }
.unit-tags > :first-child { margin-left: auto; }
.unit-tags > :last-child { margin-right: auto; }
.unit-tags.is-more { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.unit-bars { display: grid; gap: 2px; width: 100%; max-width: 96px; }
.unit-line { display: flex; align-items: baseline; gap: var(--s1); min-width: 0; }
.unit-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--fs-hud-sm) var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-1); text-shadow: 0 1px 3px #000, 0 0 2px #000; }
.unit-hp { margin-left: auto; font: 700 var(--fs-hud-sm)/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
.bar { position: relative; display: block; width: 100%; height: 9px; overflow: hidden; background: rgba(0, 0, 0, .78); box-shadow: 0 0 0 1px rgba(0, 0, 0, .9); }
.bar u { position: absolute; top: 0; bottom: 0; left: 0; display: block; transition: width .35s; }
.bar-hp i { position: absolute; top: 0; bottom: 0; left: 0; display: block; background: #f3e1a6; transition: width .6s .35s ease-out; }
.bar-hp u { background: #3fae5a; transition: width .25s ease-out; }
.side-e .bar-hp u { background: var(--foe); }
.bar-hp s { position: absolute; top: 0; bottom: 0; background: var(--shield); transition: left .25s ease-out, width .25s ease-out; }
/* as in the game: a short tick every 100 health, a full heavy one every 1000 */
.bar-hp::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  repeating-linear-gradient(90deg, transparent 0 calc(var(--seg) * 10 - 2px), rgba(0, 0, 0, .95) calc(var(--seg) * 10 - 2px) calc(var(--seg) * 10)) top / 100% 100% no-repeat,
  repeating-linear-gradient(90deg, transparent 0 calc(var(--seg) - 1px), rgba(0, 0, 0, .7) calc(var(--seg) - 1px) var(--seg)) top / 100% 50% no-repeat; }
.bar-res, .bar-none { height: 4px; }
.unit-fig { position: relative; flex: 1; width: 100%; max-width: 136px; min-height: 40px; }
.unit-fig::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: -2px; z-index: -1; height: 26%; border-radius: 50%; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--team-blue) 50%, transparent), color-mix(in srgb, var(--team-blue) 12%, transparent) 60%, transparent 72%); box-shadow: 0 0 0 2px var(--ally) inset; }
.side-e .unit-fig::before { background: radial-gradient(ellipse at center, color-mix(in srgb, var(--team-red) 50%, transparent), color-mix(in srgb, var(--team-red) 12%, transparent) 60%, transparent 72%); box-shadow: 0 0 0 2px var(--foe) inset; }
.unit-art { position: absolute; inset: 0; background: center 14% / cover no-repeat; -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 44%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 58% 62% at 50% 44%, #000 58%, transparent 100%); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .6)); }
.side-e .unit-art { transform: scaleX(-1); }
/* the 3D model: its canvas is wider and taller than the figure so weapons and capes are not cut off */
/* sized from the figure's width only: its height changes as status icons come and go */
.unit-3d { position: absolute; left: 50%; bottom: -12px; width: 230%; height: auto; aspect-ratio: 1.45; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .55)); }
.unit-fig:not(.has-3d) .unit-3d, .unit-fig.has-3d .unit-art { visibility: hidden; }
.unit.is-active .unit-3d { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold-1) 80%, transparent)); }
.unit.is-target:hover .unit-3d, .unit.is-aoe .unit-3d { filter: drop-shadow(0 0 8px rgba(255, 120, 100, .9)); }
.unit.is-hit .unit-3d { animation: tcArtHit .38s; }
.unit-tags, .unit-bars { position: relative; z-index: 1; }
.unit-art.is-icon { background-size: auto 70%; background-position: center 40%; -webkit-mask-image: none; mask-image: none; }
.unit-kit { display: grid; justify-items: center; gap: 2px; }
.unit-skills { display: flex; gap: 2px; padding: 2px; background: color-mix(in srgb, var(--ink) 72%, transparent); }
.us { position: relative; display: block; width: 22px; height: 22px; }
.us img { display: block; width: 100%; height: 100%; border: 1px solid var(--gold-5); }
.us.is-cd img { filter: grayscale(1) brightness(.45); }
.us.is-short img { border-color: var(--danger); filter: saturate(.4); }
.us b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 var(--fs-xs)/1 var(--sans); color: #fff; text-shadow: 0 1px 2px #000; }
.us small { position: absolute; right: -1px; bottom: -2px; padding: 0 2px; font: 700 var(--fs-hud-xs)/10px var(--sans); color: #bcd8ff; background: color-mix(in srgb, var(--ink) 90%, transparent); }
.unit-items { display: flex; gap: 2px; }
.unit-items img { width: 20px; height: 20px; border: 1px solid var(--gold-3); }
.unit.is-empty { background: none; border: 0; }
.unit.is-dead .unit-fig, .unit.is-dead .unit-kit, .unit.is-dead .unit-bars, .unit.is-dead .unit-tags { filter: grayscale(1) brightness(.45); opacity: .6; }
.unit.is-active { z-index: 1; }
.unit.is-active .unit-fig::before, .unit.is-open .unit-fig::before { box-shadow: 0 0 0 2px var(--gold-1) inset, 0 0 22px color-mix(in srgb, var(--gold-1) 80%, transparent); background: radial-gradient(ellipse at center, color-mix(in srgb, var(--gold-1) 60%, transparent), color-mix(in srgb, var(--gold-1) 12%, transparent) 62%, transparent 74%); }
.unit.is-active .unit-art { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gold-1) 75%, transparent)); }
.unit.is-target { cursor: crosshair; }
.unit.is-target .unit-fig::before { box-shadow: 0 0 0 2px var(--danger) inset; animation: tcAim .9s ease-in-out infinite alternate; }
@keyframes tcAim { from { box-shadow: 0 0 0 2px var(--danger) inset; } to { box-shadow: 0 0 0 3px var(--danger) inset, 0 0 22px color-mix(in srgb, var(--danger) 90%, transparent); } }
.unit.is-target:hover .unit-fig::before, .unit.is-aoe .unit-fig::before { animation: none; box-shadow: 0 0 0 3px #fff inset, 0 0 24px color-mix(in srgb, var(--danger) 95%, transparent); }
.unit.is-target:hover .unit-art, .unit.is-aoe .unit-art { filter: drop-shadow(0 0 10px rgba(255, 120, 100, .9)); }
.unit.is-hit::after, .unit.is-heal::before, .unit.is-shield::before { display: none; }
.unit.is-hit .unit-art { animation: tcArtHit .38s; }
@keyframes tcArtHit { 0% { filter: brightness(2.4) saturate(2.2) sepia(.6) hue-rotate(-30deg); } 100% { filter: none; } }
.unit.is-heal .unit-fig::after, .unit.is-shield .unit-fig::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 22px 6px var(--heal) inset; animation: tcGlow .7s forwards; pointer-events: none; }
.unit.is-shield .unit-fig::after { box-shadow: 0 0 22px 6px var(--shield) inset; }
@media (min-width: 761px) {
  .arena { grid-template-columns: minmax(0, 380px) clamp(80px, 15vw, 280px) minmax(0, 380px); grid-template-rows: minmax(0, 1fr); justify-content: center; }
  .arena .side { align-self: center; height: 100%; max-height: 660px; column-gap: var(--s5); row-gap: var(--s3); }
  .arena .unit-fig { max-width: 168px; }
  .arena .unit-bars, .arena .unit-tags { max-width: 112px; }
  .arena .bar-hp { height: 11px; }
  .arena .cell { position: relative; }
  .arena .side-p .l0, .arena .side-e .l2 { left: clamp(26px, 5vw, 84px); }
  .arena .side-p .l2, .arena .side-e .l0 { left: calc(-1 * clamp(26px, 5vw, 84px)); }
}
@media (min-width: 1100px) {
  .tc-card.tc-card-p, .tc-card.tc-card-e { width: 320px; }
  .tc-card.tc-card-p { right: auto; left: var(--s4); }
}
@media (max-width: 760px) {
  .tc-report { grid-template-columns: minmax(0, 1fr); gap: var(--s2); }
  .tc-team { --cols: 32px minmax(0, 1fr) repeat(3, 46px); }
  .tm-pic { width: 32px; height: 32px; }
  .tc-sheet, .tc-result-win, .tc-result-lose { align-content: start; }
  .tc-sheet .tm-stats { display: none; }
  .tc-total { padding: var(--s1) var(--s3); }
  .tc-total b { font-size: var(--fs-3xl); }
  .tc-total small { font-size: var(--fs-hud-sm); }
  .unit-tags { min-height: 14px; }
  .unit-fig { min-height: 28px; }
}

/* HUD: combat log on the left, the acting champion's abilities in the middle */
.tc-hud { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: var(--s4); padding: var(--s2) var(--s4) var(--s3); background: var(--ink); border-top: 1px solid var(--gold-5); }
.tc-log { grid-column: 1; grid-row: 1; max-height: 104px; overflow-y: auto; scrollbar-width: none; font-size: var(--fs-xs); color: var(--text); }
.tc-log li { padding: 1px 0; }
.tc-log .lg-p { color: #7fd1ff; font-weight: 600; }
.tc-log .lg-e { color: #ff8f86; font-weight: 600; }
.tc-log .lg-phys { color: var(--phys); font-weight: 600; }
.tc-log .lg-magic { color: var(--magic); font-weight: 600; }
.tc-log .lg-true { color: #fff; font-weight: 600; }
.tc-log .lg-heal { color: var(--heal); font-weight: 600; }
.tc-log .lg-crit { color: var(--crit); font-weight: 700; }
.actions { position: relative; grid-column: 2; grid-row: 1; display: grid; grid-template-rows: 34px 18px auto; gap: var(--s1); justify-items: center; min-width: 0; }
/* the combo line, the hint and the timer hold their places even when empty, so the bar under them never moves */
.actions-hint { height: 18px; max-width: 100%; overflow: hidden; font-size: var(--fs-xs); line-height: 18px; text-align: center; white-space: nowrap; text-overflow: ellipsis; color: var(--text-3); }
.combo-line { display: flex; justify-content: center; align-items: center; height: 34px; max-width: 100%; }
.actions > .tc-timer { position: absolute; top: 0; right: 0; margin: 0; line-height: 34px; }
.combo-seq { display: flex; align-items: center; gap: var(--s1); padding: 3px var(--s2); background: var(--panel); border: 1px solid var(--gold-4); }
.cs-step { position: relative; display: block; line-height: 0; border: 1px solid var(--gold-4); transition: opacity .2s, border-color .2s, box-shadow .2s; }
.cs-step img { width: 24px; height: 24px; }
.cs-step kbd { position: absolute; right: -1px; bottom: -1px; padding: 0 2px; font: 700 var(--fs-hud-xs)/11px var(--sans); color: var(--gold-1); background: var(--ink); }
.cs-step.is-now { border-color: var(--gold-1); box-shadow: 0 0 0 1px var(--gold-1), 0 0 10px color-mix(in srgb, var(--gold-1) 45%, transparent); }
.cs-step.is-done { opacity: .4; }
.cs-arrow { font: 700 var(--fs-md)/1 var(--sans); font-style: normal; color: var(--gold-2); }
.dock { display: flex; align-items: center; gap: var(--s4); min-width: 0; padding: var(--s2) var(--s3); background: var(--panel); border: 1px solid var(--gold-4); }
.actions-who { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.actions-who > span { width: 150px; min-width: 0; }
.actions-who b, .actions-who small { display: block; overflow: hidden; text-overflow: ellipsis; }
.dock { min-height: 90px; }
.dock-wait { gap: var(--s3); }
@media (min-width: 1101px) {
  .dock { box-sizing: border-box; width: 1010px; max-width: calc(100vw - 2 * var(--s4)); }
  .act-btn { width: 60px; }
  .actions-items { min-width: calc(6 * 38px + 5 * var(--s1)); }
}
.who-pic { flex: none; width: 56px; height: 56px; border: 2px solid var(--gold-2); border-radius: 50%; }
.actions-who b, .actions-wait b { display: block; font: 700 var(--fs-base) var(--serif); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--gold-1); }
.actions-who small { font-size: var(--fs-xs); white-space: nowrap; color: var(--blue-2); }
.actions-wait { font-size: var(--fs-sm); color: var(--text-2); }
.who-passive { flex: none; width: 28px; height: 28px; border: 1px solid var(--gold-4); border-radius: 50%; }
.actions-btns { display: flex; gap: var(--s2); }
/* the active champion's items: usable ones are buttons next to the abilities, the rest sit beside them */
.actions-items { display: flex; gap: var(--s1); align-items: center; margin-left: var(--s4); padding-left: var(--s4); border-left: 1px solid var(--line); }
.act-pas { position: relative; display: block; padding: 0; line-height: 0; color: inherit; background: none; border: 1px solid var(--gold-5, color-mix(in srgb, var(--gold-2) 35%, transparent)); }
/* an item with an active: same size as the others, told apart by its gold edge and its key */
.act-use { border-color: var(--gold-1, var(--gold-1)); box-shadow: 0 0 0 1px var(--gold-3, var(--gold-2)); cursor: pointer; }
.act-use kbd { position: absolute; left: -1px; top: -1px; min-width: 13px; padding: 1px 2px; font: 700 var(--fs-hud-xs)/11px var(--sans); text-align: center; color: var(--ink, var(--ink)); background: var(--gold-2, var(--gold-2)); }
.act-use .cd { position: absolute; inset: 0; display: grid; place-items: center; font: 800 var(--fs-base) var(--sans); font-style: normal; color: #fff; background: color-mix(in srgb, var(--ink) 60%, transparent); }
.act-use:disabled { cursor: default; }
.act-use.is-spent img, .act-use:disabled img { filter: grayscale(1) brightness(.55); }
.act-use.is-spent { border-color: var(--gold-5, color-mix(in srgb, var(--gold-2) 35%, transparent)); box-shadow: none; }
.who-pas { position: relative; flex: none; line-height: 0; border-radius: 50%; }
.who-pas .tip { left: 0 !important; transform: none !important; white-space: normal; }
.who-pas .tip b { white-space: normal; }
.act-pas .tip, .who-pas .tip { position: absolute; bottom: calc(100% + var(--s2)); left: 50%; z-index: var(--z-raised); display: none; width: 260px; transform: translateX(-50%); padding: var(--s3); font-size: var(--fs-sm); line-height: 1.45; text-align: left; color: var(--text-2); background: var(--ink, var(--ink)); border: 1px solid var(--gold-4); }
.act-pas .tip b, .who-pas .tip b { display: block; margin-bottom: var(--s1); font: 700 var(--fs-sm) var(--serif); text-transform: uppercase; color: var(--gold-1); }
.act-pas:hover .tip, .act-pas:focus .tip, .who-pas:hover .tip, .who-pas:focus .tip { display: block; }
.act-btn { position: relative; display: grid; justify-items: center; gap: 2px; min-width: 0; padding: 0; color: inherit; background: none; border: 0; }
.act-btn:disabled { opacity: 1; }
.act-ico { position: relative; display: block; width: 52px; height: 52px; border: 1px solid var(--gold-4); transition: border-color .15s; }
.act-ico img { display: block; width: 100%; height: 100%; }
.act-btn:disabled .act-ico img { filter: grayscale(1) brightness(.5); }
.act-btn kbd { position: absolute; top: -1px; left: -1px; min-width: 16px; padding: 0 3px; font: 700 var(--fs-hud-sm)/14px var(--sans); text-align: center; color: var(--gold-1); background: var(--ink); border: 1px solid var(--gold-4); }
.act-btn .cd { position: absolute; inset: 0; display: grid; place-items: center; font: 800 var(--fs-xl) var(--sans); font-style: normal; color: #fff; background: color-mix(in srgb, var(--ink) 60%, transparent); }
.act-btn small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-hud-sm); white-space: nowrap; color: var(--text-2); }
.act-btn:disabled small { color: var(--text-3); }
.act-btn:hover:not(:disabled) .act-ico { border-color: var(--gold-1); }
.act-combo { position: absolute; right: -1px; bottom: -1px; padding: 0 3px; font: 700 var(--fs-hud-sm)/14px var(--sans); font-style: normal; color: var(--ink); background: var(--gold-1); }
.act-btn.has-combo .act-ico::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--gold-1) 35%, transparent); transform: scaleY(0); transform-origin: bottom; pointer-events: none; }
.act-btn.has-combo:active .act-ico::after { transform: scaleY(1); transition: transform .35s linear; }
.act-btn.is-chained .act-ico { border-color: var(--gold-1); box-shadow: 0 0 0 2px var(--gold-1), 0 0 18px color-mix(in srgb, var(--gold-1) 60%, transparent); }
.kw-combo { display: block; margin-top: var(--s1); font-style: normal; color: var(--gold-1); }
@media (prefers-reduced-motion: reduce) { .act-btn.has-combo:active .act-ico::after { transition: none; } }
.act-btn.is-on .act-ico { border-color: var(--gold-1); box-shadow: 0 0 0 1px var(--gold-1), 0 0 14px color-mix(in srgb, var(--gold-1) 45%, transparent); }
.act-btn .tip { position: absolute; bottom: calc(100% + var(--s2)); left: 50%; z-index: var(--z-raised); display: none; width: 260px; transform: translateX(-50%); padding: var(--s3); text-align: left; font-size: var(--fs-sm); color: var(--text-2); background: var(--ink); border: 1px solid var(--gold-3); }
.act-btn .tip b { display: block; margin-bottom: var(--s1); font: 700 var(--fs-sm) var(--serif); text-transform: uppercase; color: var(--gold-1); }
.act-btn:hover .tip, .act-btn:focus-visible .tip { display: block; }
/* the cards over the bar never take the pointer: moving up from a button to the field must not keep them open over it */
.act-btn .tip, .act-pas .tip, .who-pas .tip { pointer-events: none; }
/* on a touch screen a tapped button keeps :hover, and its card would cover the field */
@media (hover: none) { .act-btn:hover .tip { display: none; } }
.act-end { align-self: stretch; display: grid; align-content: center; justify-items: center; gap: 2px; min-width: 116px; padding: 0 var(--s4); color: var(--gold-1); background: var(--teal-fill); border: 1px solid var(--blue-2); transition: background-color .15s; }
.act-end b { font: 700 var(--fs-base) var(--serif); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.act-end small { font-size: var(--fs-hud-sm); color: var(--blue-1); }
.act-end:hover:not(:disabled) { background: var(--teal-fill-2); }

/* victory and defeat cover the field */
.reward { grid-column: 1 / -1; display: grid; gap: var(--s3); justify-items: center; text-align: center; }
.reward p { color: var(--text-2); }
.tc-result-win, .tc-result-lose { position: absolute; inset: 0; z-index: 5; align-content: center; padding: var(--s5); background: var(--scrim); animation: tcResult .4s ease-out; }
.tc-result-win h3, .tc-result-lose h3 { font-size: var(--fs-hero); line-height: 1; letter-spacing: .12em; }
.tc-result-win h3 { color: var(--gold-1); text-shadow: 0 0 40px color-mix(in srgb, var(--gold-2) 60%, transparent); }
.tc-result-lose h3 { color: var(--danger); }
.tc-result-win p, .tc-result-lose p { font-size: var(--fs-base); }
.reward .draft-go { justify-content: center; }
@keyframes tcResult { from { opacity: 0; } }
.tc-card { position: absolute; top: calc(var(--bar-h) + var(--s3)); right: var(--s4); z-index: 4; width: min(360px, calc(100% - 2 * var(--s4))); max-height: calc(100% - var(--bar-h) - 2 * var(--s3)); overflow-y: auto; padding: var(--s4); background: var(--ink); box-shadow: var(--shadow-2); }

/* draft: the six places stand exactly as they will in the fight */
.draft { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.3fr) minmax(280px, 1fr); gap: var(--s5); align-items: start; width: 100%; max-width: 1480px; margin: 0 auto; }
.draft-team { position: sticky; top: 0; display: grid; gap: var(--s3); }
.draft-team h3 { font-size: var(--fs-lg); letter-spacing: .08em; }
.draft-team h3 span { margin-left: var(--s2); font: 400 var(--fs-md) var(--sans); color: var(--text-3); }
.draft-hint { font-size: var(--fs-sm); color: var(--text-2); }
.draft-side { height: clamp(260px, 44vh, 400px); }
.slot-pick { display: grid; align-content: end; min-width: 0; min-height: 0; padding: var(--s2); text-align: left; color: inherit; background: var(--well) center 22% / cover no-repeat; border: 1px solid var(--ally); }
.slot-pick small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--fs-xs) var(--serif); letter-spacing: .05em; text-transform: uppercase; color: var(--gold-1); text-shadow: 0 1px 3px #000; }
.slot-pick.is-empty { place-content: center; font-size: var(--fs-hud-sm); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); background: color-mix(in srgb, var(--ink) 40%, transparent); border: 1px dashed var(--gold-5); }
.slot-pick.is-on { border-color: var(--gold-1); box-shadow: 0 0 0 1px var(--gold-1); }
.slot-pick[data-slot] { cursor: grab; touch-action: none; }
.slot-pick.is-dragging, .pool-champ.is-dragging { opacity: .35; }
.slot-pick.is-over { border-color: var(--gold-1); border-style: solid; background-color: var(--gold-wash); }
.tactics.is-dragging, .tactics.is-dragging * { cursor: grabbing; }
.tc-ghost { position: fixed; top: 0; left: 0; z-index: 1000; width: 56px; height: 56px; border: 2px solid var(--gold-1); box-shadow: var(--shadow-1); pointer-events: none; }
.draft-go { display: flex; flex-wrap: wrap; gap: var(--s3); }
.draft-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: var(--s2); }
.draft-pool .pool-champ { touch-action: none; }
.pool-champ { display: grid; justify-items: center; gap: 2px; min-width: 0; padding: var(--s2); color: inherit; background: var(--well); border: 1px solid var(--gold-5); transition: border-color .15s; }
.pool-champ img { width: 64px; height: 64px; border: 1px solid var(--gold-4); }
.pool-champ b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; color: var(--gold-1); }
.pool-champ small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-hud-sm); white-space: nowrap; color: var(--text-3); }
.pool-champ:hover { border-color: var(--gold-2); }
.pool-champ.is-on { border-color: var(--blue-2); background: var(--teal-fill); }
.draft-info { min-height: 120px; padding: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); }

@media (max-width: 1100px) {
  .tc-hud { grid-template-columns: minmax(0, 1fr); }
  .tc-log { display: none; }
  .actions { grid-column: 1; justify-items: stretch; }
  .dock { justify-content: space-between; }
  .tc-lobby { grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-content: center; }
  .lobby-side { justify-self: start; }
  .draft { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .draft-info { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .tactics { --bar-h: 48px; }
  .tactics[data-phase="menu"] { background-image: linear-gradient(180deg, color-mix(in srgb, var(--ink) 70%, transparent), var(--ink) 70%), url(https://ddragon.leagueoflegends.com/cdn/img/champion/splash/Yasuo_68.jpg); background-position: 62% top; background-size: auto 60%; }
  .tc-top { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2); padding-left: var(--s3); }
  .tc-top-l, .tc-top-r { gap: var(--s2); }
  .tc-tool { padding: 0 var(--s2); }
  .tc-tool span, .tc-rank, .is-fight .tc-ess, .is-fight .tc-info { display: none; }
  .tc-title { font-size: var(--fs-base); }
  .tc-top:has(.tc-title) .tc-back:not(.tc-leave) span { display: none; }
  .tc-top:has(.tc-title) .tc-back { min-width: 28px; font-size: var(--fs-lg); }
  .tc-title { letter-spacing: .04em; }
  .order li { width: 26px; height: 26px; }
  .order li.is-now { width: 34px; height: 34px; margin-right: var(--s1); }
  .arena { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 1px minmax(0, 1fr); padding: var(--s2); }
  .arena::after { background: linear-gradient(180deg, color-mix(in srgb, var(--team-red) 20%, transparent), transparent 44%, transparent 56%, color-mix(in srgb, var(--team-blue) 18%, transparent)); }
  .side-p { order: 3; }
  .vs { order: 2; width: auto; height: 1px; justify-self: stretch; background: var(--gold-4); }
  .side { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .side .l0 { grid-row: auto; grid-column: 1; } .side .l1 { grid-row: auto; grid-column: 2; } .side .l2 { grid-row: auto; grid-column: 3; }
  .side-p .cf, .side-e .cb { grid-row: 1; }
  .side-p .cb, .side-e .cf { grid-row: 2; }
  .us { width: 18px; height: 18px; }
  .us small { display: none; }
  .unit-foot { padding: var(--s1); }
  .unit-name, .unit-hp { font-size: var(--fs-hud-sm); }
  .unit-name { letter-spacing: 0; }
  .unit-items img { width: 16px; height: 16px; }
  .tc-hud { padding: var(--s1) var(--s2) var(--s2); }
  .dock { gap: var(--s2); padding: var(--s2); min-height: 80px; }
  .actions-who > span, .who-pas, .act-btn small, .act-end small { display: none; }
  .who-pic { width: 40px; height: 40px; }
  .actions-btns { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s1); }
  .actions-items { margin-left: 0; padding-left: 0; border-left: 0; }
  .actions-items .act-pas:not(.act-use) { display: none; }
  .act-pas .tip { display: none !important; }
  .act-ico { width: 100%; max-width: 48px; height: auto; aspect-ratio: 1; }
  .act-btn .tip, .act-btn:hover .tip, .act-btn:focus-visible .tip { display: none; }
  .act-end { min-width: 0; min-height: 44px; padding: 0 var(--s3); }
  .act-end b { font-size: var(--fs-xs); }
  .tc-body { padding: var(--s4) var(--s4); }
  .draft { grid-template-columns: minmax(0, 1fr); }
  .draft-team { position: static; }
  .draft-side { height: 220px; }
  .tc-loadout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 760px) {
  .lobby-title { font-size: var(--fs-h2); }
  .lobby-menu { gap: var(--s1); margin-top: var(--s4); }
  .lobby-item { padding-block: var(--s2); }
  .lobby-item.is-primary { padding-block: var(--s3); }
  .tc-body { padding-block: var(--s4); }
}
@media (max-width: 420px) {
  .actions-who { display: none; }
  .lobby-item.is-primary b { font-size: var(--fs-xl); }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s6); align-items: center; max-width: 860px; justify-self: start; width: 100%; }
.about img { width: 128px; height: 128px; border-radius: 50%; border: 2px solid var(--gold-3); }
.about p { max-width: 62ch; font-size: var(--fs-lg); color: var(--text-2); }
.about p + p { margin-top: var(--s3); }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: var(--s4); }
.account { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s1) var(--s4); align-items: center; padding: var(--s5); background: var(--panel); border: 1px solid var(--gold-5); }
.account-emblem { grid-row: span 2; width: 64px; height: 64px; object-fit: contain; }
.account h3 { font-size: var(--fs-lg); letter-spacing: .02em; text-transform: none; }
.account h3 span { margin-left: var(--s1); font: 400 var(--fs-md) var(--sans); color: var(--text); }
.account-rank { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-2); }
.account-rank b { color: var(--gold-2); font-weight: 600; }
.account-bar, .account dl, .account-actions { grid-column: 1 / -1; }
.account-bar { height: 4px; margin-top: var(--s3); background: var(--loss); }
.account-bar span { display: block; width: var(--wr); height: 100%; background: var(--blue-2); }
.account dl { display: grid; gap: var(--s1); margin-top: var(--s2); font-size: var(--fs-md); }
.account dl div { display: flex; justify-content: space-between; gap: var(--s3); }
.account dd { color: var(--gold-1); font-variant-numeric: tabular-nums; }
.account-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2); margin-top: var(--s3); }
.account-actions > * { min-height: 36px; display: grid; place-items: center; padding: 0 var(--s3); font: 700 var(--fs-xs)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); background: none; border: 1px solid var(--gold-5); transition: color .15s, border-color .15s; }
.account-actions > *:hover { color: var(--gold-1); border-color: var(--gold-2); }

.builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s5); }
.build { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 400px; padding: var(--s5); overflow: hidden; background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.build:hover { border-color: var(--gold-2); }
.build-art { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .55; }
.build::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 20%, transparent) 0%, color-mix(in srgb, var(--ink) 80%, transparent) 48%, var(--ink) 90%); }
.build-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.build-emblem { width: 44px; height: 44px; padding: var(--s1); border-radius: 50%; background: color-mix(in srgb, var(--ink) 75%, transparent); border: 1px solid var(--gold-3); }
.build-count { padding: var(--s1) var(--s3); font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); background: color-mix(in srgb, var(--ink) 75%, transparent); border: 1px solid var(--gold-5); }
.build h3 { margin-top: auto; padding-top: var(--s9); font-size: var(--fs-3xl); letter-spacing: .05em; }
.build-tag { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-2); }
.build-desc { margin-top: var(--s2); font-size: var(--fs-md); color: var(--text-2); }
.items { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s4); }
.items img { width: 40px; height: 40px; border: 1px solid var(--gold-4); background: var(--ink); }
.build-link { display: flex; align-items: center; gap: var(--s2); width: 100%; margin-top: var(--s4); padding: var(--s3) 0 0; font-size: var(--fs-sm); text-align: left; color: var(--gold-2); background: none; border: 0; border-top: 1px solid var(--gold-5); }
.build-link:hover { color: var(--gold-1); }
.build-link svg { flex: none; color: var(--blue-2); }

.feature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); margin-bottom: var(--s6); }
.feature-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--s3); padding: var(--s6); }
.badge { padding: 2px var(--s3); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--gold-2); }
.feature-body h3 { font-size: var(--fs-h3); letter-spacing: .03em; }

.champ { position: relative; isolation: isolate; overflow: hidden; }
.champ-bg { position: absolute; inset: 0; z-index: -2; background: center 20% / cover no-repeat; opacity: .3; transition: opacity .3s; }
.champ::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 20%, color-mix(in srgb, var(--ink) 50%, transparent)), linear-gradient(180deg, var(--ink), transparent 25%, transparent 75%, var(--ink)); }
.champ-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7); align-items: start; }
.ability-keys { display: flex; gap: var(--s3); }
.ability-keys button { position: relative; width: 60px; height: 60px; padding: 0; background: var(--ink); border: 1px solid var(--gold-4); transition: border-color .15s; }
.ability-keys img { width: 100%; height: 100%; opacity: .55; }
.ability-keys span { position: absolute; right: -1px; bottom: -1px; min-width: 20px; padding: 0 var(--s1); font: 700 var(--fs-xs)/18px var(--serif); text-align: center; color: var(--gold-1); background: var(--ink); border: 1px solid var(--gold-4); }
.ability-keys button:hover, .ability-keys button[aria-selected="true"] { border-color: var(--gold-1); }
.ability-keys button[aria-selected="true"] { outline: 1px solid var(--gold-1); }
.ability-keys button:hover img, .ability-keys button[aria-selected="true"] img { opacity: 1; }
.ability-body { margin-top: var(--s5); min-height: 180px; }
.ability-body small { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-2); }
.ability-body h3 { margin-top: var(--s1); font-size: var(--fs-3xl); letter-spacing: .04em; }
.ability-body p { margin-top: var(--s2); max-width: 56ch; color: var(--text-2); }
.skins-label { font-size: var(--fs-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--blue-2); }
.skins-name { min-height: 32px; font: 700 var(--fs-2xl) var(--serif); color: var(--gold-1); }
.skin-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.skin-strip button { padding: 0; aspect-ratio: 308 / 560; overflow: hidden; background: var(--ink); border: 1px solid var(--gold-5); transition: border-color .15s; }
.skin-strip img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.skin-strip button:hover img, .skin-strip button[aria-pressed="true"] img { opacity: 1; }
.skin-strip button:hover, .skin-strip button[aria-pressed="true"] { border-color: var(--gold-1); }

.fame { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--s5); counter-reset: fame; }
.fame li { counter-increment: fame; background: var(--panel); border: 1px solid var(--gold-5); }
.fame-body { padding: var(--s3) var(--s4) var(--s4); }
.fame-views { font: 700 var(--fs-2xl)/1.2 var(--serif); color: var(--gold-1); }
.fame-views::before { content: counter(fame, decimal-leading-zero) " "; color: var(--gold-4); }
.fame-views small { font: 400 var(--fs-xs) var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.fame-title { margin-top: var(--s1); font-size: var(--fs-md); color: var(--text-2); }
.channel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s5); margin-top: var(--s7); padding: var(--s5) var(--s6); }
.channel img { width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--gold-3); }
.channel h3 { font-size: var(--fs-2xl); letter-spacing: .05em; }
.channel p { margin-top: var(--s1); max-width: 60ch; }

/* ---------- Admin ---------- */
.admin-head { margin-bottom: var(--s5); }
.admin-head h1 { font-size: var(--fs-h2); letter-spacing: .05em; }
.gate { display: grid; gap: var(--s4); justify-items: start; max-width: 520px; }
.gate details { width: 100%; font-size: var(--fs-sm); }
.gate summary { cursor: pointer; }
.gate .form-inline { margin-top: var(--s3); }
.admin-tabs { display: flex; gap: var(--s1); margin-bottom: var(--s6); overflow-x: auto; border-bottom: 1px solid var(--gold-5); scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { padding: var(--s3) var(--s4); font: 700 var(--fs-sm)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--gold-2); background: none; border: 0; border-bottom: 2px solid transparent; }
.admin-tabs button:hover { color: var(--gold-1); }
.admin-tabs button[aria-selected="true"] { color: var(--gold-1); border-bottom-color: var(--gold-2); }
.admin-tabs i { margin-left: var(--s1); font: 400 var(--fs-xs) var(--sans); font-style: normal; letter-spacing: 0; color: var(--blue-2); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s4); }
.stat { display: grid; gap: 2px; padding: var(--s4); text-align: left; background: var(--panel); border: 1px solid var(--gold-5); transition: border-color .15s; }
.stat:hover { border-color: var(--gold-2); }
.stat b { font: 700 var(--fs-4xl)/1.1 var(--serif); color: var(--gold-1); }
.stat span { font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.stat small { font-size: var(--fs-xs); }
.recent { border: 1px solid var(--gold-5); background: var(--panel); }
.recent li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: 0; }
.recent span { color: var(--gold-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent small { flex: none; }
.shortcuts { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.pane-note { margin-bottom: var(--s4); font-size: var(--fs-md); }
.admin-list { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.admin-item { padding: var(--s4); background: var(--panel); border: 1px solid var(--gold-5); }
.admin-item[data-status="pending"], .admin-item[data-status="rejected"] { border-color: var(--gold-2); }
.admin-item h3 { margin-top: var(--s1); font: 600 var(--fs-base)/1.4 var(--sans); text-transform: none; }
.admin-item h3 a:hover { text-decoration: underline; }
.admin-item p { margin-top: var(--s1); font-size: var(--fs-md); white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-item img:not(.ava) { max-height: 160px; margin-top: var(--s2); }
.admin-item .meta { margin-top: 0; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--blue-2); }
.admin-item .form-actions { justify-content: flex-start; align-items: center; margin-top: var(--s3); }
.admin-item .form-actions button { min-height: 36px; padding: 0 var(--s4); font: 700 var(--fs-xs)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); background: none; border: 1px solid var(--gold-5); transition: color .15s, border-color .15s; }
.admin-item .form-actions button:hover { color: var(--gold-1); border-color: var(--gold-2); }
.admin-comment { padding-left: var(--s3); }
.admin-comment b { color: var(--gold-2); }
.admin-score { display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; }
.admin-score .rank { font: 700 var(--fs-base) var(--serif); color: var(--gold-2); }
.admin-score > button { min-height: 36px; padding: 0 var(--s4); font: 700 var(--fs-xs)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); background: none; border: 1px solid var(--gold-5); }
.admin-score > button:hover { color: var(--gold-1); border-color: var(--danger); }
.admin-member { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; }
.role-pick { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }
.role-pick select { min-height: 36px; padding: 0 var(--s2); font: 500 var(--fs-sm) var(--sans); color: var(--gold-1); background: var(--well); border: 1px solid var(--gold-5); }
.admin [data-pane] > .form { padding: 0; margin-bottom: var(--s5); max-width: 820px; }
.admin [data-pane] > .board { max-width: 420px; }

/* ---------- Footer ---------- */
.foot { display: grid; grid-template-columns: minmax(0, var(--page)); justify-content: center; padding: var(--s7) var(--gutter) var(--s8); border-top: 1px solid var(--gold-5); background: var(--well); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.foot-brand { font-size: var(--fs-lg); letter-spacing: .24em; color: var(--gold-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--fs-md); }
.foot-links a { color: var(--text-2); }
.foot-links a:hover { color: var(--gold-1); text-decoration: underline; text-underline-offset: 4px; }
.legal { margin-top: var(--s5); max-width: 76ch; justify-self: start; width: 100%; font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Floating pieces ---------- */
.sound {
  position: fixed; right: var(--s5); bottom: var(--s5); z-index: var(--z-sticky); width: 44px; height: 44px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; color: var(--gold-1);
  background: var(--panel); border: 1px solid var(--gold-3); transition: border-color .15s, color .15s;
}
.sound:hover { border-color: var(--gold-1); }
.sound-vol { position: fixed; z-index: var(--z-sticky); display: grid; gap: var(--s2); width: 220px; max-width: calc(100vw - 16px); padding: var(--s3) var(--s4); background: var(--panel); border: 1px solid var(--gold-3); box-shadow: var(--shadow-2); }
.sound-vol[hidden] { display: none; }
.sound-vol label { display: flex; justify-content: space-between; font: 600 var(--fs-xs) var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.sound-vol output { color: var(--gold-1); font-variant-numeric: tabular-nums; }
.sound-vol input[type="range"] { width: 100%; height: 28px; margin: 0; accent-color: var(--gold-2); cursor: pointer; }
.sound-vol .link { justify-self: start; min-height: 28px; font-size: var(--fs-sm); }
.sound .sound-off { display: none; }
.sound[aria-pressed="true"] { color: var(--text); border-color: var(--gold-4); }
.sound[aria-pressed="true"] .sound-on { display: none; }
.sound[aria-pressed="true"] .sound-off { display: block; }
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s4); background: var(--scrim); }
.modal-box { width: min(1100px, 100%); padding: var(--s2); }
.modal-video { aspect-ratio: 16 / 9; background: var(--well); }
.modal-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-close { position: absolute; top: -20px; right: -8px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); border: 1px solid var(--gold-3); color: var(--gold-1); }
.modal-close:hover { border-color: var(--gold-1); }
.verify-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-raised); display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s1) var(--s4); padding: var(--s3) 160px var(--s3) var(--s4); font-size: var(--fs-md); color: var(--gold-1); background: var(--panel); border-top: 1px solid var(--gold-3); }
.verify-bar b { font-weight: 600; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; top: calc(var(--nav-h) + var(--s4)); z-index: var(--z-toast); transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: var(--s3) var(--s5); font-size: var(--fs-md); color: var(--blue-1); background: var(--panel); border: 1px solid var(--blue-2); }

/* ---------- Idea page (kept for reuse) ---------- */
.soon { display: block; min-height: 100svh; }
.soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7); align-items: start; max-width: 1320px; }
.soon-form { margin-top: var(--s5); padding: var(--s5); }
.soon-ideas { display: flex; flex-direction: column; padding: var(--s5); max-height: calc(100svh - var(--nav-h) - 88px); }
.soon-ideas .subhead { margin: 0 0 var(--s4); font-size: var(--fs-xl); }
.ideas { display: grid; gap: var(--s3); overflow-y: auto; min-height: 0; }
.idea { padding: var(--s3) var(--s4); background: var(--well); border: 1px solid var(--gold-5); }
.idea-by b { color: var(--gold-1); font-weight: 600; }
.idea-by time { margin-left: var(--s2); font-size: var(--fs-xs); color: var(--text-3); }
.idea-text { margin-top: var(--s1); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1180px) {
  .nav { gap: var(--s3); }
  .nav-find { flex-basis: 150px; }
  .nav-find kbd { display: none; }
  .brand span { display: none; }
  .tabs a { padding: 0 var(--s2); letter-spacing: .08em; }
  .tabs a.is-active::after { left: var(--s2); right: var(--s2); }
}
/* the top bar holds brand, tabs and account in the page column: search waits as a round button and takes the tabs' place while typing */
@media (min-width: 1101px) {
  .nav-find { flex: none; width: 40px; height: 40px; padding: 0 0 0 10px; cursor: pointer; }
  .nav-find kbd { display: none; }
  .nav-find:focus-within { flex: 1 1 auto; width: auto; max-width: 560px; margin-right: auto; padding: 0 var(--s3); cursor: text; }
  .nav:has(.nav-find:focus-within) .tabs { display: none; }
}
@media (max-width: 960px) {
  .lesson-wrap { grid-template-columns: minmax(0, 1fr); }
  .lesson-list { position: static; }
  .feed-layout, .forum, .mod, .duo, .arcade, .mini, .champ-grid, .feature { grid-template-columns: minmax(0, 1fr); }
  .forum-side { position: static; }
  .forum-side > [data-new-thread] { display: none; }
  .forum-new { display: inline-flex !important; margin-bottom: var(--s4); }
  .forum-bar .filters { flex-wrap: nowrap; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
  .forum-bar .filters button { flex: none; }
  .section-find, .section-find-wide { flex-basis: 100%; max-width: none; }
  .chat-log { max-height: 260px; }
  .feed-side { position: static; order: -1; grid-template-columns: minmax(0, 1fr); }
  .feed-side ul, .feed-side p { display: none; }
  .mod { gap: var(--s5); }
  .mod-side { position: static; }
  .channel { grid-template-columns: auto minmax(0, 1fr); }
  .channel .btn-hex { grid-column: 1 / -1; justify-self: start; }
}
/* the signed-in top bar no longer fits one row below 1100px: tabs move to a scrolling second row */
@media (max-width: 1100px) {
  :root { --nav-h: 100px; }
  .nav { flex-wrap: wrap; align-content: space-between; gap: 0 var(--s4); padding-top: var(--s2); }
  .brand { margin-right: 0; }
  .brand span { display: none; }
  .nav-find { flex: 1 1 0; }
  .nav-account .btn-play { padding: 0 var(--s3); }
  .account-menu summary span { display: none; }
  .brand img { width: 32px; height: 32px; }
  .tabs { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); height: 40px; margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - var(--s3)); overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 0 var(--s3); }
}
@media (max-width: 820px) {
  .hero { min-height: min(88svh, 720px); padding-bottom: var(--s8); }
  .hero::before { background: linear-gradient(0deg, var(--ink) 10%, color-mix(in srgb, var(--ink) 84%, transparent) 50%, color-mix(in srgb, var(--ink) 20%, transparent) 100%); }
  .hero-bg { background-position: 68% 0; }
  .hero-cta > * { flex: 1 1 100%; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
  .page-head { padding-top: calc(var(--nav-h) + var(--s7)); }
  .page-head::before { inset: 0; opacity: .35; }
  .build { min-height: 0; }
  .lesson, .roll-out, .soon-grid { grid-template-columns: minmax(0, 1fr); }
  .soon-ideas { max-height: none; }
}
@media (max-width: 640px) {
  .post:has(.post-media) { grid-template-columns: minmax(0, 1fr); }
  .thread { grid-template-columns: auto minmax(0, 1fr); padding: var(--s3) var(--s4); }
  .thread-stats { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s3); text-align: left; }
  .reply.is-child { margin-left: var(--s5); }
  .op { padding: var(--s5) var(--s4); }
  .post-media { aspect-ratio: 16 / 9; min-height: 0; border-right: 0; border-bottom: 1px solid var(--gold-5); }
  .form, .view, .settings-card, .roll { padding: var(--s5) var(--s4); }
  .form-row, .comment-form, .quiz-opts { grid-template-columns: minmax(0, 1fr); }
  .quiz, .timing { padding: var(--s5) var(--s4); }
  .quiz-stage { height: 200px; aspect-ratio: auto; }
  .quiz-splash { width: auto; max-width: 100%; height: 100%; }
  .quiz-splash.is-strip { width: 100%; height: auto; }
  .quiz-kind { font-size: var(--fs-xs); letter-spacing: .08em; }
  .about { grid-template-columns: minmax(0, 1fr); }
  .about img { width: 96px; height: 96px; }
  .member-head { grid-template-columns: minmax(0, 1fr); padding: var(--s5); }
  .avatar-row { flex-direction: column; align-items: flex-start; }
  .event { grid-template-columns: 72px minmax(0, 1fr); }
  .event-date b { font-size: var(--fs-3xl); }
  .duo .videos { grid-template-columns: minmax(0, 1fr); }
  .meter i { width: 56px; }
  .ability-keys { gap: var(--s2); }
  .ability-keys button { width: 52px; height: 52px; }
  .score-form { flex-direction: column; }
  .score-form input { width: 100%; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* not inside the game: there the animation is the content (a fight with nothing moving, death rings that never fade) */
  *:not(.tactics):not(.tactics *), *:not(.tactics):not(.tactics *)::before, *:not(.tactics):not(.tactics *)::after { animation: none !important; transition: none !important; }
}

/* Rift Tactics test mode (?fast=1): no transitions or animations */
.tc-fast .tactics *, .tc-fast .tactics *::before, .tc-fast .tactics *::after { transition: none !important; animation: none !important; }
.lobby-col { display: flex; flex-direction: column; gap: var(--s2); width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; border-color: var(--gold-3); transition: border-color .15s, background-color .15s; }
.lobby-col:hover, .lobby-col:focus-visible { border-color: var(--gold-2); }
.lobby-col-head { display: flex; flex-direction: column; gap: 2px; }
.lobby-col-head b { font: 700 var(--fs-lg) var(--serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.lobby-col-head small { color: var(--text-2); }
.lobby-col-go { align-self: flex-end; font: 700 var(--fs-xs) var(--serif); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); }

/* ----- YAV: the site's coin ----- */
.yav-coin { flex: none; width: 1.1em; height: 1.1em; vertical-align: -.18em; fill: var(--gold-5); stroke: var(--gold-2); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.yav-coin path { fill: none; }
.yav { display: inline-flex; align-items: center; gap: var(--s1); color: var(--gold-2); white-space: nowrap; }
.yav b { color: var(--gold-1); }
.btn-buy { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); }
.menu-yav { display: flex !important; align-items: center; gap: var(--s2); color: var(--gold-2) !important; border-bottom: 1px solid var(--line); }
.menu-yav b { color: var(--gold-1); }
.note-coin { flex: none; display: grid; place-items: center; width: 28px; height: 28px; font-size: var(--fs-xl); }
.yav-wallet { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s3); }
.yav-card { padding: var(--s5); min-width: 0; }
.yav-card h3 { margin: var(--s4) 0 var(--s2); font: 700 var(--fs-base)/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-1); }
.yav-card h3:first-child { margin-top: 0; }
.yav-bal { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font: 700 var(--fs-4xl)/1.1 var(--serif); color: var(--gold-1); }
.yav-ways, .yav-log { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); color: var(--text-2); }
.yav-ways b { color: var(--gold-1); }
.yav-prizes { list-style: none; margin: var(--s3) 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: var(--s2); }
.yav-prizes li { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); background: var(--well); border: 1px solid var(--line); }
.yav-prizes span { color: var(--text-3); white-space: nowrap; }
.yav-prizes b { color: var(--gold-1); }
.yav-now { margin: 0; color: var(--text-2); }
.yav-log li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.yav-log span { min-width: 0; overflow-wrap: anywhere; }
.yav-log time { display: block; font-size: var(--fs-sm); color: var(--text-3); }
.yav-log b { color: var(--blue-2); white-space: nowrap; }
.yav-log b.is-out { color: var(--danger); }
.yav-toast { position: fixed; left: 50%; bottom: calc(var(--s5) + 72px); z-index: calc(var(--z-nav) + 10); transform: translateX(-50%); display: flex; align-items: center; gap: var(--s2); max-width: calc(100vw - 32px); padding: var(--s3) var(--s5); background: var(--panel); border: 1px solid var(--gold-3); color: var(--gold-1); font-weight: 700; transition: opacity .5s; }
.yav-toast.is-gone { opacity: 0; }

.nav-yav { display: inline-flex; align-items: center; gap: var(--s1); height: 36px; padding: 0 var(--s3); margin-right: var(--s2); border: 1px solid var(--gold-4); border-radius: 18px; color: var(--gold-2); font-weight: 700; white-space: nowrap; text-decoration: none; }
.nav-yav b { color: var(--gold-1); }
.nav-yav:hover { border-color: var(--gold-2); }
#account { display: flex; align-items: center; }
.nav-yav span { display: none; }
@media (max-width: 480px) { .nav-yav { padding: 0 var(--s2); margin-right: var(--s1); } .nav-yav span { display: none; } }

/* ----- Lounge chat on every page: a round button in the corner opens it ----- */
.lc-fab { position: fixed; right: var(--s5); bottom: var(--s5); z-index: var(--z-sticky); display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border-radius: 50%; color: var(--ink); background: var(--gold-2); border: 2px solid var(--gold-1); box-shadow: var(--shadow-1); cursor: pointer; transition: transform .15s, background .15s; }
.lc-fab:hover { background: var(--gold-1); }
.lc-fab:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.lc-fab.is-open { background: var(--gold-1); }
.lc-dot { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 var(--s1); border-radius: 11px; display: grid; place-items: center; font: 700 var(--fs-xs)/1 var(--sans); font-style: normal; color: var(--ink); background: var(--blue-2); border: 2px solid var(--ink); }
.lc-dot[hidden] { display: none; }
.lc-panel { position: fixed; right: var(--s5); bottom: calc(var(--s5) + 68px); z-index: var(--z-sticky); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: var(--s3); width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100dvh - var(--nav-h) - 120px)); padding: var(--s4); background: var(--panel); box-shadow: var(--shadow-3); }
.lc-panel[hidden] { display: none; }
.lc-head { display: flex; align-items: center; gap: var(--s3); }
.lc-head h2 { flex: 1; margin: 0; font: 700 var(--fs-base)/1.2 var(--serif); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-1); }
.lc-head h2 span { margin-left: var(--s2); font: 400 var(--fs-xs) var(--sans); letter-spacing: 0; text-transform: none; color: var(--blue-2); }
.lc-head h2 span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: var(--s1); border-radius: 50%; background: var(--blue-2); vertical-align: 1px; }
.lc-head .link { font-size: var(--fs-sm); }
.lc-tabs { flex: 1; display: flex; gap: var(--s1); }
.lc-tabs button { min-height: 36px; padding: 0 var(--s3); font: 700 var(--fs-sm) var(--serif); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); background: none; border: 1px solid transparent; cursor: pointer; }
.lc-tabs button[aria-selected="true"] { color: var(--gold-1); border-color: var(--gold-5); background: var(--well); }
.lc-tabs button:hover { color: var(--gold-1); }
.lc-tab-n, .dm-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: var(--s1); padding: 0 4px; font: 700 var(--fs-xs)/1 var(--sans); font-style: normal; letter-spacing: 0; color: var(--ink); background: var(--blue-2); border-radius: 9px; }
.lc-tab-n[hidden] { display: none; }
.dm-view { display: grid; min-height: 0; }
.dm-view[hidden], .dm-list[hidden], .dm-thread[hidden] { display: none; }
.dm-list { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-4) transparent; }
.dm-rows { display: grid; gap: var(--s1); }
.dm-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: var(--s3); width: 100%; padding: var(--s2); text-align: left; color: var(--text-2); background: none; border: 1px solid transparent; cursor: pointer; }
.dm-row:hover, .dm-row:focus-visible { border-color: var(--gold-5); background: var(--well); outline: none; }
.dm-row b { display: block; font-weight: 600; color: var(--gold-1); }
.dm-row small { display: block; overflow: hidden; font-size: var(--fs-sm); white-space: nowrap; text-overflow: ellipsis; color: var(--text-3); }
.dm-row.is-new small { color: var(--text); }
.dm-row time { font-size: var(--fs-xs); color: var(--text-3); }
.dm-thread { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: var(--s3); min-height: 0; }
.dm-top { display: flex; align-items: center; gap: var(--s3); font-size: var(--fs-sm); }
.dm-who { margin-left: auto; font-weight: 600; color: var(--gold-2); }
.dm-thread .dm-log { max-height: none; min-height: 0; }
.dm-msg:empty { display: none; }
.member-acts { margin-top: var(--s3); }
.lc-close { width: 36px; height: 36px; padding: 0; font-size: var(--fs-2xl); line-height: 1; color: var(--text-2); background: none; border: 1px solid var(--line); cursor: pointer; }
.lc-close:hover { color: var(--gold-1); border-color: var(--gold-4); }
.lc-panel .lc-log { max-height: none; min-height: 0; }
.lc-msg:empty { display: none; }
/* the music / sound button steps aside for it */
.sound { right: calc(var(--s5) + 68px); bottom: calc(var(--s5) + 6px); }
/* a Rift Tactics fight needs the whole screen */
body:has(.tactics[data-phase="fight"]) .lc-fab, body:has(.tactics[data-phase="fight"]) .lc-panel { display: none; }
@media (max-width: 480px) {
  .lc-fab { right: var(--s4); bottom: var(--s4); width: 52px; height: 52px; }
  .lc-panel { right: var(--s4); left: var(--s4); bottom: calc(var(--s4) + 62px); width: auto; height: min(520px, calc(100dvh - var(--nav-h) - 96px)); }
  .sound { right: calc(var(--s4) + 62px); bottom: calc(var(--s4) + 4px); }
  .lc-head h2 span { display: none; }
}
