/* Stick Lab. The look is taken from the controller itself: controller-white plastic (graphite in dark
   mode), and the four face-button colours used as meanings: A green = good or measured, B red = problem,
   X blue = action, Y yellow = caution. A live controller panel in the side rail is the one loud element;
   everything else stays quiet. One type family, Archivo: wide cut for headings, normal for text. */
:root {
  --bg: #e3e6e9;          /* controller-white plastic */
  --sheet: #f4f5f6;       /* raised surface */
  --sheet2: #eceef0;
  --field: #f8f9fa;       /* canvas background */
  --ink: #1f2327;         /* graphite */
  --muted: #5f6870;
  --line: #c9ced3;
  --signal: #1d6bd6;      /* X blue: actions, selection */
  --on-signal: #ffffff;
  --hot: #d8342b;         /* B red */
  --wz: #1d6bd6;
  --good: #2b9443;        /* A green */
  --warn: #9a6f00;        /* Y yellow, darkened for text */
  --yellow: #f0b81c;
  --bad: #d8342b;
  /* 3D range: a light concrete room */
  --room: #d9dde1; --floor: #cfd4d9; --grid: #bfc5cc; --gridStrong: #aab2bb; --wall: #dfe2e5; --wallFront: #e8eaec;
  --mark: #8d97a2; --block: #9aa3ad; --target: #1d6bd6; --dummy: #ff6a2b; --dummyDark: #2a2e33; --dummyHead: #f6d3ad; --enemy: #c8402c;
  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "Archivo", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18191b; --sheet: #212326; --sheet2: #1c1e20; --field: #141517; --ink: #e8e9ea; --muted: #9aa1a8; --line: #33363a;
    --signal: #4c93f0; --on-signal: #0d1420; --hot: #f05a50; --wz: #4c93f0; --good: #4cc067; --warn: #f0b81c; --yellow: #f0b81c; --bad: #f05a50;
    --room: #2a2d31; --floor: #24272a; --grid: #33373c; --gridStrong: #3f444a; --wall: #2c2f33; --wallFront: #313439;
    --mark: #4a5058; --block: #3a3f45; --target: #4c93f0; --dummy: #ff6a2b; --dummyDark: #15171a; --dummyHead: #f6d3ad; --enemy: #e0503a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18191b; --sheet: #212326; --sheet2: #1c1e20; --field: #141517; --ink: #e8e9ea; --muted: #9aa1a8; --line: #33363a;
  --signal: #4c93f0; --on-signal: #0d1420; --hot: #f05a50; --wz: #4c93f0; --good: #4cc067; --warn: #f0b81c; --yellow: #f0b81c; --bad: #f05a50;
  --room: #2a2d31; --floor: #24272a; --grid: #33373c; --gridStrong: #3f444a; --wall: #2c2f33; --wallFront: #313439;
  --mark: #4a5058; --block: #3a3f45; --target: #4c93f0; --dummy: #ff6a2b; --dummyDark: #15171a; --dummyHead: #f6d3ad; --enemy: #e0503a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
a { color: inherit; }
button { font: inherit; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* frame: side rail with the live controller, content to the right */
.app { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--line); }
.mark { font-weight: 800; font-stretch: 125%; font-size: 1.7rem; line-height: 1; letter-spacing: -.01em; text-decoration: none; }
.markline { margin: -10px 0 0; color: var(--muted); font-size: .88rem; }
.device { background: var(--sheet); border-radius: 18px; padding: 12px 12px 10px; display: grid; gap: 8px; }
.device canvas { width: 100%; height: auto; display: block; }
/* live controller drawing: flat illustration, white body with a heavy outline.
   --acc is the look's accent (Xbox black, PlayStation red); pressed parts turn X blue. */
.pad { width: 100%; height: auto; display: block; overflow: visible; --outline: #15171a; --white: #fbfbfa; --pressed: #2f7cf6; }
.pad-xbox { --acc: #1b1d21; --cap: #3a3e44; --capi: #2b2e33; --faceBg: #1b1d21; }
.pad-ps { --acc: #d93a32; --cap: #d93a32; --capi: #b82b25; --faceBg: #2c2f35; }
.pad .body { fill: var(--white); stroke: var(--outline); stroke-width: 8; stroke-linejoin: round; }
.pad .outline { fill: none; stroke: var(--outline); stroke-width: 8; stroke-linejoin: round; }
.pad .acc { fill: var(--acc); }
.pad .trig-shell { stroke: var(--outline); stroke-width: 7; stroke-linejoin: round; }
.pad .trig-fill { fill: var(--pressed); }
.pad .trig-txt { font: 700 17px var(--font); fill: rgba(255, 255, 255, .85); }
.pad .bump { stroke: var(--outline); stroke-width: 4; }
.pad .bumpS { fill: none; stroke: var(--acc); stroke-width: 14; stroke-linecap: round; }
.pad .bumpS.on { stroke: var(--pressed); }
.pad .touch { stroke: none; }
.pad .tiny { font: 600 13px var(--font); fill: #3a3e44; }
.pad .dot { fill: #2b2e33; }
.pad .disc { fill: #17191c; }
.pad .well { fill: #e9ebed; stroke: #c9cdd2; stroke-width: 3; }
.pad .ring { fill: none; stroke: var(--outline); stroke-width: 2.5; stroke-dasharray: 5 6; }
.pad .capc { fill: var(--cap); stroke: var(--outline); stroke-width: 3; }
.pad .capi { fill: none; stroke: var(--capi); stroke-width: 4; }
.pad .home { fill: #1b1d21; }
.pad .home-i { fill: none; stroke: #e9ebed; stroke-width: 3; pointer-events: none; }
.pad .fb { fill: var(--faceBg); }
.pad .fl { font: 800 19px var(--font); fill: var(--c); }
.pad .sym { fill: none; stroke: var(--c); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.pad .on { fill: var(--pressed); }
.pad .face.on .fb { fill: var(--c); }
.pad .face.on .fl { fill: #fff; }
.pad .face.on .sym { stroke: #fff; }
.pad .done:not(.on) { fill: #3fb950; }
.pad .bumpS.done:not(.on) { stroke: #3fb950; }
.pad .face.done:not(.on) .fb { fill: color-mix(in srgb, #3fb950 55%, var(--faceBg)); }
.looks { display: flex; gap: 2px; background: var(--sheet2); border-radius: 99px; padding: 3px; justify-self: start; }
.looks button { font-size: .8rem; font-weight: 600; border: 0; background: transparent; color: var(--muted); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.looks button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 28, .18); }
.status { font-size: .84rem; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.status i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.status.on i, .status.elite i { background: var(--good); }
.status.bad i { background: var(--bad); }
.status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: grid; gap: 2px; }
.tabs a { text-decoration: none; font-size: 1.02rem; font-weight: 500; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
.tabs a:hover { color: var(--ink); background: var(--sheet2); }
.tabs a.on { color: var(--ink); font-weight: 700; background: var(--sheet); box-shadow: inset 3px 0 0 var(--signal); }
.wrap { padding: 30px clamp(16px, 4vw, 48px) 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 1180px; min-width: 0; }

/* headings: wide cut, like the model names moulded into hardware */
.head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 14px; }
.head.spaced { margin-top: 36px; }
.head h2 { font-weight: 750; font-stretch: 125%; font-size: 1.9rem; line-height: 1.05; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.head p { margin: 0; color: var(--muted); font-size: .95rem; max-width: 64ch; }
h3.sub { font-weight: 700; font-stretch: 112%; font-size: 1.15rem; margin: 24px 0 8px; }
.note { color: var(--muted); font-size: .9rem; margin: 8px 0 0; max-width: 76ch; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 36px; }
.grid2 > * { min-width: 0; }
.panel { background: var(--sheet); border-radius: 16px; padding: 20px; min-width: 0; }

/* evidence labels: colour = how sure we are */
.tier { font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; background: color-mix(in srgb, currentColor 13%, transparent); }
.tier.measured, .tier.first-hand { color: var(--good); }
.tier.official { color: var(--signal); }
.tier.estimated, .tier.community { color: var(--warn); }
.tier.needs { color: var(--muted); }

/* controller facts */
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; font-size: .93rem; column-gap: 18px; }
.kv > span { padding: 7px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv > span:nth-child(odd) { color: var(--muted); }
.warnbox { padding: 10px 14px; margin-top: 12px; background: color-mix(in srgb, var(--yellow) 16%, var(--sheet)); border-radius: 10px; font-size: .92rem; }
.warnbox.bad { background: color-mix(in srgb, var(--bad) 13%, var(--sheet)); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; cursor: pointer; }
.checks input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--good); flex: none; }

/* game settings form: looks like the game's own settings list */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 18px; }
.sheet.narrow { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cell { padding: 8px 0 10px; border-bottom: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.cell:focus-within { border-bottom-color: var(--signal); box-shadow: 0 1px 0 var(--signal); }
.cell label { font-size: .82rem; color: var(--muted); }
.cell input, .cell select { font: inherit; font-size: 1.15rem; font-weight: 650; color: var(--ink); background: transparent; border: 0; padding: 0; width: 100%; }
.cell input:focus, .cell select:focus { outline: none; }
.cell select option { background: var(--sheet); color: var(--ink); }
.cell.wide { grid-column: 1 / -1; }
.calib > p { margin: 0 0 12px; max-width: 76ch; }
details.more { margin-top: 14px; font-size: .92rem; }
details.more summary { cursor: pointer; color: var(--signal); font-weight: 600; }
details.more p { margin: 8px 0 0; }

/* stick bench */
.bench { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 10px; font-size: .94rem; border-radius: 10px; }
.steps .n, .steps .s { font-size: .8rem; color: var(--muted); }
.steps li.done .s { color: var(--good); font-weight: 600; }
.steps li.now { background: var(--sheet); font-weight: 650; }
.steps li.now .n { color: var(--signal); }
.brief { display: grid; gap: 10px; align-content: start; }
.tagline { font-size: .86rem; color: var(--signal); font-weight: 600; }
.brief h3 { font-weight: 800; font-stretch: 125%; font-size: 1.7rem; line-height: 1; margin: 0; }
.brief p { margin: 0; font-size: .95rem; }
.key { font-size: .82rem; color: var(--muted); }
.field { min-width: 0; background: var(--field); border-radius: 18px; overflow: hidden; position: relative; }
.labpad { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 3%; }
.labpad .pad { width: auto; height: 100%; max-width: 100%; }
.field canvas { display: block; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; }

/* buttons: X blue is the action colour, as on the pad */
button.go { font-weight: 700; font-size: 1.02rem; background: var(--signal); color: var(--on-signal); border: 0; border-radius: 99px; padding: 10px 24px; cursor: pointer; }
button.go:hover { filter: brightness(1.08); }
button.go:active { transform: translateY(1px); }
button.plain { font-size: .9rem; font-weight: 600; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 7px 16px; cursor: pointer; }
button.plain:hover { border-color: var(--ink); }
button.plain.danger { border-color: var(--bad); color: var(--bad); }

/* tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; font-size: .84rem; color: var(--muted); padding: 0 14px 8px 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num { white-space: nowrap; }
td.dim { color: var(--muted); }
.grade { font-size: .86rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.grade::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.grade.ok::before { background: var(--good); }
.grade.meh::before { background: var(--yellow); }
.grade.bad::before { background: var(--bad); }
.labres { margin-top: 28px; display: grid; gap: 22px; }

/* training: drills as a row of pictogram tiles */
.drills { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.drill { text-align: left; background: transparent; border: 0; border-radius: 14px; padding: 10px 12px 12px; cursor: pointer; display: grid; gap: 4px; color: var(--ink); }
.drill svg { width: 56px; height: 34px; color: var(--muted); }
.drill:hover { background: var(--sheet2); }
.drill.on { background: var(--sheet); }
.drill.on svg { color: var(--signal); }
.drill .fam { display: none; }
.drill b { font-weight: 700; font-size: 1.02rem; line-height: 1.15; }
.drill .best { font-size: .8rem; color: var(--muted); }
.trainbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 16px 0 14px; }
.trainbar .lbl { font-size: .88rem; color: var(--muted); margin-right: 8px; }
.seg { display: inline-flex; background: var(--sheet2); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { font-weight: 600; font-size: .92rem; background: transparent; color: var(--muted); border: 0; border-radius: 99px; padding: 5px 14px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 24, 28, .18); }
.trainbar select { font: inherit; font-size: .92rem; font-weight: 600; color: var(--ink); background: var(--sheet); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; max-width: 100%; }
.trainbar .hint { font-size: .88rem; color: var(--muted); max-width: 64ch; flex-basis: 100%; order: 9; }
.trainbody { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.stage { position: relative; border-radius: 18px; background: var(--field); aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; }
.stage:fullscreen { border-radius: 0; aspect-ratio: auto; }
.stage canvas { display: block; width: 100%; height: 100%; }
.hud { position: absolute; inset: 0; pointer-events: none; }
.stamp { position: absolute; left: 14px; right: 14px; top: 12px; display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; font-weight: 650; }
.stamp span { background: rgba(255, 255, 255, .82); color: #1f2327; padding: 4px 12px; border-radius: 99px; }
.stamp span:empty { display: none; }
.cross { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.cross i { position: absolute; background: #ffffff; box-shadow: 0 0 0 1.5px rgba(20, 24, 28, .7); }
.cross i:nth-child(1) { width: 9px; height: 2px; left: -14px; top: -1px; }
.cross i:nth-child(2) { width: 9px; height: 2px; left: 5px; top: -1px; }
.cross i:nth-child(3) { width: 2px; height: 9px; left: -1px; top: -14px; }
.cross i:nth-child(4) { width: 2px; height: 9px; left: -1px; top: 5px; }
.cross.hit i { background: #4cc067; }
.cross.miss i { background: #f05a50; }
.count { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-stretch: 125%; font-size: clamp(4rem, 13vw, 9rem); color: #ffffff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; background: color-mix(in srgb, var(--bg) 78%, transparent); pointer-events: auto; padding: 16px; }
.idle .tagline { color: var(--muted); font-weight: 500; }
.idle b { font-weight: 800; font-stretch: 125%; font-size: clamp(1.9rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -.02em; }
.idle span:not(.tagline) { color: var(--muted); max-width: 46ch; }
.fs { position: absolute; right: 12px; bottom: 12px; background: var(--sheet) !important; }
.guide { display: grid; gap: 14px; }
.guide h3 { font-weight: 800; font-stretch: 125%; font-size: 1.4rem; line-height: 1.05; margin: 0; }
.guide .what { color: var(--muted); font-size: .9rem; }
.guide dl { margin: 0; display: grid; gap: 12px; }
.guide dt { font-weight: 700; font-size: .92rem; }
.guide dd { margin: 2px 0 0; font-size: .93rem; color: var(--muted); }
.guide dd.tip { color: var(--ink); background: color-mix(in srgb, var(--yellow) 18%, var(--sheet)); padding: 8px 10px; border-radius: 10px; }
.guide .diffline { font-size: .86rem; color: var(--muted); }
.legend { font-size: .86rem; color: var(--muted); margin: 10px 0 0; }
.legend b { color: var(--ink); font-weight: 650; }
.runres { margin-top: 24px; display: grid; gap: 14px; }
.big { display: flex; flex-wrap: wrap; gap: 8px 36px; }
.big div { display: grid; gap: 0; }
.big .k { font-size: .86rem; color: var(--muted); }
.big .v { font-weight: 750; font-stretch: 118%; font-size: 2rem; line-height: 1.1; }
.big div:first-child .v { color: var(--signal); }
button.go.benchbtn { background: var(--ink); color: var(--bg); }
.bars { display: grid; gap: 8px; max-width: 720px; }
.bar { display: grid; grid-template-columns: 140px minmax(0, 1fr) 52px; gap: 14px; align-items: center; font-size: .93rem; }
.bar .track { height: 8px; background: var(--sheet2); border-radius: 4px; overflow: hidden; }
.bar .track i { display: block; height: 100%; background: var(--signal); border-radius: 4px; }
.bar .v { text-align: right; font-weight: 650; }

/* advice: the change itself is the big thing */
.advice { display: grid; }
.adv { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(0, 2fr); gap: 6px 26px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.adv:first-child { border-top: 2px solid var(--ink); }
.adv .what { font-weight: 650; display: grid; gap: 6px; justify-items: start; }
.adv .nums { font-weight: 750; font-stretch: 118%; font-size: 2.1rem; line-height: 1; white-space: nowrap; }
.adv .nums s { color: var(--muted); font-weight: 500; text-decoration-thickness: 2px; }
.adv .nums em { font-style: normal; color: var(--signal); }
.adv .nums .to { font-size: 1rem; font-weight: 500; color: var(--muted); padding: 0 8px; vertical-align: middle; }
.adv .why { color: var(--muted); font-size: .93rem; min-width: 0; }
.adv.wait .nums { font-size: 1.2rem; color: var(--muted); }
.notes { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: .93rem; display: grid; gap: 5px; max-width: 80ch; }
.sheetsec { margin-bottom: 16px; }
.sheetsec h3.sub { margin: 14px 0 4px; }
td.set { font-weight: 750; font-size: 1.1rem; color: var(--signal); white-space: nowrap; }

/* prose */
.prose h3 { font-weight: 750; font-stretch: 115%; font-size: 1.25rem; margin: 26px 0 6px; }
.prose p { max-width: 72ch; margin: 0; }
footer { color: var(--muted); font-size: .84rem; padding-top: 14px; max-width: 80ch; }

@media (max-width: 1250px) { .trainbody { grid-template-columns: 1fr; } .bench { grid-template-columns: 1fr; } .bench .rail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; } .bench .field { order: -1; } }
@media (max-width: 700px) { .bench .rail { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .device { max-width: 420px; }
  .tabs { display: flex; flex-wrap: wrap; }
  .bench { grid-template-columns: 1fr; }
  .adv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.view { min-width: 0; }

/* ===== v4: menus, results, replay, ranks, profile, options ===== */
:root { --fam-flick: var(--signal); --fam-track: var(--good); --fam-switch: #c99400; --fam-control: var(--hot); }
kbd { font: 700 .72rem var(--font); border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; margin-left: 6px; opacity: .75; vertical-align: 1px; }
.dim { color: var(--muted); }
.right { margin-left: auto; }
.eyebrow-q { font-size: .88rem; color: var(--muted); font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--signal); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
a.lnk { display: inline-block; text-decoration: none; justify-self: start; }
a.plain.lnk { font-size: .9rem; font-weight: 600; border: 1px solid var(--line); border-radius: 99px; padding: 7px 16px; }
a.go.lnk { font-weight: 700; background: var(--signal); color: var(--on-signal); border-radius: 99px; padding: 10px 24px; }
.card { background: var(--sheet); border-radius: 16px; padding: 18px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card h3, .head.sm h3 { margin: 0; font-weight: 750; font-stretch: 112%; font-size: 1.08rem; }
.head.sm { margin-bottom: 10px; align-items: center; }
.head.sm a { font-size: .9rem; font-weight: 600; color: var(--signal); text-decoration: none; }
.grid2.tight { gap: 18px; margin: 18px 0; }
.mt { margin-top: 12px; }
code { font-size: .88em; background: var(--sheet2); padding: 1px 5px; border-radius: 5px; }

/* side rail: profile chip and nav groups */
.who { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; cursor: pointer; text-align: left; color: var(--ink); margin-top: -6px; }
.who:hover { border-color: var(--ink); }
.who-t { display: grid; min-width: 0; }
.who-t b { font-size: .98rem; line-height: 1.2; }
.who-t span { font-size: .8rem; color: var(--muted); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-stretch: 115%; flex: none; }
.av.xl { width: 76px; height: 76px; font-size: 2rem; }
.tabsep { height: 1px; background: var(--line); margin: 6px 12px; }
.padhint { font-size: .8rem; color: var(--muted); margin: auto 0 0; }

/* home */
.hello h2 { font-weight: 800; font-stretch: 125%; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.02; letter-spacing: -.02em; margin: 0; }
.hello p { margin: 6px 0 0; color: var(--muted); }
.homegrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 22px; margin-top: 22px; align-items: start; }
.homegrid .col { display: grid; gap: 22px; min-width: 0; }
.nextup { --fc: var(--signal); display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; background: var(--sheet); border-radius: 22px; padding: 22px; border-left: 8px solid var(--fc); }
.nu-art { aspect-ratio: 1; display: grid; place-items: center; background: color-mix(in srgb, var(--fc) 12%, var(--sheet2)); border-radius: 18px; color: var(--fc); }
.nu-art .pict { width: 120px; height: 74px; stroke-width: 2.4; }
.nu-t { display: grid; gap: 8px; }
.nu-t h3 { margin: 0; font-weight: 800; font-stretch: 125%; font-size: 2.2rem; line-height: 1; letter-spacing: -.02em; }
.nu-t p { margin: 0; color: var(--muted); }
.plrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.plcard { text-align: left; background: var(--sheet); border: 1px solid transparent; border-radius: 16px; padding: 14px; display: grid; gap: 4px; cursor: pointer; color: var(--ink); }
.plcard:hover, .plcard:focus-visible { border-color: var(--signal); }
.plcard b { font-size: 1rem; }
.plcard span { font-size: .84rem; color: var(--muted); }
.pldr { display: flex; gap: 2px; margin-top: 6px; color: var(--ink) !important; }
.pldr .pict { width: 30px; height: 18px; }
.recent { display: grid; gap: 2px; }
.rrow { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: transparent; border: 0; border-radius: 12px; padding: 8px 10px; text-align: left; color: var(--ink); cursor: pointer; }
.rrow:hover, .rrow:focus-visible { background: var(--sheet); }
.rrow .pict { width: 46px; height: 28px; color: var(--muted); }
.rrow > span:nth-child(2) { display: grid; min-width: 0; }
.rrow .dim { font-size: .84rem; }
.rrow .sc { font-weight: 750; font-stretch: 115%; font-size: 1.2rem; }
.side2 .card { gap: 12px; }
.st-top { display: flex; align-items: center; gap: 12px; }
.flame svg { width: 40px; height: 40px; fill: #ff7a2b; }
.bignum { font-weight: 800; font-stretch: 125%; font-size: 2.2rem; line-height: 1; margin-right: 6px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .78rem; color: var(--muted); font-weight: 600; }
.week span { display: grid; justify-items: center; gap: 4px; }
.week i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); }
.week .on i { background: #ff7a2b; border-color: #ff7a2b; }
.week .today { color: var(--ink); }
.week .today i { border-color: var(--ink); }
.week .fut i { opacity: .45; }
.mis { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: .93rem; }
.chk { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.mis.done .chk { background: var(--good); border-color: var(--good); box-shadow: inset 0 0 0 3px var(--sheet); }
.mis.done .mt { color: var(--muted); text-decoration: line-through; }
.mp { font-weight: 650; font-size: .86rem; }
.mbar { grid-column: 2 / -1; height: 5px; background: var(--sheet2); border-radius: 3px; overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--good); }
.rk { display: flex; gap: 14px; align-items: center; }
.rk > div, .rtier > div, .rankhero > div { display: grid; gap: 2px; }
.rkname { font-weight: 800; font-stretch: 125%; font-size: 1.5rem; line-height: 1.05; }
.rkname.xl { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
.prog { height: 8px; background: var(--sheet2); border-radius: 4px; overflow: hidden; }
.prog.wide { max-width: 360px; margin: 8px 0 2px; }
.prog i { display: block; height: 100%; background: var(--signal); border-radius: 4px; }

/* tier badge and chip */
.badge { position: relative; display: inline-grid; place-items: center; flex: none; }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.badge .b1 { fill: var(--tc); }
.badge .b2 { fill: color-mix(in srgb, var(--tc) 55%, #000); stroke: color-mix(in srgb, var(--tc) 70%, #fff); stroke-width: 3; }
.badge b { position: relative; color: #fff; font-weight: 800; font-stretch: 120%; font-size: .9em; }
.badge[style*="112px"] b { font-size: 1.6rem; }
.tchip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tchip i { width: 10px; height: 11px; background: var(--tc); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

/* library */
.search input { font: inherit; font-size: .95rem; border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; background: var(--sheet); color: var(--ink); min-width: 240px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filters button { font-weight: 600; font-size: .92rem; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.filters button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.dcard { --fc: var(--signal); position: relative; background: var(--sheet); border-radius: 18px; border-top: 5px solid var(--fc); }
.dmain { width: 100%; text-align: left; background: transparent; border: 0; padding: 16px 16px 14px; display: grid; gap: 4px; cursor: pointer; color: var(--ink); border-radius: 18px; }
.dmain:hover { background: var(--sheet2); }
.dmain .pict { width: 72px; height: 44px; color: var(--fc); }
.dmain .fam { font-size: .8rem; font-weight: 700; color: var(--fc); }
.dmain b { font-size: 1.2rem; font-weight: 750; font-stretch: 112%; line-height: 1.1; }
.dmain .dw { font-size: .88rem; color: var(--muted); }
.dfoot { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-top: 8px; font-size: .84rem; }
.fav { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.fav svg { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linejoin: round; }
.fav.on svg { fill: #f0b81c; stroke: #c99400; }
.fav:hover { background: var(--sheet2); }
.pls { display: grid; gap: 10px; }
.plitem { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; background: var(--sheet); border-radius: 16px; padding: 14px 16px; }
.plitem > div:first-child { display: grid; gap: 6px; min-width: 0; flex: 1 1 320px; }
.plitem .note { margin: 0; }
.plchips { display: flex; flex-wrap: wrap; gap: 6px; }
.plchips > span { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; background: var(--sheet2); border-radius: 99px; padding: 3px 10px 3px 6px; }
.plchips .pict { width: 26px; height: 16px; }
.plchips i { font-style: normal; color: var(--muted); }
.plchips .x { border: 0; background: transparent; color: var(--bad); cursor: pointer; font-weight: 700; }
.pldraft { background: var(--sheet); border-radius: 16px; padding: 14px 16px; display: grid; gap: 10px; border: 1px dashed var(--line); }
.pldraft select { font: inherit; font-size: .92rem; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); }

/* drill page */
.dp-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.pl-line { font-weight: 650; color: var(--signal); }
.setline { margin: 0; color: var(--muted); font-size: .9rem; flex-basis: 100%; }
.gtop { display: flex; justify-content: space-between; align-items: start; position: relative; }
.gtop .pict { width: 64px; height: 40px; color: var(--signal); }
.gtop .fav { position: static; }
.pause { background: color-mix(in srgb, #000 55%, transparent); color: #fff; }
.pause b { color: #fff; }
.pmenu { display: grid; gap: 8px; justify-items: stretch; min-width: 220px; }
.pmenu .plain { color: #fff; border-color: rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .2); padding: 9px 16px; }

/* crosshair styles from Options */
.cross i { background: var(--x-color, #fff); box-shadow: 0 0 0 1.5px var(--x-outline, rgba(20, 24, 28, .7)); }
.cross i:nth-child(1) { width: var(--x-size, 9px); height: var(--x-thick, 2px); left: calc(-1 * (var(--x-gap, 5px) + var(--x-size, 9px))); top: calc(var(--x-thick, 2px) / -2); }
.cross i:nth-child(2) { width: var(--x-size, 9px); height: var(--x-thick, 2px); left: var(--x-gap, 5px); top: calc(var(--x-thick, 2px) / -2); }
.cross i:nth-child(3) { width: var(--x-thick, 2px); height: var(--x-size, 9px); left: calc(var(--x-thick, 2px) / -2); top: calc(-1 * (var(--x-gap, 5px) + var(--x-size, 9px))); }
.cross i:nth-child(4) { width: var(--x-thick, 2px); height: var(--x-size, 9px); left: calc(var(--x-thick, 2px) / -2); top: var(--x-gap, 5px); }
.cross b { position: absolute; display: none; width: calc(var(--x-thick, 2px) + 2px); height: calc(var(--x-thick, 2px) + 2px); left: calc((var(--x-thick, 2px) + 2px) / -2); top: calc((var(--x-thick, 2px) + 2px) / -2); border-radius: 50%; background: var(--x-color, #fff); box-shadow: 0 0 0 1.5px var(--x-outline, rgba(20, 24, 28, .7)); }
.cross[data-style="dot"] i { display: none; }
.cross[data-style="dot"] b, .cross[data-style="crossdot"] b { display: block; }
.cross[data-style="circle"] i { display: none; }
.cross[data-style="circle"] b { display: block; background: transparent; border: var(--x-thick, 2px) solid var(--x-color, #fff); width: calc(var(--x-size, 9px) * 2); height: calc(var(--x-size, 9px) * 2); left: calc(-1 * var(--x-size, 9px)); top: calc(-1 * var(--x-size, 9px)); }
.cross.hit i, .cross.hit b { background: #4cc067; }
.cross.miss i, .cross.miss b { background: #f05a50; }
.cross[data-style="circle"].hit b { background: transparent; border-color: #4cc067; }
.hud-notimer #hudLeft { visibility: hidden; }
.hud-nostats #hudRight { visibility: hidden; }

/* results */
.rhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 20px; }
.rhead h2 { margin: 2px 0 0; font-weight: 800; font-stretch: 125%; font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1; letter-spacing: -.02em; }
.rtabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin: 18px 0; align-items: end; }
.rtabs button { font-weight: 650; font-size: 1rem; background: transparent; border: 0; color: var(--muted); padding: 10px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.rtabs button.on { color: var(--ink); border-bottom-color: var(--signal); }
.tabkeys { margin-left: auto; font-size: .8rem; padding-bottom: 10px; }
.rtop { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.tiles { display: flex; flex-wrap: wrap; gap: 10px; }
.tile { background: var(--sheet); border-radius: 14px; padding: 12px 16px; display: grid; min-width: 120px; }
.tile .k { font-size: .84rem; color: var(--muted); }
.tile .v { font-weight: 750; font-stretch: 118%; font-size: 1.6rem; line-height: 1.15; }
.tile.big .v { font-size: 2.6rem; color: var(--signal); }
.tiles.res { align-items: stretch; }
.newhigh { align-self: center; font-weight: 800; color: #1f2327; background: #f0b81c; border-radius: 99px; padding: 6px 14px; }
.rtier { display: flex; gap: 12px; align-items: center; }
.rtier b { font-size: 1.3rem; font-stretch: 118%; }
.chart { width: 100%; height: auto; display: block; }
.chart .ax { stroke: var(--line); }
.chart .ln { fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-linejoin: round; }
.chart .pt { fill: var(--sheet); stroke: var(--signal); stroke-width: 2; }
.chart .pt.last { fill: var(--signal); }
.chart .lb { font: 600 11px var(--font); fill: var(--muted); }
.chart.empty { color: var(--muted); font-size: .9rem; padding: 20px 0; }
.mom { display: flex; align-items: end; gap: 3px; height: 90px; }
.mom i { flex: 1; background: var(--signal); border-radius: 3px 3px 0 0; opacity: .75; }
.mom i.hi { background: var(--good); opacity: 1; }
.mom i.lo { background: var(--yellow); }
.momax { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.coach { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 18px; }
.cnote { background: var(--sheet); border-radius: 14px; padding: 12px 14px; border-left: 5px solid var(--signal); }
.cnote.good { border-left-color: var(--good); }
.cnote.warn { border-left-color: var(--yellow); }
.cnote.bad { border-left-color: var(--bad); }
.cnote b { font-size: .98rem; }
.cnote p { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rec { --fc: var(--signal); text-align: left; background: var(--sheet); border: 0; border-left: 5px solid var(--fc); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; cursor: pointer; color: var(--ink); }
.rec:hover { background: var(--sheet2); }
.rec .pict { width: 50px; height: 30px; color: var(--fc); }
.replay { display: grid; gap: 12px; }
.rpstage { border-radius: 16px; overflow: hidden; background: #000; }
.rpstage canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.rpbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rpbar input[type=range] { flex: 1 1 260px; accent-color: var(--signal); }
.rptime { font-weight: 650; min-width: 96px; }
.rptoggles { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: .92rem; }
.rptoggles label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.sot { cursor: pointer; }
.sotsvg { width: 100%; height: 110px; display: block; }
.sotsvg .ln { fill: none; stroke: var(--signal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.sotsvg .head { stroke: var(--bad); stroke-width: 2; vector-effect: non-scaling-stroke; }
.stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; gap: 2px; background: var(--sheet2); }
.stack i { display: block; min-width: 0; }
.legend2 { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; margin-top: 8px; }
.legend2 span { display: inline-flex; align-items: center; gap: 6px; }
.legend2 i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* benchmarks */
.rankhero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; background: var(--sheet); border-radius: 22px; padding: 22px 26px; }
.tierlist { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.tl { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 10px 4px; border-radius: 14px; opacity: .45; font-size: .82rem; }
.tl b { font-size: .86rem; }
.tl span { color: var(--muted); }
.tl.on { opacity: 1; }
.tl.now { background: var(--sheet); box-shadow: inset 0 -4px 0 var(--tc); }
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cat { background: var(--sheet); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; }
.cat h4 { margin: 0; font-size: 1rem; }
.catrow { display: grid; grid-template-columns: 110px minmax(0, 1fr) 46px auto; gap: 10px; align-items: center; font-size: .9rem; }
.catrow .track { height: 8px; background: var(--sheet2); border-radius: 4px; overflow: hidden; }
.catrow .track i { display: block; height: 100%; border-radius: 4px; }
.catrow .v { text-align: right; font-weight: 650; }
.seg.small button { font-size: .84rem; padding: 4px 11px; }
.dist { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; }
.db { display: grid; justify-items: center; gap: 4px; font-size: .78rem; text-align: center; }
.db .bar { display: flex; align-items: end; width: 100%; height: 120px; }
.db .bar i { width: 100%; background: color-mix(in srgb, var(--tc) 55%, var(--sheet2)); border-radius: 6px 6px 0 0; }
.db.me .bar i { background: var(--tc); box-shadow: 0 0 0 2px var(--ink); }
.db b { font-size: .84rem; }
table.board tr.me td { background: color-mix(in srgb, var(--signal) 12%, transparent); font-weight: 650; }
table.board tr.sepr td { border-top: 2px dashed var(--line); }

/* profile */
.phead { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.phead h2 { margin: 0; font-weight: 800; font-stretch: 125%; font-size: 2.2rem; line-height: 1; }
.phead p { margin: 6px 0 0; }
.phead .row.right { margin-left: auto; }
.view > .tiles { margin-top: 20px; }
.cal { display: grid; grid-template-columns: repeat(35, minmax(0, 1fr)); gap: 3px; max-width: 760px; }
.cal span { aspect-ratio: 1; border-radius: 4px; background: var(--sheet2); }
.cal .l1 { background: color-mix(in srgb, var(--good) 35%, var(--sheet2)); }
.cal .l2 { background: color-mix(in srgb, var(--good) 60%, var(--sheet2)); }
.cal .l3 { background: color-mix(in srgb, var(--good) 80%, var(--sheet2)); }
.cal .l4 { background: var(--good); }
.swk { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.swk h4 { margin: 0 0 4px; font-size: .92rem; }
.swk p { margin: 2px 0; font-size: .93rem; }
.plan { display: grid; gap: 8px; }
.planrow { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--sheet); border-radius: 14px; padding: 12px 14px; }
.planrow .pict { width: 56px; height: 34px; color: var(--signal); }
.planrow .note { margin: 2px 0 0; }

/* options */
.opts { display: grid; gap: 10px; align-content: start; }
.opts h3.sub { margin-top: 18px; }
.opts h3.sub:first-child { margin-top: 0; }
.optrow { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.optrow input[type=range] { flex: 1 1 140px; max-width: 260px; accent-color: var(--signal); }
.optrow output { min-width: 36px; text-align: right; font-weight: 650; }
.optrow label { flex: 1 1 200px; }
input[type=color] { width: 44px; height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--sheet); cursor: pointer; }
input.sw { appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .15s; }
input.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
input.sw:checked { background: var(--signal); }
input.sw:checked::after { left: 21px; }
.xprev { position: relative; height: 120px; border-radius: 14px; background: var(--room); overflow: hidden; }
.xprev .cross { position: absolute; left: 50%; top: 50%; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.theme { display: grid; gap: 6px; text-align: left; background: var(--sheet); border: 2px solid transparent; border-radius: 14px; padding: 8px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink); }
.theme.on { border-color: var(--signal); }
.sw4 { display: grid; grid-template-columns: repeat(4, 1fr); height: 30px; border-radius: 8px; overflow: hidden; }
.sw4 i { display: block; }
.mini { margin: 8px 0 0; font-size: .95rem; }
.colors { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .88rem; }
.colors label { display: inline-flex; align-items: center; gap: 8px; }
.codein { font: inherit; font-size: .88rem; flex: 1 1 240px; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--sheet); color: var(--ink); }

/* dialog */
.dlg { border: 0; border-radius: 22px; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.dlg::backdrop { background: rgba(10, 12, 15, .55); }
#dlgBody { padding: 22px 24px 24px; display: grid; gap: 10px; }
.dlg-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dlg-h h2, .onb h2 { margin: 0; font-weight: 800; font-stretch: 125%; font-size: 1.7rem; line-height: 1.05; }
.okmsg { margin: 0; background: color-mix(in srgb, var(--good) 15%, var(--sheet)); padding: 8px 12px; border-radius: 10px; }
.profs { display: grid; gap: 6px; }
.prof { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; background: var(--sheet); border-radius: 12px; padding: 8px 10px; }
.prof > span:nth-child(2) { display: grid; }
.prof .dim { font-size: .82rem; }
.prof.cur { box-shadow: inset 0 0 0 2px var(--signal); }
.newprof { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.newprof .cell { flex: 1 1 260px; }
.cell.grow { flex: 1 1 200px; }
.swatches { display: flex; gap: 6px; align-items: center; }
.swc { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swc.on { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--bg); }
.onb { display: grid; gap: 14px; }
.onb p { margin: 0; color: var(--muted); }
.gamegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.gpick { text-align: left; background: var(--sheet); border: 2px solid transparent; border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--ink); }
.gpick.on { border-color: var(--signal); }
.starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.start { text-align: left; display: grid; gap: 4px; background: var(--sheet); border: 2px solid transparent; border-radius: 14px; padding: 14px; cursor: pointer; color: var(--ink); }
.start:hover, .start:focus-visible { border-color: var(--signal); }
.start span { font-size: .88rem; color: var(--muted); }

@media (max-width: 1100px) { .homegrid { grid-template-columns: 1fr; } .tierlist, .dist { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .nextup { grid-template-columns: 1fr; } .nu-art { aspect-ratio: auto; height: 110px; } .catrow { grid-template-columns: 90px minmax(0, 1fr) 40px; } .catrow .tchip { display: none; } .cal { gap: 2px; } .search input { min-width: 0; width: 100%; } }

/* ===== dashboard layout: top bar, dark panels, three-column Home and Results ===== */
:root[data-theme="dark"] { --bg: #0e1013; --sheet: #171a1f; --sheet2: #121519; --field: #0b0d10; --line: #272c33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0e1013; --sheet: #171a1f; --sheet2: #121519; --field: #0b0d10; --line: #272c33; } }
.app { display: block; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px 22px; padding: 10px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .mark { font-size: 1.35rem; white-space: nowrap; }
.topbar .tabs { display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; min-width: 0; }
.topbar .tabs a { padding: 9px 12px; font-size: .95rem; white-space: nowrap; border-radius: 10px; }
.topbar .tabs a.on { background: transparent; box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-right .status span { max-width: 190px; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.iconbtn:hover, .iconbtn.on { color: var(--ink); background: var(--sheet); }
.topbar .who { margin: 0; padding: 4px 12px 4px 4px; border-radius: 99px; }
.wrap { max-width: 1480px; margin: 0 auto; }
.card, .nextup, .rankhero, .plitem, .dcard, .cat, .planrow, .tile { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }

.dash { display: grid; grid-template-columns: 300px minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.dcol { display: grid; gap: 14px; min-width: 0; align-content: start; }
.dcol.mid { gap: 18px; }
.devcard .device { background: transparent; padding: 0; }
.devcard #deviceArt { max-width: 460px; width: 100%; margin: 0 auto; }
.devcard .looks { justify-self: center; }
.listcard .head.sm { margin-bottom: 4px; }
.lrows { display: grid; gap: 2px; max-height: 560px; overflow-y: auto; }
.lrow { --fc: var(--signal); display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; align-items: center; background: transparent; border: 0; border-radius: 10px; padding: 7px 8px; text-align: left; color: var(--ink); cursor: pointer; }
.lrow:hover, .lrow:focus-visible { background: var(--sheet2); }
.lrow .pict { width: 50px; height: 30px; color: var(--fc); }
.lrow > span:last-child { display: grid; min-width: 0; }
.lrow .dim { font-size: .82rem; }
.lrow .pldr { margin: 0; }
.lrow .pldr .pict { width: 18px; height: 12px; }
.star { color: #f0b81c; }

.rdash { display: grid; grid-template-columns: 290px minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.rcol { display: grid; gap: 14px; min-width: 0; align-content: start; }
.scorecard { gap: 4px; }
.scorecard h2 { font-weight: 800; font-stretch: 125%; font-size: 1.9rem; margin: 2px 0 10px; line-height: 1; letter-spacing: -.02em; }
.scorecard .k { font-size: .84rem; color: var(--muted); }
.scorecard .score { font-weight: 800; font-stretch: 125%; font-size: 3.4rem; line-height: 1; color: var(--signal); }
.scorecard .newhigh { justify-self: start; margin-top: 6px; }
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin: 10px 0 6px; }
.sgrid div { display: grid; }
.sgrid b { font-size: 1.3rem; font-stretch: 115%; }
.rcol .board td { padding: 6px 10px 6px 0; }
.rcol.mid .rtabs { margin-top: 0; }
.rcol .recs { grid-template-columns: 1fr; }
.ractions { display: grid; gap: 8px; }
.ractions button { width: 100%; padding: 12px 16px; }
.ractions .pl-line { margin: 0; }
button.go.alt { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.grid2.top0 { margin-top: 0; }

@media (max-width: 1280px) {
  .dash { grid-template-columns: 280px minmax(0, 1fr); }
  .dash > .dcol:last-child { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .rdash { grid-template-columns: minmax(0, 1fr) 260px; }
  .rdash > .rcol:first-child { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .rdash > .rcol.mid { grid-row: 2; }
}
@media (max-width: 1000px) { .topbar { flex-wrap: wrap; } .topbar .tabs { order: 3; flex-basis: 100%; } .tb-right .status { display: none; } }
@media (max-width: 820px) { .dash, .rdash { grid-template-columns: 1fr; } .dash > .dcol:last-child, .rdash > .rcol:first-child { grid-template-columns: 1fr; } .rdash > .rcol.mid { grid-row: auto; } .who-t { display: none; } }

/* ===== review fixes: controller notices, readability, focus, colour-blind cues ===== */
.needpad { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--yellow) 16%, var(--sheet)); color: var(--ink); font-weight: 600; max-width: 70ch; }
.padok { margin: 0; color: var(--good); font-weight: 650; }
.warnline { color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; max-width: min(560px, calc(100vw - 32px)); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
kbd { opacity: 1; }
.stack i[style*="transparent"], .legend2 i[style*="transparent"] { box-shadow: inset 0 0 0 2px var(--muted); }
.mom i, .mom i.hi, .mom i.lo { background: var(--signal); }
.mom i { opacity: .7; }
.mom i.hi { opacity: 1; }
.mom i.lo { opacity: .4; }
.chart .lb { font-size: 13px; }
.tchip, .week, .dfoot, .lrow .dim, .rrow .dim { font-size: .86rem; }
/* a thick two-tone focus ring that shows on white, blue and dark surfaces, for couch play with a pad */
:is(button, a, input, select, summary):focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; box-shadow: 0 0 0 5px var(--bg); }
.cell input:focus-visible, .cell select:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }
html.bigtext { font-size: 19px; }
/* on narrow screens keep the controller dot in the top bar, without the long text */
@media (max-width: 1000px) { .tb-right .status { display: flex; } .tb-right .status span { display: none; } }

/* ===== round 2: controller area steps, connect card, leaderboard people, usual range, challenges ===== */
.subnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.subnav a { display: flex; gap: 12px; align-items: center; text-decoration: none; background: var(--sheet); border-radius: 14px; padding: 12px 14px; color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 6%, transparent); }
.subnav a i { font-style: normal; font-weight: 800; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sheet2); color: var(--muted); flex: none; }
.subnav a span { display: grid; min-width: 0; }
.subnav a small { color: var(--muted); font-size: .84rem; }
.subnav a.on { box-shadow: inset 0 0 0 2px var(--signal); }
.subnav a.on i { background: var(--signal); color: var(--on-signal); }
.connect h3 { margin: 0 0 6px; }
.connect ol { list-style: none; counter-reset: c; margin: 0; padding: 0; display: grid; gap: 10px; }
.connect li { counter-increment: c; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; }
.connect li::before { content: counter(c); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--signal) 20%, var(--sheet2)); color: var(--signal); }
.connect li span { color: var(--muted); font-size: .92rem; }
.mile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; font-weight: 700; }
.mile small { grid-column: 1 / -1; color: var(--muted); font-weight: 500; font-size: .86rem; }
td.pl { display: flex; align-items: center; gap: 10px; }
.bav { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; background: hsl(var(--h) 55% 42%); flex: none; }
.medal { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; font-size: .8rem; color: #1f2327; }
.medal.m1 { background: #e2b43a; }
.medal.m2 { background: #b9c2cc; }
.medal.m3 { background: #c98a52; }
.usual { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; margin: 8px 0 2px; font-size: .88rem; }
.delta { font-weight: 700; }
.delta.up { color: var(--good); }
.delta.down { color: var(--warn); }
.urange { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 5px; background: var(--sheet2); }
.urange i { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: color-mix(in srgb, var(--signal) 35%, var(--sheet2)); }
.urange b { position: absolute; top: -3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: var(--ink); }
.chal { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--yellow) 16%, var(--sheet)); font-weight: 650; }
.chal.won { background: color-mix(in srgb, var(--good) 18%, var(--sheet)); }
@media (max-width: 760px) { .subnav { grid-template-columns: 1fr; } }

/* ===== round 3: course, aim assist help, hit text ===== */
.course { border-left: 6px solid var(--good); }
.course p { margin: 0; }
.cdots { display: flex; gap: 6px; }
.cdots i { flex: 1; height: 8px; border-radius: 4px; background: var(--sheet2); }
.cdots i.on { background: var(--good); }
.cdots i.now { box-shadow: inset 0 0 0 2px var(--good); }
.lesson { display: grid; gap: 2px; margin: 8px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--yellow) 16%, var(--sheet)); }
.lesson.won { background: color-mix(in srgb, var(--good) 18%, var(--sheet)); }
.lesson span { font-size: .92rem; }
.assisthelp { display: grid; gap: 10px; }
.reasons { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; }
.reasons li { counter-increment: r; background: var(--sheet); border-radius: 12px; padding: 10px 12px 10px 44px; position: relative; display: grid; gap: 2px; }
.reasons li::before { content: counter(r); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; background: var(--sheet2); color: var(--muted); }
.reasons li span { color: var(--muted); font-size: .92rem; }
.reasons li.hit { box-shadow: inset 0 0 0 2px var(--warn); }
.hitpop { position: absolute; left: 50%; top: calc(50% - 46px); transform: translateX(-50%); font-weight: 800; font-stretch: 120%; font-size: 1.25rem; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; white-space: pre; }
.hitpop.no { color: #ffb4b4; font-size: 1rem; }
.hitpop.go { animation: hitpop .55s ease-out; }
@keyframes hitpop { 0% { opacity: 1; transform: translate(-50%, 6px) scale(.9); } 30% { opacity: 1; transform: translate(-50%, -4px) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -26px) scale(1); } }
