/* Counter-Intelligence - a quiet scouting board. Neutral ink on near-black; colour only where it carries
   meaning: CT blue and T amber as thin trims, dots and marks - never as text. */
:root {
  --bg: #0e1013;
  --bg-2: #12151a;
  --raise: #171b21;
  --raise-2: #1d2229;
  --line: #22272e;
  --line-2: #2c323a;
  --ink: #ece9e3;
  --ink-2: #a9adb3;
  --ink-3: #6f747c;
  --ink-4: #4b5058;
  --ct: #4b95e5;          /* validated pair (dataviz validator, dark surface) */
  --t: #c6841b;
  --ct-soft: rgba(75,149,229,.14);
  --t-soft: rgba(198,132,27,.14);
  --win: #ece9e3;
  --loss: #6f747c;
  --warn: #d9a441;
  --bad: #d96a55;
  --radius: 10px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-d: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; }
a { color: inherit; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink-2); }
button, input, select { font: inherit; color: inherit; }
::selection { background: rgba(236,233,227,.18); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 18px;
  padding: 0 24px; background: rgba(14,16,19,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark svg, .mark img { display: block; }
.mark b { font: 600 12px/1 var(--font); letter-spacing: .26em; }
.bar-search { flex: 1; max-width: 520px; display: flex; }
.bar-search input { width: 100%; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); }
.bar-search input::placeholder { color: var(--ink-4); }
.bar-status { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-3); }
.pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.pill[hidden] { display: none; }           /* the queue pill hides itself when nothing is loading */
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.pill.ok i { background: var(--ink); box-shadow: 0 0 0 3px rgba(236,233,227,.1); }
.pill.warn i { background: var(--warn); }
.pill button { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }

/* ---------- layout ---------- */
.page { max-width: 1440px; margin: 0 auto; padding: 32px 24px 96px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
h1 { font: 600 34px/1.1 var(--font-d); letter-spacing: -.02em; margin: 0; }
h2 { font: 600 20px/1.25 var(--font-d); letter-spacing: -.01em; margin: 0; }
h3 { font: 600 14px/1.3 var(--font); margin: 0; }
.lede { color: var(--ink-2); margin: 6px 0 0; }
.sub { color: var(--ink-3); font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; }
.rule { height: 1px; background: var(--line); border: 0; margin: 28px 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--raise-2); border-color: #3a414b; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--ink); color: #111; border-color: var(--ink); }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { color: var(--ink); background: var(--raise); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; gap: 2px; background: var(--bg-2); }
.seg button { all: unset; cursor: pointer; padding: 3px 10px; border-radius: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--raise-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg button:focus-visible { outline: 1.5px solid var(--ink); }

/* side marks: the only colour in the chrome */
.sd { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.sd::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.sd.ct::before { background: var(--ct); }
.sd.t::before { background: var(--t); }
.trim-ct { box-shadow: inset 2px 0 0 var(--ct); }
.trim-t { box-shadow: inset 2px 0 0 var(--t); }
.wl { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font: 700 10.5px/1 var(--font); }
.wl.w { background: var(--ink); color: #111; }
.wl.l { box-shadow: inset 0 0 0 1px var(--ink-4); color: var(--ink-3); }

/* dot meters: n filled of N, the house way to show "7 of 11" */
.dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-4); }
.dots i.on { background: var(--ink); box-shadow: none; }
.dots.ct i.on { background: var(--ct); }
.dots.t i.on { background: var(--t); }
.dots.lg i { width: 9px; height: 9px; }

/* thin bars */
.bar2 { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; background: transparent; }
.bar2 span { display: block; height: 100%; min-width: 0; }
.bar2 .a { background: var(--ink); }
.bar2 .b { background: #8e949b; }
.bar2 .x { background: repeating-linear-gradient(135deg, #3a4048 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px #3a4048; }
.bar2 .ct { background: var(--ct); }
.bar2 .t { background: var(--t); }

/* ---------- start ---------- */
.start { max-width: 720px; margin: 9vh auto 0; }
.start h1 { font-size: 46px; letter-spacing: -.03em; }
.start h1 em { font-style: normal; color: var(--ink-3); }
.paste { margin-top: 28px; display: flex; gap: 10px; }
.paste input { flex: 1; height: 48px; padding: 0 16px; font-size: 15px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); }
.paste input:focus { border-color: #4a515b; outline: none; box-shadow: 0 0 0 4px rgba(236,233,227,.05); }
.paste .btn { height: 48px; padding: 0 22px; font-size: 15px; }
.hint { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.notice { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); color: var(--ink-2); font-size: 13.5px; }
.notice b { color: var(--ink); }
.notice ol { margin: 8px 0 0; padding-left: 20px; }
.progress-line { margin-top: 18px; display: flex; gap: 10px; align-items: center; color: var(--ink-2); font-size: 13px; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink-4); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.choose { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choose button { all: unset; cursor: pointer; padding: 18px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-2); }
.choose button:hover { border-color: var(--ink-3); }
.choose b { display: block; font-size: 18px; }
.saved { margin-top: 56px; }
.saved-list { margin-top: 10px; border-top: 1px solid var(--line); }
.saved-row { display: flex; align-items: center; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.saved-row:hover { background: var(--bg-2); }
.saved-row b { font-weight: 600; font-size: 15px; }
.saved-row .sub { margin-left: auto; }
.drop { margin-top: 40px; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-3); font-size: 13px; text-align: center; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--ink-2); background: var(--bg-2); color: var(--ink); }

/* ---------- team ---------- */
.team-head { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.team-head .meta { color: var(--ink-3); font-size: 13px; margin-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; }
.next-up { margin-left: auto; text-align: right; }
.next-up .label { display: block; margin-bottom: 4px; }
.next-up b { font-size: 15px; }
.team-grid { margin-top: 32px; display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
.lineup { position: sticky; top: 76px; }
.lineup-list { margin-top: 12px; border-top: 1px solid var(--line); }
.player { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.player b { font-weight: 600; }
.player .role { font: 600 10px/1 var(--font); letter-spacing: .1em; padding: 4px 6px; border-radius: 4px; align-self: center; }
.player .role.r-status { background: var(--ink); color: #111; }
.player .role.r-off { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.player .role.r-sub { box-shadow: inset 0 0 0 1px var(--ink-4); color: var(--ink-2); }
.player .sub { grid-column: 1 / -1; font-size: 12px; }
.player.ineligible b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.lineup-note { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }

.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 12px; }
.tile { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2);
  min-height: 186px; padding: 16px; display: flex; flex-direction: column; text-decoration: none; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.tile .radar-bg { position: absolute; inset: -10% -25% -10% 35%; background-size: cover; background-position: center;
  opacity: .16; filter: grayscale(1) contrast(1.2); pointer-events: none; transition: opacity .25s; mask-image: linear-gradient(90deg, transparent, #000 40%); }
.tile:hover .radar-bg { opacity: .26; }
.tile h3 { font: 600 20px/1 var(--font-d); letter-spacing: -.01em; position: relative; }
.tile .count { position: relative; margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.tile .sides { position: relative; margin-top: auto; display: grid; gap: 7px; }
.tile .side-row { display: grid; grid-template-columns: 36px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.tile .side-row .num { text-align: right; color: var(--ink-2); }
.meter { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.meter span { display: block; height: 100%; }
.meter.ct span { background: var(--ct); }
.meter.t span { background: var(--t); }
.tile .demo { position: relative; margin-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.tile .demo .btn { margin-left: auto; }
.tile .demo .meter { flex: 1; }
.tile .demo .meter span { background: var(--ink); }
.tile.none { opacity: .6; }

.matches { margin-top: 44px; }
.mtable { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.mtable th { text-align: left; font: 600 10.5px/1 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.mtable td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mtable tr:hover td { background: var(--bg-2); }
.mapchip { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; white-space: nowrap; }
.mapchip.off { color: var(--ink-4); text-decoration: line-through; }
.state { font-size: 12px; color: var(--ink-3); }
.state.ready { color: var(--ink); }
.state.failed { color: var(--bad); }
.cover { margin-top: 28px; font-size: 12.5px; color: var(--ink-3); }
.cover li { margin: 4px 0; }

/* ---------- map dossier: an app. The open section | the one map | its layers ---------- */
.page.page-map { max-width: none; padding: 0; }
html.pa-app, html.pa-app body { overflow: hidden; height: 100%; }
.atlas { --panel: clamp(380px, 30vw, 600px); --side: clamp(258px, 17vw, 336px); --tools: 48px;
  --map-h: calc(100svh - 52px - 158px - var(--fbar, 0px));          /* the bar, the map's head, its transport */
  --map: min(calc(100vw - var(--panel) - var(--side) - 40px - var(--tools)), var(--map-h));
  position: relative; height: calc(100svh - 52px); display: grid; grid-template-columns: var(--panel) minmax(0, 1fr) var(--side); }
.a-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }

/* the section panel */
.a-panel { position: relative; z-index: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; container-type: inline-size; }
.a-ctx { position: relative; padding: 16px 24px 12px; border-bottom: 1px solid var(--line); }
.a-ctx .crumbs { margin-bottom: 8px; }
.a-title { display: flex; align-items: flex-end; gap: 16px; }
.a-title h1 { font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.a-rec { margin-left: auto; display: grid; justify-items: end; gap: 3px; }
.a-rec b { font: 600 28px/1 var(--font-d); letter-spacing: -.02em; }
.a-lens { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.a-pages { position: relative; flex: 1; min-height: 0; }
.a-page { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  padding: 18px 24px 32px; }
.a-page.leave { animation: page-out .15s ease-in forwards; pointer-events: none; }
.a-page.enter { animation: page-in .42s linear both; }
@property --rv { syntax: '<percentage>'; inherits: false; initial-value: 120%; }
@keyframes page-out { to { opacity: 0; filter: blur(3px); } }
@keyframes page-in {
  from { opacity: 0; --rv: -10%; }
  25% { opacity: 1; }
  to { opacity: 1; --rv: 120%; } }
.a-page.enter { -webkit-mask-image: linear-gradient(#000 calc(var(--rv) - 25%), transparent var(--rv)); mask-image: linear-gradient(#000 calc(var(--rv) - 25%), transparent var(--rv)); }
.a-sechead { padding-bottom: 14px; }
.a-kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 11px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.a-kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--ink-3); }
.a-page[data-section="tside"] .a-kicker::before, .a-page[data-section="positions"] .a-kicker::before, .a-page[data-section="utility"] .a-kicker::before, .a-page[data-section="openings"] .a-kicker::before { background: var(--t); }
.a-page[data-section="ctside"] .a-kicker::before { background: var(--ct); }
.a-page[data-section="pistols"] .a-kicker::before, .a-page[data-section="firstgun"] .a-kicker::before { background: linear-gradient(90deg, var(--ct) 50%, var(--t) 50%); }
.w-bits { font: 500 11px/1 var(--mono); letter-spacing: .14em; color: var(--ink-3); }
.a-titleline { display: flex; align-items: baseline; gap: 10px 20px; flex-wrap: wrap; margin-top: 10px; }
.w-title { font: 600 28px/1.15 var(--font-d); letter-spacing: -.018em; margin: 0; }
.w-stat { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 13px; }
.w-stat b { font: 600 22px/1 var(--font-d); color: var(--ink); letter-spacing: -.01em; }
.w-controls { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; }
.w-sub { margin: 22px 0 8px; }
.w-stack > .w-sub:first-child { margin-top: 0; }
.sec-lede { color: var(--ink-2); margin: 0 0 16px; font-size: 14px; max-width: 680px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@container (max-width: 540px) { .two { grid-template-columns: 1fr; } .ww { grid-template-columns: 100px 1fr; } .ww .sub { display: none; } }
.w-fill { margin-top: 12px; }
.a-page .tbl th, .a-page .tbl td { padding-left: 6px; padding-right: 6px; }
@container (max-width: 520px) { .a-page .tbl .hide-sm { display: none; } }
.a-next { all: unset; box-sizing: border-box; cursor: pointer; margin-top: 30px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-2); }
.a-next b { color: var(--ink); font-size: 15px; }
.a-next small { margin-left: auto; color: var(--ink-4); font-size: 12px; }
.a-next:hover, .a-next:focus-visible { border-style: solid; border-color: var(--ink-3); color: var(--ink); background: var(--bg-2); }
.a-pull { position: absolute; left: 24px; right: 24px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
  background: rgba(20,23,28,.94); border: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); pointer-events: none;
  opacity: 0; transform: translateY(8px); transition: opacity .15s, transform .15s; overflow: hidden; }
.a-pull.up { top: 14px; bottom: auto; transform: translateY(-8px); }
.a-pull.on { opacity: 1; transform: none; }
.a-pull b { color: var(--ink); }
.a-pull i { position: absolute; left: 0; bottom: 0; height: 2px; width: calc(var(--pull, 0) * 100%); background: var(--ink); }
.a-pull.up i { top: 0; bottom: auto; }
.a-ctx .filters, .lens-pop .filters { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: center; padding: 6px 0 12px; }
.filters .f { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.cov-line { margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.cov-line button { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
.lens-chip { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(18,21,26,.75); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.lens-chip:hover, .lens-chip:focus-visible { color: var(--ink); border-color: var(--ink-3); }
.lens-pop { display: none; position: absolute; left: 16px; right: 16px; top: calc(100% - 4px); z-index: 30; padding: 8px 18px 14px; border-radius: 12px; background: #14171c;
  border: 1px solid #2f353d; box-shadow: 0 22px 50px rgba(0,0,0,.55); }
.lens-pop.open { display: block; animation: rise .18s ease-out both; }

/* the map: fixed in the middle, never reset by a section */
.a-stage { position: relative; z-index: 2; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; padding: 10px 20px;
  background: radial-gradient(ellipse at 50% 45%, #10131700 0%, var(--bg) 70%), var(--bg); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.a-stage .rp { width: calc(var(--map) + var(--tools)); }
.a-stage .rp-stage { width: var(--map); max-width: none; box-shadow: 0 30px 80px rgba(0,0,0,.45); }

body.rp-theater-open .a-stage { z-index: 120; }

/* card filters: the bar over the map (each filter says which rounds it keeps, with the switch beside it) */
.a-filters { width: var(--map); max-width: 100%; margin-left: var(--tools); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.a-filters:empty { display: none; }
.fchip { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 100%; padding: 5px 5px 5px 11px; border-radius: 10px;
  background: #151a20; border: 1px solid #39414b; box-shadow: inset 3px 0 0 var(--ink); font-size: 13px; color: var(--ink-2); animation: rise .18s ease-out both; }
.fchip > .ic { color: var(--ink); flex: none; }
.fchip-text { flex: 1; min-width: 0; line-height: 1.35; }          /* the sentence wraps rather than hide which rounds these are */
.fchip-k { margin-right: 7px; font: 600 10.5px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fchip-text b { color: var(--ink); font-weight: 650; }
.fchip.miss .fchip-text b { text-decoration: underline 2px; text-underline-offset: 3px; }
.fseg { flex: none; display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); }
.fseg button { all: unset; cursor: pointer; padding: 3px 9px; border-radius: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.fseg button b { color: var(--ink-2); font-weight: 600; }
.fseg button:hover { color: var(--ink); }
.fseg button.on { background: var(--ink); color: #111; }
.fseg button.on b { color: #111; }
.fseg button:disabled { opacity: .35; cursor: default; }
.fseg button:focus-visible { outline: 1.5px solid var(--ink); }
.fx { all: unset; cursor: pointer; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-3); }
.fx:hover, .fx:focus-visible { background: var(--raise-2); color: var(--ink); }
.fclear { all: unset; cursor: pointer; margin-left: auto; font-size: 12px; color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--ink-4); text-underline-offset: 3px; }
.fclear:hover { color: var(--ink); }
.ftag { margin-left: 0; }
/* the funnel on a card */
.fil { all: unset; box-sizing: border-box; cursor: pointer; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px;
  color: var(--ink-3); opacity: .55; transition: opacity .15s, background .15s, color .15s; }
.fil:hover, .fil:focus-visible { opacity: 1; color: var(--ink); background: var(--raise-2); }
.fil.on { opacity: 1; color: #111; background: var(--ink); }
.tell:hover .fil, .crow-f:hover .fil, .setup-f:hover .fil, .btn-f:hover .fil { opacity: 1; }
.tell.filterable { cursor: pointer; }
.tell.filterable:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.tell.filtering { border-color: var(--side-c); box-shadow: inset 0 0 0 1px var(--side-c); }
.crow-f, .setup-f { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; gap: 2px; border-radius: 8px; }
.crow-f.on, .setup-f.on { background: var(--bg-2); box-shadow: inset 2px 0 0 var(--ink); }
.btn-f { display: inline-flex; align-items: center; gap: 2px; }

/* the layers and the round in focus */
.a-side { position: relative; z-index: 2; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #101317;
  --rp-line: #262b32; --rp-ink: #ece9e3; --rp-ink2: #a9adb3; --rp-ink3: #6f747c; --rp-ct: #5ea6f5; --rp-t: #e0a03a; }
.a-layers { flex: 1 1 auto; min-height: 120px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; display: flex; flex-direction: column; }
.a-round { display: none; flex: 1 1 55%; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; border-top: 1px solid var(--line); padding: 12px 14px 18px; }
.a-round.on { display: block; }
.a-round .rp-side { font-size: 12.5px; color: var(--rp-ink); }
.ly-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 6px; padding: 12px 12px 10px 16px; background: #101317; border-bottom: 1px solid var(--line); }
.ly-act { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; font-size: 12px; color: var(--ink-2); border: 1px solid var(--line-2); }
.ly-act:hover, .ly-act:focus-visible { color: var(--ink); border-color: var(--ink-3); background: var(--raise); }
.ly-list { display: grid; gap: 2px; padding: 8px 8px 4px; }
.ly-empty { padding: 14px 10px; color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.ly { border-radius: 9px; }
.ly.open { background: rgba(255,255,255,.025); }
.ly-row, .ly.ly-draw { display: grid; grid-template-columns: 26px 18px minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 4px; padding: 6px 6px 6px 4px; border-radius: 9px; cursor: pointer; }
.ly.ly-draw { cursor: default; margin: 0 8px; grid-template-columns: 26px 18px minmax(0, 1fr) auto; }
.ly-row:hover { background: var(--raise); }
.ly.hidden .ly-name, .ly.hidden .ly-ic { opacity: .4; }
.ly-ic { color: var(--ink-3); display: grid; place-items: center; }
.ly.rounds .ly-ic { color: var(--ink-2); }
.ly-name { min-width: 0; display: grid; }
.ly-name b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-name small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-name small i { font-style: normal; margin-right: 6px; padding: 1px 5px; border-radius: 4px; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.ly-eye, .ly-btn { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--ink-2); }
.ly-eye:hover, .ly-btn:hover, .ly-eye:focus-visible, .ly-btn:focus-visible { background: var(--raise-2); color: var(--ink); }
.ly-eye.off { color: var(--ink-4); }
.ly-btn.on { color: var(--ink); }
.ly-btn:not(.on) .ic { opacity: .55; }
.ly-btn:disabled { opacity: .3; cursor: default; }
.ly-seq { display: inline-flex; }
.ly-chev { display: grid; place-items: center; width: 16px; color: var(--ink-4); transition: transform .15s; }
.ly-chev.open { transform: rotate(90deg); }
.ly-els { padding: 2px 8px 10px 30px; display: grid; gap: 1px; }
.ly-sub { display: flex; align-items: center; gap: 8px; margin: 8px 0 3px; font: 600 10.5px/1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ly-sub small { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-4); }
.ly-link { all: unset; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-4); }
.ly-el { display: grid; grid-template-columns: 26px 10px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; border-radius: 7px; padding-right: 6px; }
.ly-el:hover { background: var(--raise); }
.ly-el.off .ly-elname, .ly-el.off .ly-dot { opacity: .35; }
.ly-el.solo { box-shadow: inset 0 0 0 1px var(--ink-3); }
.ly-el small { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.ly-dot { width: 8px; height: 8px; border-radius: 50%; }
.ly-elname { all: unset; cursor: pointer; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 0; }
.ly-elname:hover, .ly-elname:focus-visible { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-4); }
.ly-wl { font: 700 9.5px/1 var(--font); width: 15px; height: 15px; display: grid; place-items: center; border-radius: 4px; }
.ly-wl.w { background: var(--ink); color: #111; }
.ly-wl.l { box-shadow: inset 0 0 0 1px var(--ink-4); color: var(--ink-3); }
.ly-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 2px; }
.ly-chip { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; color: var(--ink); border: 1px solid var(--line-2); }
.ly-chip i { width: 7px; height: 7px; border-radius: 50%; }
.ly-chip small { color: var(--ink-3); }
.ly-chip.off { color: var(--ink-4); border-style: dashed; }
.ly-chip.off i { opacity: .3; }
.ly-note { color: var(--ink-3); font-size: 12px; padding: 6px 0; }
.ly-foot { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; padding: 12px 16px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); cursor: pointer; }
.ly-foot small { grid-column: 2; color: var(--ink-4); font-size: 11.5px; }

/* the sections in the bar */
.bar-nav { position: relative; display: flex; align-items: center; gap: 1px; align-self: stretch; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.bar-nav:empty { display: none; }
.bar-nav a { position: relative; z-index: 1; padding: 7px 10px; font-size: 13px; color: var(--ink-3); text-decoration: none; white-space: nowrap; border-radius: 7px; transition: color .15s; }
.bar-nav a:hover { color: var(--ink); }
.bar-nav a.on { color: var(--ink); }
.nav-ink { position: absolute; left: 0; bottom: 9px; width: 0; height: 2px; border-radius: 2px; background: var(--ink); pointer-events: none;
  transition: transform .38s cubic-bezier(.2, .7, .2, 1), width .38s cubic-bezier(.2, .7, .2, 1); }
body[data-route="map"] .bar-search { display: none; }

/* a phone or a small window: map first, then the section, then the layers; the page scrolls */
.pa-flow .atlas { display: flex; flex-direction: column; height: auto; --map: min(calc(100vw - 32px - var(--tools)), 640px); padding-top: 40px; }
.pa-flow .a-stage { order: -1; border: 0; padding: 12px 16px 6px; }
.pa-flow .a-panel { container-type: normal; }
.pa-flow .a-ctx { padding: 14px 16px 10px; }
.pa-flow .a-pages { position: static; }
.pa-flow .a-page { position: static; overflow: visible; padding: 16px 16px 28px; }
.pa-flow .a-page.leave { display: none; }
.pa-flow .a-pull { display: none; }
.pa-flow .a-side { border-top: 1px solid var(--line); }
.pa-flow .a-layers { max-height: none; }
.pa-flow .bar-nav { position: fixed; top: 52px; left: 0; right: 0; height: 40px; padding: 0 10px; background: rgba(14,16,19,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); z-index: 29; }
.pa-flow .bar-nav .nav-ink { bottom: 4px; }
.pa-flow .a-title h1 { font-size: 32px; }
.pa-flow .two { grid-template-columns: 1fr; }

/* tells: the notebook, numbered like their pins on the map */
.tells { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.tell { --side-c: var(--ink-3); display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 30px; gap: 14px; align-items: start; padding: 13px 14px 13px 10px;
  border-radius: 11px; background: rgba(18,21,26,.6); border: 1px solid rgba(44,50,58,.5); transition: border-color .15s, background .15s; }
.tell.ct { --side-c: var(--ct); }
.tell.t { --side-c: var(--t); }
.tell:hover, .tell.hl { background: var(--bg-2); border-color: var(--line-2); }
.tell-n i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 12px/1 var(--font); font-style: normal; color: var(--ink); box-shadow: inset 0 0 0 1.6px var(--side-c); transition: background .15s, color .15s; }
.tell-n i.nopin { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.tell.hl .tell-n i:not(.nopin) { background: var(--side-c); color: #0d0f12; }
.tell-main p { margin: 2px 0 0; font-size: 17px; line-height: 1.42; }
.tell-main p b { font-weight: 650; }
.tell-ev { display: grid; justify-items: end; gap: 7px; padding-top: 5px; font-size: 12.5px; color: var(--ink-2); }
.tell .play-sm { margin-top: 1px; }
.tell-break { margin-top: 10px; display: none; gap: 4px; }
.tell.open .tell-break { display: grid; animation: rise .2s ease-out both; }
.tb-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: inline-grid; align-content: center; gap: 3px; width: 22px; height: 18px; padding: 0 4px; border-radius: 5px; opacity: .55; transition: opacity .15s, background .15s; }
.tb-toggle i { display: block; height: 1.5px; border-radius: 1px; background: var(--side-c); transition: transform .2s, opacity .2s; }
.tb-toggle i:nth-child(2) { width: 70%; justify-self: end; }
.tb-toggle i:nth-child(3) { width: 45%; justify-self: end; }
.tell:hover .tb-toggle, .tb-toggle:focus-visible { opacity: 1; }
.tb-toggle:hover { background: var(--raise-2); }
.tell.open .tb-toggle { opacity: 1; }
.tell.open .tb-toggle i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.tell.open .tb-toggle i:nth-child(2) { opacity: 0; }
.tell.open .tb-toggle i:nth-child(3) { width: 100%; transform: translateY(-4.5px) rotate(-45deg); }
.tb-label { font: 600 10.5px/1 var(--font); letter-spacing: .11em; text-transform: uppercase; color: var(--side-c); margin-bottom: 3px; }
.tb-item { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) 26px; gap: 12px; align-items: center; padding: 7px 8px 7px 12px;
  border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); background: rgba(255,255,255,.025); box-shadow: inset 2px 0 0 var(--side-c); }
.tb-item.sum { grid-template-columns: minmax(0, 1fr) 26px; }
.tb-item:hover, .tb-item:focus-visible { background: var(--raise); color: var(--ink); }
.tb-item b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tb-item .play-sm { width: 24px; height: 24px; }
@container (max-width: 640px) {
  .tb-item { grid-template-columns: minmax(0, 1fr) 26px; row-gap: 2px; }
  .tb-item > b { white-space: normal; }
  .tb-item > .play-sm { grid-column: 2; grid-row: 1 / span 2; }
}
.tb-item:hover .play-sm, .crow:hover .play-sm, .setup:hover .play-sm { color: #111; background: var(--ink); border-color: var(--ink); }
.meter-k { display: inline-block; width: 70px; height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; vertical-align: middle; }
.meter-k i { display: block; height: 100%; background: var(--ink); }
.tell.ct .meter-k i { background: var(--ct); }
.tell.t .meter-k i { background: var(--t); }
.w-stat .meter-k { width: 90px; }

/* plant times on a line */
.tstrip { position: relative; height: 36px; margin-top: 16px; }
.tstrip-line { position: absolute; left: 0; right: 0; top: 13px; height: 1px; background: var(--line-2); }
.tstrip-tick { position: absolute; top: 22px; transform: translateX(-50%); font-size: 10.5px; }
.tstrip-dot { all: unset; cursor: pointer; position: absolute; top: 8px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink); transition: transform .12s; }
.tstrip-dot.a { background: var(--ink); box-shadow: none; }
.tstrip-dot:hover { transform: scale(1.4); }
.util-big small { display: block; margin: 8px 0 0; }
.econ-help { margin-top: 14px; max-width: 760px; }
.tbl-lg { font-size: 14px; }
.tbl-lg td { padding: 11px 10px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); padding: 16px; min-width: 0; }
.card.ct { box-shadow: inset 0 2px 0 var(--ct); }
.card.t { box-shadow: inset 0 2px 0 var(--t); }
.card h3 { display: flex; align-items: center; gap: 8px; }
.card .btn { margin-top: 14px; }
.big { font: 600 30px/1 var(--font-d); letter-spacing: -.02em; }
.big small { font: 500 13px var(--font); color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }

.play-sm { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink-2); }
.play-sm:hover { color: #111; background: var(--ink); border-color: var(--ink); }

/* economy ribbon (first gun) */
.ribbons { display: grid; gap: 8px; margin-top: 14px; }
.ribbon { display: grid; grid-template-columns: 150px max-content max-content; gap: 12px; align-items: center; font-size: 12.5px; }
.ribbon .who { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ribbon .cells { display: flex; gap: 3px; }
.ribbon .cell { position: relative; width: 22px; height: 30px; border-radius: 4px; background: var(--bg); display: grid; grid-template-rows: 1fr 1fr; margin-bottom: 6px; }
.ribbon .cell::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-4); }
.ribbon .cell.won::after { background: var(--ink); box-shadow: none; }
.ribbon .cell span { display: block; margin: 2px 3px; border-radius: 2px; }
.ribbon .cell span.full { background: var(--ink); }
.ribbon .cell span.force { background: var(--ink-3); }
.ribbon .cell span.half { background: linear-gradient(to top, var(--ink-3) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--ink-4); }
.ribbon .cell span.save { box-shadow: inset 0 0 0 1px var(--ink-4); }
/* the same four marks as legend keys */
i.bk { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; }
i.bk.full { background: var(--ink); }
i.bk.force { background: var(--ink-3); }
i.bk.half { background: linear-gradient(to top, var(--ink-3) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--ink-4); }
i.bk.save { box-shadow: inset 0 0 0 1px var(--ink-4); }
.ribbon .cell span.pistol { background: repeating-linear-gradient(135deg, var(--ink-3) 0 2px, transparent 2px 4px); }
.ribbon .cell.gun { box-shadow: 0 0 0 1.5px var(--ink); }

.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; }

/* setups */
.setups { display: grid; gap: 6px; }
.setup { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 120px 1fr 130px 28px; gap: 12px; align-items: center; font-size: 13.5px; padding: 8px 10px; border-radius: 8px; }
.setup:hover, .setup:focus-visible { background: var(--bg-2); }
.setup .play-sm { width: 26px; height: 26px; }
.glyph { display: inline-flex; gap: 10px; align-items: flex-end; vertical-align: middle; }
.glyph .grp { display: flex; gap: 3px; flex-direction: column; align-items: center; font-size: 11px; line-height: 1; color: var(--ink-3); min-width: 16px; }
.glyph .grp .pp { display: flex; gap: 2px; min-height: 7px; }
.glyph .grp .pp i { width: 7px; height: 7px; border-radius: 50%; background: var(--ct); }
.glyph.t .grp .pp i { background: var(--t); }
.who-where { margin-top: 18px; display: grid; gap: 8px; }
.ww { display: grid; grid-template-columns: 120px 1fr 170px; gap: 12px; align-items: center; font-size: 13.5px; padding: 0 10px; }
.ww .bar2 { height: 8px; }

/* static radar figures */
.fig { position: relative; border-radius: var(--radius); overflow: hidden; background: #0b0d10; border: 1px solid var(--line); aspect-ratio: 1; }
.fig canvas { width: 100%; height: 100%; display: block; }
.fig-tip { position: absolute; pointer-events: none; padding: 6px 9px; border-radius: 6px; background: rgba(12,14,17,.95); border: 1px solid var(--line-2); font-size: 12px; white-space: nowrap; z-index: 3; }
.fig-tip b { display: block; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.chip.on { color: var(--ink); border-color: var(--ink-3); background: var(--raise); }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.clist { margin-top: 12px; display: grid; gap: 2px; }
.crow { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 28px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.crow:focus-visible { background: var(--bg-2); outline: 1.5px solid var(--ink); }
.crow .play-sm { width: 26px; height: 26px; }
.crow:hover { background: var(--bg-2); }
.crow i { width: 10px; height: 10px; border-radius: 50%; }

/* tables */
.tscroll { overflow-x: auto; max-width: 100%; }
.tscroll .tbl { min-width: 100%; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: right; font: 600 10.5px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 0 8px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: default; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.pick { cursor: pointer; }
.tbl tr.pick:hover td { background: var(--bg-2); }
.tbl tr.sel td { background: var(--raise); }
.tbl td.l, .tbl th.l { text-align: left; }
.tag { display: inline-block; padding: 2px 6px; border-radius: 4px; font: 600 10px/1.2 var(--font); letter-spacing: .06em; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); margin-left: 4px; }
.tag.solid { background: var(--ink); color: #111; box-shadow: none; }
.empty-note { padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--ink-3); font-size: 13px; }
.dev-banner { background: repeating-linear-gradient(135deg, rgba(198,132,27,.14) 0 10px, transparent 10px 20px); border-bottom: 1px solid var(--line-2); color: var(--ink); padding: 8px 24px; font-size: 12.5px; }

.loading { padding: 80px 0; display: grid; place-items: center; color: var(--ink-3); gap: 14px; }

body[data-route="start"] .bar-search { visibility: hidden; }
@media (max-width: 1180px) {
  .team-grid { grid-template-columns: 1fr; }
  .lineup { position: relative; top: 0; }
}
@media (max-width: 640px) {
  .page { padding: 20px 16px 72px; }
  .bar { padding: 0 16px; gap: 12px; }
  .bar-search, .bar-status span.pill span.long { display: none; }   /* status pills keep their dot; links keep their words */
  .bar-status { gap: 12px; }
  .mark b { letter-spacing: .18em; }
  h1, .start h1 { font-size: 30px; }
  .paste { flex-direction: column; }
  .two { grid-template-columns: 1fr; }
  .choose { grid-template-columns: 1fr; }
  .ribbon { grid-template-columns: 90px 1fr 34px; }
  .ww { grid-template-columns: 90px 1fr; }
  .ww .sub { display: none; }
  .setup { grid-template-columns: 96px 1fr 54px; }
  .setup .sub { display: none; }
  .mtable .hide-sm, .tbl .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- demo viewer ---------- */
.rstrip { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.rsep { width: 1px; height: 26px; background: var(--line-2); margin: 0 6px; }
.rcell { all: unset; cursor: pointer; position: relative; width: 30px; height: 34px; border-radius: 6px; background: var(--bg-2);
  display: grid; place-items: center; font: 600 11.5px/1 var(--font); color: var(--ink-2); box-shadow: inset 0 -2px 0 var(--ink-4); }
.rcell.ct { box-shadow: inset 0 -2px 0 var(--ct); }
.rcell.t { box-shadow: inset 0 -2px 0 var(--t); }
.rcell:hover { background: var(--raise); color: var(--ink); }
.rcell.on { background: var(--ink); color: #111; }
.rcell .rg { position: absolute; top: 2px; right: 3px; font-size: 8px; color: var(--ink-3); }
.rcell.on .rg { color: #333; }
.rcell .rp-tagp { position: absolute; top: 2px; left: 3px; font-size: 8px; color: var(--ink-3); }
.rcell:focus-visible { outline: 1.5px solid var(--ink); }
/* buy strength under the number: left bar = team A, right = team B; taller = more money spent */
.rcell { height: 38px; }
.rcell .rn { margin-top: -6px; }
.rcell .rb { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; gap: 3px; justify-content: center; align-items: flex-end; height: 7px; }
.rcell .rb i { width: 7px; border-radius: 1px; background: var(--ink-3); }
.rcell .rb i.full { height: 7px; background: var(--ink-2); }
.rcell .rb i.force { height: 5px; }
.rcell .rb i.half { height: 3px; }
.rcell .rb i.save { height: 1.5px; opacity: .7; }
.rcell .rb i.pistol, .rcell .rb i.x { display: none; }
.rcell.on .rb i { background: #555; }
.rcell.on .rb i.full { background: #222; }
.rkey { display: inline-flex; gap: 2px; align-items: flex-end; height: 7px; margin-right: 6px; vertical-align: baseline; }
.rkey i { width: 6px; border-radius: 1px; background: var(--ink-3); }
.rkey i.full { height: 7px; background: var(--ink-2); }
.rkey i.force { height: 5px; }
.rkey i.half { height: 3px; }
.rkey i.save { height: 1.5px; opacity: .7; }
.demo-replay { margin-top: 22px; }

/* keep the replay's transport on screen: the stage gives up size before the controls do */
/* the viewer page: a compact head (title, then the round strip with its key folded away) so the map gets the height */
.demo-main.hud { max-width: none; padding: 16px 28px 40px; }
.demo-main.hud .dhead > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.demo-main.hud .dhead .crumbs { margin: 0; }
.demo-main.hud .dhead h1 { font-size: 20px; }
.demo-main.hud .dhead .sub { margin-top: 0 !important; }
.demo-main.hud .demo-replay { margin-top: 12px; }
.rp-banner .dstrip { margin: 0; }
.rp-banner .rcell { width: 26px; height: 32px; }
.demo-main.hud .demo-replay { container-type: inline-size; }   /* the broadcast layout sizes itself from this width */
.page-demo h1 { font-size: 28px; margin: 0; }
.page-demo .crumbs { margin-bottom: 8px; }
.dstrip { position: relative; display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; }
.dkey { flex: none; position: relative; }
.dkey summary { list-style: none; cursor: pointer; height: 38px; display: grid; place-items: center; padding: 0 12px; border-radius: 6px; font-size: 12px;
  color: var(--ink-3); background: var(--bg-2); }
.dkey summary::-webkit-details-marker { display: none; }
.dkey summary:hover, .dkey[open] summary { color: var(--ink); background: var(--raise); }
.dkey-body { position: absolute; z-index: 20; top: 44px; right: 0; width: max-content; max-width: min(720px, 80vw); margin: 0; padding: 12px 14px;
  border-radius: 10px; background: #14171c; border: 1px solid #2f353d; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.page-demo .demo-replay { margin-top: 14px; }

/* the demo viewer: the match list on the left (hidable), the viewer beside it */
.page.page-demo { max-width: none; padding: 0; }
.demo-layout { display: grid; grid-template-columns: 296px minmax(0, 1fr); align-items: start; }
html.mb-closed .demo-layout { grid-template-columns: 44px minmax(0, 1fr); }
.demo-main { min-width: 0; width: 100%; max-width: 1640px; margin: 0 auto; padding: 28px 32px 96px; }
.matchbar { position: sticky; top: 52px; height: calc(100vh - 52px); display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-2); border-right: 1px solid var(--line); }
.mb-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 46px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); }
.mb-toggle { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--ink-3); }
.mb-toggle:hover, .mb-toggle:focus-visible { color: var(--ink); background: var(--raise-2); }
.mb-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 24px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.matchbar.closed .mb-list, .matchbar.closed .mb-head .label { display: none; }
.matchbar.closed .mb-head { padding: 0; justify-content: center; }
.mb-group { margin-top: 12px; }
.mb-gh { position: sticky; top: -6px; z-index: 1; display: flex; justify-content: space-between; gap: 8px; padding: 8px 8px 6px; background: var(--bg-2);
  font: 600 11px/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.mb-n { letter-spacing: 0; color: var(--ink-4); }
.mb-series { margin: 2px 0 8px; }
.mb-sh { padding: 4px 8px 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.mb-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px;
  text-decoration: none; color: var(--ink-2); }
.mb-row img { border-radius: 4px; filter: grayscale(1); opacity: .65; }
.mb-row:hover { background: var(--raise); color: var(--ink); }
.mb-row:hover img, .mb-row.on img { opacity: 1; filter: grayscale(.3); }
.mb-row.on { background: var(--raise-2); color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }
.mb-main { display: grid; min-width: 0; }
.mb-t { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-s { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-sc { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.mb-sc.w { color: var(--ink); }
@media (max-width: 900px) {
  .demo-layout, html.mb-closed .demo-layout { grid-template-columns: minmax(0, 1fr); }
  .matchbar { position: static; height: auto; max-height: 60vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .matchbar.closed .mb-head { justify-content: space-between; padding: 0 8px 0 16px; }
  .matchbar.closed .mb-head .label { display: inline; }
  .demo-main { padding: 20px 16px 72px; }
}

.sel { height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font-size: 12.5px; }
.legend-row .tick { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.lineup-edit { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.pick-list { margin-top: 10px; display: grid; gap: 2px; }
.pick-list label { display: flex; gap: 8px; align-items: center; padding: 5px 4px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.pick-list label:hover { background: var(--bg-2); }
.pick-list .sub { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) {
  .tell, .stat, .tile { animation: rise .45s cubic-bezier(.2,.7,.2,1) both; }
  .tell:nth-child(2) { animation-delay: .04s; } .tell:nth-child(3) { animation-delay: .08s; } .tell:nth-child(4) { animation-delay: .12s; }
  .tell:nth-child(5) { animation-delay: .16s; } .tell:nth-child(6) { animation-delay: .2s; } .tell:nth-child(7) { animation-delay: .24s; }
  .tile:nth-child(2) { animation-delay: .04s; } .tile:nth-child(3) { animation-delay: .08s; } .tile:nth-child(4) { animation-delay: .12s; }
  .tile:nth-child(5) { animation-delay: .16s; } .tile:nth-child(6) { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- upcoming matches ---------- */
.up-add { display: flex; gap: 8px; max-width: 640px; margin-top: 22px; }
.up-add input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); }
.up-add input::placeholder { color: var(--ink-4); }
.up-add .btn { height: 38px; }
.up-list { display: grid; gap: 18px; margin-top: 24px; }
.up-card { position: relative; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.up-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--ct), var(--t)); opacity: .85; }
.up-card.pending::before { opacity: .25; }
.up-card.pending .btn { margin-top: 12px; }
.up-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.up-num { font: 600 44px/.9 var(--font); color: var(--ink-4); font-variant-numeric: tabular-nums; min-width: 30px; }
.up-title h2 { margin: 0 0 4px; font-size: 22px; }
.up-title h2 a { text-decoration: none; }
.up-title h2 a:hover { text-decoration: underline; }
.up-next { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.up-tools { display: flex; gap: 2px; }
.icon-btn { all: unset; box-sizing: border-box; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-3); cursor: pointer; font-size: 15px; }
.icon-btn:hover { background: var(--raise); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
.icon-btn:focus-visible { outline: 1.5px solid var(--ink); }
.up-body { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.4fr); gap: 30px; margin-top: 20px; }
.up-src { letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink-4); margin-left: 6px; }
.up-lineup { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.up-player { display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 9px; border-radius: 7px; background: var(--raise); font-size: 13px; font-weight: 500; }
.up-player small { font-size: 9.5px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.up-player.status small { color: var(--ink-2); }
.up-maps { display: grid; gap: 1px; margin-top: 8px; }
.up-map { display: grid; grid-template-columns: 22px 78px minmax(40px, 1fr) 24px 46px 56px; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 13px; }
a.up-map:hover { background: var(--raise); }
.up-map img { border-radius: 4px; filter: grayscale(1); opacity: .7; }
.up-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.up-bar i { display: block; height: 100%; background: var(--ink-4); border-radius: 3px; }
a.up-map .up-bar i { background: var(--ink-2); }
.up-wl { color: var(--ink-2); }
.up-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.up-foot .err { color: var(--warn); }
@media (max-width: 760px) {
  .up-body { grid-template-columns: 1fr; gap: 20px; }
  .up-num { font-size: 34px; }
  .up-map { grid-template-columns: 22px 70px minmax(30px, 1fr) 22px 42px; }
  .up-map > :last-child { display: none; }
}

/* Pro matches (#/pro): events, each a grid of series cards with their maps */
.pro-filter { margin-top: 18px; }
.pro-note { margin-top: 12px; display: grid; gap: 6px; }
.pro-note .sub { display: flex; align-items: center; gap: 8px; }
.pro-skip { margin: 0; padding-left: 18px; color: var(--warn); font-size: 12.5px; }
.pro-list { display: grid; gap: 30px; margin-top: 24px; }
.pro-event h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; font-size: 13px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.pro-event h2 .sub { letter-spacing: 0; text-transform: none; font-weight: 500; }
.pro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.pro-card { position: relative; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 16px 10px; }
.pro-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--ct), var(--t)); opacity: .6; }
.pro-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: baseline; font-size: 17px; font-weight: 600; color: var(--ink-2); }
.pro-vs > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pro-vs > span:first-child { text-align: right; }
.pro-vs > .win { color: var(--ink); }
.pro-vs > .num { font-size: 19px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pro-meta { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; font-size: 12.5px; color: var(--ink-3); }
.pro-meta .tag { margin-left: 0; }
.pro-maps { display: grid; gap: 1px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.pro-map { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 52px; gap: 10px; align-items: center; padding: 6px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 13px; }
.pro-map:hover { background: var(--raise); }
.pro-map img { border-radius: 4px; filter: grayscale(1); opacity: .7; }
.pro-map:hover img { opacity: .95; }
.pro-sc { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pro-sc b { color: var(--ink); font-weight: 600; }
.pro-rn { text-align: right; color: var(--ink-4); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Watch together (SESSIONS.md 5.7): the Together pill, its menu, the join page, the lobby on the right */
.tg-pill { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tg-pill.on i { background: #e5484d; box-shadow: 0 0 0 3px rgba(229,72,77,.16); }
.tg-pop { position: fixed; z-index: 60; width: min(320px, calc(100vw - 24px)); display: grid; gap: 10px; padding: 14px; border-radius: 12px;
  background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,.45); font-size: 13px; }
.tg-pop p { margin: 0; }
.tg-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tg-row .label { min-width: 40px; }
.tg-in { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: inherit; }
.tg-code { flex: 0 0 104px; text-transform: uppercase; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.tg-or { color: var(--ink-3); font-size: 12px; text-align: center; border-top: 1px solid var(--line); padding-top: 8px; }
.tg-msg { color: var(--ink-2); font-size: 12.5px; min-height: 1em; }
.tg-msg:empty { display: none; }
.tg-join { max-width: 560px; }
.tg-join .tg-row { margin-top: 18px; max-width: 420px; }

body.has-lobby { --lobby: 44px; }
body.lobby-open { --lobby: 272px; }
body.has-lobby #app { margin-right: var(--lobby); }
body.has-lobby .atlas { --map: min(calc(100vw - var(--panel) - var(--side) - var(--lobby) - 40px - var(--tools)), var(--map-h)); }
.lobby { position: fixed; z-index: 40; top: 52px; right: 0; bottom: 0; width: var(--lobby); display: flex; flex-direction: column; gap: 10px;
  padding: 12px 12px 14px; overflow: auto; background: var(--bg); border-left: 1px solid var(--line); font-size: 13px; }
.lobby[hidden] { display: none; }
body.has-lobby:not(.lobby-open) .lobby { padding: 8px 4px; }
.lb-strip { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 10px; color: var(--ink-3); padding-top: 4px; }
.lb-dot { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); color: var(--ink); font-weight: 600; font-size: 12px; }
.lb-dot.away { opacity: .45; }
.lb-dot .lb-live { position: absolute; right: -2px; bottom: -2px; }
.lb-head { display: flex; align-items: center; gap: 8px; }
.lb-head b { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.lb-code { all: unset; cursor: pointer; display: grid; line-height: 1.1; padding: 3px 8px; border-radius: 7px; background: var(--raise); font: 600 13px/1.15 var(--font); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.lb-code small { font-size: 9.5px; letter-spacing: .04em; font-weight: 500; color: var(--ink-3); }
.lb-code:hover { background: var(--raise-2); }
.lb-ib { all: unset; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; color: var(--ink-3); }
.lb-ib:hover { background: var(--raise); color: var(--ink); }
.lb-sub { display: flex; align-items: center; gap: 6px; margin-top: 6px; font: 600 10.5px/1 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.lb-people { display: grid; gap: 2px; }
.lb-p { display: flex; align-items: center; gap: 7px; min-height: 30px; padding: 2px 4px 2px 6px; border-radius: 8px; }
.lb-p:hover { background: var(--bg-2); }
.lb-p.away { opacity: .5; }
.lb-p.me .lb-name { color: var(--ink); }
.lb-live { flex: none; color: var(--ink-4); }
.lb-view { flex: none; color: var(--ink-4); }
.lb-view.v3d { color: var(--ink-2); }
.lb-view.vpov { color: var(--ink); filter: drop-shadow(0 0 3px rgba(236,233,227,.45)); }
.lb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.lb-name small { color: var(--ink-4); }
.lb-rename { min-width: 0; flex: 1; height: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: inherit; }
.lb-badge { flex: none; display: inline-grid; color: var(--ink-3); }
.lb-seat { flex: none; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--ink-3); }
.lb-more { all: unset; cursor: pointer; flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; color: var(--ink-3); }
.lb-more:hover { background: var(--raise); color: var(--ink); }
.lb-menu { position: absolute; z-index: 5; right: 10px; width: 220px; display: grid; padding: 6px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 12px 34px rgba(0,0,0,.45); }
.lb-mi { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--ink-2); }
.lb-mi:hover { background: var(--raise-2); color: var(--ink); }
.lb-mi.sub { padding-left: 16px; font-size: 12.5px; }
.lb-mi.warn { color: var(--warn); }
.lb-mi b { font-weight: 600; padding: 2px 6px; border-radius: 5px; }
.lb-yes { background: var(--warn); color: #111; }
.lb-no { color: var(--ink-2); }
.lb-ms { padding: 6px 8px 2px; font: 600 10px/1 var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-4); }
.lb-team { all: unset; cursor: pointer; padding: 2px 7px; border-radius: 6px; font: 500 11.5px/1.4 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-3); border: 1px solid var(--line-2); }
.lb-team.on { color: var(--ink); border-color: var(--ink-3); background: var(--raise); }
.lb-seats { display: grid; gap: 4px; }
.lb-sh, .lb-sr { display: grid; grid-template-columns: minmax(0, 1fr) 72px 72px; gap: 6px; align-items: center; }
.lb-sh { font-size: 10.5px; color: var(--ink-4); }
.lb-sn { min-width: 0; display: grid; gap: 2px; font-size: 12px; color: var(--ink-2); }
.lb-who { display: flex; gap: 3px; }
.lb-who i { width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; font: 600 9px/1 var(--font); font-style: normal; background: var(--raise-2); color: var(--ink); }
.lb-sel { width: 100%; min-width: 0; height: 26px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 12px var(--font); }
.lb-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.lb-cell.empty { color: var(--ink-4); }
.lb-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-3); font-size: 12.5px; }
.lb-note.act { color: var(--ink-2); }
.lb-note.warn { color: var(--warn); }
.lb-foot { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  body.has-lobby #app { margin-right: 0; }
  body.has-lobby .atlas { --map: min(calc(100vw - var(--panel) - var(--side) - 40px - var(--tools)), var(--map-h)); }
  .lobby { top: auto; left: auto; right: 12px; bottom: 12px; width: auto; max-height: min(70vh, 520px); border: 1px solid var(--line-2); border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.5); }
  body.lobby-open .lobby { left: 12px; }
  body.has-lobby:not(.lobby-open) .lobby { padding: 6px; }
  .lb-strip { grid-auto-flow: column; }
}

/* the published read-only copy: nothing that needs the live server */
body.static .live, body.static .bar-search, body.static #connPill, body.static #queuePill, body.static .rp-3d { display: none !important; }
@media (max-width: 640px) {
  .tell { grid-template-columns: 26px minmax(0, 1fr) 30px; gap: 4px 12px; }
  .tell-n { grid-column: 1; grid-row: 1; }
  .tell-main { grid-column: 2; grid-row: 1; }
  .tell-ev { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-items: start; gap: 10px; padding-top: 2px; }
  .tell > .play-sm { grid-column: 3; grid-row: 1; }
  .tell-main p { font-size: 15.5px; }
  .tb-item { grid-template-columns: minmax(0, 1fr) 26px; row-gap: 2px; }
  .tb-item > b { white-space: normal; }
  .tb-item > .play-sm { grid-column: 2; grid-row: 1 / span 2; }
  .a-ctx .filters { gap: 10px 14px; }
}
@media (max-width: 440px) { .mark b { display: none; } }   /* the logo alone: the links and Together need the room */

/* ---------- the 3D player kept alive beside the map (lib/theater3d.js): a full-window frame, a Q chip, the floating map (M) ---------- */
.th3d { position: fixed; inset: 0; z-index: 120; background: #000; }
.th3d[hidden] { display: none; }
.th3d-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.th3d-chip { all: unset; position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 4; cursor: pointer; width: 34px; height: 96px;
  border-radius: 10px 0 0 10px; background: rgba(10,12,15,.74); border: 1px solid rgba(236,233,227,.2); border-right: 0; color: var(--ink-2); font: 800 15px/1 var(--font); }
.th3d-chip:hover { color: var(--ink); background: rgba(20,24,30,.92); border-color: rgba(236,233,227,.45); }
.th3d-chip > span { position: absolute; inset: 0; display: grid; place-items: center; animation: th3d-flip 5s ease-in-out infinite; }
.th3d-chip > .th3d-b { animation-delay: -2.5s; }
@keyframes th3d-flip { 0%, 40% { opacity: 1; } 50%, 90% { opacity: 0; } 100% { opacity: 1; } }
.th3d-note { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 4; padding: 10px 14px; border-radius: 8px;
  background: rgba(20,24,30,.92); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; }
.th3d-note[hidden] { display: none; }
body.th3d-open { overflow: hidden; }
/* the hint above the 3D's bar, until M is pressed once */
.th3d-hint { all: unset; position: absolute; left: 50%; bottom: calc(96px + 19vh); transform: translateX(-50%);   /* above the 3D's bar, its player HUD and its map-loading box */ z-index: 4; cursor: pointer; display: flex; align-items: baseline; gap: 9px;
  padding: 7px 16px 8px; border-radius: 10px; background: rgba(10,12,15,.8); border: 1px solid rgba(236,233,227,.18); color: var(--ink); font: 600 15px/1 var(--font); letter-spacing: .04em; }
.th3d-hint:hover { background: rgba(20,24,30,.94); border-color: rgba(236,233,227,.4); }
.th3d-hint b { color: #ff4136; font: 900 26px/1 var(--font-d); }
.th3d-hint[hidden] { display: none; }
/* the floating map: the page's own replay moved in (its tools with it), the parts the page hands in under it */
.th3d-panel { position: absolute; z-index: 3; left: 16px; top: 16px; width: 520px; max-width: calc(100vw - 16px); max-height: calc(100vh - 24px); display: grid; grid-template-rows: auto minmax(0, 1fr);
  border-radius: 12px; border: 1px solid rgba(236,233,227,.22); background: rgba(12,14,17,.94); box-shadow: 0 24px 60px rgba(0,0,0,.55); backdrop-filter: blur(8px); }
.th3d-panel[hidden] { display: none; }
.th3d-ph { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; cursor: grab; user-select: none; border-bottom: 1px solid rgba(236,233,227,.1); font-size: 12px; color: var(--ink-3); }
.th3d-ph b { color: var(--ink); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.th3d-ph.dragging { cursor: grabbing; }
.th3d-ph .x { all: unset; margin-left: auto; cursor: pointer; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; color: var(--ink-2); font-size: 16px; }
.th3d-ph .x:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.th3d-pb { padding: 10px 10px 14px; overflow: auto; min-height: 0; display: grid; gap: 10px; align-content: start; }
.th3d-grip { position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; cursor: nwse-resize; border-bottom-right-radius: 10px;
  background: linear-gradient(135deg, transparent 50%, rgba(236,233,227,.4) 50% 58%, transparent 58% 70%, rgba(236,233,227,.4) 70% 78%, transparent 78%); }
.th3d-pb .rp-transport, .th3d-pb .rp-gif, .th3d-pb .rp-edits, .th3d-pb .rp-head, .th3d-pb .rp-3d { display: none !important; }
.th3d-pb .rp--hud { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bug" "view"; --rp-map: 100%; }
.th3d-pb .rp--hud .sb, .th3d-pb .rp--hud .ev { display: none !important; }
.th3d-pb .rp--hud .rp-stage { width: auto; flex: 1 1 auto; }
.th3d-pb .rp--hud > .rp-banner { gap: 6px; }
