/* /App.razor.rz.scp.css */
/* Router fallbacks — the NotAuthorized / NotFound fragments rendered
   inline inside App.razor's <AuthorizeRouteView>. Kept scoped so the global
   style-recalc surface shrinks. */

/* Colours come from the theme tokens, never hard-coded hexes, so both schemes
   stay readable (every non-canvas surface follows this rule). */
.app-fallback[b-unmlx7teef] {
    max-width: 480px;
    margin: 4rem auto;
    text-align: center;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

.app-fallback h1[b-unmlx7teef] { margin: 0 0 var(--space-2) 0; color: var(--color-text-primary); }
.app-fallback p[b-unmlx7teef] { margin: 0 0 var(--space-4) 0; line-height: 1.45; }

.app-fallback-link[b-unmlx7teef] { color: var(--color-accent); text-decoration: none; }

.app-fallback--plain[b-unmlx7teef] {
    color: var(--color-text-secondary);
    text-align: center;
    padding: 0;
    margin: 0;
    line-height: 1.5;
}

/* ── 404 ── */
.app-notfound[b-unmlx7teef] {
    max-width: 30rem;
    margin: 4rem auto;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
}

.app-notfound__title[b-unmlx7teef] {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.app-notfound__link[b-unmlx7teef] {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.app-notfound__link:hover[b-unmlx7teef] {
    border-color: var(--color-accent-solid);
    background: var(--color-accent-solid);
    color: var(--color-accent-contrast);
}
/* /Features/ConnectFive/ConnectFivePage.razor.rz.scp.css */
/* ── Connect Five — scoped board styles ──
   Scoped so the 81-cell board's selectors do not participate in every other
   game's style-matching. Colours, radii and
   elevation come from the central design tokens (:root in app.css) — no raw hex
   drift here. The shared status/result badges (.cf-status--*, .cf-result--*) stay
   global: they're a cross-game vocabulary TicTacToe et al. alias to.

   Cell size respects 100dvh + 100dvw so the 9x9 board scales to fit portrait
   phones instead of overflowing. */
.cf-layout[b-0yoici30uf] {
  /* Cell size. The 84px ceiling lets the height term decide on a desktop (at
     900px of viewport height it allows ~73px); a lower ceiling would pin the
     board to a small square in a large empty page. The 310px height reserve pays
     for the status bar above the board plus the app header. */
  --cf-cell: clamp(28px, min(calc((100dvh - 310px) / 9), calc((100dvw - 100px) / 9)), 84px);
  --cf-cell-stride: calc(var(--cf-cell) + 3px);
  /* Every disc drops the full board depth (Rows), not (row + 1). Otherwise a
     piece in row 0 only travels 1 cell (~50px) while a piece in row 8 travels
     9 cells (~450px), and the inconsistent drop lengths read as "pieces going
     through others." */
  --cf-drop-rows: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-width: 0;
}

/* ── Online quick-match slot ───────────────────────────────────────────────
   The shared QuickMatchPanel fills this; the slot only sizes it to the board. */
.cf-online-slot[b-0yoici30uf] {
  width: calc(var(--cf-cell) * 9 + 3px * 8 + 20px);
  max-width: 100%;
  margin: 0 auto;
}

/* Secondary line in the panel and on the end-of-game summary. */
.cf-online-note[b-0yoici30uf] {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

/* ── Turn strip slot ──────────────────────────────────────────────────────
   The strip itself is Components/TurnStrip (shared with Tic-Tac-Toe); like the quick-match slot above, this only sizes it to the board. */
.cf-status-slot[b-0yoici30uf] {
  width: calc(var(--cf-cell) * 9 + 3px * 8 + 20px);
  max-width: 100%;
  margin: 0 auto;
}

/* Glassmorphism board frame + depth layers. A translucent, blurred slab with
   a lit top edge (inset highlight) and a grounded drop shadow reads as a real
   physical board the discs sit inside. backdrop-filter is GPU-composited. */
.cf-board[b-0yoici30uf] {
  display: grid;
  grid-template-columns: repeat(9, var(--cf-cell));
  grid-template-rows: repeat(9, var(--cf-cell));
  gap: 3px;
  margin: 1rem auto;
  /* One 10px frame; width tracks grid + frame (no extra width on top of the padding). */
  width: calc(var(--cf-cell) * 9 + 3px * 8 + 20px);
  max-width: 100%;
  padding: 10px;
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-2);
  backdrop-filter: var(--glass-2);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),   /* lit top edge */
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),         /* shaded bottom */
    var(--elevation-1);                          /* grounded elevation */
  /* Paint containment so the 81 cells don't repaint the page during drops. */
  contain: layout paint;
}

.cf-cell[b-0yoici30uf] {
  width: var(--cf-cell);
  height: var(--cf-cell);
  /* The empty "hole": a slightly recessed neutral socket, not a coloured disc.
     The rim was rgba(255,255,255,0.05), which against the dark-theme board is
     effectively invisible — in dark mode the whole grid disappeared and the
     board read as a blank slab, the same complaint the GL board had. A hole
     reads as a hole from a dark interior plus a LIT rim, so the rim is raised
     to 0.14 and given a bright lower edge to catch the light, while the inner
     shadow is deepened to keep the interior clearly below the surface. Both are
     white-on-translucent, so they strengthen the socket in dark mode without
     washing it out in light. */
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 3vmin, 1.6rem);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
  position: relative;
  /* No clipping here: the drop animation lifts the disc far above its own cell;
     the board's `contain: paint` clips the traveller to the board's top edge. */
  overflow: visible;
}

.cf-cell:hover:not(.disabled)[b-0yoici30uf] {
  border-color: var(--accent-cyan);
}

.cf-cell.disabled[b-0yoici30uf] { cursor: default; }

/* ── The disc IS the piece ──
   One element carries the colour AND the drop, so there is no static
   colour-fill circle appearing beneath a second sliding circle. GPU path: transform-only, promoted. */
.cf-cell .piece[b-0yoici30uf] {
  width: 84%;
  height: 84%;
  border-radius: 50%;
  font-size: 0;
  will-change: transform;
  /* `forwards` (not `both`) keeps the disc at translateY(0) once the keyframe
     completes, so settled discs do not flicker between the 0% (above-board) and
     100% (cell) frames when Blazor re-renders during rapid demo drops. Iteration
     count pinned to 1 to prevent any animation-name leak from re-triggering the
     cascade. */
  animation: cf-slide-down-b-0yoici30uf 0.55s cubic-bezier(0.34, 1.2, 0.55, 1) forwards 1;
}

/* Off-centre radial highlight (lit rim → mid → dark core) reads as a lit sphere.
   The gradient is written out per-colour here rather than via a shared :root
   template: a template custom property resolves its inner var()s at its own
   declaring element (:root), where the piece-scoped colours aren't in scope, so
   it would compute to empty. The --disc-*-{lit,mid,core} tokens ARE :root-level,
   so they resolve correctly when the gradient is computed on the disc. */
.cf-cell .piece.red-piece[b-0yoici30uf] {
  background: radial-gradient(circle at 34% 28%,
    var(--disc-red-lit) 0%, var(--disc-red-mid) 46%, var(--disc-red-core) 100%);
  box-shadow: var(--disc-shadow);
}

.cf-cell .piece.yellow-piece[b-0yoici30uf] {
  background: radial-gradient(circle at 34% 28%,
    var(--disc-yellow-lit) 0%, var(--disc-yellow-mid) 46%, var(--disc-yellow-core) 100%);
  box-shadow: var(--disc-shadow);
}

/* No separate bounce step: the cubic-bezier(0.34, 1.2, 0.55, 1) easing already
   overshoots past 0 between 0% and 70%, giving the disc a soft squash-and-settle.
   A larger lift after landing would raise the disc ABOVE its cell right as a new
   piece is about to drop, which reads as "the new piece passed through the
   settled one." */
@keyframes cf-slide-down-b-0yoici30uf {
  0%   { transform: translateY(calc(-1 * var(--cf-drop-rows, 9) * var(--cf-cell-stride, 55px))) scale(0.92, 1.12); }
  68%  { transform: translateY(0) scale(1.14, 0.86); }
  84%  { transform: translateY(-5px) scale(0.96, 1.04); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* GPU column-preview ghost. A translucent, un-animated disc marks exactly
   where the next piece will land in the hovered column. Hover-capable pointers
   only — coarse/touch devices never get a stuck ghost after a tap. */
.cf-cell .piece.ghost-piece[b-0yoici30uf] {
  opacity: 0;
  animation: none;
  will-change: opacity;
  box-shadow: none;
  filter: saturate(0.7);
  transition: opacity var(--dur-fast) var(--ease-standard);
}
@media (hover: hover) and (pointer: fine) {
  .cf-cell .piece.ghost-piece[b-0yoici30uf] { opacity: 0.45; }
}

/* One-shot win reveal — holographic neon laser cascade. The winning discs
   pop in a staggered cascade with electric cyan laser rays, then settle to a static cyan halo. */
.cf-cell.win-cell[b-0yoici30uf] {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 24px var(--accent-cyan), inset 0 0 12px var(--accent-cyan);
  animation: cf-win-pop-b-0yoici30uf 0.45s var(--ease-out) forwards 1;
  animation-delay: calc(var(--win-i, 0) * 90ms);
}
.cf-cell.win-cell .piece[b-0yoici30uf] {
  animation: cf-win-disc-b-0yoici30uf 0.45s var(--ease-out) forwards 1;
  animation-delay: calc(var(--win-i, 0) * 90ms);
  box-shadow: 0 0 18px #00f0ff;
}
/* Post-cascade static state. */
.cf-cell.win-cell-static[b-0yoici30uf] {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px var(--accent-cyan), inset 0 0 8px var(--accent-cyan);
}
.cf-cell.win-cell-static .piece[b-0yoici30uf] {
  box-shadow: 0 0 14px #00f0ff;
}
@keyframes cf-win-pop-b-0yoici30uf {
  0%   { box-shadow: 0 0 0 var(--accent-glow); transform: scale(1); }
  55%  { box-shadow: 0 0 32px var(--accent-cyan), inset 0 0 16px var(--accent-cyan); transform: scale(1.08); }
  100% { box-shadow: 0 0 24px var(--accent-cyan), inset 0 0 12px var(--accent-cyan); transform: scale(1); }
}
@keyframes cf-win-disc-b-0yoici30uf {
  0%   { transform: scale(1); filter: brightness(1); }
  55%  { transform: scale(1.22); filter: brightness(1.4); }
  100% { transform: scale(1); filter: brightness(1.1); }
}

/* Motion hygiene — every animated surface collapses to a static end-state
   for users who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .cf-cell .piece[b-0yoici30uf],
  .cf-cell.win-cell[b-0yoici30uf],
  .cf-cell.win-cell .piece[b-0yoici30uf] { animation: none; }
  .cf-cell[b-0yoici30uf] { transition: none; }
  /* Under reduced-motion the cascade never plays; jump straight to
     the static state so win cells still glow but never animate. */
  .cf-cell.win-cell[b-0yoici30uf] { animation: none; box-shadow: 0 0 16px var(--accent-glow); }
}

/* ── Portrait phones ──
   Shrink cells and drop the frame inset so board + shell chrome fit one
   viewport height without a second nested border eating horizontal space. */
@media (max-width: 640px) {
  .cf-layout[b-0yoici30uf] {
    /* Constrain by width AND height. The width reserve must cover the real chrome:
       .gps-game-area padding (1.5rem × 2 = 48px) + the board frame (7px × 2 = 14px)
       + the cell gaps (2px × 8 = 16px) = 78px; a smaller reserve clips the 9th
       column off the right edge of a 390px phone. The reserve is 86px (78px chrome
       + 8px safety), and because the grid tracks derive from --cf-cell the whole
       board shrinks with it — the full 9 columns always fit. */
    --cf-cell: clamp(24px, min(calc((100dvh - 220px) / 9), calc((100dvw - 86px) / 9)), 44px);
    --cf-cell-stride: calc(var(--cf-cell) + 2px);
  }
  .cf-board[b-0yoici30uf] {
    gap: 2px;
    padding: 7px;
    width: calc(var(--cf-cell) * 9 + 2px * 8 + 14px);
    border-radius: var(--radius-md);
  }
  /* Track the mobile board chrome (gaps 2×8 + frame 7×2), not the desktop
     figure — the status bar used to come out 12px wider than the board it
     labels. */
  .cf-status-slot[b-0yoici30uf],
  .cf-online-slot[b-0yoici30uf] {
    width: calc(var(--cf-cell) * 9 + 2px * 8 + 14px);
  }
  .cf-cell[b-0yoici30uf] { font-size: clamp(0.85rem, 2.6vmin, 1rem); }
}

@media (max-width: 360px) {
  .cf-layout[b-0yoici30uf] {
    --cf-cell: clamp(22px, min(calc((100dvh - 200px) / 9), calc((100dvw - 40px) / 9)), 36px);
  }
  .cf-cell[b-0yoici30uf] { font-size: 0.75rem; }
}

/* Required for the absolutely-positioned canvas to anchor to the board rather
   than to the page. .cf-board is a grid container, so relative positioning
   changes nothing about its layout. */
.cf-board[b-0yoici30uf] {
  position: relative;
}

/* ARIA row wrapper. `display: contents` keeps all 81 cells as direct
   grid items of .cf-board so the 9×9 template above still lays them out — the
   element exists purely to satisfy grid > row > gridcell in the a11y tree. */
.cf-row[b-0yoici30uf] { display: contents; }

/* ── Physics-driven drop ─────────────────────────────────────────────────
   matter.js drives the disc visually from above the board to its target cell
   via a floating clone parented to document.body, and hides that one cell's
   static disc for the flight so the player does not see the disc already in
   place with a clone falling onto it.

   There is deliberately no rule here for either half:
   • The clone is body-parented, so it never carries this component's scope
     attribute and no rule in this file can reach it. Its disc styling lives in
     wwwroot/css/app.css under `.cf-physics-clone`.
   • The hide is an inline style written by js/connectfive/index.js, because
     the cell's `class` attribute is Blazor-managed and a class added from JS
     is wiped by the next diff.
   • The hide is per cell, never a board-wide rule: in the CPU-vs-CPU demo the next
     drop starts before the previous one settles, so hiding every disc for the
     duration of a flight would leave the board blank essentially always. */

/* The one board-level rule that survives: while physics owns the drop, the
   keyframe must not ALSO run. Blazor renders the settled disc a frame or two
   before the JS hide can find it, and cf-slide-down starts the moment the
   element exists — so the player saw a disc drop in at the top of the board
   while an identical clone fell past it, then the clone land on top of it.

   js/connectfive/index.js toggles this class per drop, and clears it whenever
   it declines one (reduced motion, the adaptive tier dropping to `low`, matter.js
   missing), so the keyframe is always available on exactly the drops that need
   it. Discs already delivered carry an inline `animation: none` of their own, so
   handing the keyframe back never restarts a settled disc. */
.cf-board--physics .cf-cell .piece[b-0yoici30uf] {
  animation: none;
}

/* A phone on its side: about 390px of height, 326px of it under the top bar. The
   310px reserve above assumes a tall window and left the 28px floor in charge,
   which made the board 87px taller than the room it had. Here the reserve is what
   is really around the board (top bar, the turn strip, the frame, the gaps), and
   the floor is the 24px minimum target. */
@media (max-height: 500px) {
  /* 2026-11-17: the top bar is ~63px on a phone on its side, not the ~40px this reserve
     assumed, so at 844x390 the page still scrolled by 34px (MobileGoldenPathTests). The
     reserve now counts the real bar, the board's margin is halved, and the cell floor drops
     to 20px; on a touch screen the board is driven by the 44px side pads, not the cells. */
  .cf-layout[b-0yoici30uf] {
    --cf-cell: clamp(20px, min(calc((100dvh - 200px) / 9), calc((100dvw - 100px) / 9)), 84px);
  }
  .cf-board[b-0yoici30uf] { margin: 0.4rem auto; }
  /* The status strip tracks the board's width, and a 200px strip wraps both names onto two
     lines (84px tall). On a phone on its side there is width to spare, so give it room. */
  .cf-status-slot[b-0yoici30uf] { width: min(100%, 26rem); }
}

/* Keyboard / gamepad focus on a column's top cell. The socket's own inset shadow
   outranks the shell's shared focus shadow, so the ring is an outline. */
.cf-board:focus-visible[b-0yoici30uf] {
  outline: 3px solid var(--accent-cyan, #22d3ee);
  outline-offset: 4px;
}
.cf-cell--cursor[b-0yoici30uf] {
  outline: 3px solid var(--accent-cyan, #22d3ee);
  outline-offset: 1px;
}

/* Notched phones: keep the board and touch controls clear of the cutouts. */
.cf-layout[b-0yoici30uf] {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

.cf-touch-controls[b-0yoici30uf] { display: none; }

@media (pointer: coarse) {
  .cf-layout[b-0yoici30uf] { position: relative; }
  .cf-board[b-0yoici30uf] { pointer-events: none; }
  .cf-touch-controls[b-0yoici30uf] {
    display: flex;
    justify-content: center;
    gap: 8px;
  }
  .cf-touch-controls button[b-0yoici30uf] {
    min-width: 44px;
    min-height: 44px;
  }
}

@media (pointer: coarse) and (max-width: 640px) {
  .cf-layout[b-0yoici30uf] {
    --cf-cell: clamp(22px, min(calc((100dvh - 276px) / 9), calc((100dvw - 86px) / 9)), 44px);
  }
}

@media (pointer: coarse) and (max-height: 500px) and (orientation: landscape) {
  .cf-touch-controls[b-0yoici30uf] {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
  }
}

.cf-options[b-0yoici30uf] {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cf-options__label[b-0yoici30uf] {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.cf-result[b-0yoici30uf] {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}
.cf-result--win[b-0yoici30uf]  { color: #34d399; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); box-shadow: 0 0 16px rgba(52, 211, 153, 0.15); }
.cf-result--loss[b-0yoici30uf] { color: #f87171; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); box-shadow: 0 0 16px rgba(248, 113, 113, 0.1); }
.cf-result--draw[b-0yoici30uf] { color: var(--color-text-secondary); background: var(--color-surface-hover, rgba(148, 163, 184, 0.1)); border: 1px solid var(--color-border); }

.cf-ai-summary[b-0yoici30uf] { display: flex; flex-direction: column; align-items: center; gap: 0.65rem; width: 100%; }
.cf-elo-change[b-0yoici30uf] {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.cf-elo-now[b-0yoici30uf] { color: var(--color-text-primary); font-weight: 700; }
.cf-elo-delta[b-0yoici30uf] { padding: 0.1rem 0.5rem; border-radius: 9999px; font-weight: 800; font-size: 0.82rem; }
.cf-elo-delta--up[b-0yoici30uf]   { color: #34d399; background: rgba(52, 211, 153, 0.18); border: 1px solid rgba(52, 211, 153, 0.3); }
.cf-elo-delta--down[b-0yoici30uf] { color: #f87171; background: rgba(248, 113, 113, 0.18); border: 1px solid rgba(248, 113, 113, 0.3); }
.cf-elo-delta--flat[b-0yoici30uf] { color: #94a3b8; background: rgba(148, 163, 184, 0.18); border: 1px solid rgba(148, 163, 184, 0.3); }
.cf-elo-cpu[b-0yoici30uf] { opacity: 0.85; font-size: 0.82rem; }
/* /Features/Health/HealthPage.razor.rz.scp.css */
/* /diag — every colour reads from the root tokens, so the page follows light and dark. */
.dg[b-lioh9zq2kb] {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    padding: var(--space-4) var(--space-4) var(--space-6);
    color: var(--color-text-primary);
    box-sizing: border-box;
}

/* Reserved before the report lands, so the result does not push the page around. */
.dg-body[b-lioh9zq2kb] { min-height: 16rem; display: grid; gap: var(--space-4); align-content: start; }

.dg-section[b-lioh9zq2kb] { margin-top: var(--space-4); }

.dg-h2[b-lioh9zq2kb] {
    margin: 0 0 var(--space-2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

/* The cards and badges are the estate's .po-diag__card / .po-badge (po-tokens.css): name
   and badge on the first row, the description and timing spanning both columns below. */
.dg-card[b-lioh9zq2kb] {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
}

.dg-banner[b-lioh9zq2kb] {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}
.dg-banner--ok[b-lioh9zq2kb] { border-color: color-mix(in srgb, var(--po-success) 40%, var(--po-border)); }
.dg-banner--warn[b-lioh9zq2kb] { border-color: color-mix(in srgb, var(--po-warning) 40%, var(--po-border)); }
.dg-banner--bad[b-lioh9zq2kb] { border-color: color-mix(in srgb, var(--po-danger) 40%, var(--po-border)); }
.dg-banner-title[b-lioh9zq2kb] { margin: 0; font-weight: 700; }

.dg-name[b-lioh9zq2kb] { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }

.po-diag__card .dg-desc[b-lioh9zq2kb],
.po-diag__card .dg-meta[b-lioh9zq2kb] { grid-column: 1 / -1; }

.dg-desc[b-lioh9zq2kb],
.dg-banner-text[b-lioh9zq2kb] {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.dg-meta[b-lioh9zq2kb] {
    margin: 0;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.dg-body[b-lioh9zq2kb]  .dg-res { padding: var(--space-1) 0; }
.dg-body[b-lioh9zq2kb]  .dg-route { font-size: 0.75rem; color: var(--color-text-secondary); overflow-wrap: anywhere; }

/* Touch: the Refresh button reaches the 44px target. */
@media (pointer: coarse) {
    .dg[b-lioh9zq2kb]  .rz-button { min-height: 44px; min-width: 44px; }
}

.dg-facts[b-lioh9zq2kb] {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-1) var(--space-3);
    margin: 0;
    font-size: 0.875rem;
}

.dg-facts dt[b-lioh9zq2kb] { color: var(--color-text-secondary); }
.dg-facts dd[b-lioh9zq2kb] { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* /Features/Home/Index.razor.rz.scp.css */
/* ══════════════════════════════════════════════════════════
   Home page

   The hub bar (just the demo reel) over one game-major grid:
   a card per game, a chip per mode. Scoped CSS only ever applies to this one
   component, so rules for markup Index.razor does not render style nothing and
   should not be kept.

   Colour comes through the app.css tokens, never raw hex, or the page is
   unthemed in light mode.
   ══════════════════════════════════════════════════════════ */

.home-container[b-u24kmc4flv] {
    position: relative;
    /* `width: 100%` is load-bearing, not redundant with the max-width below.
       This is a flex item of `main.gl-content` (a column flex container); with
       no declared width it is sized shrink-to-fit, i.e. to its max-content
       width, and the max-width then only ever clamps a number it never reaches.
       Without it the grid collapses to 2 columns on a laptop and half the screen
       is empty. */
    width: 100%;
    /* 1280, not 1200: three columns need 410px each for the longest row (a title and
       four chips) to stay on one line. */
    max-width: min(1280px, 100%);
    margin: 0 auto;
    /* Tight padding: the home page's job is to show all the games at once. The
       ≤640px block near the bottom of this file sets its own tighter values. */
    padding: var(--space-4) var(--space-4) var(--space-4);
    isolation: isolate; /* contain the WebGL canvas stacking context */
    /* `min-width: 0` lets this flex item shrink to the viewport and hands the
       wrapping job to the cards; without it an unwrappable title pushed the page
       sideways on a 390px phone. */
    min-width: 0;
    /* Fill the content well; the bar and grid size to their content and sit in the
       middle of a tall window rather than stretching into it. */
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    /* Top-aligned. It used to centre the board in a tall window, which was right when
       the page was only cards; now the page header leads, and centring it left ~200px
       of nothing above the title on a laptop. */
    justify-content: flex-start;
    /* `overflow-x: clip` stops the WebGL canvas or the tilt perspective offset from
       adding a few px of sideways scroll, without clipping a sticky shadow. */
    overflow-x: clip;
}

/* GPU ambient particle canvas — sits behind the mesh gradient and content.
   pointer-events: none so taps fall through to the content underneath.
   position: absolute so it doesn't affect the layout flow. */
.home-ambient[b-u24kmc4flv] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
    mix-blend-mode: screen;
    /* The canvas ends where this container ends, which on a wide screen is 80px
       short of the window: a lit rectangle with a visible edge. Fade it out. */
    -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 78%);
    mask-image: radial-gradient(ellipse at center, #000 45%, transparent 78%);
}

.home-mesh[b-u24kmc4flv] {
    z-index: 0;
}

/* Content layers sit above the canvas. */
.home-activity[b-u24kmc4flv] {
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .home-ambient[b-u24kmc4flv] { display: none; }
}

/* The app's own reduced-motion toggle and the low tier switch the field off too
   (ambientParticles.js also stops rendering; this hides any frame left behind). */
:root[data-motion="reduce"] .home-ambient[b-u24kmc4flv],
:root[data-gfx="low"] .home-ambient[b-u24kmc4flv] {
    display: none;
}

/* ── Hub tools ───────────────────────────────────────────────────────────────
   The page header's action slot: the demo reel button. */
.home-tools[b-u24kmc4flv] {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* The demo reel: the only control that changes app state rather than navigating,
   so it carries its own accent to read as a control. */
.home-action[b-u24kmc4flv] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--surface-raised);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: 700;
    font-family: var(--font-display);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.18s var(--ease-standard),
                background 0.18s var(--ease-standard),
                transform 0.18s var(--ease-standard);
}

.home-action:hover[b-u24kmc4flv] {
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

.home-action-icon[b-u24kmc4flv] {
    display: inline-flex;
    font-size: 1rem;
    line-height: 1;
}

.home-action--demo[b-u24kmc4flv] {
    border-color: var(--accent-ring);
    background: var(--accent-soft);
    color: var(--accent-ink);
}

.home-action--demo:hover[b-u24kmc4flv] {
    border-color: var(--color-accent);
}

/* Running: the solid accent, so "on" is a filled button rather than a brighter tint. */
.home-action--on[b-u24kmc4flv] {
    background: var(--color-accent-solid);
    border-color: var(--color-accent-solid);
    color: var(--color-accent-contrast);
}

/* ── Hub banner ──────────────────────────────────────────────────────────── */
.arcade-marquee[b-u24kmc4flv] {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
}

.arcade-marquee__left[b-u24kmc4flv] {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.arcade-marquee__coin[b-u24kmc4flv] {
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--accent-warning-soft);
    color: var(--accent-warning-ink);
}

.arcade-marquee__title[b-u24kmc4flv] {
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
}

/* ── Game grid ─────────────────────────────────────────────────────────────
   Intrinsic rows: each row is as tall as its tallest card, with a floor so a
   one-line card is still a comfortable target. There is no height cap measured
   for a particular number of games, so a filter, a pin or a new game changes
   nothing here; the container centres the grid in a tall window. */
.home-grid[b-u24kmc4flv] {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(6.5rem, auto);
    gap: 0.6rem;
}

.home-card[b-u24kmc4flv] {
    position: relative;
    display: flex;
    /* Wrap is the layout now: title and chips share line one, the description takes
       line two. It was also the fallback for a long title, so it still covers that. */
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: space-between;
    gap: 0.2rem 0.6rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    perspective: 700px;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.22s var(--ease-standard),
                box-shadow 0.22s var(--ease-standard);
    /* Containment — each card is a self-contained layout so a hover/focus
       repaint on one card never reaches the rest of the grid. */
    contain: layout paint;
}

/* The whole card is the target, not just its title. The link's ::after stretches over
   the card's padding box; the chips sit above it, so a chip still lands on its own
   destination and everything else opens the game. */
.home-card-head[b-u24kmc4flv]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.home-card-modes[b-u24kmc4flv] {
    position: relative;
    z-index: 1;
}

.home-card:hover[b-u24kmc4flv] {
    transform: translateY(-3px) scale(1.015);
    border-color: var(--color-accent);
    box-shadow: var(--elevation-1);
}

/* The heading: a link to the game's main mode (one large target per card), or a
   plain label while offline or while pinning. */
.home-card-head[b-u24kmc4flv] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: opacity 0.18s var(--ease-standard);
    min-width: 0;
}

/* Without this the title is a flex item at its max-content width and refuses to
   wrap. */
.home-card-title[b-u24kmc4flv] { min-width: 0; }

.home-card-icon[b-u24kmc4flv] {
    font-size: 1.5rem;
    line-height: 1;
    /* The glyph is the card's identity; tint it with the accent so fourteen cards read
       as a set rather than as fourteen pieces of system emoji. */
    color: var(--color-accent);
}

.home-card-title[b-u24kmc4flv] {
    font-size: var(--text-base);
    font-weight: 700;
    font-family: var(--font-display);
    white-space: nowrap;
    /* A long title must not widen the card: the chips beside it keep their space and
       the name ellipsises instead. Without this a card's min-content width could
       exceed its grid column and get clipped at the page edge on a phone. */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-card-head[b-u24kmc4flv] {
    min-width: 0;
}

/* One line of what the game is. Clamped, because a card is a card. */
.home-card-desc[b-u24kmc4flv] {
    flex: 1 1 100%;
    order: 3;
    margin: 0;
    min-width: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.home-card-head:hover .home-card-title[b-u24kmc4flv] { text-decoration: underline; text-underline-offset: 3px; }

/* Every mode of this game needs a server and the browser is offline. Kept
   legible rather than nearly-invisible: the player should still be able to see
   what will be available once they reconnect. */
.home-card-head--offline[b-u24kmc4flv] {
    opacity: 0.45;
}

/* ── Mode chips ────────────────────────────────────────────────────────────── */
.home-card-modes[b-u24kmc4flv] {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    /* Wrap instead of clipping: a longer label ("Demo · Tournament") or a card a few
       pixels narrower than the grid assumed must never cut a chip in half. */
    flex-wrap: wrap;
}

/* The "+N" that folds Brawl's extra modes into a popover. Dashed, so it reads as a
   disclosure rather than a mode of its own. */
.home-mode-chip--more[b-u24kmc4flv] {
    border-style: dashed;
    background: transparent;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}

/* The folded modes, in the top layer so the card's paint containment cannot clip
   them. Anchored to the "+N" button by the browser's own positioning. */
.home-more-panel[b-u24kmc4flv] {
    margin: 0;
    inset: auto;
    /* Hidden until the popover opens. The UA stylesheet hides `[popover]:not(:popover-open)`,
       but an author `display` declaration outranks it, so the panel painted itself onto the
       card even while shut. */
    display: none;
    flex-wrap: wrap;
    gap: 0.3rem;
    max-width: 18rem;
    padding: 0.5rem;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-1);
    position: fixed;
    top: 4.5rem;
    right: var(--space-4);
}

.home-more-panel:popover-open[b-u24kmc4flv] {
    display: flex;
}

@supports (anchor-name: --a) {
    .home-more-panel[b-u24kmc4flv] {
        position: absolute;
        /* The button supplies its own --home-more-<key> name inline (one per card). */
        position-area: block-end span-inline-end;
        margin-block-start: 0.35rem;
        top: auto;
        right: auto;
        position-try-fallbacks: flip-block;
    }
}

.home-mode-chip[b-u24kmc4flv] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    min-width: 2.5rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: border-color 0.18s var(--ease-standard),
                background 0.18s var(--ease-standard),
                color 0.18s var(--ease-standard);
}

.home-mode-chip:hover[b-u24kmc4flv] {
    border-color: var(--color-accent);
    color: var(--color-text-primary);
}

/* Per-mode accent hues. Scheme-invariant by design, matching the accent policy
   in app.css — these read as identity, not as surface. */
.home-mode-chip--oneplayer:hover[b-u24kmc4flv]   { background: rgba(99, 102, 241, 0.18); }
.home-mode-chip--twoplayer:hover[b-u24kmc4flv]   { background: rgba(34, 197, 94, 0.18); }
.home-mode-chip--multiplayer:hover[b-u24kmc4flv] { background: rgba(236, 72, 153, 0.18); }
.home-mode-chip--demo:hover[b-u24kmc4flv]        { background: rgba(245, 158, 11, 0.18); }
.home-mode-chip--tournament:hover[b-u24kmc4flv]  { background: rgba(234, 179, 8, 0.2); }

/* Hub-backed or API-backed mode while the browser is offline. Rendered as a
   <span> rather than an <a>, so this only has to communicate the state. */
.home-mode-chip--offline[b-u24kmc4flv] {
    opacity: 0.4;
    cursor: not-allowed;
    border-style: dashed;
}

.home-mode-chip--offline:hover[b-u24kmc4flv] {
    border-color: var(--color-border);
    background: var(--surface-2);
    color: var(--color-text-secondary);
}

/* ── Scroll-driven card reveal ───────────────────────────────────────────────
   `animation-timeline: view()` runs on the compositor. The range ends at
   `entry 100%`, the instant the card is fully inside the scrollport, so anything
   visible is opaque. Wrapped in @supports because browsers without scroll-driven
   animations would run it as a time-based animation on load. The reduced-motion
   opt-out is the global `[data-motion="reduce"]` guard in app.css. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .home-card[b-u24kmc4flv] {
            animation: home-card-reveal-b-u24kmc4flv linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 100%;
        }

        @keyframes home-card-reveal-b-u24kmc4flv {
            from { opacity: 0; transform: translateY(1rem); }
            to   { opacity: 1; transform: translateY(0); }
        }
    }
}

/* ── Recent activity ─────────────────────────────────────────────────────── */
.home-activity[b-u24kmc4flv] {
    margin-top: var(--space-6);
    width: 100%;
    max-width: var(--content-max, 960px);
}

.home-activity__title[b-u24kmc4flv] {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
    font-family: var(--font-display);
}

.home-activity__list[b-u24kmc4flv] {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.5rem;
}

/* Each recent match is a small card rather than a line of text: the outcome glyph is
   the thing the eye lands on, and the result reads before the words. */
.home-activity__card[b-u24kmc4flv] {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-1);
    font-size: 0.85rem;
}

.home-activity__icon[b-u24kmc4flv] {
    font-size: 1.1rem;
    line-height: 1;
}

.home-activity__body[b-u24kmc4flv] {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-activity__game[b-u24kmc4flv] {
    color: var(--color-text-primary);
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-activity__game:hover[b-u24kmc4flv] {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.home-activity__msg[b-u24kmc4flv] {
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-activity__time[b-u24kmc4flv] {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ── Two columns ─────────────────────────────────────────────────────────────
   Below 1280px three one-line cards no longer fit. */
@media (max-width: 1279px) {
    .home-grid[b-u24kmc4flv] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(4rem, auto);
    }
    .home-card-icon[b-u24kmc4flv] { font-size: 1.4rem; }
    .home-card-modes[b-u24kmc4flv] { gap: 0.25rem; }
}

/* ── Phones ──────────────────────────────────────────────────────────────────
   One game per row: icon and title on the left (the heading link fills that whole
   part of the row), the chips on the right, each as tall as the row. */
@media (max-width: 640px) {
    .home-container[b-u24kmc4flv] {
        justify-content: flex-start;
        padding: 0.6rem 0.6rem max(env(safe-area-inset-bottom, 0px), 0.6rem);
    }

    .home-tools[b-u24kmc4flv] {
        justify-content: stretch;
    }

    .home-grid[b-u24kmc4flv] {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: auto;
        gap: 0.25rem;
    }
    .home-card[b-u24kmc4flv] {
        flex-wrap: wrap;
        gap: 0.15rem 0.4rem;
        padding: 0.2rem 0.5rem;
    }
    .home-card:hover[b-u24kmc4flv] { transform: none; }
    /* The heading stretches over the card's left padding and its full height, so the
       whole left of the row opens the game. The app.css coarse-pointer floor would
       give it a 44px min-height of its own; the row's chips already set the height. */
    .home-card-head[b-u24kmc4flv] {
        flex: 1 1 auto;
        align-self: stretch;
        gap: 0.4rem;
        min-height: 0;
        margin: -0.2rem 0 -0.2rem -0.5rem;
        padding-left: 0.5rem;
    }
    .home-card-icon[b-u24kmc4flv] { font-size: 1.2rem; }
    .home-card-title[b-u24kmc4flv] { font-size: 0.92rem; }
    /* Chips share the row with the title and wrap inside their own box when the two
       do not fit; `min-width: 0` lets the row shrink instead of pushing the card past
       the viewport. */
    .home-card-modes[b-u24kmc4flv] {
        flex: 0 1 auto;
        min-width: 0;
        align-self: stretch;
        align-items: stretch;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .home-mode-chip[b-u24kmc4flv] { min-height: 2.25rem; min-width: 2.25rem; padding: 0 0.5rem; font-size: 0.78rem; }

    /* Keep the feed to two rows on phones so the page still ends inside the
       first viewport; the full list remains on desktop. */
    .home-activity[b-u24kmc4flv] { margin-top: 0.75rem; }
    .home-activity__card:nth-child(n+3)[b-u24kmc4flv] { display: none; }
}

/* Narrow phones: the reel button is its icon (its name stays in aria-label). */
@media (max-width: 400px) {
    .home-action--demo[b-u24kmc4flv] { min-width: 2.75rem; padding: 0; }
    .home-action-label[b-u24kmc4flv] { display: none; }
}

/* ── Short screens ───────────────────────────────────────────────────────────
   Keyed on HEIGHT, because that is the axis that fails: an iPhone SE has an
   iPhone 14's width and 177px less height. Here a card is two lines, the title
   over its chips: two cards across on a short phone, three on a phone held
   sideways. The chips cannot be large in half a 360px screen, so the heading is
   the large target: it spans the card's full width and the top of its padding. */
@media (max-width: 640px) and (max-height: 780px), (min-width: 700px) and (max-height: 500px) {
    .home-container[b-u24kmc4flv] { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .home-grid[b-u24kmc4flv] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        gap: 0.3rem;
    }
    .home-card[b-u24kmc4flv] {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0.2rem;
        padding: 0.3rem 0.4rem;
    }
    .home-card:hover[b-u24kmc4flv] { transform: none; }
    .home-card-head[b-u24kmc4flv] {
        flex: 0 0 auto;
        align-self: auto;
        gap: 0.4rem;
        min-height: 2rem;
        margin: -0.3rem -0.4rem 0;
        padding: 0 0.4rem;
    }
    .home-card-icon[b-u24kmc4flv] { font-size: 1.1rem; }
    .home-card-title[b-u24kmc4flv] { font-size: 0.82rem; }
    .home-card-modes[b-u24kmc4flv] { align-self: auto; align-items: center; flex-wrap: wrap; gap: 0.15rem; }
    .home-mode-chip[b-u24kmc4flv] { min-height: 30px; min-width: 1.5rem; padding: 0 0.2rem; font-size: var(--text-xs); }
    /* The card is two rows tall here on purpose; a third line of prose is what would
       push the hub off a short screen. */
    .home-card-desc[b-u24kmc4flv] { display: none; }
}

@media (min-width: 700px) and (max-height: 500px) {
    .home-grid[b-u24kmc4flv] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-card[b-u24kmc4flv] { padding: 0.2rem 0.4rem; }
    .home-card-head[b-u24kmc4flv] { margin-top: -0.2rem; }
    .home-card-modes[b-u24kmc4flv] { gap: 0.25rem; }
    .home-mode-chip[b-u24kmc4flv] { min-height: 30px; min-width: 2rem; padding: 0 0.4rem; }
}

@media (pointer: coarse) {
    .home-mode-chip[b-u24kmc4flv] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* A thumb needs 44px (Profile B): the heading link was 32px tall on a phone. */
@media (pointer: coarse) {
    .home-card-head[b-u24kmc4flv] { min-height: 44px; }
}
/* /Features/Leaderboards/LeaderboardsPage.razor.rz.scp.css */
/* Unified leaderboard hub — mobile-first, high data-to-pixel: ranks read as a tight
   table, not a stack of padded cards. Tokens inherited from css/app.css :root. */

.lb-page[b-3mrbni3sjd] {
    max-width: var(--content-max, 960px);
    margin: 0 auto;
    /* Small bottom padding: the grid already overflows on a 720p laptop, so
       trailing space under it only adds scroll. */
    padding: var(--space-3) var(--space-4) var(--space-4);
    width: 100%;
}

/* ── Head ────────────────────────────────────────────────────────────────────
   Title, count and the player's best-placing chip all live in the shared
   <PageHeader>; only the chip and the count are this page's. The chip is on the
   meta line so it never pushes the board down when it arrives. */
@media (max-width: 560px) {
    .lb-count[b-3mrbni3sjd] { display: none; }
}

/* ── Toolbar ─────────────────────────────────────────────────────────────────
   Board picker, period and player search, on the header's action line (Radzen). Radzen's
   one theme is dark; its variables are re-pointed at the app tokens here so it follows
   the light scheme too. The header reserves the controls' height, so nothing moves when
   the theme lands. */
.lb-toolbar[b-3mrbni3sjd] {
    --rz-text-color: var(--color-text-primary);
    --rz-text-secondary-color: var(--color-text-secondary);
    --rz-base-background-color: var(--color-surface);
    --rz-primary: var(--color-accent);
    --rz-on-primary: #fff;
    --rz-input-background-color: var(--color-surface);
    --rz-input-value-color: var(--color-text-primary);
    --rz-input-placeholder-color: var(--color-text-secondary);
    --rz-input-border: 1px solid var(--color-border);
    --rz-input-hover-border: 1px solid var(--color-border-strong, var(--color-border));
    --rz-input-focus-border: 1px solid var(--color-accent);
    --rz-input-border-radius: var(--radius-md);
    --rz-input-height: 40px;
    --rz-panel-background-color: var(--color-surface);
    --rz-dropdown-item-hover-background-color: var(--tint-soft);
    --rz-dropdown-item-hover-color: var(--color-text-primary);
    --rz-dropdown-item-selected-background-color: var(--accent-soft);
    --rz-dropdown-item-selected-color: var(--color-text-primary);
    --rz-selectbar-background-color: var(--surface-2, var(--tint-subtle));
    --rz-selectbar-color: var(--color-text-secondary);
    --rz-selectbar-border: 1px solid var(--color-border);
    --rz-selectbar-selected-background-color: var(--color-accent);
    --rz-selectbar-selected-color: #fff;
    --rz-selectbar-selected-border: 1px solid var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-height: 40px;
}

/* The picker is the page's navigation, so it gets the width; the search grows only
   once it is open. */
.lb-toolbar[b-3mrbni3sjd]  .lb-tb-game {
    width: clamp(11rem, 26vw, 17rem);
    min-width: 0;
    height: 40px;
}

.lb-toolbar[b-3mrbni3sjd]  .lb-tb-search {
    width: 100%;
    min-width: 0;
    height: 40px;
}

.lb-toolbar[b-3mrbni3sjd]  .lb-tb-period { flex-wrap: nowrap; }

.lb-toolbar[b-3mrbni3sjd]  .lb-tb-period .rz-button {
    min-height: 40px;
    white-space: nowrap;
}

/* ── Player search ───────────────────────────────────────────────────────────
   An icon that becomes a field. The search box was permanently 12rem of the widest
   control on the page for the least-used control on it. */
.lb-search[b-3mrbni3sjd] {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.lb-search__toggle[b-3mrbni3sjd] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.lb-search__toggle:hover[b-3mrbni3sjd],
.lb-search--open .lb-search__toggle[b-3mrbni3sjd] {
    color: var(--color-text-primary);
    border-color: var(--color-accent);
}

.lb-search[b-3mrbni3sjd]  .lb-tb-search { width: 11rem; }

.lb-tb-opt[b-3mrbni3sjd] {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    min-width: 0;
}

.lb-tb-opt-group[b-3mrbni3sjd] {
    flex: 0 0 auto;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
}

.lb-tb-opt-name[b-3mrbni3sjd] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A phone: the picker takes the first line, period and search share the second. */
@media (max-width: 560px) {
    .lb-toolbar[b-3mrbni3sjd] {
        width: 100%;
        justify-content: space-between;
    }
    .lb-toolbar[b-3mrbni3sjd]  .lb-tb-game { flex: 1 1 100%; width: 100%; }
    .lb-search[b-3mrbni3sjd]  .lb-tb-search { width: 100%; }
    .lb-search--open[b-3mrbni3sjd] { flex: 1 1 auto; }
}

/* The player's best placing: a compact chip that opens that board. Token colours
   only, so it reads in the light theme as well as the dark one. */
.lb-me-chip[b-3mrbni3sjd] {
    appearance: none;
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.15rem 0.4rem;
    min-height: 40px;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--color-accent, #6366f1);
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--color-text-primary);
    font: inherit;
    font-size: var(--text-sm);
    text-align: left;
    cursor: pointer;
}

.lb-me-chip:hover[b-3mrbni3sjd] { background: var(--tint-soft); }

.lb-me-chip-k[b-3mrbni3sjd] {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
}

.lb-me-chip-v[b-3mrbni3sjd] { font-weight: 700; }

.lb-sr-only[b-3mrbni3sjd] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keyboard focus, for every control on the page that is not a shared .app-* one. */
.lb-me-chip:focus-visible[b-3mrbni3sjd] {
    outline: 2px solid var(--accent-ring, var(--color-accent, #6366f1));
    outline-offset: 2px;
}

/* ── Board ───────────────────────────────────────────────────────────────────
   One board at a time, picked in the toolbar. */
.lb-layout[b-3mrbni3sjd] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
}

/* The player's rank on a board, beside its name in the picker. */
.lb-pick-rank[b-3mrbni3sjd] {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: var(--text-xs);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent-ink);
}

@media (max-height: 780px) {
    .lb-page[b-3mrbni3sjd] { padding-top: var(--space-2); padding-bottom: var(--space-2); }
}

.lb-board-title[b-3mrbni3sjd] {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

/* The board's name and what it measures, on one line above the cards. */
.lb-board-head[b-3mrbni3sjd] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
    margin-bottom: var(--space-3);
}

.lb-board-unit[b-3mrbni3sjd] {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.lb-count[b-3mrbni3sjd] {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

/* The selected board. */
.lb-board[b-3mrbni3sjd] {
    display: flex;
    flex-direction: column;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--tint-subtle);
}

/* ── Podium: places 1–3 ──────────────────────────────────────────────────────
   The board's headline, so the top three are cards rather than rows: a medal, the
   name, and the score in a size that reads from across the room. */
.lb-podium[b-3mrbni3sjd] {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
}

.lb-podium__item[b-3mrbni3sjd] {
    min-width: 0;
}

.lb-podium__card[b-3mrbni3sjd] {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    height: 100%;
    padding: 0.75rem 0.85rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--surface-1);
    overflow: hidden;
}

/* The medal colour is a top edge, not a fill: the score has to stay legible in both
   themes, and a saturated card behind body text does not survive that. */
.lb-podium__card[b-3mrbni3sjd]::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
}

.lb-podium__card--gold[b-3mrbni3sjd]::before   { background: linear-gradient(90deg, #fcd34d, var(--color-warning)); }
.lb-podium__card--silver[b-3mrbni3sjd]::before { background: linear-gradient(90deg, #e2e8f0, #94a3b8); }
.lb-podium__card--bronze[b-3mrbni3sjd]::before { background: linear-gradient(90deg, #fdba74, #ea580c); }

.lb-podium__medal[b-3mrbni3sjd] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    font-size: var(--text-xs);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.lb-podium__card--gold .lb-podium__medal[b-3mrbni3sjd]   { background: linear-gradient(135deg, #fcd34d, var(--color-warning)); color: #1e1b4b; }
.lb-podium__card--silver .lb-podium__medal[b-3mrbni3sjd] { background: linear-gradient(135deg, #e2e8f0, #94a3b8); color: #0f172a; }
.lb-podium__card--bronze .lb-podium__medal[b-3mrbni3sjd] { background: linear-gradient(135deg, #fdba74, #ea580c); color: #1e1b4b; }

.lb-podium__name[b-3mrbni3sjd] {
    min-width: 0;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-podium__value[b-3mrbni3sjd] {
    font-size: clamp(1.1rem, 2.6vw, 1.5rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-primary);
    overflow-wrap: anywhere;
}

/* ── Places 4 and down ───────────────────────────────────────────────────────
   One card per player. It replaces the rank/name/score table: at ten rows the table
   was 60% of a page of empty cells, and it could not carry a face or a bar. */
.lb-list[b-3mrbni3sjd] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lb-card[b-3mrbni3sjd] {
    display: grid;
    grid-template-columns: 1.9rem 1.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 0.65rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: var(--surface-1);
    font-size: var(--text-sm);
    transition: border-color 0.15s var(--ease-standard),
                background 0.15s var(--ease-standard);
}

.lb-card:hover[b-3mrbni3sjd] {
    border-color: var(--color-border);
    background: var(--color-surface-hover, var(--surface-2));
}

.lb-card__rank[b-3mrbni3sjd] {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-align: center;
}

.lb-card__avatar[b-3mrbni3sjd] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: var(--text-xs);
    font-weight: 800;
}

.lb-card__name[b-3mrbni3sjd] {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    color: var(--color-text-primary);
}

.lb-card__name-text[b-3mrbni3sjd] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-card__bar[b-3mrbni3sjd] {
    height: 3px;
    border-radius: 999px;
    background: var(--tint-soft);
    overflow: hidden;
}

.lb-card__bar-fill[b-3mrbni3sjd] {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-accent), var(--accent-cyan, var(--color-accent)));
}

/* The pinned row is a one-item list under a caption, not a board segment. */
.lb-list--pinned[b-3mrbni3sjd] {
    margin: 0;
}

.lb-card__value[b-3mrbni3sjd] {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--color-text-primary);
    overflow-wrap: anywhere;
    text-align: right;
}

@media (max-width: 400px) {
    .lb-card[b-3mrbni3sjd] {
        grid-template-columns: 1.4rem minmax(0, 1fr) auto;
        gap: var(--space-1);
        padding: 0.45rem 0.4rem;
    }
    /* Below 400px the avatar costs more than it gives; the name is already the
       identifying column. */
    .lb-card__avatar[b-3mrbni3sjd] { display: none; }
}

.lb-board-empty[b-3mrbni3sjd] {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    padding: var(--space-3) 0;
}

/* Loading skeletons */
.lb-skeletons[b-3mrbni3sjd] { display: flex; flex-direction: column; gap: var(--space-2); }
.lb-skel[b-3mrbni3sjd] {
    height: 2.6rem;
    border-radius: var(--radius-sm, 0.375rem);
    background: linear-gradient(90deg, var(--tint-soft), var(--tint-medium), var(--tint-soft));
    background-size: 200% 100%;
    animation: lb-shimmer-b-3mrbni3sjd 1.2s ease-in-out infinite;
}

@keyframes lb-shimmer-b-3mrbni3sjd {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── The player's own row ──────────────────────────────────────────────────
   The one thing a player opens a leaderboard to check is their own line, so it
   must stand out from the rest — and it is pinned under the board when the player
   ranks below the ten shown, with the gap spelled out instead of a lone "⋯".

   Colour comes through --accent / --accent-soft rather than raw hex so the
   highlight re-points with the light-scheme block in app.css; a literal would be
   unthemed in light mode. The inline-start border does the work at a glance and
   the weight bump carries it for anyone who cannot separate the tints. */
.lb-card--me[b-3mrbni3sjd],
.lb-me-row .lb-card[b-3mrbni3sjd] {
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 0 var(--accent);
    font-weight: 650;
}

/* The grid's own row: Radzen renders the <tr>, so the rule reaches it with ::deep. */
.lb-grid[b-3mrbni3sjd]  .lb-row-me > td {
    background: var(--accent-soft);
    font-weight: 650;
}
.lb-grid[b-3mrbni3sjd]  .lb-row-me > td:first-child { box-shadow: inset 3px 0 0 0 var(--accent); }
.lb-grid[b-3mrbni3sjd]  td .lb-card__avatar { margin-right: var(--space-2); vertical-align: middle; }
.lb-grid[b-3mrbni3sjd]  td .lb-card__name { display: inline-flex; vertical-align: middle; max-width: calc(100% - 2.2rem); }

.lb-card--me .lb-card__name[b-3mrbni3sjd],
.lb-me-row .lb-card__name[b-3mrbni3sjd] {
    color: var(--color-text-primary);
    font-weight: 700;
}

/* The pinned "your place" block under the board: a label, then the same card so
   the row reads identically to the list above it. */
.lb-me-row[b-3mrbni3sjd] {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--color-border);
}

.lb-me-row__label[b-3mrbni3sjd] {
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

/* ── Short boards ────────────────────────────────────────────────────────────
   Fewer than five places is an invitation: the next score lands in the top five.
   This is the only call to action on the page a player can act on immediately. */
.lb-claim[b-3mrbni3sjd] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding: 0.7rem 0.85rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-1);
}

.lb-claim__text[b-3mrbni3sjd] {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

@media (pointer: coarse) {
    .lb-toolbar[b-3mrbni3sjd] {
        --rz-input-height: 44px;
        min-height: 44px;
    }
    .lb-toolbar[b-3mrbni3sjd]  .lb-tb-game,
    .lb-toolbar[b-3mrbni3sjd]  .lb-tb-search {
        min-height: 44px;
        height: 44px;
    }
    .lb-toolbar[b-3mrbni3sjd]  .lb-tb-period .rz-button {
        min-height: 44px;
        min-width: 44px;
    }
    .lb-search__toggle[b-3mrbni3sjd] {
        width: 44px;
        height: 44px;
    }
}
/* /Features/PoBrawl/PoBrawlCampaignMap.razor.rz.scp.css */
/* Campaign-trail cartogram (PoBrawlCampaignMap). Two surfaces: the interlude sits over the
   arena, which is dark in both schemes, so it carries its own scheme-invariant palette; the
   ending sits in the result modal and reads the app's theme tokens. Every colour below is a
   --pbm-* token set per variant. */
.pbm[b-0bfqs24486] {
    --pbm-ink: var(--color-text-primary);
    --pbm-ink-soft: var(--color-text-secondary);
    --pbm-panel: var(--surface-2);
    --pbm-edge: var(--color-border);
    --pbm-tile: light-dark(rgba(15, 23, 42, 0.07), rgba(148, 163, 184, 0.14));
    --pbm-tile-edge: light-dark(rgba(15, 23, 42, 0.12), rgba(255, 255, 255, 0.10));
    --pbm-tile-ink: light-dark(#475569, #b8c2dc);
    /* BOB's colour: the fight's player-one green, deep enough for white 12px labels (5:1). */
    --pbm-won-hi: #1f9d4f;
    --pbm-won-lo: #14703a;
    --pbm-won-ink: #fff;
    --pbm-dest: light-dark(#b7791f, #ffd166);
    --pbm-route: light-dark(#a16207, #ffd166);
    --pbm-meter: light-dark(rgba(15, 23, 42, 0.10), rgba(255, 255, 255, 0.12));
    --pbm-stamp: light-dark(#b91c1c, #ff6b6b);
    margin: 0;
    color: var(--pbm-ink);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Interlude: a glass card over the arena between rungs. ── */
.pbm--interlude[b-0bfqs24486] {
    --pbm-ink: #f4f6ff;
    --pbm-ink-soft: #c7cbe8;
    --pbm-panel: rgba(9, 12, 26, 0.84);
    --pbm-edge: rgba(255, 255, 255, 0.14);
    --pbm-tile: rgba(148, 163, 184, 0.16);
    --pbm-tile-edge: rgba(255, 255, 255, 0.10);
    --pbm-tile-ink: #c3cbe4;
    --pbm-dest: #ffd166;
    --pbm-route: #ffd166;
    --pbm-meter: rgba(255, 255, 255, 0.14);
    position: absolute;
    left: 50%;
    top: calc(var(--pb-gutter, 0px) + 104px);
    translate: -50% 0;
    /* Clears the HUD and ladder rail above and the caption bar below. */
    width: min(440px, calc(100% - 24px));
    padding: 12px 14px 10px;
    border-radius: 16px;
    border: 1px solid var(--pbm-edge);
    background: var(--pbm-panel);
    backdrop-filter: blur(10px) saturate(150%);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 7;
    animation: pbm-in-b-0bfqs24486 0.35s var(--ease-out, ease-out) both;
}

@keyframes pbm-in-b-0bfqs24486 {
    from { opacity: 0; translate: -50% -14px; scale: 0.97; }
    to { opacity: 1; translate: -50% 0; scale: 1; }
}

/* ── Ending: the full map inside the ladder's ending card. ── */
.pbm--ending[b-0bfqs24486] {
    margin: 4px auto 8px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--pbm-edge);
    background: var(--pbm-panel);
    text-align: left;
}

/* ── Status: a still picture of the run (1P intro, Brawl HQ). Theme surface, no motion. ── */
.pbm--status[b-0bfqs24486] {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--pbm-edge);
    background: var(--pbm-panel);
    text-align: left;
}

.pbm--status .pbm-tile--dest[b-0bfqs24486] {
    animation: none;
}

.pbm--status .pbm-title[b-0bfqs24486] {
    font-size: 1rem;
}

.pbm--status .pbm-count b[b-0bfqs24486] {
    font-size: 1.35rem;
}

/* A phone: the heading and the meter say where the run stands; the board would push the
   intro card's Start button off the screen. */
@media (max-width: 520px) {
    .pbm--status .pbm-board[b-0bfqs24486] {
        display: none;
    }
}

.pbm-head[b-0bfqs24486] {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "kicker count" "title count";
    align-items: end;
    column-gap: 12px;
}

.pbm-kicker[b-0bfqs24486] {
    grid-area: kicker;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pbm-ink-soft);
}

.pbm-title[b-0bfqs24486] {
    grid-area: title;
    font-family: var(--pb-display, var(--font-display));
    font-size: clamp(1rem, 0.9rem + 0.6vw, 1.3rem);
    line-height: 1.15;
    color: var(--pbm-ink);
}

.pbm-count[b-0bfqs24486] {
    grid-area: count;
    align-self: center;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    color: var(--pbm-ink-soft);
    white-space: nowrap;
}

.pbm-count b[b-0bfqs24486] {
    font-family: var(--pb-display, var(--font-display));
    font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
    color: var(--pbm-ink);
}

.pbm--elected .pbm-count b[b-0bfqs24486] {
    color: var(--pbm-won-hi);
}

.pbm-sub[b-0bfqs24486],
.pbm-next[b-0bfqs24486] {
    margin: 0;
    font-size: 0.8rem;
    color: var(--pbm-ink-soft);
}

.pbm-next b[b-0bfqs24486] {
    color: var(--pbm-dest);
}

/* The board: an 11 × 8 grid of square cells. The SVG route sits on the same box with a
   10-unit-per-tile viewBox, so a tile's centre is (col·10+5, row·10+5) in both. */
.pbm-board[b-0bfqs24486] {
    position: relative;
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    grid-template-rows: repeat(8, 1fr);
    aspect-ratio: 11 / 8;
}

.pbm-tile[b-0bfqs24486] {
    margin: max(1.5px, 0.45cqi);
    display: grid;
    place-items: center;
    border-radius: max(3px, 0.9cqi);
    border: 1px solid var(--pbm-tile-edge);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 55%),
        var(--pbm-tile);
    color: var(--pbm-tile-ink);
    font-size: clamp(12px, 3cqi, 15px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.pbm-tile--won[b-0bfqs24486],
.pbm-tile--flip[b-0bfqs24486] {
    border-color: rgba(255, 255, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0) 52%),
        linear-gradient(160deg, var(--pbm-won-hi), var(--pbm-won-lo));
    color: var(--pbm-won-ink);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    box-shadow: 0 1px 4px rgba(20, 112, 58, 0.35);
}

/* A tile turning BOB: it folds edge-on, comes back green, and rings once. */
.pbm-tile--flip[b-0bfqs24486] {
    animation: pbm-flip-b-0bfqs24486 0.5s var(--d, 0ms) cubic-bezier(0.3, 0.7, 0.4, 1) both;
}

@keyframes pbm-flip-b-0bfqs24486 {
    0% {
        transform: perspective(200px) rotateX(0deg);
        background: var(--pbm-tile);
        color: var(--pbm-tile-ink);
        box-shadow: none;
    }
    45% {
        transform: perspective(200px) rotateX(88deg);
        background: var(--pbm-tile);
        color: transparent;
    }
    55% {
        transform: perspective(200px) rotateX(-88deg);
        color: transparent;
    }
    80% {
        transform: perspective(200px) rotateX(0deg) scale(1.12);
        box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.75), 0 0 14px rgba(31, 157, 79, 0.9);
    }
    100% {
        transform: none;
    }
}

/* The next opponent's home state: the destination. */
.pbm-tile--dest[b-0bfqs24486] {
    outline: 2px solid var(--pbm-dest);
    outline-offset: 1px;
    animation: pbm-dest-b-0bfqs24486 1.1s ease-in-out infinite;
}

@keyframes pbm-dest-b-0bfqs24486 {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0); }
    50% { box-shadow: 0 0 0 5px rgba(255, 209, 102, 0.35); }
}

.pbm-route[b-0bfqs24486] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.pbm-route-line[b-0bfqs24486] {
    fill: none;
    stroke: var(--pbm-route);
    stroke-width: 0.9;
    stroke-linecap: round;
    stroke-dasharray: 0.1 2.4;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.9));
    animation: pbm-route-b-0bfqs24486 0.6s 0.6s ease-out both, pbm-march-b-0bfqs24486 0.9s linear 1.2s infinite;
}

@keyframes pbm-route-b-0bfqs24486 {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pbm-march-b-0bfqs24486 {
    to { stroke-dashoffset: -2.5; }
}

.pbm-bus[b-0bfqs24486] {
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.7));
}

.pbm-bus-body[b-0bfqs24486] { fill: #f4f6ff; stroke: #0b1330; stroke-width: 0.35; }
.pbm-bus-stripe[b-0bfqs24486] { fill: #e53935; }
.pbm-bus-glass[b-0bfqs24486] { fill: #2a4a8a; }
.pbm-bus-wheel[b-0bfqs24486] { fill: #0b1330; stroke: #c7cbe8; stroke-width: 0.35; }
.pbm-bus-flag[b-0bfqs24486] { fill: #ffd166; stroke: #0b1330; stroke-width: 0.3; stroke-linejoin: round; }

/* Electoral meter: the whole 538, with the 270 line marked. */
.pbm-meter[b-0bfqs24486] {
    position: relative;
    height: 8px;
    border-radius: var(--radius-pill, 999px);
    background: var(--pbm-meter);
    overflow: hidden;
}

.pbm-meter-fill[b-0bfqs24486] {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, var(--pbm-won-lo), var(--pbm-won-hi));
    border-radius: inherit;
    transition: width 0.18s ease-out;
}

.pbm-meter-mark[b-0bfqs24486] {
    position: absolute;
    left: calc(270 / 538 * 100%);
    top: -1px;
    bottom: -1px;
    width: 2px;
    background: var(--pbm-dest);
}

/* The ending's stamp: lands once the count passes 270. */
.pbm-stamp[b-0bfqs24486] {
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    rotate: -12deg;
    padding: 4px 12px;
    border: 3px double var(--pbm-stamp);
    border-radius: 8px;
    color: var(--pbm-stamp);
    background: light-dark(rgba(255, 255, 255, 0.82), rgba(15, 23, 42, 0.78));
    font-family: var(--pb-display, var(--font-display));
    font-size: clamp(1.1rem, 7cqi, 2rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    scale: 2.4;
    pointer-events: none;
}

.pbm--elected .pbm-stamp[b-0bfqs24486] {
    animation: pbm-stamp-b-0bfqs24486 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.25) forwards;
}

@keyframes pbm-stamp-b-0bfqs24486 {
    from { opacity: 0; scale: 2.4; }
    to { opacity: 1; scale: 1; }
}

/* Reduced motion: the finished picture, nothing travels or ticks. The component also skips
   the bus and the counter (pbm--still); these rules cover the CSS side for both the app's
   attribute and the OS query. */
:root[data-motion="reduce"] .pbm[b-0bfqs24486],
:root[data-motion="reduce"] .pbm-tile--flip[b-0bfqs24486],
:root[data-motion="reduce"] .pbm-tile--dest[b-0bfqs24486],
:root[data-motion="reduce"] .pbm-route-line[b-0bfqs24486],
.pbm--still[b-0bfqs24486],
.pbm--still .pbm-tile--flip[b-0bfqs24486],
.pbm--still .pbm-tile--dest[b-0bfqs24486],
.pbm--still .pbm-route-line[b-0bfqs24486] {
    animation: none;
}

:root[data-motion="reduce"] .pbm--elected .pbm-stamp[b-0bfqs24486],
.pbm--still.pbm--elected .pbm-stamp[b-0bfqs24486] {
    animation: none;
    opacity: 1;
    scale: 1;
}

@media (prefers-reduced-motion: reduce) {
    .pbm[b-0bfqs24486],
    .pbm-tile--flip[b-0bfqs24486],
    .pbm-tile--dest[b-0bfqs24486],
    .pbm-route-line[b-0bfqs24486] {
        animation: none;
    }

    .pbm--elected .pbm-stamp[b-0bfqs24486] {
        animation: none;
        opacity: 1;
        scale: 1;
    }
}

/* A phone: the HUD plates stack taller, so the card starts below the ladder rail, and the
   ending's map takes the card's full width. */
@media (max-width: 480px) {
    .pbm--interlude[b-0bfqs24486] {
        top: calc(var(--pb-gutter, 0px) + 110px);
        padding: 10px;
    }

    .pbm--ending[b-0bfqs24486] {
        padding: 6px;
        margin-inline: -6px;
    }
}
/* /Features/PoBrawl/PoBrawlControls.razor.rz.scp.css */
/* PoBrawlControls: a theme surface (the intro card, the lobby's how-to), so app tokens. */
/* One run of chips, "Move A D · Circle W S · …": two lines at most on the start card. */
.pbc-keys[b-8t2putw9vu] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin: 0 0 8px;
    text-align: left;
}

.pbc-keys > div[b-8t2putw9vu] {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px 2px 9px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill, 999px);
    background: var(--surface-2);
}

.pbc-keys dt[b-8t2putw9vu] {
    line-height: 1.2;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.pbc-keys dd[b-8t2putw9vu] {
    margin: 0;
    white-space: nowrap;
    color: var(--color-text-primary);
}

.pbc-keys small[b-8t2putw9vu],
.pbc-table small[b-8t2putw9vu] {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.pbc-keys kbd + kbd[b-8t2putw9vu],
.pbc-table kbd + kbd[b-8t2putw9vu] {
    margin-left: 3px;
}

/* Keyboard keys vs the touch pad's glyphs: a phone gets the pad. */
.pbc-touch[b-8t2putw9vu] {
    display: none;
    font-size: 1.05rem;
}

@media (hover: none) and (pointer: coarse) {
    .pbc-kb[b-8t2putw9vu] {
        display: none;
    }

    .pbc-touch[b-8t2putw9vu] {
        display: inline;
    }
}

.pbc-table[b-8t2putw9vu] {
    width: 100%;
    margin: 0 0 6px;
    border-collapse: collapse;
    font-size: var(--text-sm);
    text-align: left;
}

.pbc-table th[b-8t2putw9vu],
.pbc-table td[b-8t2putw9vu] {
    padding: 3px 6px;
    border-bottom: 1px solid var(--color-border);
}

.pbc-table thead th[b-8t2putw9vu] {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
}

.pbc-table tbody th[b-8t2putw9vu] {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.pbc-touch-note[b-8t2putw9vu] {
    display: none;
    margin: 0 0 6px;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

@media (hover: none) and (pointer: coarse) {
    .pbc-touch-note[b-8t2putw9vu] {
        display: block;
    }

    .pbc-table[b-8t2putw9vu] {
        display: none;
    }
}

.pbc-tips[b-8t2putw9vu] {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 4px;
    text-align: left;
    font-size: var(--text-sm);
    line-height: 1.4;
}

.pbc-visually-hidden[b-8t2putw9vu] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
/* /Features/PoBrawl/PoBrawlDossierCard.razor.rz.scp.css */
/* Fighter dossier card. A theme surface (intro card, tournament page), so app tokens only;
   --pb-display is inherited from PoBrawlPage's .pb-intro when it is there. */
.pbd-card[b-p1nw03dsj5] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
    text-align: left;
    color: var(--color-text-primary);
    background: var(--surface-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.pbd-head[b-p1nw03dsj5] {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pbd-portrait[b-p1nw03dsj5] {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    object-fit: cover;
    object-position: 50% 20%;
    background: var(--surface-2);
    border: 1px solid var(--color-border);
}

.pbd-portrait--blank[b-p1nw03dsj5] {
    display: grid;
    place-items: center;
    font-family: var(--pb-display, var(--font-display));
    font-size: 1.2rem;
    color: var(--accent-ink);
}

.pbd-id[b-p1nw03dsj5] {
    min-width: 0;
}

.pbd-name[b-p1nw03dsj5] {
    margin: 0;
    font-family: var(--pb-display, var(--font-display));
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--accent-ink);
    overflow-wrap: anywhere;
}

.pbd-office[b-p1nw03dsj5],
.pbd-party[b-p1nw03dsj5] {
    margin: 2px 0 0;
    font-size: var(--text-xs);
    line-height: 1.35;
    color: var(--color-text-secondary);
}

.pbd-party[b-p1nw03dsj5] {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Decorative only: the party name is always written next to it. */
.pbd-party-dot[b-p1nw03dsj5] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.pbd-party-dot--dem[b-p1nw03dsj5] { background: #3b82f6; }
.pbd-party-dot--rep[b-p1nw03dsj5] { background: var(--color-error); }

.pbd-style[b-p1nw03dsj5],
.pbd-summary[b-p1nw03dsj5] {
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.45;
}

.pbd-style b[b-p1nw03dsj5] {
    color: var(--color-text-primary);
}

.pbd-summary[b-p1nw03dsj5] {
    color: var(--color-text-secondary);
}

.pbd-source[b-p1nw03dsj5] {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.pbd-source a[b-p1nw03dsj5] {
    /* A 24px target without changing the line's look. */
    display: inline-block;
    padding-block: 4px;
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pbd-source a:focus-visible[b-p1nw03dsj5] {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Compact: the 2P select shows two side by side, so the summary is clamped. */
.pbd-card--compact[b-p1nw03dsj5] {
    gap: 4px;
    padding: 8px 10px;
}

.pbd-card--compact .pbd-portrait[b-p1nw03dsj5] {
    width: 44px;
    height: 44px;
}

.pbd-card--compact .pbd-name[b-p1nw03dsj5] {
    font-size: 0.9rem;
}

.pbd-card--compact .pbd-style[b-p1nw03dsj5],
.pbd-card--compact .pbd-summary[b-p1nw03dsj5] {
    font-size: var(--text-xs);
}

.pbd-card--compact .pbd-summary[b-p1nw03dsj5] {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* A phone: the compact card is who, office and style. The Wikipedia summary (and with it the
   attribution it needs) waits for a wider screen, so the 1P intro fits without scrolling. */
@media (max-width: 520px) {
    .pbd-card--compact .pbd-summary[b-p1nw03dsj5],
    .pbd-card--compact .pbd-source[b-p1nw03dsj5] {
        display: none;
    }
}
/* /Features/PoBrawl/PoBrawlFfaPage.razor.rz.scp.css */
/* The arena is the show: standings, tool bar and broadcast card stay hidden until the
   shared Stats panel is open (Tab, or its button). game-debug.js sets the root class.
   A failed start still shows its board. */
:root:not(.po-game-stats-open) .pffa-board:not(.pffa-board--error)[b-pobrawl-arena],
:root:not(.po-game-stats-open) .pffa-tools[b-pobrawl-arena],
:root:not(.po-game-stats-open) .pffa-broadcast[b-pobrawl-arena] {
    display: none;
}

.pffa-board[b-pobrawl-arena] {
    position: absolute;
    top: calc(var(--pb-gutter) + 10px);
    left: calc(var(--pb-gutter) + 10px);
    width: clamp(180px, 22vw, 260px);
    max-height: calc(100% - 2 * var(--pb-gutter) - 20px);
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    overflow: auto;
    border: 1px solid rgba(255, 209, 102, 0.38);
    border-radius: 12px;
    background: rgba(8, 12, 28, 0.82);
    color: #f4f6ff;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    z-index: 5;
}

.pffa-board-head[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.pffa-kicker[b-pobrawl-arena] {
    color: #ffd166;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.pffa-board-head strong[b-pobrawl-arena] {
    font-size: 0.95rem;
}

.pffa-winner[b-pobrawl-arena] {
    margin: 0;
    color: #ffd166;
    font-weight: 800;
}

.pffa-error[b-pobrawl-arena] {
    margin: 0;
    color: #ffc2b8;
    font-size: 0.8rem;
}

.pffa-roster[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pffa-fighter[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    min-height: 21px;
    font-size: 0.76rem;
    border-radius: 5px;
    transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.pffa-fighter--featured[b-pobrawl-arena] { background: rgba(255, 209, 102, 0.13); }
.pffa-fighter--out .pffa-place[b-pobrawl-arena] { animation: pffa-place-in-b-pobrawl-arena 240ms ease-out; }
.pffa-fighter--winner[b-pobrawl-arena] { animation: pffa-place-in-b-pobrawl-arena 300ms ease-out; }

.pffa-fighter--out[b-pobrawl-arena] {
    color: #8f96b8;
}

.pffa-fighter--winner[b-pobrawl-arena] {
    color: #ffd166;
    font-weight: 800;
}

.pffa-fighter-name[b-pobrawl-arena] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pffa-health[b-pobrawl-arena] {
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.16);
}

.pffa-health span[b-pobrawl-arena] {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f87171, #ffd166 55%, #34d17c);
    transition: width 0.18s ease-out;
}

.pffa-place[b-pobrawl-arena] {
    color: #c7cbe8;
    font-size: 0.68rem;
    text-align: right;
}

.pffa-foot[b-pobrawl-arena] {
    margin: 0;
    padding-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #c7cbe8;
    font-size: 0.66rem;
}

.pffa-tools[b-pobrawl-arena] {
    position: absolute;
    top: calc(var(--pb-gutter) + 10px);
    right: calc(var(--pb-gutter) + 10px);
    z-index: 8;
    display: flex;
    gap: 6px;
}

.pffa-tools button[b-pobrawl-arena], .pffa-tools a[b-pobrawl-arena], .pffa-studio button[b-pobrawl-arena], .pffa-studio select[b-pobrawl-arena], .pffa-studio a[b-pobrawl-arena] {
    padding: 8px 12px;
    border: 1px solid #64748b;
    border-radius: 8px;
    background: #182337;
    color: #f4f6ff;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform 120ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.pffa-tools button:hover[b-pobrawl-arena], .pffa-studio button:hover[b-pobrawl-arena], .pffa-studio a:hover[b-pobrawl-arena] {
    background: #263955;
    box-shadow: 0 0 16px rgba(147, 197, 253, 0.18);
}

.pffa-tools button:active[b-pobrawl-arena], .pffa-studio button:active[b-pobrawl-arena], .pffa-studio a:active[b-pobrawl-arena] {
    transform: scale(0.97);
}

.pffa-studio a[b-pobrawl-arena] { display: inline-block; text-decoration: none; }

.pffa-player-mode .pffa-board[b-pobrawl-arena] {
    width: clamp(150px, 17vw, 210px);
}

.pffa-player-mode .pffa-broadcast[b-pobrawl-arena] {
    bottom: calc(var(--pb-gutter) + 115px);
}

@media (max-width: 640px) {
    .pffa-player-mode .pffa-board[b-pobrawl-arena] {
        top: 100px;
        bottom: auto;
        width: 140px;
        max-height: 34%;
        opacity: 0.9;
    }

    .pffa-player-mode .pffa-tools[b-pobrawl-arena] {
        left: 8px;
        right: 8px;
        flex-wrap: wrap;
    }

    .pffa-player-mode .pffa-tools button[b-pobrawl-arena], .pffa-player-mode .pffa-tools a[b-pobrawl-arena] {
        padding: 7px;
        font-size: 0.75rem;
    }

    .pffa-player-mode .pffa-broadcast[b-pobrawl-arena] {
        top: auto;
        bottom: 115px;
        width: min(280px, 65vw);
    }
}

.pffa-studio button:disabled[b-pobrawl-arena] {
    opacity: 0.6;
    cursor: wait;
}

.pffa-broadcast[b-pobrawl-arena] {
    position: absolute;
    right: calc(var(--pb-gutter) + 12px);
    bottom: calc(var(--pb-gutter) + 12px);
    display: grid;
    gap: 3px;
    width: min(360px, 38vw);
    padding: 12px;
    border-left: 4px solid #ffd166;
    border-radius: 8px;
    background: rgba(8, 12, 28, 0.86);
    color: #f4f6ff;
    z-index: 5;
    pointer-events: none;
    backdrop-filter: blur(10px) saturate(1.2);
}

.pffa-broadcast strong[b-pobrawl-arena] {
    color: #ffd166;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.pffa-broadcast span[b-pobrawl-arena] { font-size: 0.82rem; }
.pffa-broadcast small[b-pobrawl-arena] { color: #c7cbe8; font-size: 0.7rem; }
.pffa-broadcast a[b-pobrawl-arena] { color: #93c5fd; pointer-events: auto; }
.pffa-fact[b-pobrawl-arena] { margin: 5px 0 0; font-size: 0.76rem; }

/* The studio lives inside the shared Tab diagnostics panel, so it has no overlay chrome. */
.pffa-studio[b-pobrawl-arena] {
    color: #f4f6ff;
    font-size: 0.84rem;
}

.pffa-setup[b-pobrawl-arena] { display: grid; gap: 8px; }
.pffa-setup label[b-pobrawl-arena] { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pffa-setup select[b-pobrawl-arena] { max-width: 100%; min-height: 44px; }

.pffa-production[b-pobrawl-arena] { margin: 12px 0; padding: 10px; border: 1px solid #35445a; border-radius: 8px; }
.pffa-production summary[b-pobrawl-arena] { cursor: pointer; color: #93c5fd; }

@keyframes pffa-place-in-b-pobrawl-arena {
    from { opacity: 0.4; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.pffa-studio h2[b-pobrawl-arena] { margin: 0; font-size: 1.2rem; }
.pffa-studio h3[b-pobrawl-arena] { margin: 20px 0 8px; color: #ffd166; }
.pffa-studio label[b-pobrawl-arena] { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pffa-studio select[b-pobrawl-arena] { max-width: 100%; }
.pffa-studio small[b-pobrawl-arena] { display: block; margin-top: 7px; color: #c7cbe8; }
.pffa-studio progress[b-pobrawl-arena] { display: block; width: 100%; margin: 10px 0; }
.pffa-table-scroll[b-pobrawl-arena] { overflow-x: auto; }
.pffa-studio table[b-pobrawl-arena] { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.pffa-studio caption[b-pobrawl-arena] { padding: 8px 0; text-align: left; color: #c7cbe8; }
.pffa-studio th[b-pobrawl-arena], .pffa-studio td[b-pobrawl-arena] { padding: 7px; border-bottom: 1px solid #35445a; text-align: left; white-space: nowrap; }
.pffa-studio meter[b-pobrawl-arena] { width: 60px; height: 10px; }
.pffa-tools button:focus-visible[b-pobrawl-arena], .pffa-studio button:focus-visible[b-pobrawl-arena], .pffa-studio select:focus-visible[b-pobrawl-arena], .pffa-studio a:focus-visible[b-pobrawl-arena] {
    outline: 2px solid #ffd166;
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .pffa-board[b-pobrawl-arena] {
        top: auto;
        right: calc(var(--pb-gutter) + 8px);
        bottom: calc(var(--pb-gutter) + 8px);
        width: min(250px, 64vw);
        max-height: min(55%, 340px);
        padding: 9px;
    }

    .pffa-broadcast[b-pobrawl-arena] {
        top: calc(var(--pb-gutter) + 55px);
        bottom: auto;
        width: min(280px, calc(100% - 40px));
        max-height: 150px;
        overflow: auto;
        padding: 8px;
    }

    .pffa-studio[b-pobrawl-arena] { padding: 12px; }
    .pffa-tools button[b-pobrawl-arena] { font-size: 0.75rem; padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .pffa-health span[b-pobrawl-arena] { transition: none; }
    .pffa-fighter--winner[b-pobrawl-arena], .pffa-fighter--out .pffa-place[b-pobrawl-arena] { animation: none; }
    .pffa-fighter[b-pobrawl-arena], .pffa-tools button[b-pobrawl-arena], .pffa-studio button[b-pobrawl-arena], .pffa-studio select[b-pobrawl-arena], .pffa-studio a[b-pobrawl-arena] { transition: none; }
    .pffa-tools button:active[b-pobrawl-arena], .pffa-studio button:active[b-pobrawl-arena], .pffa-studio a:active[b-pobrawl-arena] { transform: none; }
}

/* Touch: the tool bar and studio controls reach the 44px target on a coarse pointer
   (GAME-CONSISTENCY rule 8), including the compact player-mode bar above. */
@media (pointer: coarse) {
    .pffa-tools button[b-pobrawl-arena],
    .pffa-tools a[b-pobrawl-arena],
    .pffa-studio button[b-pobrawl-arena],
    .pffa-studio select[b-pobrawl-arena],
    .pffa-studio a[b-pobrawl-arena] {
        min-height: 44px;
    }

    .pffa-tools a[b-pobrawl-arena],
    .pffa-studio a[b-pobrawl-arena] {
        display: inline-flex;
        align-items: center;
    }
}
/* /Features/PoBrawl/PoBrawlFighterGrid.razor.rz.scp.css */
/* PoBrawlFighterGrid shares PoBrawlPage's CSS scope (CssScope in PoMiniGamesClient.csproj):
   the tiles are styled by the .pb-select-* rules in PoBrawlPage.razor.css. This file exists
   so the component carries that scope attribute at all. */
.pb-select-grid > li[b-pobrawl-arena] {
    min-width: 0;
}
/* /Features/PoBrawl/PoBrawlHqPage.razor.rz.scp.css */
/* Brawl HQ — a theme surface, so app tokens. Radzen ships one dark theme here (the one PoMule
   loads); its --rz-* variables are re-pointed at the app's tokens on .hq, so the select bar,
   grid and chart follow the light and dark schemes like the rest of the page. */
.hq[b-6mnooljlyu] {
    --rz-text-color: var(--color-text-primary);
    --rz-text-secondary-color: var(--color-text-secondary);
    --rz-text-title-color: var(--color-text-primary);
    --rz-base-background-color: var(--color-surface);
    --rz-primary: var(--color-accent);
    --rz-on-primary: #fff;
    --rz-grid-background-color: transparent;
    --rz-grid-header-background-color: var(--surface-2);
    --rz-grid-header-color: var(--color-text-secondary);
    --rz-grid-cell-color: var(--color-text-primary);
    --rz-grid-cell-border: 1px solid var(--color-border);
    --rz-grid-header-cell-border: 1px solid var(--color-border);
    --rz-grid-header-cell-border-bottom: 1px solid var(--color-border);
    --rz-grid-border: 1px solid var(--color-border);
    --rz-grid-bottom-cell-border: 1px solid var(--color-border);
    --rz-grid-data-border-shadow: none;
    --rz-grid-stripe-background-color: transparent;
    --rz-grid-stripe-odd-background-color: transparent;
    --rz-grid-hover-background-color: var(--color-surface-hover);
    --rz-grid-hover-color: var(--color-text-primary);
    --rz-selectbar-background-color: var(--surface-2);
    --rz-selectbar-color: var(--color-text-secondary);
    --rz-selectbar-border: 1px solid var(--color-border);
    --rz-selectbar-selected-background-color: var(--color-accent);
    --rz-selectbar-selected-color: #fff;
    --rz-selectbar-selected-border: 1px solid var(--color-accent);
    --rz-chart-axis-color: var(--color-border);
    --rz-chart-axis-label-color: var(--color-text-secondary);
    --rz-chart-tooltip-background: var(--color-surface);
    --rz-chart-tooltip-color: var(--color-text-primary);
    width: min(100%, 72rem);
    margin: 0 auto;
    align-self: flex-start;
    padding: 0 0 0.25rem;
    display: grid;
    gap: 10px;
    color: var(--color-text-primary);
}

/* ── Play strip: the ladder first, the other modes one tap away ── */
.hq-play[b-6mnooljlyu] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hq-continue[b-6mnooljlyu] {
    min-height: 44px;
}

.hq-modes[b-6mnooljlyu] {
    min-height: 40px;
}

/* ── Tabs: Ladder, Map, Boards, Titles — one surface at a time, so the page fits the
   viewport. The tab strip and panel take the app's tokens, not Radzen's dark theme. ── */
.hq[b-6mnooljlyu] {
    --rz-tabs-background-color: transparent;
    --rz-tabs-tab-color: var(--color-text-secondary);
    --rz-tabs-tab-selected-color: var(--color-text-primary);
    --rz-tabs-tab-selected-top-border-color: var(--color-accent);
    --rz-tabs-tab-selected-background-color: transparent;
    --rz-tabs-tab-background-color: transparent;
    --rz-tabs-tab-hover-color: var(--color-text-primary);
    --rz-tabs-tab-focus-color: var(--color-text-primary);
    --rz-tabs-border: none;
    --rz-tabs-shadow: none;
}

.hq[b-6mnooljlyu]  .hq-tabs {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hq[b-6mnooljlyu]  .hq-tabs .rz-tabview-nav {
    display: flex;
    background: var(--surface-2);
}

.hq[b-6mnooljlyu]  .hq-tabs .rz-tabview-nav li {
    flex: 1 1 0;
    min-width: 0;
}

.hq[b-6mnooljlyu]  .hq-tabs .rz-tabview-nav li a {
    justify-content: center;
    min-height: 44px;
}

.hq[b-6mnooljlyu]  .hq-tabs .rz-tabview-panels {
    padding: 12px;
    /* Room for the play strip, the GameShell header and the tab strip; a long board
       scrolls inside its panel rather than pushing the whole page. */
    max-height: calc(100dvh - 14rem);
    overflow-y: auto;
}

.hq-tabs-pending[b-6mnooljlyu] {
    min-height: 16rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.hq-map[b-6mnooljlyu] {
    max-width: 40rem;
    margin: 0 auto;
}

.hq-stats[b-6mnooljlyu] {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hq-stats > div[b-6mnooljlyu] {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.hq-stats dt[b-6mnooljlyu] {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.hq-stats dd[b-6mnooljlyu] {
    margin: 2px 0 0;
    font-family: 'Bungee', 'Russo One', var(--font-display, sans-serif);
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-primary);
}

.hq-stats small[b-6mnooljlyu] {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ── Boards panel ── */
.hq-boards[b-6mnooljlyu] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

.hq-boards[b-6mnooljlyu]  .hq-select {
    width: 100%;
    display: flex;
}

.hq-boards[b-6mnooljlyu]  .hq-select .rz-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding-inline: 6px;
    white-space: normal;
    line-height: 1.15;
}

.hq-board-note[b-6mnooljlyu] {
    margin: 0 0 8px;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.hq-boards[b-6mnooljlyu]  .hq-row-me td {
    background: color-mix(in srgb, var(--color-accent) 14%, transparent);
    font-weight: 700;
}

.hq-titles[b-6mnooljlyu] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.hq-titles li[b-6mnooljlyu] {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.hq-titles b[b-6mnooljlyu] {
    font-variant-numeric: tabular-nums;
}

/* A phone: two stat tiles a row are still one glance. */
@media (max-width: 480px) {
    .hq-stats > div[b-6mnooljlyu] {
        padding: 8px;
    }

    .hq-stats dd[b-6mnooljlyu] {
        font-size: 1.1rem;
    }

    .hq-play[b-6mnooljlyu] {
        justify-content: center;
    }

    .hq-continue[b-6mnooljlyu] {
        width: 100%;
        justify-content: center;
    }
}

/* Touch: the Cup link and the board picker reach the 44px target on a coarse pointer
   (GAME-CONSISTENCY rule 8). */
@media (pointer: coarse) {
    .hq-modes[b-6mnooljlyu],
    .hq-boards[b-6mnooljlyu]  .hq-select .rz-button {
        min-height: 44px;
    }
}
/* /Features/PoBrawl/PoBrawlHud.razor.rz.scp.css */
/* PoBrawlHud — the fight HUD, positioned by the page's .pb-top column. Colours are the
   page's scheme-invariant --pb-* tokens (PoBrawlPage.razor.css), inherited through .pb-wrap.

   Glass plate chrome driven by two platform variables, both of which need fallbacks:
   --gfx-blur (visualRuntime.js applyTier) is NEVER SET on a machine that stays on the
   'high' tier, so every use carries its own fallback. --audio-bass is 0 when muted and
   unset when the pump is off, so it only ever ADDS glow to a value that stands alone. */
.pb-hud[b-lj2cghbuic] {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    position: relative; /* the liquid canvas below covers it */
}

/* glass.css's low-tier rule gives .pb-hud an opaque --color-surface fill, which is white in
   the light scheme: a white band across the top of an always-dark arena. The plates carry
   their own low-tier scrim (below), so the row itself stays transparent. */
:root[data-gfx="low"] .pb-hud.pb-hud[b-lj2cghbuic] {
    background: none;
}

/* ── Liquid-glass tubes ─────────────────────────────────────────────────
   hudLiquid.js draws health as liquid and energy as plasma on ONE WebGL2 canvas over the
   whole HUD, at the tracks' measured boxes, and sets data-liquid while it is drawing. Only
   then are the CSS fills hidden and the tracks emptied to bare slots; the tracks themselves
   (role="meter") keep their size and place. No data-liquid (no WebGL2, the low tier, the
   module not loaded) is the CSS HUD, unchanged. */
.pb-liquid[b-lj2cghbuic] {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.pb-hud[data-liquid] .pb-liquid[b-lj2cghbuic] {
    display: block;
}

.pb-hud[data-liquid] .pb-hp-track[b-lj2cghbuic],
.pb-hud[data-liquid] .pb-en-track[b-lj2cghbuic] {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.pb-hud[data-liquid] .pb-hp-fill[b-lj2cghbuic],
.pb-hud[data-liquid] .pb-hp-ghost[b-lj2cghbuic],
.pb-hud[data-liquid] .pb-en-fill[b-lj2cghbuic] {
    visibility: hidden;
}

.pb-hud[data-liquid] .pb-hp-side--danger .pb-hp-track[b-lj2cghbuic]::after {
    display: none; /* the shader draws the same fractures into the glass */
}

.pb-hp-side[b-lj2cghbuic] {
    flex: 1;
    min-width: 0; /* let a long nameplate ellipsize instead of widening the plate */
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 10px 8px;
    border-radius: 12px;
    /* Two-stop wash rather than a flat tint: the plate has to read as a pane
       catching light from above, and a uniform fill reads as a card. */
    background: linear-gradient(160deg, rgba(146, 166, 226, 0.20), rgba(10, 14, 30, 0.34));
    /* saturate() is what separates glassmorphism from a plain blur — the arena
       behind is highly saturated, and letting that colour bleed through is the
       whole effect. */
    backdrop-filter: blur(var(--gfx-blur, 14px)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--gfx-blur, 14px)) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    /* Outer drop, then an inset top highlight (the lit edge of the pane) and an
       inset bottom shade (its thickness). The middle shadow is the audio-driven
       one: --audio-bass scales a cool rim glow, so the plate pulses with the
       music's low end and flares on every impact the SFX bus passes. */
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.45),
        0 0 calc(var(--audio-bass, 0) * 26px) rgba(122, 152, 255, calc(0.15 + var(--audio-bass, 0) * 0.5)),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Raked specular streak. A single wide diagonal band at low alpha — the giveaway
   of cheap glass is a plate with no highlight travelling across it. Static
   (not animated): this sits over a 60 fps canvas and an animated sheen on the
   HUD competes with the fight for the eye. */
.pb-hp-side[b-lj2cghbuic]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(104deg,
        rgba(255, 255, 255, 0) 32%,
        rgba(255, 255, 255, 0.11) 47%,
        rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
}

.pb-hp-right[b-lj2cghbuic] {
    align-items: flex-end;
    /* Mirror the light: P2's plate is lit from the opposite side, so the two
       glass panes read as facing each other across the ring. */
    background: linear-gradient(200deg, rgba(146, 166, 226, 0.20), rgba(10, 14, 30, 0.34));
}

.pb-hp-right[b-lj2cghbuic]::before {
    background: linear-gradient(76deg,
        rgba(255, 255, 255, 0) 32%,
        rgba(255, 255, 255, 0.11) 47%,
        rgba(255, 255, 255, 0) 60%);
}

/* The blur is the expensive part of this HUD, and on the low tier
   visualRuntime sets --gfx-blur to 0 precisely because the machine is already
   dropping frames. A blur(0) backdrop-filter still promotes the element to its
   own compositing layer and still costs a readback, so at that tier the filter
   is dropped ENTIRELY and the plate falls back to a solid scrim. */
:root[data-gfx="low"] .pb-hp-side[b-lj2cghbuic] {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 14, 30, 0.72);
}

:root[data-gfx="low"] .pb-hp-side[b-lj2cghbuic]::before {
    display: none;
}

.pb-hp-name[b-lj2cghbuic] {
    font-family: var(--pb-display);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    /* One line, always: a wrapped name ("player · fighter" online, on a 93px phone
       plate) made the HUD taller and ran it into the ladder rail below. */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* .pb-hud has no background of its own and floats over the dark arena in BOTH
       schemes, so this text must be scheme-invariant (a theme token measured 1.06:1 in
       light mode). Do not re-point it at a theme token. */
    color: var(--pb-ink);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* Tracks are recessed channels cut into the glass: a dark well, an inset top
   shadow so the fill sits *in* it rather than on it, and a hairline lip. */
.pb-hp-track[b-lj2cghbuic] {
    position: relative;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    background: rgba(4, 7, 18, 0.62);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.55),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.pb-hp-fill[b-lj2cghbuic] {
    height: 100%;
    width: var(--hp, 100%);
    transition: width 0.15s ease-out;
    position: relative;
    z-index: 1; /* over the ghost chip */
    /* Gloss on the fill itself — the top half of the bar catches light. Layered
       over each side's own colour gradient below via background-image stacking,
       so the P1/P2 rules keep owning the hue. */
    background-blend-mode: overlay, normal;
}

/* Bright leading edge on the health bar. It is the thing the eye tracks when
   damage lands, and on a flat fill there was nothing to track — the bar just
   got shorter. */
.pb-hp-fill[b-lj2cghbuic]::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 7px rgba(255, 255, 255, 0.85);
}

.pb-hp-right .pb-hp-fill[b-lj2cghbuic]::after {
    right: auto;
    left: 0;
}

.pb-hp-p1[b-lj2cghbuic] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%),
        linear-gradient(90deg, var(--pb-p1), var(--pb-p1-light));
}

.pb-hp-p2[b-lj2cghbuic] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%),
        linear-gradient(90deg, var(--pb-p2-light), var(--pb-p2));
    margin-left: auto;
}

/* ── Damage chip ────────────────────────────────────────────────────────
   The ghost sits under the fill at the SAME --hp, but its width transition waits 0.45 s
   and then drains over 0.6 s: a hit snaps the bar down and leaves a pale sliver showing
   what it cost. No JS: the HUD pump already writes --hp. */
.pb-hp-ghost[b-lj2cghbuic] {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--hp, 100%);
    background: linear-gradient(180deg, var(--pb-chip-hi), var(--pb-chip-lo));
    transition: width 0.6s cubic-bezier(.4, 0, .2, 1) 0.45s;
}

.pb-hp-right .pb-hp-ghost[b-lj2cghbuic] {
    left: auto;
    right: 0;
}

/* ── In the red ─────────────────────────────────────────────────────────
   Under 25% the plate cracks and its rim runs red. Deliberately STATIC: the heartbeat
   pulse lives in the arena (game.js _updateDanger) and the audio, not in a blinking HUD. */
.pb-hp-side--danger[b-lj2cghbuic] {
    border-color: rgba(255, 110, 110, 0.6);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.45),
        0 0 16px rgba(255, 60, 60, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.pb-hp-side--danger .pb-hp-track[b-lj2cghbuic]::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    /* A few hairline fractures across the glass, stretched to the track. */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='white' stroke-opacity='.7' stroke-width='.6'%3E%3Cpath d='M9 0 L12 4 L10 7 L14 12 M12 4 L17 5 L19 3'/%3E%3Cpath d='M47 0 L45 5 L49 8 L47 12 M45 5 L40 7'/%3E%3Cpath d='M81 0 L84 3 L82 6 L86 9 L85 12 M84 3 L90 2'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* Energy meter — banked attack power (see game.js ENERGY_* consts). Thinner
   sibling of the HP track; fill turns gold + glows once past the 50% idle
   cap, i.e. when the fighter has blocked/charged their way into bonus power. */
.pb-en-track[b-lj2cghbuic] {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(4, 7, 18, 0.62);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.pb-en-fill[b-lj2cghbuic] {
    height: 100%;
    width: var(--en, 50%);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 60%),
        linear-gradient(90deg, var(--pb-energy), var(--pb-energy-light));
    transition: width 0.25s linear;
}

/* P2's side is right-aligned, so both of its bars anchor right and drain inward toward
   the centre clock, mirroring P1. */
.pb-hp-right .pb-en-fill[b-lj2cghbuic],
.pb-hp-right .pb-hp-fill[b-lj2cghbuic] {
    margin-left: auto;
}

.pb-en-hot[b-lj2cghbuic] {
    background: linear-gradient(90deg, var(--pb-energy-hot), var(--pb-gold-bright));
    box-shadow: 0 0 6px rgba(255, 210, 87, 0.75);
}

/* Gassed out: under ~40% the engine refuses to start a punch or a kick (game.js
   ENERGY_ATTACK_FLOOR / ENERGY_RECOVER_TO), so the bar has to say so — otherwise a dead
   attack button reads as dropped input. Colour only, no pulse: the HUD is where the eye
   rests, and PoBrawl must not blink more. */
.pb-en-spent[b-lj2cghbuic] {
    background: linear-gradient(90deg, var(--pb-energy-spent), var(--pb-energy-spent-light));
    box-shadow: 0 0 6px rgba(242, 99, 122, 0.7);
}

/* Region-damage body diagram: one 4-zone silhouette per fighter, flanking the
   clock. Zones tint teal → amber → red as damage accrues; a zone past the
   70-damage gameplay threshold (flinch / weak arms / slow legs) pulses. */
.pb-body[b-lj2cghbuic] {
    width: 24px;
    height: 38px;
    flex: 0 0 auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
    opacity: 0.92;
}

.pb-body circle[b-lj2cghbuic],
.pb-body rect[b-lj2cghbuic] {
    stroke: rgba(0, 0, 0, 0.45);
    stroke-width: 1;
    /* Healthy teal → bruised amber (50) → crippled red (100), the 30/70 thresholds
       the gameplay effects use sitting inside those bands. The page passes --dmg
       (0-100); the two nested mixes are the two halves of the old C# lerp. */
    fill: color-mix(in srgb,
        var(--pb-region-crit) calc(clamp(0, var(--dmg, 0) - 50, 50) * 2%),
        color-mix(in srgb, var(--pb-region-mid) calc(clamp(0, var(--dmg, 0), 50) * 2%), var(--pb-region-ok)));
}

.pb-reg-crit[b-lj2cghbuic] {
    animation: pb-reg-pulse-b-lj2cghbuic 0.9s ease-in-out infinite;
}

@keyframes pb-reg-pulse-b-lj2cghbuic {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* The clock over the mode's own readout (the page's Below fragment). */
.pb-center[b-lj2cghbuic] {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Online: which plate is the player's. */
.pb-hp-you[b-lj2cghbuic] {
    display: inline-block;
    margin: 0 5px;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--pb-gold);
    color: var(--pb-versus-ink);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-shadow: none;
}

.pb-clock[b-lj2cghbuic] {
    min-width: 44px;
    text-align: center;
    font-family: var(--pb-display);
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    font-weight: 800;
    color: var(--pb-white);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 2px 6px;
}

@media (prefers-reduced-motion: reduce) {
    .pb-reg-crit[b-lj2cghbuic] {
        animation: none;
    }
}

/* Short arenas (a landscape phone is ~310px tall): a slimmer HUD, so the plates
   stop covering the fighters' heads. Same information, tighter. */
@media (max-height: 500px) {
    .pb-hud[b-lj2cghbuic] {
        gap: 6px;
    }

    .pb-hp-side[b-lj2cghbuic] {
        gap: 2px;
        padding: 4px 8px 5px;
    }

    .pb-hp-name[b-lj2cghbuic] {
        font-size: 0.75rem;
    }

    .pb-hp-track[b-lj2cghbuic] {
        height: 9px;
    }

    .pb-en-track[b-lj2cghbuic] {
        height: 5px;
    }

    .pb-body[b-lj2cghbuic] {
        width: 18px;
        height: 28px;
    }

    .pb-clock[b-lj2cghbuic] {
        font-size: 1.05rem;
    }

    .pb-center[b-lj2cghbuic] {
        gap: 2px;
    }
}
/* /Features/PoBrawl/PoBrawlNetMeter.razor.rz.scp.css */
/* The online signal meter: a pill like the corner pill beside it (PoBrawlPage.razor.css
   .pb-net-pill), holding four rising bars and the round trip. The net-status row is
   pointer-events: none so it never eats a click meant for the arena; the meter opts back in
   so its tooltip can show. */
.pb-net-meter[b-yg2mv5gu9g] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--pb-pill-ink, #e5e7eb);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    padding: 3px 10px 3px 8px;
    border-radius: var(--radius-pill, 999px);
    white-space: nowrap;
    pointer-events: auto;
    cursor: help;
}

.pb-net-meter:focus-visible[b-yg2mv5gu9g] {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.pb-net-bars[b-yg2mv5gu9g] {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.pb-net-bar[b-yg2mv5gu9g] {
    width: 3px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.22);
    transition: background-color 0.3s ease;
}

.pb-net-bar--1[b-yg2mv5gu9g] { height: 25%; }
.pb-net-bar--2[b-yg2mv5gu9g] { height: 50%; }
.pb-net-bar--3[b-yg2mv5gu9g] { height: 75%; }
.pb-net-bar--4[b-yg2mv5gu9g] { height: 100%; }

.pb-net-meter--good .pb-net-bar--on[b-yg2mv5gu9g] { background: #4ade80; }
.pb-net-meter--fair .pb-net-bar--on[b-yg2mv5gu9g] { background: var(--accent-warning); }
.pb-net-meter--poor .pb-net-bar--on[b-yg2mv5gu9g] { background: var(--accent-danger); }

/* data-motion (appPrefs.js) folds the OS preference and the app toggle into one switch. */
html[data-motion="reduce"] .pb-net-bar[b-yg2mv5gu9g] { transition: none; }
/* /Features/PoBrawl/PoBrawlOnlineLobbyPage.razor.rz.scp.css */
/* The unreachable-lobby failure is the shared Components/InlineError strip now. */
.pbl-room[b-pobrawl-arena] {
    display: contents;
}

/* ── Compact card: a 1v1 room has two seats and one pick, so it needs no full-width slab ── */
.pbl-room[b-pobrawl-arena]  .sp-page {
    max-width: 36rem;
    padding-block: 1rem;
}

.pbl-room[b-pobrawl-arena]  .sp-card {
    padding: 1rem 1.25rem;
}

/* The card is one wrapping row: the heading line and the side cards take a line each, and
   Leave / Invite / Dossiers / How to play share the last one. The picker section and its
   .pb-lobby token wrapper are flattened so the Dossiers disclosure is an item of that row;
   `order` puts it after the shared panel's buttons. An open disclosure takes a line. */
.pbl-room[b-pobrawl-arena]  .lobby {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.75rem;
}

.pbl-room[b-pobrawl-arena]  .lobby__section {
    flex: 1 1 100%;
    margin: 0;
}

.pbl-room[b-pobrawl-arena]  .lobby__section + .lobby__section,
.pbl-room .pb-lobby[b-pobrawl-arena] {
    display: contents;
}

.pbl-room .pb-select[b-pobrawl-arena] {
    flex: 1 1 100%;
}

.pbl-room[b-pobrawl-arena]  .lobby__actions {
    order: 1;
}

.pbl-room .pb-dossier-disclosure[b-pobrawl-arena] {
    order: 2;
    margin: 0 0 0 auto;
}

.pbl-room[b-pobrawl-arena]  .lobby__howto {
    order: 3;
    margin: 0;
}

.pbl-room .pb-dossier-disclosure[open][b-pobrawl-arena],
.pbl-room[b-pobrawl-arena]  .lobby__howto[open] {
    flex-basis: 100%;
    margin: 0;
}

/* Heading line: "Players · 1/2", the 1v1 hint, and the hub pill pushed right. */
.pbl-room[b-pobrawl-arena]  .lobby__section:first-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.6rem;
}

.pbl-room[b-pobrawl-arena]  .lobby__section:first-child > .lobby__head {
    display: contents;
}

.pbl-room[b-pobrawl-arena]  .lobby__section:first-child > .lobby__hint {
    order: 1;
    margin: 0;
}

.pbl-room[b-pobrawl-arena]  .lobby__section:first-child .conn-strip {
    order: 2;
    margin-left: auto;
}

.pbl-room[b-pobrawl-arena]  .lobby__section:first-child > .app-loading,
.pbl-room[b-pobrawl-arena]  .lobby__section:first-child > .lobby__empty {
    order: 3;
    flex-basis: 100%;
    margin: 0;
}

/* The two side cards are the roster here (name, pick, ready), so the shared list of seats
   would only say it twice. Its heading ("Players · 2/2") and the hub status stay. */
.pbl-room[b-pobrawl-arena]  .lobby__list {
    display: none;
}

/* The picker reuses the 2P select (PoBrawlPage.razor.css, the same CSS scope): your card is
   your Ready toggle; your opponent's is a read-out, so it takes no pointer. */
.pb-lobby .pb-select-side--static[b-pobrawl-arena] {
    cursor: default;
}

.pb-lobby .pb-select-side:disabled[b-pobrawl-arena] {
    cursor: progress;
}

/* ── Slim side cards: two lines each (who + ready state, then the fighter), mirrored ── */
.pb-lobby .pb-select-vs[b-pobrawl-arena] {
    font-size: 1rem;
}

.pb-lobby .pb-select-side[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0 0.5rem;
    min-height: 0;
    padding: 0.35rem 0.6rem;
    text-align: left;
}

.pb-lobby .pb-select-who[b-pobrawl-arena] {
    grid-area: 1 / 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pb-lobby .pb-select-state[b-pobrawl-arena] {
    grid-area: 1 / 2;
}

.pb-lobby .pb-select-pick[b-pobrawl-arena] {
    grid-area: 2 / 1 / 3 / 3;
}

.pb-lobby .pb-select-side--p2[b-pobrawl-arena] {
    grid-template-columns: auto minmax(0, 1fr);
    text-align: right;
}

.pb-lobby .pb-select-side--p2 .pb-select-who[b-pobrawl-arena] {
    grid-area: 1 / 2;
}

.pb-lobby .pb-select-side--p2 .pb-select-state[b-pobrawl-arena] {
    grid-area: 1 / 1;
}

/* The seal stamps the card's outer corner, clear of the ready text. */
.pb-lobby .pb-select-seal[b-pobrawl-arena] {
    top: -10px;
    right: -8px;
    width: 30px;
    height: 30px;
    margin-top: 0;
}

.pb-lobby .pb-select-side--p2 .pb-select-seal[b-pobrawl-arena] {
    right: auto;
    left: -8px;
}

/* Your fighter dropdown, under your card (the whole row on a phone). The box itself is the
   shared lobby select (LobbyPanel.razor.css). */
.pbl-fighter[b-pobrawl-arena] {
    grid-area: 2 / 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.pbl-fighter > label[b-pobrawl-arena] {
    flex: none;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.pbl-fighter > select[b-pobrawl-arena] {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 480px) {
    .pbl-fighter[b-pobrawl-arena] {
        grid-column: 1 / -1;
    }
}

/* Touch: the slim side cards are the ready toggles, so they keep the 44px target on a
   coarse pointer (GAME-CONSISTENCY rule 8). */
@media (pointer: coarse) {
    .pb-lobby .pb-select-side[b-pobrawl-arena] {
        min-height: 44px;
    }
}
/* /Features/PoBrawl/PoBrawlPage.razor.rz.scp.css */
/* Fight chrome tokens. Custom properties inherit into the HUD (rendered inside .pb-top),
   the engine's DOM (appended inside .pb-canvas-host) and through .pb-intro (display:
   contents). The arena is dark in both schemes, so everything drawn over it reads these
   scheme-invariant --pb-* colours; theme surfaces (intro card, result modal) use app tokens. */
.pb-wrap[b-pobrawl-arena],
.pb-intro[b-pobrawl-arena],
.pb-lobby[b-pobrawl-arena] {
    --pb-display: 'Bungee', 'Russo One', 'Impact', sans-serif;
    --pb-arena: #0d0f1a;
    --pb-white: #fff;
    --pb-ink: #f4f6ff;
    --pb-ink-soft: #dfe6ff;
    --pb-ink-muted: #c7cbe8;
    --pb-ink-dim: #9aa6c8;
    --pb-ink-faint: #8f96b8;
    --pb-gold: #ffd166;
    --pb-gold-bright: #ffd257;
    --pb-p1: #22c55e;
    --pb-p1-deep: #16a34a;
    --pb-p1-light: #86efac;
    --pb-p2: #ef4444;
    --pb-p2-light: #f87171;
    --pb-go: #34d17c;
    --pb-go-ink: #7ee2a8;
    --pb-seg-ink: #e8eeff;
    --pb-touch-ink: #e8ecff;
    --pb-pill-ink: #cbd5e1;
    --pb-pill-warn-ink: #fff7ed;
    --pb-card-ink: #e2e8f0;
    --pb-card-muted: #94a3b8;
    --pb-btn: #6366f1;
    --pb-btn-ring: #c7d2fe;
    --pb-dmg: #ffe9b0;
    --pb-dmg-head: #ff8a7a;
    --pb-dmg-heavy: #ff5530;
    --pb-versus-ink: #2a1c04;
    --pb-splash-ink: #e8eaf6;
    --pb-foil-pink: #ff6b8b;
    --pb-foil-blue: #7aa2ff;
    --pb-foil-mint: #7dffd0;
    --pb-seal-hi: #fff3c4;
    --pb-seal-lo: #b8862a;
    --pb-seal-rim-dark: #8a5f12;
    --pb-seal-rim-light: #ffe08a;
    --pb-chip-hi: #fff4dc;
    --pb-chip-lo: #ffb08a;
    --pb-energy: #5b7cfa;
    --pb-energy-light: #8aa4ff;
    --pb-energy-hot: #ffb020;
    --pb-energy-spent: #c2354a;
    --pb-energy-spent-light: #f2637a;
    --pb-region-crit: #e03131;
    --pb-region-mid: #fab005;
    --pb-region-ok: #4adeb2;
}

.pb-wrap[b-pobrawl-arena] {
    /* The page runs GameShell Fullscreen (no 1.5rem area padding, which cost a phone 48px
       of its 390) and keeps its own, smaller gutter — the arena height below subtracts it. */
    --pb-gutter: clamp(0.5rem, 1.6vw, 1.5rem);
    padding: var(--pb-gutter);
    position: relative;
    width: 100%;
    /* The engine re-frames to any aspect, so give the ring the well — but capped, because a
       side-view ring stretched across an ultrawide stops reading as a ring. */
    max-width: min(1400px, 100%);
    margin: 0 auto;
}

.pb-canvas-host[b-pobrawl-arena] {
    position: relative;
    width: 100%;
    /* --gps-area-h is the shell's viewport-minus-chrome figure (games.css). No min-height:
       a floor beat the calc on a landscape phone and the page scrolled. */
    height: min(calc(var(--gps-area-h, 100dvh) - 2 * var(--pb-gutter)), 820px);
    border-radius: 12px;
    overflow: hidden;
    background: var(--pb-arena);
}

.pb-canvas-host[b-pobrawl-arena]  canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* KO → result glass shatter (spectacle.js). Laid over the 3D view for ~1.3 s,
   under the banner, never taking a click. No z-index on
   purpose: it is inserted straight after the WebGL canvas, so DOM order keeps
   every later overlay (the banner has no z-index either) on top of it. */
.pb-canvas-host[b-pobrawl-arena]  .pb-shatter {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-banner {
    /* Engine-created. Anchored to the CANVAS so FIGHT! / K.O. sits in the dead band
       between the HUD and the fighters' heads, never covering the players. */
    position: absolute;
    top: 8%;
    height: 26%;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-family: 'Bungee Inline', var(--pb-display);
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--pb-gold);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7), 0 0 12px rgba(255, 209, 102, 0.25);
}

/* Caption bar (commentary.js): every line the PA speaks, written out. Sits low over the
   ring floor, never over the fighters' heads, and shows while muted, when it matters most. */
.pb-canvas-host[b-pobrawl-arena]  .pb-caption {
    position: absolute;
    left: 50%;
    bottom: 5%;
    transform: translate(-50%, 6px);
    max-width: min(92%, 46rem);
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    background: rgba(8, 10, 20, 0.90);
    color: var(--pb-ink);
    font-size: clamp(0.85rem, 1.9vw, 1.05rem);
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    z-index: 4;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-caption:empty {
    display: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-caption--on {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
    .pb-canvas-host[b-pobrawl-arena]  .pb-caption {
        transition: none;
        transform: translate(-50%, 0);
    }
}

/* Virtual touch controls (input.js buildTouchControls) — hidden on desktop, shown on
   coarse-pointer devices and narrow portrait windows, docked inside the arena along its
   bottom edge. The engine tags the host .pb-has-pad; --pb-pad-h is the pad's height, and
   every other piece of bottom-docked chrome adds it to its own offset. */
.pb-canvas-host[b-pobrawl-arena]  .pb-touch {
    display: none;
}

@media (hover: none) and (pointer: coarse), (max-width: 640px) and (orientation: portrait) {
    .pb-canvas-host.pb-has-pad[b-pobrawl-arena] {
        /* Two stacked rows: 44 small + 6 gap + 56 big + the 10px inset. */
        --pb-pad-h: 116px;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch {
        position: absolute;
        left: 0;
        right: 0;
        bottom: max(10px, env(safe-area-inset-bottom));
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        padding: 0 10px;
        z-index: 6;
        pointer-events: none; /* only the buttons themselves take touches */
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch .pb-touch-cluster {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch .pb-touch-row {
        display: flex;
        gap: 8px;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch button {
        pointer-events: auto;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: 2px solid rgba(150, 160, 220, 0.45);
        background: rgba(20, 24, 44, 0.6);
        color: var(--pb-touch-ink);
        font-size: 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch button.pb-touch-small {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch button.pb-touch-held {
        background: rgba(90, 110, 220, 0.65);
        border-color: rgba(190, 200, 255, 0.8);
        transform: scale(1.08);
    }

    /* Clear the thumb pad. */
    .pb-canvas-host[b-pobrawl-arena]  .pb-caption {
        bottom: calc(var(--pb-pad-h, 0px) + 8px);
    }

    .pb-canvas-host.pb-has-pad ~ .pb-trainbar[b-pobrawl-arena] {
        bottom: calc(var(--pb-pad-h) + 4px);
    }
}

/* Landscape phone: the arena is short and wide, so each cluster goes back to one
   row at its own edge — half the height, and the middle stays open. */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
    .pb-canvas-host.pb-has-pad[b-pobrawl-arena] {
        --pb-pad-h: 64px;
    }

    /* Small keys on the inside: ◀ ▶ ↺ ↻ … 🛡 👊 🦵, big ones under the thumbs. */
    .pb-canvas-host[b-pobrawl-arena]  .pb-touch .pb-touch-cluster {
        flex-direction: row;
        align-items: flex-end;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-touch .pb-touch-cluster:first-child {
        flex-direction: row-reverse;
    }
}

/* ── Floating hit feedback (engine-created; see game.js `this.fx`) ─────
   Damage numbers rise off the contact point and a combo badge counts the run.
   The layer never takes pointer events — the touch controls sit above it and
   the canvas below, and neither may be shadowed by a transparent overlay. */

.pb-canvas-host[b-pobrawl-arena]  .pb-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 4; /* under the splash (5), over the canvas */
}

.pb-canvas-host[b-pobrawl-arena]  .pb-dmg {
    position: absolute;
    /* The engine writes left/top as the projected contact point, so the node has
       to be centred on it rather than hanging off its top-left corner. */
    transform: translate(-50%, -50%);
    font-family: var(--pb-display);
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--pb-dmg);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    will-change: transform, opacity;
    animation: pb-dmg-rise-b-pobrawl-arena 0.75s cubic-bezier(.22, 1, .36, 1) forwards;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-dmg--head {
    color: var(--pb-dmg-head);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-dmg--heavy {
    font-size: 1.5rem;
    color: var(--pb-dmg-heavy);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 14px rgba(255, 85, 48, 0.5);
}

/* PERFECT! / COUNTER! — a floating word instead of a figure (game.js `_spawnCallout`).
   Gold and wider-tracked so it never reads as another number in a flurry. */
.pb-canvas-host[b-pobrawl-arena]  .pb-dmg--callout {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    color: var(--pb-gold-bright);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 16px rgba(255, 210, 87, 0.55);
}

@keyframes pb-dmg-rise-b-pobrawl-arena {
    0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
    18%  { transform: translate(-50%, -80%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -190%) scale(0.95); opacity: 0; }
}

.pb-canvas-host[b-pobrawl-arena]  .pb-combo {
    position: absolute;
    top: 22%;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--pb-display);
    color: var(--pb-gold);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    opacity: 0;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-combo--p1 { left: 8%; }
.pb-canvas-host[b-pobrawl-arena]  .pb-combo--p2 { right: 8%; }

.pb-canvas-host[b-pobrawl-arena]  .pb-combo__n { font-size: 1.9rem; }
.pb-canvas-host[b-pobrawl-arena]  .pb-combo__label { font-size: 0.75rem; letter-spacing: 0.12em; }

/* Held for the length of the combo window (game.js COMBO_WINDOW = 1.1 s), then
   the engine drops the class. The pop is restarted on each increment by a
   remove → reflow → add cycle in _showCombo. */
.pb-canvas-host[b-pobrawl-arena]  .pb-combo--on {
    opacity: 1;
    animation: pb-combo-pop-b-pobrawl-arena 0.28s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes pb-combo-pop-b-pobrawl-arena {
    0%   { transform: scale(1.5); opacity: 0.4; }
    100% { transform: scale(1);   opacity: 1; }
}

/* Motion here is pure decoration over a game that is itself constant motion, so
   reduced-motion gets the information without the travel. The fade is kept (not
   set to `animation: none`) on purpose: `animationend` is what removes a damage
   node, and killing the animation outright would leave every number on screen
   until the MAX_DAMAGE_NUMBERS cap evicted it. */
@media (prefers-reduced-motion: reduce) {
    .pb-canvas-host[b-pobrawl-arena]  .pb-dmg {
        animation: pb-dmg-fade-b-pobrawl-arena 0.6s linear forwards;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-combo--on {
        animation: none;
    }

    @keyframes pb-dmg-fade-b-pobrawl-arena {
        0%   { opacity: 1; }
        100% { opacity: 0; }
    }
}


/* ── Inter-round splash (BrawlGame.resetMatch) ───────────────────────
   Hidden by default; `.pb-splash--visible` fades it in. The engine holds
   it for ~1.3 s, then removes the class so it can fade out before the
   countdown "3 / 2 / 1 / FIGHT!" banner takes over. */
.pb-canvas-host[b-pobrawl-arena]  .pb-splash {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center,
                rgba(8, 10, 24, 0.30) 0%,
                rgba(2, 4, 12, 0.55) 70%);
    color: var(--pb-gold);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease-out;
    z-index: 5;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible {
    opacity: 1;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash__inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transform: translateY(0);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__inner {
    animation: pb-splash-rise-b-pobrawl-arena 0.45s cubic-bezier(.22,1,.36,1) both;
}

@keyframes pb-splash-rise-b-pobrawl-arena {
    0%   { transform: translateY(20px) scale(0.92); opacity: 0; }
    100% { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* The splash heading (game.js _showSplash: TRAINING / DEMO / NEXT ROUND). */
.pb-canvas-host[b-pobrawl-arena]  .pb-splash__round {
    font-family: 'Bungee Inline', var(--pb-display);
    font-size: clamp(1.2rem, 3.2vw, 1.8rem);
    letter-spacing: 0.16em;
    color: var(--pb-splash-ink);
    text-shadow: 0 0 18px rgba(255, 209, 102, 0.35);
    margin-bottom: 0.4rem;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash__p1,
.pb-canvas-host[b-pobrawl-arena]  .pb-splash__p2 {
    font-family: var(--pb-display);
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    letter-spacing: 0.06em;
    color: var(--pb-gold);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
    line-height: 1.05;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash__versus {
    font-family: 'Bungee Inline', 'Russo One', 'Impact', sans-serif;
    font-size: clamp(1rem, 2.4vw, 1.4rem);
    color: var(--pb-versus-ink);
    letter-spacing: 0.04em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

/* ── VS fight card ────────────────────────────────────────────────────
   A split-colour field in the HUD's corner colours, two foil-edged name cards that slam in
   from either side, and a seal that spins down between them. The cards arrive at ~0.45 s,
   where audio.vsSting() lands its boom; when the splash closes the name spans fly into the
   HUD nameplates by View Transition (game.js _hideSplash). */
@property --pb-foil {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        rgba(34, 197, 94, 0.2) 0 49.4%,
        rgba(255, 240, 200, 0.28) 49.4% 50.6%,
        rgba(239, 68, 68, 0.2) 50.6%);
    pointer-events: none;
}

/* The View Transition's new state must have the splash already gone. */
.pb-canvas-host[b-pobrawl-arena]  .pb-splash--instant {
    transition: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash__cards {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.6vw, 16px);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash__card {
    position: relative;
    min-width: clamp(110px, 24vw, 250px);
    padding: 0.55rem 1rem;
    border-radius: 12px;
    text-align: center;
    background: linear-gradient(160deg, rgba(26, 30, 60, 0.9), rgba(8, 10, 24, 0.92));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

/* Holo-foil rim: a conic gradient spun through an animatable custom property,
   masked down to a 2 px ring so the card face stays dark and readable. */
.pb-canvas-host[b-pobrawl-arena]  .pb-splash__card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: conic-gradient(from var(--pb-foil), var(--pb-gold), var(--pb-foil-pink), var(--pb-foil-blue), var(--pb-foil-mint), var(--pb-gold));
    -webkit-mask: linear-gradient(black 0 0) content-box, linear-gradient(black 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(black 0 0) content-box exclude, linear-gradient(black 0 0);
    animation: pb-foil-spin-b-pobrawl-arena 2.6s linear infinite;
    pointer-events: none;
}

@keyframes pb-foil-spin-b-pobrawl-arena {
    to { --pb-foil: 360deg; }
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__card--p1 {
    animation: pb-card-in-l-b-pobrawl-arena 0.46s cubic-bezier(.2, 1.35, .4, 1) both;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__card--p2 {
    animation: pb-card-in-r-b-pobrawl-arena 0.46s cubic-bezier(.2, 1.35, .4, 1) both;
}

@keyframes pb-card-in-l-b-pobrawl-arena {
    0%   { transform: translateX(-70vw) skewX(-14deg); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

@keyframes pb-card-in-r-b-pobrawl-arena {
    0%   { transform: translateX(70vw) skewX(14deg); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash__seal {
    flex: 0 0 auto;
    width: clamp(46px, 7vw, 66px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    /* Gold medallion with a rope-knurled rim — repeating-conic draws the rim. */
    background:
        radial-gradient(circle at 35% 30%, var(--pb-seal-hi), var(--pb-gold) 45%, var(--pb-seal-lo) 100%) content-box,
        repeating-conic-gradient(var(--pb-seal-rim-dark) 0 6deg, var(--pb-seal-rim-light) 6deg 12deg);
    padding: 4px;
    box-shadow: 0 0 22px rgba(255, 209, 102, 0.55), 0 6px 18px rgba(0, 0, 0, 0.6);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__seal {
    animation: pb-seal-in-b-pobrawl-arena 0.55s cubic-bezier(.2, 1.2, .3, 1) 0.28s both;
}

@keyframes pb-seal-in-b-pobrawl-arena {
    0%   { transform: scale(2.6) rotate(-220deg); opacity: 0; }
    100% { transform: none; opacity: 1; }
}

/* A phone: two cards side by side leave each about 110 px, too narrow for EISENHOWER at a
   readable size (shrinking clipped it, wrapping read as "NIXO / N"). Stack them instead:
   left corner, seal, right corner, each card the full width. */
@media (max-width: 480px) {
    .pb-canvas-host[b-pobrawl-arena]  .pb-splash__cards {
        flex-direction: column;
        gap: 6px;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-splash__card {
        width: min(78vw, 18rem);
        min-width: 0;
        padding: 0.45rem 0.75rem;
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-splash__p1,
    .pb-canvas-host[b-pobrawl-arena]  .pb-splash__p2 {
        font-size: clamp(1.1rem, 6.4vw, 1.6rem);
    }

    .pb-canvas-host[b-pobrawl-arena]  .pb-splash__seal {
        width: 40px;
        margin: -4px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pb-canvas-host[b-pobrawl-arena]  .pb-splash__card::before,
    .pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__card--p1,
    .pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__card--p2,
    .pb-canvas-host[b-pobrawl-arena]  .pb-splash--visible .pb-splash__seal {
        animation: none;
    }
}

/* ── Top of the arena: HUD, ladder rail, online pills, stacked in normal flow. ── */
.pb-top[b-pobrawl-arena] {
    position: absolute;
    top: calc(var(--pb-gutter) + 10px);
    left: calc(var(--pb-gutter) + 12px);
    right: calc(var(--pb-gutter) + 12px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    pointer-events: none;
    z-index: 5;
}

/* ── The HUD's centre readout (PoBrawlHud.Below): ladder rung + votes, the tournament
   bout, the online signal. Rendered by the page, so it is styled here. ── */
.pb-chip[b-pobrawl-arena] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--pb-ink-muted);
    font-size: 0.75rem;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.pb-chip b[b-pobrawl-arena] {
    color: var(--pb-white);
}

/* Campaign trail: the electoral votes, in BOB's green. */
.pb-chip-ev[b-pobrawl-arena] {
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--pb-p1-light);
}

.pb-chip-stack[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

/* A 390px phone: the plates need every pixel, so the votes wait for the campaign map. */
@media (max-width: 480px) {
    .pb-chip-ev[b-pobrawl-arena] {
        display: none;
    }
}

/* ── Online: room + corner pills over the arena, and the "no fight here" card. ── */
.pb-net-status[b-pobrawl-arena] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
    z-index: 5;
}

.pb-net-pill[b-pobrawl-arena] {
    background: rgba(0, 0, 0, 0.6);
    color: var(--pb-pill-ink);
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.pb-net-pill--warn[b-pobrawl-arena] {
    background: rgba(146, 64, 14, 0.85);
    color: var(--pb-pill-warn-ink);
}

.pb-net-missing[b-pobrawl-arena] {
    position: absolute;
    inset: var(--pb-gutter);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(8, 10, 20, 0.82);
    color: var(--pb-card-ink);
    text-align: center;
    padding: 1rem;
    z-index: 6;
}

.pb-net-missing h2[b-pobrawl-arena] {
    margin: 0;
    font-size: 1.3rem;
}

.pb-net-missing p[b-pobrawl-arena] {
    margin: 0;
    color: var(--pb-card-muted);
}

.pb-net-btn[b-pobrawl-arena] {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--pb-btn);
    color: var(--pb-white);
    text-decoration: none;
    font-weight: 600;
}

.pb-net-btn:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--pb-btn-ring);
    outline-offset: 2px;
}

/* "Couldn't connect": Retry beside the way back. */
.pb-net-actions[b-pobrawl-arena] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

button.pb-net-btn[b-pobrawl-arena] {
    border: 0;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pb-net-btn--ghost[b-pobrawl-arena] {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

/* ── Pause: the touch button under the HUD, and the card over the frozen arena ── */
.pb-pause-btn[b-pobrawl-arena] {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    pointer-events: auto;
    font: inherit;
    font-size: 1.05rem;
    line-height: 1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(8, 12, 28, 0.72);
    color: var(--pb-seg-ink);
    cursor: pointer;
    touch-action: manipulation;
}

.pb-pause-btn:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--pb-gold);
    outline-offset: 2px;
}

/* A mouse and keyboard have Escape and P. */
@media (hover: hover) and (pointer: fine) {
    .pb-pause-btn[b-pobrawl-arena] {
        display: none;
    }
}

.pb-wrap[b-pobrawl-arena]  .pb-pause {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9;
    width: min(20rem, calc(100% - 2 * var(--pb-gutter) - 24px));
    display: grid;
    gap: 10px;
    padding: 16px 18px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 209, 102, 0.35);
    background: rgba(11, 19, 48, 0.94);
    color: var(--pb-card-ink);
    text-align: center;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.pb-pause-title[b-pobrawl-arena] {
    margin: 0;
    font-family: var(--pb-display);
    font-size: 1.4rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--pb-gold);
}

.pb-pause-actions[b-pobrawl-arena] {
    display: grid;
    gap: 6px;
}

.pb-pause-act[b-pobrawl-arena] {
    min-height: 42px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: var(--pb-ink);
    cursor: pointer;
}

.pb-pause-act:hover[b-pobrawl-arena] {
    border-color: rgba(255, 209, 102, 0.6);
}

.pb-pause-act:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--pb-gold);
    outline-offset: 2px;
}

.pb-pause-act--go[b-pobrawl-arena] {
    border-color: var(--pb-gold);
    background: var(--pb-gold);
    color: var(--pb-versus-ink);
}

.pb-pause-hint[b-pobrawl-arena] {
    margin: 0;
    font-size: 0.75rem;
    color: var(--pb-card-muted);
}

/* ── The ladder's ending card (full clear) — result modal, tokens. ── */
.pb-ending[b-pobrawl-arena] {
    margin: 12px auto 0;
    max-width: 28rem;
    padding: 12px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--accent-warning);
    background: var(--accent-warning-soft);
    color: var(--color-text-primary);
    text-align: center;
}

.pb-ending-seal[b-pobrawl-arena] {
    font-size: 2.2rem;
    line-height: 1;
}

.pb-ending-title[b-pobrawl-arena] {
    margin: 4px 0 2px;
    font-size: 1.15rem;
    color: var(--accent-warning-ink);
}

.pb-ending-line[b-pobrawl-arena],
.pb-ending-next[b-pobrawl-arena] {
    margin: 4px 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.pb-ending-roll[b-pobrawl-arena] {
    list-style: none;
    margin: 8px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.pb-ending-roll li[b-pobrawl-arena] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--color-border);
    font-size: 0.78rem;
}

.pb-ending-ko[b-pobrawl-arena] {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent-danger-ink, var(--accent-warning-ink));
}

.pb-ending-stats[b-pobrawl-arena] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 16px;
    margin: 8px 0 4px;
}

.pb-ending-stats div[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
}

.pb-ending-stats dt[b-pobrawl-arena] {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
}

.pb-ending-stats dd[b-pobrawl-arena] {
    margin: 0;
    font-weight: 700;
}

/* ── KO chromatic-aberration flash overlay ─────────────
   A full-bleed overlay that fades red/cyan split-second on K.O. We use two
   box-shadows offset in opposite directions plus a vignette to mimic the
   look of a chromatic-aberration post-pass without paying for a real one. */

.pb-canvas-host[b-pobrawl-arena]  .pb-flash {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-flash.pb-flash-active {
    animation: pb-flash-anim-b-pobrawl-arena 0.55s ease-out forwards;
}

@keyframes pb-flash-anim-b-pobrawl-arena {
    0%   { opacity: 0; box-shadow: inset 0 0 0 0 rgba(255, 80, 80, 0), inset 0 0 0 0 rgba(80, 160, 255, 0); }
    10%  { opacity: 1; box-shadow: inset 6px 0 80px 0 rgba(255, 60, 60, 0.55), inset -6px 0 80px 0 rgba(60, 120, 255, 0.55), inset 0 0 200px 30px rgba(0, 0, 0, 0.85); }
    60%  { opacity: 0.4; box-shadow: inset 2px 0 30px 0 rgba(255, 60, 60, 0.18), inset -2px 0 30px 0 rgba(60, 120, 255, 0.18), inset 0 0 80px 10px rgba(0, 0, 0, 0.5); }
    100% { opacity: 0; box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0), inset 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* ── 1P intro options: the campaign status beside the rung's dossier ── */

/* No box of its own: the map and the dossier each carry one. Stacked on a phone. */
.pb-scout[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    text-align: left;
}

@media (min-width: 720px) {
    .pb-scout[b-pobrawl-arena] {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: start;
    }
}

/* "📁 Dossiers" disclosure (2P select): PoBrawlDossierCard behind a summary row, so the
   long intro card only grows when the player asks. */
.pb-dossier-disclosure[b-pobrawl-arena] {
    margin-top: 8px;
    text-align: left;
}

.pb-dossier-disclosure > summary[b-pobrawl-arena] {
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
}

/* display:flex drops the native marker, so the open/closed chevron is drawn here. */
.pb-dossier-disclosure > summary[b-pobrawl-arena] {
    list-style: none;
}

.pb-dossier-disclosure > summary[b-pobrawl-arena]::-webkit-details-marker {
    display: none;
}

.pb-dossier-disclosure > summary[b-pobrawl-arena]::before {
    content: "▸";
    display: inline-block;
    width: 1em;
    transition: transform 0.15s ease;
}

.pb-dossier-disclosure[open] > summary[b-pobrawl-arena]::before {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .pb-dossier-disclosure > summary[b-pobrawl-arena]::before {
        transition: none;
    }
}

.pb-dossier-disclosure > summary:hover[b-pobrawl-arena] {
    color: var(--color-text-primary);
}

.pb-dossier-disclosure > summary:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.pb-dossier-disclosure[open] > summary[b-pobrawl-arena] {
    margin-bottom: 6px;
}

.pb-dossier-pair[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (max-width: 560px) {
    .pb-dossier-pair[b-pobrawl-arena] {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── Fight recap (end-of-game modal) ──────────────────────────────────── */

.pb-recap[b-pobrawl-arena] {
    width: 100%;
    max-width: 24rem;
    margin: 10px auto 0;
    border-collapse: collapse;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

.pb-recap caption[b-pobrawl-arena] {
    text-align: left;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    padding-bottom: 4px;
}

.pb-recap th[b-pobrawl-arena],
.pb-recap td[b-pobrawl-arena] {
    padding: 3px 6px;
    border-bottom: 1px solid var(--color-border);
}

.pb-recap thead th[b-pobrawl-arena] {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-secondary);
}

/* Row headers are the stat names (left), data cells are the two fighters' values
   (right) — tabular figures so the two columns line up digit for digit. */
.pb-recap tbody th[b-pobrawl-arena] {
    text-align: left;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.pb-recap td[b-pobrawl-arena],
.pb-recap thead th:not(.pb-recap-stat)[b-pobrawl-arena] {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pb-recap-stat[b-pobrawl-arena] {
    text-align: left;
}

/* ── Training bar (floats over the arena) ───────────────────────────── */

.pb-seg[b-pobrawl-arena] {
    font: inherit;
    font-size: 0.78rem;
    line-height: 1;
    padding: 7px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 12, 28, 0.72);
    color: var(--pb-seg-ink);
    cursor: pointer;
    backdrop-filter: blur(var(--gfx-blur, 6px));
}

.pb-seg:hover[b-pobrawl-arena] {
    border-color: rgba(255, 209, 102, 0.6);
}

.pb-seg:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--pb-gold);
    outline-offset: 2px;
}

/* The training bar's exit: reads as "go". */
.pb-seg--ladder[b-pobrawl-arena] {
    border-color: rgba(34, 197, 94, 0.55);
    color: var(--pb-go-ink);
}

.pb-seg--ladder:hover[b-pobrawl-arena] {
    border-color: var(--pb-go);
}

/* Docked at the bottom of the arena, where the fight never needs to be read. */
.pb-trainbar[b-pobrawl-arena] {
    position: absolute;
    bottom: calc(var(--pb-gutter) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    max-width: calc(100% - 24px);
    padding: 6px 8px;
    border-radius: 14px;
    background: rgba(8, 12, 28, 0.6);
    color: var(--pb-ink-soft);
    font-size: 0.78rem;
}

/* Best of three: the round pips under the HUD clock. Engine DOM (cinematics.js
   _renderRounds), hence ::deep. Two pips a corner, lit gold as rounds are won. */
.pb-canvas-host[b-pobrawl-arena]  .pb-rounds {
    position: absolute;
    top: 84px;
    left: 50%;
    translate: -50% 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(8, 12, 28, 0.62);
    color: var(--pb-ink-soft);
    font-family: var(--pb-display);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    pointer-events: none;
    white-space: nowrap;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rounds[hidden] {
    display: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rounds__side {
    display: flex;
    gap: 5px;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rounds__pip {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--pb-ink-dim);
    background: transparent;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rounds__pip--on {
    border-color: var(--pb-gold);
    background: var(--pb-gold);
    box-shadow: 0 0 6px var(--pb-gold);
}

@media (max-width: 640px) {
    .pb-canvas-host[b-pobrawl-arena]  .pb-rounds { top: 74px; gap: 7px; padding: 3px 8px; }
}

/* The training readout is engine DOM (training.js), hence ::deep. */
.pb-canvas-host[b-pobrawl-arena]  .pb-train {
    position: absolute;
    top: 84px;
    left: 12px;
    max-width: min(48%, 380px);
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(8, 12, 28, 0.62);
    color: var(--pb-ink-soft);
    font-size: var(--text-xs);
    line-height: 1.3;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-train[hidden] {
    display: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-train__title {
    font-family: var(--pb-display);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--pb-gold);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-train__frames {
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--pb-ink-dim);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    .pb-canvas-host[b-pobrawl-arena]  .pb-train { top: 74px; max-width: 58%; font-size: 0.75rem; }
}

/* ── Result (the shared modal's summary slot) — theme surface, tokens. ── */
.pb-result[b-pobrawl-arena] {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
}

.pb-result-line[b-pobrawl-arena] {
    font-weight: 700;
}

.pb-result-facts[b-pobrawl-arena] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.pb-result-facts b[b-pobrawl-arena] {
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.pb-tabs[b-pobrawl-arena] {
    display: flex;
    gap: 4px;
    padding: 3px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--color-border);
}

.pb-tab[b-pobrawl-arena] {
    flex: 1;
    min-height: 36px;
    font: inherit;
    font-size: var(--text-sm);
    font-weight: 600;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.pb-tab:hover[b-pobrawl-arena] {
    color: var(--color-text-primary);
}

.pb-tab[aria-selected="true"][b-pobrawl-arena] {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.pb-tab:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.pb-tabpanel[b-pobrawl-arena] {
    text-align: left;
}

/* Recap: mirrored bars, P1 green from the left, the other corner red from the right. */
.pb-rc-names[b-pobrawl-arena] {
    display: flex;
    justify-content: space-between;
    padding-left: calc(6.5rem + 8px);
    gap: 12px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* The modal is outside .pb-wrap, so no --pb-* tokens here: the corner colours, darkened in
   the light scheme to hold 4.5:1 on the card. */
.pb-rc-p1[b-pobrawl-arena] {
    color: light-dark(#15803d, #86efac);
}

.pb-rc-p2[b-pobrawl-arena] {
    color: light-dark(#b91c1c, #fca5a5);
    text-align: right;
}

.pb-rc-rows[b-pobrawl-arena] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

/* One line per stat: its label, then the two values either side of the shared track. */
.pb-rc-row[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: 6.5rem 3ch minmax(0, 1fr) 3ch;
    grid-template-areas: "label v1 track v2";
    align-items: center;
    column-gap: 8px;
}

.pb-rc-label[b-pobrawl-arena] {
    grid-area: label;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.pb-rc-v[b-pobrawl-arena] {
    font-variant-numeric: tabular-nums;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.pb-rc-v--p1[b-pobrawl-arena] {
    grid-area: v1;
}

.pb-rc-v--p2[b-pobrawl-arena] {
    grid-area: v2;
    text-align: right;
}

.pb-rc-v--lead[b-pobrawl-arena] {
    font-weight: 800;
    color: var(--color-text-primary);
}

.pb-rc-track[b-pobrawl-arena] {
    grid-area: track;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, #22c55e var(--left, 50%), #ef4444 var(--left, 50%));
}

/* ── Post-fight press conference (a result tab) ── */
.pb-presser[b-pobrawl-arena] {
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    border: 1px solid var(--color-border);
    text-align: left;
}

.pb-presser-line[b-pobrawl-arena] {
    margin: 0;
    font-size: var(--text-base);
    font-style: italic;
    color: var(--color-text-primary);
}

.pb-presser-who[b-pobrawl-arena] {
    margin-top: 4px;
    text-align: right;
    font-size: var(--text-sm);
    color: var(--accent-ink);
}

/* ── Intro card (1P + 2P) ──────────────────────────────────────────────
   GameIntro is shared; .pb-intro (display: contents) is this page's handle on it. */
.pb-intro[b-pobrawl-arena] {
    display: contents;
}

/* A phone on its side: the rung card keeps its head (rung, next stop, votes) and drops the
   state board; the dossier keeps who and how they fight. */
@media (max-height: 560px) {
    .pb-scout[b-pobrawl-arena]  .pbm-board,
    .pb-scout[b-pobrawl-arena]  .pbd-summary,
    .pb-scout[b-pobrawl-arena]  .pbd-source {
        display: none;
    }
}

/* The shared card does the layout (GameIntro Wide: controls beside the setup). The 2P select
   only needs more width on a desktop for its portrait grid. */
@media (min-width: 1024px) {
    .pb-intro[b-pobrawl-arena]  .gps-intro-card--twoplayer.gps-intro-card--wide {
        width: min(94vw, 1180px);
    }
}

/* ── 2P select: holo-glass cards (the side lock toggles) over one shared 4×4 grid ──
   Theme surface — tokens. P1 is the HUD's green corner, P2 its red one.
   Live portraits (selectStage.js): ONE canvas over this block paints each president into
   the .pb-select-portrait / .pb-select-hero rects. Paint order inside the isolated block:
   glass layer (::before, z 0) → canvas (z 1) → names, glare (z 2) → marks, seal (z 3).
   That only holds while tiles and side cards are NOT stacking contexts themselves — so no
   transform, opacity, filter or backdrop-filter on the buttons; the glass blur lives on
   their ::before. Low tier, or no WebGL2 (data-stage="off"), drops the portrait slots and
   the tiles fall back to plain glass buttons. */
.pb-select[b-pobrawl-arena] {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-radius: var(--radius-md);
    /* Corner glows for the frosted cards to blur — glass over a flat card reads as nothing. */
    background:
        radial-gradient(55% 40% at 10% 6%, color-mix(in srgb, var(--accent-success) 20%, transparent), transparent 72%),
        radial-gradient(55% 40% at 90% 6%, color-mix(in srgb, var(--accent-danger, var(--accent-warning)) 20%, transparent), transparent 72%),
        radial-gradient(70% 45% at 50% 70%, color-mix(in srgb, var(--color-accent) 12%, transparent), transparent 75%);
}

.pb-select[b-pobrawl-arena]  .pb-select-gl {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.pb-select-sides[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
}

.pb-select-vs[b-pobrawl-arena] {
    font-family: var(--pb-display);
    font-size: 1.35rem;
    color: var(--color-text-secondary);
    text-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 45%, transparent);
}

/* The glass: shared by the side cards and the tiles. */
.pb-select-side[b-pobrawl-arena],
.pb-select-tile[b-pobrawl-arena] {
    position: relative;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    background: transparent;
    color: var(--color-text-primary);
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: var(--glass-inner), 0 4px 14px rgba(0, 0, 0, 0.16);
}

.pb-select-side[b-pobrawl-arena]::before,
.pb-select-tile[b-pobrawl-arena]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--color-text-primary) 8%, transparent), transparent 55%),
        color-mix(in srgb, var(--color-surface-hover) 72%, transparent);
    backdrop-filter: var(--glass-1);
    -webkit-backdrop-filter: var(--glass-1);
}

/* Glare above the render: the pointer's specular (--mx/--my from selectStage.js) and a
   light sweep across the pane on hover. */
.pb-select-side[b-pobrawl-arena]::after,
.pb-select-tile[b-pobrawl-arena]::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 25%), rgba(255, 255, 255, 0.24), transparent 46%),
        linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.3) 50%, transparent 62%);
    background-size: 100% 100%, 260% 100%;
    background-position: 0 0, 120% 0;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.2s ease, background-position 0s;
}

.pb-select-side:hover[b-pobrawl-arena]::after,
.pb-select-tile:hover[b-pobrawl-arena]::after,
.pb-select-tile:focus-visible[b-pobrawl-arena]::after {
    opacity: 1;
    background-position: 0 0, -20% 0;
    transition: opacity 0.2s ease, background-position 0.7s ease-out;
}

:root[data-motion='reduce'] .pb-select-side[b-pobrawl-arena]::after,
:root[data-motion='reduce'] .pb-select-tile[b-pobrawl-arena]::after {
    background-image: radial-gradient(circle at var(--mx, 50%) var(--my, 25%), rgba(255, 255, 255, 0.2), transparent 46%);
    transition: none;
}

@media (prefers-reduced-transparency: reduce) {
    .pb-select-side[b-pobrawl-arena]::before,
    .pb-select-tile[b-pobrawl-arena]::before {
        background: var(--color-surface-hover);
    }
}

.pb-select-side:focus-visible[b-pobrawl-arena],
.pb-select-tile:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Everything inside a card sits on the glass. */
.pb-select-who[b-pobrawl-arena],
.pb-select-plate[b-pobrawl-arena],
.pb-select-name[b-pobrawl-arena] {
    position: relative;
    z-index: 2;
}

/* ── Side cards: the lock toggles, and the hero render ── */
.pb-select-side[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 44px;
    padding: 0.45rem 0.5rem;
}

.pb-select-side--p1[b-pobrawl-arena] { border-color: var(--accent-success); }
.pb-select-side--p2[b-pobrawl-arena] { border-color: var(--accent-danger, var(--accent-warning)); }

.pb-select-side--locked[b-pobrawl-arena]::before {
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--color-text-primary) 8%, transparent), transparent 55%),
        var(--accent-success-soft),
        color-mix(in srgb, var(--color-surface-hover) 72%, transparent);
}

.pb-select-side--p1.pb-select-side--locked[b-pobrawl-arena] { box-shadow: var(--glass-inner), 0 0 18px color-mix(in srgb, var(--accent-success) 45%, transparent); }
.pb-select-side--p2.pb-select-side--locked[b-pobrawl-arena] { box-shadow: var(--glass-inner), 0 0 18px color-mix(in srgb, var(--accent-danger, var(--accent-warning)) 45%, transparent); }

.pb-select-who[b-pobrawl-arena] {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
}

/* Without the hero the plate is just its two lines, as before. */
.pb-select-plate[b-pobrawl-arena] {
    display: contents;
}

.pb-select-pick[b-pobrawl-arena] {
    position: relative;
    z-index: 2;
    font-family: var(--pb-display);
    font-size: clamp(0.95rem, 3.4vw, 1.15rem);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pb-select-state[b-pobrawl-arena] {
    position: relative;
    z-index: 2;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--color-text-secondary);
}

.pb-select-side--locked .pb-select-state[b-pobrawl-arena] {
    color: var(--accent-success-ink);
}

.pb-select-hero[b-pobrawl-arena],
.pb-select-portrait[b-pobrawl-arena] {
    display: none;
}

/* The presidential seal: stamps down on lock-in. */
.pb-select-seal[b-pobrawl-arena] {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 6px;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    pointer-events: none;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
    transform: rotate(-14deg);
    animation: pb-seal-stamp-b-pobrawl-arena 0.42s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

.pb-select-side--p2 .pb-select-seal[b-pobrawl-arena] {
    right: auto;
    left: 6px;
    transform: rotate(12deg);
    animation-name: pb-seal-stamp-p2-b-pobrawl-arena;
}

.pb-select-seal[b-pobrawl-arena]  svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* The ink ring the stamp leaves as it lands. */
.pb-select-seal[b-pobrawl-arena]::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 3px solid var(--pb-gold);
    opacity: 0;
    animation: pb-seal-ring-b-pobrawl-arena 0.5s ease-out 0.16s both;
}

@keyframes pb-seal-stamp-b-pobrawl-arena {
    0% { opacity: 0; transform: scale(2.6) rotate(-40deg); }
    55% { opacity: 1; transform: scale(0.88) rotate(-12deg); }
    100% { opacity: 1; transform: scale(1) rotate(-14deg); }
}

@keyframes pb-seal-stamp-p2-b-pobrawl-arena {
    0% { opacity: 0; transform: scale(2.6) rotate(38deg); }
    55% { opacity: 1; transform: scale(0.88) rotate(14deg); }
    100% { opacity: 1; transform: scale(1) rotate(12deg); }
}

@keyframes pb-seal-ring-b-pobrawl-arena {
    0% { opacity: 0.85; transform: scale(0.7); }
    100% { opacity: 0; transform: scale(1.5); }
}

:root[data-motion='reduce'] .pb-select-seal[b-pobrawl-arena],
:root[data-motion='reduce'] .pb-select-seal[b-pobrawl-arena]::after {
    animation: none;
}

.pb-select-prompt[b-pobrawl-arena] {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.pb-select-grid[b-pobrawl-arena] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* Four across — PoBrawlPage.SelectColumns, which the W/S and ↑/↓ keys step by. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.pb-select-tile[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0.35rem 0.25rem;
    font-size: clamp(0.75rem, 2.9vw, 0.9rem);
}

.pb-select-tile:hover[b-pobrawl-arena] {
    border-color: var(--color-accent);
}

.pb-select-name[b-pobrawl-arena] {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pb-select-tile--p1[b-pobrawl-arena] { border-color: var(--accent-success); }
.pb-select-tile--p2[b-pobrawl-arena] { border-color: var(--accent-danger, var(--accent-warning)); }

/* Both cursors on one tile: split the ring. */
.pb-select-tile--p1.pb-select-tile--p2[b-pobrawl-arena] {
    border-color: var(--accent-success) var(--accent-danger, var(--accent-warning)) var(--accent-danger, var(--accent-warning)) var(--accent-success);
}

.pb-select-mark[b-pobrawl-arena] {
    position: absolute;
    z-index: 3;
    top: -7px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 14px;
    color: var(--color-surface);
}

.pb-select-mark--p1[b-pobrawl-arena] { left: 4px; background: var(--accent-success); }
.pb-select-mark--p2[b-pobrawl-arena] { right: 4px; background: var(--accent-danger, var(--accent-warning)); }

/* ── Live portraits (not on the low tier, not when the stage reported no WebGL2) ──
   The slots are sized up front, so the canvas arriving moves nothing. */
:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-portrait[b-pobrawl-arena],
:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-hero[b-pobrawl-arena] {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: calc(var(--radius-md) - 2px);
    pointer-events: none;
    /* A floor spotlight under the render (and the placeholder until it paints). */
    background: radial-gradient(60% 55% at 50% 100%, color-mix(in srgb, var(--color-text-primary) 12%, transparent), transparent 75%);
}

/* The heroes stand in their corner's light. */
:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-side--p1 .pb-select-hero[b-pobrawl-arena] {
    background:
        radial-gradient(45% 70% at 30% 45%, color-mix(in srgb, var(--accent-success) 26%, transparent), transparent 75%),
        radial-gradient(60% 55% at 50% 100%, color-mix(in srgb, var(--color-text-primary) 12%, transparent), transparent 75%);
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-side--p2 .pb-select-hero[b-pobrawl-arena] {
    background:
        radial-gradient(45% 70% at 70% 45%, color-mix(in srgb, var(--accent-danger, var(--accent-warning)) 26%, transparent), transparent 75%),
        radial-gradient(60% 55% at 50% 100%, color-mix(in srgb, var(--color-text-primary) 12%, transparent), transparent 75%);
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-tile[b-pobrawl-arena] {
    justify-content: flex-end;
    min-height: 78px;
    padding: 0;
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-name[b-pobrawl-arena] {
    padding: 8px 4px 3px;
    font-weight: 700;
    border-radius: 0 0 calc(var(--radius-md) - 2px) calc(var(--radius-md) - 2px);
    background: linear-gradient(to top, color-mix(in srgb, var(--color-surface) 90%, transparent) 50%, transparent);
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-side[b-pobrawl-arena] {
    justify-content: space-between;
    min-height: 136px;
    padding: 0;
    overflow: hidden;
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-who[b-pobrawl-arena] {
    align-self: flex-start;
    margin: 6px 8px 0;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--color-surface) 78%, transparent);
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-side--p2 .pb-select-who[b-pobrawl-arena] {
    align-self: flex-end;
}

:root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-plate[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: stretch;
    padding: 12px 6px 5px;
    background: linear-gradient(to top, color-mix(in srgb, var(--color-surface) 90%, transparent) 55%, transparent);
}

@media (max-width: 520px) {
    :root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-tile[b-pobrawl-arena] {
        min-height: 68px;
    }

    :root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-side[b-pobrawl-arena] {
        min-height: 116px;
    }

    .pb-select-seal[b-pobrawl-arena] {
        width: 38px;
        height: 38px;
        margin-top: -19px;
    }
}

/* A short screen (1366×768 and the like): the 2P card has to fit whole, Dossiers row
   included, without scrolling — shorter tiles and side cards, tighter gaps. */
@media (max-height: 860px) {
    .pb-select[b-pobrawl-arena] {
        gap: 0.4rem;
    }

    .pb-select-grid[b-pobrawl-arena] {
        gap: 5px;
    }

    /* Five roster rows must fit above the footer at 1280x720; keep 44px touch targets. */
    :root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-tile[b-pobrawl-arena] {
        min-height: 44px;
    }

    :root:not([data-gfx='low']) .pb-select:not([data-stage='off']) .pb-select-side[b-pobrawl-arena] {
        min-height: 96px;
    }

    .pb-dossier-disclosure[b-pobrawl-arena] {
        margin-top: 2px;
    }
}

/* ── VS slash: both corners locked (selectStage.js appends it to the overlay, so it
   crosses the whole screen; DOM-only, reduced motion never creates it). Over the dark
   overlay scrim in both schemes, hence the arena's own --pb-* colours. */
.pb-intro[b-pobrawl-arena]  .pb-vs-slash {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
}

.pb-intro[b-pobrawl-arena]  .pb-vs-slash-band {
    position: absolute;
    left: -25%;
    right: -25%;
    top: 50%;
    height: clamp(90px, 18vh, 160px);
    margin-top: calc(clamp(90px, 18vh, 160px) / -2);
    background: linear-gradient(90deg, transparent, var(--pb-p1) 18%, var(--pb-white) 50%, var(--pb-p2) 82%, transparent);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.45);
    animation: pb-vs-slash-b-pobrawl-arena 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pb-intro[b-pobrawl-arena]  .pb-vs-slash-word {
    position: relative;
    font-family: var(--pb-display);
    font-size: clamp(4rem, 20vw, 9rem);
    line-height: 1;
    color: var(--pb-gold);
    -webkit-text-stroke: 3px #1a1206;
    paint-order: stroke fill;
    text-shadow: 0 6px 0 #1a1206, 0 0 30px rgba(255, 209, 102, 0.7);
    animation: pb-vs-word-b-pobrawl-arena 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes pb-vs-slash-b-pobrawl-arena {
    0% { opacity: 1; transform: rotate(-14deg) translateX(-120%) scaleY(0.25); }
    38% { opacity: 1; transform: rotate(-14deg) translateX(0) scaleY(1); }
    72% { opacity: 0.9; transform: rotate(-14deg) translateX(0) scaleY(0.85); }
    100% { opacity: 0; transform: rotate(-14deg) translateX(18%) scaleY(0.05); }
}

@keyframes pb-vs-word-b-pobrawl-arena {
    0% { opacity: 0; transform: scale(2.4) rotate(-20deg); }
    32% { opacity: 1; transform: scale(1) rotate(-8deg); }
    78% { opacity: 1; transform: scale(1.04) rotate(-8deg); }
    100% { opacity: 0; transform: scale(1.18) rotate(-8deg); }
}


/* ── Instant replay (replay.js) ──────────────────────────────────────
   Engine DOM over the 3D view between the KO fall and the result: the
   seal wipe, the broadcast bug, scanlines and the telestrator. Never takes
   a click (any key or tap skips it, handled on window). */
.pb-canvas-host[b-pobrawl-arena]  .pb-rp {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp[hidden] {
    display: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__grade,
.pb-canvas-host[b-pobrawl-arena]  .pb-rp__bug,
.pb-canvas-host[b-pobrawl-arena]  .pb-rp__skip {
    visibility: hidden;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--on .pb-rp__grade,
.pb-canvas-host[b-pobrawl-arena]  .pb-rp--on .pb-rp__bug,
.pb-canvas-host[b-pobrawl-arena]  .pb-rp--on .pb-rp__skip {
    visibility: visible;
}

/* Tape look: fine scanlines and a cool edge, toggled under the seal. */
.pb-canvas-host[b-pobrawl-arena]  .pb-rp__grade {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.13) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at center, transparent 58%, rgba(8, 18, 44, 0.42));
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__bug {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px 6px 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(14, 28, 66, 0.92), rgba(8, 15, 38, 0.92));
    border: 2px solid #d4a937;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    color: #f4e3b0;
    font-family: Impact, 'Arial Black', var(--pb-display, sans-serif);
    letter-spacing: 0.08em;
    animation: pb-rp-bug-in-b-pobrawl-arena 0.4s cubic-bezier(.2, .9, .2, 1) both;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__bug-seal {
    display: block;
    width: 44px;
    height: 44px;
    animation: pb-rp-spin-b-pobrawl-arena 6s linear infinite;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__bug-seal svg {
    display: block;
    width: 100%;
    height: 100%;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__bug-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__bug-text b {
    font-size: 1.15rem;
    font-weight: 400;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__speed {
    font-size: 0.72rem;
    color: #ffd23f;
    visibility: hidden;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--slow .pb-rp__speed {
    visibility: visible;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__skip {
    position: absolute;
    right: 14px;
    bottom: 18px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(6, 10, 22, 0.6);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

/* Telestrator: a hand-drawn ring and arrow, stroked on around the impact. */
.pb-canvas-host[b-pobrawl-arena]  .pb-rp__tele-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    visibility: hidden;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--tele .pb-rp__tele-svg {
    visibility: visible;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__tele path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1 2;
    stroke-dashoffset: 1;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__ink {
    stroke: rgba(10, 6, 0, 0.55);
    stroke-width: 10px;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__pen {
    stroke: #ffd23f;
    stroke-width: 5px;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--tele .pb-rp__ring {
    animation: pb-rp-draw-b-pobrawl-arena 0.45s cubic-bezier(.45, 0, .2, 1) forwards;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--tele .pb-rp__arrow {
    animation: pb-rp-draw-b-pobrawl-arena 0.28s cubic-bezier(.45, 0, .2, 1) 0.42s forwards;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--tele .pb-rp__head {
    animation: pb-rp-draw-b-pobrawl-arena 0.16s ease-out 0.68s forwards;
}

/* Seal wipe: grows out of the centre spinning until it covers the frame,
   then shrinks away; replay.js swaps the picture while it is covered. */
.pb-canvas-host[b-pobrawl-arena]  .pb-rp__wipe {
    position: absolute;
    inset: 0;
    visibility: hidden;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--wipe .pb-rp__wipe {
    visibility: visible;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__seal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 170vmax;
    height: 170vmax;
    transform: translate(-50%, -50%) scale(0);
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp__seal svg {
    display: block;
    width: 100%;
    height: 100%;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--wipe .pb-rp__seal {
    animation: pb-rp-seal-b-pobrawl-arena 0.6s both;
}

/* Reduced motion: straight cuts, nothing spins or draws on. */
.pb-canvas-host[b-pobrawl-arena]  .pb-rp--calm .pb-rp__bug,
.pb-canvas-host[b-pobrawl-arena]  .pb-rp--calm .pb-rp__bug-seal,
.pb-canvas-host[b-pobrawl-arena]  .pb-rp--calm .pb-rp__tele path {
    animation: none;
}

.pb-canvas-host[b-pobrawl-arena]  .pb-rp--calm .pb-rp__tele path {
    stroke-dashoffset: 0;
}

@keyframes pb-rp-seal-b-pobrawl-arena {
    0% { transform: translate(-50%, -50%) scale(0.01) rotate(-300deg); animation-timing-function: cubic-bezier(.5, 0, .25, 1); }
    50% { transform: translate(-50%, -50%) scale(1) rotate(0deg); animation-timing-function: cubic-bezier(.75, 0, .5, 1); }
    100% { transform: translate(-50%, -50%) scale(0) rotate(300deg); }
}

@keyframes pb-rp-draw-b-pobrawl-arena {
    to { stroke-dashoffset: 0; }
}

@keyframes pb-rp-spin-b-pobrawl-arena {
    to { transform: rotate(360deg); }
}

@keyframes pb-rp-bug-in-b-pobrawl-arena {
    from { transform: translateX(-120%); }
    to { transform: none; }
}

/* Result glass (resultGlass.js): the frozen, frosted frame and the glass slab
   under the result modal. Inserted straight after the WebGL canvas (under a
   still-falling shatter), so like .pb-shatter it needs no z-index. */
.pb-canvas-host[b-pobrawl-arena]  .pb-glass {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
/* /Features/PoBrawl/PoBrawlTournamentPage.razor.rz.scp.css */
/* Brawl tournament. Shares PoBrawlPage's CSS scope (CssScope in PoMiniGamesClient.csproj), so
   .pb-wrap, .pb-canvas-host, .pb-top, .pb-seg, .pb-recap, .pb-ending and every --pb-* token come
   from PoBrawlPage.razor.css. Only the tournament's own pieces live here: the controls in the
   shell's options drawer, the bracket hub inside the Tab diagnostics panel, and the draw preview
   / standings (theme surfaces — app tokens). */

/* ── Controls: the shell's options drawer (the gear beside the title) ── */
.pt-controls[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pt-controls-row[b-pobrawl-arena] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.pt-controls-label[b-pobrawl-arena] {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-text-secondary);
}

/* The three speeds as one segmented pill. */
.pt-speed[b-pobrawl-arena] {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 12, 28, 0.72);
    backdrop-filter: blur(var(--gfx-blur, 6px));
}

.pt-speed-btn[b-pobrawl-arena] {
    min-width: 40px;
    min-height: 34px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--pb-seg-ink);
    cursor: pointer;
}

.pt-speed-btn[aria-pressed="true"][b-pobrawl-arena] {
    background: var(--pb-gold);
    color: var(--pb-versus-ink);
}

.pt-speed-btn:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--pb-gold);
    outline-offset: 2px;
}

/* The camera button: the shared .pb-seg glass, at a 40px target. */
.pt-btn[b-pobrawl-arena] {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.85rem;
}

/* ── Bracket hub: the tournament views inside the Tab diagnostics panel. The panel is a narrow
   dock, so the board keeps its own geometry and scrolls sideways instead of collapsing. ── */
.pt-hub[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 10px 10px;
    border-radius: 10px;
    /* The bracket's --pb-* ink is scheme-invariant arena colour, so it needs the arena's dark
       surface under it — the diagnostics panel is a theme surface and goes light in light mode. */
    background: rgba(8, 12, 28, 0.92);
    color: var(--pb-card-ink);
    container-type: inline-size;
}

.pt-tabpanel[b-pobrawl-arena] {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.pt-tabpanel > .pt-bracket[b-pobrawl-arena] {
    min-width: 46rem;
}

.pt-tabs[b-pobrawl-arena] {
    flex: 1;
    display: flex;
    gap: 4px;
    padding: 3px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
}

.pt-tab[b-pobrawl-arena] {
    flex: 1;
    min-height: 36px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--pb-ink-dim);
    cursor: pointer;
}

.pt-tab[aria-selected="true"][b-pobrawl-arena] {
    background: var(--pb-gold);
    color: var(--pb-versus-ink);
}

.pt-tab:focus-visible[b-pobrawl-arena] {
    outline: 2px solid var(--pb-gold);
    outline-offset: 2px;
}

.pt-hq-link[b-pobrawl-arena] {
    display: inline-flex;
    align-self: center;
    align-items: center;
    min-height: 32px;
    color: var(--pb-gold);
    font-weight: 600;
    text-decoration: none;
}

.pt-hq-link:hover[b-pobrawl-arena] {
    text-decoration: underline;
}

.pt-panel-news[b-pobrawl-arena] {
    margin: 0;
    font-weight: 700;
    color: var(--pb-gold);
    text-align: center;
}

/* An upset gets a red stamp that thumps down onto the news line. */
.pt-upset-tag[b-pobrawl-arena] {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 8px;
    border-radius: 6px;
    border: 2px solid #ff8a7a;
    background: #b3262c;
    color: #fff;
    font-family: var(--pb-display);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    transform: rotate(-3deg);
    animation: pt-stamp-b-pobrawl-arena 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.2s backwards;
}

@keyframes pt-stamp-b-pobrawl-arena {
    from {
        opacity: 0;
        transform: scale(2.4) rotate(-12deg);
    }
}

.pt-panel-next[b-pobrawl-arena] {
    margin: 0;
    text-align: center;
    color: var(--pb-ink-soft);
}

/* The next bout's two dossiers (PoBrawlDossierCard, compact) under the bracket. */
.pt-dossiers[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

/* The board: four bout rounds and the champion on a fixed grid, with a 1rem wire column between each.
   Every bout row is 4.8rem with a 0.5rem gap, so a bout's centre sits at a known height;
   the page's Wires() draws its SVG paths to exactly these numbers (in 0.1rem units).
   Change them together. */
.pt-bracket[b-pobrawl-arena] {
    display: grid;
    grid-template-columns:
        minmax(7rem, 1fr) 1rem minmax(7rem, 1fr) 1rem minmax(7rem, 1fr) 1rem minmax(7rem, 1fr) 1rem minmax(8rem, 0.8fr);
    grid-template-rows: auto repeat(8, 4.8rem);
    row-gap: 0.5rem;
    align-items: center;
}

.pt-slot[b-pobrawl-arena] {
    min-width: 0;
}

.pt-col-head[b-pobrawl-arena] {
    grid-row: 1;
    margin: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pb-ink-dim);
    text-align: center;
}

.pt-bout[b-pobrawl-arena] {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

/* Wires: dim until a bout is decided, then the winner's burns gold toward the next round. */
.pt-wire-cell[b-pobrawl-arena] {
    align-self: stretch;
    position: relative;
}

.pt-wire[b-pobrawl-arena] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.pt-wire-base[b-pobrawl-arena] {
    fill: none;
    stroke: rgba(160, 176, 220, 0.32);
    stroke-width: 1.5;
}

.pt-wire-lit[b-pobrawl-arena] {
    fill: none;
    stroke: var(--pb-gold);
    stroke-width: 2.6;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 2px rgba(255, 190, 80, 0.85));
}

.pt-wire-lit--fresh[b-pobrawl-arena] {
    animation: pt-burn-b-pobrawl-arena 1.1s cubic-bezier(0.45, 0, 0.55, 1) 0.35s backwards;
}

@keyframes pt-burn-b-pobrawl-arena {
    from { stroke-dashoffset: 1; }
}

.pt-spark[b-pobrawl-arena] {
    fill: #fffbe8;
    filter: drop-shadow(0 0 3px #ffb02e) drop-shadow(0 0 6px rgba(255, 140, 40, 0.8));
}

/* The loser's card cracks like the result screen's glass, shakes, and fades back. The crack
   stays faintly on every eliminated card; only the fresh one plays it in. */
.pt-corner[b-pobrawl-arena] {
    position: relative;
}

.pt-corner--out[b-pobrawl-arena]::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.55;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 9L13 11L21 5L30 12L43 8L51 14L62 7L70 11L82 4L100 10M43 8L46 0M62 7L59 20M21 5L17 0M82 4L88 20' fill='none' stroke='white' stroke-width='1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.pt-corner--fresh.pt-corner--out[b-pobrawl-arena] {
    animation: pt-crack-shake-b-pobrawl-arena 0.5s ease-out 0.2s backwards;
}

.pt-corner--fresh.pt-corner--out[b-pobrawl-arena]::after {
    animation: pt-crack-b-pobrawl-arena 0.28s ease-out 0.2s backwards;
}

@keyframes pt-crack-b-pobrawl-arena {
    from {
        opacity: 1;
        clip-path: inset(0 100% 0 0);
    }
}

@keyframes pt-crack-shake-b-pobrawl-arena {
    0% { opacity: 1; transform: none; }
    20% { transform: translateX(-3px) rotate(-0.8deg); }
    40% { transform: translateX(3px) rotate(0.6deg); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(1px); }
}

/* The winner's name lands in the next round as the burn arrives. */
.pt-corner--arrive > *[b-pobrawl-arena] {
    animation: pt-arrive-b-pobrawl-arena 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 1.35s backwards;
}

@keyframes pt-arrive-b-pobrawl-arena {
    from {
        opacity: 0;
        transform: translateX(-12px);
        text-shadow: 0 0 10px var(--pb-gold);
    }
}

/* Odometer: one wheel per digit place, rolling from the old Elo to the new. */
.pt-odo[b-pobrawl-arena] {
    display: inline-flex;
    vertical-align: bottom;
}

.pt-odo-d[b-pobrawl-arena] {
    display: inline-block;
    height: 1.2em;
    line-height: 1.2em;
    overflow: hidden;
}

.pt-odo-strip[b-pobrawl-arena] {
    display: flex;
    flex-direction: column;
    transform: translateY(var(--to));
}

.pt-odo-strip > span[b-pobrawl-arena] {
    height: 1.2em;
    white-space: pre;
}

.pt-odo--roll .pt-odo-strip[b-pobrawl-arena] {
    animation: pt-odo-b-pobrawl-arena 0.95s cubic-bezier(0.3, 0.7, 0.25, 1) 0.55s backwards;
}

@keyframes pt-odo-b-pobrawl-arena {
    from { transform: translateY(var(--from)); }
}

.pt-visually-hidden[b-pobrawl-arena] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Reduced motion (data-motion carries the OS preference too, see app.css): the result, not
   the show. Base styles are the end state, so dropping the animations leaves just that. */
:root[data-motion="reduce"] .pt-upset-tag[b-pobrawl-arena],
:root[data-motion="reduce"] .pt-wire-lit--fresh[b-pobrawl-arena],
:root[data-motion="reduce"] .pt-corner--fresh.pt-corner--out[b-pobrawl-arena],
:root[data-motion="reduce"] .pt-corner--fresh.pt-corner--out[b-pobrawl-arena]::after,
:root[data-motion="reduce"] .pt-corner--arrive > *[b-pobrawl-arena],
:root[data-motion="reduce"] .pt-odo--roll .pt-odo-strip[b-pobrawl-arena],
:root[data-motion="reduce"] .pt-champ--fresh[b-pobrawl-arena] {
    animation: none !important;
}

:root[data-motion="reduce"] .pt-spark[b-pobrawl-arena] {
    display: none;
}

.pt-bout--now[b-pobrawl-arena] {
    border-color: var(--pb-gold);
    box-shadow: 0 0 0 1px var(--pb-gold), 0 0 14px rgba(255, 209, 102, 0.35);
}

.pt-corner[b-pobrawl-arena] {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 5px 8px;
    font-size: 0.85rem;
}

.pt-corner + .pt-corner[b-pobrawl-arena] {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pt-corner-name[b-pobrawl-arena] {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.pt-corner-elo[b-pobrawl-arena] {
    font-variant-numeric: tabular-nums;
    color: var(--pb-ink-muted);
}

.pt-corner--win .pt-corner-name[b-pobrawl-arena] {
    color: var(--pb-gold);
}

.pt-corner--out[b-pobrawl-arena] {
    opacity: 0.6;
}

.pt-corner--out .pt-corner-name[b-pobrawl-arena] {
    text-decoration: line-through;
}

.pt-delta[b-pobrawl-arena] {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pt-hub .pt-delta--up[b-pobrawl-arena] { color: var(--pb-p1-light); }
.pt-hub .pt-delta--down[b-pobrawl-arena] { color: var(--pb-p2-light); }

.pt-bout-how[b-pobrawl-arena] {
    padding: 2px 8px 4px;
    font-size: 0.75rem;
    color: var(--pb-ink-dim);
    text-align: right;
}

.pt-champ[b-pobrawl-arena] {
    padding: 12px 8px;
    border-radius: 10px;
    text-align: center;
    font-family: var(--pb-display);
    font-size: 1.1rem;
    color: var(--pb-versus-ink);
    background: linear-gradient(135deg, var(--pb-seal-hi), var(--pb-gold) 55%, var(--pb-seal-lo));
}

.pt-champ--tbd[b-pobrawl-arena] {
    color: var(--pb-ink-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 209, 102, 0.35);
}

/* The belt's slot fills as the final's wire burns into it. */
.pt-champ--fresh[b-pobrawl-arena] {
    animation: pt-crown-b-pobrawl-arena 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) 1.35s backwards;
}

@keyframes pt-crown-b-pobrawl-arena {
    from {
        opacity: 0;
        transform: scale(0.6);
        box-shadow: 0 0 0 rgba(255, 209, 102, 0);
    }

    60% {
        box-shadow: 0 0 24px rgba(255, 209, 102, 0.9);
    }
}

/* ── Intro: the draw preview (theme surface — app tokens) ── */
.pt-draw[b-pobrawl-arena] {
    text-align: left;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
}

.pt-draw-head[b-pobrawl-arena] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pt-draw-title[b-pobrawl-arena] {
    font-family: var(--pb-display);
    font-size: 1.05rem;
    color: var(--accent-ink);
}

.pt-menu-bracket[b-pobrawl-arena] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
    margin-top: 8px;
}

.pt-menu-round[b-pobrawl-arena] {
    min-width: 0;
}

.pt-menu-round h4[b-pobrawl-arena] {
    margin: 0 0 4px;
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    text-align: center;
    text-transform: uppercase;
}

.pt-menu-round ol[b-pobrawl-arena] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 3px;
}

.pt-menu-bout[b-pobrawl-arena] {
    display: grid;
    gap: 2px;
    padding: 3px 4px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--surface-1);
    font-size: var(--text-xs);
}

.pt-menu-corner[b-pobrawl-arena] {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    min-width: 0;
}

.pt-menu-corner > span[b-pobrawl-arena] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-menu-corner small[b-pobrawl-arena] {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
}

.pt-draw-note[b-pobrawl-arena],
.pt-final-note[b-pobrawl-arena] {
    margin: 4px 0 0;
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

/* ── Result modal standings (theme surface) ── */
.pt-standings td.pt-delta--up[b-pobrawl-arena] { color: var(--accent-success-ink); }
.pt-standings td.pt-delta--down[b-pobrawl-arena] { color: var(--accent-danger-ink); }

.pt-final-note[b-pobrawl-arena] {
    text-align: center;
}

/* A phone: the controls stack, and the bracket hub keeps its own scroll. */
@media (max-width: 640px) {
    .pt-controls-row[b-pobrawl-arena] {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .pt-menu-bracket[b-pobrawl-arena] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* A narrow drawer (a phone, or a small desktop window): one column — the rounds stack in
   play order and the wires go (the cracks, the odometer and the arriving name still play). */
@container (max-width: 640px) {
    .pt-dossiers[b-pobrawl-arena] {
        grid-template-columns: 1fr;
    }

    .pt-bracket[b-pobrawl-arena] {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .pt-wire-cell[b-pobrawl-arena] {
        display: none;
    }

    .pt-col-head[b-pobrawl-arena] {
        margin-top: 4px;
    }
}

/* A phone on its side: the start card's draw keeps the pairings and drops its note. */
@media (max-height: 560px) {
    .pt-draw-note[b-pobrawl-arena] { display: none; }
}

/* Touch: the speed chips, tabs and the HQ link reach the 44px target on a coarse pointer
   (GAME-CONSISTENCY rule 8); a mouse keeps the slimmer controls. */
@media (pointer: coarse) {
    .pt-speed-btn[b-pobrawl-arena],
    .pt-btn[b-pobrawl-arena],
    .pt-tab[b-pobrawl-arena],
    .pt-hq-link[b-pobrawl-arena] {
        min-height: 44px;
    }

    .pt-speed-btn[b-pobrawl-arena] {
        min-width: 44px;
    }
}
/* /Features/PoCabinet/PoCabinetBroadcast.razor.rz.scp.css */
/* PoCabinetBroadcast — its own scoped styles (split from PoCabinetPage.razor.css). Shared
   bits (muted text, status lines, sector chips, screen-reader text) stay on the page as ::deep. */

/* ─── Demo broadcast (broadcast.js writes every text node and data-* state) ───
   TV graphics over the race: timing tower top left, callout top centre, caption bottom left,
   the frame round the scene's picture-in-picture bottom right. Scheme-invariant like the
   rest of the canvas overlays: what sits behind them is the race, not the page. */
.pocabinet-bc[b-5ghhmq46e9] {
    --bc-panel: rgba(8, 12, 24, 0.8);
    --bc-row: rgba(255, 255, 255, 0.06);
    --bc-text: #ffffff;
    --bc-muted: rgba(255, 255, 255, 0.72);
    --bc-focus: #ffd23f;
    --bc-live: #ff3b3b;
    --bc-out: #ff6b5e;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: var(--pocabinet-canvas-h);
    pointer-events: none;
    z-index: 3;
    color: var(--bc-text);
    font-variant-numeric: tabular-nums;
}

.pocabinet-bc__tower[b-5ghhmq46e9] {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    width: calc(12.5rem * var(--pocabinet-hud, 1));
    font-size: calc(0.8rem * var(--pocabinet-hud, 1));
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 45%, rgba(0, 0, 0, 0.16)), var(--bc-panel);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 30px rgba(0, 0, 0, 0.42);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
    backdrop-filter: blur(14px) saturate(145%);
    overflow: hidden;
}

.pocabinet-bc__head[b-5ghhmq46e9] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.08);
}

.pocabinet-bc__live[b-5ghhmq46e9] {
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    background: var(--bc-live);
    font-size: max(12px, 0.85em);
}

.pocabinet-bc__live[b-5ghhmq46e9]::before {
    content: "";
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    margin-right: 0.3em;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 0.1em;
    animation: pocabinet-bc-blink-b-5ghhmq46e9 1.4s steps(2, jump-none) infinite;
}

/* Where the race is (Blazor's text; the demo's old "Live from…" strip under the view). */
.pocabinet-bc__venue[b-5ghhmq46e9] {
    padding: 0.2rem 0.6rem;
    font-weight: 600;
    color: var(--bc-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.25;
}

/* The top ten's box is held from the first render (broadcast.js fills the rows a beat after
   the race starts), so the tower does not grow down the screen as they land. */
.pocabinet-bc__rows[b-5ghhmq46e9] {
    list-style: none;
    margin: 0;
    padding: 0.2rem 0;
    min-height: calc(10 * (1.35em + 0.2rem) + 0.4rem);
}

/* The tower fades in rather than popping in over the first frames. */
.pocabinet-bc__tower[b-5ghhmq46e9] {
    animation: pocabinet-bc-fade-b-5ghhmq46e9 0.45s ease 0.25s both;
}

.pocabinet-bc__row[b-5ghhmq46e9] {
    display: grid;
    grid-template-columns: 1.7em 0.3em minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45em;
    padding: 0.1rem 0.6rem;
    line-height: 1.35;
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.28s ease;
    will-change: transform;
}

.pocabinet-bc__row[data-move="up"][b-5ghhmq46e9] {
    background: rgba(46, 204, 113, 0.18);
}

.pocabinet-bc__row[data-move="down"][b-5ghhmq46e9] {
    background: rgba(255, 90, 90, 0.14);
}

.pocabinet-bc__row:nth-child(even)[b-5ghhmq46e9] { background: var(--bc-row); }

.pocabinet-bc__row[data-state="off"][b-5ghhmq46e9] { display: none; }

/* The gap between the top ten and the car on screen further back. */
.pocabinet-bc__row[data-state="sep"][b-5ghhmq46e9] {
    display: block;
    height: 0.7em;
    background: none;
}

.pocabinet-bc__row[data-state="sep"][b-5ghhmq46e9]::before {
    content: "···";
    display: block;
    text-align: center;
    line-height: 0.4;
    color: var(--bc-muted);
}

.pocabinet-bc__row[data-focus="on"][b-5ghhmq46e9] {
    background: rgba(255, 210, 63, 0.18);
    box-shadow: inset 3px 0 0 var(--bc-focus);
}

.pocabinet-bc__rpos[b-5ghhmq46e9] {
    text-align: right;
    font-weight: 800;
}

.pocabinet-bc__rchip[b-5ghhmq46e9] {
    height: 1em;
    border-radius: 2px;
}

.pocabinet-bc__rcode[b-5ghhmq46e9] {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pocabinet-bc__rgap[b-5ghhmq46e9] {
    color: var(--bc-muted);
    text-align: right;
}

.pocabinet-bc__row[data-out="on"] .pocabinet-bc__rcode[b-5ghhmq46e9] { opacity: 0.55; text-decoration: line-through; }

.pocabinet-bc__row[data-out="on"] .pocabinet-bc__rgap[b-5ghhmq46e9] { color: var(--bc-out); font-weight: 700; }

/* Callout: a coloured tag for what happened, then the line. */
.pocabinet-bc__callout[b-5ghhmq46e9] {
    position: absolute;
    top: 0.9rem;
    left: 50%;
    display: flex;
    align-items: stretch;
    max-width: min(46%, 32rem);
    font-size: calc(0.95rem * var(--pocabinet-hud, 1));
    background: var(--bc-panel);
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    opacity: 0;
    transform: translate(-50%, -0.6rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pocabinet-bc__callout[data-show="on"][b-5ghhmq46e9] {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pocabinet-bc__callout[data-show="on"] .pocabinet-bc__ct[b-5ghhmq46e9] {
    animation: pocabinet-bc-wipe-b-5ghhmq46e9 0.45s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.pocabinet-bc__ck[b-5ghhmq46e9] {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    color: #10131c;
    background: var(--bc-focus);
}

.pocabinet-bc__callout[data-kind="overtake"] .pocabinet-bc__ck[b-5ghhmq46e9] { background: #4cc3ff; }

.pocabinet-bc__callout[data-kind="fastest"] .pocabinet-bc__ck[b-5ghhmq46e9] { background: #b884ff; }

.pocabinet-bc__callout[data-kind="wreck"] .pocabinet-bc__ck[b-5ghhmq46e9] { background: var(--bc-out); }

.pocabinet-bc__callout[data-kind="final"] .pocabinet-bc__ck[b-5ghhmq46e9] { background: #ff9f43; }

.pocabinet-bc__callout[data-kind="flag"] .pocabinet-bc__ck[b-5ghhmq46e9] {
    background: repeating-conic-gradient(#10131c 0 25%, #ffffff 0 50%) 0 0 / 0.7rem 0.7rem;
    color: #ffffff;
    text-shadow: 0 0 3px #10131c, 0 0 6px #10131c;
}

.pocabinet-bc__ct[b-5ghhmq46e9] {
    padding: 0.35rem 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Caption (lower third): the car on screen. */
.pocabinet-bc__lower[b-5ghhmq46e9] {
    position: absolute;
    left: 0.7rem;
    bottom: 0.8rem;
    display: grid;
    gap: 0.15rem;
    min-width: calc(15rem * var(--pocabinet-hud, 1));
    max-width: min(46%, 26rem);
    padding: 0.45rem 0.8rem 0.5rem;
    font-size: calc(0.85rem * var(--pocabinet-hud, 1));
    background: var(--bc-panel);
    border-left: 4px solid var(--bc-focus);
    border-radius: 6px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateX(-0.6rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pocabinet-bc__lower[data-show="on"][b-5ghhmq46e9] {
    opacity: 1;
    transform: none;
}

.pocabinet-bc__shot[b-5ghhmq46e9] {
    font-size: max(12px, 0.78em);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bc-focus);
}

.pocabinet-bc__who[b-5ghhmq46e9] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.pocabinet-bc__pos[b-5ghhmq46e9] {
    font-size: 1.35em;
    font-weight: 800;
}

.pocabinet-bc__chip[b-5ghhmq46e9] {
    flex: none;
    width: 0.35rem;
    height: 1.3em;
    border-radius: 2px;
}

.pocabinet-bc__name[b-5ghhmq46e9] {
    font-size: 1.15em;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pocabinet-bc__style[b-5ghhmq46e9] {
    flex: none;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    font-size: max(12px, 0.75em);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.14);
}

.pocabinet-bc__style:empty[b-5ghhmq46e9] { display: none; }

.pocabinet-bc__meta[b-5ghhmq46e9] {
    color: var(--bc-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The frame round the scene's PiP viewport (broadcast.js places it over scene.pipRect). */
.pocabinet-bc__pip[b-5ghhmq46e9] {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}

.pocabinet-bc__pip[data-show="off"][b-5ghhmq46e9] { display: none; }

.pocabinet-bc__piplabel[b-5ghhmq46e9] {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 100%;
    padding: 0.15rem 0.5rem;
    font-size: max(12px, calc(0.72rem * var(--pocabinet-hud, 1)));
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bc-panel);
}

/* Phones: a top-five tower (plus the car on screen), the callout above the caption, a slimmer caption. */
@media (max-width: 640px) {
    .pocabinet-bc__tower[b-5ghhmq46e9] { width: calc(10.5rem * var(--pocabinet-hud, 1)); font-size: max(12px, calc(0.72rem * var(--pocabinet-hud, 1))); }
    .pocabinet-bc__row:nth-child(n+6):not([data-focus="on"])[b-5ghhmq46e9] { display: none; }
    .pocabinet-bc__rows[b-5ghhmq46e9] { min-height: calc(5 * (1.35em + 0.2rem) + 0.4rem); }
    .pocabinet-bc__callout[b-5ghhmq46e9] { top: auto; bottom: 5.4rem; max-width: calc(100% - 1.4rem); font-size: calc(0.82rem * var(--pocabinet-hud, 1)); }
    .pocabinet-bc__lower[b-5ghhmq46e9] { max-width: calc(100% - 1.4rem); font-size: calc(0.78rem * var(--pocabinet-hud, 1)); }
}

@media (prefers-reduced-motion: reduce) {
    .pocabinet-bc__live[b-5ghhmq46e9]::before,
    .pocabinet-bc__tower[b-5ghhmq46e9],
    .pocabinet-bc__callout[data-show="on"] .pocabinet-bc__ct[b-5ghhmq46e9] { animation: none; }
    .pocabinet-bc__callout[b-5ghhmq46e9],
    .pocabinet-bc__lower[b-5ghhmq46e9] { transition: none; }
}

@keyframes pocabinet-bc-blink-b-5ghhmq46e9 {
    0% { opacity: 1; }
    100% { opacity: 0.25; }
}

@keyframes pocabinet-bc-wipe-b-5ghhmq46e9 {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes pocabinet-bc-fade-b-5ghhmq46e9 {
    from { opacity: 0; }
    to { opacity: 1; }
}
/* /Features/PoCabinet/PoCabinetDrawer.razor.rz.scp.css */
/* PoCabinetDrawer — its own scoped styles (split from PoCabinetPage.razor.css). Shared
   bits (muted text, status lines, sector chips, screen-reader text) stay on the page as ::deep. */

/* ─── Settings drawer (PoCabinetDrawer → ::deep) ─────────────────────────── */
/* A side sheet on the right; a bottom sheet on phones. Reset the UA dialog frame. */
.pocabinet-drawer[b-bo50yymccb] {
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    width: min(100vw, 420px);
    max-width: none;
    height: 100dvh;
    max-height: none;
    background: transparent;
    color: var(--color-text);
}

/* Not the app's springy dialog entry (app.css po-dialog-in scales from 0.96): a sheet slides. */
.pocabinet-drawer[open][b-bo50yymccb] { animation: none; }

.pocabinet-drawer[b-bo50yymccb]::backdrop {
    background: rgba(4, 8, 18, 0.5);
}

.pocabinet-drawer[open] .pocabinet-drawer__panel[b-bo50yymccb] {
    animation: pocabinet-drawer-in-b-bo50yymccb 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pocabinet-drawer__panel[b-bo50yymccb] {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.pocabinet-drawer__head[b-bo50yymccb] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    border-bottom: 1px solid var(--color-border, transparent);
}

.pocabinet-drawer__head h2[b-bo50yymccb] { margin: 0; font-size: 1.15rem; }

.pocabinet-drawer__close[b-bo50yymccb] { min-width: 2.75rem; min-height: 2.75rem; padding: 0; font-size: 1.1rem; }

.pocabinet-drawer__body[b-bo50yymccb] {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.5rem 1.25rem 1.25rem;
    display: grid;
    align-content: start;
    gap: 0.75rem;
}

.pocabinet-drawer__section h3[b-bo50yymccb] {
    margin: 0.5rem 0 0.5rem;
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .pocabinet-drawer[b-bo50yymccb] {
        margin: auto 0 0;
        width: 100vw;
        height: auto;
        max-height: 88dvh;
    }
    .pocabinet-drawer__panel[b-bo50yymccb] {
        height: auto;
        max-height: 88dvh;
        border-radius: 14px 14px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Slide only: a panel that starts transparent stays invisible for as long as a busy frame
   (the race renders behind it) holds the animation on its first keyframe. */
@keyframes pocabinet-drawer-in-b-bo50yymccb {
    from { transform: translateX(24px); }
    to { transform: none; }
}

@media (max-width: 640px) {
    @keyframes pocabinet-drawer-in-b-bo50yymccb {
        from { transform: translateY(24px); }
        to { transform: none; }
    }
}
/* /Features/PoCabinet/PoCabinetLobby.razor.rz.scp.css */
/* PoCabinetLobby — only what the shared LobbyPanel does not own: the car-paint chip in a
   roster row, the host's kick button, the host's pickers and the status lines. */
.pocabinet-lobby[b-t65fz8m5cr] {
    position: relative;
    z-index: 1;
}

.pocabinet-seat__chip[b-t65fz8m5cr] {
    flex: none;
    display: inline-block;
    width: 0.6rem;
    height: 1.4rem;
    margin-right: 0.45rem;
    vertical-align: middle;
    border-radius: 3px;
    background: var(--chip);
}

/* Host-only: free a seat between races. */
.pocabinet-seat__kick[b-t65fz8m5cr] {
    flex: none;
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.4rem;
    border: 1px solid var(--color-border, currentColor);
    border-radius: var(--radius-md, 6px);
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    cursor: pointer;
}

.pocabinet-seat__kick:hover:not(:disabled)[b-t65fz8m5cr] {
    color: var(--color-danger, #c0392b);
    border-color: currentColor;
}

.pocabinet-seat__kick:focus-visible[b-t65fz8m5cr] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 2px;
}

.pocabinet-pick[b-t65fz8m5cr] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.pocabinet-pick label[b-t65fz8m5cr] {
    display: grid;
    gap: 0.2rem;
    flex: 1 1 10rem;
    min-width: 0;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.pocabinet-pick select[b-t65fz8m5cr] {
    min-height: 44px;
    width: 100%;
    min-width: 0;
}

.pocabinet-lobby__notice[b-t65fz8m5cr] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0;
}

.pocabinet-lobby__notice .app-btn[b-t65fz8m5cr] { min-height: 44px; }
/* /Features/PoCabinet/PoCabinetPage.razor.rz.scp.css */
/* PoCabinet UI — themed with the framework's design tokens (no per-component hex values).
   See wwwroot/css/app.css :root for the token set; this file only references vars so
   light/dark themes flow through automatically.

   Scoped CSS reaches only markup written in PoCabinetPage.razor: every child component
   (setup, track selector, paint shop, lobby, drawer, settings panel, results,
   broadcast) has its own .razor.css. What several of them render — muted text, status lines,
   sector chips, screen-reader text — is styled here, as ::deep. The custom properties on
   .pocabinet-root are inherited by all of them. */
.pocabinet-root[b-d8jx1cm5d8] {
    --color-primary: var(--color-accent-solid, #4f46e5);
    --color-on-primary: var(--color-accent-contrast, #ffffff);
    --color-text-muted: var(--color-text-secondary, #94a3b8);
    --color-text: var(--color-text-primary, #e2e8f0);
    position: relative;
    isolation: isolate;
    width: 100%;
    height: 100%;
    color: var(--color-text);
}

.pocabinet-ui-bg[b-d8jx1cm5d8] {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.92;
}

.pocabinet-intro[b-d8jx1cm5d8] {
    position: relative;
    z-index: 1;
}
[b-d8jx1cm5d8] .pocabinet-muted {
    color: var(--color-text-muted);
    font-weight: 400;
}

/* ─── Race HUD ───────────────────────────────────────────────────────────── */
.pocabinet-race[b-d8jx1cm5d8] {
    position: relative;
    width: 100%;
    height: 100%;
    /* Glass over the 3D view. Canvas-overlay tokens: scheme-invariant on purpose, since
       what sits behind them is the race, not the page surface. */
    --pocabinet-glass-fill: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 55%, rgba(255, 255, 255, 0.1));
    --pocabinet-glass-edge: rgba(255, 255, 255, 0.3);
    --pocabinet-glass-shade: rgba(6, 10, 22, 0.28);
    --pocabinet-glass-text: #ffffff;
    --pocabinet-glass-blur: blur(14px) saturate(170%);
    --pocabinet-rev-low: #35d07f;
    --pocabinet-rev-mid: #f5c542;
    --pocabinet-rev-high: #ff4d4d;
    --pocabinet-tow: #7fe3ff;
    --pocabinet-gain: #2ecc71;
    --pocabinet-loss: #ff5a5a;
}

.pocabinet-canvas[b-d8jx1cm5d8] {
    width: 100%;
    height: var(--pocabinet-canvas-h);
    background: #0f1a3a;
    border-radius: var(--radius-md, 8px);
    display: block;
}

.pocabinet-canvas:focus-visible[b-d8jx1cm5d8] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 2px;
}

/* Lap, time, last, best and the sectors: glass on the race view, top centre (it was a white
   strip under the canvas that cost the view a band of the screen, two rows of it on a phone). */
.pocabinet-hud[b-d8jx1cm5d8] {
    position: absolute;
    top: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    max-width: calc(100% - 2 * (170px * var(--pocabinet-hud, 1)) - 2.5rem);
    padding: 0.35rem 0.85rem 0.45rem;
    border-radius: var(--radius-md, 10px);
    font-size: calc(0.92rem * var(--pocabinet-hud, 1));
    color: var(--pocabinet-glass-text);
    background: var(--pocabinet-glass-fill), rgba(6, 10, 22, 0.56);
    border: 1px solid var(--pocabinet-glass-edge);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08),
        0 10px 28px rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 4;
}

.pocabinet-hud__stats[b-d8jx1cm5d8] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem 0.9rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Live delta: this lap against the lap to beat, written by race.js (updateDelta). The value
   keeps its width, so the strip does not jitter as the digits change. */
.pocabinet-delta strong[b-d8jx1cm5d8] {
    display: inline-block;
    min-width: 3.1em;
    text-align: right;
}

.pocabinet-delta[data-state="gain"] strong[b-d8jx1cm5d8] { color: var(--pocabinet-gain); }
.pocabinet-delta[data-state="loss"] strong[b-d8jx1cm5d8] { color: var(--pocabinet-loss); }

/* Camera and pause: icon buttons on the glass, under the minimap. */
.pocabinet-hudbar[b-d8jx1cm5d8] {
    position: absolute;
    top: calc(0.6rem + 120px * var(--pocabinet-hud, 1) + 0.45rem);
    right: 0.6rem;
    display: inline-flex;
    gap: 0.4rem;
    z-index: 6;
}

.pocabinet-hudbar .pocabinet-iconbtn[b-d8jx1cm5d8] {
    color: var(--pocabinet-glass-text);
    background: var(--pocabinet-glass-fill), rgba(6, 10, 22, 0.5);
    border-color: var(--pocabinet-glass-edge);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.pocabinet-hudbar .pocabinet-iconbtn:hover[b-d8jx1cm5d8] {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.pocabinet-hudbar .pocabinet-iconbtn:active[b-d8jx1cm5d8] {
    transform: scale(0.93);
}

/* ─── Race overlays: minimap, countdown, ping, reconnect ─────────────────── */
.pocabinet-minimap[b-d8jx1cm5d8] {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: calc(170px * var(--pocabinet-hud, 1));
    height: calc(120px * var(--pocabinet-hud, 1));
    border-radius: var(--radius-md, 6px);
    background: var(--pocabinet-glass-shade);
    border: 1px solid var(--pocabinet-glass-edge);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 10px 26px rgba(0, 0, 0, 0.34);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
    pointer-events: none;
}

/* The minimap, the lap readout and the hud bar hold their boxes from the first render (the
   sizes above are fixed), and fade in once the scene is up instead of popping in over the
   first frames: the canvas is blank glass until minimap.js draws on it. */
.pocabinet-minimap[b-d8jx1cm5d8],
.pocabinet-hud[b-d8jx1cm5d8],
.pocabinet-hudbar[b-d8jx1cm5d8] {
    animation: pocabinet-hud-fade-b-d8jx1cm5d8 0.4s ease 0.3s both;
}

.pocabinet-countdown[b-d8jx1cm5d8] {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: calc(4.5rem * var(--pocabinet-hud, 1));
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65), 0 0 36px rgba(255, 40, 40, 0.55);
    pointer-events: none;
    animation: pocabinet-count-pop-b-d8jx1cm5d8 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.pocabinet-countdown--go[b-d8jx1cm5d8] {
    color: #2ecc71;
    font-size: calc(3.6rem * var(--pocabinet-hud, 1));
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65), 0 0 42px rgba(46, 204, 113, 0.8);
    animation: pocabinet-go-burst-b-d8jx1cm5d8 1.2s cubic-bezier(0.1, 0.8, 0.3, 1) both;
}

/* ─── Glass cluster: rev ring, speed, gear (race.js writes --rpm + text) ─── */
/* The driver's cluster: the gauge with the damage panel beside it, bottom centre of the view
   (on a touch screen, bottom left above the steer pad). */
.pocabinet-cluster[b-d8jx1cm5d8] {
    position: absolute;
    left: 50%;
    top: calc(var(--pocabinet-canvas-h) - 0.8rem);
    /* The gauge, not the pair, sits on the centre line. */
    transform: translate(calc(-1 * min(138px, 30vw) * var(--pocabinet-hud, 1) / 2), -100%);
    display: flex;
    align-items: flex-end;
    gap: 0.6rem;
    pointer-events: none;
    z-index: 4;
}

.pocabinet-gauge[b-d8jx1cm5d8] {
    --rpm: 0;
    --size: calc(min(138px, 30vw) * var(--pocabinet-hud, 1));
    position: relative;
    flex: none;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    background: var(--pocabinet-glass-fill), var(--pocabinet-glass-shade);
    border: 1px solid var(--pocabinet-glass-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -10px 24px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
    color: var(--pocabinet-glass-text);
}

/* The ring: a 270° arc from bottom-left, cut to --rpm by a conic mask and hollowed by a radial one. */
.pocabinet-gauge__track[b-d8jx1cm5d8],
.pocabinet-gauge__ring[b-d8jx1cm5d8] {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
}

.pocabinet-gauge__track[b-d8jx1cm5d8] {
    background: conic-gradient(from 225deg, rgba(255, 255, 255, 0.16) 0.75turn, transparent 0);
}

.pocabinet-gauge__ring[b-d8jx1cm5d8] {
    background: conic-gradient(from 225deg, var(--pocabinet-rev-low), var(--pocabinet-rev-mid) 0.5turn, var(--pocabinet-rev-high) 0.72turn, transparent 0.75turn);
    -webkit-mask:
        conic-gradient(from 225deg, #000 calc(var(--rpm) * 0.75turn), transparent 0),
        radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    -webkit-mask-composite: source-in;
    mask:
        conic-gradient(from 225deg, #000 calc(var(--rpm) * 0.75turn), transparent 0),
        radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask-composite: intersect;
    filter: drop-shadow(0 0 4px rgba(255, 190, 90, 0.55));
}

.pocabinet-gauge[data-redline="on"] .pocabinet-gauge__ring[b-d8jx1cm5d8] {
    animation: pocabinet-redline-b-d8jx1cm5d8 0.12s steps(2) infinite;
}

.pocabinet-gauge[data-redline="on"][b-d8jx1cm5d8] {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 26px rgba(255, 77, 77, 0.55), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.pocabinet-gauge__speed[b-d8jx1cm5d8] {
    font-size: calc(var(--size) * 0.3);
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.pocabinet-gauge__unit[b-d8jx1cm5d8] {
    font-size: calc(var(--size) * 0.085);
    opacity: 0.75;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Slipstream (slipstream.js writes --tow, 0..1, and data-tow): the rev ring's empty bottom
   quarter fills from the middle out, and the glass glows cyan while you are in a tow. */
.pocabinet-gauge__tow[b-d8jx1cm5d8] {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    background: conic-gradient(from 135deg,
        transparent calc((0.5 - var(--tow, 0) * 0.5) * 0.25turn),
        var(--pocabinet-tow) 0,
        var(--pocabinet-tow) calc((0.5 + var(--tow, 0) * 0.5) * 0.25turn),
        transparent 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    filter: drop-shadow(0 0 6px var(--pocabinet-tow));
    transition: opacity 0.3s ease;
    opacity: 0;
}

.pocabinet-gauge[data-tow="on"] .pocabinet-gauge__tow[b-d8jx1cm5d8] {
    opacity: 1;
}

.pocabinet-gauge[data-tow="on"][b-d8jx1cm5d8] {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -10px 24px rgba(0, 0, 0, 0.25),
        0 0 calc(10px + var(--tow, 0) * 26px) rgba(127, 227, 255, calc(var(--tow, 0) * 0.7)), 0 10px 30px rgba(0, 0, 0, 0.35);
}

.pocabinet-gauge__gear[b-d8jx1cm5d8] {
    position: absolute;
    bottom: 9%;
    min-width: 1.6em;
    padding: 0.05em 0.45em;
    border-radius: 999px;
    font-size: calc(var(--size) * 0.12);
    font-weight: 800;
    text-align: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid var(--pocabinet-glass-edge);
}

/* ─── Shift LEDs (5-pip RPM ladder driven by data-shift="0..5") ─────────── */
.pocabinet-gauge__leds[b-d8jx1cm5d8] {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    pointer-events: none;
}

.pocabinet-gauge__leds i[b-d8jx1cm5d8] {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background-color 0.08s ease, box-shadow 0.08s ease, transform 0.08s ease;
}

.pocabinet-gauge[data-shift="1"] .pocabinet-gauge__leds i:nth-child(-n+1)[b-d8jx1cm5d8],
.pocabinet-gauge[data-shift="2"] .pocabinet-gauge__leds i:nth-child(-n+2)[b-d8jx1cm5d8],
.pocabinet-gauge[data-shift="3"] .pocabinet-gauge__leds i:nth-child(-n+3)[b-d8jx1cm5d8],
.pocabinet-gauge[data-shift="4"] .pocabinet-gauge__leds i:nth-child(-n+4)[b-d8jx1cm5d8],
.pocabinet-gauge[data-shift="5"] .pocabinet-gauge__leds i:nth-child(-n+5)[b-d8jx1cm5d8] {
    background: #35d07f;
    box-shadow: 0 0 8px rgba(53, 208, 127, 0.85);
}

.pocabinet-gauge[data-shift="3"] .pocabinet-gauge__leds i:nth-child(3)[b-d8jx1cm5d8],
.pocabinet-gauge[data-shift="4"] .pocabinet-gauge__leds i:nth-child(n+3)[b-d8jx1cm5d8],
.pocabinet-gauge[data-shift="5"] .pocabinet-gauge__leds i:nth-child(n+3)[b-d8jx1cm5d8] {
    background: #f5c542;
    box-shadow: 0 0 8px rgba(245, 197, 66, 0.85);
}

.pocabinet-gauge[data-shift="5"] .pocabinet-gauge__leds i:nth-child(5)[b-d8jx1cm5d8],
.pocabinet-gauge[data-redline="on"] .pocabinet-gauge__leds i[b-d8jx1cm5d8] {
    background: #ff4d4d;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.95);
    animation: pocabinet-redline-b-d8jx1cm5d8 0.12s steps(2) infinite;
}

/* ─── Lateral G-meter ball inside bottom half of dial ────────────────────── */
.pocabinet-gauge__gtrack[b-d8jx1cm5d8] {
    position: relative;
    width: calc(var(--size) * 0.34);
    height: 4px;
    margin-top: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: visible;
}

.pocabinet-gauge__gdot[b-d8jx1cm5d8] {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7fe3ff;
    box-shadow: 0 0 7px rgba(127, 227, 255, 0.9);
    transform: translate(calc(-50% + var(--g-lat, 0) * var(--size) * 0.14), -50%);
    transition: transform 0.06s linear;
}

/* ─── Compact Throttle / Brake / Slip micro-bars to the left of dial ─────── */
.pocabinet-telemetry[b-d8jx1cm5d8] {
    position: absolute;
    right: calc(100% + 0.45rem);
    bottom: 0.35rem;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: calc(var(--size) * 0.56);
    padding: 6px 5px;
    border-radius: 10px;
    background: var(--pocabinet-glass-fill), var(--pocabinet-glass-shade);
    border: 1px solid var(--pocabinet-glass-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 18px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
}

.pocabinet-telemetry__bar[b-d8jx1cm5d8] {
    position: relative;
    width: 5px;
    height: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.pocabinet-telemetry__bar i[b-d8jx1cm5d8] {
    display: block;
    width: 100%;
    border-radius: inherit;
    transition: height 0.05s linear;
}

.pocabinet-telemetry__bar--thr i[b-d8jx1cm5d8] {
    height: calc(var(--throttle, 0) * 100%);
    background: linear-gradient(to top, #22c55e, #86efac);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.65);
}

.pocabinet-telemetry__bar--brk i[b-d8jx1cm5d8] {
    height: calc(var(--brake, 0) * 100%);
    background: linear-gradient(to top, #ef4444, #fca5a5);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.65);
}

.pocabinet-telemetry__bar--slip i[b-d8jx1cm5d8] {
    height: calc(var(--slip, 0) * 100%);
    background: linear-gradient(to top, #38bdf8, #fde047);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.65);
}

/* ─── Position badge: re-created per place change (@key), so it swooshes in ─ */
.pocabinet-posbadge[b-d8jx1cm5d8] {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    padding: 0.2rem 0.75rem 0.25rem;
    border-radius: var(--radius-md, 10px);
    font-size: calc(2rem * var(--pocabinet-hud, 1));
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--pocabinet-glass-text);
    background: var(--pocabinet-glass-fill), var(--pocabinet-glass-shade);
    border: 1px solid var(--pocabinet-glass-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
    animation: pocabinet-pos-swoosh-b-d8jx1cm5d8 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}

/* A glint that sweeps across the glass as the new place lands. */
.pocabinet-posbadge[b-d8jx1cm5d8]::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: pocabinet-glint-b-d8jx1cm5d8 0.9s 0.15s ease-out both;
}

.pocabinet-posbadge__p[b-d8jx1cm5d8] {
    font-size: 0.55em;
    opacity: 0.8;
    margin-right: 0.08em;
}

.pocabinet-posbadge__of[b-d8jx1cm5d8] {
    font-size: 0.45em;
    opacity: 0.7;
    margin-left: 0.1em;
}

.pocabinet-posbadge--up[b-d8jx1cm5d8] {
    border-color: var(--pocabinet-gain);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 22px rgba(46, 204, 113, 0.5);
}

.pocabinet-posbadge--down[b-d8jx1cm5d8] {
    border-color: var(--pocabinet-loss);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 22px rgba(255, 90, 90, 0.45);
}

/* Dialogue bubble layer — dialogue.js appends its own .pocabinet-dialogue
   bubble inside this overlay. */
.pocabinet-dialogue-layer[b-d8jx1cm5d8] {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.pocabinet-ping[b-d8jx1cm5d8] {
    position: absolute;
    /* Under the position badge. */
    top: calc(0.9rem + 3.4rem * var(--pocabinet-hud, 1));
    left: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: calc(0.78rem * var(--pocabinet-hud, 1));
    color: #ffffff;
    background: rgba(8, 12, 24, 0.55);
}

.pocabinet-ping--good[b-d8jx1cm5d8] { outline: 2px solid #2ecc71; outline-offset: -2px; }

.pocabinet-ping--fair[b-d8jx1cm5d8] { outline: 2px solid #e6a23c; outline-offset: -2px; }

.pocabinet-ping--poor[b-d8jx1cm5d8] { outline: 2px solid #c0392b; outline-offset: -2px; }

.pocabinet-reconnect[b-d8jx1cm5d8] {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md, 8px);
    background: var(--color-surface);
    box-shadow: var(--shadow-card, none);
    color: var(--color-text);
    font-size: calc(1rem * var(--pocabinet-hud, 1));
}

/* Online, the race connection is gone for good: the message and the ways out. */
.pocabinet-reconnect--lost[b-d8jx1cm5d8] {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    width: max-content;
    max-width: min(92vw, 30rem);
    z-index: 8;
}

.pocabinet-reconnect__spinner[b-d8jx1cm5d8] {
    width: 1em;
    height: 1em;
    border-radius: 50%;
    border: 2px solid var(--color-border, #666);
    border-top-color: var(--color-primary);
    animation: pocabinet-spin-b-d8jx1cm5d8 0.9s linear infinite;
}

/* ─── Sector chips (race view, pause card), icon buttons ─────────────────── */
.pocabinet-sectors[b-d8jx1cm5d8] {
    display: inline-flex;
    gap: 0.35rem;
}

[b-d8jx1cm5d8] .pocabinet-sector {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-md, 5px);
    background: rgba(8, 12, 24, 0.55);
    color: var(--color-text);
    font-size: 0.85em;
    min-width: 6.2em;
    text-align: center;
}

[b-d8jx1cm5d8] .pocabinet-sector__label {
    margin-right: 0.35em;
    color: var(--color-text-muted);
}

[b-d8jx1cm5d8] .pocabinet-sector--pb {
    outline: 2px solid #2ecc71;
    outline-offset: -2px;
}

[b-d8jx1cm5d8] .pocabinet-sector--session {
    outline: 2px solid #a66bff;
    outline-offset: -2px;
}

.pocabinet-iconbtn[b-d8jx1cm5d8] {
    min-width: 2.25rem;
    min-height: 2.25rem;
    background: transparent;
    color: var(--color-text, inherit);
    border: 1px solid var(--color-border, currentColor);
    border-radius: var(--radius-md, 6px);
    padding: 0.25rem 0.7rem;
    cursor: pointer;
    font: inherit;
}

.pocabinet-iconbtn:focus-visible[b-d8jx1cm5d8] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 2px;
}

/* Buttons answer the finger: a hover lift on a mouse, a press that sinks. */
.pocabinet-iconbtn[b-d8jx1cm5d8],
.pocabinet-root .app-btn[b-d8jx1cm5d8] {
    transition: transform 0.12s ease, border-color 0.15s ease;
}

@media (hover: hover) {
    .pocabinet-iconbtn:hover[b-d8jx1cm5d8] { border-color: var(--color-primary); transform: translateY(-1px); }
}

.pocabinet-iconbtn:active[b-d8jx1cm5d8],
.pocabinet-root .app-btn:active[b-d8jx1cm5d8] { transform: scale(0.95); }

/* ─── Pause overlay ──────────────────────────────────────────────────────── */
/* A modal <dialog> (showModal): the browser centres it in the top layer and makes the
   page behind inert. Reset the UA frame; the card is the visible surface. */
.pocabinet-root[b-d8jx1cm5d8]  .pocabinet-overlay {
    /* Explicit: the app's reset zeroes dialog margins, which pinned the modal top-left. */
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    max-width: none;
    max-height: none;
    color: inherit;
}

.pocabinet-root[b-d8jx1cm5d8]  .pocabinet-overlay::backdrop {
    background: rgba(4, 8, 18, 0.62);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.pocabinet-overlay__card[b-d8jx1cm5d8] {
    display: grid;
    gap: 0.9rem;
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: var(--radius-md, 10px);
    padding: 1.25rem 1.4rem 1.4rem;
    width: min(92vw, 460px);
    max-height: 86dvh;
    overflow-y: auto;
    box-shadow: var(--shadow-card, none);
}

/* Pause: the race so far, then one row of actions (settings are a button, not a form). */
.pocabinet-pause__head[b-d8jx1cm5d8] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.pocabinet-pause__head h2[b-d8jx1cm5d8] { margin: 0; }

.pocabinet-pause__stats[b-d8jx1cm5d8] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.pocabinet-pause__stats > div[b-d8jx1cm5d8] {
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-md, 8px);
    background: color-mix(in srgb, var(--color-text) 6%, transparent);
}

.pocabinet-pause__stats dt[b-d8jx1cm5d8] {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pocabinet-pause__stats dd[b-d8jx1cm5d8] {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.pocabinet-pause__stats small[b-d8jx1cm5d8] {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--color-text-muted);
}

.pocabinet-overlay__card .pocabinet-sectors[b-d8jx1cm5d8] { justify-content: stretch; }

.pocabinet-overlay__card[b-d8jx1cm5d8]  .pocabinet-sector { flex: 1 1 0; min-width: 0; }

.pocabinet-pause__actions[b-d8jx1cm5d8] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (max-width: 420px) {
    .pocabinet-pause__stats[b-d8jx1cm5d8] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ─── Touch controls (input.js flips data-active; hidden otherwise) ──────── */
.pocabinet-touch[b-d8jx1cm5d8] {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--pocabinet-canvas-h); /* the canvas box — the controls sit over its lower edge */
    pointer-events: none;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 0.75rem 0.75rem;
    z-index: 5;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.pocabinet-touch[data-active="true"][b-d8jx1cm5d8] {
    display: flex;
}

.pocabinet-touch__steer[b-d8jx1cm5d8] {
    --pocabinet-steer: 0;
    position: relative;
    width: min(46vw, 260px);
    height: 84px;
    border-radius: 42px;
    background: rgba(8, 12, 24, 0.48);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    pointer-events: auto;
    touch-action: none;
    transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.14s ease, box-shadow 0.14s ease;
    overflow: hidden;
}

.pocabinet-touch__steer[data-pressed="true"][b-d8jx1cm5d8] {
    border-color: var(--color-primary);
    box-shadow: inset 0 0 18px rgba(99, 102, 241, 0.35), 0 0 16px rgba(99, 102, 241, 0.35);
    transform: scale(0.985);
}

.pocabinet-touch__knob[b-d8jx1cm5d8] {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.45), transparent 55%), var(--color-primary);
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transform: translate(calc(-50% + var(--pocabinet-steer) * min(19vw, 98px)), -50%);
}

.pocabinet-touch__steer[data-pressed="true"] .pocabinet-touch__knob[b-d8jx1cm5d8] {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.8), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pocabinet-touch[data-steer="tilt"] .pocabinet-touch__steer[b-d8jx1cm5d8] {
    visibility: hidden;
}

.pocabinet-touch__tilt[b-d8jx1cm5d8] {
    display: none;
    pointer-events: auto;
    align-self: center;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md, 6px);
    border: none;
    background: var(--color-primary);
    color: var(--color-on-primary, white);
    font: inherit;
}

.pocabinet-touch[data-steer="tilt"]:not([data-tilt="on"]) .pocabinet-touch__tilt[b-d8jx1cm5d8] {
    display: block;
}

.pocabinet-touch__pedals[b-d8jx1cm5d8] {
    display: flex;
    gap: 0.6rem;
    pointer-events: auto;
}

.pocabinet-touch__pedal[b-d8jx1cm5d8] {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 110px;
    border-radius: 16px;
    background: rgba(8, 12, 24, 0.48);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 8px 20px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-weight: 700;
    touch-action: none;
    overflow: hidden;
    transition: transform 0.1s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.12s ease, box-shadow 0.14s ease;
}

.pocabinet-touch__pedal[b-d8jx1cm5d8]::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45) 0%, transparent 65%);
    opacity: 0;
    transform: scale(0.45);
    transition: transform 0.22s ease-out, opacity 0.22s ease-out;
    pointer-events: none;
}

.pocabinet-touch__pedal--gas[b-d8jx1cm5d8] { height: 132px; border-color: #2ecc71; }

.pocabinet-touch__pedal--brake[b-d8jx1cm5d8] { border-color: #e74c3c; }

.pocabinet-touch__pedal[data-pressed="true"][b-d8jx1cm5d8] {
    background: rgba(255, 255, 255, 0.26);
    transform: scale(0.94);
    box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.35), 0 0 18px rgba(255, 255, 255, 0.25);
}

.pocabinet-touch__pedal--gas[data-pressed="true"][b-d8jx1cm5d8] {
    box-shadow: inset 0 0 18px rgba(46, 204, 113, 0.55), 0 0 18px rgba(46, 204, 113, 0.45);
}

.pocabinet-touch__pedal--brake[data-pressed="true"][b-d8jx1cm5d8] {
    box-shadow: inset 0 0 18px rgba(231, 76, 60, 0.55), 0 0 18px rgba(231, 76, 60, 0.45);
}

.pocabinet-touch__pedal[data-pressed="true"][b-d8jx1cm5d8]::after {
    opacity: 0.7;
    transform: scale(1.1);
}

/* ─── Spectator badge ───────────────────────────────────────────────── */
.pocabinet-spectating[b-d8jx1cm5d8] {
    position: absolute;
    top: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(8, 12, 24, 0.7);
    color: #ffffff;
    font-size: 0.85rem;
}

/* ─── Official's radio bubble (created by dialogue.js → ::deep) ──────────── */
/* On the left edge under the position badge (and the ping chip online), where TV puts team
   radio. It used to sit in the middle of the screen, a third of the way up: right over the
   road the player was steering for. */
[b-d8jx1cm5d8] .pocabinet-dialogue {
    position: absolute;
    left: 0.7rem;
    top: calc(0.9rem + 5.4rem * var(--pocabinet-hud, 1));
    max-width: min(55%, 340px);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-md, 8px);
    border-left: 3px solid var(--color-accent);
    background: rgba(8, 12, 24, 0.78);
    color: #ffffff;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

[b-d8jx1cm5d8] .pocabinet-dialogue--visible {
    opacity: 1;
    transform: translateX(0);
}

/* A phone held upright stacks the lap card under the badge: the radio goes under both. */
@media (max-width: 600px) and (orientation: portrait) {
    [b-d8jx1cm5d8] .pocabinet-dialogue {
        top: calc(0.9rem + 9.6rem * var(--pocabinet-hud, 1));
        max-width: min(70%, 340px);
    }
}

/* The demo's timing tower owns the left edge: its radio sits low in the middle, where the
   broadcast has nothing (the battle caption is bottom-left, the rear cam bottom-right). */
.pocabinet-race--demo[b-d8jx1cm5d8]  .pocabinet-dialogue {
    left: 50%;
    top: auto;
    bottom: 1.2rem;
    transform: translate(-50%, 8px);
}

.pocabinet-race--demo[b-d8jx1cm5d8]  .pocabinet-dialogue--visible {
    transform: translate(-50%, 0);
}

[b-d8jx1cm5d8] .pocabinet-dialogue__name {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    /* --color-accent, not --color-primary: that one is the solid FILL colour and is
       too dark to be text on this surface (3.3:1). */
    color: var(--color-accent);
}

[b-d8jx1cm5d8] .pocabinet-dialogue__body {
    font-size: 0.95rem;
    line-height: 1.3;
}

/* ═══ Layout and polish layer ═══════════════════════════════════════════════
   Everything below: layout that fills the viewport, the
   merged start card, the compact HUD strip, results with pinned actions, touch-safe
   targets, contrast, and ONE reduced-motion rule. Later rules win on purpose. */
/* The race view fills the screen under the app's top bar (kept, like every other game's, except
   on a phone held sideways: games.css), and the lap readout and status sit on the
   view instead of under it. Touch controls, the cluster and the broadcast graphics all key off
   this one variable. --pocabinet-topbar-h is the bar's MEASURED height (pocabinet/index.js): a
   fixed 3.35rem was 10px short of the phone bar, so the race page scrolled and the Gas pedal
   was cut off at the bottom. --gps-bar-h (games.css) reserves the phone bottom nav. */
.pocabinet-race[b-d8jx1cm5d8] {
    --pocabinet-canvas-h: max(280px, calc(100dvh - var(--pocabinet-topbar-h, 3.35rem) - max(var(--gps-bar-h, 0px), var(--safe-bottom, 0px))));
}

/* The start card's setup: the track list, and a failed start's line under it. */
.pocabinet-start[b-d8jx1cm5d8] {
    display: grid;
    gap: 0.5rem;
}

/* Screen-reader-only text (the live region here; stage notes in the track rows). */
[b-d8jx1cm5d8] .pocabinet-sr {
    position: absolute;
    /* Pinned: left at its static place, the live region sat 1px under the full-height
       race view and scrolled the page by that pixel. */
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* A message on the race view (clip saved, could not start), under the lap readout. */
.pocabinet-race[b-d8jx1cm5d8]  > .pocabinet-status {
    position: absolute;
    top: calc(4.6rem * var(--pocabinet-hud, 1));
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 2rem);
    margin: 0;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-md, 8px);
    background: var(--color-surface);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    z-index: 6;
}

/* ─── Start: the shared opening card (GameIntro) ─────────────────────────── */
/* The 1P card's Options slot is the track list (GameIntro Wide puts it beside the controls).
   The wrapper is display:contents. */
.pocabinet-intro[b-d8jx1cm5d8] { display: contents; }

.pocabinet-controls[b-d8jx1cm5d8] { margin: 0; }

/* Sector chips on the page surface (pause card, laps table): token colours, so they read in
   both themes. On the race view's glass they are white on a light wash instead. */
[b-d8jx1cm5d8] .pocabinet-sector {
    background: color-mix(in srgb, var(--color-text) 9%, transparent);
    color: var(--color-text);
}

[b-d8jx1cm5d8] .pocabinet-sector__label {
    color: var(--color-text-muted);
}

.pocabinet-hud[b-d8jx1cm5d8]  .pocabinet-sector {
    background: rgba(255, 255, 255, 0.14);
    color: var(--pocabinet-glass-text);
    min-width: 5.4em;
}

.pocabinet-hud[b-d8jx1cm5d8]  .pocabinet-sector__label {
    color: rgba(255, 255, 255, 0.78);
}

/* ─── Damage panel: the car from above, lit by zone (race.js writes --dmg-*) ─── */
.pocabinet-damage[b-d8jx1cm5d8] {
    --dmg-front: 0;
    --dmg-rear: 0;
    --dmg-left: 0;
    --dmg-right: 0;
    --dmg-engine: 0;
    --dmg-body: 0;
    --dmg-ok: #3fcf86;
    --dmg-bad: #ff4a3d;
    --dmg-h: calc(6.4rem * var(--pocabinet-hud, 1));
    /* In the cluster, beside the gauge. */
    position: relative;
    flex: none;
    width: calc(3.6rem * var(--pocabinet-hud, 1));
    height: var(--dmg-h);
    padding: 0.45rem 0.5rem;
    display: grid;
    grid-template-rows: 1fr auto auto;
    justify-items: center;
    gap: 0.3rem;
    border-radius: var(--radius-md, 10px);
    background: var(--pocabinet-glass-fill), var(--pocabinet-glass-shade);
    border: 1px solid var(--pocabinet-glass-edge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 22px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: var(--pocabinet-glass-blur);
    backdrop-filter: var(--pocabinet-glass-blur);
    color: var(--pocabinet-glass-text);
    pointer-events: none;
    z-index: 4;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.pocabinet-damage:not([data-state="ok"])[b-d8jx1cm5d8] {
    opacity: 1;
}

/* A top-down outline, nose up; each edge is a zone, the block in the nose the engine. */
.pocabinet-damage__car[b-d8jx1cm5d8] {
    position: relative;
    width: 58%;
    height: 100%;
    border: 1.5px solid currentColor;
    border-radius: 40% 40% 28% 28% / 18% 18% 12% 12%;
    opacity: 0.9;
}

.pocabinet-damage__zone[b-d8jx1cm5d8] {
    position: absolute;
    border-radius: 3px;
    background: color-mix(in oklab, var(--dmg-bad) calc(var(--z) * 100%), var(--dmg-ok));
    opacity: calc(0.35 + var(--z) * 0.65);
}

.pocabinet-damage__zone--front[b-d8jx1cm5d8] { --z: var(--dmg-front); top: 3px; left: 18%; right: 18%; height: 4px; }

.pocabinet-damage__zone--rear[b-d8jx1cm5d8] { --z: var(--dmg-rear); bottom: 3px; left: 18%; right: 18%; height: 4px; }

.pocabinet-damage__zone--left[b-d8jx1cm5d8] { --z: var(--dmg-left); left: 3px; top: 20%; bottom: 20%; width: 4px; }

.pocabinet-damage__zone--right[b-d8jx1cm5d8] { --z: var(--dmg-right); right: 3px; top: 20%; bottom: 20%; width: 4px; }

.pocabinet-damage__engine[b-d8jx1cm5d8] {
    position: absolute;
    top: 14%;
    left: 28%;
    right: 28%;
    height: 22%;
    border-radius: 3px;
    background: color-mix(in oklab, var(--dmg-bad) calc(var(--dmg-engine) * 100%), var(--dmg-ok));
}

/* What is left: engine, then structure — full and green when new, short and red when gone. */
.pocabinet-damage__bar[b-d8jx1cm5d8] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
    position: relative;
}

.pocabinet-damage__bar[b-d8jx1cm5d8]::after {
    content: "";
    position: absolute;
    inset: 0;
    transform-origin: left;
    transform: scaleX(calc(1 - var(--v)));
    background: color-mix(in oklab, var(--dmg-bad) calc(var(--v) * 100%), var(--dmg-ok));
}

.pocabinet-damage__bar--engine[b-d8jx1cm5d8] { --v: var(--dmg-engine); }

.pocabinet-damage__bar--body[b-d8jx1cm5d8] { --v: var(--dmg-body); }

.pocabinet-damage[data-state="critical"] .pocabinet-damage__engine[b-d8jx1cm5d8] {
    animation: pocabinet-damage-blink-b-d8jx1cm5d8 0.6s steps(2) infinite;
}

.pocabinet-damage[data-state="wrecked"][b-d8jx1cm5d8] {
    border-color: var(--dmg-bad);
    box-shadow: 0 0 22px rgba(255, 74, 61, 0.55), 0 8px 22px rgba(0, 0, 0, 0.3);
}

.pocabinet-damage[data-state="wrecked"] .pocabinet-damage__car[b-d8jx1cm5d8] {
    color: var(--dmg-bad);
}

/* The player's wreck, across the middle of the screen until the results come up. */
.pocabinet-wreckbanner[b-d8jx1cm5d8] {
    display: none;
    position: absolute;
    left: 50%;
    top: calc(var(--pocabinet-canvas-h) * 0.38);
    transform: translate(-50%, -50%);
    padding: 0.3rem 1.4rem;
    border-radius: var(--radius-md, 10px);
    font-size: calc(clamp(1.8rem, 7vw, 3.4rem) * var(--pocabinet-hud, 1));
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(150, 18, 12, 0.82);
    border: 1px solid rgba(255, 120, 100, 0.7);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    z-index: 5;
}

.pocabinet-cluster:has(.pocabinet-damage[data-state="wrecked"]) ~ .pocabinet-wreckbanner[b-d8jx1cm5d8] {
    display: block;
    animation: pocabinet-wreck-slam-b-d8jx1cm5d8 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.2) both;
}

@media (prefers-reduced-motion: reduce) {
    .pocabinet-cluster:has(.pocabinet-damage[data-state="wrecked"]) ~ .pocabinet-wreckbanner[b-d8jx1cm5d8],
    .pocabinet-damage[data-state="critical"] .pocabinet-damage__engine[b-d8jx1cm5d8] {
        animation: none;
    }
}

/* ─── Glass gauge: out of the way of the touch controls ───────────────────── */
.pocabinet-gauge__unit[b-d8jx1cm5d8] {
    font-size: max(12px, calc(var(--size) * 0.085));
}

/* With touch controls on, bottom-centre is under the steer pad and the Brake pedal: the
   whole cluster sits smaller, bottom left, just above the steer pad. The gauge and the damage
   panel stay together (the panel used to go up under the place badge on its own). */
.pocabinet-race:has(.pocabinet-touch[data-active="true"]) .pocabinet-cluster[b-d8jx1cm5d8] {
    left: 0.75rem;
    top: calc(var(--pocabinet-canvas-h) - 84px - 1.5rem);
    transform: translateY(-100%);
    gap: 0.5rem;
}

.pocabinet-race:has(.pocabinet-touch[data-active="true"]) .pocabinet-gauge[b-d8jx1cm5d8] {
    --size: calc(min(104px, 26vw) * var(--pocabinet-hud, 1));
}

.pocabinet-race:has(.pocabinet-touch[data-active="true"]) .pocabinet-damage[b-d8jx1cm5d8] {
    --dmg-h: calc(min(104px, 26vw) * var(--pocabinet-hud, 1));
    width: calc(min(3.4rem, 14vw) * var(--pocabinet-hud, 1));
}

/* Phones: a smaller minimap, the lap readout under the badge/minimap row, the buttons beside
   it, and the track-limits note and ping under the readout. */
@media (max-width: 640px) {
    .pocabinet-minimap[b-d8jx1cm5d8] {
        width: calc(120px * var(--pocabinet-hud, 1));
        height: calc(84px * var(--pocabinet-hud, 1));
    }
    .pocabinet-hudbar[b-d8jx1cm5d8] { top: calc(0.6rem + 84px * var(--pocabinet-hud, 1) + 0.4rem); }
    .pocabinet-hud[b-d8jx1cm5d8] {
        top: calc(0.6rem + 84px * var(--pocabinet-hud, 1) + 0.4rem);
        left: 0.7rem;
        right: calc(0.6rem + 2 * 44px + 0.4rem + 0.5rem);
        max-width: none;
        transform: none;
        justify-items: start;
        font-size: calc(0.85rem * var(--pocabinet-hud, 1));
    }
    .pocabinet-hud__stats[b-d8jx1cm5d8] { justify-content: flex-start; column-gap: 0.7rem; }
    .pocabinet-hud[b-d8jx1cm5d8]  .pocabinet-sector { min-width: 0; padding: 0.1rem 0.35rem; font-size: max(12px, 0.85em); }
    .pocabinet-ping[b-d8jx1cm5d8],
    .pocabinet-race[b-d8jx1cm5d8]  > .pocabinet-status { top: calc(0.6rem + 84px * var(--pocabinet-hud, 1) + 6rem * var(--pocabinet-hud, 1)); }
}

/* ─── Results: the summary of the shared end-of-game modal ───────────────── */
/* The modal centres and bolds its summary for a one-line result; this one is a page. */
.pocabinet-results__body[b-d8jx1cm5d8] {
    width: 100%;
    text-align: left;
    font-weight: 400;
    color: var(--color-text);
}

@media (pointer: coarse) {
    .pocabinet-iconbtn[b-d8jx1cm5d8] {
        min-height: 44px;
    }
    .pocabinet-iconbtn[b-d8jx1cm5d8] { min-width: 44px; }
}

/* ─── Reduced motion ──────────────────────────────────────────────────────
   The app's own switch is the global [data-motion="reduce"] guard in app.css; this is
   the OS preference. */
@media (prefers-reduced-motion: reduce) {
    .pocabinet-root *[b-d8jx1cm5d8],
    .pocabinet-root *[b-d8jx1cm5d8]::before,
    .pocabinet-root *[b-d8jx1cm5d8]::after {
        animation: none !important;
        transition: none !important;
    }
    .pocabinet-iconbtn:hover[b-d8jx1cm5d8],
    .pocabinet-iconbtn:active[b-d8jx1cm5d8],
    .pocabinet-root .app-btn:active[b-d8jx1cm5d8] { transform: none; }
}

/* Track limits: the lap in progress will not count. Under the place badge, amber, not alarming. */
.pocabinet-limits[b-d8jx1cm5d8] {
    position: absolute;
    top: calc(2.9rem + 3.4rem * var(--pocabinet-hud, 1));
    left: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: calc(0.8rem * var(--pocabinet-hud, 1));
    color: #1d1405;
    background: #ffb02e;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 4;
    animation: pocabinet-limits-in-b-d8jx1cm5d8 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.2) both;
}

.pocabinet-limits b[b-d8jx1cm5d8] {
    margin-right: 0.35em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

[b-d8jx1cm5d8] .pocabinet-lap--deleted {
    text-decoration: line-through;
    color: var(--pocabinet-loss);
}

@media (prefers-reduced-motion: reduce) {
    .pocabinet-limits[b-d8jx1cm5d8] { animation: none; }
}

/* Phones: the lap readout sits under the badge, so the note goes under the readout. */
@media (max-width: 640px) {
    .pocabinet-limits[b-d8jx1cm5d8] { top: calc(0.6rem + 84px * var(--pocabinet-hud, 1) + 6rem * var(--pocabinet-hud, 1)); }
}

/* ─── Crash card: the race view could not start, or threw ──────────────── */
/* In the race view's place, the same height, so the page does not jump to a stub. */
.pocabinet-crash[b-d8jx1cm5d8] {
    display: grid;
    place-items: center;
    min-height: max(280px, calc(100dvh - var(--pocabinet-topbar-h, 3.35rem) - max(var(--gps-bar-h, 0px), var(--safe-bottom, 0px))));
    padding: 1rem;
}

/* Holds the shared ErrorState card (its own tint, border and Retry), on an opaque backing. */
.pocabinet-crash__card[b-d8jx1cm5d8] {
    width: min(100%, 30rem);
    border-radius: var(--radius-lg, 12px);
    background: var(--color-surface);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    animation: pocabinet-hud-fade-b-d8jx1cm5d8 0.25s ease both;
}

.pocabinet-crash__card p[b-d8jx1cm5d8] { margin: 0 0 0.5rem; line-height: 1.45; }

.pocabinet-crash__detail[b-d8jx1cm5d8] {
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.pocabinet-crash__actions[b-d8jx1cm5d8] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

/* Nobody drives the demo: no pedals over its caption on a touch screen. */
.pocabinet-race--demo .pocabinet-touch[b-d8jx1cm5d8] { display: none; }

/* Each number punches in big and settles; GO! blows outward and fades. */
@keyframes pocabinet-count-pop-b-d8jx1cm5d8 {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); filter: blur(6px); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(0.94); filter: blur(0); }
    55% { transform: translate(-50%, -50%) scale(1.02); }
    100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
}

@keyframes pocabinet-go-burst-b-d8jx1cm5d8 {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); letter-spacing: 0; }
    18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2.4); letter-spacing: 0.3em; }
}

@keyframes pocabinet-redline-b-d8jx1cm5d8 {
    50% { filter: drop-shadow(0 0 10px rgba(255, 77, 77, 0.95)) brightness(1.35); }
}

@keyframes pocabinet-pos-swoosh-b-d8jx1cm5d8 {
    0% { opacity: 0; transform: translateX(-40%) skewX(-12deg) scale(1.25); filter: blur(5px); }
    60% { opacity: 1; transform: translateX(4%) skewX(3deg) scale(0.98); filter: blur(0); }
    100% { transform: none; }
}

@keyframes pocabinet-glint-b-d8jx1cm5d8 {
    to { transform: translateX(120%); }
}

@keyframes pocabinet-spin-b-d8jx1cm5d8 {
    to { transform: rotate(360deg); }
}

@keyframes pocabinet-damage-blink-b-d8jx1cm5d8 {
    50% { opacity: 0.25; }
}

@keyframes pocabinet-wreck-slam-b-d8jx1cm5d8 {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes pocabinet-limits-in-b-d8jx1cm5d8 {
    from { opacity: 0; transform: translateY(-0.4rem); }
    to { opacity: 1; transform: none; }
}

@keyframes pocabinet-hud-fade-b-d8jx1cm5d8 {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* The wheel and pedals keep clear of a landscape phone's notch and rounded corners. */
.pocabinet-touch[b-d8jx1cm5d8] {
    padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
}
/* /Features/PoCabinet/PoCabinetPaintShop.razor.rz.scp.css */
/* PoCabinetPaintShop — scoped styles for live 3D preview turntable, swatches, and livery chips. */

.pocabinet-paintshop-wrap[b-nah4r1l3v6] {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.pocabinet-paintshop__stage[b-nah4r1l3v6] {
    position: relative;
    width: 100%;
    height: 128px;
    border-radius: var(--radius-md, 8px);
    background:
        radial-gradient(ellipse at 50% 62%, rgba(56, 189, 248, 0.16) 0%, rgba(14, 18, 28, 0.75) 68%, rgba(8, 10, 16, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 8px 20px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.pocabinet-paintshop__canvas[b-nah4r1l3v6] {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
}

.pocabinet-paintshop__canvas:active[b-nah4r1l3v6] {
    cursor: grabbing;
}

.pocabinet-paintshop__hint[b-nah4r1l3v6] {
    position: absolute;
    right: 0.5rem;
    bottom: 0.35rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}

/* ─── Paint shop: four colour swatches in a row ───────────────────────────── */
.pocabinet-paintshop[b-nah4r1l3v6] {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 3rem));
    gap: 0.5rem;
}

.pocabinet-swatch[b-nah4r1l3v6] {
    aspect-ratio: 1 / 1;
    width: 100%;
    min-height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 48%), var(--swatch);
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    padding: 0;
    color: inherit;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.pocabinet-swatch:hover[b-nah4r1l3v6] {
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.pocabinet-swatch--selected[b-nah4r1l3v6] {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    box-shadow: 0 0 12px color-mix(in srgb, var(--swatch) 55%, transparent);
}

/* ─── Procedural livery selector pills ────────────────────────────────────── */
.pocabinet-liveries[b-nah4r1l3v6] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pocabinet-livery[b-nah4r1l3v6] {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
    cursor: pointer;
    transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}

.pocabinet-livery:hover[b-nah4r1l3v6] {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-primary);
}

.pocabinet-livery--selected[b-nah4r1l3v6] {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.75);
    color: #fff;
}
/* /Features/PoCabinet/PoCabinetPreRace.razor.rz.scp.css */
/* PoCabinetPreRace — the start card's tabbed setup: Track, Car, Settings. */
.pocabinet-prerace[b-wtfbx2c9l5] {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

/* A segmented strip, like the intro's own Controls / How to play tabs. */
.pocabinet-prerace__tabs[b-wtfbx2c9l5] {
    display: flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--color-border, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text) 5%, transparent);
    justify-self: start;
}

.pocabinet-prerace__tab[b-wtfbx2c9l5] {
    min-height: 2rem;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.pocabinet-prerace__tab:hover[b-wtfbx2c9l5] { color: var(--color-text); }

.pocabinet-prerace__tab:active[b-wtfbx2c9l5] { transform: scale(0.96); }

.pocabinet-prerace__tab[aria-selected="true"][b-wtfbx2c9l5] {
    background: var(--color-primary);
    color: var(--color-on-primary, white);
}

.pocabinet-prerace__tab:focus-visible[b-wtfbx2c9l5] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 2px;
}

.pocabinet-prerace__panel[b-wtfbx2c9l5] {
    min-width: 0;
    animation: pocabinet-prerace-in-b-wtfbx2c9l5 0.18s ease both;
}

/* The car and the settings scroll inside their panel, so the start card itself never does. */
.pocabinet-prerace__panel--Car[b-wtfbx2c9l5],
.pocabinet-prerace__panel--Settings[b-wtfbx2c9l5] {
    max-height: min(52dvh, 24rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.25rem;
}

.pocabinet-prerace__car h3[b-wtfbx2c9l5] {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.pocabinet-prerace__car p[b-wtfbx2c9l5] { margin: 0.6rem 0 0; font-size: 0.85rem; }

/* The bedroom's room-scan choice under the track list. */
.pocabinet-prerace__room[b-wtfbx2c9l5] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    margin-top: 0.4rem;
    font-size: 0.9rem;
}

.pocabinet-prerace__room small[b-wtfbx2c9l5] {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.pocabinet-prerace__pills[b-wtfbx2c9l5] {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--color-border, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text) 5%, transparent);
}

.pocabinet-prerace__pill[b-wtfbx2c9l5] { position: relative; cursor: pointer; }

.pocabinet-prerace__pill input[b-wtfbx2c9l5] {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.pocabinet-prerace__pill span[b-wtfbx2c9l5] {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
}

.pocabinet-prerace__pill:active span[b-wtfbx2c9l5] {
    transform: scale(0.95);
}

.pocabinet-prerace__pill input:checked + span[b-wtfbx2c9l5] {
    background: var(--color-primary);
    color: var(--color-on-primary, white);
    font-weight: 600;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--color-primary) 40%, transparent);
}

.pocabinet-prerace__pill input:focus-visible + span[b-wtfbx2c9l5] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 1px;
}

@media (pointer: coarse) {
    .pocabinet-prerace__tab[b-wtfbx2c9l5],
    .pocabinet-prerace__pill span[b-wtfbx2c9l5] { min-height: 44px; }
}

/* A phone on its side: the strip slims down with the rest of the card. */
@media (max-height: 560px) {
    .pocabinet-prerace[b-wtfbx2c9l5] { gap: 0.3rem; }
    .pocabinet-prerace__tab[b-wtfbx2c9l5] { min-height: 1.8rem; }
    .pocabinet-prerace__panel--Car[b-wtfbx2c9l5],
    .pocabinet-prerace__panel--Settings[b-wtfbx2c9l5] { max-height: 46dvh; }
}

@media (prefers-reduced-motion: reduce) {
    .pocabinet-prerace__panel[b-wtfbx2c9l5] { animation: none; }
    .pocabinet-prerace__tab[b-wtfbx2c9l5] { transition: none; }
    .pocabinet-prerace__tab:active[b-wtfbx2c9l5] { transform: none; }
}

@keyframes pocabinet-prerace-in-b-wtfbx2c9l5 {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}
/* /Features/PoCabinet/PoCabinetResults.razor.rz.scp.css */
/* PoCabinetResults — its own scoped styles (split from PoCabinetPage.razor.css). Shared
   bits (muted text, status lines, sector chips, screen-reader text) stay on the page as ::deep. */

/* ─── Results: podium, confetti, PB, laps ────────────────────────────────── */
/* ─── Telemetry chart ─────────────────────────────────────────────────────── */
.pocabinet-telemetry[b-rih318fn8a] {
    margin-top: 1rem;
}

/* The chart's title. */
.pocabinet-telemetry__head[b-rih318fn8a] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.pocabinet-telemetry h3[b-rih318fn8a] {
    margin: 0;
    font-size: 0.95rem;
}

.pocabinet-telemetry__chart[b-rih318fn8a] {
    display: block;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md, 6px);
    border: 1px solid var(--color-border, transparent);
    background: var(--color-background, transparent);
}

.pocabinet-telemetry__chart--empty[b-rih318fn8a] { display: none; }

.pocabinet-telemetry__summary[b-rih318fn8a] {
    margin: 0.5rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Standings: the podium (medals) and the rows below it in one compact list. No markers:
   each row writes its own place, and the list has gaps in it. */
.pocabinet-standings[b-rih318fn8a] {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--color-border, transparent);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
}

.pocabinet-standings > li[b-rih318fn8a] {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.9rem;
}

.pocabinet-standings > li:nth-child(even)[b-rih318fn8a] {
    background: color-mix(in srgb, var(--color-text) 4%, transparent);
}

.pocabinet-standings__podium[b-rih318fn8a] { font-weight: 600; }

.pocabinet-standings__pos[b-rih318fn8a] {
    font-variant-numeric: tabular-nums;
    color: var(--color-text-muted);
}

.pocabinet-standings__name[b-rih318fn8a] {
    overflow-wrap: anywhere;
}

.pocabinet-standings__detail[b-rih318fn8a] {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-align: right;
}

/* The 100-car solo field lists the top ten and the places round the player. */
.pocabinet-standings > .pocabinet-standings__gap[b-rih318fn8a] {
    display: block;
    padding: 0 0.7rem;
    text-align: center;
    letter-spacing: 0.3em;
    color: var(--color-text-muted);
}

.pocabinet-standings > .pocabinet-standings__me[b-rih318fn8a] {
    background: color-mix(in srgb, var(--color-primary) 14%, transparent);
    box-shadow: inset 3px 0 0 var(--color-primary);
    font-weight: 700;
}

/* Every lap: its three sectors and its time. */
.pocabinet-laps[b-rih318fn8a] {
    width: 100%;
    margin-top: 0.75rem;
    border-collapse: collapse;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.pocabinet-laps caption[b-rih318fn8a] {
    text-align: left;
    padding-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pocabinet-laps th[b-rih318fn8a],
.pocabinet-laps td[b-rih318fn8a] {
    padding: 0.2rem 0.3rem;
    text-align: center;
}

.pocabinet-laps thead th[b-rih318fn8a] {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border, transparent);
}

.pocabinet-laps tbody th[b-rih318fn8a] { color: var(--color-text-muted); font-weight: 600; }

.pocabinet-laps td:last-child[b-rih318fn8a] { font-weight: 700; text-align: right; }

.pocabinet-laps .pocabinet-sector[b-rih318fn8a] { min-width: 0; width: 100%; font-size: 0.8rem; }

/* The fastest lap that counted: a star, not a colour (no green on white passes AA). */
.pocabinet-laps__best td:last-child[b-rih318fn8a]::before { content: "★ "; }

/* The hero row: your place, big, then the headline and what the race earned. */
.pocabinet-results__hero[b-rih318fn8a] {
    display: flex;
    align-items: center;
    gap: 0.5rem 1.1rem;
}

.pocabinet-results__place[b-rih318fn8a] {
    flex: none;
    margin: 0;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-md, 10px);
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.pocabinet-results__place strong[b-rih318fn8a] { font-size: 2.2rem; }

/* Did not finish: the danger tint, no "/100" (a wreck is not a place). */
.pocabinet-results__place--dnf[b-rih318fn8a] {
    background: color-mix(in srgb, var(--color-error, #c0392b) 16%, transparent);
    color: var(--color-error, #c0392b);
}

.pocabinet-results__place small[b-rih318fn8a] { font-size: 0.85rem; color: var(--color-text-muted); }

.pocabinet-results__headline[b-rih318fn8a] { display: grid; gap: 0.35rem; min-width: 0; }

.pocabinet-results__headline h2[b-rih318fn8a] { margin: 0; font-size: 1.3rem; }

.pocabinet-results__headline h2 .pocabinet-muted[b-rih318fn8a] { font-size: 0.95rem; }

.pocabinet-results__chips[b-rih318fn8a] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

.pocabinet-results__chips:empty[b-rih318fn8a] { display: none; }

.pocabinet-chip[b-rih318fn8a] {
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--color-border, transparent);
    border-radius: 999px;
    font-size: 0.85rem;
}

.pocabinet-chip--pb[b-rih318fn8a],
.pocabinet-chip--good[b-rih318fn8a] {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    font-weight: 700;
}

.pocabinet-results__grid[b-rih318fn8a] {
    display: grid;
    gap: 0.75rem 1.5rem;
    margin-top: 0.75rem;
}

@media (min-width: 900px) {
    .pocabinet-results__grid[b-rih318fn8a] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
    .pocabinet-telemetry[b-rih318fn8a] { margin-top: 0; }
}

.pocabinet-debrief[b-rih318fn8a] {
    margin: 0.6rem 0 0;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-md, 8px);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.pocabinet-debrief__headline[b-rih318fn8a] {
    margin: 0 0 0.35rem;
    font-weight: 700;
}

.pocabinet-debrief__tips[b-rih318fn8a] {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.4;
}

/* ─── One card: the result's facts, the primary action, then the details ─── */
.pocabinet-results__facts[b-rih318fn8a] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.4rem;
    margin: 0;
}

.pocabinet-results__facts > div[b-rih318fn8a] { display: grid; gap: 0.05rem; }

.pocabinet-results__facts dt[b-rih318fn8a] {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pocabinet-results__facts dd[b-rih318fn8a] {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pocabinet-results__facts dd small[b-rih318fn8a] {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Faster reads from its minus sign; the tint is extra (no green on white passes AA). */
.pocabinet-results__delta--faster[b-rih318fn8a] { color: var(--color-primary); }

.pocabinet-results__delta--slower[b-rih318fn8a] { color: var(--color-text); }

.pocabinet-results__facts dd.pocabinet-results__delta--none[b-rih318fn8a] { color: var(--color-text-muted); font-size: 0.95rem; font-weight: 600; }

.pocabinet-results__actions[b-rih318fn8a] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.pocabinet-results__again[b-rih318fn8a] { min-width: 9rem; }

.pocabinet-results__actions .app-btn[b-rih318fn8a] {
    transition: transform 0.12s ease;
}

.pocabinet-results__actions .app-btn:active[b-rih318fn8a] { transform: scale(0.97); }

.pocabinet-results__more-toggle[b-rih318fn8a] { margin-left: auto; }

/* Shut by height, not display: the telemetry canvas keeps its width for race.js's chart. */
.pocabinet-results__details[b-rih318fn8a] {
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

.pocabinet-results__details--open[b-rih318fn8a] {
    height: auto;
    overflow: visible;
    visibility: visible;
    animation: pocabinet-results-open-b-rih318fn8a 0.2s ease both;
}

@media (prefers-reduced-motion: reduce) {
    .pocabinet-results__details--open[b-rih318fn8a] { animation: none; }
    .pocabinet-results__actions .app-btn[b-rih318fn8a] { transition: none; }
    .pocabinet-results__actions .app-btn:active[b-rih318fn8a] { transform: none; }
}

@keyframes pocabinet-results-open-b-rih318fn8a {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
/* /Features/PoCabinet/PoCabinetSettingsPanel.razor.rz.scp.css */
/* PoCabinetSettingsPanel — its own scoped styles (split from PoCabinetPage.razor.css). Shared
   bits (muted text, status lines, sector chips, screen-reader text) stay on the page as ::deep. */
.pocabinet-secondary[b-gj7h2ggb6g] {
    background: transparent;
    color: var(--color-text, inherit);
    border: 1px solid var(--color-border, currentColor);
    border-radius: var(--radius-md, 6px);
    padding: 0.45rem 0.9rem;
    margin-top: 0.75rem;
    cursor: pointer;
    font: inherit;
}

/* A button inside a row (the camera's Next view): no gap above it. */
.pocabinet-secondary.pocabinet-settings__inline[b-gj7h2ggb6g] { margin-top: 0; }

.pocabinet-secondary:hover[b-gj7h2ggb6g] { border-color: var(--color-primary); }

.pocabinet-secondary:active[b-gj7h2ggb6g] { transform: scale(0.97); }

.pocabinet-secondary[b-gj7h2ggb6g] { transition: transform 0.12s ease, border-color 0.15s ease; }

.pocabinet-pill span[b-gj7h2ggb6g] { transition: background-color 0.15s ease, color 0.15s ease; }

.pocabinet-pill:hover input:not(:checked) + span[b-gj7h2ggb6g] {
    background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.pocabinet-pill:active span[b-gj7h2ggb6g] { transform: scale(0.96); }

@media (prefers-reduced-motion: reduce) {
    .pocabinet-secondary[b-gj7h2ggb6g],
    .pocabinet-pill span[b-gj7h2ggb6g],
    .pocabinet-switch[b-gj7h2ggb6g],
    .pocabinet-switch[b-gj7h2ggb6g]::after {
        transition: none;
    }
    .pocabinet-secondary:active[b-gj7h2ggb6g],
    .pocabinet-pill:active span[b-gj7h2ggb6g] { transform: none; }
}

/* ─── Settings panel: groups of rows ─────────────────────────────────── */
.pocabinet-settings[b-gj7h2ggb6g] {
    display: grid;
    gap: 0.25rem;
}

.pocabinet-settings__group[b-gj7h2ggb6g] {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0.6rem 0 0.75rem;
    border: 0;
    border-top: 1px solid var(--color-border, transparent);
}

.pocabinet-settings__group:first-child[b-gj7h2ggb6g] { border-top: 0; }

.pocabinet-settings__group legend[b-gj7h2ggb6g] {
    padding: 0.4rem 0 0.2rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.pocabinet-settings__row[b-gj7h2ggb6g] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: space-between;
    flex-wrap: wrap;
    min-height: 2.5rem;
}

.pocabinet-settings__row > span:first-child[b-gj7h2ggb6g] {
    flex: 1 1 8rem;
}

.pocabinet-settings__row small[b-gj7h2ggb6g] {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.pocabinet-settings__row input[type="range"][b-gj7h2ggb6g] {
    flex: 1 1 8rem;
    accent-color: var(--color-primary);
    min-height: 2rem;
}

.pocabinet-settings__value[b-gj7h2ggb6g] {
    min-width: 3.2em;
    text-align: right;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* A row of radio pills: one bordered strip, the checked pill filled. */
.pocabinet-pills[b-gj7h2ggb6g] {
    display: inline-flex;
    padding: 2px;
    border: 1px solid var(--color-border, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text) 5%, transparent);
}

.pocabinet-pill[b-gj7h2ggb6g] {
    position: relative;
    cursor: pointer;
}

.pocabinet-pill input[b-gj7h2ggb6g] {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.pocabinet-pill span[b-gj7h2ggb6g] {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.88rem;
    white-space: nowrap;
}

.pocabinet-pill input:checked + span[b-gj7h2ggb6g] {
    background: var(--color-primary);
    color: var(--color-on-primary, white);
    font-weight: 600;
}

.pocabinet-pill input:focus-visible + span[b-gj7h2ggb6g] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 1px;
}

/* A checkbox drawn as a switch. */
.pocabinet-switch[b-gj7h2ggb6g] {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    position: relative;
    width: 2.6rem;
    height: 1.5rem;
    margin: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text) 22%, transparent);
    cursor: pointer;
    transition: background 0.15s ease;
}

.pocabinet-switch[b-gj7h2ggb6g]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.5rem - 6px);
    height: calc(1.5rem - 6px);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.pocabinet-switch:checked[b-gj7h2ggb6g] { background: var(--color-primary); }

.pocabinet-switch:checked[b-gj7h2ggb6g]::after { transform: translateX(1.1rem); }

.pocabinet-switch:focus-visible[b-gj7h2ggb6g] {
    outline: 2px solid var(--color-focus, currentColor);
    outline-offset: 2px;
}

@media (pointer: coarse) {
    .pocabinet-secondary[b-gj7h2ggb6g],
    .pocabinet-pill span[b-gj7h2ggb6g],
    .pocabinet-settings__row input[type="range"][b-gj7h2ggb6g] {
        min-height: 44px;
    }
}
/* /Features/PoCapitol/PoCapitolPage.razor.rz.scp.css */
.pc-root[b-6hu2it59up] {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    height: var(--gps-area-h);
    /* Never taller than the view: a 480px floor scrolled the page on a phone held sideways. */
    min-height: min(480px, var(--gps-area-h));
    overflow: hidden;
    color: #f3ead8;
    background: #182534;
    --rz-primary: #b98c45;
    --rz-primary-light: #d6b36f;
    --rz-border-radius: 6px;
    touch-action: manipulation;
}
.pc-scene[b-6hu2it59up] { position: absolute; inset: 0; touch-action: none; }
.pc-scene[b-6hu2it59up]  canvas { display: block; width: 100%; height: 100%; outline: none; }
.pc-scene[data-damaged="true"][b-6hu2it59up]::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 90px #b53c25; pointer-events: none; }
.pc-scene[data-interface-error][b-6hu2it59up]::before { content: attr(data-interface-error); position: absolute; z-index: 5; top: 45%; left: 10%; right: 10%; padding: 24px; color: #fff; background: #752f28; border-radius: 8px; }
.pc-film[b-6hu2it59up] { position: absolute; inset: 0; background: linear-gradient(90deg, #0c192bb8, transparent 70%); pointer-events: none; }
.pc-edition[b-6hu2it59up] { position: absolute; top: 24px; left: 32px; font-size: 15px; letter-spacing: 0.22em; font-weight: 800; }
.pc-edition span[b-6hu2it59up] { display: block; margin-top: 6px; color: #d3b77b; font-size: 9px; letter-spacing: 0.16em; }
.pc-crowd[b-6hu2it59up] { display: grid; gap: 4px; font-size: 10px; letter-spacing: 0.06em; color: #e4d7ba; }
.pc-crowd b[b-6hu2it59up] { color: #f0c978; font-size: 11px; }
.pc-context a[b-6hu2it59up] { display: block; margin-top: 8px; color: #dfc285; text-decoration: underline; }
.pc-context a:hover[b-6hu2it59up] { color: #fff; }
.pc-panel[b-6hu2it59up] { position: absolute; z-index: 3; padding: 28px; background: linear-gradient(155deg, #1d3047c9, #101d2cb8); border: 1px solid #d5b77c50; border-radius: 10px; box-shadow: inset 0 1px 0 #ffffff2e, inset 0 0 0 1px #ffffff0d, inset 0 -22px 44px #00000033, 0 22px 80px #06111b70; max-height: calc(100% - 110px); overflow-y: auto; }
.pc-panel[b-6hu2it59up] { -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
@media (prefers-reduced-transparency: reduce) {
    .pc-panel[b-6hu2it59up] { -webkit-backdrop-filter: none; backdrop-filter: none; background: #142232; }
}
.pc-root[b-6hu2it59up]  .rz-button, .pc-root[b-6hu2it59up]  .rz-selectbar-item { transition: box-shadow 180ms ease, background-color 180ms ease, transform 150ms ease; }
.pc-root[b-6hu2it59up]  .rz-button:hover, .pc-root[b-6hu2it59up]  .rz-selectbar-item:hover { box-shadow: 0 0 0 1px #e4c48255, 0 8px 26px #b98c4550; transform: translateY(-1px); }
/* A highlight under the cursor: ui.js writes where the pointer is on the control. */
.pc-root[b-6hu2it59up]  .rz-button:hover, .pc-root[b-6hu2it59up]  .rz-selectbar-item:hover { background-image: radial-gradient(circle at var(--pc-shine-x, 50%) var(--pc-shine-y, 0%), #ffffff3d, transparent 62%); }
.pc-root[b-6hu2it59up]  .rz-button:active { box-shadow: 0 0 0 1px #f2d79a99, 0 2px 10px #b98c4570; transform: scale(0.98); }
.pc-eyebrow[b-6hu2it59up] { display: block; color: #d4b87b; font-size: 10px; letter-spacing: 0.17em; font-weight: 700; }
.pc-panel h2[b-6hu2it59up] { font-family: Georgia, serif; font-weight: 400; font-size: clamp(32px, 3vw, 44px); line-height: 1.05; margin: 12px 0 15px; color: #f6f0e2; }
.pc-panel h2 em[b-6hu2it59up] { color: #dabe87; }
.pc-panel p[b-6hu2it59up] { font-size: 14px; line-height: 1.6; margin: 10px 0; color: #d0d5da; }
.pc-panel .pc-small[b-6hu2it59up] { font-size: 11px; line-height: 1.5; color: #afbec9; }

/* The start card sits on the themed surface, not the dark in-game panel: the tone above
   was tuned for #1d3047 and lands around 1.6:1 on white. Shared-card small print uses the
   theme's secondary text colour, which every other game's card already uses. */
.gps-intro-card .pc-small[b-6hu2it59up] { color: var(--color-text-secondary); font-size: 0.8rem; line-height: 1.45; }
.pc-small[b-6hu2it59up] { display: block; margin: 8px 0; }
.pc-actions[b-6hu2it59up] { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 18px 0 8px; }
.pc-panel a[b-6hu2it59up] { color: #e2c48a; font-size: 12px; }
.pc-panel details[b-6hu2it59up] { border-top: 1px solid #ffffff18; padding-top: 12px; margin-top: 18px; font-size: 11px; }
.pc-panel summary[b-6hu2it59up] { cursor: pointer; color: #b7c4ce; }
.pc-context p[b-6hu2it59up] { font-size: 12px; }
.pc-centered[b-6hu2it59up] { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 36px)); }
.pc-hud-eyebrow-row[b-6hu2it59up] { display: flex; align-items: center; gap: 8px; }
.pc-rec-pill[b-6hu2it59up] { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #ff5252; background: #ff525222; border: 1px solid #ff525255; padding: 1px 6px; border-radius: 4px; }
.pc-rec-pill i[b-6hu2it59up] { width: 6px; height: 6px; border-radius: 50%; background: #ff5252; animation: pc-rec-b-6hu2it59up 1.2s steps(2, jump-none) infinite; }
.pc-health-header[b-6hu2it59up], .pc-line-header[b-6hu2it59up] { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 10px; letter-spacing: 0.1em; color: #dfc285; }
.pc-progress-bar[b-6hu2it59up] { width: 100%; height: 7px; border-radius: 4px; background: #132435; overflow: hidden; display: block; }
.pc-time[b-6hu2it59up] { font-variant-numeric: tabular-nums; color: #ddc69b; font-size: 12.5px; }
.pc-progress[b-6hu2it59up] { display: flex; gap: 5px; margin-top: 6px; }
.pc-progress span[b-6hu2it59up] { height: 3px; width: 24px; border-radius: 2px; background: #263d4f; }
.pc-progress .pc-done[b-6hu2it59up] { background: #e4c482; }
.pc-crosshair[b-6hu2it59up] { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff6d8; font-size: 25px; text-shadow: 0 1px 5px #000; pointer-events: none; }
.pc-demo-chip[b-6hu2it59up] { display: flex; flex-direction: column; padding: 5px 12px; background: #0c1a29d0; border: 1px solid #d5b77c55; border-radius: 6px; backdrop-filter: blur(10px); pointer-events: auto; }
.pc-demo-chip strong[b-6hu2it59up] { color: #f2cf87; font-size: 10.5px; letter-spacing: 0.08em; }
.pc-demo-chip span[b-6hu2it59up] { color: #9cb1c2; font-size: 9.5px; }
.pc-beacon-chip[b-6hu2it59up] { padding: 5px 10px; background: #0c1a29cc; border: 1px solid #d5b77c44; border-radius: 6px; font-size: 10px; letter-spacing: 0.08em; color: #f6e5bb; backdrop-filter: blur(8px); }
.pc-hint-chip[b-6hu2it59up] { font-size: 10px; letter-spacing: 0.08em; color: #e4d7ba; text-shadow: 0 1px 4px #000; text-align: center; }
.pc-onthisday-chip[b-6hu2it59up] { display: flex; flex-direction: column; max-width: 320px; padding: 6px 12px; background: #0c1a29d0; border-right: 2px solid #7fa9d6; border-radius: 6px; font-size: 11px; line-height: 1.4; color: #d7dde2; backdrop-filter: blur(10px); pointer-events: auto; }
.pc-onthisday-chip .pc-eyebrow[b-6hu2it59up] { font-size: 9px; color: #9fc0e2; margin-bottom: 2px; }
.pc-onthisday-chip span[b-6hu2it59up] { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pc-touch[b-6hu2it59up] { display: none; }
.pc-scene[data-flash="true"][b-6hu2it59up]::after { content: ""; position: absolute; inset: 0; background: #fffdf2; opacity: 0.75; pointer-events: none; }
.pc-scene[data-hazard="gas"]:not([data-interface-error])[b-6hu2it59up]::before { content: ""; position: absolute; z-index: 1; inset: 0; background: #d7dacb59; backdrop-filter: blur(3px); pointer-events: none; }
.pc-scene[data-hazard="spray"]:not([data-interface-error])[b-6hu2it59up]::before { content: ""; position: absolute; z-index: 1; inset: 0; background: #c9762f40; backdrop-filter: blur(5px); pointer-events: none; }
.pc-phonecam .pc-film[b-6hu2it59up] { background: none; }
@keyframes pc-rec-b-6hu2it59up { to { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .pc-rec-pill i[b-6hu2it59up] { animation: none; } }
.pc-options[b-6hu2it59up] { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.pc-debug-close[b-6hu2it59up] { background: none; border: none; color: #a4b3bf; cursor: pointer; font-size: 13px; padding: 2px 6px; }
.pc-debug-close:hover[b-6hu2it59up] { color: #fff; }
@keyframes pc-fade-in-b-6hu2it59up { from { opacity: 0; } to { opacity: 1; } }
@media (pointer: coarse) {
    /* 76px clears the shared Stats chip, which sits in the same bottom-left corner. */
    .pc-touch[b-6hu2it59up] { display: flex; position: absolute; bottom: max(76px, env(safe-area-inset-bottom)); left: max(20px, env(safe-area-inset-left)); right: max(20px, env(safe-area-inset-right)); justify-content: space-between; align-items: end; pointer-events: none; }
    .pc-touch button[b-6hu2it59up] { width: 48px; height: 48px; border: 1px solid #dfc79780; border-radius: 10px; color: #f9e3b2; background: #142536b8; font-size: 20px; touch-action: none; pointer-events: auto; user-select: none; }
    .pc-dpad[b-6hu2it59up] { display: grid; grid-template-columns: repeat(3, 48px); gap: 4px; }
    .pc-dpad button:first-child[b-6hu2it59up] { grid-column: 2; }
    .pc-dpad button:nth-child(2)[b-6hu2it59up] { grid-column: 1; }
    .pc-touch .pc-fire[b-6hu2it59up] { width: 68px; height: 68px; border-radius: 50%; font-size: 13px; }
    /* Fire or push on the right, with the two grenades beside it showing what is left. */
    .pc-touch-actions[b-6hu2it59up] { display: flex; align-items: end; gap: 8px; pointer-events: none; }
    .pc-touch .pc-throw[b-6hu2it59up] { display: grid; place-content: center; width: 56px; height: 56px; border-radius: 50%; font-size: 9px; letter-spacing: 0.06em; line-height: 1.15; }
    .pc-throw small[b-6hu2it59up] { display: block; color: #fff; font-size: 14px; font-weight: 800; }
    .pc-touch button:disabled[b-6hu2it59up] { opacity: 0.4; }
    .pc-touch button:active:not(:disabled)[b-6hu2it59up] { background: #22405cd0; transform: scale(0.94); }
    /* The d-pad owns the bottom-left corner on a touchscreen, so the inspector moves up. */
    .pc-inspector-card[b-6hu2it59up] { top: max(64px, env(safe-area-inset-top)); bottom: auto; left: 50%; translate: -50% 0; }
    /* The 44px floor for the small controls: the inspector's close, the radar toggle. */
    .pc-debug-close[b-6hu2it59up], .pc-radar-toggle[b-6hu2it59up] { min-width: 44px; min-height: 44px; }
}
@media (max-width: 650px) {
    .pc-root[b-6hu2it59up] { min-height: min(420px, var(--gps-area-h)); }
    .pc-edition[b-6hu2it59up] { left: 18px; top: 15px; }
    .pc-edition span[b-6hu2it59up] { max-width: 180px; font-size: 8px; }
    .pc-panel h2[b-6hu2it59up] { font-size: 28px; }
}
@media (max-height: 650px) and (min-width: 651px) {
    .pc-panel h2[b-6hu2it59up] { font-size: 32px; margin: 8px 0; }
}

/* Atmospheric Weather Pill */
.pc-weather-pill[b-6hu2it59up] {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #0f1e2ec0;
    border: 1px solid #d5b77c44;
    border-radius: 4px;
    color: #cad8e2;
    font-size: 11px;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    white-space: nowrap;
    cursor: pointer;
    transition: all 160ms ease;
}
.pc-weather-pill:hover[b-6hu2it59up] {
    background: #172d42;
    border-color: #f2cf87;
    color: #fff;
    transform: translateY(-1px);
}

/* Tactical Radar & Heatmap HUD */
.pc-radar-header[b-6hu2it59up] {
    display: flex;
    justify-content: flex-end;
}
.pc-radar-toggle[b-6hu2it59up] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #0d1a27e0;
    border: 1px solid #d5b77c60;
    border-radius: 6px;
    color: #e4c793;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 180ms ease;
    box-shadow: 0 4px 16px #00000055;
}
.pc-radar-toggle:hover[b-6hu2it59up] {
    background: #172d42;
    border-color: #f2cf87;
    transform: translateY(-1px);
}
.pc-radar-toggle small[b-6hu2it59up] {
    font-size: 9px;
    color: #9ab2c4;
    font-weight: normal;
}
.pc-radar-body[b-6hu2it59up] {
    margin-top: 6px;
    padding: 8px;
    background: #070e17f2;
    border: 1px solid #d5b77c80;
    border-radius: 8px;
    box-shadow: 0 12px 32px #000000aa;
    backdrop-filter: blur(16px);
    animation: pc-fade-in-b-6hu2it59up 180ms ease;
}
.pc-radar-canvas[b-6hu2it59up] {
    display: block;
    width: 200px;
    height: 270px;
    border-radius: 4px;
    border: 1px solid #5a8bb855;
    cursor: crosshair;
}
.pc-radar-legend[b-6hu2it59up] {
    display: flex;
    justify-content: space-around;
    gap: 6px;
    margin-top: 6px;
    font-size: 9.5px;
    color: #a2b4c2;
}
.pc-radar-legend span[b-6hu2it59up] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pc-radar-legend i[b-6hu2it59up] {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.pc-radar-legend .dot-raider[b-6hu2it59up] { background: #54a0ff; }
.pc-radar-legend .dot-police[b-6hu2it59up] { background: #00d2d3; }
.pc-radar-legend .dot-heat[b-6hu2it59up] { background: #ff4757; }

/* Tactical Unit Inspector Card */
.pc-tab-hud[b-6hu2it59up] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pc-tab-hud-head[b-6hu2it59up] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.pc-tab-hud-head strong[b-6hu2it59up] {
    display: block;
    margin-top: 2px;
    font-size: 13px;
}
.pc-tab-bar[b-6hu2it59up] {
    width: 100%;
}
.pc-tab-meta[b-6hu2it59up] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.pc-tab-hud .pc-onthisday-chip[b-6hu2it59up] {
    max-width: none;
}
.pc-tab-radar[b-6hu2it59up] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.pc-tab-radar .pc-radar-canvas[b-6hu2it59up] {
    margin: 0 auto;
}
.pc-inspector-card[b-6hu2it59up] {
    position: absolute;
    bottom: max(50px, env(safe-area-inset-bottom));
    left: max(32px, env(safe-area-inset-left));
    z-index: 7;
    width: min(340px, calc(100vw - 64px));
    padding: 14px 16px;
    background: #0c1825f4;
    border: 1px solid #d5b77c90;
    border-radius: 8px;
    box-shadow: 0 16px 40px #000000aa, inset 0 1px 0 #ffffff22;
    backdrop-filter: blur(16px);
    color: #d1dbe2;
    font-size: 11px;
    animation: pc-slide-up-b-6hu2it59up 200ms ease;
}
@keyframes pc-slide-up-b-6hu2it59up {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pc-inspector-header[b-6hu2it59up] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ffffff18;
    padding-bottom: 6px;
    margin-bottom: 6px;
}
.pc-inspector-title[b-6hu2it59up] {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pc-inspector-title strong[b-6hu2it59up] {
    font-size: 12.5px;
    color: #f6eedb;
    letter-spacing: 0.05em;
}
.pc-badge[b-6hu2it59up] {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.pc-badge--police[b-6hu2it59up] { background: #0984e3; color: #fff; }
.pc-badge--raider[b-6hu2it59up] { background: #d63031; color: #fff; }
.pc-inspector-role[b-6hu2it59up] {
    font-size: 11px;
    color: #dfc285;
    font-weight: 600;
    margin-bottom: 4px;
}
.pc-inspector-status[b-6hu2it59up] {
    font-size: 10.5px;
    margin-bottom: 8px;
    color: #a4b7c6;
}
.pc-inspector-status b[b-6hu2it59up] {
    color: #55efc4;
    font-weight: normal;
}
.pc-inspector-metrics[b-6hu2it59up] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 8px;
}
.pc-inspector-metrics span[b-6hu2it59up] {
    display: block;
    font-size: 9.5px;
    color: #8fa5b5;
    margin-bottom: 3px;
}
.pc-inspector-meta[b-6hu2it59up] {
    font-size: 10px;
    line-height: 1.4;
    color: #92a4b2;
    border-top: 1px dotted #ffffff15;
    padding-top: 6px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pc-inspector-actions[b-6hu2it59up] {
    display: flex;
    gap: 8px;
}
.pc-harm[b-6hu2it59up] {
    color: #8fd3c7;
    letter-spacing: 0.02em;
}

/* ── Comfort, captions and the after-action report ── */

.pc-caption[b-6hu2it59up] {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    max-width: min(720px, calc(100% - 48px));
    padding: 8px 14px;
    color: #f7f2e6;
    background: #0b1622e8;
    border-left: 3px solid #d5b77c;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    pointer-events: none;
}
/* An empty caption keeps its place in the tree and is simply not drawn. */
.pc-caption--idle[b-6hu2it59up] { visibility: hidden; }
.pc-caption-tag[b-6hu2it59up] { margin-right: 8px; color: #9fc0e2; font-size: 9px; letter-spacing: 0.16em; font-weight: 700; }

.pc-range[b-6hu2it59up] { display: block; width: 100%; margin: 2px 0 10px; accent-color: #b98c45; }
/* These rows sit in the shared options sheet, which follows the app theme, so they take its
   colours instead of the in-game dark palette (pale text on a white sheet was unreadable). */
.pc-key-row[b-6hu2it59up] { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: inherit; }
.pc-key-select[b-6hu2it59up] { min-width: 110px; min-height: 32px; padding: 4px 8px; color: inherit; background: transparent; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 4px; font: inherit; font-size: 13px; }
.pc-key-select option[b-6hu2it59up] { color: #111; background: #fff; }

/* High contrast raises the HUD text and chip faces without recolouring the world. */
.pc-contrast .pc-hint-chip[b-6hu2it59up],
.pc-contrast .pc-crowd[b-6hu2it59up],
.pc-contrast .pc-time[b-6hu2it59up] { color: #fff; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.pc-contrast .pc-hint-chip[b-6hu2it59up] { font-weight: 700; letter-spacing: 0.1em; }
.pc-contrast .pc-onthisday-chip[b-6hu2it59up] { background: #04101ef2; border-right-color: #cfe3ff; }
.pc-contrast .pc-demo-chip[b-6hu2it59up],
.pc-contrast .pc-beacon-chip[b-6hu2it59up] { background: #04101ef2; }

.pc-report[b-6hu2it59up] { display: grid; gap: 10px; margin-top: 14px; }
.pc-report-chart[b-6hu2it59up] { width: 100%; overflow: hidden; border-radius: 6px; border: 1px solid #88888855; }
.pc-report-chart svg[b-6hu2it59up] { display: block; width: 100%; height: auto; }
.pc-report-facts[b-6hu2it59up] { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 14px; margin: 0; }
.pc-report-facts dt[b-6hu2it59up] { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-secondary); }
.pc-report-facts dd[b-6hu2it59up] { margin: 2px 0 0; font-size: 13px; }
.pc-report-actions[b-6hu2it59up] { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-tab-report[b-6hu2it59up] { margin-top: 12px; padding-top: 10px; border-top: 1px solid #ffffff1a; }
.pc-tab-report .pc-small[b-6hu2it59up] { margin: 4px 0 8px; }

@media (max-width: 650px) {
    .pc-caption[b-6hu2it59up] { bottom: 128px; font-size: 12px; }
}

/* ── Options sheet: four tabs instead of one long scroll ── */

.pc-opts[b-6hu2it59up]  .rz-tabview-nav { flex-wrap: wrap; }
/* Four tabs on one row in a 340px sheet, and choice bars that wrap instead of running off it. */
.pc-opts[b-6hu2it59up]  .rz-tabview-nav li button { padding: 10px 6px; font-size: 13px; letter-spacing: 0.02em; }
.pc-opts[b-6hu2it59up]  .rz-selectbar { display: flex; flex-wrap: wrap; max-width: 100%; }
.pc-opts[b-6hu2it59up]  .rz-tabview-panel { padding: 12px 2px 4px; }
.pc-opt-button[b-6hu2it59up] { margin-top: 12px; }
.pc-model-input[b-6hu2it59up] { min-width: 150px; }
/* These lines change length or appear late; holding their height keeps the card still. */
.pc-probe[b-6hu2it59up] { min-height: 1.5em; }
.pc-role-brief[b-6hu2it59up] { min-height: 3em; }
.pc-ammo[b-6hu2it59up] { margin: 6px 0 0; }

/* ── The debrief: what happened in three sentences, and what wrote them ── */

.pc-debrief[b-6hu2it59up] { display: grid; align-content: start; gap: 4px; min-height: 7.5em; padding: 10px 12px; border-left: 3px solid #b98c45; border-radius: 4px; background: color-mix(in srgb, currentColor 7%, transparent); }
.pc-debrief-head[b-6hu2it59up] { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.pc-debrief p[b-6hu2it59up] { margin: 0; font-size: 13px; line-height: 1.5; }
.pc-debrief[aria-busy="true"] p[b-6hu2it59up] { opacity: 0.7; }
.pc-debrief-meta[b-6hu2it59up] { font-family: ui-monospace, Consolas, monospace; font-size: 10px; line-height: 1.4; }
.pc-debrief-meta--warn[b-6hu2it59up] { font-weight: 700; }
.pc-debrief-meta--warn[b-6hu2it59up]::before { content: "⚠ "; }

/* The role picker shares the card's width on a phone: "Observer" ran off the right edge of a
   375px card. Equal segments, and a long label wraps inside its own segment. */
.pc-intro-opts[b-6hu2it59up]  #pc-role { display: flex; width: 100%; }
.pc-intro-opts[b-6hu2it59up]  #pc-role > .rz-button { flex: 1 1 0; min-width: 0; padding-inline: 0.4rem; white-space: normal; }
/* /Features/PoFighter/PoFighterPage.razor.rz.scp.css */
/* PoFighter practice room. The canvas takes the whole game area; the move list, the hit
   counter and the touch buttons float over the stage wall. The stage is always dark, so the
   panels use their own light-on-dark colours instead of the app theme's text tokens. The engine sets data-pf-device on the root (keys, pad or touch) and the is-active class on the move being played. */

.pf-room[b-k3ssrncv2u] {
    position: relative;
    width: 100%;
    height: var(--gps-area-h, 80vh);
    overflow: hidden;
    background: #232a45;
    user-select: none;
    -webkit-user-select: none;
}

.pf-canvas[b-k3ssrncv2u] {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.pf-error[b-k3ssrncv2u] {
    position: absolute;
    inset: 40% 16px auto;
    margin: 0;
    z-index: 2;
}

.pf-panel[b-k3ssrncv2u] {
    position: absolute;
    top: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    background: rgba(12, 15, 28, 0.72);
    color: #e8eaf2;
    font-size: var(--text-xs);
}

.pf-moves[b-k3ssrncv2u] {
    left: calc(10px + env(safe-area-inset-left));
}

.pf-moves ul[b-k3ssrncv2u] {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-moves li[b-k3ssrncv2u] {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 2px 6px;
    border-radius: 6px;
}

.pf-moves li.is-active[b-k3ssrncv2u] {
    background: var(--accent-amber);
    color: #1a1304;
    font-weight: 700;
}

.pf-ctl[b-k3ssrncv2u] {
    font-family: var(--font-mono);
    opacity: 0.8;
}

/* One control column at a time: keyboard by default, gamepad once a pad is used, none on touch. */
.pf-ctl-pad[b-k3ssrncv2u],
.pf-room[data-pf-device="pad"] .pf-ctl-keys[b-k3ssrncv2u],
.pf-room[data-pf-device="touch"] .pf-ctl-keys[b-k3ssrncv2u] {
    display: none;
}

.pf-room[data-pf-device="pad"] .pf-ctl-pad[b-k3ssrncv2u] {
    display: inline;
}

.pf-status[b-k3ssrncv2u] {
    right: calc(10px + env(safe-area-inset-right));
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-hits strong[b-k3ssrncv2u] {
    display: inline-block;
    min-width: 2ch;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
    color: var(--accent-amber);
}

.pf-chip[b-k3ssrncv2u] {
    min-height: 32px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaf2;
    font: inherit;
    cursor: pointer;
}

.pf-chip[aria-pressed="true"][b-k3ssrncv2u] {
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

/* Touch buttons: only where there is no keyboard, or once a touch button has been used. */
.pf-touch[b-k3ssrncv2u] {
    position: absolute;
    bottom: 14px;
    display: none;
    align-items: center;
    gap: 8px;
}

/* Sits above the shell's Stats chip in the bottom-left corner. */
.pf-touch-move[b-k3ssrncv2u] {
    left: calc(14px + env(safe-area-inset-left));
    bottom: 58px;
}

.pf-touch-attack[b-k3ssrncv2u] {
    right: calc(14px + env(safe-area-inset-right));
}

.pf-touch-stack[b-k3ssrncv2u] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-touch button[b-k3ssrncv2u] {
    min-width: 58px;
    min-height: 52px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    background: rgba(12, 15, 28, 0.6);
    color: #fff;
    font: inherit;
    font-weight: 700;
    touch-action: none;
}

.pf-touch button:active[b-k3ssrncv2u] {
    background: var(--accent-amber);
    color: #1a1304;
}

.pf-room[data-pf-device="touch"] .pf-touch[b-k3ssrncv2u] {
    display: flex;
}

.pf-select[b-k3ssrncv2u] {
    min-height: 32px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(12, 15, 28, 0.85);
    color: #e8eaf2;
    font: inherit;
}

.pf-studio[b-k3ssrncv2u] {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 10, 20, 0.84);
}

.pf-studio-card[b-k3ssrncv2u] {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: #14192e;
    color: #e8eaf2;
}

.pf-studio-head[b-k3ssrncv2u] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pf-studio-head h2[b-k3ssrncv2u] {
    margin: 0;
    font-size: 1.1rem;
}

.pf-studio-status[b-k3ssrncv2u] {
    margin: 8px 0 12px;
    font-size: var(--text-xs);
    color: #b7c2e2;
}

.pf-studio-body[b-k3ssrncv2u] {
    display: grid;
    gap: 14px;
}

.pf-studio-cams[b-k3ssrncv2u] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.pf-studio-video[b-k3ssrncv2u],
.pf-studio-preview[b-k3ssrncv2u] {
    width: 100%;
    height: 190px;
    border-radius: 10px;
    background: #0c0f1d;
    border: 1px solid rgba(255, 255, 255, 0.14);
    object-fit: cover;
}

.pf-studio-controls[b-k3ssrncv2u] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-studio-name[b-k3ssrncv2u] {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
}

.pf-studio-name input[b-k3ssrncv2u] {
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #0c0f1d;
    color: #fff;
}

.pf-studio-row[b-k3ssrncv2u],
.pf-studio-moves[b-k3ssrncv2u] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-upload[b-k3ssrncv2u] {
    display: inline-flex;
    align-items: center;
}

.pf-chip--primary[b-k3ssrncv2u] {
    border-color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.22);
    font-weight: 700;
}

@media (pointer: coarse) {
    .pf-touch[b-k3ssrncv2u] {
        display: flex;
    }

    .pf-chip[b-k3ssrncv2u] {
        min-width: 44px;
        min-height: 44px;
    }

    .pf-ctl-keys[b-k3ssrncv2u] {
        display: none;
    }
}

/* Small screens: the touch buttons already name the moves, so the list shrinks to the one
   move being played and leaves the stage clear. */
@media (max-width: 640px), (max-height: 480px) {
    .pf-panel[b-k3ssrncv2u] {
        top: 6px;
        padding: 5px 7px;
    }

    .pf-moves li:not(.is-active)[b-k3ssrncv2u] {
        display: none;
    }
}
/* /Features/PoMarbleRace/PoMarbleRacePage.razor.rz.scp.css */
/* Canvas overlays (countdown, standings, pads, the online card) float over the track, so they are
   dark glass in both colour schemes. The setup options render inside GameIntro's card and follow
   the theme tokens instead. */

.mr-wrap-row[b-56tygvcvz5] {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
}

.mr-wrap[b-56tygvcvz5] {
    /* Fill the game area: the three.js camera adapts to whatever aspect this ends up. */
    position: relative;
    width: 100%;
    height: min(calc(100dvh - 96px), 92dvh);
    min-height: 340px;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    margin: 0 auto;
}

/* width/height are load-bearing: scene.js sets an inline position:relative on this host, which
   voids the inset below. */
.mr-canvas-host[b-56tygvcvz5] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* scene.js sizes only the backing store (setSize(..., false)), so the element must be sized
   here — without this the canvas rendered at its attribute size, 1.5× the host on a 150%
   display, and overflow:hidden cut off the right and bottom of the track. The fade hides the
   first-frame flash. */
.mr-canvas-host canvas[b-56tygvcvz5] {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: mr-fade-in-b-56tygvcvz5 0.45s var(--ease-standard, ease-out) 0.15s forwards;
}

@keyframes mr-fade-in-b-56tygvcvz5 {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Scrim behind a centred panel (online waiting states, the retry card) ── */
.mr-scrim[b-56tygvcvz5] {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(3px);
    animation: mr-fade-in-b-56tygvcvz5 0.2s ease-out;
}

/* The colour words, coloured like the marbles they name (white mirrors GUEST_COLOR). */
.mr-red[b-56tygvcvz5] { color: #ef4444; text-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
.mr-white[b-56tygvcvz5] { color: #f8fafc; text-shadow: 0 0 12px rgba(248, 250, 252, 0.7); }

/* ── Pre-race panel: who you are, the download, the countdown, and online status (#20) ──
   One fixed-size panel, so nothing shifts as it moves from loading to counting (#33). */
.mr-prerace[b-56tygvcvz5] {
    position: absolute;
    top: 14px;
    left: 50%;
    z-index: 4;
    width: min(340px, calc(100% - 24px));
    padding: 10px 16px 12px;
    border-radius: 16px;
    background: rgba(8, 12, 24, 0.86);
    border: 1px solid rgba(168, 85, 247, 0.45);
    box-shadow: 0 6px 24px rgba(2, 6, 18, 0.5);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    text-align: center;
    transform: translateX(-50%);
    animation: mr-panel-in-b-56tygvcvz5 0.28s var(--ease-standard, ease-out);
}

.mr-prerace--center[b-56tygvcvz5] {
    position: relative;
    top: auto;
    left: auto;
    width: min(380px, 100%);
    transform: none;
    animation-name: mr-pop-in-b-56tygvcvz5;
}

@keyframes mr-panel-in-b-56tygvcvz5 {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes mr-pop-in-b-56tygvcvz5 {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.mr-prerace-title[b-56tygvcvz5] {
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.mr-prerace-kicker[b-56tygvcvz5] {
    margin: 0;
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.mr-prerace-line[b-56tygvcvz5] {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.mr-prerace-hint[b-56tygvcvz5] {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.mr-prerace-actions[b-56tygvcvz5] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.mr-num[b-56tygvcvz5] { font-variant-numeric: tabular-nums; }

/* Always laid out (full when not loading), so the panel never changes height. */
.mr-progress[b-56tygvcvz5] {
    height: 5px;
    margin-top: 8px;
    border-radius: 3px;
    background: rgba(51, 65, 85, 0.8);
    overflow: hidden;
}

.mr-progress i[b-56tygvcvz5] {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #a855f7, #22d3ee);
    transition: width 0.25s ease-out, opacity 0.4s ease;
}

.mr-progress.is-done i[b-56tygvcvz5] { opacity: 0.35; }

.mr-countdown-num[b-56tygvcvz5] {
    display: inline-block;
    min-width: 1.1em;
    color: #e2e8f0;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    animation: mr-tick-b-56tygvcvz5 1s ease-out;
}

@keyframes mr-tick-b-56tygvcvz5 {
    0% { transform: scale(1.35); color: #a855f7; }
    100% { transform: scale(1); color: #e2e8f0; }
}

.mr-chip-btn[b-56tygvcvz5] {
    font: inherit;
    font-size: 0.8rem;
    padding: 3px 12px;
    border-radius: 9999px;
    border: 1px solid rgba(168, 85, 247, 0.6);
    background: rgba(168, 85, 247, 0.15);
    color: #e9d5ff;
    cursor: pointer;
    transition: background 120ms ease, transform 90ms ease;
}

.mr-chip-btn:hover[b-56tygvcvz5] { background: rgba(168, 85, 247, 0.3); }
.mr-chip-btn:active[b-56tygvcvz5] { transform: scale(0.95); }

/* ── First-race tutorial (#36) ── */
.mr-tut-ring[b-56tygvcvz5] {
    position: absolute;
    z-index: 4;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border: 3px solid #fde047;
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(253, 224, 71, 0.7);
    pointer-events: none;
    animation: mr-ring-b-56tygvcvz5 1.4s ease-out infinite;
}

@keyframes mr-ring-b-56tygvcvz5 {
    0% { transform: scale(1.4); opacity: 0.2; }
    40% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.85; }
}

.mr-tutorial[b-56tygvcvz5] {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 5;
    width: min(420px, calc(100% - 24px));
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(8, 12, 24, 0.92);
    border: 1px solid rgba(253, 224, 71, 0.5);
    box-shadow: 0 6px 24px rgba(2, 6, 18, 0.55);
    color: #e2e8f0;
    font-size: 0.85rem;
    text-align: center;
    transform: translateX(-50%);
    animation: mr-panel-up-b-56tygvcvz5 0.3s var(--ease-standard, ease-out);
}

@keyframes mr-panel-up-b-56tygvcvz5 {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.mr-tutorial ul[b-56tygvcvz5] {
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 4px;
    text-align: left;
}

.mr-boost-swatch[b-56tygvcvz5] {
    display: inline-block;
    width: 22px;
    height: 12px;
    vertical-align: middle;
    border-radius: 3px;
    background: repeating-linear-gradient(115deg, #22d3ee 0 4px, #0e7490 4px 8px);
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.6);
}

/* ── Standings chip: place while racing, podium once it is known ── */
.mr-place[b-56tygvcvz5] {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 14px;
    background: rgba(8, 12, 24, 0.72);
    border: 1px solid rgba(34, 211, 238, 0.3);
    box-shadow: 0 4px 14px rgba(2, 6, 18, 0.45);
    backdrop-filter: blur(8px) saturate(1.15);
    color: #e2e8f0;
    font-family: var(--font-display);
    pointer-events: none;
}

.mr-place-line[b-56tygvcvz5] {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.mr-place-value[b-56tygvcvz5] {
    font-size: 1.05rem;
    font-weight: 800;
}

.mr-place-field[b-56tygvcvz5] {
    font-size: 0.75rem;
    color: #94a3b8;
}

.mr-split[b-56tygvcvz5] {
    padding: 1px 7px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: rgba(74, 222, 128, 0.14);
    color: #4ade80;
    animation: mr-pop-in-b-56tygvcvz5 0.22s ease-out;
}

.mr-split.is-slower[b-56tygvcvz5] {
    background: rgba(248, 113, 113, 0.14);
    color: #f87171;
}

.mr-place-winner[b-56tygvcvz5] {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #cbd5e1;
    animation: mr-fade-in-b-56tygvcvz5 0.3s ease-out;
}

.mr-podium[b-56tygvcvz5] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
    animation: mr-fade-in-b-56tygvcvz5 0.3s ease-out;
}

.mr-place-line + .mr-podium[b-56tygvcvz5] {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 4px;
}

.mr-podium-row[b-56tygvcvz5] {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    /* Rows slide in one after another as the podium lands (#26). */
    animation: mr-row-in-b-56tygvcvz5 0.32s var(--ease-standard, ease-out) both;
    animation-delay: calc((var(--i, 1) - 1) * 90ms);
}

@keyframes mr-row-in-b-56tygvcvz5 {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.mr-podium-dot[b-56tygvcvz5] {
    display: inline-block;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot);
    box-shadow: 0 0 6px var(--dot);
}

.mr-podium-name[b-56tygvcvz5] {
    font-weight: 700;
    min-width: 4.5rem;
}

.mr-podium-time[b-56tygvcvz5] {
    margin-left: auto;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.mr-medal[b-56tygvcvz5] {
    width: 1.15em;
    height: 1.15em;
}

.mr-medal-ribbon[b-56tygvcvz5] {
    fill: none;
    stroke: rgba(148, 163, 184, 0.85);
    stroke-width: 2.2;
    stroke-linecap: round;
}

.mr-medal-disc[b-56tygvcvz5] {
    fill: var(--mr-medal, #94a3b8);
    stroke: rgba(2, 6, 18, 0.55);
    stroke-width: 1;
}

.mr-medal-num[b-56tygvcvz5] {
    fill: rgba(12, 10, 4, 0.9);
    font-size: 8px;
    font-weight: 900;
}

.mr-medal--1[b-56tygvcvz5] { --mr-medal: #fbbf24; }
.mr-medal--2[b-56tygvcvz5] { --mr-medal: #cbd5e1; }
.mr-medal--3[b-56tygvcvz5] { --mr-medal: #d97706; }

/* ── Touch steering pads: any touch screen, either orientation ── */
.mr-nudge-pads[b-56tygvcvz5] {
    position: absolute;
    inset: auto 0 16px 0;
    z-index: 4;
    display: none;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
}

@media (pointer: coarse) {
    .mr-nudge-pads[b-56tygvcvz5] { display: flex; }
}

.mr-nudge-pad[b-56tygvcvz5] {
    pointer-events: auto;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1px solid rgba(251, 146, 60, 0.5);
    background: rgba(8, 12, 24, 0.6);
    color: #fb923c;
    font-size: 1.4rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: transform 0.1s ease, background 0.1s ease;
}

.mr-nudge-pad:active[b-56tygvcvz5] { transform: scale(0.9); background: rgba(251, 146, 60, 0.25); }

/* ── Setup options (inside the intro card; themed) ── */
.mr-setup[b-56tygvcvz5] {
    display: grid;
    gap: 6px;
    text-align: left;
}

.mr-setup-label[b-56tygvcvz5] {
    margin-top: 4px;
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.mr-setup-note[b-56tygvcvz5] {
    margin: 0;
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.mr-skins[b-56tygvcvz5],
.mr-weights[b-56tygvcvz5] {
    display: flex;
    gap: 6px;
}

/* A narrow phone (390px): five tracks stack three rows deep and the card overflowed by ~14px.
   Tighter options and gaps win back ~30px without dropping a line of information. */
@media (max-width: 480px) and (min-height: 561px) {
    .mr-setup[b-56tygvcvz5] { gap: 4px; }
    .mr-setup-label[b-56tygvcvz5] { margin-top: 2px; }
    .mr-opt[b-56tygvcvz5] { padding: 5px 6px; gap: 1px; }
}

/* A short screen (a phone on its side): one line an option, the small print dropped. */
@media (max-height: 560px) {
    .mr-setup[b-56tygvcvz5] { gap: 4px; }
    .mr-setup-label[b-56tygvcvz5] { margin-top: 0; }
    .mr-opt[b-56tygvcvz5] { padding: 4px 6px; }
    .mr-opt-hint[b-56tygvcvz5], .mr-setup-note[b-56tygvcvz5] { display: none; }
    .mr-skin-ball[b-56tygvcvz5] { width: 18px; height: 18px; }
}

.mr-opt[b-56tygvcvz5] {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 7px 6px;
    border-radius: 10px;
    font: inherit;
    text-align: center;
    color: var(--color-text-primary);
    background: var(--color-surface-hover);
    border: 1px solid rgba(168, 85, 247, 0.3);
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.mr-opt:hover:not(:disabled)[b-56tygvcvz5] { border-color: rgba(168, 85, 247, 0.7); }

.mr-opt.is-on[b-56tygvcvz5] {
    border-color: rgba(168, 85, 247, 0.95);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.16);
}

.mr-opt:disabled[b-56tygvcvz5] {
    cursor: default;
    opacity: 0.45;
    border-style: dashed;
}

.mr-opt-name[b-56tygvcvz5] {
    font-size: 0.85rem;
    font-weight: 700;
}

/* The small line on an option. An option's own background is the raised surface, which is
   lighter than the card, and the secondary text colour is tuned for the card (it measured
   4.03:1 on the option, under the 4.5:1 floor), so it reads through the primary colour. */
.mr-opt-hint[b-56tygvcvz5] {
    font-size: var(--text-xs);
    color: color-mix(in srgb, var(--color-text-primary) 80%, transparent);
}

/* A painted preview of each finish on the red marble. */
.mr-skin-ball[b-56tygvcvz5] {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #fecaca 0%, #ef4444 45%, #7f1d1d 100%);
    box-shadow: inset -3px -4px 7px rgba(0, 0, 0, 0.45);
}

.mr-skin--swirl .mr-skin-ball[b-56tygvcvz5] {
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0 3px, transparent 3px 8px),
        radial-gradient(circle at 32% 30%, #fecaca 0%, #ef4444 45%, #7f1d1d 100%);
}

.mr-skin--catseye .mr-skin-ball[b-56tygvcvz5] {
    background:
        linear-gradient(transparent 38%, rgba(20, 24, 36, 0.75) 40% 58%, transparent 60%),
        radial-gradient(circle at 32% 30%, #fecaca 0%, #ef4444 45%, #7f1d1d 100%);
}

.mr-skin--galaxy .mr-skin-ball[b-56tygvcvz5] {
    background:
        radial-gradient(circle at 70% 40%, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 40% 70%, #fff 0 1px, transparent 2px),
        radial-gradient(circle at 55% 25%, #fde68a 0 1px, transparent 2px),
        radial-gradient(circle at 32% 30%, #f472b6 0%, #b91c1c 50%, #3b0a0a 100%);
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.55), inset -3px -4px 7px rgba(0, 0, 0, 0.45);
}

.mr-skin--chrome .mr-skin-ball[b-56tygvcvz5] {
    background: linear-gradient(170deg, #ffe4e6 0%, #f87171 30%, #450a0a 52%, #b91c1c 70%, #fecaca 100%);
}


/* Narrow game slot (the shell is a `gps` inline-size container): the canvas takes the whole
   viewport budget. The max-heights break a resize feedback loop — a content-sized parent chain
   once let the canvas grow its own host until the page was 33M px tall. */
@container gps (max-width: 40rem) {
    .mr-wrap-row[b-56tygvcvz5] {
        flex: 1 1 auto;
        align-self: stretch;
        max-width: none;
        min-height: 0;
        max-height: var(--gps-area-h, 100dvh);
        overflow: hidden;
        position: relative;
    }
    .mr-wrap[b-56tygvcvz5] {
        flex: 1 1 auto;
        height: 100%;
        min-height: 0;
        max-height: var(--gps-area-h, 100dvh);
        border-radius: 0;
    }
    .mr-place[b-56tygvcvz5] { top: 8px; left: 8px; }
    .mr-prerace:not(.mr-prerace--center)[b-56tygvcvz5] { top: 8px; }
    .mr-nudge-pad[b-56tygvcvz5] { width: 50px; height: 50px; }
}

/* ── Online: lobby card, series ── */
.mr-lobby[b-56tygvcvz5] {
    width: min(520px, 100%);
    max-height: 100%;
    overflow-y: auto;
}

.mr-lobby-pick[b-56tygvcvz5] {
    display: grid;
    gap: 6px;
}

.mr-lobby-pick select[b-56tygvcvz5] {
    width: 100%;
}

.mr-series[b-56tygvcvz5] {
    margin-top: 6px;
    font-weight: 700;
}

/* ── The picked track: a glyph of the course beside its description (#35) ── */
.mr-track-pick[b-56tygvcvz5] {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mr-track-glyph[b-56tygvcvz5] {
    flex: none;
    width: 64px;
    height: 34px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.9);
}

.mr-track-glyph path[b-56tygvcvz5] {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Settings drawer (#19) ── */
.mr-settings[b-56tygvcvz5] {
    display: grid;
    gap: 4px;
}

.mr-setting[b-56tygvcvz5] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 2px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-text-secondary) 20%, transparent);
    cursor: pointer;
}

.mr-setting-text[b-56tygvcvz5] {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.mr-setting-name[b-56tygvcvz5] { font-weight: 700; }

.mr-setting-hint[b-56tygvcvz5] {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.mr-switch[b-56tygvcvz5] {
    flex: none;
    appearance: none;
    position: relative;
    width: 40px;
    height: 22px;
    margin: 0;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--color-text-secondary) 45%, transparent);
    cursor: pointer;
    transition: background 150ms ease;
}

.mr-switch[b-56tygvcvz5]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 150ms var(--ease-standard, ease-out);
}

.mr-switch:checked[b-56tygvcvz5] { background: #7c3aed; }
.mr-switch:checked[b-56tygvcvz5]::after { transform: translateX(18px); }

.mr-switch:focus-visible[b-56tygvcvz5] {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

.mr-seg[b-56tygvcvz5] {
    flex: none;
    display: inline-flex;
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 9999px;
    overflow: hidden;
}

.mr-seg-btn[b-56tygvcvz5] {
    font: inherit;
    font-size: 0.8rem;
    padding: 3px 12px;
    border: 0;
    background: transparent;
    color: var(--color-text-primary);
    cursor: pointer;
}

.mr-seg-btn.is-on[b-56tygvcvz5] {
    background: #7c3aed;
    color: #fff;
}

.mr-settings-track[b-56tygvcvz5] { margin-top: 8px; }

/* ── Result sheet (#37): the way on first, then the standings with your row picked out ── */
.mr-result[b-56tygvcvz5] {
    display: grid;
    gap: 8px;
}

.mr-result-head[b-56tygvcvz5] { font-weight: 800; }

.mr-result-table[b-56tygvcvz5] {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.mr-result-table td[b-56tygvcvz5] {
    padding: 3px 6px;
    text-align: left;
}

.mr-result-table td:first-child[b-56tygvcvz5] { width: 2.5em; }
.mr-result-table td:last-child[b-56tygvcvz5] { text-align: right; }

.mr-result-table tr[b-56tygvcvz5] {
    animation: mr-row-in-b-56tygvcvz5 0.3s var(--ease-standard, ease-out) both;
}

.mr-result-table tr.is-me td[b-56tygvcvz5] {
    font-weight: 800;
    background: rgba(239, 68, 68, 0.16);
}

.mr-result-run[b-56tygvcvz5] { color: var(--color-text-secondary); }

.mr-sr-only[b-56tygvcvz5] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ── Micro-interactions (#26): options and pads press in ── */
.mr-opt:active:not(:disabled)[b-56tygvcvz5],
.mr-seg-btn:active[b-56tygvcvz5] { transform: scale(0.97); }

.mr-opt[b-56tygvcvz5] { transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease, transform 90ms ease; }

/* ── Touch pads follow the device in use (#40): a touch shows them even on a fine pointer,
   and a keyboard or pad hides them on a touch laptop. ── */
.mr-input--touch .mr-nudge-pads[b-56tygvcvz5] { display: flex; }

@media (pointer: coarse) {
    .mr-input--keys .mr-nudge-pads[b-56tygvcvz5],
    .mr-input--pad .mr-nudge-pads[b-56tygvcvz5] { display: none; }
}

/* ── Small screens (#34): the chip keeps the top-left corner, the pre-race panel drops below it,
   and the pads keep clear of both. ── */
@media (max-width: 520px) {
    .mr-prerace:not(.mr-prerace--center)[b-56tygvcvz5] {
        top: 52px;
        padding: 8px 12px 10px;
    }
    .mr-prerace-title[b-56tygvcvz5] { font-size: 0.95rem; }
    .mr-place[b-56tygvcvz5] { max-width: calc(100% - 70px); }
    .mr-tutorial[b-56tygvcvz5] { bottom: 84px; font-size: 0.8rem; }
}

/* A phone on its side: little height, so the panel and the chip share the top edge and the
   tutorial card sits between the pads. */
@media (max-height: 480px) {
    .mr-prerace:not(.mr-prerace--center)[b-56tygvcvz5] {
        top: 8px;
        left: auto;
        right: 8px;
        width: min(300px, 48%);
        padding: 6px 10px 8px;
        transform: none;
        animation-name: mr-fade-in-b-56tygvcvz5;
    }
    .mr-prerace-hint[b-56tygvcvz5] { display: none; }
    .mr-tutorial[b-56tygvcvz5] {
        bottom: 8px;
        width: min(420px, calc(100% - 150px));
    }
    .mr-tutorial ul[b-56tygvcvz5] { gap: 2px; margin-bottom: 6px; }
    .mr-nudge-pads[b-56tygvcvz5] { bottom: 10px; }
    .mr-nudge-pad[b-56tygvcvz5] { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    .mr-prerace[b-56tygvcvz5],
    .mr-tutorial[b-56tygvcvz5],
    .mr-scrim[b-56tygvcvz5],
    .mr-split[b-56tygvcvz5],
    .mr-place-winner[b-56tygvcvz5],
    .mr-podium[b-56tygvcvz5],
    .mr-podium-row[b-56tygvcvz5],
    .mr-result-table tr[b-56tygvcvz5],
    .mr-countdown-num[b-56tygvcvz5],
    .mr-tut-ring[b-56tygvcvz5] { animation: none; }
    .mr-opt[b-56tygvcvz5],
    .mr-chip-btn[b-56tygvcvz5],
    .mr-switch[b-56tygvcvz5],
    .mr-switch[b-56tygvcvz5]::after,
    .mr-progress i[b-56tygvcvz5] { transition: none; }
    .mr-opt:active:not(:disabled)[b-56tygvcvz5],
    .mr-seg-btn:active[b-56tygvcvz5],
    .mr-chip-btn:active[b-56tygvcvz5],
    .mr-nudge-pad:active[b-56tygvcvz5] { transform: none; }
}

/* An engine failure: the shared error card, on an opaque backing so it reads over any frame. */
.mr-error[b-56tygvcvz5] {
    width: min(420px, 100%);
    border-radius: var(--radius-lg);
    background: var(--color-bg);
}

.mr-error-line[b-56tygvcvz5] {
    margin: 0 0 var(--space-2);
}

/* The steer pads keep clear of the home bar and a landscape notch. */
.mr-nudge-pads[b-56tygvcvz5] {
    margin-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Coarse pointers: chips and segmented choices at least 44px tall. */
@media (pointer: coarse) {
    .mr-chip-btn[b-56tygvcvz5],
    .mr-seg-btn[b-56tygvcvz5] {
        min-height: 44px;
        min-width: 44px;
    }
}
/* /Features/PoMule/PoMulePage.razor.rz.scp.css */
/* PoMule. The canvas fills the page and draws the whole game in the manner of the Atari 800
   original (see js/pomule/render.js). The few Blazor parts that sit over it (start card, bid
   card, role and speed buttons, standings) are dressed to match: flat colours, square
   corners, block capitals. Child components and everything Radzen or the renderer creates
   are reached with ::deep. */

.pm-root[b-1s3g27kief] {
    --pm-ground: #dcdce0;
    --pm-ink: #000;
    --pm-text: #585858;
    --pm-orange: #c86000;
    --pm-card: #b07810;
    --pm-card-ink: #3c1800;
    --pm-blue: #1c48a8;

    position: relative;
    width: 100%;
    /* --gps-area-h is published by the shell (viewport minus the top bar). A percentage
       height would resolve against a flex item with no definite height and collapse. */
    height: var(--gps-area-h, 80vh);
    min-height: 0;
    overflow: hidden;
    background: var(--pm-ground);
    color: var(--pm-text);
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pm-canvas-host[b-1s3g27kief] {
    position: absolute;
    inset: 2.5rem 0 var(--kiosk-clearance, 0px);
}

.pm-canvas-host[b-1s3g27kief]  .pm-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.pm-failed[b-1s3g27kief] {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: grid;
    place-content: center;
    gap: 0.75rem;
    text-align: center;
    background: var(--pm-ground);
}

/* ── Radzen controls, squared off and flattened ── */
.pm-root[b-1s3g27kief]  .rz-button {
    border-radius: 0;
    box-shadow: none;
    font-family: inherit;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pm-root[b-1s3g27kief]  .rz-card {
    border-radius: 0;
    box-shadow: none;
    background: var(--pm-ground);
    color: var(--pm-ink);
    border: 4px solid var(--pm-ink);
}

/* ── Button bars over the canvas: auction side, demo speed ── */
.pm-bar[b-1s3g27kief] {
    position: absolute;
    left: 50%;
    bottom: 26%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    background: var(--pm-ground);
    border: 4px solid var(--pm-ink);
}

/* Inside the canvas's title line: in a demo nothing is drawn at the left of that line (the
   month's clock is at the right), so the bar reads as part of the game instead of floating in
   the band above it. Kept slim so it stays inside that line and off the first row of plots. */
.pm-bar--speed[b-1s3g27kief] {
    left: 8px;
    right: auto;
    top: calc(2.5rem + 2px);
    padding: 0 0.25rem;
    border-width: 2px;
    bottom: auto;
    transform: none;
}

/* The speed chips in the game's own ink on ground, with the chosen one in the arcade orange. */
.pm-bar--speed[b-1s3g27kief]  .rz-selectbar .rz-button {
    min-height: 0;
    min-width: 0;
    padding: 0 0.3rem;
    background: var(--pm-ground);
    color: var(--pm-ink);
    border: 2px solid var(--pm-ink);
}

.pm-bar--speed[b-1s3g27kief]  .rz-selectbar .rz-button.rz-state-active {
    background: var(--pm-orange);
    color: var(--pm-ground);
}

.pm-hint[b-1s3g27kief] {
    font-size: 0.75rem;
    color: var(--pm-text);
}

.pm-rotate[b-1s3g27kief] {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 40;
    place-content: center;
    padding: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--pm-orange);
    background: var(--pm-ground);
}

.pm-root[b-1s3g27kief]  .pm-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
}

.pm-root[b-1s3g27kief]  .gps-intro-card {
    color: var(--color-text-primary);
    font-family: var(--font-body, system-ui, sans-serif);
    font-weight: 400;
}

.pm-root[b-1s3g27kief]  .gps-intro-title {
    justify-content: center;
}

.pm-root[b-1s3g27kief]  .gps-intro-objective,
.pm-root[b-1s3g27kief]  .gps-intro-controls,
.pm-root[b-1s3g27kief]  .gps-intro-controls p {
    color: var(--color-text-secondary);
}

.pm-root[b-1s3g27kief]  .gps-intro-section-label,
.pm-root[b-1s3g27kief]  .pm-species-label {
    color: var(--color-text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-align: center;
}

.pm-root[b-1s3g27kief]  .pm-species {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Continue the saved match or start a new one: two radio chips. */
.pm-root[b-1s3g27kief]  .pm-continue {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.pm-root[b-1s3g27kief]  .pm-continue label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pm-root[b-1s3g27kief]  .pm-continue label:has(input:checked) {
    background: var(--accent-soft);
    color: var(--color-text-primary);
}

/* Radzen lays a data list out as a column; the picker wants a grid so all eight species
   fit the card without scrolling. */
.pm-root[b-1s3g27kief]  .pm-species ul.rz-datalist-data {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0;
}

.pm-root[b-1s3g27kief]  .pm-species ul.rz-datalist-data > li {
    padding: 0;
    margin: 0 !important;
    background: none;
    box-shadow: none;
}

.pm-root[b-1s3g27kief]  .pm-species-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    height: 100%;
    min-height: 44px;
    padding: 0.3rem 0.45rem;
    text-align: left;
    font: inherit;
    color: var(--color-text-primary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pm-root[b-1s3g27kief]  .pm-species-cash {
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.pm-root[b-1s3g27kief]  .pm-species-trait {
    display: none;
    color: var(--color-text-secondary);
    font-size: 0.68rem;
    line-height: 1.2;
    text-transform: none;
}

.pm-root[b-1s3g27kief]  .pm-species-picked {
    display: block;
    margin: 0;
    text-align: center;
    font-size: 0.75rem;
    text-transform: none;
}

/* A phone, or a short screen: the card's logo shrinks, and the species cards drop their
   trait to the one line under the grid. */
@media (max-width: 520px), (max-height: 560px) {
            .pm-root[b-1s3g27kief]  .pm-species-card { min-height: 0; padding: 0.2rem 0.4rem; }
    .pm-root[b-1s3g27kief]  .pm-species-trait { display: none; }
    .pm-root[b-1s3g27kief]  .pm-species-picked { display: block; }
}

@media (max-height: 560px) {
            .pm-root[b-1s3g27kief]  .pm-species-label { display: none; }
    .pm-root[b-1s3g27kief]  .pm-species { gap: 0.3rem; }
    .pm-root[b-1s3g27kief]  .pm-species-name { font-size: 0.75rem; }
    .pm-root[b-1s3g27kief]  .pm-species-cash { font-size: 0.7rem; }
}

.pm-root[b-1s3g27kief]  .pm-species-card.pm-species-card--on {
    background: var(--accent-soft);
    border-color: var(--color-accent);
    color: var(--color-text-primary);
}

.pm-root[b-1s3g27kief]  .pm-species-card.pm-species-card--on .pm-species-cash,
.pm-root[b-1s3g27kief]  .pm-species-card.pm-species-card--on .pm-species-trait {
    color: var(--color-text-primary);
}

.pm-root[b-1s3g27kief]  .pm-standings-hint {
    font-size: 0.75rem;
    color: var(--pm-text);
}

/* ── Classic rules switch ── */
.pm-root[b-1s3g27kief]  .pm-classic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    color: var(--color-text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}

/* ── Standings: the "status summary" screen ── */
/* A native <dialog> (see PoMuleStandings): the dialog itself is the full-cover scrim and
   the card sits centred in it, so the UA's dialog box (border, padding, a max size
   inset from the edges) is reset. Shown modal it is in the top layer and covers the
   viewport; shown open (a demo) it covers the game area as before. */
.pm-root[b-1s3g27kief]  .pm-standings {
    position: absolute;
    inset: 0;
    z-index: 8;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    color: inherit;
    display: grid;
    place-items: center;
    padding: 0.75rem;
    background: rgba(220, 220, 224, 0.9);
}

.pm-root[b-1s3g27kief]  .pm-standings:not([open]) { display: none; }

.pm-root[b-1s3g27kief]  .pm-standings::backdrop { background: transparent; }

.pm-root[b-1s3g27kief]  .pm-standings-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: min(100%, 760px);
    max-height: 100%;
    padding: 0.6rem 0.9rem;
    overflow-y: auto;
}

.pm-root[b-1s3g27kief]  .pm-standings-grid {
    max-height: clamp(200px, 46vh, 380px);
    overflow-y: auto;
}

.pm-root[b-1s3g27kief]  .pm-standings .rz-grid-table td,
.pm-root[b-1s3g27kief]  .pm-standings .rz-grid-table th {
    padding-top: 0.16rem !important;
    padding-bottom: 0.16rem !important;
}

.pm-root[b-1s3g27kief]  .pm-standings-head,
.pm-root[b-1s3g27kief]  .pm-standings-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.pm-root[b-1s3g27kief]  .pm-standings-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--pm-orange);
}

.pm-root[b-1s3g27kief]  .pm-standings-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.8rem;
}

/* The grid inside it: flat, pale, square, in the page's type. */
.pm-root[b-1s3g27kief]  .pm-standings .rz-data-grid,
.pm-root[b-1s3g27kief]  .pm-standings .rz-grid-table,
.pm-root[b-1s3g27kief]  .pm-standings .rz-grid-table th,
.pm-root[b-1s3g27kief]  .pm-standings .rz-grid-table td {
    background: var(--pm-ground);
    color: var(--pm-ink);
    border-color: var(--pm-text);
    border-radius: 0;
    font-family: inherit;
    font-weight: 700;
}

.pm-root[b-1s3g27kief]  .pm-standings .rz-badge {
    border-radius: 0;
    font-family: inherit;
}

/* ── Touch pad (built by js/pomule/touch.js) ── */
.pm-canvas-host[b-1s3g27kief]  .pm-touch {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.pm-canvas-host[b-1s3g27kief]  .pm-stick {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.18);
    border: 4px solid var(--pm-ink);
    pointer-events: auto;
    touch-action: none;
}

.pm-canvas-host[b-1s3g27kief]  .pm-stick-nub {
    width: 40px;
    height: 40px;
    background: var(--pm-ink);
    pointer-events: none;
}

.pm-canvas-host[b-1s3g27kief]  .pm-touch-btn {
    position: absolute;
    font: 900 0.8rem ui-monospace, Consolas, monospace;
    text-transform: uppercase;
    color: var(--pm-ink);
    background: rgba(0, 0, 0, 0.18);
    border: 4px solid var(--pm-ink);
    pointer-events: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.pm-canvas-host[b-1s3g27kief]  .pm-touch-dash {
    right: 96px;
    bottom: 14px;
    width: 64px;
    height: 64px;
}

.pm-canvas-host[b-1s3g27kief]  .pm-touch-act {
    right: 14px;
    bottom: 36px;
    width: 72px;
    height: 72px;
    background: var(--pm-orange);
}

.pm-canvas-host[b-1s3g27kief]  .pm-touch-btn--down {
    filter: brightness(1.3);
}

@media (max-width: 700px) {
    .pm-root[b-1s3g27kief]  .pm-species ul.rz-datalist-data {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (pointer: coarse) and (orientation: portrait) {
    .pm-rotate[b-1s3g27kief] {
        display: grid;
    }
}

/* Radzen's dark theme colours the grid's text for a dark surface; on the pale status
   screen every cell is forced to ink on ground. */
.pm-root[b-1s3g27kief]  .pm-standings .rz-data-grid,
.pm-root[b-1s3g27kief]  .pm-standings .rz-data-grid *:not(.pm-dot) {
    color: var(--pm-ink) !important;
    background-color: var(--pm-ground) !important;
    border-color: var(--pm-text) !important;
}

.pm-root[b-1s3g27kief]  .pm-standings .rz-chart text {
    fill: var(--pm-ink) !important;
}

/* The auction's Sell / Sit out / Buy buttons sit clear of the lanes. */
.pm-bar:not(.pm-bar--speed)[b-1s3g27kief] {
    left: 8px;
    top: 8px;
    bottom: auto;
    transform: none;
}
/* ── Phones: keep the touch pad clear of the notch and home bar, and every tap target
   at least 44px on a coarse pointer ── */
.pm-canvas-host[b-1s3g27kief]  .pm-stick {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
}

.pm-canvas-host[b-1s3g27kief]  .pm-touch-dash {
    right: calc(82px + max(14px, env(safe-area-inset-right)));
    bottom: max(14px, env(safe-area-inset-bottom));
}

.pm-canvas-host[b-1s3g27kief]  .pm-touch-act {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(22px + max(14px, env(safe-area-inset-bottom)));
}

.pm-bar:not(.pm-bar--speed)[b-1s3g27kief] {
    left: max(8px, env(safe-area-inset-left));
}

@media (pointer: coarse) {
    .pm-root[b-1s3g27kief]  .pm-bar .rz-button,
    .pm-root[b-1s3g27kief]  .pm-bar .rz-selectbar .rz-button,
    .pm-root[b-1s3g27kief]  .pm-standings-actions .rz-button,
    .pm-root[b-1s3g27kief]  .pm-species-card,
    .pm-root[b-1s3g27kief]  .pm-continue label,
    .pm-root[b-1s3g27kief]  .pm-classic {
        min-height: 44px;
        min-width: 44px;
    }
}
/* /Features/PoRacer/PoRacerHud.razor.rz.scp.css */
/* Glass panels over the race: a blurred, lightly tinted fill with a lit edge. --racer-glass and
   --racer-edge come from .racer-root (PoRacerPage.razor.css). */
.race-hud[b-db0jfpuzf5] { position: absolute; inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); pointer-events: none; color: var(--racer-ink); }
.race-strip[b-db0jfpuzf5] { position: absolute; top: 0; left: 0; display: grid; gap: 6px; width: max-content; max-width: 100%; }
.race-metrics[b-db0jfpuzf5], .race-laps[b-db0jfpuzf5], .race-standings[b-db0jfpuzf5] {
    background: var(--racer-glass); border: 1px solid var(--racer-edge); border-radius: 12px;
    backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3);
    box-shadow: inset 0 1px 0 #ffffff1a, 0 8px 24px #0005; }
.race-metrics[b-db0jfpuzf5] { position: relative; display: flex; align-items: center; gap: 4px 14px; padding: 6px 12px 10px; min-height: 44px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Instrument bars along the bottom of the strip. The widths come from custom properties that
   js/poracer/index.js writes each frame (--speed / --heat / --tow, all 0..1), so the gauges
   move at frame rate without Blazor rendering anything. */
.race-bars[b-db0jfpuzf5] { position: absolute; left: 10px; right: 10px; bottom: 4px; display: grid; gap: 2px; }
.race-bar[b-db0jfpuzf5] { height: 2px; border-radius: 2px; background: #ffffff17; overflow: hidden; }
.race-bar[b-db0jfpuzf5]::after { content: ''; display: block; height: 100%; width: calc(var(--v, 0) * 100%);
    background: currentColor; transition: width .1s linear; }
.race-bar--speed[b-db0jfpuzf5] { color: var(--racer-accent); --v: var(--speed, 0); }
.race-bar--heat[b-db0jfpuzf5] { color: var(--racer-warn); --v: var(--heat, 0); }
.race-bar--tow[b-db0jfpuzf5] { color: var(--racer-accent-line); --v: var(--tow, 0); }
/* The minimap sits under the pause button, out of the driving line. */
.race-minimap[b-db0jfpuzf5] { position: absolute; top: 56px; right: 0; width: 132px; height: 88px; border-radius: 12px;
    background: var(--racer-well); border: 1px solid var(--racer-edge); pointer-events: none;
    box-shadow: inset 0 1px 0 #ffffff1a, 0 8px 24px #0005; }
.race-metrics strong[b-db0jfpuzf5] { color: var(--racer-accent-line); }
.race-clock[b-db0jfpuzf5], .race-speed[b-db0jfpuzf5], .race-lap-now[b-db0jfpuzf5] { display: inline-block; text-align: right; }
.race-clock[b-db0jfpuzf5] { min-width: 5.2ch; }
.race-speed[b-db0jfpuzf5] { min-width: 3ch; }
/* Place badge. Keyed on the position in the markup, so a change of place replaces the element
   and this plays again: the badge flips over to the new number. */
.race-pos[b-db0jfpuzf5] { padding: 2px 10px; border-radius: 9px; background: var(--racer-accent); color: var(--racer-on-accent); font-weight: 800; animation: race-pos-flip-b-db0jfpuzf5 .45s cubic-bezier(.2, .9, .3, 1.3) both; transform-origin: 50% 50%; }
.race-pos strong[b-db0jfpuzf5] { color: inherit; font-size: 20px; }
.race-pos small[b-db0jfpuzf5] { opacity: .7; }
@keyframes race-pos-flip-b-db0jfpuzf5 { from { transform: perspective(240px) rotateX(-90deg); filter: brightness(1.8); } to { transform: none; filter: none; } }
.race-pause[b-db0jfpuzf5] { position: absolute; top: 0; right: 0; pointer-events: auto; min-width: 44px; min-height: 44px; border: 1px solid var(--racer-edge); border-radius: 12px; background: var(--racer-glass); backdrop-filter: blur(10px); color: var(--racer-ink); font: inherit; font-size: 12px; cursor: pointer; }
.race-pause:focus-visible[b-db0jfpuzf5] { outline: 3px solid var(--racer-ink); }
.race-laps[b-db0jfpuzf5] { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 5px 12px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--racer-muted); }
.race-laps strong[b-db0jfpuzf5] { color: var(--racer-ink); }
.race-laps em[b-db0jfpuzf5] { margin-left: 5px; font-style: normal; color: var(--racer-warn); }
/* Tow / boost / drift. Hidden until js/poracer/index.js shows one; the row takes no space while
   all three are. The drift chip fills left to right with the charge (--charge, 0-1) and turns
   to the accent once letting go would pay out. */
.race-chips[b-db0jfpuzf5] { display: flex; gap: 6px; }
.race-chips:not(:has(> :not([hidden])))[b-db0jfpuzf5] { display: none; }
.race-chip[b-db0jfpuzf5] { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    background: var(--racer-glass); border: 1px solid var(--racer-edge); color: var(--racer-accent-line); }
.race-chip--boost[b-db0jfpuzf5] { background: var(--racer-accent); color: var(--racer-on-accent); border-color: transparent; }
.race-chip--drift[b-db0jfpuzf5] { color: var(--racer-muted);
    background: linear-gradient(90deg, var(--racer-accent-fill) calc(var(--charge, 0) * 100%), var(--racer-glass) 0); }
.race-chip--drift.is-ready[b-db0jfpuzf5] { color: var(--racer-on-accent); border-color: transparent;
    background: linear-gradient(90deg, var(--racer-accent) calc(var(--charge, 0) * 100%), var(--racer-accent-fill) 0); }
.race-standings[b-db0jfpuzf5] { padding: 6px 10px; margin: 0; list-style: none; width: 200px; font-size: 14px; }
.race-standings li[b-db0jfpuzf5] { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.race-standings li span:first-child[b-db0jfpuzf5] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-driver[b-db0jfpuzf5] { color: var(--racer-accent-line); font-weight: 700; }
.race-touch[b-db0jfpuzf5] { display: none; position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); justify-content: space-between; gap: 12px; }
.race-touch > div[b-db0jfpuzf5] { display: flex; gap: 8px; align-items: end; }
.race-touch button[b-db0jfpuzf5] { min-width: 56px; min-height: 64px; border: 1px solid var(--racer-accent-line); border-radius: 14px; background: var(--racer-control); color: var(--racer-ink); font: inherit; font-weight: 700; touch-action: none; user-select: none; }
.race-touch button.is-pressed[b-db0jfpuzf5] { background: var(--racer-accent); color: var(--racer-on-accent); }
.race-touch button:focus-visible[b-db0jfpuzf5] { outline: 3px solid var(--racer-ink); }
@media (pointer: coarse) { .race-touch[b-db0jfpuzf5] { display: flex; } }
@media (max-width: 600px) {
    .race-hud[b-db0jfpuzf5] { inset: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
    .race-strip[b-db0jfpuzf5] { max-width: calc(100% - 52px); }
    .race-metrics[b-db0jfpuzf5] { gap: 2px 9px; padding: 6px 8px 10px; font-size: 13px; }
    .race-laps[b-db0jfpuzf5] { font-size: 12px; gap: 0 10px; }
    .race-standings[b-db0jfpuzf5] { width: 100%; max-width: 190px; font-size: 13px; }
    /* A phone has no room for a map beside the strip; the standings already carry the field. */
    .race-minimap[b-db0jfpuzf5] { display: none; }
}
/* The pause button and the pads get the same press response as every other control in the app. */
.race-pause[b-db0jfpuzf5] { transition: transform .12s cubic-bezier(.2, .9, .3, 1.4), background .12s ease, box-shadow .12s ease; }
.race-pause:hover[b-db0jfpuzf5] { background: var(--racer-control); }
.race-pause:active[b-db0jfpuzf5] { transform: scale(.93); box-shadow: inset 0 3px 10px #0006; }
.race-touch button[b-db0jfpuzf5] { transition: transform .09s ease, background .09s ease; }
.race-touch button.is-pressed[b-db0jfpuzf5] { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) {
    .race-pos[b-db0jfpuzf5] { animation: none; }
    .race-pause[b-db0jfpuzf5], .race-touch button[b-db0jfpuzf5], .race-bar[b-db0jfpuzf5]::after { transition: none; }
}
/* /Features/PoRacer/PoRacerPage.razor.rz.scp.css */
.racer-root[b-n66ozfeyi2] { position: relative; width: 100%; height: var(--gps-area-h); overflow: hidden; background: var(--racer-bg); color: var(--racer-text);
    /* The Racer palette, once. It is a per-game canvas palette (scheme-invariant, like the canvas
       itself), and every PoRacer stylesheet reads it from here rather than retyping raw hex. */
    --racer-bg: #09131e; --racer-text: #edf7ff; --racer-ink: #fff; --racer-muted: #cadbe9; --racer-faint: #a8bacd;
    --racer-panel: #102033f2; --racer-well: #07142099; --racer-line: #60839d66; --racer-control: #16304cdd;
    --racer-accent: #79e0fc; --racer-accent-line: #91e4ff; --racer-accent-fill: #19405a; --racer-on-accent: #071723;
    --racer-warn: #ffb38a; --racer-gold: #ffe9a6; --racer-alert: #592d12;
    --racer-gantry: #05090fe6; --racer-veil: #050b14b3; --racer-scrim: linear-gradient(135deg, #0b182ee8, #102a39c9);
    --racer-lamp: #ff2a2a; --racer-lamp-glow: #ff2a2ad0; --racer-lamp-core: #ffb0b0; --racer-lamp-off: #2a0b0b; --racer-lamp-go: #123016;
    --racer-glass: #0b182eb8; --racer-edge: #9fd4f02e; }
.racer-canvas[b-n66ozfeyi2] { width: 100%; height: 100%; display: block; }
.racer-root[b-n66ozfeyi2]  .gps-intro-card { color: var(--color-text-primary); }
.racer-card[b-n66ozfeyi2]  .lobby { background: var(--color-surface); color: var(--color-text-primary); }
.racer-start[b-n66ozfeyi2] { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; overflow-y: auto; background: var(--racer-scrim); }
.racer-card[b-n66ozfeyi2] { width: min(860px, 100%); padding: clamp(14px, 2.2vw, 22px); background: var(--racer-panel); border: 1px solid var(--racer-line); border-radius: 18px; box-shadow: 0 20px 60px #0006; display: grid; gap: 14px; }
.racer-card a[b-n66ozfeyi2] { color: var(--racer-accent-line); text-underline-offset: 4px; }
.racer-note[b-n66ozfeyi2] { margin: 0; color: var(--racer-muted); font-size: 14px; }

/* The opening card is the shared GameIntro. .racer-intro is display:contents and
   exists so the card can be widened from here: three track cards do not fit in 440px. The solo
   choices sit in the card as one Racer-palette panel (.racer-setup), because the track cards
   and paint chips are drawn for a dark surface and the shared card is light in the light theme. */
.racer-intro[b-n66ozfeyi2] { display: contents; }
.racer-setup[b-n66ozfeyi2] { width: 100%; box-shadow: none; text-align: left; color: var(--racer-text); }
/* The controls help is one paragraph of spans; on the card each is a line of its own, and the
   tips are the How to play tab's. */
.racer-intro[b-n66ozfeyi2]  .racer-controls { margin: 0; }
.racer-intro[b-n66ozfeyi2]  .racer-controls span { display: block; }
.racer-intro[b-n66ozfeyi2]  .racer-controls .for-tips { display: none; }
/* The setup on the start card, packed so the card never scrolls: the track cards drop their
   description (it is each card's tooltip) and stack the outline over the name, and the paint
   shop's preview shrinks. */
.racer-intro .racer-setup[b-n66ozfeyi2] { gap: 10px; padding: 12px; }
.racer-intro[b-n66ozfeyi2]  .track-card { grid-template-columns: 1fr; justify-items: start; gap: 4px; padding: 8px 10px; }
.racer-intro[b-n66ozfeyi2]  .track-card small { display: none; }
.racer-intro[b-n66ozfeyi2]  .track-outline { width: 64px; height: 38px; }
.racer-intro[b-n66ozfeyi2]  .paint-preview { width: 72px; height: 48px; }
/* A phone on its side: the small print and the car preview go. */
@media (max-height: 560px) {
    .racer-intro .racer-setup[b-n66ozfeyi2] { gap: 6px; padding: 8px 10px; }
    .racer-intro[b-n66ozfeyi2]  .track-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .racer-intro[b-n66ozfeyi2]  .track-picker legend, .racer-intro[b-n66ozfeyi2]  .track-best, .racer-intro[b-n66ozfeyi2]  .paint-preview,
    .racer-intro .racer-actions[b-n66ozfeyi2] { display: none; }
    .racer-intro[b-n66ozfeyi2]  .track-outline { width: 48px; height: 26px; }
    .racer-intro[b-n66ozfeyi2]  .racer-chips label { min-height: 28px; padding: 2px 10px; }
    .racer-intro[b-n66ozfeyi2]  .paint-swatch { width: 24px; height: 24px; }
}
@media (max-width: 760px) {
    .racer-intro[b-n66ozfeyi2]  .track-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .racer-intro[b-n66ozfeyi2]  .track-card strong { font-size: 13px; }
    .racer-intro[b-n66ozfeyi2]  .track-medals { font-size: 11px; }
}
/* A failed start (InlineError) inside the dark Racer panel: its text follows the panel, not the theme. */
.racer-card[b-n66ozfeyi2]  .app-error-inline { color: var(--racer-text); }

/* Chip groups (race type, pace, livery): radios that look like segmented buttons. ::deep because
   the paint shop is a child component and uses the same class. */
.racer-options[b-n66ozfeyi2] { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.racer-card[b-n66ozfeyi2]  .racer-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.racer-chips-label[b-n66ozfeyi2] { margin-right: 2px; font-size: 13px; color: var(--racer-faint); }
.racer-card[b-n66ozfeyi2]  .racer-chips label { position: relative; min-height: 34px; padding: 4px 12px; display: grid; place-items: center; border: 1px solid var(--racer-line); border-radius: 999px; font-size: 14px; cursor: pointer; background: var(--racer-well); }
.racer-card[b-n66ozfeyi2]  .racer-chips label:has(input:checked) { border-color: var(--racer-accent-line); background: var(--racer-accent-fill); color: var(--racer-text); }
.racer-card[b-n66ozfeyi2]  .racer-chips label:focus-within { outline: 2px solid var(--racer-ink); outline-offset: 2px; }
.racer-card[b-n66ozfeyi2]  .racer-chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }

.racer-actions[b-n66ozfeyi2] { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.racer-primary[b-n66ozfeyi2], .racer-ghost[b-n66ozfeyi2] { min-height: 44px; padding: 10px 20px; border: 1px solid var(--racer-accent); border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.racer-primary[b-n66ozfeyi2] { background: var(--racer-accent); color: var(--racer-on-accent); }
.racer-primary:disabled[b-n66ozfeyi2] { opacity: .6; cursor: wait; }
.racer-ghost[b-n66ozfeyi2] { background: var(--racer-panel); color: var(--racer-text); }

/* ── Micro-interactions ───────────────────────────────────────────────────
   Every control in the panel answers a press: the surface gives, a ripple spreads
   from the middle, and the label settles back on a spring. Purely CSS, so it
   costs nothing on a frame the game is already spending on the canvas. */
.racer-primary[b-n66ozfeyi2], .racer-ghost[b-n66ozfeyi2] {
    position: relative; overflow: hidden; isolation: isolate;
    transition: transform .13s cubic-bezier(.2, .9, .3, 1.35), background .15s ease,
        box-shadow .15s ease, border-color .15s ease; }
.racer-primary:hover:not(:disabled)[b-n66ozfeyi2], .racer-ghost:hover[b-n66ozfeyi2] { transform: translateY(-1px); box-shadow: 0 8px 22px #0007; border-color: var(--racer-accent-line); }
.racer-primary:active:not(:disabled)[b-n66ozfeyi2], .racer-ghost:active[b-n66ozfeyi2] { transform: scale(.965); box-shadow: inset 0 4px 14px #0007; }
.racer-primary[b-n66ozfeyi2]::after, .racer-ghost[b-n66ozfeyi2]::after {
    content: ''; position: absolute; inset: 50%; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, #ffffff70, #ffffff00 70%); opacity: 0; }
.racer-primary:active:not(:disabled)[b-n66ozfeyi2]::after, .racer-ghost:active[b-n66ozfeyi2]::after {
    inset: -45%; opacity: .85; transition: inset .3s ease-out, opacity .4s ease-out; }
.racer-card[b-n66ozfeyi2]  .racer-chips label {
    transition: transform .12s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.racer-card[b-n66ozfeyi2]  .racer-chips label:hover { border-color: var(--racer-accent-line); }
.racer-card[b-n66ozfeyi2]  .racer-chips label:active { transform: scale(.96); }
.racer-ghost-toggle input[b-n66ozfeyi2] { transition: transform .12s ease; }
.racer-ghost-toggle:active input[b-n66ozfeyi2] { transform: scale(.9); }
@media (prefers-reduced-motion: reduce) {
    .racer-primary[b-n66ozfeyi2], .racer-ghost[b-n66ozfeyi2], .racer-card[b-n66ozfeyi2]  .racer-chips label { transition: none; }
    .racer-primary:hover:not(:disabled)[b-n66ozfeyi2], .racer-ghost:hover[b-n66ozfeyi2] { transform: none; }
    .racer-primary[b-n66ozfeyi2]::after, .racer-ghost[b-n66ozfeyi2]::after { display: none; }
}

/* The lobby panel brings its own page padding and card; inside this card it is just a section. */
.racer-card[b-n66ozfeyi2]  .sp-page { padding: 0; max-width: none; }
.racer-card[b-n66ozfeyi2]  .sp-card.sp-card { background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; overflow: visible; }

.racer-connection[b-n66ozfeyi2] { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); padding: 10px 16px; background: var(--racer-alert); border-radius: 8px; }
:focus-visible[b-n66ozfeyi2] { outline: 3px solid var(--racer-ink); outline-offset: 4px; }
.sr-only[b-n66ozfeyi2] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Start gantry */
/* Lamps above the grid, the controls line below it: neither sits on the cars. The numeral is
   read out but not shown, because the lamps are the countdown; only "GO!" is drawn. */
.race-countdown[b-n66ozfeyi2] { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; text-align: center; padding: 96px 24px 28px; }
.race-gantry[b-n66ozfeyi2] { display: flex; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--racer-gantry); border: 1px solid #ffffff1f; box-shadow: 0 10px 30px #0008; }
.race-gantry i[b-n66ozfeyi2] { width: clamp(22px, 4.5vw, 38px); aspect-ratio: 1; border-radius: 50%; background: var(--racer-lamp-off); box-shadow: inset 0 0 0 2px #0008; transition: background .08s, box-shadow .08s; }
.race-gantry i.on[b-n66ozfeyi2] { background: var(--racer-lamp); box-shadow: 0 0 22px var(--racer-lamp-glow), inset 0 0 8px var(--racer-lamp-core); }
.race-gantry.is-go i[b-n66ozfeyi2] { background: var(--racer-lamp-go); }
.race-countdown strong[b-n66ozfeyi2] { font-size: clamp(44px, 9vw, 84px); line-height: 1; color: var(--color-accent-contrast); text-shadow: 0 3px 10px #000a; }
.race-countdown[b-n66ozfeyi2]  .racer-controls, .racer-pause-card[b-n66ozfeyi2]  .racer-controls { margin: 0; padding: 8px 14px; border-radius: 10px; background: var(--color-surface); color: var(--color-text-primary); font-size: 14px; display: grid; gap: 2px; }
.race-countdown[b-n66ozfeyi2]  .racer-controls { margin-top: auto; }
.racer-root[b-n66ozfeyi2]  .racer-controls .for-touch { display: none; }
.racer-root[b-n66ozfeyi2]  .racer-controls .for-pad, .racer-root[b-n66ozfeyi2]  .racer-controls .for-tips { color: var(--color-text-secondary); font-size: 12px; }

/* Pause / race menu */
.racer-root[b-n66ozfeyi2]  .racer-pause { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--racer-veil); backdrop-filter: blur(6px); }
.racer-pause-card[b-n66ozfeyi2] { width: min(420px, 100%); padding: 20px; display: grid; gap: 14px; border-radius: 16px; background: var(--racer-panel); border: 1px solid var(--racer-line); box-shadow: 0 20px 60px #0008; }
.racer-pause-card h2[b-n66ozfeyi2] { margin: 0; font-size: 22px; }
.racer-ghost-toggle[b-n66ozfeyi2] { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 15px; cursor: pointer; }
.racer-ghost-toggle input[b-n66ozfeyi2] { width: 20px; height: 20px; accent-color: var(--color-accent, #38bdf8); }

/* Finish: a chequered band sweeps across while the camera pulls back, then the results come in. */
.race-flag[b-n66ozfeyi2] { position: absolute; inset: 0; pointer-events: none;
    background: repeating-conic-gradient(#f4f7fa 0 25%, #10151c 0 50%) 0 0 / 56px 56px;
    mask-image: linear-gradient(105deg, #0000 0 38%, #000 46% 54%, #0000 62% 100%); mask-size: 320% 100%; mask-repeat: no-repeat;
    animation: race-flag-sweep-b-n66ozfeyi2 1.5s cubic-bezier(.4, 0, .2, 1) both; opacity: .92; }
@keyframes race-flag-sweep-b-n66ozfeyi2 { from { mask-position: 110% 0; } to { mask-position: -10% 0; } }
/* Letterbox bars close in with the flag: the race stops being a window and becomes a replay. */
.race-flag[b-n66ozfeyi2]::before, .race-flag[b-n66ozfeyi2]::after { content: ''; position: absolute; left: 0; right: 0; height: 9vh;
    background: #05080d; animation: race-bar-b-n66ozfeyi2 1.5s cubic-bezier(.4, 0, .2, 1) both; }
.race-flag[b-n66ozfeyi2]::before { top: 0; }
.race-flag[b-n66ozfeyi2]::after { bottom: 0; }
@keyframes race-bar-b-n66ozfeyi2 { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes race-bar-down-b-n66ozfeyi2 { from { transform: translateY(100%); } to { transform: none; } }
.race-flag[b-n66ozfeyi2]::after { animation-name: race-bar-down-b-n66ozfeyi2; }
/* Lights out: one white flash on GO, over the whole track, before the field is away. */
.race-countdown.is-go[b-n66ozfeyi2]::after { content: ''; position: fixed; inset: 0; background: #fff; opacity: 0;
    pointer-events: none; animation: race-lights-out-b-n66ozfeyi2 .42s ease-out both; }
@keyframes race-lights-out-b-n66ozfeyi2 { 0% { opacity: 0; } 12% { opacity: .5; } 100% { opacity: 0; } }

@media (pointer: coarse) {
    /* The 44px floor for the start card's chips and paint swatches (34px and 30px for a mouse). */
    .racer-card[b-n66ozfeyi2]  .racer-chips label { min-height: 44px; }
    .racer-card[b-n66ozfeyi2]  .paint-swatch { width: 44px; height: 44px; }
    .racer-root[b-n66ozfeyi2]  .racer-controls .for-keys, .racer-root[b-n66ozfeyi2]  .racer-controls .for-pad { display: none; }
    .racer-root[b-n66ozfeyi2]  .racer-controls .for-touch { display: inline; }
}
@media (max-width: 600px) { .racer-start[b-n66ozfeyi2] { padding: 8px; align-items: start; } .racer-actions[b-n66ozfeyi2] { gap: 12px; } .race-countdown[b-n66ozfeyi2] { padding: 214px 12px 104px; } }
@media (prefers-reduced-motion: reduce) { .race-flag[b-n66ozfeyi2], .race-flag[b-n66ozfeyi2]::before, .race-flag[b-n66ozfeyi2]::after, .race-countdown.is-go[b-n66ozfeyi2]::after { display: none; } }
/* /Features/PoRacer/PoRacerPaintShop.razor.rz.scp.css */
.racer-paintshop[b-m95oau9djh] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.paint-preview[b-m95oau9djh] { width: 96px; height: 64px; flex: none; border-radius: 10px; background: var(--racer-well); }
.paint-swatches[b-m95oau9djh] { display: flex; gap: 8px; }
/* --swatch is the one runtime value here: the colour the dot shows. */
.paint-swatch[b-m95oau9djh] { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--swatch); border: 2px solid #ffffff55; cursor: pointer; }
.paint-swatch.selected[b-m95oau9djh] { border-color: var(--racer-ink); box-shadow: 0 0 0 3px var(--racer-accent-line); }
.paint-swatch input[b-m95oau9djh] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.paint-swatch:focus-within[b-m95oau9djh] { outline: 2px solid var(--racer-ink); outline-offset: 4px; }
/* /Features/PoRacer/PoRacerResults.razor.rz.scp.css */
.race-results[b-olm0hfz8qd] { color: inherit; width: 100%; }
.result-headline[b-olm0hfz8qd] { margin: 0 0 4px; font-size: 24px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.result-medal[b-olm0hfz8qd], .result-pb[b-olm0hfz8qd] { font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
table[b-olm0hfz8qd] { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
caption[b-olm0hfz8qd] { text-align: left; padding: 8px 0; font-weight: 700; }
th[b-olm0hfz8qd], td[b-olm0hfz8qd] { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--color-border); }
td small[b-olm0hfz8qd] { margin-left: 6px; font-size: var(--text-xs); font-weight: 400; color: var(--color-text-secondary); white-space: nowrap; }
.local-driver[b-olm0hfz8qd] { color: var(--color-text-primary); background: var(--accent-soft); font-weight: 700; border-inline-start: 3px solid var(--accent-ink); }
.result-foot[b-olm0hfz8qd] { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; }
.result-chip[b-olm0hfz8qd] { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--color-border); }
.result-chip--saved[b-olm0hfz8qd] { border-color: var(--accent-success); }
.result-chip--rejected[b-olm0hfz8qd] { border-color: var(--accent-warning); }
/* A quiet button beside the save chip: the modal's own footer holds the two real actions. */
a[b-olm0hfz8qd] { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; } button[b-olm0hfz8qd] { min-height: 44px; }
@media (max-width: 480px) { th[b-olm0hfz8qd], td[b-olm0hfz8qd] { padding: 5px 3px; font-size: 12px; } }
/* /Features/PoRacer/PoRacerTrackSelector.razor.rz.scp.css */
.track-picker[b-8jbed88w5l] { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; border: 0; margin: 0; min-width: 0; }
.track-select[b-8jbed88w5l] { display: grid; gap: 6px; color: var(--racer-text); }
.track-select select[b-8jbed88w5l] { min-height: 44px; padding: 8px; border: 1px solid var(--racer-line); border-radius: 8px; background: var(--racer-well); color: var(--racer-text); font: inherit; }
legend[b-8jbed88w5l] { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--racer-faint); }
/* The radio covers the whole card: the card is the control, the dot is gone. */
.track-card[b-8jbed88w5l] { position: relative; display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--racer-line); border-radius: 12px; cursor: pointer; background: var(--racer-well); min-width: 0; }
.track-card.selected[b-8jbed88w5l] { border-color: var(--racer-accent-line); background: var(--racer-accent-fill); }
.track-card input[b-8jbed88w5l] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.track-picker:disabled .track-card[b-8jbed88w5l], .track-picker:disabled .track-card input[b-8jbed88w5l] { cursor: default; }
.track-picker:disabled .track-card:not(.selected)[b-8jbed88w5l] { opacity: .5; }
.track-outline[b-8jbed88w5l] { width: 76px; height: 46px; }
.track-outline path[b-8jbed88w5l] { fill: none; stroke: var(--racer-faint); stroke-width: 5; stroke-linejoin: round; }
.track-card.selected .track-outline path[b-8jbed88w5l] { stroke: var(--racer-accent-line); }
.track-text[b-8jbed88w5l] { min-width: 0; display: grid; gap: 2px; }
.track-card strong[b-8jbed88w5l] { color: var(--racer-text); font-size: 15px; }
.track-card small[b-8jbed88w5l] { color: var(--racer-muted); font-size: 12px; line-height: 1.3; }
.track-best[b-8jbed88w5l] { display: grid; font-size: 12px; color: var(--racer-muted); font-variant-numeric: tabular-nums; }
.track-best b[b-8jbed88w5l] { color: var(--racer-gold); }
.track-medals[b-8jbed88w5l] { opacity: .8; }
/* The day's weather on a track, when it is not clear: it changes the grip, so it is said before the race. */
.track-weather[b-8jbed88w5l] { margin: 0; font-size: 12px; color: var(--racer-accent-line); }
.track-card:focus-within[b-8jbed88w5l] { outline: 2px solid var(--racer-ink); outline-offset: 3px; }
@media (max-width: 760px) { .track-picker[b-8jbed88w5l] { grid-template-columns: 1fr; gap: 6px; } .track-card[b-8jbed88w5l] { padding: 8px 10px; } .track-card small[b-8jbed88w5l] { display: none; } }
/* /Features/PoVoxelStrike/PoVoxelStrikePage.razor.rz.scp.css */
/* An explicit width: without one the wrapper shrinks to the canvas's intrinsic 800px. */
.pvs-wrap[b-m83x1nfwdl] {
    display: flex;
    flex-direction: column;
    width: min(100%, 1180px);
    margin-inline: auto;
}

/* The canvas takes the full height: there is no status line under it. */
.pvs-canvas-host[b-m83x1nfwdl] {
    position: relative;
    width: 100%;
    height: min(74dvh, 700px);
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.pvs-canvas-host:fullscreen[b-m83x1nfwdl] {
    height: 100%;
    border-radius: 0;
    border: none;
}

/* ── Start card ──────────────────────────────────────────────────────────
   Borrows the shared intro card (.gps-intro-*, game-shell.css) for its shell; only what
   that card has no word for is styled here. */

.pvs-start[b-m83x1nfwdl] {
    width: min(94vw, 480px);
}

/* The lobby panel is a full page card everywhere else; inside this card it is a section. */
.pvs-start[b-m83x1nfwdl]  .sp-page {
    padding: 0;
    min-height: 0;
    align-self: stretch;
}

.pvs-start[b-m83x1nfwdl]  .sp-card {
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: none;
    width: 100%;
}

/* ── The one controls block (start card + pause dialog) ─────────────────── */

.pvs-controls[b-m83x1nfwdl] {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-align: left;
}

/* The start card's keycaps come from .gps-intro-controls; the pause dialog has no such
   wrapper, so the block carries its own. */
.pvs-pause .pvs-controls kbd[b-m83x1nfwdl] {
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-hover);
    font-size: var(--text-xs);
    color: var(--color-text-primary);
}

/* ── Settings (start card disclosure + pause dialog) ────────────────────── */

.pvs-settings[b-m83x1nfwdl] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.9rem;
    padding-top: 0.4rem;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    text-align: left;
}

.pvs-settings label[b-m83x1nfwdl] {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pvs-settings input[type="range"][b-m83x1nfwdl],
.pvs-settings select[b-m83x1nfwdl] {
    width: 100%;
    accent-color: var(--color-accent-solid);
}

.pvs-settings select[b-m83x1nfwdl] {
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font: inherit;
}

.pvs-settings small[b-m83x1nfwdl] { opacity: 0.75; }

/* ── HUD strip (Razor-rendered, so no ::deep) ───────────────────────────── */

/* Over-canvas text is ALWAYS light-on-dark: the 3D scene behind it is dark in both
   site themes, so theme tokens are wrong here — in light mode they resolve to dark
   text and the labels vanish against the arena. Fixed colors, not tokens, for everything drawn on top of the canvas. */
.pvs-hud[b-m83x1nfwdl] {
    position: absolute;
    /* safe-area: notched phones in landscape put a camera housing where the HUD sits */
    top: calc(0.6rem + env(safe-area-inset-top, 0px));
    left: calc(0.6rem + env(safe-area-inset-left, 0px));
    right: calc(0.6rem + env(safe-area-inset-right, 0px));
    display: flex;
    align-items: center;
    gap: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

/* Glassmorphism. backdrop-filter is the whole effect and it is NOT
   universally cheap: it forces the compositor to sample the layer beneath, so it is
   confined to this one strip and never applied to a full-screen element. @supports keeps
   the fallback honest -- where the filter is unavailable the strip falls back to a
   flatter, more opaque tint so the text stays readable rather than washing out. */
.pvs-glass[b-m83x1nfwdl] {
    padding: 0.4rem 0.65rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(232, 238, 248, 0.14);
    /* The inset highlight is what sells "pane of glass" rather than "grey box": a bright
       top edge and a dark bottom edge imply thickness. */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
                inset 0 -1px 0 rgba(0, 0, 0, 0.25),
                0 6px 18px rgba(0, 0, 0, 0.35);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .pvs-glass[b-m83x1nfwdl] {
        background: rgba(15, 23, 42, 0.28);
        -webkit-backdrop-filter: blur(14px) saturate(1.35);
        backdrop-filter: blur(14px) saturate(1.35);
    }
}

.pvs-bar[b-m83x1nfwdl] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 clamp(120px, 22vw, 210px);
}

.pvs-bar-label[b-m83x1nfwdl] {
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    color: rgba(232, 238, 248, 0.85);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.pvs-bar-track[b-m83x1nfwdl] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.65);
    overflow: hidden;
}

.pvs-bar-fill[b-m83x1nfwdl] {
    height: 100%;
    width: var(--fill, 0%);
    border-radius: 4px;
    transition: width 120ms linear;
}

.pvs-bar-hp[b-m83x1nfwdl] { background: var(--accent-success); }

.pvs-bar-value[b-m83x1nfwdl] {
    min-width: 2ch;
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    color: rgba(232, 238, 248, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Low-HP alarm: the whole HP row pulses and the number goes hot. */
.pvs-bar-low .pvs-bar-fill[b-m83x1nfwdl] { background: var(--accent-danger); }
.pvs-bar-low[b-m83x1nfwdl] { animation: pvs-pulse-b-m83x1nfwdl 0.8s ease-in-out infinite; }
.pvs-bar-low .pvs-bar-value[b-m83x1nfwdl] { color: #ff8484; font-weight: 700; }

@keyframes pvs-pulse-b-m83x1nfwdl {
    50% { opacity: 0.55; }
}

.pvs-hud-meta[b-m83x1nfwdl] {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: clamp(var(--text-xs), 1.8vw, var(--text-sm));
    color: rgba(232, 238, 248, 0.78);
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.pvs-hud-score-wrap[b-m83x1nfwdl] {
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.pvs-hud-score[b-m83x1nfwdl] {
    display: inline-flex;
    align-items: baseline;
    font-size: clamp(1rem, 2.6vw, var(--text-xl));
    font-weight: 700;
    color: #f4f7fd;
    font-variant-numeric: tabular-nums;
    transition: transform 0.22s cubic-bezier(0.22, 1.4, 0.36, 1), color 0.22s ease-out;
}

.pvs-hud-score-bump[b-m83x1nfwdl] {
    transform: scale(1.12);
    color: #ffd97a;
}

/* Odometer rolling digit columns (#20): the real digit character stays in the DOM for
   screen readers and text queries, while ::before rolls a 0-9 vertical ribbon. */
.pvs-odo-digit[b-m83x1nfwdl] {
    position: relative;
    display: inline-block;
    width: 1ch;
    height: 1.15em;
    line-height: 1.15em;
    overflow: hidden;
    vertical-align: bottom;
    color: transparent;
}

.pvs-odo-digit[b-m83x1nfwdl]::before {
    content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    white-space: pre;
    line-height: 1.15em;
    color: #f4f7fd;
    transform: translateY(calc(var(--d, 0) * -1.15em));
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.pvs-hud-score-bump .pvs-odo-digit[b-m83x1nfwdl]::before {
    color: #ffd97a;
}

.pvs-odo-sep[b-m83x1nfwdl] {
    display: inline-block;
    line-height: 1.15em;
    vertical-align: bottom;
}

/* "+N" kill popups arcing from the arena toward the score counter (#20). */
.pvs-pop[b-m83x1nfwdl] {
    position: absolute;
    right: 0;
    top: 100%;
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--accent-warning);
    font-variant-numeric: tabular-nums;
    animation: pvs-pop-arc-b-m83x1nfwdl 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    pointer-events: none;
}

@keyframes pvs-pop-arc-b-m83x1nfwdl {
    0% {
        transform: translate(var(--arc-x, -36px), 1.1rem) scale(0.75);
        opacity: 0;
    }
    28% {
        transform: translate(calc(var(--arc-x, -36px) * 0.55), -0.45rem) scale(1.16);
        opacity: 1;
    }
    100% {
        transform: translate(0, -1.55rem) scale(0.88);
        opacity: 0;
    }
}

/* Fullscreen lives on the strip now, not floating over the arena's corner. Under Pointer
   Lock nothing on the strip can be clicked (there is no cursor), so the pause dialog
   carries a second one; this is the one a touch player reaches. */
.pvs-hud-btn[b-m83x1nfwdl] {
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    width: 1.9rem;
    height: 1.9rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid rgba(232, 238, 248, 0.25);
    background: rgba(15, 23, 42, 0.4);
    color: rgba(232, 238, 248, 0.8);
    font-size: 0.95rem;
    cursor: pointer;
    transform: perspective(420px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background 0.16s ease, color 0.16s ease;
}

.pvs-hud-btn:hover[b-m83x1nfwdl] { color: #f4f7fd; background: rgba(15, 23, 42, 0.8); }

.pvs-hud-btn:active[b-m83x1nfwdl] {
    transform: perspective(420px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) scale(0.94);
}

.pvs-hud-btn:focus-visible[b-m83x1nfwdl] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

/* Down, waiting on a squadmate (online). */
.pvs-down[b-m83x1nfwdl] {
    position: absolute;
    left: 50%;
    bottom: 22%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
    min-width: min(80%, 260px);
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    background: rgba(40, 8, 8, 0.72);
    border: 1px solid rgba(255, 132, 132, 0.5);
    color: #f4f7fd;
    font-size: var(--text-sm);
    text-align: center;
    pointer-events: none;
}

.pvs-down strong[b-m83x1nfwdl] {
    font-size: var(--text-lg);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ff8484;
}

.pvs-down .pvs-bar-track[b-m83x1nfwdl] { align-self: stretch; flex: none; }

/* ── Pause dialog & Canvas Backdrop Ramp (#19) ─────────────────────────── */

.pvs-canvas-host[b-m83x1nfwdl]  canvas {
    transition: filter 0.32s cubic-bezier(0.22, 1, 0.36, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.pvs-canvas-host.pvs-is-paused[b-m83x1nfwdl]  canvas {
    filter: blur(6px) saturate(0.35) brightness(0.76);
    transform: scale(1.015);
}

/* Circular iris wipe when resuming play from pause (#19). */
.pvs-canvas-host.pvs-iris-opening[b-m83x1nfwdl]  canvas {
    animation: pvs-iris-wipe-b-m83x1nfwdl 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pvs-iris-wipe-b-m83x1nfwdl {
    0% {
        clip-path: circle(16% at 50% 50%);
        filter: blur(4px) saturate(0.5);
    }
    100% {
        clip-path: circle(135% at 50% 50%);
        filter: none;
    }
}

/* Start card voxel-dissolve transition overlay (#20): spawned by index.js when OK is clicked. */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-voxel-dissolve {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 2px;
    pointer-events: none;
    z-index: 4;
    perspective: 720px;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-voxel-cell {
    display: block;
    border-radius: 4px;
    background: var(--voxel-bg, rgba(30, 41, 59, 0.9));
    border: 1px solid rgba(255, 217, 122, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 18px rgba(0, 0, 0, 0.42);
    animation: pvs-voxel-burst-b-m83x1nfwdl 0.56s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms) forwards;
    will-change: transform, opacity;
}

@keyframes pvs-voxel-burst-b-m83x1nfwdl {
    0% {
        transform: translate3d(0, 0, 0) rotateZ(0deg) scale(1);
        opacity: 0.95;
    }
    40% {
        opacity: 0.85;
    }
    100% {
        transform: translate3d(var(--dx, 0px), var(--dy, 60px), 90px) rotateZ(var(--rz, 45deg)) scale(0.18);
        opacity: 0;
    }
}

.pvs-pause-backdrop[b-m83x1nfwdl] {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.45);
    z-index: 3;
    animation: pvs-backdrop-in-b-m83x1nfwdl 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pvs-backdrop-in-b-m83x1nfwdl {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

/* The shared pause wrapper keeps Escape with the engine that just released the pointer.
   Glass card: the frozen
   arena stays visible, blurred, behind the sheet. Actions are pinned; the body scrolls. */
.pvs-pause-backdrop[b-m83x1nfwdl]  .pvs-pause {
    position: static;
    margin: 0;
    width: min(92%, 430px);
    max-height: 92%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
    padding: 1.1rem 1.4rem 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-surface) 62%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    color: var(--color-text-primary);
    text-align: center;
    animation: pvs-pause-card-in-b-m83x1nfwdl 0.28s cubic-bezier(0.22, 1.25, 0.36, 1);
}

@keyframes pvs-pause-card-in-b-m83x1nfwdl {
    from {
        transform: translateY(10px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.pvs-pause h2[b-m83x1nfwdl] {
    margin: 0;
    font-size: var(--text-lg);
}

.pvs-pause-stats[b-m83x1nfwdl] {
    display: flex;
    justify-content: center;
    gap: 1.4rem;
}

.pvs-pause-stats > div[b-m83x1nfwdl] {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pvs-pause-stats span[b-m83x1nfwdl] {
    font-size: var(--text-lg);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pvs-pause-stats small[b-m83x1nfwdl] {
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.pvs-pause-actions[b-m83x1nfwdl] {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 -1.4rem;
    padding: 0.7rem 1.4rem 1rem;
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
}

/* ── Game-over summary (rendered inside the shared GameShell modal) ─────── */

.pvs-summary[b-m83x1nfwdl] {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.pvs-best-badge[b-m83x1nfwdl] {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent-warning) 18%, transparent);
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
    font-size: var(--text-sm);
    font-weight: 700;
    animation: pvs-badge-pop-b-m83x1nfwdl 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

/* Victory banner. Gold, not the usual accent: this is the only state in the game that is
   a win, and it should not look like any other badge. */
.pvs-win-badge[b-m83x1nfwdl] {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: #2a1d05;
    background: linear-gradient(135deg, #ffd97a, #e8a11c);
    box-shadow: 0 4px 16px rgba(232, 161, 28, 0.35);
    animation: pvs-badge-pop-b-m83x1nfwdl 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes pvs-badge-pop-b-m83x1nfwdl {
    from { transform: scale(0.6); opacity: 0; }
}

.pvs-tiles[b-m83x1nfwdl] {
    display: grid;
    grid-template-columns: repeat(4, minmax(4.4rem, 1fr));
    gap: 0.5rem;
    width: 100%;
}

.pvs-tile[b-m83x1nfwdl] {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.55rem 0.4rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-surface-hover) 70%, transparent);
    border: 1px solid var(--color-border);
    transform: perspective(520px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.18s ease, box-shadow 0.18s ease;
    animation: pvs-tile-in-b-m83x1nfwdl 0.35s ease-out backwards;
}

.pvs-tile:hover[b-m83x1nfwdl] {
    border-color: color-mix(in srgb, var(--accent-warning) 55%, var(--color-border));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.pvs-tile[b-m83x1nfwdl]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--rx, 50%) var(--ry, 50%), rgba(255, 217, 122, 0.16), transparent 65%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pvs-tile:hover[b-m83x1nfwdl]::before {
    opacity: 1;
}

.pvs-tile:nth-child(2)[b-m83x1nfwdl] { animation-delay: 0.05s; }
.pvs-tile:nth-child(3)[b-m83x1nfwdl] { animation-delay: 0.1s; }
.pvs-tile:nth-child(4)[b-m83x1nfwdl] { animation-delay: 0.15s; }
.pvs-tile:nth-child(5)[b-m83x1nfwdl] { animation-delay: 0.2s; }
.pvs-tile:nth-child(6)[b-m83x1nfwdl] { animation-delay: 0.25s; }
.pvs-tile:nth-child(7)[b-m83x1nfwdl] { animation-delay: 0.3s; }

@keyframes pvs-tile-in-b-m83x1nfwdl {
    from { transform: translateY(0.5rem); opacity: 0; }
}

.pvs-tile-icon[b-m83x1nfwdl] { font-size: var(--text-base); }

.pvs-tile-value[b-m83x1nfwdl] {
    font-size: var(--text-base);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-primary);
}

.pvs-tile-label[b-m83x1nfwdl] {
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    text-align: center;
}

.pvs-medals[b-m83x1nfwdl] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.pvs-medal[b-m83x1nfwdl] {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--accent-warning);
    color: var(--accent-warning);
    font-size: var(--text-xs);
    font-weight: 600;
}

/* ── Button micro-interactions: 3D tilt, radial ripple & light-sweep sheen ── */

.pvs-btn[b-m83x1nfwdl],
.pvs-start[b-m83x1nfwdl]  .gps-intro-ok,
.pvs-start[b-m83x1nfwdl]  .app-seg__btn {
    position: relative;
    overflow: hidden;
    transform: perspective(520px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.pvs-btn[b-m83x1nfwdl] {
    padding: 0.45rem 1.1rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
}

/* Pointer-origin radial ripple glow */
.pvs-btn[b-m83x1nfwdl]::before,
.pvs-start[b-m83x1nfwdl]  .gps-intro-ok::before,
.pvs-start[b-m83x1nfwdl]  .app-seg__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 90px at var(--rx, 50%) var(--ry, 50%), rgba(255, 255, 255, 0.24), transparent 70%);
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

/* Hover light-sweep sheen */
.pvs-btn[b-m83x1nfwdl]::after,
.pvs-start[b-m83x1nfwdl]  .gps-intro-ok::after {
    content: "";
    position: absolute;
    top: -20%;
    bottom: -20%;
    left: -130%;
    width: 65%;
    background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.28) 50%, transparent 80%);
    transform: skewX(-18deg);
    transition: left 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.pvs-btn:hover[b-m83x1nfwdl]::before,
.pvs-start[b-m83x1nfwdl]  .gps-intro-ok:hover::before,
.pvs-start[b-m83x1nfwdl]  .app-seg__btn:hover::before {
    opacity: 1;
}

.pvs-btn:hover[b-m83x1nfwdl]::after,
.pvs-start[b-m83x1nfwdl]  .gps-intro-ok:hover::after {
    left: 145%;
}

.pvs-btn:hover[b-m83x1nfwdl] { background: var(--color-border); }

.pvs-btn:active[b-m83x1nfwdl],
.pvs-start[b-m83x1nfwdl]  .gps-intro-ok:active,
.pvs-start[b-m83x1nfwdl]  .app-seg__btn:active {
    transform: perspective(520px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) scale(0.96);
}

.pvs-btn:focus-visible[b-m83x1nfwdl] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

.pvs-btn-primary[b-m83x1nfwdl] {
    background: var(--color-accent-solid);
    border-color: var(--color-accent-solid);
    color: var(--color-accent-contrast);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--color-accent-solid) 38%, transparent);
}

.pvs-btn-primary:hover[b-m83x1nfwdl] { filter: brightness(1.1); }

/* ── Engine-injected nodes ───────────────────────────────────────────────
   Created by the JS engine inside the canvas host, so they carry no scope attribute and
   every rule needs ::deep to reach them. */

/* Crosshair; visible only while the player is driving. */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-crosshair {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    pointer-events: none;
    z-index: 2;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-crosshair::before,
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-crosshair::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-crosshair::before {
    left: 6px;
    top: 0;
    width: 2px;
    height: 14px;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-crosshair::after {
    left: 0;
    top: 6px;
    width: 14px;
    height: 2px;
}

/* Crosshair status rings (--p is 0..100 from the engine's HUD pump): inner ring = weapon
   heat, outer ring = blast cooldown. Conic fill masked to a thin annulus. 10 Hz stepping
   is fine — heat moves slowly. These are the only heat/blast readout. */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    --deg: calc(var(--p) * 3.6deg);
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-ring-heat {
    inset: -14px;
    background: conic-gradient(var(--accent-warning) var(--deg), rgba(255, 255, 255, 0.14) var(--deg));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-ring-heat.pvs-ring-locked {
    background: conic-gradient(var(--accent-danger) var(--deg), rgba(255, 255, 255, 0.14) var(--deg));
    animation: pvs-pulse-b-m83x1nfwdl 0.6s ease-in-out infinite;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-ring-alt {
    inset: -21px;
    opacity: 0.85;
    background: conic-gradient(var(--accent-cyan) var(--deg), rgba(255, 255, 255, 0.1) var(--deg));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-ring-alt.pvs-ring-ready {
    filter: drop-shadow(0 0 4px var(--accent-cyan));
}

/* Which way the hit came from: a red arc on a ring round the reticle, turned to the
   attacker's bearing (--bearing, 0 = dead ahead). The engine restarts the animation on
   every hit; the animation is the whole fade. */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-hit-arc {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 170px;
    height: 170px;
    margin: -85px 0 0 -85px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transform: rotate(var(--bearing, 0deg));
    background: conic-gradient(from -24deg, rgba(255, 70, 70, 0.95) 0 48deg, transparent 48deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-hit-arc.pvs-hit-arc-on {
    animation: pvs-hit-arc-b-m83x1nfwdl 0.9s ease-out forwards;
}

@keyframes pvs-hit-arc-b-m83x1nfwdl {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* The cracked visor: fracture lines out of the corners, opacity driven by missing HP. */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-cracks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.25s ease-out;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-cracks svg {
    width: 100%;
    height: 100%;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-cracks path {
    fill: none;
    stroke: rgba(235, 242, 255, 0.75);
    vector-effect: non-scaling-stroke;
    stroke-width: 1.4px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
}

/* Damage vignette (the engine drives opacity, CSS owns the look). */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-hit {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 52%, rgba(220, 38, 38, 0.6) 100%);
}

/* ── Touch controls (input.js) ──────────────────────────────────────────
   Shown only on a touch-only device, and only while the player is driving. The two drag
   surfaces split the canvas; the buttons sit above the look surface on the right. */
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-touch {
    position: absolute;
    inset: 0;
    z-index: 2;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-touch-move,
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-touch-look {
    position: absolute;
    top: 3.2rem;
    bottom: 0;
    touch-action: none;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-touch-move { left: 0; width: 42%; }
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-touch-look { right: 0; width: 58%; }

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-touch-nub {
    position: absolute;
    left: 3.2rem;
    bottom: 3.2rem;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(232, 238, 248, 0.22);
    border: 2px solid rgba(232, 238, 248, 0.5);
    box-shadow: 0 0 0 28px rgba(232, 238, 248, 0.07);
    pointer-events: none;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn {
    position: absolute;
    right: calc(0.8rem + env(safe-area-inset-right, 0px));
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    border: 2px solid rgba(232, 238, 248, 0.5);
    background: rgba(15, 23, 42, 0.45);
    color: #f4f7fd;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    touch-action: none;
}

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn:active { background: rgba(232, 238, 248, 0.35); }

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn-dig { bottom: 1rem; width: 5rem; height: 5rem; }
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn-blast { bottom: 6.6rem; }
.pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn-jump { bottom: 1.4rem; right: calc(6.4rem + env(safe-area-inset-right, 0px)); }

.pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn-pause {
    top: calc(3.4rem + env(safe-area-inset-top, 0px));
    width: 2.6rem;
    height: 2.6rem;
    font-size: 0.8rem;
}

/* Coarse pointers: the strip's fullscreen button (30px) and the touch pause button (42px)
   are the two touch controls under the 44px floor. */
@media (pointer: coarse) {
    .pvs-hud-btn[b-m83x1nfwdl] { width: 44px; height: 44px; }
    .pvs-canvas-host[b-m83x1nfwdl]  .pvs-tbtn-pause { width: 44px; height: 44px; }
}

/* Reduced motion: the engine already skips shake, the damage flash, the hit-stop, the
   heat shimmer and the victory orbit; this kills the remaining CSS movement (pulses,
   popups drift, tile/badge entrances). The hit arc stays — it is information, and it
   fades rather than moves. */
@media (prefers-reduced-motion: reduce) {
    .pvs-bar-low[b-m83x1nfwdl],
    .pvs-canvas-host[b-m83x1nfwdl]  .pvs-ring-heat.pvs-ring-locked,
    .pvs-canvas-host.pvs-iris-opening[b-m83x1nfwdl]  canvas,
    .pvs-canvas-host[b-m83x1nfwdl]  .pvs-voxel-cell,
    .pvs-pause-backdrop[b-m83x1nfwdl],
    .pvs-pause-backdrop[b-m83x1nfwdl]  .pvs-pause {
        animation: none;
    }

    .pvs-pop[b-m83x1nfwdl],
    .pvs-tile[b-m83x1nfwdl],
    .pvs-best-badge[b-m83x1nfwdl],
    .pvs-win-badge[b-m83x1nfwdl] {
        animation: none;
    }

    .pvs-odo-digit[b-m83x1nfwdl]::before,
    .pvs-hud-score[b-m83x1nfwdl],
    .pvs-canvas-host[b-m83x1nfwdl]  canvas,
    .pvs-btn[b-m83x1nfwdl],
    .pvs-hud-btn[b-m83x1nfwdl],
    .pvs-tile[b-m83x1nfwdl],
    .pvs-start[b-m83x1nfwdl]  .gps-intro-ok,
    .pvs-start[b-m83x1nfwdl]  .app-seg__btn,
    .pvs-btn[b-m83x1nfwdl]::after,
    .pvs-start[b-m83x1nfwdl]  .gps-intro-ok::after {
        transition: none;
        transform: none;
    }

    .pvs-odo-digit[b-m83x1nfwdl] {
        color: #f4f7fd;
    }

    .pvs-odo-digit[b-m83x1nfwdl]::before {
        display: none;
    }

    .pvs-pop[b-m83x1nfwdl] { opacity: 0; } /* no drift animation → don't stack static +N labels */
}

:global([data-motion="reduce"]) .pvs-odo-digit[b-m83x1nfwdl]::before {
    display: none;
}

:global([data-motion="reduce"]) .pvs-odo-digit[b-m83x1nfwdl] {
    color: #f4f7fd;
}

:global([data-motion="reduce"]) .pvs-canvas-host.pvs-iris-opening[b-m83x1nfwdl]  canvas,
:global([data-motion="reduce"]) .pvs-canvas-host[b-m83x1nfwdl]  .pvs-voxel-cell,
:global([data-motion="reduce"]) .pvs-pause-backdrop[b-m83x1nfwdl],
:global([data-motion="reduce"]) .pvs-pause-backdrop[b-m83x1nfwdl]  .pvs-pause {
    animation: none;
}

@media (max-width: 520px) {
    .pvs-tiles[b-m83x1nfwdl] { grid-template-columns: repeat(2, 1fr); }
    .pvs-settings[b-m83x1nfwdl] { grid-template-columns: 1fr; }
    .pvs-hud[b-m83x1nfwdl] { gap: 0.5rem; }
}
/* /Features/Profile/ProfilePage.razor.rz.scp.css */
/* ── Profile skeleton loader ───────────────────────────────────────────────
   These rules only match markup this component renders (the `aria-busy` block at
   the top of ProfilePage.razor), so they are scoped here rather than shipped and
   parsed on every game route, like the .prf-* rules below. */
/* ── Profile skeleton loader (used by ProfilePage) ── */
.profile-skel[b-abhkyp8sx0] {
  margin: 16px auto;
  max-width: 720px;
  display: grid;
  gap: 12px;
}

.profile-skel__header[b-abhkyp8sx0] {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 14px;
}

.profile-skel__avatar[b-abhkyp8sx0] {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  background-size: 200% 100%;
  animation: profile-shimmer-b-abhkyp8sx0 1.4s infinite linear;
}

.profile-skel__lines[b-abhkyp8sx0] {
  flex: 1;
  display: grid;
  gap: 6px;
}

.profile-skel__line[b-abhkyp8sx0] {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  background-size: 200% 100%;
  animation: profile-shimmer-b-abhkyp8sx0 1.4s infinite linear;
}

.profile-skel__line--w70[b-abhkyp8sx0] { width: 70%; }
.profile-skel__line--w40[b-abhkyp8sx0] { width: 40%; }
.profile-skel__line--w55[b-abhkyp8sx0] { width: 55%; }

.profile-skel__row[b-abhkyp8sx0] {
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  background-size: 200% 100%;
  animation: profile-shimmer-b-abhkyp8sx0 1.4s infinite linear;
}

@keyframes profile-shimmer-b-abhkyp8sx0 {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }}

/* ══════════════════════════════════════════════
   Profile Page
   ══════════════════════════════════════════════ */

.prf-page[b-abhkyp8sx0] {
    /* width + min-width are load-bearing. This is a flex item of `main.gl-content`
       (a column flex container): with no declared width it is sized to its
       max-content, and `min-width: auto` then stops it shrinking back, which
       would make the page 722px wide inside a 390px phone with the right-hand
       third clipped off-screen. */
    width: 100%;
    min-width: 0;
    max-width: var(--content-max, 960px);
    margin: 0 auto;
    /* Small bottom padding: there is no bottom tab bar to reserve room for, and
       extra space is wasted on a 720p laptop. The real safe-area inset is handled
       by .gl-content. */
    padding: 1.25rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Heading ──
   The page title lives in the shared <PageHeader>; whose stats these are is the
   Gamer Card under it (avatar, account badge, rank). */

/* ── Headline band ──
   One band with a 1P | Online switch over one wrapping strip. Each chip is a value
   over a label, plus a one-line hint (how to earn a dash, or the context of a
   number) as visible text, never a tooltip. */
.prf-band[b-abhkyp8sx0] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.prf-band > .prf-chips[b-abhkyp8sx0] { align-self: stretch; }

/* The shared segmented control is 32px tall on a fine pointer; 40px keeps it a
   comfortable target everywhere (coarse pointers already get 44px from app.css). */
.prf-band-seg .app-seg__btn[b-abhkyp8sx0] { min-height: 44px; min-width: 4.5rem; }

.prf-chips[b-abhkyp8sx0] {
    display: grid;
    /* Six across on a wide screen; three when the cards are 300px wide, which is what
       keeps a hint like "Win 2 in a row vs the CPU" on one line instead of wrapping in
       a 148px chip while its neighbours have one. */
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (max-width: 1180px) {
    .prf-chips[b-abhkyp8sx0] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .prf-chips[b-abhkyp8sx0] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.prf-chip[b-abhkyp8sx0] {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.75rem;
    contain: layout paint;
}

.prf-chip--best[b-abhkyp8sx0] { border-color: color-mix(in srgb, var(--accent-success) 35%, var(--color-border)); }
.prf-chip--nemesis[b-abhkyp8sx0] { border-color: color-mix(in srgb, var(--accent-danger) 35%, var(--color-border)); }

/* Wraps (centred) rather than overflowing: a long game name under "Best Game" is
   wider than a two-up chip on a 360px phone, and the chip's paint containment
   would clip it. */
.prf-chip-val[b-abhkyp8sx0] {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
}

/* 0.75rem (12px) is the floor for every label class on this page:
   anything smaller is decoration that happens to contain words. */
.prf-chip-lbl[b-abhkyp8sx0] {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* The visible hint under a chip. Wraps rather than truncates; centred like the
   value and label above it. */
.prf-chip-hint[b-abhkyp8sx0] {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--color-text-secondary);
    text-align: center;
}

/* Text for screen readers only (state words the visuals carry as colour or a badge). */
.prf-sr-only[b-abhkyp8sx0] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Achievements ──
   A compact grid of badges: earned ones in full colour, locked ones greyed with the
   how-to under the title. Greyed by the icon's filter and a secondary ink, not by
   opacity on the text, so the hint stays readable in both themes. */
.prf-ach-grid[b-abhkyp8sx0] {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.5rem;
}

.prf-ach[b-abhkyp8sx0] {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-1);
}

.prf-ach--on[b-abhkyp8sx0] { border-color: color-mix(in srgb, var(--accent-success) 45%, var(--color-border)); }

.prf-ach--off[b-abhkyp8sx0] { background: transparent; border-style: dashed; }

.prf-ach-icon[b-abhkyp8sx0] {
    font-size: 1.25rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.prf-ach--off .prf-ach-icon[b-abhkyp8sx0] { filter: grayscale(1); opacity: 0.45; }

.prf-ach-text[b-abhkyp8sx0] {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.prf-ach-title[b-abhkyp8sx0] {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.25;
}

.prf-ach--off .prf-ach-title[b-abhkyp8sx0] { color: var(--color-text-secondary); }

.prf-ach-hint[b-abhkyp8sx0] {
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--color-text-secondary);
}

@media (max-width: 400px) {
    .prf-ach-grid[b-abhkyp8sx0] { grid-template-columns: 1fr 1fr; }
}

/* ── Achievement progress ──
   Radzen's progress bar, told the page's own colours; the plain bar underneath is the
   fallback for the first paint, before the theme lands. */
.prf-ach-bar[b-abhkyp8sx0] {
    width: 8rem;
    flex: 0 0 auto;
}

.prf-ach-bar[b-abhkyp8sx0]  .rz-progressbar {
    height: 0.5rem;
    border-radius: 999px;
    background-color: var(--tint-medium);
}

.prf-ach-bar[b-abhkyp8sx0]  .rz-progressbar-value {
    border-radius: 999px;
    background-color: var(--color-accent);
}

.prf-ach-bar-primitive[b-abhkyp8sx0] {
    width: 8rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--tint-medium);
    overflow: hidden;
}

.prf-ach-bar-fill[b-abhkyp8sx0] {
    height: 100%;
    border-radius: 999px;
    background: var(--color-accent);
}

@media (max-width: 560px) {
    .prf-ach-bar[b-abhkyp8sx0],
    .prf-ach-bar-primitive[b-abhkyp8sx0] { width: 100%; }
}

/* The rest of the list, folded. */
.prf-ach-more[b-abhkyp8sx0] {
    margin-top: 0.6rem;
}

.prf-ach-more-summary[b-abhkyp8sx0] {
    cursor: pointer;
    padding: 0.3rem 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.prf-ach-more-summary:hover[b-abhkyp8sx0] {
    color: var(--color-text-primary);
}

/* ── Charts ── */
.prf-charts[b-abhkyp8sx0] {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1rem;
}

/* Holds the chart's height while Radzen's theme and script land, so the section
   below it does not jump when the bars appear. */
.prf-chart-placeholder[b-abhkyp8sx0] {
    width: 100%;
    height: 220px;
    border-radius: var(--radius-md);
    background: linear-gradient(90deg, var(--tint-soft), var(--tint-medium), var(--tint-soft));
    background-size: 200% 100%;
    animation: prf-chart-shimmer-b-abhkyp8sx0 1.4s ease-in-out infinite;
}

@keyframes prf-chart-shimmer-b-abhkyp8sx0 {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.prf-chart-card--wide[b-abhkyp8sx0] {
    align-items: stretch;
}

.prf-chart-card--wide .prf-chart[b-abhkyp8sx0] {
    width: 100%;
}

@media (max-width: 640px) {
    .prf-page[b-abhkyp8sx0] { gap: 0.75rem; }
    .prf-chip[b-abhkyp8sx0] { padding: 0.35rem 0.5rem; }
    .prf-h2h-cols[b-abhkyp8sx0] { grid-template-columns: 1fr; }
    .prf-charts[b-abhkyp8sx0] { grid-template-columns: 1fr; }
    .prf-game-grid[b-abhkyp8sx0] { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .prf-game-grid[b-abhkyp8sx0] { grid-template-columns: 1fr; }
    .prf-page[b-abhkyp8sx0] { padding: 0.75rem 0.75rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
}

.prf-chart-card[b-abhkyp8sx0] {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.prf-chart-title[b-abhkyp8sx0] {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    align-self: flex-start;
}

.prf-radar[b-abhkyp8sx0] {
    width: 100%;
    max-width: 240px;
}

.prf-donut[b-abhkyp8sx0] {
    width: 100%;
    max-width: 180px;
}

.prf-donut-legend[b-abhkyp8sx0] {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.prf-legend-dot[b-abhkyp8sx0] {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.prf-legend-win[b-abhkyp8sx0]  { background: var(--accent-success); }
.prf-legend-draw[b-abhkyp8sx0] { background: var(--accent-warning); }
.prf-legend-loss[b-abhkyp8sx0] { background: var(--accent-danger); }

/* ── Unplayed games ──
   One disclosure row instead of a wall of chips. It opens by itself only when the
   player has nothing to look at yet. Colours come from the theme tokens so it
   follows light/dark like the rest of the page. */
.prf-unplayed[b-abhkyp8sx0] {
    margin-top: var(--space-2);
    padding: 0.35rem 0.6rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
}

.prf-unplayed-label[b-abhkyp8sx0] {
    cursor: pointer;
    padding: 0.25rem 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.prf-unplayed-label:hover[b-abhkyp8sx0] {
    color: var(--color-text-primary);
}

.prf-unplayed[open] > .prf-unplayed-label[b-abhkyp8sx0] {
    margin-bottom: 0.4rem;
}

.prf-unplayed-chips[b-abhkyp8sx0] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.prf-unplayed-chip[b-abhkyp8sx0] {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 32px;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--tint-subtle);
    font-size: 0.8rem;
    white-space: nowrap;
    text-decoration: none;
}

.prf-unplayed-chip:hover[b-abhkyp8sx0] { border-color: var(--color-accent); }

@media (pointer: coarse) {
    .prf-unplayed-chip[b-abhkyp8sx0] { min-height: 44px; }
}

/* ── Section ── */
.prf-section[b-abhkyp8sx0] { }

.prf-section-title[b-abhkyp8sx0] {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    margin-bottom: 0.875rem;
}

/* A heading row that pairs the section title with a small inline legend. Used
   by the H2H section to explain the G / MS chips. */
.prf-section-head[b-abhkyp8sx0] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.prf-section-head .prf-section-title[b-abhkyp8sx0] { margin-bottom: 0; }

/* ── Game grid ── */
.prf-game-grid[b-abhkyp8sx0] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.prf-game-card[b-abhkyp8sx0] {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.875rem;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s;
}

.prf-game-card:hover[b-abhkyp8sx0] {
    border-color: rgba(99,102,241,0.4);
}

.prf-game-header[b-abhkyp8sx0] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prf-game-icon[b-abhkyp8sx0] {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.prf-game-name[b-abhkyp8sx0] {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* The player's own best on the server board (a score, a time). */
.prf-game-best[b-abhkyp8sx0] {
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--color-text-primary);
    background: var(--surface-3);
    border-radius: 0.35rem;
    padding: 0.1rem 0.4rem;
}

.prf-game-wr[b-abhkyp8sx0] {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-success);
    background: rgba(34,197,94,0.1);
    border-radius: 0.35rem;
    padding: 0.1rem 0.4rem;
}

/* ── W/L/D bar ── */
.prf-bar[b-abhkyp8sx0] {
    height: 5px;
    border-radius: var(--radius-pill);
    background: var(--color-bg);
    display: flex;
    overflow: hidden;
}

.prf-bar-win[b-abhkyp8sx0]  { background: var(--accent-success); width: var(--win-pct, 0); transition: width 0.4s ease; }
.prf-bar-draw[b-abhkyp8sx0] { background: var(--accent-warning); width: var(--draw-pct, 0); transition: width 0.4s ease; }
.prf-bar-loss[b-abhkyp8sx0] { background: var(--accent-danger); width: var(--loss-pct, 0); transition: width 0.4s ease; }

/* ── Difficulty rows ── */
.prf-diffs[b-abhkyp8sx0] {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.prf-diff-row[b-abhkyp8sx0] {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-xs);
    flex-wrap: wrap;
}

.prf-diff-name[b-abhkyp8sx0] {
    font-weight: 700;
    border-radius: 0.25rem;
    padding: 0.05rem 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.prf-diff-easy[b-abhkyp8sx0]   { background: var(--accent-success-soft); color: var(--accent-success); }
.prf-diff-medium[b-abhkyp8sx0] { background: var(--accent-warning-soft); color: var(--accent-warning); }
.prf-diff-hard[b-abhkyp8sx0]   { background: var(--accent-danger-soft); color: var(--accent-danger); }

.prf-diff-wld[b-abhkyp8sx0] {
    color: var(--color-text-secondary);
    flex: 1;
}

.prf-diff-elo[b-abhkyp8sx0] {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.75rem;
    background: rgba(99,102,241,0.12);
    border-radius: 0.25rem;
    padding: 0.05rem 0.3rem;
}

/* "Watch again" on a session-count card: pushed to the row's far end. */
.prf-game-link[b-abhkyp8sx0] {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--color-accent, #6366f1);
    text-decoration: none;
    font-weight: 500;
}

.prf-game-link:hover[b-abhkyp8sx0],
.prf-game-link:focus[b-abhkyp8sx0] {
    text-decoration: underline;
}

/* Session count for games with no outcome and no score (PoEcosystem, SandPlayground).
   Sits where the W/L/D bar would be on a rated game, so the breakdown grid
   keeps one consistent card height. */
.prf-game-plays[b-abhkyp8sx0] {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.prf-game-plays-val[b-abhkyp8sx0] {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.prf-game-plays-lbl[b-abhkyp8sx0] {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

/* ── Head-to-head ── */
.prf-h2h-cols[b-abhkyp8sx0] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.prf-h2h-mode[b-abhkyp8sx0] {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--color-text-primary);
}
.prf-h2h-note[b-abhkyp8sx0] {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-style: italic;
}
/* The opponent table's frame. No height cap and no scroll of its own: the
   grid pages instead of scrolling, so a long history never becomes a 360px well
   inside the page. */
.prf-h2h-vwrap[b-abhkyp8sx0] {
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}
.prf-h2h-name[b-abhkyp8sx0] { font-weight: 500; }
.prf-h2h-who[b-abhkyp8sx0] { min-width: 0; overflow-wrap: anywhere; }
.prf-h2h-w[b-abhkyp8sx0] { color: var(--accent-success); font-weight: 600; }
.prf-h2h-l[b-abhkyp8sx0] { color: var(--accent-danger); font-weight: 600; }
.prf-h2h-d[b-abhkyp8sx0] { color: var(--color-text-secondary); }
.prf-h2h-invite[b-abhkyp8sx0] { min-height: 40px; }

/* A thumb needs 44px (Profile B): "Watch again" / "Play again" were 23px tall. */
@media (pointer: coarse) {
    .prf-game-link[b-abhkyp8sx0] { display: inline-flex; align-items: center; min-height: 44px; }
}
/* /Features/SandPlayground/SandPlaygroundSandbox.razor.rz.scp.css */
/* SandPlayground sandbox chrome.
   The canvas takes the whole game area and the controls float over the sim's sky
   as a glass dock. Colours come from the app's theme tokens; only the viewport
   interior stays literally black — that is the simulation's own letterbox,
   painted by the renderer, not app chrome.

   --sp-flash / --sp-shake-* are written by the engine (pushChromeVars) so the dock
   lights up and rides the shake when a blast goes off. They default to rest here. */

.sand-playground-root[b-pcko8vy3n3] {
    --sp-flash: 0;
    --sp-shake-x: 0px;
    --sp-shake-y: 0px;
    position: relative;
    /* The largest 4:3 box the game area can hold. --gps-area-h is published by
       .gps-shell (viewport minus the top bar); a percentage height would resolve
       against a flex item with no definite height and collapse to zero, which is
       what the phone layout used to do. */
    width: min(100%, calc((var(--gps-area-h, 80vh) - 12px) * 4 / 3));
    font-family: var(--font-mono);
    user-select: none;
    -webkit-user-select: none;
}

.sand-playground-viewport[b-pcko8vy3n3] {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    /* The simulation paints its own sky; this is the letterbox behind it. */
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* Both canvases stack; only the overlay takes pointer input. The engine sizes
   both drawing buffers to the displayed size, so neither is scaled by CSS. */
.sand-playground-viewport canvas[b-pcko8vy3n3] {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.sand-playground-overlay[b-pcko8vy3n3] {
    cursor: crosshair;
}

/* ── Chrome column ────────────────────────────────────────────────────── */

/* Dock, tray and menu stack in one column pinned to the top of the view, so a
   dock that wraps to two rows pushes the others down. The column spans the view
   but lets every touch through to the canvas except on its own panels. */
.sp-chrome[b-pcko8vy3n3] {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    max-height: calc(100% - 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Keeps the tray where it always sat on a laptop: 56px down, 2px under the dock. */
    gap: 2px;
    pointer-events: none;
}

.sp-chrome > *[b-pcko8vy3n3] {
    pointer-events: auto;
}

/* ── Dock ─────────────────────────────────────────────────────────────── */

.sand-playground-dock[b-pcko8vy3n3] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    max-width: 100%;
    padding: 5px 7px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    background: color-mix(in srgb, var(--color-surface) 58%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.35),
        0 0 calc(var(--sp-flash) * 46px) color-mix(in srgb, var(--accent-amber) calc(var(--sp-flash) * 90%), transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translate(var(--sp-shake-x), var(--sp-shake-y));
}

.sp-btn[b-pcko8vy3n3] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 34px;
    height: 34px;
    padding: 0 7px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 120ms, border-color 120ms, transform 120ms;
}

.sp-btn:hover:not(:disabled)[b-pcko8vy3n3] {
    background: var(--tint-medium);
}

.sp-btn:active:not(:disabled)[b-pcko8vy3n3] {
    transform: translateY(1px);
}

.sp-btn:focus-visible[b-pcko8vy3n3],
.sp-pill:focus-visible[b-pcko8vy3n3],
.sp-line:focus-visible[b-pcko8vy3n3] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

.sp-btn.active[b-pcko8vy3n3] {
    background: var(--accent-amber);
    border-color: color-mix(in srgb, var(--accent-amber) 85%, white);
    box-shadow: 0 0 14px color-mix(in srgb, var(--accent-amber) 45%, transparent);
}

/* The name of the selected tool, beside its icon. */
.sp-btn-label[b-pcko8vy3n3] {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.sp-btn:disabled[b-pcko8vy3n3] {
    opacity: 0.3;
    cursor: default;
}

.sp-sep[b-pcko8vy3n3] {
    flex: 0 0 1px;
    height: 20px;
    margin: 0 3px;
    background: linear-gradient(180deg, transparent, var(--color-border), transparent);
}

.sp-brush[b-pcko8vy3n3] {
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}

/* The dot is the brush: its diameter tracks the real size (3..32 px -> 5..17 px). */
.sp-brush-dot[b-pcko8vy3n3] {
    width: calc(4px + var(--sp-brush) * 0.42px);
    height: calc(4px + var(--sp-brush) * 0.42px);
    border-radius: 50%;
    background: var(--accent-amber);
}

.sp-detonate[b-pcko8vy3n3] {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-danger-ink);
    background: var(--accent-danger-soft);
    border-color: color-mix(in srgb, var(--accent-danger) 40%, transparent);
}

/* The tray: what the active tool carries, on its own row under the dock. */
.sand-playground-tray[b-pcko8vy3n3] {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 6px;
    border-radius: 11px;
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    background: color-mix(in srgb, var(--color-surface) 58%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    backdrop-filter: blur(18px) saturate(1.5);
    color: var(--color-text-primary);
    font-size: var(--text-xs);
    transform: translate(var(--sp-shake-x), var(--sp-shake-y));
}

/* ── Menu ─────────────────────────────────────────────────────────────── */

/* Under the dock and tray, against the right edge (where the ⋯ button sits);
   the column caps its height, so it scrolls inside itself, never the page. */
.sand-playground-menu[b-pcko8vy3n3] {
    align-self: flex-end;
    flex: 0 1 auto;
    min-height: 0;
    width: min(300px, 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 10px 10px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
    background: color-mix(in srgb, var(--color-surface) 82%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    backdrop-filter: blur(22px) saturate(1.4);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    color: var(--color-text-primary);
    font-size: 12px;
}

.sand-playground-menu h2[b-pcko8vy3n3] {
    margin: 9px 0 5px;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-amber);
}

.sp-row[b-pcko8vy3n3] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.sp-row--slot > .sp-dim[b-pcko8vy3n3] {
    flex: 1 1 auto;
}

.sp-row input[type="range"][b-pcko8vy3n3] {
    flex: 1 1 auto;
    min-width: 0;
    accent-color: var(--accent-amber);
}

.sp-dim[b-pcko8vy3n3] {
    min-width: 46px;
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
}

.sp-pill[b-pcko8vy3n3],
.sp-line[b-pcko8vy3n3] {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--tint-soft);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.sp-pill[b-pcko8vy3n3] {
    padding: 4px 8px;
}

.sp-line[b-pcko8vy3n3] {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    width: 100%;
    margin-bottom: 4px;
    padding: 6px 8px;
    text-align: left;
}

.sp-line .sp-dim[b-pcko8vy3n3] {
    min-width: 0;
    white-space: nowrap;
}

.sp-pill:hover:not(:disabled)[b-pcko8vy3n3],
.sp-line:hover[b-pcko8vy3n3] {
    background: var(--tint-medium);
}

.sp-pill.active[b-pcko8vy3n3],
.sp-line.active[b-pcko8vy3n3] {
    border-color: var(--accent-amber);
    background: color-mix(in srgb, var(--accent-amber) 22%, transparent);
}

.sp-pill:disabled[b-pcko8vy3n3] {
    opacity: 0.4;
    cursor: default;
}

/* Tilt-to-wind needs an orientation sensor; a mouse-driven machine has none. */
.sp-touch-only[b-pcko8vy3n3] {
    display: none;
}

@media (pointer: coarse) {
    .sp-touch-only[b-pcko8vy3n3] {
        display: inline-block;
    }
}

/* ── Toast ────────────────────────────────────────────────────────────── */

/* Sits above the HUD row at the foot of the view, clear of the dock and its tray.
   It fades out but its Undo button must stay pressable while it is visible, so
   the element ends hidden (visibility), not merely transparent. */
.sand-playground-toast[b-pcko8vy3n3] {
    position: absolute;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 24px);
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(10, 14, 22, 0.78);
    color: #f1f4f9;
    font-size: var(--text-xs);
    text-align: center;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    animation: sp-toast-b-pcko8vy3n3 5s ease-out;
}

.sand-playground-toast .sp-pill[b-pcko8vy3n3] {
    color: #f1f4f9;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

@keyframes sp-toast-b-pcko8vy3n3 {
    0%, 85% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

/* ===== Phones in portrait =====
   Strict 4:3 is traded away so the simulation gets the screen; the image is
   scaled, never tiled, and the engine's pointer math uses the bounding rect so
   touch stays accurate. */
@media (max-width: 700px) and (orientation: portrait), (pointer: coarse) and (max-aspect-ratio: 4/5) {
    .sand-playground-root[b-pcko8vy3n3] {
        width: 100%;
    }

    .sand-playground-viewport[b-pcko8vy3n3] {
        aspect-ratio: auto;
        height: calc(var(--gps-area-h, 80vh) - 8px);
        border-radius: 0;
        border: none;
    }

    .sp-chrome[b-pcko8vy3n3] {
        top: calc(4px + env(safe-area-inset-top, 0px));
        left: 4px;
        right: 4px;
        max-height: calc(100% - 8px - env(safe-area-inset-top, 0px));
        gap: 4px;
    }

    .sand-playground-dock[b-pcko8vy3n3] {
        gap: 1px;
        padding: 3px 4px;
    }

    .sp-btn[b-pcko8vy3n3] {
        min-width: 29px;
        height: 32px;
        padding: 0 3px;
        font-size: 15px;
    }

    .sp-sep[b-pcko8vy3n3] {
        margin: 0 1px;
    }

    .sand-playground-tray[b-pcko8vy3n3] {
        gap: 2px;
        padding: 3px 4px;
    }

    .sand-playground-tray .sp-pill[b-pcko8vy3n3] {
        padding: 4px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sp-btn[b-pcko8vy3n3],
    .sand-playground-dock[b-pcko8vy3n3] {
        transition: none;
    }

    .sand-playground-toast[b-pcko8vy3n3] {
        animation-duration: 6s;
    }
}

/* The engine failed to start: the shared error card over the (empty) viewport. */
.sp-failed[b-pcko8vy3n3] {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body, system-ui, sans-serif);
}

/* The toast's Undo stays clear of the home bar. */
.sand-playground-toast[b-pcko8vy3n3] {
    bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}

/* ── Coarse pointers: every tap target at least 44px ──
   Menu, tray and dock all wrap, so their targets simply grow: on a narrow phone in
   portrait the dock's nine chips take two rows and the tray and menu follow below. */
@media (pointer: coarse) {
    .sp-pill[b-pcko8vy3n3],
    .sp-line[b-pcko8vy3n3] {
        min-height: 44px;
    }

    .sp-pill[b-pcko8vy3n3] {
        min-width: 44px;
    }

    .sp-row input[type="range"][b-pcko8vy3n3] {
        min-height: 44px;
    }

    .sp-btn[b-pcko8vy3n3] {
        min-width: 44px;
        height: 44px;
    }
}
/* /Features/Settings/SettingsPage.razor.rz.scp.css */
.st-page[b-pxefuqft0q] {
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    padding: var(--space-4) var(--space-4) var(--space-6);
    box-sizing: border-box;
    display: grid;
    gap: var(--space-3);
    justify-items: start;
}

.st-text[b-pxefuqft0q] {
    margin: 0;
    color: var(--color-text-secondary);
}

.st-build[b-pxefuqft0q] { font-family: var(--font-mono); color: var(--color-text-primary); }
/* /Features/Shared/Feedback/AppErrorBoundary.razor.rz.scp.css */
.app-error-boundary[b-ebmvtyxdi8] {
    margin: 24px auto;
    max-width: 560px;
    padding: 20px 22px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0.04));
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: var(--color-text-primary);
    font-family: var(--font-display);
    box-shadow: 0 12px 32px rgba(248, 113, 113, 0.12);
}

.app-error-boundary__icon[b-ebmvtyxdi8] {
    font-size: 28px;
    margin-bottom: 6px;
}

.app-error-boundary__title[b-ebmvtyxdi8] {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--toast-error-text);
}

.app-error-boundary__message[b-ebmvtyxdi8] {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
}

.app-error-boundary__message code[b-ebmvtyxdi8] {
    background: var(--surface-3);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.app-error-boundary__details[b-ebmvtyxdi8] {
    margin: 8px 0 12px;
    font-size: 12px;
}

.app-error-boundary__details summary[b-ebmvtyxdi8] {
    cursor: pointer;
    color: var(--accent-danger);
    margin-bottom: 4px;
}

.app-error-boundary__details pre[b-ebmvtyxdi8] {
    max-height: 160px;
    overflow: auto;
    background: var(--surface-2);
    padding: 10px;
    border-radius: 6px;
    color: var(--color-text-primary);
    font-size: var(--text-xs);
    line-height: 1.4;
}

.app-error-boundary__id[b-ebmvtyxdi8] {
    margin: 0 0 14px;
    font-size: 12px;
    color: rgba(241, 245, 249, 0.7);
}

.app-error-boundary__id code[b-ebmvtyxdi8] {
    background: var(--surface-3);
    padding: 1px 6px;
    border-radius: 4px;
}

.app-error-boundary__copy[b-ebmvtyxdi8] {
    margin-left: 8px;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.app-error-boundary__copy:hover[b-ebmvtyxdi8] {
    background: rgba(148, 163, 184, 0.1);
}

.app-error-boundary__actions[b-ebmvtyxdi8] {
    display: flex;
    gap: 8px;
}

/* /Features/Shared/Feedback/GameErrorBoundary.razor.rz.scp.css */
/* The retry box a crashed game shows inside the shell. The game area is a flex row that
   centres its content and ignores the pointer (games opt in), so the box turns the
   pointer back on for its own buttons. */
.game-error[b-kh9gr7dhiq] {
    pointer-events: auto;
    max-width: 26rem;
    margin: var(--space-4) auto;
    padding: var(--space-4);
    border: 1px solid color-mix(in srgb, var(--accent-danger) 45%, transparent);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text-primary);
    text-align: center;
}

.game-error__icon[b-kh9gr7dhiq] {
    font-size: 1.75rem;
    margin-bottom: var(--space-1);
}

.game-error__title[b-kh9gr7dhiq] {
    margin: 0 0 var(--space-2);
    font-size: var(--text-lg);
    font-weight: 700;
}

.game-error__body[b-kh9gr7dhiq] {
    margin: 0 0 var(--space-3);
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.game-error__actions[b-kh9gr7dhiq] {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
}
/* /Features/Shared/Lobby/InviteLink.razor.rz.scp.css */
.invite[b-aw7eoo2w53] {
    display: inline-flex;
}

/* A popover is in the top layer and centred by the user-agent sheet. The card
   stays white in both themes: a scanner needs the contrast the code was drawn with. */
.invite__qr[b-aw7eoo2w53] {
    /* The global reset zeroes the `margin: auto` that centres a popover; restore it. */
    margin: auto;
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: #fff;
    color: #111;
    text-align: center;
}

.invite__qr[b-aw7eoo2w53]::backdrop {
    background: rgb(0 0 0 / 0.55);
}

.invite__qr img[b-aw7eoo2w53] {
    display: block;
    width: min(220px, 70vw);
    height: auto;
    aspect-ratio: 1;
}

.invite__caption[b-aw7eoo2w53] {
    display: block;
    margin: var(--space-2) 0 var(--space-3);
    font-size: var(--text-sm);
    font-weight: 600;
}

.invite__share[b-aw7eoo2w53] {
    width: 100%;
}
/* /Features/Shared/Lobby/LobbyPanel.razor.rz.scp.css */
/* ── LobbyPanel — the one lobby card ──
   Colours come from the design tokens (app.css :root), so the card follows light/dark
   like the rest of the app. The picker cards are `::deep` because games author their own
   pickers inside the panel's slots, and those elements carry the page's scope, not this
   file's. The pills (host / guest / ready and any game's badge) are the shared .app-chip. */

/* The waiting room answers what happens in it: the card's edge lights when a cue fires
   (a seat filling, Ready) or the pointer sweeps across it (--audio-pulse in fx.css, from
   the bands visualRuntime.js publishes while this panel is mounted). At rest the pulse is
   0 and there is no ring at all. Colour only, no movement, so it stays on under reduced
   motion like the app's other reactive colour. */
.lobby[b-drhkcda35b] {
    position: relative;
}

.lobby[b-drhkcda35b]::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px var(--fx-accent, var(--accent)), inset 0 0 26px -6px var(--fx-accent, var(--accent));
    opacity: calc(var(--audio-pulse, 0) * 0.85);
}

/* Roster heading and the hub's status pill, on one line. The strip's "Status" label is
   kept for screen readers and hidden here: next to "Players · 1/8" the pill explains
   itself, and the label was a row of its own. */
.lobby__head[b-drhkcda35b] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.4rem;
}

.lobby__head[b-drhkcda35b]  .conn-strip { margin: 0; }

.lobby__head[b-drhkcda35b]  .conn-strip__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.lobby__hint[b-drhkcda35b],
[b-drhkcda35b] .lobby__hint {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem;
}

.lobby__section[b-drhkcda35b] {
    margin: 0 0 0.9rem;
}

/* A native control a game puts in the picker slot (Couple Quiz's round count). */
.lobby__section[b-drhkcda35b]  select {
    min-height: 2.25rem;
    padding: 0 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font: inherit;
}

.lobby__empty[b-drhkcda35b] {
    color: var(--color-text-secondary);
    margin: 0.5rem 0;
}

.lobby__list[b-drhkcda35b] {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: grid;
    gap: 0.5rem;
}

.lobby__player[b-drhkcda35b] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-3);
    transition: border-color var(--dur-fast, 120ms) var(--ease-standard, ease);
}

.lobby__player.is-you[b-drhkcda35b] {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.lobby__player.is-host[b-drhkcda35b] {
    box-shadow: inset 0 0 0 1px var(--accent-warning-soft);
}

.lobby__name[b-drhkcda35b] {
    color: var(--color-text-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lobby__you[b-drhkcda35b] {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.lobby__actions[b-drhkcda35b] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.lobby__actions .lobby__hint[b-drhkcda35b] {
    flex-basis: 100%;
    margin: 0;
}

.lobby__howto[b-drhkcda35b] {
    margin-top: 0.9rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.lobby__howto > summary[b-drhkcda35b] {
    cursor: pointer;
    font-weight: 600;
}

.lobby__howto[b-drhkcda35b]  ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

.lobby__howto[b-drhkcda35b]  p { margin: 0.4rem 0 0; }

/* Picker — a grid of selectable cards (Sports runners, Brawl fighters). */
[b-drhkcda35b] .lobby-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

[b-drhkcda35b] .lobby-pick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 0.4rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    background: var(--surface-3);
    color: var(--color-text-primary);
    font: inherit;
    cursor: pointer;
    transition: border-color var(--dur-fast, 120ms) var(--ease-standard, ease), background var(--dur-fast, 120ms) var(--ease-standard, ease);
}

[b-drhkcda35b] .lobby-pick-card:hover:not(:disabled) {
    border-color: var(--accent);
}

[b-drhkcda35b] .lobby-pick-card--mine {
    border-color: var(--accent);
    background: var(--accent-soft);
}

[b-drhkcda35b] .lobby-pick-card--taken,
[b-drhkcda35b] .lobby-pick-card:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

[b-drhkcda35b] .lobby-pick-card__emoji {
    font-size: 1.5rem;
}

[b-drhkcda35b] .lobby-pick-card__name {
    font-weight: 600;
}

[b-drhkcda35b] .lobby-pick-card small {
    color: var(--color-text-secondary);
}

/* Optional game slots: per-row controls (kick) and live notices. */
.lobby__row-actions[b-drhkcda35b] {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.lobby__status[b-drhkcda35b] {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.lobby__status:empty[b-drhkcda35b] { display: none; }

/* A thumb needs 44px (Profile B): the pickers' native selects and the folded how-to were 32-36px. */
@media (pointer: coarse) {
    .lobby[b-drhkcda35b]  select,
    .lobby select[b-drhkcda35b] { min-height: 44px; }
    .lobby__howto > summary[b-drhkcda35b] { min-height: 44px; display: flex; align-items: center; }
}
/* /Features/Shared/Lobby/PlayerCard.razor.rz.scp.css */
.player-card-skel[b-fbrdssvkpa] {
    /* The card's own height, so the page under it does not jump when the card
       arrives: 280px here against a 438px card moved everything below it by 158px
       on a phone (layout shift 0.146; 0.1 is the limit for "good"). The card lost its
       stats strip to the profile's headline band, so both heights dropped with it. */
    min-height: 16rem;
    background: var(--surface-1, #1e293b);
    border-radius: var(--radius-lg, 16px);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: prf-pulse 1.8s ease-in-out infinite;
}

.card-skel-line[b-fbrdssvkpa] {
    height: 1.5rem;
    width: 60%;
    background: var(--surface-2, rgba(255, 255, 255, 0.06));
    border-radius: 6px;
}

.card-skel-row[b-fbrdssvkpa] {
    height: 160px;
    background: var(--surface-2, rgba(255, 255, 255, 0.04));
    border-radius: 12px;
}

.player-card[b-fbrdssvkpa] {
    /* The card is a dark object in both themes (it is also exported as an SVG that
       looks like this). Declaring that lets every light-dark() token used inside it
       resolve to its dark half; without it, the light scheme put a near-white stats
       panel and white button text onto the dark card. */
    color-scheme: dark;
    color: #e2e8f0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid var(--tier-color, #c0c0c0);
    border-radius: var(--radius-lg, 16px);
    /* Compact: this is an identity bar on a stats page, not a poster. It used to be
       ~400px tall on a laptop, most of it empty between the name and the footer. */
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px -3px var(--tier-color, rgba(192, 192, 192, 0.2));
    backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.player-card[b-fbrdssvkpa]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--tier-color, #c0c0c0), transparent);
}

.card-header[b-fbrdssvkpa] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    padding-bottom: 0.75rem;
}

.card-brand[b-fbrdssvkpa] {
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    letter-spacing: 0.12em;
}

.card-main[b-fbrdssvkpa] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.driver-info[b-fbrdssvkpa] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.avatar-ring[b-fbrdssvkpa] {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-2, #1e293b);
    border: 2px solid var(--tier-color, #c0c0c0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px var(--tier-color, rgba(192, 192, 192, 0.3));
    flex-shrink: 0;
}

.avatar-text[b-fbrdssvkpa] {
    font-family: var(--font-sans, system-ui);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-bright, #ffffff);
}

.driver-details[b-fbrdssvkpa] {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.driver-name[b-fbrdssvkpa] {
    font-family: var(--font-sans, system-ui);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-bright, #ffffff);
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sig-pill[b-fbrdssvkpa] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    width: fit-content;
}

.tier-rating-panel[b-fbrdssvkpa] {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    min-width: 220px;
}

.tier-badge-pill[b-fbrdssvkpa] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tier-color, #c0c0c0);
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--tier-color, #c0c0c0);
    letter-spacing: 0.06em;
}

.mmr-display[b-fbrdssvkpa] {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.mmr-val[b-fbrdssvkpa] {
    font-family: var(--font-sans, system-ui);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-bright, #ffffff);
    line-height: 1.1;
}

.mmr-lbl[b-fbrdssvkpa] {
    font-family: var(--font-mono, monospace);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--tier-color, #c0c0c0);
}

.progress-bar-container[b-fbrdssvkpa] {
    width: 100%;
    height: 7px;
    background: var(--surface-2, rgba(255, 255, 255, 0.1));
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.15rem;
}

.progress-bar-fill[b-fbrdssvkpa] {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, var(--tier-color, #c0c0c0));
    border-radius: 999px;
    transition: width 0.4s ease;
}

.progress-bar-sub[b-fbrdssvkpa] {
    font-size: var(--text-xs);
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
}

.card-footer[b-fbrdssvkpa] {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    padding-top: 0.55rem;
}

.recent-form[b-fbrdssvkpa] {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.form-label[b-fbrdssvkpa] {
    font-family: var(--font-mono, monospace);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted, #64748b);
    letter-spacing: 0.08em;
}

.form-empty[b-fbrdssvkpa] {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
}

.form-dots[b-fbrdssvkpa] {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.form-dot[b-fbrdssvkpa] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-family: var(--font-mono, monospace);
    font-size: var(--text-xs);
    font-weight: 800;
    color: #ffffff;
}

.card-actions[b-fbrdssvkpa] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* The shared .app-btn, on this always-dark card: its text token follows the page's
   theme (dark ink in the light scheme), which is unreadable here. */
.card-actions .app-btn[b-fbrdssvkpa] {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-actions .app-btn:hover[b-fbrdssvkpa] {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--tier-color, rgba(255, 255, 255, 0.3));
}

/* Export menu: a popover, so it is in the top layer and cannot be clipped by the
   card's own `overflow: hidden`. */
.card-export-panel[b-fbrdssvkpa] {
    margin: 0;
    inset: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 11rem;
    padding: 0.35rem;
    background: var(--color-surface, #1e293b);
    color: #e2e8f0;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
}

.card-export-panel[b-fbrdssvkpa]::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.card-export-item[b-fbrdssvkpa] {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: none;
    border: 0;
    border-radius: var(--radius-sm, 4px);
    color: inherit;
    font: inherit;
    font-size: var(--text-sm);
    text-align: left;
    cursor: pointer;
}

.card-export-item:hover[b-fbrdssvkpa],
.card-export-item:focus-visible[b-fbrdssvkpa] {
    background: rgba(255, 255, 255, 0.1);
}

.card-export-item .material-symbols-outlined[b-fbrdssvkpa] {
    font-size: 1.1rem;
    color: var(--text-muted, #94a3b8);
}

@media (max-width: 640px) {
    .player-card-skel[b-fbrdssvkpa] { min-height: 13rem; }

    .player-card[b-fbrdssvkpa] {
        padding: 0.85rem;
    }

    .card-main[b-fbrdssvkpa] {
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
    }

    .tier-rating-panel[b-fbrdssvkpa] {
        align-items: flex-start;
        width: 100%;
    }

    .card-footer[b-fbrdssvkpa] {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* /Features/Shared/Lobby/QuickMatchPanel.razor.rz.scp.css */
/* ── QuickMatchPanel — the quick-match status card ──
   Fills whatever slot the page gives it (the board games size that slot to their board;
   Marble Race drops it inside its overlay card). Tokens only, so it follows light/dark. */
.qm[b-8pe5pq1ets] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--glass-tint);
    -webkit-backdrop-filter: var(--glass-2);
    backdrop-filter: var(--glass-2);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    text-align: center;
    font-size: 0.95rem;
}

.qm p[b-8pe5pq1ets] {
    margin: 0;
}

.qm__note[b-8pe5pq1ets] {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

.qm__actions[b-8pe5pq1ets] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
/* /Features/Shared/Lobby/TurnStrip.razor.rz.scp.css */
/* The turn strip. Fills whatever slot the page gives it; the board games size that
   slot to their board. Moved here from ConnectFivePage.razor.css (`.cf-status*`). */
.turn-strip[b-oipjqlfmuo] {
    display: grid;
    /* Equal outer columns keep the status text on the board's centre line whatever
       the two names are; a flex row centred it between the names instead, so it
       slid sideways whenever one name was longer than the other. */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-lg);
    background: var(--glass-tint);
    -webkit-backdrop-filter: var(--glass-2);
    backdrop-filter: var(--glass-2);
    border: 1px solid var(--color-border);
    font-size: var(--text-sm);
}

.turn-strip__side[b-oipjqlfmuo] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    /* Dimmed until it is that player's move: the active side is the signal, so the
       inactive one has to give up contrast for it to read as one. 0.62, not lower:
       0.45 measured 2.92:1 on the light surface, and the waiting player's name is
       still content. */
    opacity: 0.62;
    transition: opacity var(--dur-fast) var(--ease-standard);
}

.turn-strip__side--right[b-oipjqlfmuo] { justify-content: flex-end; text-align: right; }

.turn-strip__side--active[b-oipjqlfmuo] { opacity: 1; }

.turn-strip__name[b-oipjqlfmuo] {
    min-width: 0;
    color: var(--color-text-primary);
    font-weight: 600;
    line-height: 1.2;
    /* A guest name is 21 characters with no space in it. Break it onto a second
       line rather than cut it short. */
    overflow-wrap: anywhere;
}

.turn-strip__mark[b-oipjqlfmuo] {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    flex: none;
    background: var(--ts-mark);
    box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}

/* The active player's mark gets a halo so turn state survives being read at a
   glance mid-game, when the eye is on the board and not the strip. */
.turn-strip__side--active .turn-strip__mark[b-oipjqlfmuo] {
    box-shadow:
        inset 0 -2px 3px rgba(0, 0, 0, 0.35),
        0 0 0 3px var(--color-accent);
}

.turn-strip__text[b-oipjqlfmuo] {
    color: var(--color-text-secondary);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
}
/* /Features/Shared/Modals/AccountDataCard.razor.rz.scp.css */
/* ── Your data (export / erase) ─────────────────────────────────────────
   Deliberately the plainest block in the sheet: no gradient, no accent fill.
   It is an account control, and dressing it up invites the tap it must not get
   by accident. Buttons are the shared .app-btn; colour is carried entirely
   through the theme tokens so it re-points correctly in light mode. */
.acct-data[b-iwfxcbpvxh] {
    padding: 0 var(--space-3);
}

.acct-data-blurb[b-iwfxcbpvxh] {
    margin: 0 0 0.75rem;
    font-size: var(--text-xs);
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.acct-data-actions[b-iwfxcbpvxh] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --accent-danger-ink rather than --accent-danger: the -ink variants are the
   ones tuned for text contrast in both schemes (see the note in app.css). */
.acct-data-danger[b-iwfxcbpvxh] {
    color: var(--accent-danger-ink);
    border-color: var(--accent-danger-soft);
}

.acct-data-danger:hover:not(:disabled)[b-iwfxcbpvxh] {
    background: var(--accent-danger-soft);
}

.acct-data-confirm[b-iwfxcbpvxh] {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--accent-danger-soft);
    border-radius: var(--radius-sm);
    background: var(--accent-danger-soft);
}

.acct-data-warn[b-iwfxcbpvxh] {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--accent-danger-ink);
}

.acct-data-confirm-row[b-iwfxcbpvxh] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.acct-data-input[b-iwfxcbpvxh] {
    flex: 1 1 8rem;
    min-width: 0;
    font: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

.acct-data-input:focus-visible[b-iwfxcbpvxh] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 1px;
}
/* /Features/Shared/Modals/GameOptionsSheet.razor.rz.scp.css */
/* A game's options drawer. It matches the Settings sheet (SettingsSheet.razor.css): a
   drawer on the right edge of a wide window, a bottom sheet under 640px, both a native
   modal <dialog>. Every colour reads through a design token. */

.game-opts-gear[b-36p9h3gg33] {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.game-opts-gear:hover[b-36p9h3gg33] {
    background: var(--surface-3);
    color: var(--color-text-primary);
}

.game-opts-sheet[b-36p9h3gg33] {
    margin: 0 0 0 auto;
    inset-block: 0;
    width: min(22rem, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    border: none;
    border-left: 1px solid var(--color-border);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.28);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.game-opts-sheet[open][b-36p9h3gg33] {
    animation: game-opts-in-right-b-36p9h3gg33 var(--dur-base, 220ms) var(--ease-out, ease-out) both;
}

.game-opts-sheet[b-36p9h3gg33]::backdrop {
    background: rgb(0 0 0 / 0.5);
}

@keyframes game-opts-in-right-b-36p9h3gg33 {
    from { transform: translateX(100%); }
    to   { transform: none; }
}

@keyframes game-opts-in-up-b-36p9h3gg33 {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

.game-opts-head[b-36p9h3gg33] {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.game-opts-title[b-36p9h3gg33] {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
}

.game-opts-close[b-36p9h3gg33] {
    appearance: none;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.game-opts-close:hover[b-36p9h3gg33] {
    background: var(--surface-3);
    color: var(--color-text-primary);
}

.game-opts-body[b-36p9h3gg33] {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
}

.game-opts-gear:focus-visible[b-36p9h3gg33],
.game-opts-close:focus-visible[b-36p9h3gg33] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

@media (max-width: 639.98px) {
    .game-opts-sheet[b-36p9h3gg33] {
        margin: auto 0 0;
        inset-block: auto 0;
        width: 100vw;
        height: auto;
        max-height: 92dvh;
        border-left: none;
        border-top: 1px solid var(--color-border);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: 0 -12px 40px rgb(0 0 0 / 0.28);
    }

    .game-opts-sheet[open][b-36p9h3gg33] {
        animation-name: game-opts-in-up-b-36p9h3gg33;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-opts-sheet[open][b-36p9h3gg33] { animation: none; }
}

/* A thumb needs 44px (Profile B); the 36px gear was under it. */
@media (pointer: coarse) {
    .game-opts-gear[b-36p9h3gg33] { width: 2.75rem; height: 2.75rem; }
}
/* /Features/Shared/Modals/GameOverModal.razor.rz.scp.css */
/* The game-over sheet's lighting. The frosted glass itself (backdrop blur, the
   theme-aware fill, the grain) is glass.css's `.gps-modal.gps-modal`; this adds the
   two things that make it read as a pane catching a room light rather than a flat
   translucent card:

   1. a soft key light falling from the top-left, as a background-IMAGE only, so the
      glass fill colour (light and dark scheme) stays glass.css's;
   2. a gradient rim: bright on the lit top-left edge, fading out along the sides and
      picking up the route accent on the far corner. A 1px ring cut out with a mask,
      so it costs one static layer and no animation.

   Static, so reduced motion needs nothing. The low tier hides ::before through
   glass.css (`:root[data-gfx='low'] .gps-modal.gps-modal::before`), and a live glassFx
   capture ([data-glass-live], fx.css) replaces the background but keeps the rim. */
dialog.gps-modal[b-fw1rolnje5] {
    background-image: radial-gradient(130% 70% at 0% 0%, rgba(255, 255, 255, 0.09), transparent 55%);
}

dialog.gps-modal[b-fw1rolnje5]::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.55),
        rgba(255, 255, 255, 0.10) 32%,
        transparent 58%,
        color-mix(in srgb, var(--fx-accent, #60a5fa) 45%, transparent));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

:root[data-gfx="low"] dialog.gps-modal[b-fw1rolnje5] {
    background-image: none;
}

/* Less transparency asked for: no light painted over the text. */
@media (prefers-reduced-transparency: reduce) {
    dialog.gps-modal[b-fw1rolnje5] {
        background-image: none;
    }
}
/* /Features/Shared/Modals/GamePauseDialog.razor.rz.scp.css */
.game-pause-dialog[b-cv6f0x1od5] {
    max-height: 85dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: var(--radius-lg, 16px);
}

.game-pause-dialog:focus-visible[b-cv6f0x1od5],
.game-pause-dialog[b-cv6f0x1od5]  :focus-visible {
    outline: 2px solid var(--color-focus, var(--color-primary));
    outline-offset: 3px;
}

.game-pause-dialog[b-cv6f0x1od5]  button {
    min-height: 44px;
}
/* /Features/Shared/Modals/InitialsPromptModal.razor.rz.scp.css */
/* The first-visit initials prompt. Drawn like the game start card (game-shell.css
   .gps-intro-card): a token-coloured surface over a dimmed page, so it follows the light
   and dark themes like every other dialog. */
/* The backdrop starts below the header, so the app name, the player menu and the settings
   gear stay usable while the prompt is up (Po standard). */
.arcade-modal-backdrop[b-05drzt5bwn] {
    position: fixed;
    inset: var(--po-header-h) 0 0 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.arcade-modal-crt[b-05drzt5bwn] {
    position: relative;
    width: min(420px, 100%);
    padding: var(--space-5) var(--space-5) var(--space-4);
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-3);
    text-align: center;
    font-family: var(--font-body);
}

.arcade-modal-title[b-05drzt5bwn] {
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0;
    color: var(--color-text-primary);
}

.arcade-modal-sub[b-05drzt5bwn] {
    margin: var(--space-1) 0 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.arcade-slots-wrap[b-05drzt5bwn] {
    position: relative;
    margin: var(--space-5) auto var(--space-3);
    width: fit-content;
}

.arcade-slots[b-05drzt5bwn] {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.arcade-slot[b-05drzt5bwn] {
    width: 64px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    background: var(--surface-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

/* The slot the next letter lands in: an accent outline, no blinking. */
.arcade-slot--active[b-05drzt5bwn] {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.arcade-hidden-input[b-05drzt5bwn] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: text;
    font-size: 2rem;
    text-transform: uppercase;
}

.arcade-modal-hint[b-05drzt5bwn] {
    margin: 0 0 var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.arcade-modal-actions[b-05drzt5bwn] {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.arcade-btn[b-05drzt5bwn] {
    min-height: 2.75rem;
    padding: 0.5rem 1.25rem;
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-standard),
                border-color var(--dur-fast) var(--ease-standard);
}

.arcade-btn--primary[b-05drzt5bwn] {
    background: var(--color-accent-solid);
    color: var(--color-accent-contrast);
}

.arcade-btn--primary:disabled[b-05drzt5bwn] {
    opacity: 0.45;
    cursor: not-allowed;
}

.arcade-btn--skip[b-05drzt5bwn] {
    background: transparent;
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.arcade-btn--skip:hover[b-05drzt5bwn] {
    background: var(--color-surface-hover);
}

/* Inline validation (forms standard, 2026-11-17). The row keeps its height so an error
   appearing does not shift the buttons under the player's thumb. */
.arcade-modal-error[b-05drzt5bwn] {
    min-height: 1.25rem;
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
}

.arcade-modal-error[b-05drzt5bwn]  .arcade-field-error {
    color: var(--color-error);
    font-weight: 600;
}
/* /Features/Shared/Modals/SettingsSheet.razor.rz.scp.css */
/* Settings sheet. Every colour reads through a design token so the sheet is
   themed in both schemes — including, necessarily, the control that switches
   between them.

   A drawer on the right edge of a wide window, a bottom sheet under 640px. Still a
   native modal <dialog> either way: showModal() gives the focus trap, Esc and the
   inert page behind; only where it sits changes. */

.prefs-sheet[b-3uxfoecdqd] {
    /* Pinned to the right edge, full height. The user-agent sheet centres a modal
       dialog with margin: auto and caps it short of the viewport; undo both. */
    margin: 0 0 0 auto;
    inset-block: 0;
    width: min(26rem, 100vw);
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    border: none;
    border-left: 1px solid var(--color-border);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    /* --color-surface, not --surface-2: the numbered surfaces are translucent glass,
       and a sheet the page shows through is hard to read. */
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.28);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.prefs-sheet[open][b-3uxfoecdqd] {
    animation: prefs-in-right-b-3uxfoecdqd var(--dur-base, 220ms) var(--ease-out, ease-out) both;
}

.prefs-sheet[b-3uxfoecdqd]::backdrop {
    background: rgb(0 0 0 / 0.5);
}

@keyframes prefs-in-right-b-3uxfoecdqd {
    from { transform: translateX(100%); }
    to   { transform: none; }
}

@keyframes prefs-in-up-b-3uxfoecdqd {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

.prefs-sheet-head[b-3uxfoecdqd] {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.prefs-sheet-title[b-3uxfoecdqd] {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 700;
}

.prefs-sheet-close[b-3uxfoecdqd] {
    appearance: none;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.prefs-sheet-close:hover[b-3uxfoecdqd] {
    background: var(--surface-3);
    color: var(--color-text-primary);
}

.prefs-grid[b-3uxfoecdqd] {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-3) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
}

/* <fieldset> + <legend> give the sections named landmarks. Reset the
   user-agent fieldset chrome so the legend reads as a small section label
   rather than an outline frame, but keep the native grouping. Each section is a
   card, so four short groups read as four groups in a narrow drawer. */
.prefs-group[b-3uxfoecdqd] {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;   /* a row's hover fill keeps to the card's corners */
    background: var(--surface-1);
}

/* A legend inside a bordered fieldset sits on the border line; float it so it
   lays out as the section's first row instead. */
.prefs-group-legend[b-3uxfoecdqd] {
    float: left;
    width: 100%;
    padding: var(--space-2) var(--space-3) 0;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-secondary);
    font-weight: 700;
}

/* The account card brings its own side padding; give it the row's top and bottom. */
.prefs-group[b-3uxfoecdqd]  .acct-data {
    padding-block: var(--space-2) var(--space-3);
}

.prefs-grid[b-3uxfoecdqd]  .prefs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 3rem;
    padding: var(--space-2) var(--space-3);
    transition: background var(--dur-fast) var(--ease-standard);
}

.prefs-grid[b-3uxfoecdqd]  .prefs-row + .prefs-row {
    border-top: 1px solid var(--color-border);
}

.prefs-grid[b-3uxfoecdqd]  .prefs-row:hover {
    background: var(--surface-3);
}

/* A row whose control cannot act (volume while muted, invites while signed
   out): dimmed but still readable, because the hint says why. */
.prefs-grid[b-3uxfoecdqd]  .prefs-row--disabled .prefs-name {
    opacity: 0.5;
}

.prefs-grid[b-3uxfoecdqd]  .prefs-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.prefs-grid[b-3uxfoecdqd]  .prefs-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-primary);
}

.prefs-grid[b-3uxfoecdqd]  .prefs-hint {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

/* The segmented pickers (theme, graphics) are tap targets too: 40px floor. */
.prefs-grid[b-3uxfoecdqd]  .app-seg__btn {
    min-height: 2.5rem;
}

/* ── Switch ── */
.prefs-toggle[b-3uxfoecdqd] {
    appearance: none;
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 32px;
    padding: 3px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-standard),
                border-color var(--dur-fast) var(--ease-standard);
}

/* The visible track is 32px tall; this invisible margin takes the tap target to
   44px without making the switch look heavier. */
.prefs-toggle[b-3uxfoecdqd]::before {
    content: "";
    position: absolute;
    inset: -7px -4px;
}

.prefs-toggle:disabled[b-3uxfoecdqd] {
    cursor: not-allowed;
    opacity: 0.5;
}

.prefs-toggle--on[b-3uxfoecdqd] {
    background: var(--color-accent-solid);
    border-color: var(--color-accent-solid);
}

.prefs-toggle-knob[b-3uxfoecdqd] {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-text-primary);
    transform: translateX(0);
    transition: transform var(--dur-fast) var(--ease-standard),
                background var(--dur-fast) var(--ease-standard);
}

.prefs-toggle--on .prefs-toggle-knob[b-3uxfoecdqd] {
    background: var(--color-accent-contrast);
    transform: translateX(20px);
}

/* ── Range ── */
.prefs-range[b-3uxfoecdqd] {
    flex: 0 0 auto;
    width: 140px;
    height: 2.5rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.prefs-range:disabled[b-3uxfoecdqd] {
    cursor: not-allowed;
    opacity: 0.4;
}

.prefs-preview-actions[b-3uxfoecdqd] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
}

.prefs-preview-actions .app-btn[b-3uxfoecdqd],
.prefs-preview-row > .app-btn[b-3uxfoecdqd] {
    min-height: 44px;
}

.prefs-toggle:focus-visible[b-3uxfoecdqd],
.prefs-range:focus-visible[b-3uxfoecdqd],
.prefs-sheet-close:focus-visible[b-3uxfoecdqd] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

/* Phones: a bottom sheet, nearly the screen's height at most, rounded on top. */
@media (max-width: 639.98px) {
    .prefs-sheet[b-3uxfoecdqd] {
        margin: auto 0 0;
        inset-block: auto 0;
        width: 100vw;
        height: auto;
        max-height: 92dvh;
        border-left: none;
        border-top: 1px solid var(--color-border);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        box-shadow: 0 -12px 40px rgb(0 0 0 / 0.28);
    }

    .prefs-sheet[open][b-3uxfoecdqd] {
        animation-name: prefs-in-up-b-3uxfoecdqd;
    }
}

/* Portrait phones: only the two wide controls go under their label (the theme
   and graphics pickers). A switch stays on its label's row: stacking every row
   would put each switch alone on a line and make the sheet far taller. */
@media (max-width: 480px) {
    .prefs-grid[b-3uxfoecdqd]  .prefs-row:has(.app-seg) {
        align-items: stretch;
        flex-direction: column;
        gap: var(--space-2);
    }

    /* The picker's buttons share the row instead of huddling at its left end. */
    .prefs-grid[b-3uxfoecdqd]  .prefs-row .app-seg { display: flex; }
    .prefs-grid[b-3uxfoecdqd]  .prefs-row .app-seg__btn { flex: 1 1 0; padding-inline: 0.4rem; }

    .prefs-range[b-3uxfoecdqd] { width: 50%; }

    .prefs-grid[b-3uxfoecdqd] { gap: var(--space-2); padding-inline: var(--space-2); }
}

@media (prefers-reduced-motion: reduce) {
    .prefs-sheet[open][b-3uxfoecdqd] { animation: none; }
}

/* ── Advanced (collapsed <details>) ──
   The summary reads as a quiet row with a chevron; the fieldset inside is an ordinary
   section card once it is open. */
.prefs-advanced-summary[b-3uxfoecdqd] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.75rem;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--surface-1);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.prefs-advanced-summary[b-3uxfoecdqd]::-webkit-details-marker {
    display: none;
}

.prefs-advanced-summary[b-3uxfoecdqd]::after {
    content: "▾";
    font-size: var(--text-sm);
    transition: transform var(--dur-fast) var(--ease-standard);
}

.prefs-advanced[open] > .prefs-advanced-summary[b-3uxfoecdqd]::after {
    transform: rotate(180deg);
}

.prefs-advanced-summary:hover[b-3uxfoecdqd] {
    background: var(--surface-3);
    color: var(--color-text-primary);
}

.prefs-advanced-summary:focus-visible[b-3uxfoecdqd] {
    outline: 2px solid var(--accent-ring);
    outline-offset: 2px;
}

.prefs-advanced[open] > .prefs-group--advanced[b-3uxfoecdqd] {
    margin-top: var(--space-2);
}

/* Dev persona picker (Advanced, non-production only). The native <select> it replaced
   in the account popover kept UA chrome that matched neither the sheet nor the theme. */

/* The preview row carries a tier picker, Preview and sometimes "Use …": let it wrap
   under the label on a narrow sheet rather than squeeze the 44px targets. */
.prefs-grid[b-3uxfoecdqd]  .prefs-preview-row {
    flex-wrap: wrap;
}
/* /Features/Shared/Shell/FpsCounter.razor.rz.scp.css */
/* FPS pill — runtime instance.

   The shared visual rules live in app-shell.css (`.gl-fps`, tiers, mobile
   sizing), next to the top-bar rail rules that position the chip. This file
   only carries the ‹centered› variant used by FpsCounter itself — the top bar
   centre rail
   moves the chip to the middle of the rail, distinct from a left-anchored
   desktop variant. */
.gl-fps--centered[b-wqvbk6u649] {
    margin: 0 auto;
}
/* /Features/Shared/Shell/GameShell.razor.rz.scp.css */
/* GameShell's own scoped rules. The shell's layout (.gps-shell, .gps-game-area, the
   no-WebGL card) is global, in css/games.css and css/game-shell.css; this file holds
   only what the shell's optional parts add. */

/* A game with an options drawer puts its gear on the title's line in the top bar. The
   title keeps its truncation, and the gear never shrinks. */
.gps-header-slot--opts[b-wl6grguxdi] {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.gps-header-slot--opts .gps-game-title[b-wl6grguxdi] {
    min-width: 0;
}
/* /Features/Shared/Shell/GameSkeleton.razor.rz.scp.css */
/* Covers the game area, which is position: relative (games.css), so the shimmer is the
   size of the stage the engine draws into. */
.game-skeleton[b-5l99enmn3y] {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: inherit;
    background: var(--color-bg);
    pointer-events: none;
}

.game-skeleton__stage[b-5l99enmn3y] {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    border-radius: var(--radius-lg);
}

.game-skeleton__label[b-5l99enmn3y] {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    letter-spacing: 0.04em;
}
/* /Features/Shared/Shell/KioskControlBar.razor.rz.scp.css */
/* Kiosk reel controls. Fixed to the bottom edge and centred, above the game
   canvas but out of the play area. Only rendered while the reel runs, so this
   never costs a non-kiosk page any space. */
.kiosk-bar[b-l31cljkohe] {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(env(safe-area-inset-bottom, 0px), 0.75rem);
    z-index: var(--z-dropdown, 40);

    display: flex;
    align-items: center;
    max-width: calc(100% - 1rem);
    box-sizing: border-box;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--surface-raised);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.35));
    font-size: 0.8rem;
}

.kiosk-bar-now[b-l31cljkohe] {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.kiosk-bar-dot[b-l31cljkohe] {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgb(251, 146, 60);
    flex-shrink: 0;
}

/* The bar sits over the middle of the bottom edge, which is where several demos
   put their action (Marble Race's pack, the Brawl FFA ring). It thins its own
   backdrop when the viewer stops moving (app.js toggles `po-awake` on <html>) and
   goes solid on any pointer, key, hover or focus.
   It deliberately does NOT fade its opacity: at 0.15 the title, the countdown and
   the exit button were unreadable, so the only visible way out of the reel was
   invisible. The controls stay at full contrast; only the pill behind them thins. */
.kiosk-bar[b-l31cljkohe] {
    background: color-mix(in srgb, var(--surface-raised) 80%, transparent);
}

:root.po-awake .kiosk-bar[b-l31cljkohe],
.kiosk-bar:hover[b-l31cljkohe],
.kiosk-bar:focus-within[b-l31cljkohe] {
    background: var(--surface-raised);
}

@media (prefers-reduced-motion: no-preference) {
    .kiosk-bar[b-l31cljkohe] { transition: background-color 0.4s var(--ease-standard); }
}

/* Paused reads as "held", not "stopped" — hence dimmed rather than a new hue. */
.kiosk-bar-dot--paused[b-l31cljkohe] { opacity: 0.4; }

@media (prefers-reduced-motion: no-preference) {
    .kiosk-bar-dot[b-l31cljkohe] { animation: kiosk-pulse-b-l31cljkohe 2s var(--ease-standard) infinite; }
    .kiosk-bar-dot--paused[b-l31cljkohe] { animation: none; }

    @keyframes kiosk-pulse-b-l31cljkohe {
        0%, 100% { opacity: 1; }
        50%      { opacity: 0.35; }
    }
}

.kiosk-bar-title[b-l31cljkohe] {
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.kiosk-bar-count[b-l31cljkohe] {
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 3.2rem;
    text-align: center;
}

/* Demo N of M progress pill. Anchors repeat viewers on where they
   are in the loop without competing for attention — same colour as the
   countdown, smaller font, no animation. Hidden via the parent component
   (no @if) until the first demo page reports its current index, so we
   never flash "0 of 9" before the destination page boots. */
.kiosk-bar-progress[b-l31cljkohe] {
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-xs);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-pill, 999px);
    background: var(--surface-2);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.kiosk-bar-btn[b-l31cljkohe] {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* 2.25rem keeps the hit target at ~36px; these sit near the thumb on a
       phone and a smaller target here is a mis-tap into the game. */
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--color-text-primary);
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.18s var(--ease-standard), background 0.18s var(--ease-standard);
}

.kiosk-bar-btn:hover[b-l31cljkohe] {
    border-color: var(--color-accent);
    background: var(--surface-1);
}

.kiosk-bar-btn--exit:hover[b-l31cljkohe] {
    border-color: var(--color-danger, rgb(239, 68, 68));
    color: var(--color-danger, rgb(239, 68, 68));
}

/* Mute button: matches the other round buttons but uses the muted state
   class so a kiosk that's already silenced keeps the icon-on-button contract
   (speaker-with-slash vs speaker-on) instead of swapping the same button
   out. Hover mirrors the exit button — accent-coloured — so the player can
   spot it from across the room. */
.kiosk-bar-btn--mute[b-l31cljkohe] { /* visual rules shared with .kiosk-bar-btn */ }

@media (max-width: 480px) {
    .kiosk-bar[b-l31cljkohe] {
        display: grid;
        grid-template-columns: repeat(5, 2.75rem);
        gap: 0.35rem;
        font-size: 0.75rem;
        border-radius: var(--radius-lg);
    }
    .kiosk-bar-now[b-l31cljkohe] { grid-column: span 3; }
    .kiosk-bar-count[b-l31cljkohe] { grid-column: span 2; text-align: right; }
    .kiosk-bar-title[b-l31cljkohe] { max-width: none; }
    .kiosk-bar-btn[b-l31cljkohe] { width: 2.75rem; height: 2.75rem; }
    .kiosk-bar-progress[b-l31cljkohe] { display: none; }
}
/* /Features/Shared/Shell/SwipeBack.razor.rz.scp.css */
/* SwipeBack wrapper — transparent container that lets pointer events
   reach the inner content while still capturing the gesture. Touch-action
   pan-y lets vertical page scroll pass through but lets the browser know
   we may handle horizontal pans ourselves. */
.swipe-area[b-8afripn8x6] {
    display: contents;
    touch-action: pan-y;
}
/* /Features/TicTacToe/TicTacToePage.razor.rz.scp.css */
/* Tic Tac Toe — scoped board styles. Design tokens (--color-*, --radius-*, --ease-*,
   --accent-*) are inherited from the global :root in css/app.css. */

/* ── Board ── */
.ttt-board[b-a4k8m7yq23] {
    /* Geometry tokens are shared with the win-line calc (see WinLineStyle in the
       .razor) so the overlay stays pixel-aligned with the grid at any size.
       `--kiosk-clearance` is set only while the "Watch all demos" bar is up: the
       bar covers the bottom edge, so the board gives that height back instead of
       letting its last row sit underneath the controls. */
    --ttt-cell: clamp(44px, calc((100dvh - 220px - var(--kiosk-clearance, 0px)) / 6), 78px);
    --ttt-gap: 4px;
    --ttt-pad: 12px;
    /* Distinct player colours: X = warm coral, O = cyan. */
    --ttt-x: #ff6b6b;
    --ttt-o: #00e5ff;

    position: relative;
    display: grid;
    grid-template-columns: repeat(6, var(--ttt-cell));
    grid-template-rows: repeat(6, var(--ttt-cell));
    gap: var(--ttt-gap);
    padding: var(--ttt-pad);
    margin: 1rem auto;
    width: fit-content;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    /* Depth: glass surface + inner top highlight + elevation, so the board
       reads as a physical object instead of a flat rectangle. */
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
        var(--surface-2);
    backdrop-filter: var(--glass-1);
    box-shadow:
        var(--elevation-1),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ARIA row wrapper. `display: contents` keeps the 36 cells as direct
   grid items of .ttt-board, so the 6×6 template above still lays them out — the
   element exists purely to satisfy grid > row > gridcell in the a11y tree. */
.ttt-row[b-a4k8m7yq23] { display: contents; }

/* ── Cell ── */
.ttt-cell[b-a4k8m7yq23] {
    position: relative;
    width: var(--ttt-cell);
    height: var(--ttt-cell);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    overflow: hidden;
    transition: background var(--dur-fast) var(--ease-standard),
                border-color var(--dur-fast) var(--ease-standard),
                transform var(--dur-fast) var(--ease-standard);
    /* Staggered board entrance — --ci is the linear cell index set inline. */
    animation: ttt-cell-in-b-a4k8m7yq23 var(--dur-base) var(--ease-out) backwards;
    animation-delay: calc(var(--ci, 0) * 10ms);
}

.ttt-cell:hover:not(.disabled)[b-a4k8m7yq23] {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.6);
    transform: translateY(-1px);
}

/* Tactile press — the cell sinks slightly on pointer-down. */
.ttt-cell:not(.disabled):active[b-a4k8m7yq23] {
    transform: translateY(0) scale(0.96);
    background: rgba(0, 229, 255, 0.12);
}

.ttt-cell.disabled[b-a4k8m7yq23] { cursor: default; }

@keyframes ttt-cell-in-b-a4k8m7yq23 {
    from { opacity: 0; transform: scale(0.6) translateY(6px); }
    to   { opacity: 1; transform: none; }
}

/* ── Marks (self-drawing SVG X / O with holographic neon bloom) ── */
.ttt-mark[b-a4k8m7yq23] {
    width: 62%;
    height: 62%;
    overflow: visible;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.45));
}

.ttt-mark line[b-a4k8m7yq23],
.ttt-mark circle[b-a4k8m7yq23] {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}

.ttt-mark--x line[b-a4k8m7yq23] { stroke: var(--ttt-x); filter: drop-shadow(0 0 6px #ff6b6b); }
.ttt-mark--o circle[b-a4k8m7yq23] { stroke: var(--ttt-o); filter: drop-shadow(0 0 6px #00e5ff); }

/* Placement draw-in: each stroke reveals via stroke-dashoffset. The X's two
   strokes fire one-two; the O sweeps closed. */
.ttt-mark:not(.ttt-mark--ghost) line[b-a4k8m7yq23] {
    stroke-dasharray: 82;
    stroke-dashoffset: 82;
    animation: ttt-draw-b-a4k8m7yq23 0.22s var(--ease-out) forwards;
}
.ttt-mark:not(.ttt-mark--ghost) line:nth-of-type(2)[b-a4k8m7yq23] { animation-delay: 0.11s; }

.ttt-mark:not(.ttt-mark--ghost) circle[b-a4k8m7yq23] {
    stroke-dasharray: 176;
    stroke-dashoffset: 176;
    animation: ttt-draw-b-a4k8m7yq23 0.32s var(--ease-out) forwards;
}

@keyframes ttt-draw-b-a4k8m7yq23 { to { stroke-dashoffset: 0; } }

/* Ghost hover preview — a faint mark of the current player's token in empty
   cells, revealed on hover. Pointer-events off so it never blocks the click. */
.ttt-mark--ghost[b-a4k8m7yq23] {
    position: absolute;
    inset: 19%;
    width: 62%;
    height: 62%;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-standard);
}
.ttt-mark--ghost line[b-a4k8m7yq23],
.ttt-mark--ghost circle[b-a4k8m7yq23] { stroke-dashoffset: 0; }
.ttt-cell:not(.disabled):hover .ttt-mark--ghost[b-a4k8m7yq23] { opacity: 0.25; }

/* ── Last-move indicator ── */
.ttt-cell.last-move[b-a4k8m7yq23]::before {
    content: '';
    position: absolute;
    inset: 3px;
    border: 2px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    pointer-events: none;
    animation: ttt-lastmove-b-a4k8m7yq23 0.4s var(--ease-out) both;
}

@keyframes ttt-lastmove-b-a4k8m7yq23 {
    from { opacity: 0; transform: scale(1.15); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Winning cells + strike line (holographic neon laser ray) ── */
.ttt-cell.win-cell[b-a4k8m7yq23] {
    background: rgba(0, 229, 255, 0.22);
    border-color: rgba(0, 229, 255, 0.9);
    box-shadow: 0 0 24px rgba(0, 229, 255, 0.6), inset 0 0 12px rgba(0, 229, 255, 0.4);
    animation: ttt-win-glow-b-a4k8m7yq23 1.2s ease-in-out infinite;
    z-index: 2;
}

@keyframes ttt-win-glow-b-a4k8m7yq23 {
    0%, 100% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.5), inset 0 0 8px rgba(0, 229, 255, 0.3); }
    50%      { box-shadow: 0 0 32px rgba(0, 229, 255, 0.9), inset 0 0 16px rgba(0, 229, 255, 0.6); }
}

/* Strike line — anchored at the first winning cell centre, rotated + scaled
   from left. Holographic electric laser beam. */
.ttt-winline[b-a4k8m7yq23] {
    position: absolute;
    height: 8px;
    margin-top: -4px;
    border-radius: var(--radius-pill);
    background: var(--wl-color, var(--accent-cyan));
    box-shadow: 0 0 18px var(--wl-color, var(--accent-cyan)), 0 0 36px var(--wl-color, var(--accent-cyan));
    transform-origin: left center;
    transform: rotate(var(--wl-angle, 0deg));
    pointer-events: none;
    z-index: 3;
    animation: ttt-winline-draw-b-a4k8m7yq23 0.38s var(--ease-out) both;
}

@keyframes ttt-winline-draw-b-a4k8m7yq23 {
    from { transform: rotate(var(--wl-angle, 0deg)) scaleX(0); opacity: 0.4; }
    to   { transform: rotate(var(--wl-angle, 0deg)) scaleX(1); opacity: 1; }
}

/* ── AI-thinking state: pulsing inset ring so the hand-off feels alive
     rather than frozen during the AI's move delay. ── */
.ttt-board--thinking[b-a4k8m7yq23]::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 4;
    box-shadow: inset 0 0 0 2px rgba(0, 229, 255, 0.4);
    animation: ttt-think-b-a4k8m7yq23 1s ease-in-out infinite;
}

@keyframes ttt-think-b-a4k8m7yq23 {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 0.9; }
}

/* ── Outcome moments ── */
/* Decided (someone won): dim the non-winning cells to spotlight the line, and
   run a one-shot shimmer sweep across the board. Mode-safe — works for a vs-AI
   win, a vs-AI loss, and either side of a 2-player game. */
.ttt-board--decided .ttt-cell:not(.win-cell)[b-a4k8m7yq23] {
    opacity: 0.32;
    filter: saturate(0.6);
    transition: opacity 0.4s var(--ease-standard), filter 0.4s var(--ease-standard);
}

.ttt-board--decided[b-a4k8m7yq23]::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.18) 50%, transparent 68%);
    transform: translateX(-120%);
    animation: ttt-sweep-b-a4k8m7yq23 0.75s var(--ease-out) 0.1s 1;
}

@keyframes ttt-sweep-b-a4k8m7yq23 {
    to { transform: translateX(120%); }
}

/* Draw: a gentle grayscale settle over the whole board. */
.ttt-board--draw .ttt-cell[b-a4k8m7yq23] {
    filter: grayscale(0.7);
    opacity: 0.82;
    transition: filter 0.5s var(--ease-standard), opacity 0.5s var(--ease-standard);
}

/* ── Responsive ── */
/* ── Layout: quick-match card, turn strip, board, in one column ────────────
   The game area is a row; without this wrapper the card and the board sat side
   by side and the board ran off a phone's right edge. */
.ttt-layout[b-a4k8m7yq23] {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* The slot above the board: the shared QuickMatchPanel (online) and the shared
   TurnStrip. It only sizes them to the board, so it repeats the board's geometry
   tokens; the two colours are here because the strip's swatches read them. */
.ttt-slot[b-a4k8m7yq23] {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: calc(6 * var(--ttt-cell) + 5 * var(--ttt-gap) + 2 * var(--ttt-pad));
  --ttt-cell: clamp(44px, calc((100dvh - 220px) / 6), 78px);
  --ttt-gap: 4px;
  --ttt-pad: 12px;
  --ttt-x: #ff6b6b;
  --ttt-o: #00e5ff;
  max-width: 100%;
}

/* Secondary line in the panel and on the end-of-game summary. */
.ttt-online-note[b-a4k8m7yq23] {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
    .ttt-slot[b-a4k8m7yq23],
    .ttt-board[b-a4k8m7yq23] {
        --ttt-cell: clamp(40px, 13.5vw, 52px);
        --ttt-gap: 3px;
        --ttt-pad: 8px;
    }
}

/* A phone on its side has the width and about 390px of height. The 44px floor
   above made the board 340px tall there, taller than the room under the top bar. */
@media (max-height: 500px) {
    .ttt-slot[b-a4k8m7yq23],
    .ttt-board[b-a4k8m7yq23] {
        --ttt-cell: clamp(30px, calc((100dvh - 190px) / 6), 78px);
        --ttt-gap: 3px;
        --ttt-pad: 8px;
    }
    .ttt-board[b-a4k8m7yq23] { margin: 0.4rem auto; }
}

/* ── Accessibility: the global prefers-reduced-motion guard in app.css already
     collapses animation durations; we additionally pin the stroke reveals and
     the winline to their finished state so nothing is left half-drawn. ── */
@media (prefers-reduced-motion: reduce) {
    .ttt-mark line[b-a4k8m7yq23],
    .ttt-mark circle[b-a4k8m7yq23] { stroke-dashoffset: 0 !important; }
    .ttt-winline[b-a4k8m7yq23] { transform: rotate(var(--wl-angle, 0deg)); }
    .ttt-cell[b-a4k8m7yq23] { animation: none; }
}

/* The rule in one line, under the turn strip. */
.ttt-goal[b-a4k8m7yq23] {
    margin: 0.35rem 0 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* The options drawer's body (GameShell OptionsContent). Rendered by this page, so its
   scope applies inside the drawer. */
.ttt-options[b-a4k8m7yq23] {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.ttt-options__label[b-a4k8m7yq23] {
    margin: 0;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

/* Keyboard / gamepad focus on a cell. The cell's own border and win glow would
   otherwise hide the shell's shared focus shadow, so the ring is an outline. */
.ttt-cell:focus-visible[b-a4k8m7yq23] {
    outline: 2px solid var(--accent-cyan, #22d3ee);
    outline-offset: 1px;
}

/* Touch: every cell is at least the 44px target (GAME-CONSISTENCY rule 8). The
   phone and landscape rules above go as low as 30px for a fine pointer (the base
   clamp already floors at 44px). On a landscape phone the one-line rule under the
   strip gives up its row instead. */
@media (pointer: coarse) and (max-width: 640px) {
    .ttt-slot[b-a4k8m7yq23],
    .ttt-board[b-a4k8m7yq23] {
        --ttt-cell: max(44px, min(13.5vw, 52px));
        --ttt-gap: 3px;
        --ttt-pad: 6px;
    }
}

@media (pointer: coarse) and (max-height: 500px) {
    .ttt-slot[b-a4k8m7yq23],
    .ttt-board[b-a4k8m7yq23] { --ttt-cell: 44px; }
    .ttt-board[b-a4k8m7yq23] { margin: 0.25rem auto; }
    .ttt-goal[b-a4k8m7yq23] { display: none; }
}
/* /Layout/BottomNav.razor.rz.scp.css */
.app-bottom-nav[b-tnl77ghmm3] {
    display: none;
}

@media (max-width: 768px) {
    .app-bottom-nav[b-tnl77ghmm3] {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: calc(3.25rem + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        background: var(--surface-bar);
        backdrop-filter: var(--glass-2);
        border-top: 1px solid var(--color-border);
        z-index: var(--z-sticky);
    }

    .app-bottom-nav__item[b-tnl77ghmm3] {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.1rem;
        color: var(--color-text-secondary);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 600;
        padding: 0.25rem 0;
    }

    .app-bottom-nav__item--active[b-tnl77ghmm3] {
        color: var(--color-accent);
    }
}
/* /Layout/BuildVersion.razor.rz.scp.css */
/* Read by assistive technology, not drawn. MainLayout's .gl-sr-only is scoped to its own
   markup, so this component carries its own copy. The stamp itself is styled by
   po-tokens.css (.po-version). */
.gl-sr-only[b-7dyex46w4x] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media print {
    .po-version[b-7dyex46w4x] { display: none; }
}
/* /Layout/MainLayout.razor.rz.scp.css */
/* MainLayout-exclusive chrome.
   Design tokens (--color-*, --radius-*, --surface-*, --dur-*) are inherited from
   the global :root in css/app.css.

   ── What is deliberately NOT here ──────────────────────────────────────────
   The shared top-bar chrome (.gl-page, .gl-top-bar*, .gl-brand*,
   .gl-auth*, .gl-overflow-*, .gl-dev-switch*) lives in css/app-shell.css and ONLY
   there. It used to be duplicated into this file under an instruction to keep the
   two copies byte-identical; they had already drifted apart, and because Blazor
   compiles this file as component-scoped CSS (`.gl-top-bar[b-xxxxx]`) the scoped
   copy only ever applied to MainLayout's own markup — EmptyLayout and
   EmptyLayout render the same header and always read app-shell.css. Editing
   the bar here would change one layout and silently not the other two.

   The test for whether a rule belongs in this file: does its markup appear ONLY
   in MainLayout.razor? The status pills, .gl-content and the toast stack pass.
   Everything else does not. */

/* ── Offline status pill ─────────────────────────────────────────────────────
   It sits in the top bar's right rail, so it changes no page's height: as a
   full-width banner above the bar, going offline pushed every game down until it
   scrolled. Calm on purpose: offline is a state the app keeps working in. */
.gl-status-pill[b-17jnu8kmd6] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-height: 1.75rem;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    color: var(--color-text-primary);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: help;
}

.gl-offline-dot[b-17jnu8kmd6] {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-warning);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-warning) 30%, transparent);
    flex: 0 0 auto;
}

/* Narrow phones: the right rail also holds the account initial, and the centre rail
   a game's title. The pill keeps its mark and drops its word to the a11y tree only. */
@media (max-width: 420px) {
    .gl-status-pill[b-17jnu8kmd6] {
        justify-content: center;
        width: 1.75rem;
        padding: 0;
    }
    .gl-status-pill__label[b-17jnu8kmd6] {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
}

/* Read by assistive technology, not drawn: the connectivity live region and the
   contentinfo landmark. */
.gl-sr-only[b-17jnu8kmd6] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ── Skip link ──
   The rule lives in wwwroot/css/app.css, not in this SCOPED stylesheet, which would
   make the class work only inside MainLayout: another layout would render its skip
   link as unstyled text sitting on top of the page. An accessibility affordance
   every layout is expected to carry cannot live in one layout's scoped file. */

/* The skip target must not draw a focus ring of its own when focused
   programmatically — that would outline the entire page. */
.gl-content:focus[b-17jnu8kmd6] {
    outline: none;
}

/* ── Content well ── */
.gl-content[b-17jnu8kmd6] {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Respect the home-indicator inset on phones; nothing else is reserved at the
       bottom, so there is no strip of empty space under every page. */
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ── Toast stack — rendered by MainLayout's @foreach toast loop, and only there.
     ── */
.toast-stack[b-17jnu8kmd6] {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: var(--z-toast-stack);
    max-width: 380px;
}

/* Entry via @starting-style rather than a keyframe. A keyframe animation replays
   on every style recalc that re-triggers it and cannot be interrupted cleanly if
   a second toast lands mid-flight; a transition from a declared start state just
   interpolates from wherever the element currently is. Browsers without
   @starting-style paint the toast in place, which is the correct fallback. */
.toast[b-17jnu8kmd6] {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    box-shadow: var(--elevation-1);
    transition: transform var(--dur-base) var(--ease-out),
                opacity var(--dur-base) var(--ease-out);
}

@starting-style {
    .toast[b-17jnu8kmd6] {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast--info[b-17jnu8kmd6] { background: var(--toast-info-bg); border: 1px solid var(--toast-info-border); color: var(--toast-info-text); }
.toast--error[b-17jnu8kmd6] { background: var(--toast-error-bg); border: 1px solid var(--toast-error-border); color: var(--toast-error-text); }
.toast--success[b-17jnu8kmd6] { background: var(--toast-success-bg); border: 1px solid var(--toast-success-border); color: var(--toast-success-text); }
.toast--warning[b-17jnu8kmd6] { background: var(--toast-warning-bg); border: 1px solid var(--toast-warning-border); color: var(--toast-warning-text); }

.toast-msg[b-17jnu8kmd6] { flex: 1; }

.toast-close[b-17jnu8kmd6] {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    font-size: 1.1rem;
    line-height: 1;
}

.toast-close:hover[b-17jnu8kmd6] { opacity: 1; }

/* Action button on an actionable toast (currently the service-worker update
   prompt). Reads as the primary control on the toast — it is the only way to
   actually take the update. currentColor keeps it legible against all four
   toast tints in both schemes without four separate rules. */
.toast-action[b-17jnu8kmd6] {
    flex: 0 0 auto;
    background: color-mix(in srgb, currentColor 16%, transparent);
    border: 1px solid currentColor;
    border-radius: var(--radius-pill);
    color: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
}

.toast-action:hover[b-17jnu8kmd6] { background: color-mix(in srgb, currentColor 28%, transparent); }

/* (`@keyframes gl-toast-in` removed — replaced by the @starting-style transition
   above, which is its only former consumer.) */

/* Toasts are pinned to the bottom-right on desktop; on a phone that corner is
   thumb territory and the stack can cover a game's controls. Span the width
   instead, above the home-indicator inset. */
@media (max-width: 640px) {
    .toast-stack[b-17jnu8kmd6] {
        left: var(--space-3);
        right: var(--space-3);
        bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0));
        max-width: none;
    }
}

/* The build-date stamp and the site footer live in Layout/BuildVersion.razor(.css), and the
   game-page rules for them in css/app-shell.css: CSS scoped to this file never reaches
   another component's markup. */


/* Phones: clear the fixed BottomNav (3.25rem) and the .po-version stamp lifted above it. */
@media (max-width: 768px) {
    .gl-content[b-17jnu8kmd6] {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }
}
/* /Layout/PageHeader.razor.rz.scp.css */
.app-page-head[b-wzphjxfe0z] {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    /* Width, not just flex: the header is a flex item of pages whose container is a
       centred column (.home-container), where a shrink-to-fit header would sit at
       its content width instead of the page's. */
    width: 100%;
    margin-bottom: var(--space-3);
}

.app-page-head__text[b-wzphjxfe0z] {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.app-page-head__title[b-wzphjxfe0z] {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

.app-page-head__meta[b-wzphjxfe0z] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-height: 1.25rem;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* The actions hold their own controls; the header only places them. They stay on the
   title's line while there is room and drop under it on a phone. */
.app-page-head__actions[b-wzphjxfe0z] {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-left: auto;
}

/* The hub: the name is already in the top bar, so only the outline keeps it. */
.app-page-head--sr-only .app-page-head__title[b-wzphjxfe0z] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 560px) {
    .app-page-head[b-wzphjxfe0z] {
        align-items: flex-start;
    }

    /* Full width on its own line: a 390px phone cannot fit a title and a filter row
       side by side without shrinking one of them to an unusable width. */
    .app-page-head__actions[b-wzphjxfe0z] {
        width: 100%;
        margin-left: 0;
    }
}
