/*
 * Sole Games — the visual language.
 *
 * Type is the medium (compass.md). There are no images anywhere in this
 * stylesheet: the wheel, the felt, the chips and the pointer are all
 * characters and boxes. Fonts are SYSTEM ONLY — landmarks.md L6 promises no
 * network request after page load, which rules out a webfont.
 *
 * Loaded by sole_autosite AFTER its own style.css, so everything here wins.
 * Relative units only (standards_ui.md §3).
 */

:root {
  --ground: #07070a;
  --ground-raised: #101017;
  --gold: #d4a850;
  --bone: #e8e4da;
  /* Deep enough for bone text to clear WCAG AA while remaining casino red. */
  --red: #b23832;
  --red-on-ground: #d24b42;
  --green: #2f7d59;
  --green-on-ground: #378b64;
  --roulette-green: #296d4e;
  --silver: #9a9a9a;
  --edge: #2a2a33;
  --roulette-black: #34343f;

  --face: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --figure: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Page shell — restyling the chrome sole_autosite injects
   -------------------------------------------------------------------------- */

/*
 * sole_autosite lays the page out as a flex column on <body> and gives <main>
 * `display: contents`, so <main> generates NO BOX — width, max-width and auto
 * margins set on it are silently ignored. The real boxes are <header>,
 * <footer> and the .page-body wrapper the engine puts the authored body in.
 * Centring is therefore done by aligning body's flex children, NOT by auto
 * margins, which would collapse each child to shrink-to-fit instead.
 */
body {
  display: flex;
  flex-direction: column;
  align-items: center;
  /*
   * The engine caps <body> at its prose measure and leaves margin at 0, which
   * pins the whole page to the left edge. A casino table wants a little more
   * room than an article, so the cap is widened and the box centred here.
   */
  max-width: 54rem;
  margin-inline: auto;
  background: var(--ground);
  color: var(--bone);
  font-family: var(--face);
  line-height: 1.6;
}

header,
footer,
.page-body {
  box-sizing: border-box;
  width: 100%;
  padding-inline: 0.4rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem;
  padding-block: 1.4rem 0.8rem;
  border-bottom: 0.06rem solid var(--edge);
  /* Right-align wrapped lines. The title's trailing auto margin right-aligns
     the first line (it steals that line's free space, so justify-content is
     ignored there); on a narrow phone where the switcher wraps to its own
     line it has no auto margin, so this is what keeps it against the right
     edge instead of packing flush-left. */
  justify-content: flex-end;
}

.site-title {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: var(--figure);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
  /* Push everything after the title — the wallet and the language switcher —
     to the right as a group, so the title stays on the left. One auto margin
     here beats competing auto margins on each right-hand item. */
  margin-inline-end: auto;
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  font-size: 0.82rem;
}

/*
 * The wallet — the shared bankroll, shown in the header on every page. Sits at
 * the right of the header before the language switcher; a chip-like pill in
 * gold so it reads as money at a glance without an image.
 */
.wallet {
  /* sole_autosite reserves order slots for header children — logo 100,
     site-title 105, navigation 110, language-switcher 120. An injected element
     defaults to order 0 and would sort to the far left. 115 is the free slot
     between the title and the switcher (and clear of navigation's 110, which no
     current page emits but the scaffold reserves), so the wallet seats on the
     right with the switcher, where the title's trailing auto margin pushes it. */
  order: 115;
  padding: 0.15rem 0.7rem;
  border: 0.09rem solid var(--gold);
  border-radius: 1rem;
  font-family: var(--figure);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.language-switcher .link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  color: var(--silver);
  text-decoration: none;
  margin-inline-start: 0.15rem;
  padding-inline: 0.2rem;
}

.language-switcher .link.active { color: var(--gold); }
.language-switcher a.link:hover { color: var(--bone); }

.page-body { padding-block: 1.6rem 2.4rem; }

h1 {
  font-family: var(--figure);
  /* Larger and CENTRED — the game title is the hero, not a document heading. */
  font-size: clamp(1.9rem, 7vw, 2.8rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  margin-block: 0 0.4em;
  text-align: center;
}

h2 {
  font-family: var(--figure);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--bone);
  margin-block: 2.2em 0.6em;
}

p { margin-block: 0 0.9em; }

/* The lede is the intro PROSE, two or three sentences — it keeps the same
   start-aligned reading measure as the how-to-play / odds / paytable text.
   Centring it (it wraps to several lines) would recreate the "reads like a
   ragged centred document" problem the composition pass exists to avoid; only
   the title and the status/controls layer are centred. */
.lede { font-size: 1.06rem; color: var(--bone); }

.odds {
  border-inline-start: 0.16rem solid var(--gold);
  padding: 0.1rem 0 0.1rem 0.9rem;
  color: var(--silver);
}

.odds strong { color: var(--gold); font-weight: 600; }

footer {
  border-top: 0.06rem solid var(--edge);
  padding-block: 1.2rem 2.4rem;
  color: var(--silver);
  font-size: 0.85rem;
}

a { color: var(--gold); }

/* --------------------------------------------------------------------------
   The table
   -------------------------------------------------------------------------- */

.table {
  margin-block: 1.4rem 2rem;
  font-family: var(--figure);
}

.status {
  /* A heads-up display: the balance and stake read as a centred instrument
     panel, not a form row pushed to the two edges. */
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1.6rem;
  border-block: 0.06rem solid var(--edge);
  padding-block: 0.7rem;
  text-align: center;
}

.status-balance { color: var(--gold); font-size: 1.35rem; margin: 0; }
.status-stake { color: var(--silver); font-size: 0.9rem; margin: 0; }

.message {
  min-height: 2.6em;
  margin-block: 0.9rem;
  color: var(--bone);
  font-size: 0.98rem;
  text-align: center;
}

/* The wheel ------------------------------------------------------------- */

.wheel-frame {
  --wheel: min(90vw, 24rem);
  position: relative;
  width: var(--wheel);
  height: var(--wheel);
  margin: 1.4rem auto 0.6rem;
  border-radius: 50%;
  border: 0.1rem solid var(--edge);
  background:
    radial-gradient(circle at 50% 50%, var(--ground-raised) 38%, transparent 39%),
    radial-gradient(circle at 50% 50%, transparent 62%, var(--ground-raised) 63%);
}

.wheel-ring {
  position: absolute;
  inset: 0;
  transform: rotate(var(--ring-rotation, 0deg));
}

.wheel-pocket {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2em;
  height: 2em;
  margin: -1em;
  display: grid;
  place-items: center;
  font-size: clamp(0.68rem, 2.2vw, 0.78rem);
  font-weight: 600;
  border-radius: 50%;
  /*
   * Each pocket is rotated to its seat on the ring, then pushed outward.
   * Numbers ride radially, as they do on a real wheel.
   */
  transform:
    rotate(calc(var(--pocket-index) * (360deg / 37)))
    translateY(calc(var(--wheel) / -2 + 0.9rem));
}

.wheel-red { background: var(--red); color: var(--bone); }
.wheel-black {
  background: var(--roulette-black);
  color: var(--bone);
  border: 0.06rem solid color-mix(in srgb, var(--bone) 38%, var(--ground));
}
.wheel-green { background: var(--roulette-green); color: var(--bone); }

.wheel-pointer {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.5rem;
  line-height: 1;
}

/*
 * The hub. Sits inside the frame but OUTSIDE the ring, so it never rotates:
 * the wheel turns around a result that stays readable.
 */
.wheel-result {
  position: absolute;
  inset: 26%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: clamp(1.8rem, 9vw, 3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--silver);
  background: var(--ground);
  border: 0.08rem solid var(--edge);
}

.wheel-result[data-colour="red"] { color: var(--bone); background: var(--red); border-color: var(--red); }
.wheel-result[data-colour="black"] { color: var(--bone); background: var(--roulette-black); }
.wheel-result[data-colour="green"] { color: var(--bone); background: var(--roulette-green); border-color: var(--roulette-green); }
.wheel-result[data-spinning="true"] { color: var(--edge); }

/* Chips ----------------------------------------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-block: 1rem 0.8rem;
}

.chips-legend { color: var(--silver); font-size: 0.82rem; margin-inline-end: 0.2rem; }

.chip {
  /* A round chip that clears the ~44px thumb floor on BOTH edges (rem, not the
     0.85rem-relative em that left the height at ~37px). */
  min-width: 2.9rem;
  min-height: 2.9rem;
  border-radius: 50%;
  border: 0.12rem dashed var(--silver);
  background: var(--ground-raised);
  color: var(--bone);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--gold);
  color: var(--gold);
}

.chip:disabled { opacity: 0.35; cursor: not-allowed; }

/* The inside-bet type selector — the gateway to the inside bets, so it mirrors
   the chip tray: thumb-sized (standards_ui §3), casino colours, and a gold
   selected state so the armed type is visible on the control itself, not only
   implied by the targets that appear on the felt. */
.bet-types {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-block: 0.2rem 1rem;
}

.bet-types-legend { color: var(--silver); font-size: 0.82rem; margin-inline-end: 0.2rem; }

.bet-type {
  /* 2.75REM, not 2.75em: the box must be a full thumb target (~44px), not 2.75em
     of the smaller 0.85rem label — the same trap .target and the wide zero cell
     are written to avoid. The gateway to every inside bet must clear the real
     touch floor, not just the em-relative one. */
  min-height: 2.75rem;
  padding-inline: 0.85em;
  border-radius: 1.4em;
  border: 0.12rem dashed var(--silver);
  background: var(--ground-raised);
  color: var(--bone);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.bet-type[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--gold);
  color: var(--gold);
}

.bet-type:disabled { opacity: 0.35; cursor: not-allowed; }

/* The felt -------------------------------------------------------------- */

/* One grid holds every cell; the target and marker layers overlay it in the
   SAME coordinates. It reflows: a 3-wide vertical layout in portrait (and narrow
   landscape), an authentic 12-wide horizontal layout where twelve thumb-sized
   cells fit. Cells and overlay children carry BOTH layouts' grid lines as custom
   properties (--p-* portrait, --w-* wide); the media query below picks which. */

.felt {
  display: grid;
  grid-template-columns: repeat(3, 1fr) minmax(2.6rem, 0.7fr);
  grid-template-rows: auto repeat(12, minmax(3.9em, auto)) auto auto auto;
  gap: 0.22rem;
}

/* The target and marker layers are grid items spanning the WHOLE felt and using
   subgrid, so they share the felt's exact track lines — a target placed by grid
   line always lands on the same boundary as the cells, in either reflow layout,
   and follows the media query's template change for free. (A separate grid would
   collapse its empty zero/column tracks and misalign every overlay.) */
.felt-targets,
.felt-markers {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  pointer-events: none;
}

/*
 * Deliberately no stacking context: ordinary translucent targets stay below
 * the marker layer, while a focused target's ring pseudo-element can escape
 * above it without lifting every sibling target over the marker text.
 */
.felt-targets { z-index: auto; }
.felt-markers { z-index: 3; }

.cell {
  position: relative;
  grid-row: var(--p-row, auto);
  grid-column: var(--p-col, auto);
  min-height: 3.9em;
  display: grid;
  place-items: center;
  padding: 0.3em 0.2em;
  border: 0.06rem solid var(--edge);
  border-radius: 0.2rem;
  background: var(--ground-raised);
  color: var(--bone);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.felt-zero { background: var(--roulette-green); }
.felt-red { background: #4a1f1d; }
.felt-black { background: var(--roulette-black); }
.felt-column,
.felt-dozen,
.felt-even { font-size: 0.74rem; letter-spacing: 0.02em; }

.cell:hover:not(:disabled) { outline: 0.08rem solid var(--gold); }
.cell:focus-visible { outline: 0.14rem solid var(--gold); outline-offset: 0.1rem; }
.cell:disabled { opacity: 0.5; cursor: not-allowed; }

.cell-backed { box-shadow: inset 0 0 0 0.12rem var(--gold); }

.cell-stack {
  position: absolute;
  inset-block-end: 0.15em;
  inset-inline-end: 0.25em;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gold);
}

/* Inside-bet targets — round, thumb-sized, centred on the boundary of the cells
   they span: the shared edge for a split, the intersection for a corner. Only
   the active bet type's targets are rendered. Round, so CSS hit-testing clips
   the tappable area to the disc, which is why the non-overlap test measures
   centre-to-centre distance, not bounding boxes. */
.target {
  grid-row: var(--p-row, auto);
  grid-column: var(--p-col, auto);
  place-self: center;
  pointer-events: auto;
  /* Thumb-sized: 2.75em on its own 1rem font is 2.75rem, so the disc is a full
     thumb target (standards_ui §3), not 2.75em of some smaller inherited font. */
  font-size: 1rem;
  width: 2.75em;
  height: 2.75em;
  border-radius: 50%;
  border: 0.11rem solid var(--gold);
  background: color-mix(in srgb, var(--green) 62%, transparent);
  color: var(--bone);
  font-family: inherit;
  cursor: pointer;
}

/* Street and six-line targets sit on the covered block's outer edge, not its
   middle, so they read as an edge bet and clear the number cells' own taps. */
.target-street,
.target-line { place-self: center end; }

.target:hover:not(:disabled) {
  background: color-mix(in srgb, var(--gold) 42%, transparent);
}

/*
 * A two-colour keyboard indicator survives every surface under these boundary
 * targets: ground separates it from the existing gold border, then bone clears
 * the dark red/black/green felt. A transparent pseudo-element repeats only the
 * ring above passive markers; the target fill itself stays beneath them.
 */
.target:focus-visible {
  position: relative;
  background: color-mix(in srgb, var(--gold) 42%, transparent);
  box-shadow: 0 0 0 0.12rem var(--ground);
  /* Chromium quantizes outline widths to whole device pixels; 0.19rem keeps
     the computed ring above the locked 0.14rem minimum at the default root. */
  outline: 0.19rem solid var(--bone);
  outline-offset: 0.12rem;
}

.target:focus-visible::after {
  content: "";
  position: absolute;
  inset: -0.31rem;
  z-index: 4;
  pointer-events: none;
  border: 0.19rem solid var(--bone);
  border-radius: inherit;
  box-shadow: inset 0 0 0 0.12rem var(--ground);
}
.target:disabled { opacity: 0.5; cursor: not-allowed; }

/* Persistent chip marker for a placed inside bet, at its boundary. */
.marker {
  grid-row: var(--p-row, auto);
  grid-column: var(--p-col, auto);
  place-self: center;
  min-width: 2em;
  padding: 0.12em 0.3em;
  border-radius: 1em;
  background: var(--gold);
  color: var(--ground);
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  z-index: 1;
}

/* Controls -------------------------------------------------------------- */

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-block: 1.2rem;
}

.action {
  /* 2.75REM, not 2.75em: a real ~44px thumb target, not 2.75em of the 0.95rem
     label (~42px) — the trap .bet-type/.target already escape. */
  min-height: 2.75rem;
  padding-inline: 1.4em;
  border: 0.08rem solid var(--gold);
  border-radius: 0.2rem;
  background: transparent;
  color: var(--gold);
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.action-spin { background: var(--gold); color: var(--ground); font-weight: 600; }
.action-clear { border-color: var(--silver); color: var(--silver); }
/* Darkened green so bone text clears WCAG AA (4.5:1) — the recovery button must be
   legible; the plain --green was 3.94:1. Derived from --green, not a new colour. */
.action-refill {
  border-color: color-mix(in srgb, var(--green), #000 30%);
  color: var(--bone);
  background: color-mix(in srgb, var(--green), #000 30%);
}
.action:disabled { opacity: 0.4; cursor: not-allowed; }
.action:focus-visible { outline: 0.14rem solid var(--bone); outline-offset: 0.12rem; }

/* Static no-script fallback --------------------------------------------- */

.fallback {
  border: 0.06rem dashed var(--edge);
  border-radius: 0.2rem;
  padding: 0.9rem 1.1rem;
  color: var(--silver);
}

/* Self-test panel ------------------------------------------------------- */

.selftest { margin-top: 1.6rem; font-size: 0.8rem; color: var(--silver); }
.selftest summary {
  display: list-item;
  box-sizing: border-box;
  min-height: 2.75rem;
  padding-block: 0.65rem;
  cursor: pointer;
}

.selftest-lines {
  overflow-x: auto;
  white-space: pre;
  border-top: 0.06rem solid var(--edge);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  font-size: 0.72rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Wider screens — the felt turns to face you, as a real one does
   -------------------------------------------------------------------------- */

@media (min-width: 40rem) {
  .wheel-frame { --wheel: 24rem; }
}

/* The authentic horizontal felt appears only where twelve thumb-sized cells fit
   across (so the inside-bet targets never overlap); below this the 3-wide
   vertical layout keeps cells large. Zero on the left spanning three rows, the
   numbers, the column bets at the far end, the dozens as a band, even-money
   below. Cells and overlays switch to their --w-* coordinates together. */
@media (min-width: 58rem) {
  /* Only the felt's template changes; the subgrid overlays follow it. */
  .felt {
    /* Zero column >=2.75rem so the (interactive) zero cell clears the 44px touch
       bar the round targets are held to, not just the em-relative 2.75em floor. */
    grid-template-columns: minmax(2.75rem, 0.7fr) repeat(12, 1fr) minmax(2.8rem, 0.9fr);
    grid-template-rows: repeat(3, minmax(5em, auto)) auto auto;
  }

  .cell,
  .target,
  .marker {
    grid-row: var(--w-row, auto);
    grid-column: var(--w-col, auto);
  }

  /* Taller rows so the perpendicular split targets keep a clear margin over the
     2.75em (44px) non-overlap floor in the 3-row wide layout. */
  .cell { min-height: 5em; }

  .target-street,
  .target-line { place-self: end center; }
}

/* --------------------------------------------------------------------------
   Reduced motion — outcomes resolve at once, never a degraded view
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .wheel-ring { transition: none !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --------------------------------------------------------------------------
   Cards and the blackjack felt
   -------------------------------------------------------------------------- */

/*
 * A card is composed, not a glyph (ADR-0003): a rank element and a pip
 * element inside a face. That is what lets the two be coloured and animated
 * independently, and what lets the whole carry an accessible name.
 */
.card {
  display: inline-grid;
  place-items: center;
  gap: 0.05em;
  min-width: 2.6em;
  min-height: 3.7em;
  padding: 0.3em 0.35em;
  border-radius: 0.25em;
  background: var(--bone);
  color: #16161c;
  font-family: var(--figure);
  line-height: 1;
  box-shadow: 0 0.08em 0.3em rgb(0 0 0 / 0.45);
}

.card-rank { font-size: 1.05em; font-weight: 600; }
.card-pip { font-size: 1.15em; }

.card-red { color: var(--red); }
.card-black { color: #16161c; }

/* A face-down card carries no information about what it is — not in its
   markup, not in its styling. */
.card-back {
  background:
    repeating-linear-gradient(
      45deg,
      var(--ground-raised) 0 0.3em,
      #1d1d27 0.3em 0.6em
    );
  border: 0.08em solid var(--edge);
}

.bj-felt {
  display: grid;
  gap: 1.2rem;
  margin-block: 1.2rem;
}

.bj-seat { display: grid; gap: 0.4rem; }

.bj-label {
  margin: 0;
  font-size: 0.85rem;
  color: var(--silver);
  letter-spacing: 0.04em;
}

.bj-dealer .bj-label { color: var(--gold); }

.bj-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 3.7em;
}

.bj-hands { display: grid; gap: 0.9rem; }

/* The hand currently being acted on. */
.bj-hand-active {
  border-inline-start: 0.16rem solid var(--gold);
  padding-inline-start: 0.6rem;
}

@media (min-width: 40rem) {
  .bj-hands {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: start;
  }
}

/* --------------------------------------------------------------------------
   Slots — reels are columns of type, nothing else
   -------------------------------------------------------------------------- */

.slots-window {
  /*
   * The reels are SQUARE at every width. Each reel is a 1fr share of the row, so
   * five of them always fit a phone with no horizontal scroll; its HEIGHT then
   * follows its width by aspect-ratio (.slots-reel) — never a fixed height that a
   * fluid 1fr width letterboxes, which is what an em/vw cell size silently did.
   * The window is capped to five max-size cells + gaps and CENTRED, so the reels
   * are large on the wide desktop without growing without bound. The glyph scales
   * with the reel via container-query units (.slots-cell).
   */
  --slots-gap: 0.3rem;
  --slots-cell-max: 6rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--slots-gap);
  margin-block: 1.6rem 1rem;
  margin-inline: auto;
  padding: 0.5rem;
  /* Five capped cells + four gaps + the 0.5rem padding and 0.08rem border on
     each side (1rem + 0.16rem), so the desktop cells reach exactly the cap. */
  max-width: calc(5 * var(--slots-cell-max) + 4 * var(--slots-gap) + 1rem + 0.16rem);
  border: 0.08rem solid var(--edge);
  border-radius: 0.3rem;
  background: var(--ground-raised);
}

/* Each reel is a 1em-tall window onto a taller sliding strip. */
.slots-reel {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 0.2rem;
  background: var(--ground);
  border: 0.06rem solid var(--edge);
  /* The reel's own width drives the glyph size (container-query units below). */
  container-type: inline-size;
}

.slots-strip {
  position: absolute;
  inset-inline: 0;
  top: 0;
  display: flex;
  flex-direction: column;
}

.slots-cell {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  flex: 0 0 auto;
  /* The glyph nearly fills the cell — a fraction of the reel's OWN width via
     container-query units — so it scales up with the reel and dominates the
     screen, killing the dead space that made the old reels read as a diagram
     rather than a machine. Each strip cell is square and equal to the reel, so
     the strip lands a symbol flush in the window whatever the reel's width. */
  font-size: 80cqi;
  line-height: 1;
}

/* Colour carries the symbol's rank, so the paytable is readable at a glance. */
.slots-star    { color: var(--gold); }
.slots-moon    { color: #b8a6e8; }
.slots-lozenge { color: #6fb3d9; }
.slots-hex     { color: var(--green-on-ground); }
.slots-spark   { color: var(--bone); }
.slots-point   { color: var(--red-on-ground); }
.slots-round   { color: var(--silver); }

/* A win: a PERSISTENT gold highlight (the marker that survives reduced motion,
   where the pulse below is flattened to nothing), plus an additive one-shot
   pulse on top for feedback. */
.slots-reel-won {
  border-color: var(--gold);
  box-shadow: 0 0 0.6em rgb(212 168 80 / 0.45) inset;
  animation: slots-win-pulse 0.55s ease-out 1;
  /* The pulse scales the reel slightly; lift it above its neighbours so it never
     bleeds under the adjacent reel in the gap (.slots-reel is position:relative). */
  z-index: 1;
}

@keyframes slots-win-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

.paytable { margin-block: 1.6rem; font-size: 0.85rem; }

.paytable-caption {
  color: var(--silver);
  font-size: 0.8rem;
  margin-block: 0 0.5rem;
}

.paytable table {
  width: 100%;
  border-collapse: collapse;
}

.paytable th,
.paytable td {
  padding: 0.3em 0.2em;
  text-align: center;
  border-bottom: 0.06rem solid var(--edge);
}

.paytable th { color: var(--silver); font-weight: 400; font-size: 0.8rem; }
.paytable-glyph { font-size: 1.2rem; }

/* --------------------------------------------------------------------------
   Hold'em
   -------------------------------------------------------------------------- */

/*
 * The balance sentence is deliberately the first phone row: its translated
 * table-stack copy is too long to share 320px with a live pot. The pot keeps
 * its intrinsic one-line width beneath it, then returns to the shared compact
 * HUD above the phone breakpoint. An empty pot is removed from layout so Idle
 * and Broke do not acquire a phantom row.
 */
.table-holdem .status {
  flex-wrap: wrap;
  row-gap: 0.2rem;
}

.table-holdem .status-balance { flex: 1 0 100%; }

.table-holdem .status-stake {
  flex: 0 0 auto;
  white-space: nowrap;
}

.table-holdem .status-stake:empty { display: none; }

.hold-board {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-block: 1.4rem;
  padding: 0.8rem 0.5rem;
  border-block: 0.06rem solid var(--edge);
}

/* An undealt community card: the space is held so the board does not jump. */
.card-slot {
  background: transparent;
  border: 0.08em dashed var(--edge);
  box-shadow: none;
}

.hold-seats { display: grid; gap: 0.8rem; }

.hold-seat {
  padding: 0.5rem 0.6rem;
  border: 0.06rem solid var(--edge);
  border-radius: 0.25rem;
  background: var(--ground-raised);
}

.hold-seat-turn { border-color: var(--gold); }
.hold-seat-folded { opacity: 0.45; }

/* A Broke snapshot has no seats, cards or live hand. Let the recovery message
   and its Refill action stay together instead of framing an empty felt. */
.table-holdem-broke .hold-board,
.table-holdem-broke .hold-seats { display: none; }

@media (min-width: 40rem) {
  .table-holdem .status {
    flex-wrap: nowrap;
    row-gap: 0;
  }

  .table-holdem .status-balance { flex: 0 1 auto; }
  .hold-seats { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   Landing-page chrome from the site engine
   -------------------------------------------------------------------------- */

/*
 * sole_autosite renders a landing page's own title and date above the authored
 * body, and DEDUPLICATES an authored <h1> against it. So `.page-title` is the
 * page's only heading, not a duplicate of one — hiding it leaves the document
 * with no h1 at all, which was tried and was worse than what it fixed. It is
 * styled to match the game pages instead.
 *
 * The date is suppressed: a build date on a casino front page reads like a
 * stale changelog rather than anything a visitor wants, and nothing else
 * depends on it.
 */
.page-title {
  font-family: var(--figure);
  /* Matches the game-page hero h1 (centred, same scale) so the home screen is
     composed the same way — a centred hero above start-aligned prose. */
  font-size: clamp(1.9rem, 7vw, 2.8rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  text-align: center;
  margin-block: 0 0.4em;
}

.page-date { display: none; }

/* The authored table directory is navigation plus supporting copy, not four
   links embedded mid-sentence. On a phone each target owns a row; where space
   permits the description sits beside it as a calm two-column directory. */
.tables {
  display: grid;
  gap: 0.65rem;
  padding-inline-start: 0;
  list-style: none;
}

.tables li { display: grid; gap: 0 0.8rem; }

.tables a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

@media (min-width: 40rem) {
  .tables li {
    grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr);
    align-items: center;
  }
}

/* sole_autosite owns Search's markup; its one standalone control still follows
   this project's touch floor. */
[data-search] input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
}

/* The auto-generated contents list duplicates the hand-written table list. */
.page-body > .contents {
  display: none;
}
