/* Stormtyper by 10000wpm, for CTRL. Terminal art direction from SPEC.md. Every colour comes from the tokens below. */
:root {
  /* theme colours: js/app/theme.js swaps them through :root[data-theme] below */
  --bg-0: #010503; --bg-0-rgb: 1,5,3;
  --bg: #040806;   --bg-rgb: 4,8,6;
  --bg-1: #04110a;
  --bg-2: #07100b; --bg-2-rgb: 7,16,11;
  --bg-3: #0c1a12; --bg-3-rgb: 12,26,18;
  --bg-hi: #0b2216;
  --accent: #39ff88; --accent-rgb: 57,255,136;
  --accent-dim: #1f9e57; --accent-dim-rgb: 31,158,87;
  --accent-hi: #7dffb3;
  --ink-hi: #eafff2; --ink-hi-rgb: 234,255,242;
  --ink: #d7f5e3;  --ink-rgb: 215,245,227;
  --ink-2: #7fa892;
  --ink-3: #4c6e5b;          /* untyped letters */
  --line: rgba(var(--accent-rgb),.28);
  --line-2: rgba(var(--accent-rgb),.12);
  --green: var(--accent);    /* older name, kept for inline styles */
  --gold: #f2c230;
  --red: #ff4d5e;
  --cyan: #3ee6ff;
  --r: 2px;
  --cut: 10px;
  --glow: 0 0 14px rgba(var(--accent-rgb),.55);

  --f-head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --f-label: "Share Tech Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1400px;
  color-scheme: dark;
}

/* Themes. Matrix is the default above. Each keeps the terminal look: one accent colour on a
   near-black tinted toward it. Red stays out since red means danger and damage everywhere. */
:root[data-theme="ctrl"] {
  --bg-0: #030404; --bg-0-rgb: 3,4,4; --bg: #060707; --bg-rgb: 6,7,7; --bg-1: #090b0b;
  --bg-2: #0b0d0e; --bg-2-rgb: 11,13,14; --bg-3: #13171a; --bg-3-rgb: 19,23,26; --bg-hi: #141a12;
  --accent: #8cff58; --accent-rgb: 140,255,88; --accent-dim: #4f9a2e; --accent-dim-rgb: 79,154,46; --accent-hi: #b8ff96;
  --ink-hi: #f2f4f5; --ink-hi-rgb: 242,244,245; --ink: #e4e8ea; --ink-rgb: 228,232,234; --ink-2: #8e979c; --ink-3: #5f686d;
}
:root[data-theme="ctrl-cyan"] {
  /* the cyan of the CTRL merch (28 Nov 2026) on matte black */
  --bg-0: #050506; --bg-0-rgb: 5,5,6; --bg: #0a0b0d; --bg-rgb: 10,11,13; --bg-1: #0e0f12;
  --bg-2: #101215; --bg-2-rgb: 16,18,21; --bg-3: #171a1e; --bg-3-rgb: 23,26,30; --bg-hi: #10191b;
  --accent: #1ee0f0; --accent-rgb: 30,224,240; --accent-dim: #12808a; --accent-dim-rgb: 18,128,138; --accent-hi: #8ef3fa;
  --ink-hi: #ffffff; --ink-hi-rgb: 255,255,255; --ink: #e9edf0; --ink-rgb: 233,237,240; --ink-2: #8d969d; --ink-3: #5c646b;
  --glow: 0 0 10px rgba(var(--accent-rgb),.35);
}
:root[data-theme="ice"] {
  --bg-0: #010407; --bg-0-rgb: 1,4,7; --bg: #03070b; --bg-rgb: 3,7,11; --bg-1: #040c14;
  --bg-2: #060e15; --bg-2-rgb: 6,14,21; --bg-3: #0b1722; --bg-3-rgb: 11,23,34; --bg-hi: #0a1d2b;
  --accent: #5cc8ff; --accent-rgb: 92,200,255; --accent-dim: #2a7aa8; --accent-dim-rgb: 42,122,168; --accent-hi: #a6e1ff;
  --ink-hi: #eef8ff; --ink-hi-rgb: 238,248,255; --ink: #d8ecf7; --ink-rgb: 216,236,247; --ink-2: #7f9aab; --ink-3: #52697a;
}
:root[data-theme="amber"] {
  --bg-0: #060301; --bg-0-rgb: 6,3,1; --bg: #0a0602; --bg-rgb: 10,6,2; --bg-1: #100904;
  --bg-2: #120b04; --bg-2-rgb: 18,11,4; --bg-3: #1c1207; --bg-3-rgb: 28,18,7; --bg-hi: #221505;
  --accent: #ffb000; --accent-rgb: 255,176,0; --accent-dim: #a86f00; --accent-dim-rgb: 168,111,0; --accent-hi: #ffd066;
  --ink-hi: #fff4e0; --ink-hi-rgb: 255,244,224; --ink: #f7e6c8; --ink-rgb: 247,230,200; --ink-2: #a89272; --ink-3: #786545;
}
:root[data-theme="phosphor"] {
  --bg-0: #030303; --bg-0-rgb: 3,3,3; --bg: #050606; --bg-rgb: 5,6,6; --bg-1: #090a0a;
  --bg-2: #0b0c0d; --bg-2-rgb: 11,12,13; --bg-3: #141618; --bg-3-rgb: 20,22,24; --bg-hi: #17191b;
  --accent: #e8f0f2; --accent-rgb: 232,240,242; --accent-dim: #8a9296; --accent-dim-rgb: 138,146,150; --accent-hi: #ffffff;
  --ink-hi: #ffffff; --ink-hi-rgb: 255,255,255; --ink: #e8ecee; --ink-rgb: 232,236,238; --ink-2: #8f979b; --ink-3: #5f666a;
}

* { box-sizing: border-box; }
/* Case (Gid, 24 Nov 2026, to fit Art's CTRL cards): titles, labels, buttons and the nav in
   capitals, sentences as written. The text being typed always shows as written. */
h1, h2, h3, .ph, .label, button, .btn, th, .seg button { text-transform: uppercase; }
.typetext, .reel-lines, .keep-case { text-transform: none; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(1200px 600px at 70% -10%, var(--bg-hi) 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--f-head);
  -webkit-font-smoothing: antialiased;
}
/* faint scanlines over everything */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  opacity: .45;
}
/* the 3D room reads sharper without lines across it */
body.no-scan::after { display: none; }
#rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .16; }
.shell { position: relative; z-index: 1; }

a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.glow { text-shadow: var(--glow); }
.gold { color: var(--gold); }
.green { color: var(--accent); }
.red { color: var(--red); }
.cyan { color: var(--cyan); }
.dim { color: var(--ink-2); }
.sr-only, .sr-input {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
kbd {
  font: 400 13px/1 var(--f-label); color: var(--accent);
  border: 1px solid var(--line); border-radius: var(--r); padding: 2px 6px; background: var(--bg-3);
}

/* ---------- panels ---------- */
.panel {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, transparent calc(var(--cut) * .707 - .4px), var(--line) 0 calc(var(--cut) * .707 + .8px), transparent 0) top left / var(--cut) var(--cut) no-repeat border-box,
    linear-gradient(-45deg, transparent calc(var(--cut) * .707 - .4px), var(--line) 0 calc(var(--cut) * .707 + .8px), transparent 0) bottom right / var(--cut) var(--cut) no-repeat border-box,
    var(--bg-2);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: inset 0 0 22px rgba(var(--accent-rgb),.06);
  padding: 16px 18px;
}
/* bright brackets on the two square corners */
.panel::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) top right / 16px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 2px 16px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 2px 16px no-repeat;
  filter: drop-shadow(0 0 4px var(--accent));
  opacity: .8;
}
.panel.hot { border-color: rgba(var(--accent-rgb),.55); box-shadow: inset 0 0 28px rgba(var(--accent-rgb),.12); }
.panel.flat::after { display: none; }
.ph {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; justify-content: space-between;
  font: 400 15px/1 var(--f-label); letter-spacing: .06em;
  color: var(--accent); margin-bottom: 14px;
}
.ph .meta { color: var(--ink-2); font-size: 13px; }
.ph .bars { flex: 1; height: 6px; max-width: 80px; margin-left: auto; background: repeating-linear-gradient(90deg, var(--accent-dim) 0 3px, transparent 3px 6px); opacity: .6; }

/* ---------- buttons and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 400 15px/1 var(--f-label); letter-spacing: .06em; text-decoration: none;
  color: var(--bg); background: var(--accent); border: 1px solid var(--accent);
  padding: 11px 16px; cursor: pointer; border-radius: var(--r);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  transition: background-color 120ms ease, color 120ms ease;
}
.btn:hover { background: var(--accent-hi); }
.btn.out { color: var(--accent); background: rgba(var(--accent-rgb),.06); border-color: var(--line); }
.btn.out:hover { background: rgba(var(--accent-rgb),.14); border-color: var(--accent); }
.btn.danger { color: var(--red); background: rgba(255,77,94,.06); border-color: rgba(255,77,94,.45); }
.btn.danger:hover { background: rgba(255,77,94,.16); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 7px 10px; font-size: 13px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button {
  font: 400 14px/1 var(--f-label); letter-spacing: .05em;
  color: var(--ink-2); background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 8px 12px; cursor: pointer; min-width: 52px;
}
.seg button:hover { color: var(--ink); border-color: var(--line); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] {
  color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.1);
  box-shadow: 0 0 10px rgba(var(--accent-rgb),.35), inset 0 0 8px rgba(var(--accent-rgb),.15);
}
.field {
  font: 400 15px/1.2 var(--f-label); color: var(--ink); background: var(--bg-3);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 9px 12px; min-width: 0;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb),.3); }
select.field { cursor: pointer; }
.label { font: 400 13px/1.2 var(--f-label); letter-spacing: .08em; color: var(--ink-2); }

/* ---------- top bar ----------
   Logo, four pages, the streak, coins and Menu. Every page is in the Menu panel (#nav). On a fight
   page (html.top-fight, set in js/app/shell.js) it's a 44 px strip with the page name, coins, sound
   and Menu. Elsewhere it slides up while you scroll down (html.top-away). --top-h is its height. */
:root { --top-h: 56px; }
html.top-fight { --top-h: 44px; }
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(var(--bg-rgb),.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-2);
  transition: transform .22s ease;
}
html.top-away .top { transform: translateY(-100%); }
.top.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .top { transition: none; } }
.top-in { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 28px; height: var(--top-h); padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo b { display: block; font: 700 20px/1 var(--f-head); letter-spacing: .01em; color: var(--ink); }
.logo small { display: block; font: 400 10px/1 var(--f-label); letter-spacing: .1em; color: var(--ink-2); margin-top: 4px; }
.logo-cur { font-style: normal; color: var(--accent); margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .logo-cur { animation: none; } }

/* what the game offers, in the order a first-time visitor should see it (Art, 1 Dec 2026) */
.quick { display: flex; gap: 2px; margin-right: auto; }
.quick a {
  position: relative; text-decoration: none; white-space: nowrap;
  font: 400 14px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  padding: 0 12px; height: var(--top-h); display: inline-flex; align-items: center;
}
.quick a:hover { color: var(--ink); }
.quick a[aria-current="page"] { color: var(--accent); }
.quick a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.quick a:focus-visible, .menu-btn:focus-visible, .coins:focus-visible { outline: 1px solid var(--accent); outline-offset: -4px; }
.top-where { display: none; }

.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.coins {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none; height: 36px;
  font: 600 15px/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--gold);
  padding: 0 10px; border: 1px solid rgba(242,194,48,.3); border-radius: var(--r); background: rgba(242,194,48,.05);
}
.coins svg { width: 17px; height: 17px; flex: none; }
.coins.bump { animation: bump 400ms ease; }
@keyframes bump { 40% { transform: scale(1.12); box-shadow: 0 0 14px rgba(242,194,48,.6); } }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; cursor: pointer;
  color: var(--ink-2); background: none; border: 1px solid var(--line-2); border-radius: var(--r);
}
.icon-btn:hover { color: var(--accent); border-color: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[aria-pressed="false"] .on, .icon-btn[aria-pressed="true"] .off { display: none; }
.top-sound { display: none; }
/* Menu: your operator's picture and the menu lines, one button */
.menu-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 3px; cursor: pointer;
  font: 400 13px/1 var(--f-label); letter-spacing: .1em; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--accent); }
.menu-btn img { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--bg); }
.menu-btn svg { width: 18px; height: 18px; color: var(--accent); }

/* fight pages: the slim strip. It scrolls away with the page instead of sticking, so it can never
   sit over the word line, the HP bars or a timer, and the Breach and race view take the full height. */
html.top-fight .top { position: relative; background: rgba(var(--bg-0-rgb),.96); }
html.top-fight .top-in { gap: 14px; }
html.top-fight .logo .logo-mark { height: 26px; }
html.top-fight .logo-txt, html.top-fight .quick, html.top-fight #nav-streak, html.top-fight .menu-btn img { display: none; }
html.top-fight .top-where {
  display: block; margin-right: auto; padding-left: 14px; border-left: 1px solid var(--line-2);
  font: 400 13px/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
html.top-fight .top-sound { display: inline-grid; width: 32px; height: 32px; }
html.top-fight .coins { height: 32px; font-size: 14px; }
html.top-fight .menu-btn { height: 32px; padding: 0 10px; }

/* ---------- the Menu panel ---------- */
.top-menu {
  position: fixed; inset: calc(var(--top-h) + 6px) max(20px, calc((100vw - 1600px) / 2 + 20px)) auto auto; margin: 0;
  width: min(640px, calc(100vw - 24px)); max-height: calc(100svh - var(--top-h) - 18px); overflow: auto; overscroll-behavior: contain;
  padding: 0; color: var(--ink);
}
.top-menu::backdrop { background: rgba(var(--bg-0-rgb),.45); }
.mn-me {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line-2);
}
.mn-me img { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--bg); flex: none; }
.mn-me b { display: block; font: 600 16px/1.2 var(--f-head); }
.mn-me small { display: block; margin-top: 3px; font: 400 12px/1 var(--f-label); letter-spacing: .06em; color: var(--ink-2); }
.mn-me:hover b, .mn-me[aria-current="page"] b { color: var(--accent); }
.mn-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 8px; padding: 10px 10px 12px; }
.mn-h { margin: 6px 8px 4px; font: 400 11px/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mn-g a {
  position: relative; display: flex; align-items: center; min-height: 38px; padding: 0 8px; text-decoration: none;
  font: 500 15px/1.1 var(--f-head); letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
}
.mn-g a:hover, .mn-g a:focus-visible { color: var(--accent); background: rgba(var(--accent-rgb),.06); outline: none; }
.mn-g a[aria-current="page"] { color: var(--accent); }
.mn-g a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; background: var(--accent); }
.mn-foot { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line-2); }
.mn-sound {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 6px; cursor: pointer;
  font: 400 13px/1 var(--f-label); letter-spacing: .08em; color: var(--ink-2); background: none; border: 1px solid var(--line-2); border-radius: var(--r);
}
.mn-sound svg { width: 18px; height: 18px; }
.mn-sound b { font-weight: 400; color: var(--accent); }
.mn-sound[aria-pressed="false"] b { color: var(--ink-3); }
.mn-sound[aria-pressed="false"] .on, .mn-sound[aria-pressed="true"] .off { display: none; }
.mn-sound:hover { color: var(--ink); border-color: var(--line); }
.mn-settings { font: 400 13px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; padding: 10px 4px; }
.mn-settings:hover, .mn-settings[aria-current="page"] { color: var(--accent); }

@media (max-width: 1360px) {
  .quick a { padding: 0 9px; letter-spacing: .05em; }
}
@media (max-width: 1240px) {
  .top-in { gap: 16px; }
  .logo small { display: none; }
  .quick a { padding: 0 7px; letter-spacing: .03em; font-size: 13px; }
}
@media (max-width: 1060px) {
  .quick a.q-low { display: none; }
}
@media (max-width: 900px) {
  .quick { display: none; }
  .top-right { margin-left: auto; }
  .menu-btn span { display: none; }
  .menu-btn { padding-right: 8px; }
}
@media (max-width: 560px) {
  :root { --top-h: 52px; }
  html.top-fight { --top-h: 44px; }
  .top-in { gap: 8px; padding: 0 10px; }
  .logo b { font-size: 17px; }
  .top-right { gap: 6px; }
  .coins { padding: 0 8px; font-size: 14px; }
  .menu-btn img { display: none; }
  .menu-btn { width: 40px; justify-content: center; padding: 0; }
  .menu-btn svg { width: 20px; height: 20px; }
  html.top-fight .menu-btn { width: 36px; }
  .top-menu { inset: var(--top-h) 0 auto 0; width: 100%; max-height: calc(100svh - var(--top-h)); border-left: 0; border-right: 0; }
  .mn-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
  .mn-g a { min-height: 44px; font-size: 16px; }
}
@media (max-width: 370px) {
  .logo-txt { display: none; }
}

/* ---------- page frame ---------- */
main { min-height: calc(100vh - 140px); }
.page { max-width: var(--wrap); margin: 0 auto; padding: 22px 20px 48px; }
.page-loading, .loading-state {
  display: flex; align-items: center; justify-content: center; min-height: 240px;
  font: 400 15px/1 var(--f-label); letter-spacing: .1em; color: var(--ink-2);
}
.loading-state::after { content: "_"; animation: blink 1s steps(1) infinite; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .loading-state::after { animation: none; } }
.title-block h1 {
  font: 700 clamp(30px, 4vw, 52px)/1 var(--f-head); letter-spacing: .03em; color: var(--accent);
  text-shadow: var(--glow);
}
.title-block h1 .pre { color: var(--accent); margin-right: .25em; }
.title-block p { margin-top: 8px; font: 400 15px/1.3 var(--f-label); letter-spacing: .08em; color: var(--ink-2); }
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.big {
  font: 600 clamp(36px, 4.4vw, 58px)/1 var(--f-mono); font-variant-numeric: tabular-nums;
  color: var(--accent); text-shadow: var(--glow);
}
.mid { font: 600 28px/1.05 var(--f-mono); font-variant-numeric: tabular-nums; }
.mid small { font: 400 14px/1 var(--f-label); letter-spacing: .06em; color: var(--ink-2); }
.stat { display: grid; gap: 6px; align-content: start; }
.empty { color: var(--ink-2); font: 400 15px/1.4 var(--f-label); padding: 18px 4px; }
.foot {
  position: relative; z-index: 1; border-top: 1px solid var(--line-2);
  font: 400 13px/1.4 var(--f-label); color: var(--ink-2);
}
.foot-in { max-width: 1600px; margin: 0 auto; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.foot a { color: var(--accent); text-decoration: none; }

/* ---------- typing text ---------- */
.typetext {
  position: relative;
  font-family: var(--f-mono);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.6;
  color: var(--ink-3);
  letter-spacing: .02em;
  word-break: keep-all;
}
.typetext .c { position: relative; }
/* letters pop and shake (js/app/motion.js), which needs them as boxes; each word stays on one line */
.typetext.pops .w { white-space: nowrap; }
.typetext.pops .c { display: inline-block; white-space: pre; line-height: normal; }
.typetext .ok, .typetext .demo { color: var(--accent); text-shadow: 0 0 10px rgba(var(--accent-rgb),.35); }
.typetext .bad { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.typetext .bad.sp { background: rgba(255,77,94,.3); }
.caret, .ghost { position: absolute; width: 3px; pointer-events: none; transition: left 70ms linear, top 70ms linear; }
.caret { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.ghost { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); opacity: .9; }
.ghost::after {
  content: attr(data-name); position: absolute; left: 6px; top: -1.2em;
  font: 400 13px/1 var(--f-label); color: var(--cyan); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) { .caret, .ghost { transition: none; } }
.typebox { position: relative; outline: none; cursor: text; }
.typebox:not(.focused) .caret { opacity: .35; }
@media (prefers-reduced-motion: no-preference) {
  .typebox.focused.idle .caret { animation: blink 1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
.focus-note {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 400 15px/1.4 var(--f-label); letter-spacing: .08em; color: var(--accent); z-index: 3;
  background: rgba(var(--bg-rgb),.9); opacity: 0; transition: opacity 150ms; text-align: center; padding: 8px;
}
.typebox:not(.focused) .focus-note { opacity: 1; }

/* ---------- home ----------
   The calm layout from the world boss page, scoped to .page-home so the other pages keep
   the panel look:
   - one centred column, the race is the one big thing and nothing has a box around it
   - groups are made with space and a faint tint, never with borders or corner brackets
   - labels are sentence case in Chakra Petch; JetBrains Mono is kept for numbers and typed words
   - one type scale (12, 14, 16, 20, 28 and the race text), tabular numbers everywhere
   - green is you, cyan is Art, gold stays for coins
   - the falling code is very faint here and never shows behind the race */
.page-home {
  --home-w: 1120px;
  --t-xs: 12px; --t-s: 14px; --t-m: 16px; --t-l: 20px; --t-xl: 28px;
  --t-hero: clamp(24px, calc(1.2vw + 12px), 34px);
  --tint: rgba(var(--accent-rgb),.05);
  --tint-2: rgba(var(--accent-rgb),.1);
  --solid: #050b08;
  --ease-out: cubic-bezier(.23,1,.32,1);
  max-width: none; padding: 36px 20px 40px;
}
body:has(.page-home) #rain { opacity: .05; }
/* fights: keep the falling code out from behind the words you type */
body:has(.page-duel) #rain, body:has(.page-party) #rain { opacity: .035; }
.page-home .home { max-width: var(--home-w); margin: 0 auto; }
.page-home b { font-variant-numeric: tabular-nums; }
.page-home p a { color: var(--ink); text-decoration-color: rgba(var(--ink-rgb),.35); text-underline-offset: 3px; }
.page-home p a:hover { color: var(--accent); text-decoration-color: currentColor; }
.page-home kbd { font: 400 var(--t-xs)/1 var(--f-mono); color: var(--ink-2); background: rgba(255,255,255,.06); border: 0; padding: 3px 5px; }

/* the welcome to a new operator: a solid panel so the falling code stops behind it */
.page-home .home-welcome { max-width: 760px; margin-inline: auto; padding: 30px 36px 32px; background: linear-gradient(var(--tint), var(--tint)), var(--solid); border-left: 2px solid var(--accent); }
.page-home .home-welcome .hw-kicker { margin: 0 0 14px; font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .14em; color: var(--accent); }
.page-home .home-welcome h2 { font: 600 var(--t-l)/1.2 var(--f-head); color: var(--ink); letter-spacing: .01em; margin: 0 0 14px; }
.page-home .home-welcome p { max-width: 62ch; margin: 0 0 12px; font: 400 var(--t-m)/1.55 var(--f-head); color: var(--ink-2); }
.page-home .home-welcome .hw-need { margin: 18px 0 20px; color: var(--ink); font-weight: 600; }
.page-home .home-welcome .hw-join { font-family: var(--f-mono); letter-spacing: .08em; }
@media (max-width: 640px) { .page-home .home-welcome { padding: 22px 20px 24px; } }

/* you against Art, then the hint */
.page-home .hr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 32px; margin-top: 16px; padding: 0 2px; }
.page-home .hr-pace { display: flex; align-items: flex-end; gap: 40px; }
.page-home .score { display: grid; gap: 6px; min-width: 5.5ch; }
.page-home .score b { font: 600 var(--t-xl)/1 var(--f-mono); }
.page-home .score span { font: 500 var(--t-s)/1 var(--f-head); color: var(--ink-2); white-space: nowrap; }
.page-home .score.you b { color: var(--accent); }
.page-home .score.art b { color: var(--cyan); }
.page-home .hint { margin-left: auto; max-width: 56ch; font: 400 var(--t-s)/1.45 var(--f-head); color: var(--ink-2); text-align: right; }

/* Art's numbers, who he is and the rest of the site, small and dim under the race */
.page-home .home-art { margin-top: 44px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.page-home .ha-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 32px; font: 400 var(--t-s)/1.3 var(--f-head); color: var(--ink-2); }
.page-home .ha-stats b { font: 600 var(--t-m)/1 var(--f-mono); color: var(--ink); margin-right: 6px; }
.page-home .ha-bio, .page-home .ha-more { max-width: 100%; text-wrap: balance; font: 400 var(--t-s)/1.5 var(--f-head); color: var(--ink-2); }
.page-home .ha-more { margin-top: 2px; }

/* sections down the page */
.page-home .sec { margin-top: 88px; }
.page-home .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 18px; }
.page-home .sec-head h2 { font: 600 var(--t-xl)/1.15 var(--f-head); color: var(--ink); letter-spacing: .01em; }
.page-home .sec-head p { font: 400 var(--t-s)/1.4 var(--f-head); color: var(--ink-2); max-width: 60ch; }
.page-home .btn { font: 600 var(--t-m)/1 var(--f-head); letter-spacing: .01em; clip-path: none; padding: 12px 18px; transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.page-home .btn.out { color: var(--ink); background: var(--tint); border-color: transparent; }
.page-home .btn.out:hover { background: var(--tint-2); }
.page-home .btn:active { transform: scale(.97); }

/* the 3D keyboards and their specs */
.page-home .kb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.page-home .kb-stage { position: relative; min-height: 500px; overflow: hidden; touch-action: pan-y; background: var(--bg-0); }
.page-home .kb-stage canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.page-home .kb-loading { position: absolute; inset: 0; display: grid; place-items: center; font: 400 var(--t-s)/1 var(--f-head); color: var(--ink-2); }
.page-home .kb-picker { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.page-home .kb-picker button {
  flex: none; cursor: pointer; font: 500 var(--t-s)/1 var(--f-head); color: var(--ink-2);
  background: rgba(var(--bg-0-rgb),.8); border: 0; border-radius: var(--r); padding: 9px 12px;
  transition: background-color 150ms ease, color 150ms ease;
}
.page-home .kb-picker button:hover { color: var(--ink); background: rgba(var(--bg-3-rgb),.9); }
.page-home .kb-picker button[aria-selected="true"] { color: var(--bg); background: var(--ink); }
.page-home .kb-typed { position: absolute; left: 16px; top: 14px; max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; font: 400 var(--t-m)/1.2 var(--f-mono); color: var(--accent); }
.page-home .spec { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.page-home .spec .ph { display: none; }
.page-home .spec .tag { font: 500 var(--t-xs)/1 var(--f-head); letter-spacing: .02em; color: var(--ink-2); }
.page-home .spec h3 { font: 600 var(--t-l)/1.2 var(--f-head); color: var(--ink); }
.page-home .spec h3 small { display: block; margin-top: 4px; font: 400 var(--t-s)/1.2 var(--f-head); color: var(--ink-2); }
.page-home .spec .standout { font: 400 var(--t-s)/1.5 var(--f-head); color: var(--ink-2); }
.page-home .spec dl { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font: 400 var(--t-s)/1.35 var(--f-head); }
.page-home .spec dt { color: var(--ink-2); }
.page-home .spec dd { margin: 0; color: var(--ink); }
.page-home .spec .price { font: 600 var(--t-l)/1 var(--f-mono); color: var(--ink); }
.page-home .spec .links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }

/* videos: one quiet list, the whole row is the link */
.page-home .vids { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 40px; }
.page-home .vid {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 2px 16px;
  padding: 12px 12px; text-decoration: none; border-radius: var(--r); transition: background-color 150ms ease;
}
.page-home .vid:hover { background: var(--tint); }
.page-home .vid:hover b { color: var(--accent); }
.page-home .vid .kind { grid-row: span 2; font: 500 var(--t-xs)/1.4 var(--f-head); color: var(--ink-2); }
.page-home .vid b { font: 600 var(--t-m)/1.3 var(--f-head); color: var(--ink); }
.page-home .vid .what { grid-column: 2; font: 400 var(--t-s)/1.4 var(--f-head); color: var(--ink-2); }

/* for brands */
.page-home .brands { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; }
.page-home .br-how > p { max-width: 62ch; color: var(--ink); }
.page-home .brands ol { margin: 16px 0 22px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.page-home .brands ol li::marker { color: var(--ink-3); font-family: var(--f-mono); }
.page-home .br-list h3 { margin-bottom: 12px; font: 500 var(--t-s)/1.2 var(--f-head); color: var(--ink-2); }
.page-home .board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.page-home .board-list li { font: 400 var(--t-s)/1 var(--f-head); color: var(--ink); background: var(--tint); padding: 9px 11px; border-radius: var(--r); }
.page-home .since { margin-top: 72px; text-align: center; font: 400 var(--t-s)/1.4 var(--f-head); color: var(--ink-2); }
.page-home .since b { font: 600 var(--t-s)/1 var(--f-mono); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .page-home .btn, .page-home .kb-picker button, .page-home .vid { transition: none; }
  .page-home .btn:active { transform: none; }
}
@media (max-width: 1000px) {
  .page-home .kb-layout, .page-home .brands { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .page-home .kb-stage { min-height: 400px; }
  .page-home .vids { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page.page-home { padding: 20px 14px 32px; }
  .page-home { --t-hero: 21px; }
  .page-home .hr-bar { gap: 10px 24px; }
  .page-home .hr-pace { gap: 32px; }
  .page-home .hint { margin-left: 0; text-align: left; }
  .page-home .home-art { margin-top: 32px; }
  .page-home .ha-stats { gap: 6px 20px; }
  .page-home .sec { margin-top: 64px; }
  .page-home .sec-head h2 { font-size: var(--t-l); }
  .page-home .kb-stage { min-height: 320px; }
  .page-home .vid { grid-template-columns: minmax(0, 1fr); padding: 10px 4px; }
  .page-home .vid .kind { grid-row: auto; }
  .page-home .vid .what { grid-column: 1; }
  .page-home .brands { gap: 32px; }
}

/* ---------- type page ---------- */
.type-top { display: block; }
/* the settings sit in one bar above the test, the way Monkeytype does it */
.type-opts { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; padding: 12px 18px; }
.type-opts .row { display: flex; align-items: center; gap: 10px; }
.type-opts .row[hidden] { display: none; }
.type-stats { display: block; margin-top: 16px; }
.statrow { display: grid; grid-template-columns: 1.2fr repeat(4, 1fr); align-items: center; }
.statrow > div { padding: 2px 18px; border-left: 1px solid var(--line-2); display: grid; gap: 6px; }
.statrow > div:first-child { border: 0; padding-left: 4px; }
/* the live WPM and its needle (js/app/motion.js turns the needle) */
.wpm-read { display: flex; align-items: flex-end; gap: 12px; }
.wpm-gauge { width: 58px; height: 35px; flex: none; overflow: visible; }
.wpm-gauge path { fill: none; stroke-linecap: round; }
.wpm-gauge .g-arc { stroke: var(--line-2); stroke-width: 3; }
.wpm-gauge .g-art { stroke: var(--red); stroke-width: 3; }
.wpm-gauge .g-needle { stroke: var(--accent); stroke-width: 2.5; transform-box: view-box; transform-origin: 32px 34px; transform: rotate(-90deg); filter: drop-shadow(0 0 3px rgba(var(--accent-rgb),.6)); }
.wpm-gauge .g-hub { fill: var(--accent); }
.statrow .mid { font-size: clamp(22px, 2.4vw, 34px); white-space: nowrap; }
.statrow .mid.time { font-size: clamp(20px, 2vw, 30px); }
.type-text { position: relative; margin-top: 16px; padding: 22px 26px 22px; }
/* how far through the test: a thin line along the top of the text */
.type-prog { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(var(--accent-rgb),.08); }
.type-prog i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb),.6); }
.type-run { position: absolute; right: 18px; top: 8px; font: 400 12px/1 var(--f-label); letter-spacing: .08em; color: var(--ink-2); }
.type-window { position: relative; height: calc(4 * 1.6em); overflow: hidden; font-size: clamp(20px, 2vw, 28px); }
.type-window .typetext { font-size: inherit; transition: transform 140ms ease; }
@media (prefers-reduced-motion: reduce) { .type-window .typetext { transition: none; } }
.type-help { margin-top: 12px; font: 400 14px/1.4 var(--f-label); color: var(--ink-2); }
.custom-box { display: grid; gap: 10px; }
.custom-box textarea { min-height: 7.5em; resize: vertical; font: 400 16px/1.5 var(--f-mono); width: 100%; }
.result { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 36px; align-items: center; padding: 6px 0; }
.result .big { font-size: clamp(56px, 7vw, 92px); }
.result .unit { font: 400 16px/1 var(--f-label); color: var(--ink-2); letter-spacing: .1em; margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 20px; }
.result-note { grid-column: 1 / -1; font: 400 15px/1.5 var(--f-label); color: var(--ink); }
.result-note .new { color: var(--gold); }
.type-bottom { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 16px; }
.chart-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 14px; }
.chart { width: 100%; height: 170px; display: block; }
.side-nums { display: grid; gap: 10px; align-content: start; }
.side-nums > div { border: 1px solid var(--line-2); padding: 10px 12px; display: grid; gap: 4px; background: var(--bg-3); }
.side-nums .mid { color: var(--accent); font-size: 26px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; font: 400 14px/1.2 var(--f-label); }
.kv dt { color: var(--ink-2); letter-spacing: .05em; }
.kv dd { margin: 0; color: var(--ink); font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; }
.kv dd.green { color: var(--accent); }
.kv dd.cyan { color: var(--cyan); }
.kv dd.red { color: var(--red); }

/* ---------- play ---------- */
.play-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; margin-bottom: 16px; }
/* the play hub: every mode in one row of name tiles. Each game explains itself in its own bar.
   Narrow screens swipe the row sideways instead of stacking it above the game. */
.game-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 16px; }
.game-tab { display: grid; align-content: start; gap: 6px; padding: 12px 14px; text-decoration: none; cursor: pointer; }
.game-tab h3 { font: 700 20px/1.05 var(--f-head); letter-spacing: .04em; }
@media (max-width: 1000px) {
  .game-tabs { grid-auto-columns: max-content; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: -4px; padding: 0 4px 2px; }
  .game-tabs::-webkit-scrollbar { display: none; }
  .game-tab { scroll-snap-align: start; }
  .game-tab h3 { font-size: 18px; }
}
.game-tab[aria-current="page"] { border-color: var(--accent); box-shadow: inset 0 0 30px rgba(var(--accent-rgb),.14); }
.game-tab[aria-current="page"] h3 { color: var(--accent); text-shadow: var(--glow); }
.game-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.game-bar p { color: var(--ink-2); font: 400 15px/1.4 var(--f-label); }
/* Breach sets the box height itself so the 16:9 game fits below the header. */
.breach-box { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 200px; background: #000; overflow: hidden; outline: none; }
.breach-box > * { max-width: 100%; }
.breach-box:fullscreen { width: 100vw; height: 100vh; align-items: center; }
.race-panel { outline: none; }
.race-panel.focused { border-color: var(--accent); }
/* the road shrinks to leave the words on screen without scrolling (Gid, 28 Nov 2026): about 500 px of
   the window go to the header, the game tabs, the opponent row and the typing box */
.race-stage { position: relative; width: min(100%, max(420px, calc((100svh - 500px) * 2.4))); margin: 0 auto 16px; }
.race-canvas { display: block; width: 100%; aspect-ratio: 960 / 400; background: #000; border: 1px solid var(--line-2); }
.race-text .typetext { font-size: clamp(20px, 2vw, 28px); }
.race-note { color: var(--ink-2); font: 400 15px/1.4 var(--f-label); }
.race-note b { color: var(--accent); font-weight: 400; }
.race-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 14px; }

/* ---------- leaderboard ---------- */
.lb-head { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.lb-head .title-block { display: grid; align-content: center; gap: 10px; }
.lb-head .title-block .lead { font-size: 15px; color: var(--ink-2); margin: 0; letter-spacing: 0; font-family: var(--f-head); }
.status-list { display: grid; gap: 8px; font: 400 14px/1.3 var(--f-label); }
.status-list div { display: flex; gap: 8px; align-items: center; }
.status-list i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); flex: none; }
.status-list i.off { background: var(--ink-3); box-shadow: none; }
.status-list span { flex: 1; color: var(--ink-2); }
.status-list b { font-weight: 400; color: var(--ink); }
.lb { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; }
.lb > * { min-width: 0; }
.lb-side { display: grid; gap: 16px; align-content: start; }
.lb-side .stat { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.lb-side .stat:last-child { border: 0; }
.lb-side .mid { color: var(--accent); text-shadow: var(--glow); }
.lb-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
table.board { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 15px; }
.board th { font: 400 13px/1 var(--f-label); letter-spacing: .08em; color: var(--ink-2); text-align: left; padding: 6px 12px; }
.board td { padding: 10px 12px; background: var(--bg-3); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.board td:first-child { border-left: 1px solid var(--line-2); }
.board td:last-child { border-right: 1px solid var(--line-2); }
.board .rank { font: 600 20px/1 var(--f-mono); width: 64px; text-align: center; }
.board .rank.top { color: var(--gold); text-shadow: 0 0 10px rgba(242,194,48,.5); }
.board .who { display: flex; align-items: center; gap: 10px; }
.board .who img { width: 34px; height: 34px; border: 1px solid var(--line); flex: none; }
.board .who .tag { font: 400 12px/1 var(--f-label); color: var(--cyan); border: 1px solid rgba(62,230,255,.35); padding: 3px 5px; }
.board .w { font: 600 22px/1 var(--f-mono); color: var(--accent); font-variant-numeric: tabular-nums; }
.board td.n { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.board tr.art td { border-color: rgba(62,230,255,.35); }
/* the podium over the board (js/app/leaderboard.js): the top three on lit steps, names and scores under them;
   the rows it stands for leave the table while it shows */
.lb-pod { max-width: 640px; margin: 2px auto 8px; }
.lb-pod-st { position: relative; height: 300px; }
.lb-pod-st > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lb-pod-rk { position: absolute; transform: translate(-50%, -50%); font: 600 22px/1 var(--f-mono); color: var(--gold); text-shadow: 0 0 10px rgba(242,194,48,.5); pointer-events: none; }
.lb-pod-labs { position: relative; height: 50px; border-top: 1px solid var(--line-2); }
.lb-pod-lab { position: absolute; top: 9px; width: 112px; transform: translateX(-50%); display: grid; gap: 5px; text-align: center; }
.lb-pod-lab b, .lb-pod-lab a { display: block; min-width: 0; font: 600 15px/1.1 var(--f-head); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-pod-lab a:hover b { color: var(--accent); }
.lb-pod-lab span { font: 400 11px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.lb-pod-lab i { font: 600 16px/1 var(--f-mono); font-style: normal; letter-spacing: 0; color: var(--accent); }
.lb-pod-on table.board tbody tr:nth-child(-n+3) { display: none; }
.lb-pod-on table.board:not(:has(tbody tr:nth-child(4))) { display: none; }
@media (max-width: 640px) { .lb-pod-st { height: 210px; } .lb-pod-lab { width: 84px; } .lb-pod-lab b { font-size: 13px; } .lb-pod-rk { font-size: 17px; } }
.board tr.art .w { color: var(--cyan); text-shadow: 0 0 10px rgba(62,230,255,.45); }
.board tr.mine-best td { border-color: var(--accent); background: rgba(var(--accent-rgb),.07); }
.board .num-col { text-align: right; }
.board-wrap { overflow-x: auto; }

/* ---------- shop ---------- */
.shop-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 26px 26px; min-height: 150px;
  background:
    linear-gradient(90deg, var(--bg-2) 30%, rgba(var(--bg-2-rgb),.6)),
    repeating-linear-gradient(90deg, rgba(var(--accent-rgb),.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(var(--accent-rgb),.05) 0 1px, transparent 1px 34px),
    var(--bg-2);
}
.coin-box { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.coin-box svg { width: 40px; height: 40px; }
.coin-box b { font: 600 34px/1 var(--f-mono); color: var(--gold); text-shadow: 0 0 12px rgba(242,194,48,.45); font-variant-numeric: tabular-nums; }
/* the CTRL Pass and coin packs (js/app/shop.js storeHtml) */
.store { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; margin-top: 16px; align-items: stretch; }
.store-pass { padding: 18px 20px; display: grid; gap: 10px; align-content: start; box-shadow: inset 0 0 0 1px rgba(255,210,61,.35); }
.store-pass h2 { margin: 0; font: 700 var(--t-l, 20px)/1.1 var(--f-head); letter-spacing: .04em; color: var(--gold); text-transform: uppercase; }
.store-pass p { margin: 0; color: var(--ink); text-wrap: pretty; }
.store-pass .row, .store-pack { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.store-price { font: 600 18px/1 var(--f-mono); color: var(--ink-hi); }
.store-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.store-pack { flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 14px; }
.store-pack b { display: inline-flex; align-items: center; gap: 6px; font: 600 20px/1 var(--f-mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.store-pack span { font: 400 14px/1 var(--f-mono); color: var(--ink-2); }
.store-pack b > :first-child { width: 22px; height: 22px; flex: none; }
.store .btn[disabled] { opacity: .55; cursor: not-allowed; }
.store-note { grid-column: 1 / -1; margin: 0; font: 400 13px/1.3 var(--f-mono); color: var(--ink-2); }
.item.premium { box-shadow: inset 0 0 0 1px rgba(255,210,61,.5); }
.item .prem { display: inline-block; margin-bottom: 6px; padding: 2px 6px; font: 600 11px/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--bg); background: var(--gold); }
@media (max-width: 760px) { .store { grid-template-columns: 1fr; } .store-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shop { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.cats { display: grid; gap: 4px; align-content: start; }
.cats button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer;
  font: 400 15px/1 var(--f-label); color: var(--ink); background: none; border: 1px solid transparent; border-radius: var(--r); padding: 11px 12px;
}
.cats button:hover { border-color: var(--line-2); }
.cats button span { color: var(--ink-2); font-size: 13px; }
.cats button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.08); box-shadow: 0 0 10px rgba(var(--accent-rgb),.25); }
.shop-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.shop-bar .grow { flex: 1; }
.shop-bar input[type=search] { width: 240px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.item { display: grid; grid-template-rows: auto 1fr; padding: 0; }
.item .thumb { aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 70%, var(--bg-hi), var(--bg)); border-bottom: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .thumb .ph-text { font: 400 13px/1 var(--f-label); color: var(--ink-3); }
.item .body { display: grid; gap: 8px; padding: 10px 12px 12px; align-content: space-between; }
.item h3 { font: 600 16px/1.2 var(--f-head); }
.item .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { display: inline-flex; align-items: center; gap: 6px; font: 600 16px/1 var(--f-mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.price svg { width: 16px; height: 16px; }
.item .owned { font: 400 13px/1 var(--f-label); color: var(--accent); letter-spacing: .08em; }
.item .msg { font: 400 13px/1.3 var(--f-label); color: var(--red); min-height: 0; }
.item.is-owned { border-color: rgba(var(--accent-rgb),.5); }

/* ---------- room ---------- */
.page.page-full { max-width: 1640px; }
.room-host { position: relative; height: calc(100vh - 130px); height: calc(100svh - 130px); min-height: 560px; padding: 0; }
.room-host > .loading-state { height: 100%; }
.room-links { display: flex; gap: 6px; justify-content: flex-end; margin: 0 0 8px; }
.page-room { padding-bottom: 20px; }

/* ---------- profile ---------- */
.prof { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.55fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.prof .col { display: grid; gap: 16px; }
.who-card { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: start; }
.who-card .av { width: 140px; height: 140px; border: 1px solid var(--line); box-shadow: 0 0 16px rgba(var(--accent-rgb),.2); background: var(--bg); }
.name-row { display: flex; align-items: center; gap: 8px; }
.name-row h2 { font: 700 26px/1.1 var(--f-head); overflow-wrap: anywhere; }
.name-row input { font: 700 22px/1.1 var(--f-head); width: 100%; }
.who-card .kv { margin-top: 12px; grid-template-columns: auto 1fr; }
.who-card .kv dd { text-align: left; }
.level { margin-top: 16px; display: grid; gap: 8px; }
.level .row { display: flex; align-items: baseline; gap: 12px; }
.level .row b { font: 600 24px/1 var(--f-mono); color: var(--accent); }
.xpbar { height: 10px; background: rgba(var(--accent-rgb),.08); border: 1px solid var(--line-2); overflow: hidden; }
.xpbar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, color-mix(in srgb, var(--accent) 78%, #000) 6px 8px); box-shadow: 0 0 10px var(--accent); }
.level small { font: 400 13px/1 var(--f-label); color: var(--ink-2); text-align: right; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); }
.trio > div { display: grid; gap: 4px; padding: 2px 14px; border-left: 1px solid var(--line-2); }
.trio > div:first-child { border: 0; padding-left: 4px; }
.trio .mid { font-size: 24px; }
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.avatars button { padding: 0; border: 1px solid var(--line-2); background: var(--bg); cursor: pointer; aspect-ratio: 1; }
.avatars button img { width: 100%; height: 100%; }
.avatars button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb),.55); }
.perf-nums { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.perf-nums > div { display: grid; gap: 4px; padding: 0 14px; border-left: 1px solid var(--line-2); }
.perf-nums > div:first-child { border: 0; padding-left: 4px; }
.perf-nums .mid { color: var(--accent); text-shadow: var(--glow); }
.prof .chart { height: 220px; }
.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.totals > div { display: grid; gap: 4px; }
.totals .mid { font-size: 20px; }
table.sessions { width: 100%; border-collapse: collapse; font: 400 14px/1.2 var(--f-label); }
.sessions th { text-align: left; color: var(--ink-2); font-weight: 400; letter-spacing: .06em; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.sessions td { padding: 9px 8px; border-bottom: 1px solid var(--line-2); font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.sessions td.w { color: var(--accent); }
.sessions tr:first-child td { background: rgba(var(--accent-rgb),.06); }
.sessions .r { text-align: right; }
.streak-top { display: flex; align-items: center; gap: 14px; }
.streak-top b { font: 600 38px/1 var(--f-mono); color: var(--accent); text-shadow: var(--glow); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; text-align: center; }
.week span { font: 400 12px/1 var(--f-label); color: var(--ink-2); }
.week i {
  display: grid; place-items: center; margin: 6px auto 0; width: 30px; height: 34px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: rgba(var(--accent-rgb),.08); color: var(--ink-3); font-style: normal; font: 600 14px/1 var(--f-mono);
}
.week i.on { background: var(--accent); color: var(--bg); }
.week i.today { outline: 1px solid var(--accent); }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.ach { display: grid; justify-items: center; gap: 6px; text-align: center; }
.ach .hex {
  width: 56px; height: 62px; display: grid; place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: rgba(var(--accent-rgb),.07); color: var(--ink-3);
}
.ach .hex svg { width: 26px; height: 26px; }
.ach.on .hex { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--bg)), var(--bg-hi)); color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.ach span { font: 400 11px/1.15 var(--f-label); color: var(--ink-2); }
.ach.on span { color: var(--ink); }
dialog.confirm {
  max-width: 420px; width: calc(100% - 32px); color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--red); padding: 22px; border-radius: var(--r);
}
dialog.confirm::backdrop { background: rgba(0,0,0,.7); }
dialog.confirm h2 { font: 700 22px/1.2 var(--f-head); margin-bottom: 10px; }
dialog.confirm p { color: var(--ink-2); margin-bottom: 18px; }
dialog.confirm .row { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- world boss ----------
   The calm layout. Every rule is scoped to .page-boss so the other pages keep the
   panel look until the same rules are approved for them:
   - one centred column, the arena is the hero and nothing on the page has a box around it
   - groups are made with space and a faint tint, never with borders or corner brackets
   - labels are sentence case in Chakra Petch; JetBrains Mono is kept for numbers and typed words
   - one type scale (12, 14, 16, 20, 28 and the current word), tabular numbers everywhere
   - colour only where it means something: green is you, red the boss and its block words,
     cyan packets and the firewall, amber bugs and the open kernel, gold the top three and coins
   - status shows on the arena only while it is active */
.page-boss {
  --wb-w: 1200px;
  --t-xs: 12px; --t-s: 14px; --t-m: 16px; --t-l: 20px; --t-xl: 28px; --t-word: clamp(30px, 2.5vw, 40px);
  --tint: rgba(var(--accent-rgb),.05);
  --scrim: rgba(var(--bg-0-rgb),.8);
  --amber: #f29d30; --amber-2: #ffc46b;
  --ease-out: cubic-bezier(.23,1,.32,1);
  --ease-drawer: cubic-bezier(.32,.72,0,1);
  /* what the fight needs below and above the arena, so it fits without scrolling */
  --reserve: 372px;
  max-width: none; padding: 14px 20px 8px;
}
body:has(.page-boss) #rain { opacity: 0; }
/* the cover before the fight (js/app/boss.js mount) */
.page-boss .wb-cover {
  position: relative; display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); align-items: center; gap: 24px;
  min-height: min(84vh, 760px); max-width: 1180px; margin: 0 auto; padding: 24px; overflow: hidden; isolation: isolate;
}
.page-boss .wb-cover::after {  /* the arena floor under the boss */
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 22%;
  border-top: 1px solid rgba(255,42,58,.35);
  background: radial-gradient(60% 80% at 68% 0%, rgba(255,42,58,.16), transparent 70%);
}
.page-boss .wb-cover-art { position: relative; grid-column: 2; grid-row: 1; height: min(76vh, 680px); }
.page-boss .wb-cover-boss {
  position: absolute; left: 50%; top: 0; height: 100%; width: auto; translate: -40% 0;
  filter: drop-shadow(0 0 22px rgba(255,42,58,.32));
  animation: wb-hover 5.6s ease-in-out infinite;
}
.page-boss .wb-cover-op {
  position: absolute; left: 0; bottom: -26%; height: 74%; width: auto;
  filter: brightness(.62) contrast(1.06) drop-shadow(0 0 1px rgba(255,42,58,.5));
}
@keyframes wb-hover { 50% { transform: translateY(-14px); } }
.page-boss .wb-cover-text { position: relative; z-index: 2; grid-column: 1; grid-row: 1; }
.page-boss .wb-cover-text small { font: 400 var(--t-s)/1 var(--f-label); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.page-boss .wb-cover-text h1 { margin: 10px 0 14px; font: 700 clamp(40px, 5.2vw, 68px)/.95 var(--f-head); color: var(--ink-hi); text-wrap: balance; }
.page-boss .wb-cover-text p { margin: 0 0 18px; color: var(--ink); max-width: 36ch; text-wrap: pretty; }
.page-boss .wb-cover-text dl { display: flex; gap: 28px; margin: 0 0 12px; }
.page-boss .wb-cover-text dt { font: 400 var(--t-s)/1 var(--f-label); color: var(--ink-2); }
.page-boss .wb-cover-text dd { margin: 6px 0 0; font: 600 26px/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink-hi); }
.page-boss .wb-cover-phases { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 22px; padding: 0; list-style: none; font: 400 var(--t-s)/1.4 var(--f-label); color: var(--ink-2); }
.page-boss .wb-cover-phases li { white-space: nowrap; }
.page-boss .wb-cover-phases li + li::before { content: "→"; margin: 0 8px; color: rgba(255,42,58,.6); }
.page-boss .wb-cover .btn kbd { font: inherit; font-size: 12px; color: var(--bg); opacity: .65; border: 1px solid currentColor; padding: 2px 5px; border-radius: 3px; }
.page-boss .wb-cover-live { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin: 0 0 20px; max-width: 380px; }
.page-boss .wb-cover-tag { font: 600 var(--t-xs)/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--bg); background: var(--red); padding: 4px 7px; }
.page-boss .wb-cover-ph { font: 500 var(--t-s)/1.2 var(--f-head); color: var(--red); }
.page-boss .wb-cover-hp { grid-column: 1 / -1; display: block; height: 6px; background: rgba(255,77,94,.16); }
.page-boss .wb-cover-hp i { display: block; height: 100%; background: var(--red); box-shadow: 0 0 10px rgba(255,77,94,.6); }
.page-boss .wb-cover-n { grid-column: 1 / -1; font: 400 var(--t-s)/1.2 var(--f-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* the attack state: the boss flares and shudders, red light washes the floor */
.page-boss .wb-cover.live .wb-cover-boss { filter: drop-shadow(0 0 30px rgba(255,42,58,.6)) saturate(1.25); animation: wb-hover 5.6s ease-in-out infinite, wb-rage 2.4s steps(1) infinite; }
.page-boss .wb-cover.live::after { background: radial-gradient(60% 80% at 68% 0%, rgba(255,42,58,.3), transparent 70%); }
@keyframes wb-rage { 0%, 88%, 100% { translate: -40% 0; } 90% { translate: calc(-40% - 6px) 2px; } 93% { translate: calc(-40% + 5px) -2px; } 96% { translate: calc(-40% - 2px) 0; } }
@media (prefers-reduced-motion: reduce) { .page-boss .wb-cover.live .wb-cover-boss { animation: none; } }
@media (max-width: 760px) {
  .page-boss .wb-cover { grid-template-columns: 1fr; gap: 8px; min-height: 0; padding: 12px 16px 24px; }
  .page-boss .wb-cover::after { bottom: auto; top: calc(12px + 40vh); height: 30%; }
  .page-boss .wb-cover-art { grid-column: 1; height: 42vh; }
  .page-boss .wb-cover-text h1 { margin: 6px 0 10px; }
  .page-boss .wb-cover-text p { margin-bottom: 12px; }
  .page-boss .wb-cover-phases { margin-bottom: 16px; }
  .page-boss .wb-cover-text { grid-column: 1; grid-row: 2; }
  .page-boss .wb-cover-op { bottom: -14%; height: 62%; }
}
@media (prefers-reduced-motion: reduce) { .page-boss .wb-cover-boss { animation: none; } }
.page-boss .wb { max-width: var(--wb-w); margin: 0 auto; display: flex; flex-direction: column; }
.page-boss .num, .page-boss b { font-variant-numeric: tabular-nums; }

/* HP: a name line and one thin bar along the top of the arena */
.page-boss .boss-hpbox { padding: 0 2px 8px; }
.page-boss .wb-hp-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.page-boss .wb-name { font: 600 var(--t-l)/1.2 var(--f-head); color: var(--ink); letter-spacing: .01em; }
.page-boss .boss-state { font: 500 var(--t-s)/1.2 var(--f-head); color: var(--accent); }
.page-boss .boss-state[data-s="2"] { color: var(--cyan); }
.page-boss .boss-state[data-s="3"] { color: var(--amber); }
.page-boss .boss-state[data-s="4"] { color: #ff6a3d; }
.page-boss .boss-state[data-s="5"] { color: var(--red); }
.page-boss .wb-phase { font: 400 var(--t-s)/1.2 var(--f-head); color: var(--ink-3); }
.page-boss .wb-hpnum { margin-left: auto; display: flex; align-items: baseline; gap: 12px; }
.page-boss .wb-hpnum b { font: 600 var(--t-xl)/1 var(--f-mono); color: var(--ink); }
.page-boss .wb-hpnum b small { font: 400 var(--t-s)/1 var(--f-mono); color: var(--ink-3); }
.page-boss .wb-left { font: 400 var(--t-s)/1 var(--f-head); color: var(--ink-2); }
.page-boss .wb-left span { font-family: var(--f-mono); }
.page-boss .boss-bar { position: relative; height: 6px; margin-top: 8px; background: rgba(255,77,94,.14); overflow: hidden; }
.page-boss .boss-bar i { position: absolute; inset: 0 auto 0 0; display: block; background: var(--red); box-shadow: 0 0 10px rgba(255,77,94,.55); transition: width 250ms linear; }
/* the HP just lost stays amber for half a second, then drains */
.page-boss .boss-bar i.lag { background: var(--amber-2); box-shadow: none; transition: width 700ms ease-in 450ms; }
.page-boss .wb-shieldbar {
  position: absolute; inset: 0 auto 0 0; display: block; z-index: 1; background: var(--cyan);
  clip-path: inset(0 calc((1 - var(--s, 1)) * 100%) 0 0); transition: width 250ms linear;
}
.page-boss .wb-team { display: flex; align-items: center; gap: 8px; margin-top: 6px; font: 400 var(--t-xs)/1 var(--f-mono); color: var(--ink-2); }
.page-boss .wb-team-l { text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.page-boss .wb-team-bar { position: relative; flex: 0 1 220px; height: 4px; background: rgba(62,230,255,.14); overflow: hidden; }
.page-boss .wb-team-bar i { position: absolute; inset: 0 auto 0 0; display: block; background: #3ee6ff; transition: width 250ms linear; }
.page-boss .wb-team-bar s { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bg); text-decoration: none; }
.page-boss .wb-team-n { min-width: 3.2em; color: var(--ink-hi); font-variant-numeric: tabular-nums; }
.page-boss .wb-team-b { color: #3ee6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-boss .wb-team[data-on="root"] .wb-team-bar i { background: #ffd23d; }
.page-boss .wb-team[data-on="root"] .wb-team-b { color: #ffd23d; font-weight: 700; }
@media (max-width: 760px) { .page-boss .wb-team-l { display: none; } .page-boss .wb-team-b { font-size: 11px; } }
.page-boss .boss-bar s { position: absolute; top: 0; bottom: 0; z-index: 2; width: 2px; background: var(--bg); text-decoration: none; }

/* the arena */
.page-boss .boss-stage {
  --stage-h: clamp(240px, calc(100vh - var(--reserve)), 700px);
  --stage-h: clamp(240px, calc(100svh - var(--reserve)), 700px);
  position: relative; height: var(--stage-h); overflow: hidden; background: var(--bg-0);
}
.page-boss .boss-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.page-boss .boss-stage.is-down { height: auto; min-height: var(--stage-h); }
.page-boss .boss-stage.is-down .boss-down { position: relative; inset: auto; min-height: inherit; }
.page-boss .boss-stage.is-down :is(.wb-tip, .wb-mini, .wb-status) { display: none; }

/* status on the arena, shown only while it is active */
.page-boss .wb-status { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 260px); pointer-events: none; }
.page-boss .wb-me { display: contents; }
.page-boss .wb-flag { font: 500 var(--t-s)/1 var(--f-head); padding: 7px 10px; background: var(--scrim); color: var(--ink); white-space: nowrap; }
.page-boss .wb-flag b { font: 600 var(--t-s)/1 var(--f-mono); margin-left: 4px; }
.page-boss .wb-flag small { font: 400 var(--t-xs)/1 var(--f-mono); color: var(--ink-2); }
.page-boss .wb-flag.shield { color: var(--cyan); background: linear-gradient(rgba(62,230,255,.14), rgba(62,230,255,.14)), var(--scrim); }
.page-boss .wb-flag.weak { color: var(--amber-2); background: linear-gradient(rgba(255,196,107,.16), rgba(255,196,107,.16)), var(--scrim); }
.page-boss .wb-flag.jam { color: #ff7a87; background: linear-gradient(rgba(255,77,94,.16), rgba(255,77,94,.16)), var(--scrim); }
.page-boss .wb-flag.crit b { color: var(--accent); }

/* the top three and you, in the arena's corner */
.page-boss .wb-mini {
  position: absolute; right: 12px; top: 12px; z-index: 1; min-width: 200px; margin: 0; padding: 8px 10px;
  list-style: none; display: grid; gap: 5px; background: rgba(var(--bg-0-rgb),.6); pointer-events: none;
  font: 400 var(--t-xs)/1.2 var(--f-head); color: var(--ink-2);
}
.page-boss .wb-mini:empty, .page-boss:has(.wb-drawer.open) .wb-mini { display: none; }
.page-boss .wb-mini li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.page-boss .wb-mini .r { font-family: var(--f-mono); color: var(--ink-3); }
.page-boss .wb-mini .top .r { color: var(--gold); }
.page-boss .wb-mini .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-boss .wb-mini b { font: 500 var(--t-xs)/1.2 var(--f-mono); color: var(--ink); }
.page-boss .wb-mini .you, .page-boss .wb-mini .you b { color: var(--accent); }

/* a tip shows once for each mechanic, then goes */
.page-boss .wb-tip {
  position: absolute; left: 50%; bottom: 14px; z-index: 2; transform: translateX(-50%);
  width: max-content; max-width: min(620px, calc(100% - 28px)); padding: 9px 14px; margin: 0;
  background: var(--scrim); font: 400 var(--t-s)/1.4 var(--f-head); color: var(--ink); text-align: center; pointer-events: none;
}
.page-boss .wb-tip:empty { display: none; }
.page-boss .wb-tip.on { animation: wb-in 220ms var(--ease-out); }
@keyframes wb-in { from { opacity: 0; } }

/* attack slots: the words to block, send back or delete, each with its timer */
.page-boss .wb-mech { min-height: 66px; display: flex; align-items: center; justify-content: center; padding: 10px 0 6px; }
.page-boss .wb-chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 8px; min-width: 0; }
.page-boss .wb-next { font: 400 var(--t-s)/1 var(--f-head); color: var(--ink-3); }
.page-boss .wb-next b { font: 500 var(--t-s)/1 var(--f-mono); color: var(--ink-2); }
.page-boss .wb-chip {
  --k: var(--red); --kb: rgba(255,77,94,.12); --kl: rgba(255,77,94,.26);
  position: relative; display: flex; align-items: baseline; gap: 10px; padding: 8px 12px 10px; background: var(--kb); color: var(--ink-2);
}
.page-boss .wb-chip.return { --k: var(--cyan); --kb: rgba(62,230,255,.1); --kl: rgba(62,230,255,.22); }
.page-boss .wb-chip.add { --k: var(--amber); --kb: rgba(242,157,48,.1); --kl: rgba(242,157,48,.22); }
.page-boss .wb-chip small { font: 500 var(--t-xs)/1 var(--f-head); color: var(--k); }
.page-boss .wb-chip .w { font: 400 var(--t-l)/1.1 var(--f-mono); color: var(--ink); white-space: nowrap; }
.page-boss .wb-chip.first .w { font-size: 26px; }
.page-boss .wb-chip .secs { font: 400 var(--t-s)/1 var(--f-mono); font-style: normal; color: var(--ink-2); min-width: 3.6ch; text-align: right; }
.page-boss .wb-chip .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.06); }
.page-boss .wb-chip .bar i { position: absolute; inset: 0 auto 0 0; background: var(--k); transition: width 100ms linear; }
.page-boss .wb-chip.late { background: var(--kl); }
.page-boss .wb-chip.late .secs { color: var(--ink); }
.page-boss .wb-chip.on { background: rgba(var(--bg-0-rgb),.95); box-shadow: inset 0 0 0 1px var(--k); }
.page-boss .wb-chip .c.ok, .page-boss .wb-label .c.ok { color: var(--accent); }
.page-boss .wb-chip .c.bad, .page-boss .wb-label .c.bad { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.page-boss .wb-chip .c.at, .page-boss .wb-label .c.at { box-shadow: inset 2px 0 0 var(--accent); }
.page-boss .wb-more { align-self: center; font: 400 var(--t-s)/1 var(--f-mono); color: var(--ink-2); }

/* the word stack: a block of lines, Monkeytype style (js/app/wordflow.js) */
.fw-lines {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 .62em; max-width: 980px; margin: 0 auto;
  height: calc(var(--fw-lines, 3) * 1.6em); overflow: hidden;
  font: 400 30px/1.6 var(--f-mono); color: var(--ink-3); text-align: left;
}
.fw { position: relative; white-space: nowrap; }
.fw i { font-style: normal; position: relative; }
.fw.done i.ok { color: var(--ink-hi); }
.fw.done.miss { text-decoration: underline; text-decoration-color: rgba(255,77,94,.7); text-underline-offset: 6px; }
.fw.done i.bad, .fw.cur i.bad { color: var(--red); }
.fw i.extra { color: #b8323e; }
.fw.cur i.ok { color: var(--accent); }
.fw.cur { color: var(--ink-2); }
.fw.cur::after { content: ""; position: absolute; left: -.2em; right: -.2em; top: .2em; bottom: .15em; background: rgba(var(--accent-rgb),.08); pointer-events: none; }
.fw.cur.wait { color: var(--ink-3); }
.fw.cur.wait::after { background: transparent; }
.fw i.at::before { content: ""; position: absolute; left: -1px; top: 18%; bottom: 14%; width: 2px; background: var(--accent); }
.fw i.at.end { display: inline-block; width: .1em; }
.typebox.focused .fw i.at::before { animation: blink 1s steps(1) infinite; }
/* an attack's counter phrase: red, red slashes either side when it shows, a timer under it, and
   it flickers for the last 40% of its window (the word boxes in The Typing of the Dead) */
.fw.threat { color: #ff6b78; animation: fw-late var(--tw, 3s) linear var(--te, 0s) both; }
.fw.cur.threat { color: #ff8a94; }
.fw.cur.threat::after { background: rgba(255,77,94,.12); }
.fw.threat i.ok { color: var(--ink-hi); }
.fw-slash { position: absolute; inset: -.1em -1.05em; pointer-events: none; filter: drop-shadow(0 0 6px rgba(255,77,94,.8));
  animation: fw-slash 650ms var(--ease-out) var(--te, 0s) both; }
.fw-slash::before, .fw-slash::after { content: ""; position: absolute; top: 12%; bottom: 12%; width: .7em; background: #ff4d5e; }
.fw-slash::before { left: 0; clip-path: polygon(0 0, 100% 50%, 0 100%, 42% 50%); }
.fw-slash::after { right: 0; clip-path: polygon(100% 0, 0 50%, 100% 100%, 58% 50%); }
.fw-tbar { position: absolute; left: 0; right: 0; bottom: .12em; height: 3px; background: #ff4d5e; transform-origin: left; pointer-events: none;
  animation: fw-tbar var(--tw, 3s) linear var(--te, 0s) both; }
.fw.done.was-threat i.ok { color: var(--cyan); }
@keyframes fw-slash { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.2); } 45% { opacity: 1; transform: scale(1); } 100% { opacity: .5; transform: scale(.8); } }
@keyframes fw-tbar { from { transform: scaleX(1); } to { transform: scaleX(0); background: var(--amber-2); } }
@keyframes fw-late { 0%, 59% { background: transparent; } 60%, 70%, 80%, 90% { background: rgba(255,77,94,.3); } 65%, 75%, 85%, 95%, 100% { background: rgba(255,77,94,.05); } }
@media (prefers-reduced-motion: reduce) { .fw.threat { animation: none; } .fw-slash { animation: none; opacity: .7; } }
@media (max-width: 760px) { .fw-lines { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { .typebox.focused .fw i.at::before { animation: none; } }
.page-boss .boss-words { padding: 2px 0 0; outline: none; transition: opacity 150ms; }
.page-boss .boss-words.locked { opacity: .45; }
.page-boss .boss-queue { display: grid; justify-items: center; gap: 8px; }
.page-boss .bq-line { display: flex; justify-content: center; font: 400 var(--t-word)/1.3 var(--f-mono); }
.page-boss .bq-at { position: relative; }
.page-boss .bw { position: relative; white-space: nowrap; }
.page-boss .bw.cur { display: inline-block; padding: 2px 14px; background: rgba(var(--accent-rgb),.08); color: var(--ink); }
.page-boss .bw.cur.wait { background: transparent; color: var(--ink-3); }
.page-boss .bw.cur .c { position: relative; }
.page-boss .bw.cur .c.ok { color: var(--accent); }
.page-boss .bw.cur .c.bad { color: var(--red); text-decoration: underline; text-underline-offset: 5px; }
.page-boss .bw.cur .c.at::before { content: ""; position: absolute; left: -1px; top: 16%; bottom: 12%; width: 2px; background: var(--accent); }
.page-boss .boss-words.focused .bw.cur .c.at::before { animation: blink 1s steps(1) infinite; }
.page-boss .bw.done {
  position: absolute; right: 100%; bottom: .5em; margin-right: 18px; font-size: .5em; color: var(--accent-dim);
  animation: wb-ghost 700ms var(--ease-out) forwards;
}
.page-boss .bw.done.miss { color: #ff7a87; text-decoration: line-through; }
@keyframes wb-ghost { from { opacity: 1; } to { opacity: 0; transform: translateX(-14px); } }
.page-boss .bq-next {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; max-width: 920px; height: 1.5em; overflow: hidden;
  font: 400 var(--t-l)/1.5 var(--f-mono); color: var(--ink-2);
}
.page-boss .focus-note { background: rgba(var(--bg-rgb),.92); font: 500 var(--t-m)/1.4 var(--f-head); letter-spacing: 0; color: var(--accent); }
.page-boss .wb-over { display: none; justify-content: center; padding: 14px 0 4px; }
.page-boss .boss-type.is-done > :not(.wb-over) { display: none; }
.page-boss .boss-type.is-done .wb-over { display: flex; }
.page-boss .btn { font: 600 var(--t-m)/1 var(--f-head); letter-spacing: .01em; clip-path: none; padding: 12px 20px; transition: background-color 120ms ease, transform 160ms var(--ease-out); }
.page-boss .btn:active { transform: scale(.97); }

/* your numbers, one slim line */
.page-boss .wb-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 26px; padding: 10px 0 0; font: 400 var(--t-s)/1.2 var(--f-head); color: var(--ink-2); }
.page-boss .wb-stat b { font: 600 var(--t-m)/1 var(--f-mono); color: var(--ink); margin-right: 5px; }
.page-boss .wb-stat.mine b { color: var(--accent); }
.page-boss .wb-boardbtn {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 6px 10px; cursor: pointer;
  font: 500 var(--t-s)/1 var(--f-head); color: var(--ink); background: var(--tint); border: 0; border-radius: var(--r);
  transition: background-color 120ms ease, transform 160ms var(--ease-out);
}
.page-boss .wb-boardbtn:hover { background: rgba(var(--accent-rgb),.12); }
.page-boss .wb-boardbtn:active { transform: scale(.97); }
.page-boss kbd { font: 400 var(--t-xs)/1 var(--f-mono); color: var(--ink-2); background: rgba(255,255,255,.06); border: 0; padding: 3px 5px; }
.page-boss .wb-demo { margin: 10px 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 14px; font: 400 var(--t-xs)/1.3 var(--f-head); color: var(--ink-3); text-align: center; }
.page-boss .wb-skip { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.page-boss .wb-skip button {
  font: 500 var(--t-xs)/1 var(--f-mono); color: var(--ink-2); background: rgba(255,255,255,.05); border: 0; border-radius: var(--r);
  min-width: 24px; padding: 5px 6px; cursor: pointer;
}
.page-boss .wb-skip button:hover:not(:disabled) { color: var(--ink); background: rgba(255,255,255,.1); }
.page-boss .wb-skip button:disabled { opacity: .35; cursor: default; }

/* the scoreboard drawer */
.page-boss .wb-drawer {
  position: fixed; top: var(--top-h, 68px); right: 0; bottom: 0; z-index: 48; width: min(400px, 100vw);
  display: grid; gap: 26px; align-content: start; padding: 18px 20px 28px; overflow-y: auto; overscroll-behavior: contain;
  background: #060d09; box-shadow: -30px 0 60px rgba(0,0,0,.55);
  transform: translateX(100%); visibility: hidden; transition: transform 240ms var(--ease-drawer), visibility 0s linear 240ms;
}
.page-boss .wb-drawer.open { transform: none; visibility: visible; transition: transform 240ms var(--ease-drawer); }
.page-boss .wb-dhead { display: flex; align-items: baseline; gap: 12px; }
.page-boss .wb-dhead h2 { font: 600 var(--t-l)/1.2 var(--f-head); color: var(--ink); }
.page-boss .wb-dhead > span { font: 400 var(--t-s)/1 var(--f-head); color: var(--ink-2); }
.page-boss .wb-x {
  margin-left: auto; align-self: center; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; cursor: pointer;
  color: var(--ink-2); background: var(--tint); border: 0; border-radius: var(--r);
}
.page-boss .wb-x:hover { color: var(--ink); background: rgba(var(--accent-rgb),.12); }
.page-boss .wb-x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.page-boss .wb-drawer h3 { margin-bottom: 10px; font: 500 var(--t-s)/1.2 var(--f-head); color: var(--ink-2); }
.page-boss .wb-you { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
.page-boss .wb-you > div { display: grid; gap: 4px; align-content: start; }
.page-boss .wb-you span { font: 400 var(--t-xs)/1.2 var(--f-head); color: var(--ink-2); }
.page-boss .wb-you b { font: 600 var(--t-l)/1 var(--f-mono); color: var(--ink); }
.page-boss .wb-you b.green { color: var(--accent); }
.page-boss .wb-you small, .page-boss .wb-res-main small { font-size: .6em; font-weight: 400; color: var(--ink-2); }
.page-boss table.boss-board { width: 100%; border-collapse: collapse; font: 400 var(--t-s)/1.2 var(--f-head); }
.page-boss .boss-board th { text-align: left; font: 400 var(--t-xs)/1 var(--f-head); color: var(--ink-3); padding: 0 6px 8px; }
.page-boss .boss-board td { padding: 6px; }
.page-boss .boss-board .r { text-align: right; }
.page-boss .boss-board td.num { font-family: var(--f-mono); }
.page-boss .boss-board .rank { width: 30px; font-family: var(--f-mono); color: var(--ink-3); }
.page-boss .boss-board .rank.top { color: var(--gold); }
.page-boss .boss-board .who { display: flex; align-items: center; gap: 8px; }
.page-boss .boss-board .tag { font: 400 var(--t-xs)/1 var(--f-head); color: var(--accent); }
.page-boss .boss-board tr.you td { background: rgba(var(--accent-rgb),.08); color: var(--accent); }
.page-boss .boss-board tr.gap td { text-align: center; color: var(--ink-3); padding: 2px; }
.page-boss .boss-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font: 400 13px/1.35 var(--f-head); color: var(--ink-2); }
.page-boss .boss-feed .t { font: 400 var(--t-xs)/1 var(--f-mono); color: var(--ink-3); }
.page-boss .boss-feed b { color: var(--ink); font-weight: 500; }
.page-boss .boss-feed .you, .page-boss .boss-feed .you b { color: var(--accent); }
.page-boss .boss-feed .sys { color: var(--amber); }
.page-boss .boss-feed .alert { color: #ff7a87; }
.page-boss .boss-feed .shield { color: var(--cyan); }
.page-boss .boss-feed .add { color: var(--amber); }
.page-boss .boss-feed .mile { color: var(--ink); }

/* the result, over the arena */
.page-boss .boss-down { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 18px; background: rgba(var(--bg-0-rgb),.84); overflow-y: auto; }
.page-boss .boss-down-in { width: min(720px, 100%); display: grid; gap: 16px; margin: auto; }
.page-boss .boss-down-in h2 { font: 600 var(--t-xl)/1.1 var(--f-head); color: var(--ink); }
.page-boss .wb-res-line { margin-top: -8px; font: 400 var(--t-s)/1.4 var(--f-head); color: var(--ink-2); }
.page-boss .wb-res-main { display: flex; flex-wrap: wrap; gap: 14px 34px; }
.page-boss .wb-res-main > div { display: grid; gap: 6px; }
.page-boss .wb-res-main span { font: 400 var(--t-xs)/1 var(--f-head); color: var(--ink-2); }
.page-boss .wb-res-main b { font: 600 var(--t-xl)/1 var(--f-mono); color: var(--ink); }
.page-boss .wb-res-main b.green { color: var(--accent); }
.page-boss .wb-res-main b.gold { color: var(--gold); }
.page-boss .wb-res-more { display: flex; flex-wrap: wrap; gap: 6px 24px; font: 400 var(--t-s)/1.2 var(--f-head); color: var(--ink-2); }
.page-boss .wb-res-more b { font: 600 var(--t-m)/1 var(--f-mono); color: var(--ink); margin-right: 4px; }
.page-boss .wb-bonus { margin-top: -6px; font: 400 var(--t-xs)/1.4 var(--f-head); color: var(--ink-3); }

/* damage numbers, word labels, pops, the phase banner and the hit tint over the 3D scene */
.page-boss .dmg-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.page-boss .dmg {
  position: absolute; transform: translate(-50%, -50%);
  font: 600 15px/1 var(--f-mono); color: var(--ink-2); opacity: .8;
  animation: dmg-up 1.1s ease-out forwards; white-space: nowrap;
}
.page-boss .dmg.you { font-size: 28px; color: var(--accent); opacity: 1; text-shadow: 0 0 10px rgba(var(--accent-rgb),.8), 0 2px 0 #000; z-index: 2; }
.page-boss .dmg.you.big { font-size: 36px; color: var(--ink-hi); text-shadow: 0 0 12px rgba(var(--accent-rgb),.9), 0 2px 0 #000; }
.page-boss .dmg.sh { color: rgba(62,230,255,.85); }
.page-boss .dmg.you.sh { color: var(--cyan); text-shadow: 0 0 10px rgba(62,230,255,.7), 0 2px 0 #000; }
.page-boss .dmg.you.ret { color: var(--cyan); }
@keyframes dmg-up { 0% { transform: translate(-50%, -30%) scale(.8); opacity: 0; } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { transform: translate(-50%, -260%) scale(1); opacity: 0; } }
@keyframes dmg-fade { 0%, 60% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -50%); } }
.page-boss .wb-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.page-boss .wb-label {
  position: absolute; left: 0; top: 0; will-change: transform; white-space: nowrap;
  font: 600 16px/1 var(--f-mono); color: var(--ink); padding: 4px 7px; background: rgba(var(--bg-0-rgb),.82); border: 1px solid var(--cyan);
}
.page-boss .wb-label.block { font-size: 22px; padding: 6px 10px; border-color: var(--red); }
.page-boss .wb-label.add { border-color: var(--amber); font-size: 15px; }
.page-boss .wb-pop {
  position: absolute; left: 50%; top: 22%; transform: translate(-50%, -50%); z-index: 4; pointer-events: none;
  font: 700 clamp(22px, 3vw, 38px)/1 var(--f-head); letter-spacing: .08em; opacity: 0; white-space: nowrap;
  text-shadow: 0 2px 0 #000, 0 0 14px currentColor;
}
.page-boss .wb-pop.cyan { color: var(--cyan); } .page-boss .wb-pop.red { color: var(--red); } .page-boss .wb-pop.amber { color: var(--amber-2); }
.page-boss .wb-pop.white { color: var(--ink); } .page-boss .wb-pop.green { color: var(--accent); }
.page-boss .wb-pop.go { animation: wb-pop 900ms ease-out forwards; }
.page-boss .wb-pop.go.long { animation-duration: 2000ms; }
@keyframes wb-pop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.9); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
/* the pop, the banner and the tint play when they get .go, which the home page also uses for its grid */
.page-boss :is(.wb-pop, .wb-banner, .wb-tint) { display: block; margin: 0; }
.page-boss .wb-banner { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 5; pointer-events: none; }
.page-boss .wb-banner .in { display: grid; justify-items: center; gap: 8px; width: 100%; padding: 18px 20px; background: rgba(var(--bg-0-rgb),.8); text-align: center; }
.page-boss .wb-banner small { font: 500 var(--t-s)/1 var(--f-head); color: var(--ink-2); }
.page-boss .wb-banner b { font: 700 clamp(28px, 4vw, 48px)/1 var(--f-head); letter-spacing: .04em; color: var(--ink); text-shadow: var(--glow); }
.page-boss .wb-banner span { font: 400 var(--t-m)/1.3 var(--f-head); color: var(--ink-2); }
.page-boss .wb-banner.go .in { animation: wb-banner 2800ms ease-out forwards; }
@keyframes wb-banner { 0% { opacity: 0; transform: scaleY(.6); } 10% { opacity: 1; transform: none; } 82% { opacity: 1; } 100% { opacity: 0; } }
.page-boss .wb-tint { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; box-shadow: inset 0 0 70px 10px rgba(255,77,94,.55); }
.page-boss .wb-tint.go { animation: wb-tint 650ms ease-out forwards; }
/* an attack that reached you: an orange smear across the arena */
.page-boss .wb-smear { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: linear-gradient(104deg, transparent 18%, rgba(255,120,50,.42) 42%, rgba(255,72,48,.6) 54%, rgba(255,140,60,.3) 66%, transparent 84%),
    radial-gradient(ellipse at 50% 55%, transparent 35%, rgba(255,96,48,.45) 90%); }
.page-boss .wb-smear.go { animation: wb-smear 450ms ease-out; }
@keyframes wb-smear { 0% { opacity: 0; transform: translateX(-10%) skewX(-8deg); } 18% { opacity: 1; } 100% { opacity: 0; transform: translateX(8%) skewX(-8deg); } }
/* a charged punch's break bar: the raid's typing drains it before the punch lands */
.page-boss .wb-break { position: absolute; left: 50%; top: 10px; z-index: 3; transform: translateX(-50%); width: min(420px, 46%);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; padding: 10px 14px; background: var(--scrim); pointer-events: none;
  border: 1px solid rgba(255,77,94,.55); box-shadow: 0 0 24px rgba(255,77,94,.35); animation: wb-brk-in 320ms var(--ease-out); }
.page-boss .wb-break[hidden] { display: none; }
.page-boss .wb-break span { font: 700 13px/1 var(--mono, ui-monospace); letter-spacing: .14em; text-transform: uppercase; color: #ff8a94; }
.page-boss .wb-break b { font: 700 14px/1 var(--mono, ui-monospace); color: var(--ink-hi); font-variant-numeric: tabular-nums; }
.page-boss .wb-break-bar { grid-column: 1 / -1; height: 12px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
.page-boss .wb-break-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ff4d5e, #ffb03d); box-shadow: 0 0 12px rgba(255,77,94,.7); transition: width 120ms linear; }
@keyframes wb-brk-in { from { opacity: 0; transform: translateX(-50%) scale(.9); } }
@media (max-width: 700px) { .page-boss .wb-break { width: 70%; top: 6px; padding: 8px 10px; } }
/* the kill: the picture goes letterbox */
.page-boss .wb-lbox { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.page-boss .wb-lbox::before, .page-boss .wb-lbox::after { content: ""; position: absolute; left: 0; right: 0; height: 11%; background: #000; transform: scaleY(0); transition: transform 380ms var(--ease-out); }
.page-boss .wb-lbox::before { top: 0; transform-origin: top; } .page-boss .wb-lbox::after { bottom: 0; transform-origin: bottom; }
.page-boss .wb-lbox.on::before, .page-boss .wb-lbox.on::after { transform: scaleY(1); }
/* your integrity: four pips, bottom left of the arena */
.page-boss .wb-lives { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; gap: 5px; padding: 7px 9px; background: var(--scrim); pointer-events: none; }
.page-boss .wb-lives:empty { display: none; }
.page-boss .wb-lives i { position: relative; width: 22px; height: 14px; clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%); background: rgba(255,255,255,.12); }
.page-boss .wb-lives i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 1)); box-shadow: 0 0 8px rgba(var(--accent-rgb),.6); }
.page-boss .wb-lives i.lost { animation: wb-pip 700ms var(--ease-out); }
@keyframes wb-pip { 0% { background: #ff4d5e; transform: scale(1.5); } 40% { background: #ff4d5e; transform: scale(1.2) rotate(-8deg); } 100% { background: rgba(255,255,255,.12); transform: none; } }
@media (prefers-reduced-motion: reduce) { .page-boss .wb-smear.go { animation-name: wb-tint; } .page-boss .wb-lives i.lost { animation: none; } }
@keyframes wb-tint { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wb-fade { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .page-boss .dmg { animation: dmg-fade 1.1s linear forwards; }
  .page-boss .wb-pop.go { animation: wb-fade 900ms linear forwards; }
  .page-boss .wb-pop.go.long { animation-duration: 2000ms; }
  .page-boss .wb-banner.go .in { animation: wb-fade 2800ms linear forwards; }
  .page-boss .wb-chip .bar i { transition: none; }
  .page-boss .boss-words.focused .bw.cur .c.at::before { animation: none; }
  .page-boss .bw.done { animation-name: wb-ghost-still; }
  .page-boss .wb-drawer, .page-boss .wb-drawer.open { transition: none; }
  .page-boss .btn:active, .page-boss .wb-boardbtn:active { transform: none; }
}
@keyframes wb-ghost-still { from { opacity: 1; } to { opacity: 0; } }

/* short laptop screens such as 1366x768 */
@media (max-height: 820px) and (min-width: 701px) {
  .page-boss { --reserve: 342px; padding-top: 10px; }
  .page-boss .wb-mech { min-height: 60px; padding-top: 8px; }
  .page-boss .wb-strip { padding-top: 6px; }
  .page-boss .wb-demo { margin-top: 6px; }
}
@media (max-width: 560px) {
  .page-boss .wb-drawer { top: 60px; }
}
/* the squad (js/app/boss-squad.js): four cards under the word stack, the new word kinds and the down screen */
.page-boss .wb-chip.dodge { --k: var(--red); --kb: rgba(255,77,94,.18); --kl: rgba(255,77,94,.34); }
.page-boss .wb-chip.cover, .page-boss .wb-chip.revive { --k: var(--cyan); --kb: rgba(62,230,255,.12); --kl: rgba(62,230,255,.26); }
.page-boss .wb-chip.heal { --k: var(--accent); --kb: rgba(var(--accent-rgb),.1); --kl: rgba(var(--accent-rgb),.24); }
.page-boss .wb-squad { display: grid; grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 8px; align-items: stretch; padding: 12px 0 0; }
.page-boss .wb-squad:empty { display: none; }
.page-boss .wb-sqh { align-self: center; font: 400 var(--t-xs)/1 var(--f-label); letter-spacing: .12em; color: var(--ink-3); writing-mode: vertical-rl; transform: rotate(180deg); }
/* the squad cards (js/app/boss.js paintSquad; Art, 4 Dec 2026: more like a game's party frames) */
.page-boss .wb-op { --dc: var(--ink-3); position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0;
  padding: 7px 10px 7px 7px; background: linear-gradient(100deg, color-mix(in srgb, var(--dc) 14%, var(--bg-2)) 0%, var(--bg-2) 42%);
  border: 1px solid color-mix(in srgb, var(--dc) 32%, transparent); border-left: 3px solid var(--dc);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.page-boss .wb-op.you { background: linear-gradient(100deg, color-mix(in srgb, var(--dc) 22%, var(--bg-2)) 0%, var(--bg-2) 55%); border-color: color-mix(in srgb, var(--accent) 55%, transparent); border-left-color: var(--dc); }
.page-boss .wb-oppic { position: relative; width: 46px; height: 46px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--dc) 35%, transparent), transparent 70%), var(--bg-0);
  border: 1px solid color-mix(in srgb, var(--dc) 60%, transparent); clip-path: polygon(0 0, 100% 0, 100% 78%, 78% 100%, 0 100%); }
.page-boss .wb-oppic img { width: 40px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.page-boss .wb-optag { position: absolute; left: 0; bottom: 0; padding: 1px 4px; font: 700 9px/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--bg-0); background: var(--accent); }
.page-boss .wb-opbody { display: grid; gap: 5px; min-width: 0; }
.page-boss .wb-opn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.page-boss .wb-opn b { font: 700 var(--t-s)/1.1 var(--f-head); letter-spacing: .02em; color: var(--ink-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-boss .wb-opdiv { display: inline-flex; align-items: center; gap: 4px; flex: none; font: 600 10.5px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--dc); }
.page-boss .wb-opdiv .op-patch .op-hex { fill: color-mix(in srgb, var(--dc) 15%, transparent); stroke: var(--dc); stroke-width: 1.5; }
.page-boss .wb-opdiv .op-patch g { fill: none; stroke: var(--dc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the health bar: ten segments, the fill, and the lost part draining behind it */
.page-boss .wb-ophp { position: relative; display: block; height: 9px; background: rgba(0,0,0,.55); border: 1px solid rgba(var(--ink-rgb),.12); overflow: hidden; transform: skewX(-14deg); }
.page-boss .wb-ophp::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1.5px), rgba(0,0,0,.7) calc(10% - 1.5px) 10%); }
.page-boss .wb-ophp i { position: absolute; left: 0; top: 0; bottom: 0; display: block; }
.page-boss .wb-ophp .g { background: #fff2c4; opacity: .85; transition: width .55s .45s cubic-bezier(.4, 0, .2, 1); }
.page-boss .wb-ophp .f { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 70%, #fff) 0%, var(--accent) 45%, color-mix(in srgb, var(--accent) 70%, #000) 100%);
  box-shadow: 0 0 8px rgba(var(--accent-rgb),.55); transition: width .18s ease-out; }
.page-boss .wb-op.low .wb-ophp .f { background: linear-gradient(180deg, #ffd08a 0%, var(--amber, #ffb000) 45%, #b36b00 100%); box-shadow: 0 0 8px rgba(255,176,0,.5); animation: wbLow 1s ease-in-out infinite; }
@keyframes wbLow { 50% { filter: brightness(1.35); } }
.page-boss .wb-ops { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 600 11.5px/1.2 var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.page-boss .wb-ops kbd { font: 600 10.5px/1 var(--f-mono); color: var(--cyan); padding: 2px 6px 3px; border: 1px solid rgba(62,230,255,.45); border-bottom-width: 2px; background: rgba(62,230,255,.08); }
/* a hit: a red flash and a small jolt */
.page-boss .wb-op.hit { animation: wbHit .38s ease-out; }
@keyframes wbHit { 0% { transform: translateX(-3px); box-shadow: inset 0 0 0 999px rgba(255,77,94,.28); } 40% { transform: translateX(2px); } 100% { transform: none; box-shadow: none; } }
.page-boss .wb-op.locked { border-color: var(--red); }
.page-boss .wb-op.locked .wb-ops .st { color: var(--red); animation: wbLock .5s steps(2) infinite; }
@keyframes wbLock { 50% { opacity: .45; } }
.page-boss .wb-op.down, .page-boss .wb-op.out { border-style: dashed; }
.page-boss .wb-op.down .wb-oppic img, .page-boss .wb-op.out .wb-oppic img { filter: grayscale(1) brightness(.55); }
.page-boss .wb-op.down .wb-ops .st { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.page-boss .wb-op.out .wb-ops .st { color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.page-boss .wb-op.out .wb-ophp .f, .page-boss .wb-op.out .wb-ophp .g { filter: grayscale(1); opacity: .35; }
@media (prefers-reduced-motion: reduce) {
  .page-boss .wb-ophp i { transition: none; }
  .page-boss .wb-op.hit, .page-boss .wb-op.low .wb-ophp .f, .page-boss .wb-op.locked .wb-ops .st { animation: none; }
}
.page-boss .wb-youdown { position: absolute; inset: auto 12px 12px; z-index: 5; display: grid; gap: 4px; padding: 12px 14px; background: rgba(20,4,8,.88); border: 1px solid var(--red); text-align: center; }
.page-boss .wb-youdown b { font: 600 var(--t-m)/1.1 var(--f-head); color: var(--red); text-transform: uppercase; }
.page-boss .wb-youdown span { font-size: var(--t-s); color: var(--ink); }
.page-boss .wb-sqres { font: 600 var(--t-m)/1.1 var(--f-head); color: var(--ink); margin-top: 4px; }
.page-boss .wb-sqcall { color: var(--accent); font-size: var(--t-s); }
.page-boss .wb-sqtable tr.you td { color: var(--accent); }
.page-boss .wb-sqline { font-size: var(--t-s); color: var(--ink-2); }

/* phones: the arena on top, then HP, then the stack; the scoreboard stays in the drawer */
@media (max-width: 700px) {
  .page-boss .wb-squad { order: 4; padding: 12px 12px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-boss .wb-sqh { display: none; }
  .page.page-boss { padding: 0 0 18px; }
  .page-boss .boss-stage { order: 1; --stage-h: clamp(220px, 36svh, 330px); }
  .page-boss .boss-hpbox { order: 2; padding: 10px 12px 0; }
  .page-boss .boss-type { order: 3; padding: 0 12px; }
  .page-boss .wb-strip { order: 5; padding: 12px 12px 0; gap: 6px 18px; }
  .page-boss .wb-demo { order: 6; padding: 0 12px; }
  .page-boss .wb-name { font-size: var(--t-m); }
  .page-boss .wb-hp-row { gap: 2px 10px; }
  .page-boss .wb-hpnum b { font-size: var(--t-l); }
  .page-boss .boss-bar { margin-top: 6px; }
  .page-boss .wb-mini { display: none; }
  .page-boss .wb-status { max-width: calc(100% - 24px); left: 8px; top: 8px; }
  .page-boss .wb-flag { font-size: var(--t-xs); padding: 6px 8px; }
  .page-boss .wb-flag b { font-size: var(--t-xs); }
  .page-boss .wb-tip { bottom: 8px; font-size: 13px; }
  .page-boss .wb-mech { min-height: 58px; padding: 8px 0 4px; }
  .page-boss .wb-chip { padding: 6px 9px 8px; gap: 8px; }
  .page-boss .wb-chip .w { font-size: 17px; }
  .page-boss .wb-chip.first .w { font-size: 20px; }
  .page-boss .bq-line { font-size: 28px; }
  .page-boss .bq-next { font-size: 17px; gap: 0 14px; }
  .page-boss .wb-boardbtn { margin-left: 0; }
  .page-boss .wb-boardbtn kbd { display: none; }
  .page-boss .wb-label { font-size: 13px; padding: 3px 5px; }
  .page-boss .wb-label.block { font-size: 17px; }
  .page-boss .wb-you { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-boss .boss-board th:nth-child(4), .page-boss .boss-board td:nth-child(4) { display: none; }
  .page-boss .boss-down { padding: 14px 12px; }
  .page-boss .wb-res-main { gap: 12px 22px; }
  .page-boss .wb-res-main b { font-size: var(--t-l); }
  .page-boss .boss-down-in h2 { font-size: var(--t-l); }
}
.lb-boss { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px; }
.lb-boss > div { display: grid; gap: 4px; }
.lb-note { margin-bottom: 8px; font: 400 14px/1.4 var(--f-label); }
.room-plan { width: 40px; height: 34px; flex: none; }
.lb-boss .mid { color: var(--accent); }
@media (max-width: 640px) {
  .lb-boss { grid-template-columns: 1fr 1fr; }
}

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 200px; max-width: 340px;
  font: 400 15px/1.3 var(--f-label); color: var(--ink); padding: 11px 14px;
  background: rgba(var(--bg-2-rgb),.96); border: 1px solid var(--accent); box-shadow: 0 0 16px rgba(var(--accent-rgb),.35);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  animation: toast-in 220ms ease-out;
}
.toast b { font-family: var(--f-mono); font-weight: 600; }
.toast.t-coin { border-color: var(--gold); box-shadow: 0 0 14px rgba(242,194,48,.35); }
.toast.t-coin b { color: var(--gold); }
.toast.t-level b, .toast.t-ach b { color: var(--accent); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.out { opacity: 0; transform: translateX(16px); transition: opacity 250ms, transform 250ms; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.out { transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .prof { grid-template-columns: 1fr 1fr; }
  .prof .col.mid-col { grid-column: 1 / -1; grid-row: 1; }
  .type-bottom { grid-template-columns: 1fr 1fr; }
  .type-bottom > :first-child { grid-column: 1 / -1; }
  .statrow { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .statrow > div:nth-child(4) { border: 0; padding-left: 4px; }
}
@media (max-width: 900px) {
  .type-stats, .lb-head, .lb, .shop, .play-head { grid-template-columns: minmax(0, 1fr); }
  .cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .lb-side { grid-template-columns: 1fr 1fr; }
  .lb > section { order: -1; }
}
@media (max-width: 640px) {
  .page { padding: 14px 12px 36px; }
  .panel { padding: 14px 14px; }
  .grid2, .grid3, .type-bottom, .prof, .lb-side { grid-template-columns: 1fr; }
  .prof .col.mid-col { grid-row: auto; }
  .type-top { grid-template-columns: 1fr; }
  .type-opts .row { flex-wrap: wrap; gap: 6px; }
  .statrow { grid-template-columns: 1fr 1fr; }
  .statrow > div { padding: 2px 10px; }
  .statrow > div:nth-child(odd) { border: 0; padding-left: 4px; }
  .statrow > div:nth-child(4) { border-left: 1px solid var(--line-2); padding-left: 10px; }
  .type-text { padding: 14px 14px 16px; }
  .type-window { font-size: 19px; }
  .result { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .chart-wrap { grid-template-columns: 1fr; }
  .side-nums { grid-template-columns: 1fr 1fr; }
  .who-card { grid-template-columns: 96px minmax(0, 1fr); }
  .who-card .av { width: 96px; height: 96px; }
  .totals { grid-template-columns: 1fr 1fr; }
  .shop-hero { grid-template-columns: 1fr; padding: 18px; }
  .cats { display: flex; overflow-x: auto; scrollbar-width: none; }
  .cats button { flex: none; }
  .shop > aside .btn { display: none; }
  .shop-bar input[type=search] { width: 100%; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .board .rank { width: 40px; }
  .board td, .board th { padding: 8px 8px; }
  .board .hide-sm, .room-plan { display: none; }
  .sessions .hide-sm { display: none; }
  .toasts { left: 12px; right: 12px; bottom: 12px; justify-items: stretch; }
  .toast { max-width: none; }
}

/* ---------- entrance (js/app/intro.js) ----------
   The <head> script adds .intro and .intro-cover on a first visit to #/home. The cover hides
   the page until the intro canvas has drawn its first frame. */
html.intro-cover::before { content: ""; position: fixed; inset: 0; z-index: 199; background: var(--bg); }
.intro-ov { position: fixed; inset: 0; z-index: 200; cursor: pointer; touch-action: none; }
.intro-ov canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.intro-ov.out { opacity: 0; transition: opacity .34s ease-out; }
.intro-ov.out-fast { opacity: 0; transition: opacity .25s ease-out; }
.intro-ov.calm.out { transition: opacity .65s ease; }
.intro-skip {
  position: absolute; right: 22px; bottom: 20px; z-index: 1;
  font: 400 15px/1 var(--f-label); letter-spacing: .08em;
  color: var(--ink-2); background: rgba(var(--bg-rgb),.7); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 14px; cursor: pointer;
}
.intro-skip::before { content: "[ "; color: var(--accent); }
.intro-skip::after { content: " ]"; color: var(--accent); }
.intro-skip:hover, .intro-skip:focus-visible { color: var(--ink); border-color: var(--accent); }
.foot-replay { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.foot-replay:hover { color: var(--accent); }
@media print { .intro-ov { display: none; } }

/* the click-to-type note says tap on touch screens */
.focus-note .fn-tap { display: none; }
@media (hover: none) and (pointer: coarse) {
  .focus-note .fn-key { display: none; }
  .focus-note .fn-tap { display: inline; }
}

/* ---------- the game picker (#/play on its own) ----------
   A list of games you start by typing their name, beside a screen that plays a small scene
   of the game under the cursor. --c is the game's colour. */
.page-play.picking .game-tabs { display: none; }
.play-home { color: inherit; text-decoration: none; }
.pk { --c: var(--accent); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.pk-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pk-row {
  --c: var(--accent); position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 14px; align-items: baseline;
  padding: 11px 16px 10px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: background-color 150ms, opacity 150ms;
}
.pk-n { font: 400 13px/1 var(--f-label); color: var(--ink-3); }
.pk-name { font: 700 clamp(26px, 3vw, 40px)/1.05 var(--f-head); letter-spacing: .01em; color: var(--ink-2); white-space: nowrap; }
.pk-name span.ok { color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 60%, transparent); }
.pk-mode { font: 400 13px/1 var(--f-label); letter-spacing: .06em; color: var(--ink-2); padding: 4px 8px; border: 1px solid var(--line); }
.pk-sub { grid-column: 2 / -1; margin-top: 4px; font: 400 14px/1.35 var(--f-head); color: var(--ink-2); }
.pk-row.on { background: color-mix(in srgb, var(--c) 8%, transparent); }
.pk-row.on .pk-name { color: var(--ink); }
.pk-row.on .pk-name::after {
  content: ''; display: inline-block; width: .5em; height: .82em; margin-left: .12em; vertical-align: -.06em;
  background: var(--c); box-shadow: 0 0 12px var(--c); animation: pk-blink 1s steps(2) infinite;
}
.pk-row.on .pk-n { color: var(--ink-2); }
.pk-row.on .pk-sub { color: var(--ink); }
.pk-row.on .pk-mode { color: var(--c); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.pk-row:focus-visible { outline: 2px solid var(--c); outline-offset: -2px; }
.pk-row.dim { opacity: .28; }
.pk-row.go { animation: pk-go 260ms steps(3) forwards; }
@keyframes pk-blink { 50% { opacity: 0; } }
@keyframes pk-go { 0%, 66% { background: var(--c); } 33%, 100% { background: color-mix(in srgb, var(--c) 20%, transparent); } }
.pk-row.go .pk-name, .pk-row.go .pk-n, .pk-row.go .pk-sub { color: var(--bg); text-shadow: none; }

.pk-cmd { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 10px 14px; font: 400 20px/1 var(--f-mono); }
.pk-ps { color: var(--ink-3); }
.pk-in { color: var(--ink); white-space: pre; }
.pk-caret { width: 11px; height: 22px; background: var(--accent); box-shadow: var(--glow); animation: pk-blink 1s steps(2) infinite; }
.pk-hint { margin-left: 6px; font: 400 15px/1.2 var(--f-head); color: var(--ink-2); }
.pk-cmd.bad .pk-caret { background: var(--red); box-shadow: 0 0 12px var(--red); }
.pk-cmd.shake { animation: pk-shake 220ms linear; }
@keyframes pk-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.pk-side { position: sticky; top: 92px; display: grid; gap: 18px; }
.pk-screen {
  position: relative; aspect-ratio: 16 / 10; background: var(--bg); overflow: hidden;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 0 40px -18px var(--c);
}
.pk-screen canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* scanlines and a dark edge, like a CRT */
.pk-screen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 70px rgba(0,0,0,.75);
}
.pk-tag { position: absolute; right: 10px; bottom: 8px; z-index: 1; font: 400 12px/1 var(--f-label); color: var(--c); letter-spacing: .06em; }
.pk-info h2 { margin: 0 0 6px; font: 700 30px/1.05 var(--f-head); color: var(--c); text-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.pk-info p { margin: 0 0 10px; color: var(--ink-2); font: 400 16px/1.45 var(--f-head); max-width: 52ch; text-wrap: pretty; }
.pk-info .pk-me { font: 400 14px/1.3 var(--f-mono); color: var(--accent); }
.pk-info .btn { margin-top: 6px; }

/* on a short window the screen gives up height so the Start button stays in view */
@media (min-width: 861px) { .pk-screen { max-height: max(240px, 100svh - 420px); } }
@media (max-width: 860px) {
  .pk { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pk-side { position: static; order: -1; }
  .pk-screen { aspect-ratio: 16 / 8; }
  .pk-info { display: none; }
  .pk-name { font-size: 28px; }
}
@media (hover: none) { .pk-cmd { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .pk-row.on .pk-name::after, .pk-caret { animation: none; }
  .pk-row.go, .pk-cmd.shake { animation: none; }
}

/* theme picker on the profile page: each swatch is a small terminal in that theme's colours */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.theme-sw { display: grid; gap: 4px; padding: 6px; text-align: left; text-transform: none; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink); cursor: pointer; font: inherit; }
.theme-sw:hover { border-color: var(--line); }
.theme-sw[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-prev { display: block; height: 46px; padding: 6px 8px; background: var(--sw-bg); border: 1px solid color-mix(in srgb, var(--sw-a) 35%, transparent); border-radius: var(--r); }
.theme-prev i { display: block; font: 400 12px/1.3 var(--f-mono); font-style: normal; color: var(--sw-a); white-space: nowrap; overflow: hidden; }
.theme-prev b { display: block; margin-top: 7px; height: 4px; width: 62%; background: var(--sw-a); }
.theme-name { font: 600 13px/1.2 var(--f-head); text-transform: uppercase; }
.theme-note { font: 400 11px/1.2 var(--f-label); color: var(--ink-2); }
.item .item-desc { margin: 2px 0 6px; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
/* testing only, removed before launch (js/state.js, test coins) */
.shop-wallet { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.test-coins[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); }
/* the training raid (js/app/boss.js #/boss/training) */
.wb-cover-alt { display: inline-block; margin-left: 14px; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.wb-cover-alt:hover { color: var(--accent); }
.wb-trained { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--accent-dim); }
.wb-trained h3 { margin: 0 0 4px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.wb-trained p { margin: 0 0 10px; color: var(--ink); }
.wb-over .btn.out { margin-left: 10px; }
/* surprise drops: the boost on the nav coins and in the gift crate (REWARDS.drops) */
.coins .coin-boost { margin-left: 6px; padding: 1px 5px; font: 600 11px/1.3 var(--f-mono); color: var(--bg); background: var(--gold); }
.gift-item .gift-boost { font: 700 44px/1 var(--f-mono); color: var(--gold); text-shadow: 0 0 14px rgba(242,194,48,.5); }
.gift-dlg .label.gold { color: var(--gold); }
/* a seasonal item's days left (REWARDS.shop.gear from/until) */
.item .ltd { display: inline-block; margin: 0 6px 6px 0; padding: 2px 6px; font: 600 11px/1.2 var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--bg); background: var(--red, #ff4d5e); }
/* Calm chips (Gid, 25 Nov 2026): the word block is where the eyes stay. A chip's word sits dim
   until its timer runs low or you start typing it, and bonus chips (gifts, weak points) stay quieter */
.page-boss .wb-chip .w { color: var(--ink-2); }
.page-boss .wb-chip.late .w, .page-boss .wb-chip.on .w, .page-boss .wb-chip.first .w { color: var(--ink); }
.page-boss .wb-chip .bar i { transition: none; }
.page-boss .wb-chip.k-gift, .page-boss .wb-chip.k-weak { opacity: .7; }
.page-boss .wb-chip.k-gift.on, .page-boss .wb-chip.k-weak.on { opacity: 1; }

/* The words are the focus (Gid, 26 Nov 2026): on wider screens the attack chips sit inside the
   arena's bottom-right corner, just above the end of the first word line, big enough to read at a
   glance, so the centre of the screen holds only the words. The stack grows upward into the arena.
   The tag over the boss is kept small for the same reason. */
@media (min-width: 701px) {
  .page-boss .boss-type { position: relative; }
  .page-boss .boss-type > .wb-mech {
    position: absolute; bottom: calc(100% + 14px); right: 14px; width: 250px; min-height: 0; padding: 0; z-index: 4;
    display: flex; flex-direction: column-reverse; align-items: stretch; gap: 6px; pointer-events: none;
  }
  .page-boss .wb-chips { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 6px; }
  .page-boss .wb-chip {
    display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; padding: 8px 14px 11px;
    background: linear-gradient(var(--kb), var(--kb)), rgba(var(--bg-0-rgb), .86); box-shadow: inset 3px 0 0 var(--k);
  }
  .page-boss .wb-chip small { grid-column: 1 / -1; font-size: var(--t-s); }
  .page-boss .wb-chip .w, .page-boss .wb-chip.first .w { font-size: 26px; overflow: hidden; text-overflow: ellipsis; }
  .page-boss .wb-chip .secs { font-size: var(--t-m); }
  .page-boss .wb-chip.late { background: linear-gradient(var(--kl), var(--kl)), rgba(var(--bg-0-rgb), .9); }
  .page-boss .wb-chip.on { background: rgba(var(--bg-0-rgb), .95); box-shadow: inset 0 0 0 1px var(--k), inset 3px 0 0 var(--k); }
  .page-boss .wb-next { text-align: right; padding: 4px 2px; text-shadow: 0 1px 3px #000; }
}
.page-boss .wb-label.block { font-size: 16px; padding: 4px 8px; }
@media (max-width: 700px) {
  .page-boss .boss-type { display: flex; flex-direction: column; }
  .page-boss .boss-type > .typebox { order: 1; }
  .page-boss .boss-type > .wb-mech { order: 2; justify-content: flex-start; }
  .page-boss .boss-type > :not(.typebox):not(.wb-mech) { order: 3; }
  .page-boss .wb-chips { justify-content: flex-start; }
}

/* ---------- World Boss: the special words live in your line (Gid, 27 Nov 2026) ----------
   A block, a cover, a dodge, a packet, a bug, a squad call or an earned spell takes over the next
   words of your line. Each kind has its own colour and the timed ones a timer line under them. */
.fw.tag { color: var(--kc); }
.fw.tag .fw-tbar { background: var(--kc); opacity: .85; }
.fw.cur.tag::after { background: color-mix(in srgb, var(--kc) 12%, transparent); }
.fw.tag i.ok { color: var(--ink-hi); }
.fw.t-block  { --kc: #ff6b78; }
.fw.t-assist { --kc: #3ee6ff; }
.fw.t-dodge  { --kc: #ffd23d; }
.fw.t-return, .fw.t-packet { --kc: #6bffb8; }
.fw.t-crowd  { --kc: #f2c230; }
.fw.t-add    { --kc: #c58bff; }
.fw.t-heal, .fw.t-revive, .fw.t-cover { --kc: #8fe8a0; }
.fw.t-fix    { --kc: #ffb36b; }
.fw.t-weak   { --kc: #ffcf4a; font-weight: 600; }
.fw.t-boost  { --kc: #7fd8ff; }
.fw.t-spell  { --kc: var(--sc, #ff5cf0); text-shadow: 0 0 10px color-mix(in srgb, var(--kc) 55%, transparent); }
.fw.done.was-block i.ok, .fw.done.was-assist i.ok { color: var(--cyan); }
/* coming, not open yet: the colour without the timer, and it can already be typed (it waits armed) */
.fw.tag.soon { color: color-mix(in srgb, var(--kc) 70%, var(--ink-3)); }
.fw-lbl { position: absolute; left: 0; top: -.5em; font: 700 .42em/1 var(--f-label); letter-spacing: .06em; color: var(--kc); white-space: nowrap; pointer-events: none; text-shadow: 0 1px 2px #000; }
.fw-lines { padding-top: .3em; height: calc(var(--fw-lines, 3) * 1.6em + .3em); }
.fw.tag.soon.first { text-decoration: underline dotted color-mix(in srgb, var(--kc) 60%, transparent); text-underline-offset: .28em; }
.fw.done.was-spell i.ok { color: #ff9bf5; }
/* the raid's shield on the arena while a block attack winds up */
.page-boss .wb-shieldbar { position: absolute; inset: auto auto 14px 50%; width: max-content; height: auto; transform: translateX(-50%); z-index: 5; display: grid; justify-items: center; gap: 5px;
  padding: 7px 12px 6px; border-radius: 8px; background: rgba(5,10,14,.62); pointer-events: none; }
.page-boss .wb-shieldbar[hidden] { display: none; }
.page-boss .wd-cells { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 520px; }
.page-boss .wd-cells i { width: 9px; height: 11px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(255,255,255,.14); transition: background 150ms, transform 150ms; }
.page-boss .wd-cells i.me { background: rgba(255,255,255,.32); }
.page-boss .wd-cells i.on { background: #3ee6ff; transform: scale(1.15); }
.page-boss .wb-shieldbar b { font: 600 12px/1 var(--f-head); color: var(--ink-2); letter-spacing: .04em; }
.page-boss .wb-banner .in.team b { color: #3ee6ff; }

.page-boss .boss-type { position: relative; }

/* the 3, 2, 1, GO before a game (TT.countdown) */
.count3 { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font: 700 clamp(72px, 11vw, 150px)/1 var(--f-head); color: var(--ink); text-shadow: 0 0 24px rgba(var(--accent-rgb, 57,255,136), .55), 0 4px 0 rgba(0,0,0,.6); }
.count3.go { color: var(--accent); }
.count3.tick { animation: count3 1s var(--ease-out, ease-out); }
@keyframes count3 { 0% { transform: scale(1.6); opacity: 0; } 18% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .count3.tick { animation: none; } }

/* ---------- leaving a fight, the Esc menu and the result (js/app/game-guard.js, Gid 28 Nov 2026) ---------- */
dialog.gg {
  width: min(440px, calc(100% - 32px)); max-height: calc(100svh - 48px); overflow: auto;
  color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
dialog.gg[data-mode="result"] { width: min(560px, calc(100% - 32px)); border-color: var(--accent-dim); }
dialog.gg::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
dialog.gg h2 { font: 700 24px/1.2 var(--f-head); color: var(--ink-hi); margin: 0 0 10px; }
dialog.gg p { color: var(--ink-2); margin: 0 0 14px; line-height: 1.45; }
dialog.gg .gg-note { color: var(--gold); font-size: 14px; }
.gg-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.gg-col { display: grid; gap: 10px; margin-top: 8px; }
.gg-col .btn { justify-content: center; }
.gg-end { color: var(--red) !important; border-color: rgba(255,77,94,.4) !important; background: rgba(255,77,94,.06) !important; }
.gg-label { display: block; font: 400 12px/1 var(--f-label); letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.gg-sub { font-size: 14px; }
.gg-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); margin: 4px 0 16px; }
.gg-stats div { background: var(--bg-2); padding: 10px 12px; }
.gg-stats dt { font: 400 11px/1.2 var(--f-label); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.gg-stats dd { font: 600 20px/1.3 var(--f-mono); color: var(--ink-hi); margin: 4px 0 0; }
.gg-stats dd small { font-size: 12px; color: var(--ink-2); margin-left: 4px; }
.gg-gain { display: flex; align-items: center; gap: 8px; font: 400 16px/1.2 var(--f-head); }
.gg-gain svg { width: 22px; height: 22px; }
.gg-gain b { font-family: var(--f-mono); color: var(--gold); }
.gg-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.gg-share > span { font: 400 12px/1 var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-right: auto; }
.wb-res-share, .re-share, .sb-share { margin-top: 16px; }

/* your operator on a result screen (GameGuard.operator, Gid 4 Dec 2026): beside the stats, never above them.
   Each result makes room for it on the right (:has(> .res-op)) from 900 px up; narrower, it isn't shown */
.res-op { position: absolute; top: var(--op-top, 14px); right: var(--op-right, 14px); width: var(--op-w, 190px); height: var(--op-h, 300px); pointer-events: none; z-index: 1; }
.res-op canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .7s ease-out; }
.res-op.on canvas { opacity: 1; }
@media (max-width: 899.98px) { .res-op { display: none; } }
@media (prefers-reduced-motion: reduce) { .res-op canvas { transition: none; } }
dialog.gg .gg-op { --op-w: 190px; --op-top: 24px; --op-right: 22px; height: auto; bottom: 24px; max-height: 380px; }
@media (min-width: 900px) {
  dialog.gg[data-mode="result"]:has(> .res-op) { width: min(780px, calc(100% - 32px)); min-height: 330px; padding-right: 234px; }
}
/* the World Boss: right of the column when the stage has the room, else not at all */
.page-boss .boss-down { container-type: inline-size; }
.page-boss .boss-down-in { position: relative; }
.page-boss .boss-down .res-op { --op-w: 200px; --op-h: 400px; --op-top: 0px; --op-right: 0px; }
@container (min-width: 1000px) { .page-boss .boss-down-in:has(> .res-op) { width: min(940px, 100%); padding-right: 220px; } }
@container (max-width: 999.98px) { .page-boss .boss-down .res-op { display: none; } }

/* How to play, in the empty space left of the World Boss column. Open by default on wide screens;
   under that width it opens over the page from the "How to play" button */
.wb-guide {
  position: fixed; z-index: 30; left: 16px; top: calc(var(--top-h, 68px) + 20px); bottom: 84px;
  width: clamp(250px, calc((100vw - var(--wb-w)) / 2 - 40px), 340px);
  overflow: auto; overscroll-behavior: contain; padding: 16px 16px 20px;
  background: rgba(var(--bg-2-rgb),.92); border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 14px; line-height: 1.45; color: var(--ink);
  scrollbar-width: thin;
}
.wb-guide[hidden] { display: none; }
.wb-guide h2 { font: 700 18px/1.2 var(--f-head); color: var(--ink-hi); margin: 0 0 4px; display: flex; align-items: center; justify-content: space-between; }
.wb-guide h3 { font: 400 11px/1 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 18px 0 8px; }
.wb-guide p { margin: 0 0 8px; color: var(--ink-2); }
.wb-guide ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wb-guide li { color: var(--ink-2); }
.wb-guide li b { color: var(--ink-hi); font-weight: 600; }
.wb-guide .gd-key li { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: baseline; }
.wb-guide .gd-w { font: 600 13px/1.2 var(--f-mono); color: var(--kc); text-shadow: 0 0 8px color-mix(in srgb, var(--kc) 45%, transparent); }
.wb-guide .gd-tiers li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; font-family: var(--f-mono); font-size: 13px; }
.wb-guide .gd-tiers i { font-style: normal; color: var(--accent); }
.wb-guide-x { background: none; border: 0; color: var(--ink-2); font: 400 22px/1 var(--f-head); cursor: pointer; padding: 2px 6px; }
.wb-guide-x:hover { color: var(--ink-hi); }
.wb-howbtn { margin-left: 8px; }
@media (max-width: 1599px) { .wb-guide { box-shadow: 0 20px 60px rgba(0,0,0,.6); } }

/* ---------- the World Boss on a laptop or desktop screen (Gid, 4 Dec 2026: "if it's 100% the whole map should fit
   16:9 screen", "whenever there's some empty space left on the side, it looks weird") ----------
   From 1280 px wide the squad, the stats and the demo note move into a column on the right, so the arena takes the full
   height the page has and the whole fight fits the window with nothing below it to scroll to. With How to play open
   on a wide screen, the fight starts right of it instead of sitting under it. */
@media (min-width: 1280px) {
  .page-boss .wb:not(.wbt):not(.rush-fight) {
    --side-w: clamp(250px, 17vw, 330px);
    max-width: none; margin: 0; display: grid; column-gap: 16px;
    grid-template-columns: minmax(0, 1fr) var(--side-w);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: "hp hp" "stage squad" "type strip" "type demo";
  }
  .page-boss .wb:not(.wbt):not(.rush-fight) > .boss-hpbox { grid-area: hp; }
  .page-boss .wb:not(.wbt):not(.rush-fight) > .boss-stage { grid-area: stage; --stage-h: clamp(300px, calc(100svh - var(--reserve)), 1100px); }
  .page-boss .wb:not(.wbt):not(.rush-fight) > .boss-type { grid-area: type; }
  .page-boss .wb:not(.wbt):not(.rush-fight) > .wb-squad { grid-area: squad; grid-template-columns: minmax(0, 1fr); align-content: start; padding: 0; }
  .page-boss .wb:not(.wbt):not(.rush-fight) .wb-sqh { writing-mode: horizontal-tb; transform: none; align-self: start; padding: 2px 0 2px; }
  .page-boss .wb:not(.wbt):not(.rush-fight) > .wb-strip { grid-area: strip; justify-content: flex-start; align-content: flex-start; gap: 8px 18px; padding: 10px 0 0; }
  .page-boss .wb:not(.wbt):not(.rush-fight) > .wb-demo { grid-area: demo; justify-content: flex-start; text-align: left; align-self: start; }
}
@media (min-width: 1600px) {
  .page-boss:has(.wb-guide:not([hidden])) { padding-left: calc(clamp(250px, calc((100vw - 1200px) / 2 - 40px), 340px) + 32px); }
  .page-boss:has(.wb-guide:not([hidden])) .wb-guide { box-shadow: none; }
}

/* ---------- losing the link: the screen shuts down (game-guard.js shutdown, Gid 4 Dec 2026) ---------- */
.sd { position: fixed; inset: 0; z-index: 2147483000; pointer-events: auto; overflow: hidden; font-family: var(--f-mono); cursor: default; }
.sd-tint { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(60,0,8,.72), rgba(110,0,10,.85)); opacity: 0; transition: opacity 120ms linear; }
.sd.on .sd-tint { opacity: 1; }
.sd.calm .sd-tint { background: rgba(60,0,8,.45); }
.sd-msg { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); margin: 0; display: grid; gap: 10px; justify-items: center; text-align: center; z-index: 3; pointer-events: none; }
.sd-msg b { font: 700 clamp(28px, 5vw, 64px)/1 var(--f-mono); letter-spacing: .12em; color: #ff4d5e; text-shadow: 0 0 18px rgba(255,77,94,.7); opacity: 0; }
.sd-msg span { font: 600 clamp(14px, 1.8vw, 22px)/1 var(--f-mono); letter-spacing: .3em; color: #ffd0d4; opacity: 0; }
.sd.on .sd-msg b { opacity: 1; }
.sd.term .sd-msg span { opacity: 1; }
.sd.cut .sd-msg, .sd.dark .sd-msg { opacity: 0; transition: opacity 120ms linear; }
/* the TV switching off: black bars close from top and bottom to a line, then from the sides to a dot */
.sd-bar { position: absolute; background: #000; z-index: 2; }
.sd-bar.t, .sd-bar.b { left: 0; right: 0; height: 50.2%; transform: scaleY(0); transition: transform calc(var(--cut, 1000ms) * .45) cubic-bezier(.6,0,.9,.4); }
.sd-bar.t { top: 0; transform-origin: top; } .sd-bar.b { bottom: 0; transform-origin: bottom; }
.sd-bar.l, .sd-bar.r { top: 0; bottom: 0; width: 50.2%; transform: scaleX(0); transition: transform calc(var(--cut, 1000ms) * .3) cubic-bezier(.6,0,.9,.4) calc(var(--cut, 1000ms) * .45); }
.sd-bar.l { left: 0; transform-origin: left; } .sd-bar.r { right: 0; transform-origin: right; }
.sd.cut .sd-bar { transform: none; }
.sd-line { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: #fff; box-shadow: 0 0 14px 4px rgba(200,255,230,.9); z-index: 3; opacity: 0; transform: scaleX(1); }
.sd.cut .sd-line { animation: sdLine var(--cut, 1000ms) linear forwards; }
@keyframes sdLine { 0%, 38% { opacity: 0; transform: scaleX(1); } 45% { opacity: 1; transform: scaleX(1); } 78% { opacity: 1; transform: scaleX(.004); } 100% { opacity: 0; transform: scaleX(.004); } }
.sd.dark { background: #000; }
.sd-boot { position: absolute; left: 8vw; top: 40%; margin: 0; z-index: 4; font: 500 17px/1.8 var(--f-mono); color: var(--accent, #39ff88); white-space: pre; }
.sd-boot::after { content: '_'; animation: sdBlink 0.9s steps(1) infinite; }
@keyframes sdBlink { 50% { opacity: 0; } }
.sd.out { opacity: 0; transition: opacity 400ms linear; pointer-events: none; }
/* the picture jerking sideways, under the overlay */
#view.sd-jolt { animation: sdJolt 120ms steps(2) both; }
@keyframes sdJolt { 0% { transform: translateX(var(--sdx, -10px)); filter: hue-rotate(60deg) saturate(1.6); } 100% { transform: none; filter: none; } }
/* reduced motion: a fade to black and back, the words and the boot lines */
.sd.still .sd-bar, .sd.still .sd-line { display: none; }
.sd.still.cut { background: #000; transition: background 300ms linear; }
.sd.still .sd-boot::after { animation: none; }
.page-boss .wb-skip[hidden] { display: none; }
