/* ============================================================
   DRILL - Deep-Core Extraction Protocol
   Design language: DEEP STEEL drilling-rig instrumentation.
   Steel-cobalt at rest (a charged, machined instrument deck),
   black-body heat on the climb (amber → white-hot), gold on
   the Motherlode vein ONLY. One-red law: red = collapse ONLY.
   Type: Clash Display (display/wordmark) · Geist (UI) ·
   Geist Mono (data + variable-weight hero).
   ============================================================ */

/* Self-hosted, first-party fonts (latin subset). Replaces the Google Fonts + Fontshare external
   stylesheets: one origin, no render-blocking CDN round-trip, CSP can drop the font origins.
   Variable Geist/Geist Mono cover 100..900; Clash is the 600 wordmark weight only. font-display:swap
   keeps text visible during the woff2 fetch. Symbol glyphs not in the latin subset fall back per-glyph. */
@font-face { font-family: 'Geist'; src: url('../fonts/geist-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/geist-mono-latin.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Clash Display'; src: url('../fonts/clash-display-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

/* Smooth cross-document navigation: crossfade between pages instead of the white-flash full
   reload (the "refreshing" jank). Progressive enhancement, plain nav where unsupported. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.2s; }

/* The HTML `hidden` attribute must always win — author rules like `.connect-btn{display:inline-flex}`
   otherwise override the UA `[hidden]{display:none}`, leaving "hidden" buttons (Connect wallet, the
   wallet chip, the faucet) visible. This makes every `el.hidden = true` actually hide the element. */
[hidden] { display: none !important; }
/* a11y: visually-hidden-but-readable (sr-only) + a keyboard skip link that appears on focus */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 8px; z-index: 1000; padding: 10px 16px; background: var(--cobalt); color: var(--ink); border-radius: var(--r-control); font-family: var(--ui); font-weight: 700; font-size: 13px; text-decoration: none; transition: top 0.15s ease; }
.skip-link:focus { top: 8px; }
/* one-line plain-English rule of play (shown in the panels region; hidden on the height-fit desktop) */
.play-rule { text-align: center; font-family: var(--ui); font-size: 11.5px; color: var(--ink-dim); margin: 2px 0 8px; line-height: 1.45; }

:root {
  /* DEEP STEEL base - a crisp, charged steel-cobalt instrument deck lifted ~1.5 stops
     off near-black, never muddy burgundy, never a gloomy pit. The rest state reads
     electric/charged steel; the black-body HEAT (amber → white-hot) blazes against it
     on the climb. Neutrals are bright cool slate, lines are cobalt-alpha. */
  /* Felt surface ramp on TRUE black: four steps that are actually distinguishable (the old ramp
     differed by 6-10/channel at 0.10 line-alpha and only added muddiness). A visible steel ladder
     out-modernizes ORE's single flat surface. Lines lifted ~40% so elevation is felt, not guessed. */
  --void: #070A0D;
  --crust: #0E131B;
  --panel: #161D28;
  --card: #1F2837;
  --card-2: #28313F;
  --line: rgba(140, 168, 210, 0.14);
  --line-2: rgba(140, 168, 210, 0.26);

  /* HEAT RAMP - BLACK-BODY incandescence: molten amber → ember → white-hot. This is the
     dopamine, never muddy, never dark, never siren-red. Amber OWNS the 1.x–4x band where
     most rounds live; ember → white-hot is the rare blazing top. --danger red is held in
     reserve for the actual collapse flash ONLY (one-red law). */
  --accentred: #FF2A45;          /* heat hero: VIVID warm red (the exciting Aviator climb) */
  --accentred-hi: #FF6577;
  --accentred-soft: rgba(255, 42, 69, 0.20);
  --ember: #FF6A38;              /* orange transition (red → ember → white as it heats) */
  --ember-hi: #FFB454;
  --whitehot: rgba(255, 247, 224, 0.97);  /* white-hot top of the climb (rare climax) */
  --gold: #FFC24D;
  --extract: #20D08A;            /* the ONLY green - reserved for EXTRACT */
  --extract-dim: rgba(32, 208, 138, 0.16);
  --danger: #FF2E48;             /* collapse/loss ONLY - never ambient */

  /* cool electric pole for chrome/trust/structure (idle instrument, not heat) */
  --cobalt: #3E6BA8;
  --cobalt-hi: #8AB0DE;
  --cobalt-steel: #5E84A8;

  --ink: #E6ECF5;
  --ink-mid: #8C97A8;
  --ink-dim: #828E9C;            /* lifted from #5A6472 (3.0:1, failed WCAG AA) to ~5:1 on the deck */

  /* index.html loads Clash Display (wordmark/headers) + Geist & Geist Mono as VARIABLE
     fonts (real 100..900 wght axis). Clash carries the display register; Geist Mono is the
     hero/data face so the multiplier's font-variation-settings 'wght' animation physically
     thickens with heat. */
  --disp: 'Clash Display', system-ui, sans-serif;
  --ui: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  /* HERO face - the VARIABLE Geist Mono whose wght animates 540→900 with heat so the number
     physically THICKENS as the seam runs hot. The per-tier -webkit-text-stroke ramp below
     reinforces the perceived weight gain. */
  --mult-face: 'Geist Mono', ui-monospace, monospace;

  /* NUMERIC SCALE - every figure on the page is ONE face (Geist Mono), ONE weight (600), tabular +
     slashed-zero, differentiated ONLY by these size steps (ORE's discipline; the variable-weight hero
     is the sole exception). Route money/data here, never ad-hoc sizes. */
  --num-xs: 11px;     /* feed rows, footer facts */
  --num-s: 13px;      /* wallet chip, inline stats */
  --num-m: 16px;      /* panel amounts, top-bar pill values */
  --num-l: 22px;      /* mining HUD, landing fact figures */
  --num-w: 600;
  /* LABEL/eyebrow - ONE token sitewide (Geist UI, never mono; mono is reserved for NUMBERS only). */
  --label-face: var(--ui);
  --label-size: 9px;
  --label-weight: 600;
  --label-track: 0.1em;

  /* TYPE LAWS (enforced, do not break):
     · --disp (Clash Display) = the DRILL LOGO WORDMARK ONLY (.brand-word, .foot-brand b). Geist owns
       every heading + all UI now (two-font system); Clash never on a heading, button, chip, tab, label.
     · --mono (Geist Mono)    = NUMBERS only. Labels/eyebrows use --ui.
     · ONE-RED LAW: --danger / --accentred is the COLLAPSE flash ONLY. CTAs + the running climb are
       black-body heat (amber->white-hot) or cobalt chrome, never red. */

  /* radius system - exactly three roles, enforced everywhere */
  --r-pill: 6px;                 /* machined near-square - NO full pills (casino-chip) */
  --r-control: 5px;              /* inputs, bet chips, action buttons */
  --r-panel: 4px;                /* cards, panels - tight machined bezel */
  /* legacy aliases mapped onto the system (cards default to panel) */
  --r: var(--r-panel);
  --r-sm: var(--r-control);
  --notch: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
  --shadow: 0 14px 40px -16px rgba(0, 0, 0, 0.78);
  --ctl-h: 30px;                 /* one control height for the top bar */
  --track-caps: 0.08em;          /* caps/label tracking */
  --track-data: 0.02em;          /* data/value tracking */
  /* liquid-glass recipe - reused on every glass surface (readout, panels, stamp) */
  --glass-bg: linear-gradient(180deg, rgba(22, 28, 39, 0.52), rgba(12, 16, 24, 0.44));
  --glass-blur: blur(18px) saturate(120%);
  --glass-line: 1px solid rgba(140, 168, 210, 0.18);
  --glass-spec: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 0 0 1px rgba(170, 195, 235, 0.05);
  /* GLOW - exactly two: a cool idle glow for chrome, a heat glow used ONLY inside the live scene.
     Everything else reads matte/machined, not glossy (the glass spec inset is pulled to 0.16). */
  --glow-idle: 0 0 12px rgba(62, 107, 168, 0.25);
  --glow-heat: 0 0 22px rgba(255, 138, 60, 0.30);
  /* live heat 0→1, written from JS via --tier; default idle */
  --heat: 0;

  /* inline-SVG icon masks (Awwwards polish - no emoji glyphs anywhere) */
  /* DRILL bit-mark, used as the numeric unit-glyph before money figures (our answer to ORE's coin
     glyph): tinted cobalt for SOL, ember for $DRILL. The mark IS the unit, like ORE's token icon. */
  --ic-drill: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M13 9 H33 A23 23 0 0 1 33 55 H13 Z M26 21 H40 L33 32 L40 43 H26 V21 Z'/%3E%3C/svg%3E");
  --ic-spk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 9v6h4l5 4V5L8 9H4z'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' d='M16.5 8.5a5 5 0 0 1 0 7M19 6a8.5 8.5 0 0 1 0 12'/%3E%3C/svg%3E");
  --ic-mute: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 9v6h4l5 4V5L8 9H4z'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' d='M16 9l5 6M21 9l-5 6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { color-scheme: dark; background: var(--void); min-height: 100%; -webkit-tap-highlight-color: transparent; }   /* no gray tap-flash on touch */
/* touch: don't let hover-only lift/zoom states latch after a tap (they stick until the next tap) */
@media (hover: none) {
  .hist-chip:hover { transform: none; }
  .action:hover::before { transform: translateX(-100%); }
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 400;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}
/* P2-5: the drill-bit crosshair belongs to the RIG, not the reading pages (it read as odd over prose). */
body:has(.layout) { cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22"><path d="M3 1 L11 1 L7 13 Z" fill="%238AB0DE" stroke="%232a3550" stroke-width="1"/><rect x="5.6" y="12" width="2.8" height="9" fill="%233E6BA8"/></svg>') 7 2, crosshair; }

::selection { background: var(--cobalt); color: #fff; }

button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

/* ---------- atmosphere ---------- */

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(150, 180, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 235, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(150, 180, 235, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 180, 235, 0.022) 1px, transparent 1px);
  background-size: 140px 140px, 140px 140px, 28px 28px, 28px 28px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

.bg-noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  /* static (no animation): a permanently-promoted, recompositing 4x-viewport grain layer was a
     major GPU-memory cost; at 0.035 opacity the animation was imperceptible anyway. */
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); }
}

/* ambient state tint */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  transition: background 0.5s ease;
}
body.is-crashed::after { background: radial-gradient(ellipse at 50% 60%, rgba(255, 122, 24, 0.10), transparent 65%); }
body.is-motherlode::after { background: radial-gradient(ellipse at 50% 0%, rgba(255, 210, 79, 0.08), transparent 60%); }
/* running ambient: a FELT black-body heat wash while boring so ignition reads instantly
   as the deck heating up, not a faint whisper. Amber molten-core, never deep red. */
body.is-running::after { background: radial-gradient(ellipse at 50% 84%, rgba(255, 138, 60, 0.16), transparent 64%); }
/* idle/betting reads as a charged steel deck: a faint cool steel-cobalt lift, never a
   dead pit, never bright primary blue. Scoped off motherlode so the gold tint still wins
   on a motherlode block. */
body.is-betting:not(.is-motherlode)::after { background: radial-gradient(ellipse at 50% 6%, rgba(62, 107, 168, 0.09), transparent 60%); }

/* ---------- top bar ---------- */

.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 28, 40, 0.88), rgba(11, 14, 20, 0.78));
  backdrop-filter: blur(14px) saturate(140%);
  flex-wrap: nowrap;
  /* LOCKED MENU: the same view-transition-name on every page makes the browser morph the old header
     into the new one across navigation, so the bar (and the brand + nav within it) stay put while
     only the content underneath crossfades — the SPA-shell feel on a static multi-page site. */
  view-transition-name: drill-topbar;
}
.brand { view-transition-name: drill-brand; }
.nav { view-transition-name: drill-nav; }
/* the mini balance is a MOBILE-only chip; on desktop the wallet chip carries the balance, so hide it
   here (it was leaking a stray "0 SOL" next to the brand on desktop). */
.bal-mini { display: none; }

.brand { display: flex; align-items: center; gap: 10px; }

/* industrial mining mark - stacked depth-chevrons biting down to a drill-bit point.
   Heavy machinery, ember-on-near-black. No element tile, no atomic number. */
.glyph { display: grid; place-items: center; width: 23px; height: 25px; }
/* CORE-D: a geometric D whose negative-space counter is a seam wedge boring to the core. Steel at
   rest with a faint heat glow (the brand: cool steel + molten heat). */
.mark { width: 23px; height: 25px; overflow: visible; display: block; color: var(--cobalt-hi); filter: drop-shadow(0 0 5px rgba(138, 176, 222, 0.4)); }

.brand-word {
  font-family: var(--disp); font-size: 17px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink);
  display: flex; flex-direction: column; gap: 2px;
}
.brand-word small { display: none; }

.demo-badge {
  display: inline-flex; align-items: center; height: var(--ctl-h);
  font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase;
  color: var(--ink-dim); border: 0; padding: 0; border-radius: 0; background: none;
}

/* 1px hairline divider isolating the wallet (and the trailing DEMO badge) from telemetry */
.bar-div { width: 1px; height: 18px; background: var(--line-2); flex: 0 0 auto; }

.nav { display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; height: var(--ctl-h);
  font-family: var(--ui); font-size: 13px; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--ink-dim); padding: 0 12px;
  border: 0; background: none; border-radius: 0; position: relative;
  transition: color 0.18s;
}
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); background: none; border: 0; }
.nav a.on::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -9px;
  height: 1.5px; background: var(--cobalt-hi);
}

.top-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: nowrap; }

/* telemetry = borderless inline stats (Phantom/Linear/Vercel header pattern), NOT a row of
   bordered boxes. Each stat stacks a muted micro-label OVER a bright tabular value, so the
   bar reads as a modern protocol header with real hierarchy, not a Bloomberg ticker. */
.pill-group {
  display: flex; align-items: center; gap: 26px;
  background: none; border: 0; border-radius: 0; height: auto;
}

.pill {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  font-family: var(--ui); padding: 0;
  background: none; border: 0; border-radius: 0;
  color: var(--ink-mid);
}
.top-right .pill { border: 0; background: none; }
.pill-k { font-family: var(--label-face); font-weight: var(--label-weight); text-transform: uppercase; color: var(--ink-dim); letter-spacing: var(--label-track); font-size: var(--label-size); line-height: 1; }
.pill-v { display: inline-flex; align-items: baseline; gap: 4px; line-height: 1; font-size: 9px; color: var(--ink-dim); font-weight: 500; letter-spacing: 0.02em; }
.pill b { color: var(--ink); font-weight: var(--num-w); font-size: var(--num-s); font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -0.01em;
  display: inline-block; min-width: 3.5ch; text-align: left; }   /* reserve width so the "…" placeholder -> real value doesn't shove the bar on reload (CLS) */
/* DRILL bit-mark as the brand unit-glyph before money figures (our answer to ORE's token glyph).
   Cobalt for SOL, ember for $DRILL; the unit text stays for clarity. */
.pill-v::before, .wchip-bal::before {
  content: ''; width: 0.86em; height: 0.86em; align-self: center; flex: 0 0 auto;
  background: var(--cobalt-hi); opacity: 0.9;
  -webkit-mask: var(--ic-drill) center / contain no-repeat; mask: var(--ic-drill) center / contain no-repeat;
}
.pill-link .pill-v::before { background: var(--ember-hi); }   /* MINED is $DRILL-denominated */
/* GOLD DISCIPLINE: gold is reserved for the Motherlode and only when it is LIVE.
   At rest the Motherlode cell is neutral steel; on a motherlode block it lights with a
   2px left rule + gold type. */
.pill-gold { background: none; box-shadow: inset 2px 0 0 rgba(255, 194, 77, 0.45); padding-left: 10px; }
.pill-gold .pill-k { color: var(--gold); opacity: 0.85; }   /* the MOTHERLODE jackpot reads gold always */
.pill-gold b { color: var(--gold); }
body.is-motherlode .top-right .pill-gold { box-shadow: inset 2px 0 0 var(--gold); }
body.is-motherlode .pill-gold .pill-k { color: var(--gold); }
body.is-motherlode .pill-gold b { color: var(--gold); }
body.is-motherlode .pill-group { animation: goldpulse 1.4s ease-in-out infinite; }
@keyframes goldpulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 194, 77, 0); }
  50% { box-shadow: 0 0 22px rgba(255, 194, 77, 0.35); }
}
.pill-link { text-decoration: none; transition: opacity 0.15s; }
.pill-link:hover { opacity: 1; }
.pill-link:hover b { color: var(--cobalt-hi); }
.pill-chg { margin-left: 5px; font-size: 9px; }
.pill-chg[data-dir="up"] { color: var(--extract); }
/* one-red law: red = collapse ONLY. A ticker dip reads muted cool-grey, never siren-red. */
.pill-chg[data-dir="down"] { color: var(--ink-mid); }

.wallet {
  display: inline-flex; align-items: center; gap: 10px; height: var(--ctl-h);
  padding: 0 2px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.wallet-bal { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); color: var(--ink-dim); letter-spacing: var(--label-track); text-transform: uppercase; line-height: 1; }
.wallet-bal::before { content: "BALANCE"; }

/* on-chain wallet identity chip (CHAIN mode): live dot + truncated address; click = airdrop/copy */
.wallet-chip {
  display: inline-flex; align-items: center; gap: 7px; height: calc(var(--ctl-h) - 6px);
  padding: 0 11px; border-radius: var(--r-pill);
  border: 1px solid rgba(62, 107, 168, 0.32); background: rgba(62, 107, 168, 0.10);
  font-family: var(--mono); font-size: 11px; color: var(--ink); letter-spacing: 0.02em;
  transition: border-color 0.15s, background 0.15s;
}
.wallet-chip:hover { border-color: var(--cobalt-steel); background: rgba(62, 107, 168, 0.18); }
.wallet-chip .wdot { width: 6px; height: 6px; border-radius: 50%; background: var(--extract); box-shadow: 0 0 7px rgba(32, 208, 138, 0.8); flex: 0 0 auto; }
/* live SOL balance: mono tabular figures so the decimals never jitter */
.wallet-bal b { color: var(--ink); font-weight: var(--num-w); font-size: var(--num-m); font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -0.01em; margin-left: 3px; }

.ghost-btn {
  display: inline-flex; align-items: center; height: calc(var(--ctl-h) - 8px);
  font-family: var(--ui); font-weight: 600; font-size: 9px; letter-spacing: 0.1em;
  color: var(--ink-dim); padding: 0 11px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02);
  transition: all 0.15s;
}
.ghost-btn:hover { color: var(--ink); border-color: var(--line-2); background: rgba(62, 107, 168, 0.12); }

/* connect-wallet CTA: cobalt-accented, the primary entry to a personal (Phantom) wallet */
.connect-btn {
  display: inline-flex; align-items: center; height: calc(var(--ctl-h) - 6px); padding: 0 14px;
  border-radius: var(--r-pill); font-family: var(--ui); font-weight: 700; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  border: 1px solid var(--cobalt); background: rgba(62, 107, 168, 0.18); transition: all 0.15s;
}
.connect-btn:hover { background: rgba(62, 107, 168, 0.30); border-color: var(--cobalt-hi); box-shadow: 0 0 12px rgba(62, 107, 168, 0.25); }
/* primary = the retail "Log in / Sign up" (Privy). MACHINED COBALT, flat, crisp — same instrument
   language as the DRILL deploy control, not a glossy ember pill. Confident solid fill so it still
   reads as the main onboarding CTA. */
.connect-btn.primary {
  color: #fff; border-color: var(--cobalt-hi); font-weight: 700;
  background: linear-gradient(180deg, var(--cobalt-steel), var(--cobalt));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.connect-btn.primary:hover {
  border-color: var(--cobalt-hi); filter: none;
  background: linear-gradient(180deg, var(--cobalt-hi), var(--cobalt-steel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), var(--glow-idle);
}
/* mobile-only primary CTA: the wallet bar lives in the hamburger drawer on phones, so surface a
   compact always-visible "Log in" in the top bar. Hidden on desktop; renderWallet hides it once a
   wallet is connected (the chip/disconnect then live in the drawer). */
.mobile-cta { display: none; }
/* secondary = "Connect Wallet" for power users; quieter than the primary */
.connect-btn.ghost-btn { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.14); color: var(--ink-mid); font-size: 9px; }
/* the mining claim button: gold, to read as the play-to-earn payout */
.connect-btn.claim-btn { background: linear-gradient(180deg, rgba(255, 194, 77, 0.18), rgba(255, 194, 77, 0.07)); border-color: rgba(255, 194, 77, 0.5); color: var(--gold); font-weight: 700; }
.connect-btn.claim-btn:hover { background: linear-gradient(180deg, rgba(255, 194, 77, 0.3), rgba(255, 194, 77, 0.14)); border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 194, 77, 0.25); }
.connect-btn.claim-btn:disabled { opacity: 0.6; cursor: wait; }
/* the chip is a container now: address button + disconnect × split by a hairline */
.wallet-chip { padding: 0; overflow: hidden; }
.wchip-addr { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 10px; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.wchip-x { display: inline-flex; align-items: center; justify-content: center; height: calc(var(--ctl-h) - 6px); width: 24px; background: none; border: 0; border-left: 1px solid rgba(62, 107, 168, 0.32); color: var(--ink-dim); font-size: 14px; line-height: 1; cursor: pointer; transition: color 0.15s, background 0.15s; }
.wchip-x:hover { color: var(--ink); background: rgba(62, 107, 168, 0.10); }   /* one-red law: disconnect is a generic control, not a collapse/loss */
/* balance lives INSIDE the chip now, so there's no stray "0 SOL" floating when disconnected */
.wchip-bal { display: inline-flex; align-items: baseline; gap: 3px; padding: 0 11px; height: 100%; border-left: 1px solid rgba(62, 107, 168, 0.22); font-family: var(--mono); font-size: 8.5px; color: var(--ink-dim); letter-spacing: 0.06em; }
.wchip-bal b { color: var(--ink); font-weight: var(--num-w); font-size: var(--num-s); font-variant-numeric: tabular-nums slashed-zero; }
/* "Add funds" (card / Apple Pay): cobalt CTA, quieter than the ember primary */
.connect-btn.fund-btn { font-size: 9px; padding: 0 12px; }
/* test-cluster faucets: a small subordinate group that never competes with the real CTAs */
.test-funds { display: inline-flex; align-items: center; gap: 5px; padding: 0 2px 0 8px; border-left: 1px solid var(--line); }
.tf-label { font-family: var(--ui); font-weight: 700; font-size: 7.5px; letter-spacing: 0.14em; color: var(--ink-dim); opacity: 0.6; }
.ghost-btn.mini { height: calc(var(--ctl-h) - 12px); font-size: 8px; padding: 0 8px; letter-spacing: 0.06em; opacity: 0.78; color: var(--ember-hi); border-color: rgba(255, 180, 84, 0.22); }
.ghost-btn.mini:hover { opacity: 1; }
/* faucet button: heat accent so "GET $DRILL" reads as the mined coin */
.faucet-btn { color: var(--ember-hi); border-color: rgba(255, 180, 84, 0.30); }
.faucet-btn:hover { color: var(--whitehot); border-color: var(--ember); background: rgba(255, 106, 56, 0.12); }
.faucet-btn[disabled] { opacity: 0.5; cursor: default; }

/* live mining readout: a steel HUD chip showing the $DRILL you mine this epoch (not just SOL mult) */
.mining-hud {
  position: absolute; top: 14px; left: 14px; z-index: 4; pointer-events: auto;
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px 7px 10px;
  border-radius: var(--r-panel); border: 1px solid rgba(255, 180, 84, 0.22);
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.86), rgba(14, 18, 26, 0.86));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.mining-hud .mh-ico { font-size: 14px; filter: drop-shadow(0 0 4px rgba(255, 150, 72, 0.5)); }
.mining-hud .mh-body { display: inline-flex; align-items: baseline; gap: 4px; }
.mining-hud .mh-amt { font-family: var(--mono); font-weight: var(--num-w); font-size: var(--num-l); color: var(--ember-hi); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -0.01em; line-height: 1; }
.mining-hud .mh-unit { font-family: var(--ui); font-weight: 700; font-size: 9px; letter-spacing: 0.08em; color: var(--ink-mid); }
.mining-hud .mh-note { font-family: var(--ui); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); border-left: 1px solid var(--line); padding-left: 9px; }
/* YOUR-HEAT seam-share bar: a thin ember fill along the pill bottom = your % of this epoch's Work */
.mining-hud .mh-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; background: rgba(140,168,210,0.12); border-radius: 0 0 var(--r-panel) var(--r-panel); overflow: hidden; }
.mining-hud .mh-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--ember-hi)); box-shadow: 0 0 8px rgba(255,150,72,0.5); transition: width 0.5s ease; }

/* shareable win card: the FLEX button (extract-green) inside the win receipt + a per-row share on cashed MY DRILLS rows */
.wf-share, .wf-save { padding: 9px 18px; border-radius: var(--r-pill); border: 1px solid var(--extract); pointer-events: auto;
  background: linear-gradient(180deg, #34e6a6, var(--extract)); color: #08130d; cursor: pointer;
  font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 6px 20px -8px rgba(32,208,138,0.6); }
.wf-share:hover, .wf-save:hover { filter: brightness(1.06); }
/* DRILL AGAIN: the filled-green primary re-engage action in the win receipt */
.wf-again { padding: 9px 18px; border-radius: var(--r-pill); border: 1px solid var(--extract); pointer-events: auto;
  background: linear-gradient(180deg, #34e6a6, var(--extract)); color: #08130d; cursor: pointer;
  font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; box-shadow: 0 6px 20px -8px rgba(32,208,138,0.6); }
.wf-again:hover { filter: brightness(1.06); }
/* with DRILL AGAIN as the primary, FLEX/SAVE drop to quieter outline actions INSIDE the win card so they don't compete */
.win-card .wf-share, .win-card .wf-save { background: none; color: var(--extract); box-shadow: none; }
.win-card .wf-share:hover, .win-card .wf-save:hover { background: rgba(32,208,138,0.1); filter: none; }
.feed-row { position: relative; }
.feed-row .f-share { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: var(--r-control);
  background: var(--card-2); color: var(--cobalt-hi); font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.14s; }
.feed-row:hover .f-share { opacity: 1; }
@media (hover: none) { .feed-row .f-share { opacity: 0.75; } }
@media (max-width: 720px) { .mining-hud { top: 10px; left: 10px; padding: 5px 9px; gap: 6px; } .mining-hud .mh-amt { font-size: 14px; } .mining-hud .mh-note { display: none; } }

/* persistent negative-EV honesty line, between the scene meta and the bet panels */
.ev-note {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 0 0 8px; padding: 5px 11px; border-radius: var(--r-panel);
  border: 1px solid var(--line); background: rgba(62, 107, 168, 0.06);
  font-family: var(--ui); font-size: 9.5px; letter-spacing: 0.04em; color: var(--ink-mid);
}
.ev-note .ev-k { font-weight: 800; font-size: 8.5px; letter-spacing: 0.12em; color: var(--cobalt-hi); text-transform: uppercase; }
.ev-note .ev-v { font-variant-numeric: tabular-nums; }
/* P2-9: inline-SVG speaker icon + explicit on/off state (green = on, dim = off).
   Awwwards polish: no emoji glyphs. The icon is a mask so it inherits currentColor. */
.sound { gap: 6px; color: var(--extract); }
.sound[data-on="0"] { color: var(--ink-dim); }
.sound::before {
  content: ''; width: 13px; height: 13px; flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--ic-spk) center / contain no-repeat;
  mask: var(--ic-spk) center / contain no-repeat;
}
.sound[data-on="0"]::before {
  -webkit-mask: var(--ic-mute) center / contain no-repeat;
  mask: var(--ic-mute) center / contain no-repeat;
}
.sound::after { content: 'ON'; font: inherit; }
.sound[data-on="0"]::after { content: 'OFF'; }

/* mobile header collapse - desktop is untouched: the wrapper is display:contents so
   .nav + .top-right lay out as direct children of .top exactly as before. */
.bal-mini, .menu-btn { display: none; }
.bar-collapse { display: contents; }

/* ---------- layout ---------- */

.layout {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 320px 1fr;
  gap: 14px; padding: 10px 16px;
  max-width: 1480px; margin: 0 auto;
  align-items: start;
}

/* ---------- feed ---------- */

.feed {
  background: var(--crust); border: 1px solid var(--line); opacity: 0.94;
  border-radius: var(--r);
  display: flex; flex-direction: column;
  min-height: 660px; max-height: calc(100vh - 130px);
  position: sticky; top: 16px;
}

.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab {
  flex: 1; padding: 13px 8px;
  font-family: var(--ui); font-weight: 600; font-size: 11.5px; letter-spacing: 0.01em;
  color: var(--ink-dim); border-bottom: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--ink-mid); }
.tab em { font-style: normal; color: var(--cobalt-hi); margin-left: 5px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tab.on { color: var(--ink); border-bottom-color: var(--cobalt-hi); background: none; }

.feed-head, .feed-row {
  display: grid; grid-template-columns: 1.4fr 0.8fr 0.7fr 0.9fr;
  gap: 6px; padding: 9px 16px; align-items: center;
}
.feed-head {
  font-family: var(--label-face); font-weight: var(--label-weight); text-transform: uppercase; font-size: var(--label-size); letter-spacing: var(--label-track);
  color: var(--ink-dim); border-bottom: 1px solid var(--line); padding-top: 11px; padding-bottom: 8px;
}
.feed-list { list-style: none; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--card-2) transparent; }

/* a modern activity feed (rows breathe on whitespace), NOT a gridlined spreadsheet */
.feed-row {
  font-family: var(--ui); font-size: 12.5px;
  border-bottom: 0;
  color: var(--ink-mid);
  animation: rowin 0.25s ease both;
  transition: background 0.12s;
}
.feed-row:hover { background: rgba(150, 180, 235, 0.035); }
@keyframes rowin { from { opacity: 0; transform: translateX(-8px); } }
.f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-mid); }
.f-amt, .f-mult, .f-win { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; font-weight: var(--num-w); font-size: var(--num-xs); letter-spacing: -0.01em; }
.f-win { color: var(--ink-dim); font-size: 10px; }

.feed-row.is-you { background: rgba(62, 107, 168, 0.12); }
.feed-row.is-you .f-name { color: var(--cobalt-hi); font-weight: 600; }
.feed-row.is-cashed .f-mult { color: var(--extract); }
.feed-row.is-cashed .f-win { color: var(--extract); }
.feed-row.is-bust .f-win { color: var(--ink-dim); }
.feed-row.is-bust { opacity: 0.55; }
.feed-empty { padding: 22px 14px; font-size: 11px; color: var(--ink-dim); font-family: var(--ui); }   /* empty-state prose is UI text, not data */

.feed-foot {
  display: flex; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--line);
  font-family: var(--ui); font-size: 10px; letter-spacing: 0.02em; color: var(--ink-dim);
}
.feed-foot b { color: var(--gold); margin-left: 6px; }

/* ---------- history strip ---------- */

/* first-run onboarding overlay (one-time; nav.js). Dismissable; never persists over the rig. */
.onboard { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(5, 8, 11, 0.74); backdrop-filter: blur(3px); animation: obfade 0.2s ease both; }
@keyframes obfade { from { opacity: 0; } to { opacity: 1; } }
.ob-card { width: min(420px, 100%); padding: 26px 26px 20px; border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, var(--crust), var(--void)); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.85); animation: obrise 0.26s cubic-bezier(0.2,0.9,0.3,1) both; }
@keyframes obrise { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
.ob-brand { font-family: var(--disp); font-weight: 600; font-size: 30px; letter-spacing: 0.06em; color: var(--ink); }
.ob-tag { font-family: var(--ui); font-size: 13px; color: var(--ink-mid); margin-top: 6px; line-height: 1.4; }
.ob-steps { list-style: none; margin: 20px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.ob-steps li { display: flex; align-items: flex-start; gap: 12px; }
.ob-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--cobalt-hi); border: 1px solid var(--cobalt); background: rgba(62,107,168,0.12); }
.ob-steps b { font-family: var(--ui); font-weight: 700; font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink); display: block; }
.ob-steps span span, .ob-steps div span { font-family: var(--ui); font-size: 12px; color: var(--ink-dim); line-height: 1.4; display: block; margin-top: 2px; }
.ob-risk { margin: 16px 0 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-control);
  background: rgba(140,168,210,0.05); font-family: var(--mono); font-size: 10.5px; line-height: 1.45; color: var(--ink-mid); text-align: left; }
.ob-go { margin-top: 16px; width: 100%; padding: 13px; border-radius: var(--r-control); border: 1px solid var(--cobalt-hi); cursor: pointer;
  background: linear-gradient(180deg, var(--cobalt-steel), var(--cobalt)); color: #fff; font-family: var(--ui); font-weight: 700; font-size: 13.5px; letter-spacing: 0.04em; }
.ob-go:hover { background: linear-gradient(180deg, var(--cobalt-hi), var(--cobalt-steel)); }
.ob-fair { display: inline-block; margin-top: 12px; font-family: var(--ui); font-size: 11px; color: var(--ink-dim); text-decoration: none; }
.ob-fair:hover { color: var(--cobalt-hi); }

/* MINING dashboard at the top of the feed: what you're earning + the release/claim flow */
.mining-panel { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(180deg, rgba(255, 194, 77, 0.05), transparent); }
.mp-head { display: flex; align-items: baseline; justify-content: space-between; }
.mp-title { font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.16em; color: var(--gold); }
.mp-epoch { font-family: var(--mono); font-size: 9px; color: var(--ink-dim); letter-spacing: 0.1em; }
.mp-tagline { font-family: var(--ui); font-size: 10px; line-height: 1.4; color: var(--ink-mid); margin-top: -2px; }
/* three hero numbers: Hashpower, Projected $DRILL, Ready to claim */
.mp-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mp-hero-stat { display: flex; flex-direction: column; gap: 2px; padding: 7px 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-control); min-width: 0; }
.mp-h-k { font-family: var(--label-face); font-size: 8px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-h-v { font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-hero-stat:nth-child(2) .mp-h-v { color: var(--gold); }   /* Projected $DRILL reads gold (the mining colour) */
.mp-epoch-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 10px; color: var(--ink-mid); font-variant-numeric: tabular-nums slashed-zero; }
.mp-share-now { color: var(--ink-dim); white-space: nowrap; }
.mp-bar { height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; }
.mp-bar-fill { height: 100%; width: 2%; border-radius: 3px; background: linear-gradient(90deg, rgba(255,194,77,0.55), var(--gold)); transition: width 0.5s ease; }
#mpAction { width: 100%; }
.mp-note { font-family: var(--ui); font-size: 10.5px; line-height: 1.45; color: var(--ink-dim); }
.mp-how { font-family: var(--ui); font-size: 10px; color: var(--ink-dim); }
.mp-how summary { cursor: pointer; color: var(--ink-mid); }
.mp-how p { margin: 6px 0 0; line-height: 1.5; }

.hist-strip {
  flex-shrink: 0;   /* never let the 100vh stage flex-column collapse the past-round multiplier chips (the rig absorbs the slack instead) */
  display: flex; gap: 6px; overflow-x: auto; padding: 6px 24px 8px 12px;   /* L/T pad so a scaled-up (t-high 1.12x) or glowing first chip isn't clipped by overflow; R pad clears the last chip */
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);       /* P2-8: clean right-edge fade, no flat slice */
}
.hist-strip::-webkit-scrollbar { display: none; }
.hist-chip {
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums slashed-zero;
  padding: 5px 11px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--card); color: var(--ink-dim);
  transition: transform 0.12s;
}
.hist-chip:hover { transform: translateY(-2px); }
.hist-chip.t-bust { color: var(--ink-dim); border-color: var(--line); opacity: 0.6; transform: scale(0.92); }
.hist-chip.t-low { color: var(--ink-mid); }
.hist-chip.t-mid { color: var(--ember-hi); border-color: rgba(255, 138, 60, 0.4); transform: scale(1.04); box-shadow: 0 0 12px rgba(255, 138, 60, 0.18); }
.hist-chip.t-high { color: var(--gold); border-color: rgba(255, 194, 77, 0.5); background: rgba(255, 194, 77, 0.10); transform: scale(1.12); font-weight: 700; box-shadow: 0 0 16px rgba(255,194,77,0.3); }
.hist-chip.is-ml { box-shadow: 0 0 12px rgba(255, 194, 77, 0.25) inset; }

/* ---------- stage / scene ---------- */

.stage { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.scene-wrap {
  position: relative; height: clamp(380px, 52vh, 560px);
  border: 1px solid var(--line-2); border-radius: var(--r);
  /* a deep, desaturated steel-cobalt base behind the canvas (element-27 the metal, not
     the pigment) - a machined instrument deck, never a gloomy pit and never bright
     primary blue. This is the cool calm field the black-body heat blazes against. */
  background:
    radial-gradient(ellipse 130% 92% at 50% 2%, rgba(62, 107, 168, 0.26), transparent 60%),
    radial-gradient(ellipse 100% 64% at 50% 100%, rgba(46, 84, 140, 0.14), transparent 72%),
    linear-gradient(180deg, #16202F 0%, #121A28 48%, #0E1521 100%);
  overflow: hidden;
  container-type: size; container-name: stage;   /* readout sizes off the CANVAS, not the viewport */
}
/* CALM AT REST, IGNITE ON RUN (north-star): dim/desaturate the SCENE ART (canvases + strata tint)
   at rest + while armed, blazing to full on a live run. Dim only the ART, never the HUD readout
   (depth/multiplier/phase stay crisp). Collapse stays full so the red flash isn't muted. */
.scene-wrap > canvas, .scene-wrap .strata-tint { transition: filter 0.5s ease; }
body:not(.is-running):not(.is-crashed) .scene-wrap > canvas,
body:not(.is-running):not(.is-crashed) .scene-wrap .strata-tint { filter: saturate(0.82) brightness(0.86); }
#scene, #glscene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#scene { pointer-events: none; }

/* ── RE-KEY THE BURGUNDY CANVAS → BRIGHT COBALT-THAT-IGNITES-SATURATED-RED ───────
   The shipped WebGL (glsoil.js) bakes a warm-dark crimson floor (c0 #2a0a0c / c1
   #43100e) - the banned burgundy, and the largest surface on screen. We cannot edit
   that file, and the live game wires GLSoil (not Core3D) onto #glscene, so re-keying
   this filter is the ONLY lever. The fix for "Aviator in hell": at rest rotate the
   crimson the long way to a BRIGHT, clean cobalt and push brightness HARD (1.46) so the
   floor reads as a lit electric instrument, never a muddy swamp. As the seam runs deep
   we unwind to 0deg and crank saturation + brightness HIGH so the baked red re-emerges
   blazing and bright - a saturated siren red, not dark-orange-on-murk. One red, matching
   the hero digit, and never gloomy. */
#glscene {
  /* No CSS filter. A live filter() on a per-frame-dirty fullscreen canvas forces a full-canvas GPU
     intermediate texture every frame (a top crash cost per the stress test). The glsoil shader
     grades the soil by depth natively; the collapse desaturate is baked into the shader (uCrash). */
}

/* ── COOL THE 2D PUMPJACK OVERLAY ───────────────────────────────────────────────
   scene.js draws the rig + embers entirely in warm ember rgba(255,150,72) on a
   TRANSPARENT canvas (clearRect, no opaque fill). At idle that's a lone warm object
   with no cobalt counterweight - it compounds the gloom. We can't edit scene.js, so
   we cool the overlay's pixels: at rest the rig reads as cool chrome/cobalt steel; as
   the seam runs deep the chill unwinds and the forge embers blaze warm again. */
#scene {
  /* No CSS filter (same per-frame GPU-intermediate cost as #glscene). The rig + embers render in
     their own warm forge colors over the cobalt soil: the banked forge reads warm against the cool
     steel earth, no full-canvas filter texture per frame. */
}

/* a heat-keyed wash layer ON TOP of the canvas (hosted on .hud, always present,
   pointer-events:none): cobalt vignette at rest → blazing red/ember/white-hot core
   glow swelling from the bottom as the seam runs deep. This is what makes the heat
   BLAZE against the cooled base. */
.hud::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  transition: background 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  background:
    radial-gradient(ellipse 100% 58% at 50% 100%, rgba(62, 107, 168, 0.22), transparent 62%),
    radial-gradient(ellipse 130% 42% at 50% -8%, rgba(138, 176, 222, 0.12), transparent 60%);
}
/* topsoil: the FIRST instant of ignition - a felt VIVID red molten-core glow already wells
   from the floor, so deploying reads as the deck igniting (exciting, not a tame warm panel) */
/* BLACK-BODY zone ramp: molten amber (ignition) → ember → deep orange → white-hot core. NO red
   anywhere on the climb — red is the collapse flash only (one-red law). */
body[data-zone="topsoil"] .hud::before {
  background:
    radial-gradient(ellipse 108% 60% at 50% 100%, rgba(255, 150, 64, 0.26), transparent 64%),
    radial-gradient(ellipse 130% 40% at 50% -8%, rgba(138, 176, 222, 0.10), transparent 60%);
}
body[data-zone="shale"] .hud::before {
  background:
    radial-gradient(ellipse 112% 66% at 50% 100%, rgba(255, 122, 48, 0.36), rgba(255, 150, 80, 0.14) 44%, transparent 70%),
    radial-gradient(ellipse 130% 36% at 50% -8%, rgba(138, 176, 222, 0.06), transparent 60%);
}
body[data-zone="magma"] .hud::before {
  background:
    radial-gradient(ellipse 122% 80% at 50% 100%, rgba(255, 106, 56, 0.48), rgba(255, 90, 40, 0.26) 40%, transparent 76%);
}
body[data-zone="core"] .hud::before {
  background:
    radial-gradient(ellipse 152% 104% at 50% 102%, rgba(255, 247, 224, 0.58), rgba(255, 174, 74, 0.34) 36%, rgba(255, 110, 40, 0.20) 64%, transparent 88%);
}
body.is-crashed .hud::before {
  background: radial-gradient(ellipse 120% 70% at 50% 60%, rgba(255, 122, 24, 0.10), transparent 70%);
  transition: background 0.4s ease;
}
@media (prefers-reduced-motion: reduce) {
  #glscene, .hud::before { transition: none; }
}

/* corner brackets */
.scene-wrap::before, .scene-wrap::after {
  content: ''; position: absolute; width: 26px; height: 26px; z-index: 3; pointer-events: none;
  border: 1px solid rgba(138, 176, 222, 0.4);
  transition: border-color 0.4s ease;
}
body.is-running .scene-wrap::before, body.is-running .scene-wrap::after { border-color: rgba(255, 138, 60, 0.5); }
body.is-crashed .scene-wrap::before, body.is-crashed .scene-wrap::after { border-color: rgba(255, 122, 24, 0.5); }
.scene-wrap::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.scene-wrap::after { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.hud { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.phase-label {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  font-family: var(--ui); font-weight: 600; font-size: 10px; letter-spacing: 0.14em; text-indent: 0.14em;
  color: var(--ink-dim); text-transform: uppercase;
  padding: 5px 14px; border: var(--glass-line);
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-spec);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
body.is-running .phase-label { color: var(--ember-hi); border-color: var(--line-2); }
body.is-crashed .phase-label { color: var(--ember); border-color: rgba(255, 129, 36, 0.4); }
body.is-motherlode.is-betting .phase-label { color: var(--gold); border-color: rgba(255, 194, 77, 0.4); }
/* final-3s deploy urgency: amber pulse (one-red law, never red). Scoped to the betting phase so the pulse
   stops automatically the instant the window closes, even if the class lingers a frame. */
body.is-betting .phase-label.is-urgent {
  color: var(--whitehot, #fff3e0); border-color: rgba(255, 154, 70, 0.6);
  animation: deployUrge 0.5s ease-in-out infinite;
}
@keyframes deployUrge { 0%, 100% { transform: translateX(-50%) scale(1); box-shadow: var(--glass-spec); } 50% { transform: translateX(-50%) scale(1.06); box-shadow: 0 0 18px -2px rgba(255,150,70,0.6); } }
@media (prefers-reduced-motion: reduce) { body.is-betting .phase-label.is-urgent { animation: none; } }

/* READOUT - ONE self-contained, auto-sizing component. The multiplier lockup, depth
   label, and progress bar stack in normal flow (flex column + gap) inside a fit-content
   panel, so they can NEVER overlap at any width. The panel hugs its contents; the canvas
   string enters its TOP edge and the bit exits its BOTTOM edge (scene reads its rect). */
.mult-wrap {
  position: absolute; top: 44%; left: 50%;
  transform: translate(-50%, -50%) scale(calc(var(--breathe, 1) * var(--stack-scale, 1)));
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: fit-content; max-width: 98cqw;
  padding: 10px 26px 12px;
  /* REAL liquid glass: heavy blur + high saturate + bright inset specular + a bottom
     refraction line. Brighter, cleaner, more premium - the incandescent number floats
     ON it, never sunk into a muddy plate. */
  background:
    linear-gradient(180deg, rgba(180, 204, 255, 0.10), transparent 38%),
    linear-gradient(180deg, rgba(40, 56, 86, 0.34), rgba(16, 24, 40, 0.18));
  -webkit-backdrop-filter: blur(11px) saturate(140%);
  backdrop-filter: blur(11px) saturate(140%);
  /* hero plate is the SHARPEST surface on screen (highest money-at-risk) */
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(170, 198, 255, 0.14),
    inset 0 0 0 1px rgba(170, 198, 255, 0.14),
    0 18px 56px -18px rgba(0, 0, 0, 0.7);
  text-align: center; will-change: transform;
  transition: box-shadow 0.34s ease, background 0.34s ease, padding 0.34s ease,
    backdrop-filter 0.34s ease, -webkit-backdrop-filter 0.34s ease, border-radius 0.34s ease;
}
/* DROP THE PLATE ON A LIVE RUN - the digits blaze NAKED over the canvas the way
   Aviator's number is unframed and enormous. The glass is for the calm idle/betting
   readout; the moment the seam runs, the plate dissolves and the hero owns the frame. */
body.is-running .mult-wrap {
  background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none; border-radius: 0;
  padding: 0;
}
/* HERO number - MUCH bigger, full-width over the canvas. Aviator-grade punch: the
   single loudest object on screen. Sizes off the canvas (cqw) so it owns the frame. */
.mult-row { display: flex; align-items: baseline; justify-content: center; white-space: nowrap; line-height: 0.9;
  font-size: clamp(72px, 19vw, 132px);
  font-size: clamp(72px, 20cqw, 132px); }
/* IDLE reads calmer than a live run - the countdown number sits smaller than the heat hero.
   (is-running lives on <body>, so we scope off the body, not .mult-wrap.) */
body:not(.is-running) .mult-wrap .mult-row { font-size: clamp(64px, 17cqw, 116px); }
/* P1-3 / item-3: collapse and live readout are MUTUALLY EXCLUSIVE - readout fully gone */
body.is-crashed .mult-wrap { display: none; }
.stamp { z-index: 6; }
/* number + × are ONE lockup: same face, gradient, and bloom (× scales + colours with it).
   KINETIC: every tick fires a snappy spring (see .mult-row tick below); the glyph
   THICKENS and incandesces as heat climbs (text-stroke = perceived variable weight). */
.mult, .mult-unit {
  font-family: var(--mult-face); font-weight: 700;
  font-variant-numeric: tabular-nums slashed-zero;
  /* VARIABLE WEIGHT - thickens CONTINUOUSLY with --heat (driven per frame in game.js): 540 idle -> 900
     white-hot. The per-tier rules below now only swap the colour gradient/glow, not the weight. */
  font-variation-settings: 'wght' calc(540 + var(--heat, 0) * 360);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  background-image: linear-gradient(180deg, #ffffff 0%, #ffe7a0 46%, #ff8a18 100%);
  transition:
    filter 0.12s ease,
    -webkit-text-stroke 0.12s ease,
    font-variation-settings 0.16s cubic-bezier(0.2, 1.0, 0.3, 1),
    background-image 0.16s ease;
  -webkit-text-stroke: 0 transparent;
}
.mult { font-size: 1em; line-height: 0.92; letter-spacing: -0.012em; font-variant-numeric: tabular-nums slashed-zero; }
.mult-unit { font-size: 0.42em; vertical-align: baseline; margin-left: 0.02em; letter-spacing: 0; }
/* the lockup is the brightest, hottest thing on screen - blazes OFF the deck, never sinks in.
   ONE-RED LAW: the bloom is BLACK-BODY amber, never red (red = collapse flash only). */
.mult, .mult-unit {
  filter: drop-shadow(0 2px 3px rgba(20,8,2,0.85)) drop-shadow(0 0 18px rgba(255,138,60,0.7));
}
/* RUNNING (data-tier="", mult 1–2 → the band MOST rounds live in) - the EXCITEMENT band, recut
   to BLACK-BODY heat (molten amber → ember), NOT red: gold-hot, bright + saturated, so the live
   climb reads fast and alive while red stays reserved for the seam collapse (one-red law). */
body.is-running .mult, body.is-running .mult-unit {
  background-image: linear-gradient(180deg, #fff3e0 0%, #ffb454 42%, #ff7a18 100%);
  -webkit-text-stroke: 0.9px rgba(255, 170, 80, 0.55);
  filter: drop-shadow(0 2px 3px rgba(40,18,0,0.7)) drop-shadow(0 0 22px rgba(255,150,70,0.95));
}
/* MID heat (mult 2–10) - hotter up the black-body ramp: amber drives toward ember-orange as it
   climbs, white-hot crown. More incandescent than the low band, the heat is rising. */
body.is-running .mult-wrap[data-tier="mid"] .mult,
body.is-running .mult-wrap[data-tier="mid"] .mult-unit {
  background-image: linear-gradient(180deg, #fff4e8 0%, #ff9a3c 38%, #ff6a1e 100%);
  -webkit-text-stroke: 1.2px rgba(255, 154, 70, 0.6);
  filter: drop-shadow(0 2px 3px rgba(40,16,0,0.7)) drop-shadow(0 0 24px rgba(255,128,60,0.95));
}
/* HIGH heat (mult ≥ 10) - WHITE-HOT incandescent core over a blazing orange base, the rare
   climax of the climb (the moment everyone screenshots). */
body.is-running .mult-wrap[data-tier="high"] .mult,
body.is-running .mult-wrap[data-tier="high"] .mult-unit {
  background-image: linear-gradient(180deg, #ffffff 0%, #fff0cf 34%, #ffae4a 78%, #ff5a1e 100%);
  -webkit-text-stroke: 1.5px rgba(255, 200, 130, 0.6);
  filter: drop-shadow(0 2px 3px rgba(40,10,0,0.9)) drop-shadow(0 0 26px rgba(255,244,214,0.95));
}
/* Reduced motion: pin the glyph weight to a fixed mid value so per-frame --heat updates don't animate. */
@media (prefers-reduced-motion: reduce) {
  .mult, .mult-unit { font-variation-settings: 'wght' 720 !important; transition: none; }
}
/* IDLE/betting - the machined steel deck reads READY in cool steel-cobalt, never red.
   The countdown digits glow cobalt-steel with a calm armed shimmer; warmth is reserved
   for the live descent. A steel "DEPLOY HASHPOWER" lockup sits above. */
/* FULL-PAGE LOADER: an opaque cover over the whole rig until chain state lands, so the page reveals
   as one piece instead of assembling container-by-container. Visible whenever body.is-loading, fades
   out (and stops intercepting input) the instant game.js removes is-loading. */
.page-loader {
  position: fixed; inset: 0; z-index: 999; background: var(--void);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
body:not(.is-loading) .page-loader { opacity: 0; visibility: hidden; pointer-events: none; }
.pl-mark { width: 52px; height: 52px; color: var(--cobalt-hi); animation: plpulse 1.6s ease-in-out infinite; }
.pl-mark svg { width: 100%; height: 100%; display: block; }
.pl-bar { width: 140px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.pl-bar span { display: block; height: 100%; width: 38%; background: var(--cobalt-hi); border-radius: 2px; animation: plslide 1.15s ease-in-out infinite; }
.pl-note { font-family: var(--ui); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); }
@keyframes plpulse { 0%, 100% { opacity: 0.55; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1); } }
@keyframes plslide { 0% { transform: translateX(-130%); } 100% { transform: translateX(360%); } }
@media (prefers-reduced-motion: reduce) { .pl-mark, .pl-bar span { animation: none; } }

/* LOADING / SYNCING - the page boots here until the first real chain (or sim) state is known, so a
   refresh never flashes a wrong-state readout. Neutral grey, no heat, deploy disabled. */
body.is-loading .mult, body.is-loading .mult-unit {
  background: none; -webkit-text-fill-color: var(--ink-dim); color: var(--ink-dim);
  -webkit-text-stroke: 0 transparent; filter: none; animation: syncpulse 1.4s ease-in-out infinite;
}
body.is-loading .action { opacity: 0.5; pointer-events: none; }
body.is-loading .count-wrap, body.is-loading #depth { opacity: 0.6; }
@keyframes syncpulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.8; } }

/* SKELETON-HOLD: while booting (body.is-loading) data cells never flash "…"/0/stale — they hold a
   shimmer at their already-reserved size, then reveal the real value the instant the first real
   chain state lands (game.js removes is-loading). Reuse .skel anywhere a value is pending. */
@keyframes skelshim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel,
body.is-loading .pill b,
body.is-loading .wchip-bal b,
body.is-loading .bal-mini b,
body.is-loading .mh-amt,
body.is-loading .ll-v {
  color: transparent !important;
  background: linear-gradient(90deg, rgba(140,168,210,0.05) 25%, rgba(140,168,210,0.18) 50%, rgba(140,168,210,0.05) 75%) 0 0 / 200% 100%;
  border-radius: 4px; animation: skelshim 1.3s linear infinite;
}
/* feed holds shimmer rows (not the empty state, which is premature) until the first read lands */
body.is-loading .feed-empty { display: none; }
body.is-loading .feed-list { min-height: 168px; position: relative; }
body.is-loading .feed-list::after {
  content: ''; position: absolute; left: 14px; right: 14px; top: 8px; height: 156px; opacity: 0.6;
  background-image:
    repeating-linear-gradient(to bottom, rgba(140,168,210,0.14) 0 12px, transparent 12px 39px),               /* the name bars */
    repeating-linear-gradient(to bottom, rgba(140,168,210,0.07) 0 12px, transparent 12px 39px);                /* the value bars */
  background-size: 42% 100%, 26% 100%;
  background-position: 0 0, 100% 0;
  background-repeat: repeat-y, repeat-y;
}

body.is-betting .mult, body.is-betting .mult-unit {
  background-image: linear-gradient(180deg, #dfeaf8 0%, #8AB0DE 38%, #5E84A8 78%, #3E6BA8 100%);
  -webkit-text-stroke: 0.8px rgba(138, 176, 222, 0.46);
  filter: drop-shadow(0 2px 3px rgba(6,12,22,0.55)) drop-shadow(0 0 28px rgba(62,107,168,0.6)) drop-shadow(0 0 60px rgba(62,107,168,0.32));
  animation: armedglow 1.4s ease-in-out infinite;
}
@keyframes armedglow {
  0%, 100% { filter: drop-shadow(0 2px 3px rgba(6,12,22,0.6)) drop-shadow(0 0 24px rgba(62,107,168,0.5)) drop-shadow(0 0 52px rgba(62,107,168,0.28)); }
  50%      { filter: drop-shadow(0 2px 3px rgba(6,12,22,0.6)) drop-shadow(0 0 40px rgba(138,176,222,0.78)) drop-shadow(0 0 78px rgba(94,132,168,0.42)); }
}
/* shrink the egg-timer 's' so the charged number dominates, not the unit */
body.is-betting .mult-unit { font-size: 0.30em; opacity: 0.7; align-self: flex-start; margin-top: 0.18em; }
/* steel-cobalt label ABOVE the countdown - the deck reads loaded, armed, ready (never red) */
body.is-betting .mult-wrap::before {
  content: 'READY · DEPLOY HASHPOWER';
  order: -1; margin-bottom: 2px;
  font-family: var(--ui); font-weight: 700; font-size: clamp(9px, 1.5cqh, 12px);
  letter-spacing: 0.22em; text-indent: 0.22em;
  color: var(--cobalt-hi);
  text-shadow: 0 0 18px rgba(62, 107, 168, 0.62);
  animation: armedglow 1.5s ease-in-out infinite;
}
/* collapse: the ONLY cool state - dead grey metal (wins over any leftover tier) */
body.is-crashed .mult, body.is-crashed .mult-unit,
body.is-crashed .mult-wrap[data-tier] .mult, body.is-crashed .mult-wrap[data-tier] .mult-unit {
  background-image: linear-gradient(180deg, #d2d9e0 0%, #909ba5 54%, #59606a 100%);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.6)) drop-shadow(0 0 24px rgba(120,140,160,0.3));
}
body.is-crashed .mult { animation: multcrash 0.34s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes multcrash { 0%{transform:scale(1.12) skewX(-5deg)} 22%{transform:scale(.93) skewX(4deg)} 52%{transform:scale(1.03) skewX(-1deg)} 100%{transform:scale(1)} }

.depth {
  margin: 0; white-space: nowrap;  /* item-2: depth label is always one line */
  font-family: var(--mono); font-weight: 500; font-size: clamp(11px, 2.1cqh, 14px); letter-spacing: 0.12em;
  color: var(--cobalt-hi); text-transform: uppercase;   /* the proof-of-depth readout reads as the cool instrument at rest, not a grey sliver */
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
body.is-running .depth { color: #ffe0b0; }   /* warm amber + legible over the heat */
body.is-crashed .depth { color: var(--ember-hi); }

/* progress bar is now row 3 INSIDE the readout flow - static, gap-spaced, can't overlap */
.count-wrap {
  position: static; margin-top: 2px;
  width: clamp(150px, 18vh, 240px); height: 3px;
  background: rgba(62, 107, 168, 0.18); border-radius: var(--r-panel);
  display: none;
}
body.is-betting .count-wrap { display: block; }
.count-bar {
  height: 100%; background: linear-gradient(90deg, var(--cobalt), var(--cobalt-hi));
  transform-origin: left center;
  box-shadow: 0 0 12px rgba(62, 107, 168, 0.6);
}

/* compact collapse card - sized to its content, comfortable padding, never fills the canvas */
.stamp {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-2deg);
  width: fit-content; max-width: 76%;
  text-align: center; padding: 12px 26px 14px; border-radius: var(--r-panel);
  border: 1px solid rgba(255, 122, 24, 0.55);
  /* cool slate glass shell (not dark-crimson) - the SHELL drains cold on collapse;
     the regret figure inside stays incandescent so the FOMO/re-deploy pull lands. */
  background: linear-gradient(180deg, rgba(26, 34, 50, 0.60), rgba(12, 16, 24, 0.48));
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), 0 0 56px rgba(255, 122, 24, 0.20), inset 0 0 24px rgba(255, 122, 24, 0.06);
  animation: stampin 0.32s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stamp.out { opacity: 0; transform: translate(-50%, -52%) rotate(-2deg) scale(0.96); }
@keyframes stampin {
  from { transform: translate(-50%, -50%) rotate(-2deg) scale(1.9); opacity: 0; }
}
.stamp-title { font-family: var(--ui); font-weight: 800; text-transform: uppercase; font-size: 12px; letter-spacing: 0.16em; text-indent: 0.42em; color: var(--ember); }
/* the true committed crash figure - the AFTERMATH regret number. It blazes ember
   (the seam ran THIS deep), not dead grey, so the FOMO/re-deploy pull lands; the
   collapse SHELL drains grey but the number that got away stays hot. */
.stamp-mult {
  font-family: var(--mono); font-weight: 800; font-size: 52px; line-height: 0.9; margin: 4px 0 3px;
  font-variant-numeric: tabular-nums slashed-zero;
  font-variation-settings: 'wght' 820;
  background-image: linear-gradient(180deg, #fff0d8 0%, #ffb454 44%, #ff7a18 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 30px rgba(255,122,24,0.6));
  animation: ghostreveal 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
/* a fast "ran-to" climb-in on the crash figure - the seam's true peak rushes up */
@keyframes ghostreveal {
  0%   { opacity: 0; transform: translateY(0.18em) scale(0.7); filter: drop-shadow(0 0 0 rgba(255,122,24,0)); }
  55%  { opacity: 1; transform: translateY(-0.02em) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.stamp-sub { font-family: var(--ui); font-weight: 500; font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-mid); }
/* loss receipt second track: the busted deploy still mined (gold mining colour, not red) */
.stamp-mining { font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; color: var(--gold); margin-top: 6px; }

/* P1-4: extract confirmation sits ABOVE the readout panel, not in the multiplier's box */
/* persistent win receipt — scales in on extract and HOLDS until dismissed / next seam (no auto-fade).
   The on-screen twin of the share card (share.js): black-body multiplier, extract-green SOL. */
.win-card {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(0.92);
  z-index: 90; width: min(380px, calc(100vw - 32px)); max-height: calc(100dvh - 42px);
  overflow-y: auto; text-align: center; opacity: 0; pointer-events: none;
  padding: 22px 22px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(20,28,38,0.97), rgba(7,11,15,0.98));
  border: 1px solid var(--extract);
  box-shadow: 0 26px 64px -18px rgba(0,0,0,0.82), 0 0 0 1px rgba(32,208,138,0.16), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: opacity 0.26s cubic-bezier(0.2,0.9,0.3,1), transform 0.26s cubic-bezier(0.2,0.9,0.3,1);
}
.win-card.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.win-card.gold { border-color: var(--gold); box-shadow: 0 26px 64px -18px rgba(0,0,0,0.82), 0 0 0 1px rgba(255,194,77,0.28); }
/* celebration ladder: big (>=10x) and huge (>=30x) extracts escalate glow + scale; green stays the win
   colour (gold is motherlode only). Scale capped at 1.08 so the card never spills past the scene bounds. */
.win-card[data-tier="big"].show  { transform: translate(-50%, -50%) scale(1.04); box-shadow: 0 30px 72px -18px rgba(0,0,0,0.85), 0 0 0 1px rgba(32,208,138,0.34), 0 0 40px -8px rgba(32,208,138,0.42); }
.win-card[data-tier="huge"].show { transform: translate(-50%, -50%) scale(1.08); box-shadow: 0 34px 84px -16px rgba(0,0,0,0.88), 0 0 0 1px rgba(32,208,138,0.5), 0 0 66px -6px rgba(32,208,138,0.58); }
.win-card .wc-x { position: absolute; top: 7px; right: 9px; width: 26px; height: 26px; border: 0; background: none; color: var(--ink-dim); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 7px; }
.win-card .wc-x:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
.wc-tag { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: 0.22em; text-transform: uppercase; color: var(--extract); }
.win-card.gold .wc-tag { color: var(--gold); }
.wc-mult {
  font-family: var(--mono); font-weight: 800; font-size: clamp(50px, 9vw, 74px); line-height: 1; margin-top: 8px;
  font-variant-numeric: tabular-nums slashed-zero;
  background: linear-gradient(180deg, #fff3e0, #ffb454 52%, #ff7a18); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; text-shadow: 0 0 40px rgba(255,150,64,0.26);
}
.wc-amt { font-family: var(--mono); font-weight: 700; font-size: 26px; color: var(--extract); margin-top: 6px; font-variant-numeric: tabular-nums slashed-zero; text-shadow: 0 0 24px rgba(43, 217, 138, 0.42); }
.wc-meta { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-dim); margin-top: 10px; }
/* the second track on the win receipt: confirmed deploys mine $DRILL, win or lose (gold = mining colour) */
.wc-mining { font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; color: var(--gold); margin-top: 8px; }
/* two-track receipt labels: SOL RESULT (above the SOL number) pairs with the MINING line below */
.wc-track-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); margin-top: 10px; }
.wc-actions { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.wc-verify { font-family: var(--ui); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cobalt-hi); text-decoration: none; padding: 9px 13px; border-radius: var(--r-pill); border: 1px solid var(--line-2); }
.wc-verify:hover { border-color: var(--cobalt-hi); color: var(--ink); }
@media (max-width: 520px) {
  .win-card { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); transform: translate(-50%, 8px) scale(0.96); width: calc(100vw - 22px); padding: 18px 16px 16px; }
  .win-card.show { transform: translate(-50%, 0) scale(1); }
  .wc-mult { font-size: clamp(44px, 16vw, 62px); }
  .wc-amt { font-size: 22px; }
  .wc-actions { gap: 8px; }
  .wc-actions > * { flex: 1 1 calc(50% - 8px); text-align: center; justify-content: center; }
}

.mine-flash {
  position: absolute; top: 70%; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--gold); opacity: 0; pointer-events: none; white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 194, 77, 0.5);
}
.mine-flash.go { animation: mineflash 1.8s ease-out both; }
@keyframes mineflash {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  18% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-16px); }
}

/* ============================================================
   THE SEAM: VEINS crit feedback. Tier palette stays inside the one-red law: red is the COLLAPSE
   flash ONLY, so no vein uses --danger. Iron = steel/cobalt (idle instrument pole), Cobalt = brighter
   cobalt, Nugget = gold (the rarest, the Motherlode vein hue), the Kobold's Cut = ember consolation
   (a micro-reward on the instant cut, NOT a collapse). Labels are --ui; numbers are --mono.
   ============================================================ */
.vein-flash {
  position: absolute; top: 56%; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: 0; pointer-events: none; white-space: nowrap; text-align: center;
  --vein: var(--cobalt-hi);
}
.vein-flash[data-tier="iron"]   { --vein: var(--cobalt-steel); }
.vein-flash[data-tier="cobalt"] { --vein: var(--cobalt-hi); }
.vein-flash[data-tier="nugget"] { --vein: var(--gold); }
.vein-flash[data-tier="kobold"] { --vein: var(--ember-hi); }
.vein-flash .vf-tag {
  font-family: var(--label-face); font-size: var(--label-size); font-weight: var(--label-weight);
  letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim);
}
.vein-flash .vf-name {
  font-family: var(--ui); font-weight: 700; font-size: 18px; letter-spacing: 0.04em;
  color: var(--vein); text-shadow: 0 0 22px color-mix(in srgb, var(--vein) 55%, transparent);
}
.vein-flash .vf-drill {
  font-family: var(--mono); font-size: var(--num-s); font-weight: var(--num-w);
  font-variant-numeric: tabular-nums slashed-zero; color: var(--vein); opacity: 0.92;
}
.vein-flash.go { animation: veinflash 2.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes veinflash {
  0% { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.96); }
  14% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  72% { opacity: 0.95; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-18px) scale(1); }
}

/* recent-crits rail: lives in the feed aside (the HUD rail), never over the rig scene */
.vein-rail { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.vein-rail-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px;
  font-family: var(--label-face); font-size: var(--label-size); font-weight: var(--label-weight);
  letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-mid);
}
.vein-rail-head .vrh-sub { color: var(--ink-dim); letter-spacing: 0.06em; }
.vein-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.vein-empty { font-family: var(--ui); font-size: 11px; color: var(--ink-dim); line-height: 1.4; padding: 2px 0; }
.vein-row {
  display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: var(--r-control);
  background: linear-gradient(90deg, color-mix(in srgb, var(--vein) 10%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--vein) 22%, transparent);
  opacity: 0; transform: translateX(-6px); transition: opacity 0.25s ease, transform 0.25s ease;
  --vein: var(--cobalt-hi);
}
.vein-row.show { opacity: 1; transform: none; }
.vein-row[data-tier="iron"]   { --vein: var(--cobalt-steel); }
.vein-row[data-tier="cobalt"] { --vein: var(--cobalt-hi); }
.vein-row[data-tier="nugget"] { --vein: var(--gold); }
.vein-row[data-tier="kobold"] { --vein: var(--ember-hi); }
.vein-row .vr-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--vein); box-shadow: 0 0 8px color-mix(in srgb, var(--vein) 60%, transparent); }
.vein-row .vr-name { font-family: var(--ui); font-weight: 600; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--vein); }
.vein-row .vr-drill { font-family: var(--mono); font-size: var(--num-xs); font-weight: var(--num-w); font-variant-numeric: tabular-nums slashed-zero; color: var(--ink); }

.scene-meta {
  display: flex; align-items: center; gap: 12px; flex: 0 1 auto; min-width: 0; overflow: hidden;
  font-family: var(--mono); font-size: 10px; color: var(--ink-dim);
  font-variant-numeric: tabular-nums slashed-zero;
}
.meta-chip { color: var(--ink-mid); letter-spacing: 0.14em; display: inline-block; min-width: 7ch; }   /* BLOCK #0 -> BLOCK #<id> reserved */
.meta-hash code { color: var(--ink-dim); font-size: 10px; display: inline-block; min-width: 8ch; }   /* "…" -> hash reserved (truncated display) so .meta-verify doesn't jump */
.meta-verify {
  margin-left: auto; color: var(--cobalt-hi); letter-spacing: 0.18em;
  border-bottom: 1px dashed rgba(138, 176, 222, 0.45); padding-bottom: 1px;
  transition: color 0.15s;
}
.meta-verify:hover { color: var(--ink); }

/* ---------- bet panels ---------- */

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.panel {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: var(--glass-line); border-radius: var(--r);
  box-shadow: var(--glass-spec), var(--shadow);
  padding: 9px 12px 10px;
  display: flex; flex-direction: column; gap: 7px;
}
/* RIG ARMED: a one-shot cobalt+amber border flash the instant a deploy confirms on-chain ("it counted") */
@keyframes armedFlash { 0% { box-shadow: var(--glass-spec), var(--shadow); } 28% { box-shadow: 0 0 0 2px rgba(94,176,255,0.75), 0 0 20px -2px rgba(255,194,77,0.6); } 100% { box-shadow: var(--glass-spec), var(--shadow); } }
.panel.armed-flash { animation: armedFlash 0.8s ease-out; }
@media (prefers-reduced-motion: reduce) { .panel.armed-flash { animation: none; } }

.panel-head { display: flex; align-items: baseline; justify-content: space-between; }
.panel-tag { font-family: var(--ui); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.12em; color: var(--cobalt-hi); }
.panel-sub { font-family: var(--ui); font-size: 10px; letter-spacing: 0.01em; color: var(--ink-dim); }
.panel-preset { font-style: normal; font-weight: 600; font-size: 9px; letter-spacing: 0.06em; color: var(--ink-dim); margin-left: 5px; }
/* stake-cap helper: why MAX is what it is (binding vault/payout cap at the current target) */
.cap-hint { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); text-align: right; min-height: 13px; margin: -2px 2px 4px; font-variant-numeric: tabular-nums slashed-zero; }

.amt-row { display: flex; gap: 6px; align-items: stretch; }
.amt-box {
  flex: 1; display: flex; align-items: center;
  background: var(--void); border: 1px solid var(--line-2);
  padding: 0 10px; border-radius: var(--r-control);
}
.amt {
  width: 100%; background: none; border: 0; outline: 0;
  font-family: var(--mono); font-size: 17px; font-weight: 600;
  color: var(--ink); text-align: center; padding: 6px 0; font-variant-numeric: tabular-nums slashed-zero;
}
.amt-unit { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); }

.quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.chip {
  font-family: var(--ui); font-size: 9.5px; font-weight: 500;
  color: var(--ink-mid); padding: 6px 7px;
  background: rgba(150, 180, 235, 0.05); border: 1px solid var(--line);
  border-radius: var(--r-control);
  transition: all 0.13s;
}
.quick-row .chip { font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; }   /* two-font law: MIN/½/2×/MAX are labels (Geist); 0.1/0.5/1/5 are numbers (mono) */
.chip:hover { color: var(--cobalt-hi); border-color: var(--line-2); background: rgba(62, 107, 168, 0.12); }
.chip:active { transform: translateY(1px); }

.auto-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.autox-hint { margin: 8px 0 0; font-family: var(--ui); font-size: 10.5px; line-height: 1.4; color: var(--ink-dim); }
.switch {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--ui); font-weight: 500; font-size: 9.5px; letter-spacing: 0.02em; color: var(--ink-dim);
  user-select: none;
}
/* visually hidden but FOCUSABLE (was display:none, which dropped AUTO-EXTRACT / AUTO-DRILL out of the tab
   order). Tab reaches them, Space toggles, and the focus ring lands on the visible .sw track. */
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.switch input:focus-visible + .sw { outline: 2px solid var(--cobalt-hi, #5db0ff); outline-offset: 3px; }
.sw {
  width: 30px; height: 15px; position: relative; border-radius: var(--r-pill);
  background: var(--void); border: 1px solid var(--line-2);
  transition: all 0.18s;
}
.sw::after {
  content: ''; position: absolute; top: 2px; left: 2px; border-radius: var(--r-pill);
  width: 9px; height: 9px; background: var(--ink-dim);
  transition: all 0.18s;
}
.switch input:checked + .sw { background: rgba(62, 107, 168, 0.18); border-color: var(--cobalt); }
.switch input:checked + .sw::after { left: 17px; background: var(--cobalt-hi); box-shadow: 0 0 8px rgba(138, 176, 222, 0.8); }
.switch:has(input:checked) { color: var(--cobalt-hi); }

.autox-box {
  display: flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  background: var(--void); border: 1px solid var(--line); padding: 0 8px; border-radius: var(--r-control);
}
.autox-val {
  width: 52px; background: none; border: 0; outline: 0;
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  text-align: right; padding: 6px 0;
}

.action {
  position: relative;
  /* Clash is wordmark + display headings ONLY; the deploy control is Geist UI like every other button. */
  font-family: var(--ui); font-weight: 800;
  padding: 10px 10px 9px;
  border-radius: var(--r-control);
  border: 1px solid var(--cobalt);
  /* idle DRILL deploy reads as machined steel, not a red lozenge */
  background: linear-gradient(180deg, rgba(62, 107, 168, 0.40), rgba(62, 107, 168, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 0 rgba(62, 107, 168, 0);
  color: var(--ink);
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  transition: all 0.16s;
  overflow: hidden;
}
.action::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
  transform: translateX(-100%);
}
.action:hover::before { transform: translateX(100%); transition: transform 0.6s ease; }
.act-main { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; text-indent: 0.16em; }
.act-sub { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); color: var(--ink-mid); }   /* label copy with an embedded number, not numbers-only -> Geist */
.action:hover { border-color: var(--cobalt-hi); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 0 30px rgba(62, 107, 168, 0.42); }
.action:active { transform: translateY(1px) scale(0.99); }
.action:disabled { cursor: default; }

.action.is-armed {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255, 194, 77, 0.2), rgba(255, 194, 77, 0.05));
}
.action.is-armed .act-main { color: var(--gold); }
.action.is-live {
  border-color: var(--extract);
  background: linear-gradient(180deg, rgba(43, 217, 138, 0.3), rgba(43, 217, 138, 0.08));
  animation: livepulse 0.9s ease-in-out infinite;
}
.action.is-live .act-main { color: var(--extract); }
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 rgba(43, 217, 138, 0); }
  50% { box-shadow: 0 0 26px rgba(43, 217, 138, 0.35); }
}
.action.is-done { border-color: var(--extract); background: var(--extract-dim); opacity: 0.85; }
.action.is-done .act-main { color: var(--extract); }
/* CASHING OUT - amber pending while the chain confirms the tap landed in time. NOT green:
   the win state (green is-done + cha-ching) is reserved for the from-chain confirmation. */
.action.is-pending {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(255, 194, 77, 0.18), rgba(255, 194, 77, 0.05));
  animation: pendingpulse 1s ease-in-out infinite;
}
.action.is-pending .act-main { color: var(--gold); }
@keyframes pendingpulse { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .action.is-pending { animation: none; } }
.action.is-bust { border-color: rgba(255, 46, 72, 0.5); background: rgba(255, 46, 72, 0.08); opacity: 0.8; }
.action.is-bust .act-main { color: var(--danger); }
.action.is-queue { border-color: var(--line-2); background: rgba(62, 107, 168, 0.08); }


/* milestone pop - a SNAPPY odometer KICK on threshold crossings: a fast overshoot
   plus a tiny vertical roll so each new digit feels like it physically clicks over. */
.mult { will-change: transform, font-variation-settings; }
/* milestone KICK - a snappy mechanical odometer punch on each threshold crossing:
   a hard, fast overshoot plus a tiny vertical roll so the new digit physically clicks
   over. Tighter + punchier than before (Aviator's number snaps, it doesn't ease). */
.mult-wrap.pop .mult { animation: multpop 0.2s cubic-bezier(0.1, 3.1, 0.26, 1); }
@keyframes multpop {
  0%   { transform: translateY(0.14em) scale(0.9); }
  30%  { transform: translateY(-0.03em) scale(1.26); }
  58%  { transform: translateY(0) scale(0.965); }
  100% { transform: translateY(0) scale(1); }
}
/* ODOMETER ROLL - on every milestone crossing the unit/digits get a fast mechanical
   roll-in: a vertical wipe + a stacked motion-ghost beneath, so 2x/5x/10x crossings feel
   like a real odometer wheel clicking, not a textContent flip (genre standard). */
.mult-wrap.pop .mult-unit { animation: odoclick 0.2s cubic-bezier(0.16, 1.9, 0.3, 1); }
@keyframes odoclick {
  0%   { transform: translateY(0.5em); opacity: 0.2; }
  40%  { transform: translateY(-0.06em); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
/* live climb - a FAST, energetic, mechanical SNAP so the number RACES even at 1.4x,
   never breathes. Punchy spring on every cycle; the cadence tightens hard as heat rises
   so a hot run reads visibly faster + more urgent than a cold one. Snappy, not sluggish. */
.mult-row { transform-origin: center bottom; }
body.is-running .mult-row { animation: climbpulse 0.28s cubic-bezier(0.2, 1.9, 0.28, 1) infinite; }
@keyframes climbpulse {
  0%   { transform: scale(1.0)   translateY(0); }
  18%  { transform: scale(1.062) translateY(-0.012em); }
  42%  { transform: scale(0.984) translateY(0.003em); }
  100% { transform: scale(1.0)   translateY(0); }
}
/* heat tightens the cadence - mid/high/danger snap progressively faster + harder */
body.is-running .mult-wrap[data-tier="mid"]  .mult-row { animation-duration: 0.22s; }
body.is-running .mult-wrap[data-tier="high"] .mult-row { animation-duration: 0.17s; }
/* danger band: the hero shudders with rising pressure - last-second urgency */
body.is-running.is-danger .mult-row { animation-duration: 0.14s; }
.depth { transition: color 0.4s ease; }
.phase-label { transition: color 0.35s ease, border-color 0.35s ease; }

/* ---------- footer ---------- */

.foot {
  position: relative; z-index: 5;
  margin-top: 26px; padding: 18px 22px 26px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.foot-facts, .foot-links {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--ui); font-size: 10px; color: var(--ink-dim);
}
.foot-brand { font-family: var(--ui); font-size: 11px; color: var(--ink-dim); }
.foot-brand b { font-family: var(--disp); color: var(--cobalt-hi); letter-spacing: 0.08em; font-weight: 600; }
.foot-facts b { color: var(--cobalt-hi); font-size: 12px; }
.foot-facts em { color: var(--ink-mid); font-style: italic; }
.foot i { width: 1px; height: 10px; background: var(--line-2); }
.foot-links a { color: var(--ink-mid); border-bottom: 1px dashed var(--line-2); padding-bottom: 1px; }
.foot-links a:hover { color: var(--ink); }
.foot-dim { opacity: 0.7; }

/* ============================== CREW CHAT ============================== */
/* collapsed right-edge handle (desktop) — a steel tab bolted to the chassis */
.chat-handle {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 7px; width: 34px;
  border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, var(--card), var(--panel)); color: var(--ink-mid);
  cursor: pointer; transition: color 0.14s, background 0.14s; box-shadow: -8px 0 24px -14px rgba(0,0,0,0.7);
}
.chat-handle:hover { color: var(--ink); background: var(--card-2); }
.chat-handle-label { writing-mode: vertical-rl; text-orientation: mixed; font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.18em; }
.chat-handle .wdot { width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt-hi); box-shadow: 0 0 7px rgba(138,176,222,0.8); }
.chat-handle-count { font-family: var(--mono); font-size: 10px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.chat-handle-badge { position: absolute; top: -6px; left: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ember); color: #140a06; font-family: var(--ui); font-weight: 800; font-size: 9px; display: flex; align-items: center; justify-content: center; }
/* docked right sidebar — slides in AND reserves its width so the rig containers resize into place
   (they shrink left; the panel never overlays them). Restored on minimize. Canvas re-fits on toggle
   (chat.js fires a resize). Mobile falls back to the bottom sheet below. */
.chat-panel {
  --chat-w: 340px;
  position: fixed; right: 0; top: 47px; bottom: 0; z-index: 61; width: var(--chat-w); max-width: 88vw;
  display: flex; flex-direction: column;
  background: var(--crust);                 /* flat deck surface, same as the feed — reads as a docked rig column, not a floating modal */
  border-left: 1px solid var(--line);       /* a single thin seam, no drop shadow */
  transform: translateX(100%); transition: transform 0.24s cubic-bezier(0.2,0.7,0.2,1);
}
.chat-panel.open { transform: translateX(0); }
/* push BOTH the content column and the footer over, so the docked chat takes the whole right edge
   and never overlays the footer. ONLY where the chat is actually a 340px side panel: at <=1100px the
   chat is a bottom sheet (see below), so the push must NOT apply there or the layout gets shoved into
   an empty gap while the sheet overlays it. Boundary aligned to the bottom-sheet breakpoint (1100/1101). */
@media (min-width: 1101px) {
  body.chat-on .layout, body.chat-on .foot { transition: margin-right 0.24s cubic-bezier(0.2,0.7,0.2,1); }
  body.chat-open .layout, body.chat-open .foot { margin-right: 340px; }
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.chat-title { font-family: var(--ui); font-weight: 800; font-size: 12px; letter-spacing: 0.16em; color: var(--ink); }
.chat-online { display: inline-flex; align-items: center; gap: 6px; font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.chat-online .wdot { width: 6px; height: 6px; border-radius: 50%; background: var(--extract); box-shadow: 0 0 7px rgba(32,208,138,0.8); }
.chat-online b { color: var(--ink-mid); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chat-x { margin-left: auto; width: 26px; height: 26px; border: 0; background: none; color: var(--ink-dim); font-size: 18px; line-height: 1; cursor: pointer; border-radius: 7px; }
.chat-x:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.chat-list { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 7px; scrollbar-width: thin; scrollbar-color: var(--card-2) transparent; }
.chat-row { font-family: var(--ui); font-size: 12.5px; line-height: 1.45; animation: rowin 0.22s ease; }
.chat-name { color: var(--cobalt-hi); font-weight: 600; margin-right: 6px; }
.chat-body { color: var(--ink); overflow-wrap: anywhere; }
.chat-sys { font-family: var(--mono); font-size: 11px; color: var(--ink-dim); letter-spacing: 0.01em; padding: 2px 0; }
.chat-sys.sys-win .chat-sys-body { color: var(--extract); }
.chat-sys.sys-gold .chat-sys-body { color: var(--gold); }
.chat-sys.sys-dim .chat-sys-body { color: var(--ink-dim); }
.chat-composer { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-input { flex: 1; height: 38px; padding: 0 12px; border-radius: var(--r-control); background: var(--void); border: 1px solid var(--line-2); color: var(--ink); font-family: var(--ui); font-size: 13px; outline: 0; transition: border-color 0.14s; }
.chat-input:focus { border-color: var(--cobalt); }
.chat-send { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--cobalt-hi); border-radius: var(--r-control); color: #fff; background: linear-gradient(180deg, var(--cobalt-steel), var(--cobalt)); cursor: pointer; }
.chat-send:hover { background: linear-gradient(180deg, var(--cobalt-hi), var(--cobalt-steel)); }
.chat-locked { width: 100%; height: 38px; border: 1px dashed var(--line-2); border-radius: var(--r-control); background: none; color: var(--ink-dim); font-family: var(--ui); font-size: 11.5px; cursor: default; }
/* MOBILE: handle becomes a bottom-right pill; panel becomes a bottom sheet */
@media (max-width: 1100px) {
  .chat-handle { top: auto; bottom: calc(16px + env(safe-area-inset-bottom)); right: 14px; transform: none;
    flex-direction: row; width: auto; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: var(--r-pill); }
  .chat-handle-label { writing-mode: horizontal-tb; font-size: 11px; }
  .chat-panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; height: 72svh;
    border-left: 0; border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0;
    transform: translateY(100%); }
  .chat-panel.open { transform: translateY(0); }
}

/* ============================== EXPLORE PAGE ============================== */
.explore { max-width: 1040px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 32px) 60px; }
.xp-hero { margin-bottom: 28px; }
.xp-availability { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.xp-availability h2 { margin: 0 0 5px; font-size: 16px; color: var(--ink); }
.xp-availability p { margin: 0; font-size: 13px; color: var(--ink-mid); }
.xp-availability > a { flex-shrink: 0; }
@media (max-width: 620px) { .xp-availability { align-items: flex-start; flex-direction: column; } }
.xp-hero h1 { font-family: var(--ui); font-weight: 800; letter-spacing: -0.03em; font-size: clamp(32px, 6vw, 56px); color: var(--ink); margin: 6px 0 10px; }
.xp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 26px; }
.xp-stat { display: flex; flex-direction: column; gap: 5px; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--crust); }
.xp-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.xp-v { font-family: var(--mono); font-size: var(--num-s); color: var(--ink-dim); }
.xp-v b { color: var(--ink); font-weight: var(--num-w); font-size: var(--num-l); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -0.01em; }

/* THE SEAM hero: always-on Motherlode pot + the 70/20/10 release split (real on-chain) */
.xp-seam { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr); gap: 14px; margin-bottom: 26px; }
.seam-ml, .seam-split { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--crust); display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.seam-ml { background: linear-gradient(180deg, rgba(255, 194, 77, 0.06), transparent); border-color: rgba(255, 194, 77, 0.22); }
.seam-ml-k, .seam-split-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; }
.seam-ml-k { color: var(--gold); }
.seam-split-k { color: var(--ink-dim); }
.seam-ml-v { font-family: var(--mono); }
.seam-ml-v b { color: var(--gold); font-weight: var(--num-w); font-size: 30px; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -0.01em; }
.seam-ml-v span { color: var(--ink-dim); font-size: 12px; }
.seam-ml-sub { font-family: var(--ui); font-size: 11px; line-height: 1.45; color: var(--ink-dim); }
.seam-bar { display: flex; height: 12px; gap: 2px; }
.seam-bar .seg { display: block; height: 100%; border-radius: 2px; }
.seam-bar .s-tail { background: var(--ink-mid); }
.seam-bar .s-vein { background: var(--cobalt-hi); }
.seam-bar .s-ml { background: var(--gold); }
.seam-legend { display: flex; flex-wrap: wrap; gap: 5px 16px; font-family: var(--ui); font-size: 11px; color: var(--ink-mid); }
.seam-legend span { display: inline-flex; align-items: center; gap: 6px; }
.seam-legend b { font-family: var(--mono); color: var(--ink); font-weight: var(--num-w); }
.seam-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.seam-legend i.s-tail { background: var(--ink-mid); }
.seam-legend i.s-vein { background: var(--cobalt-hi); }
.seam-legend i.s-ml { background: var(--gold); }
@media (max-width: 640px) { .xp-seam { grid-template-columns: 1fr; } }

.xp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; }
.xp-tab { padding: 11px 18px; font-family: var(--ui); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; color: var(--ink-dim); border-bottom: 2px solid transparent; transition: color 0.14s, border-color 0.14s; }
.xp-tab:hover { color: var(--ink-mid); }
.xp-tab.on { color: var(--ink); border-bottom-color: var(--cobalt-hi); }
.xp-panel { padding-top: 18px; }
.xp-subtabs { display: flex; gap: 6px; margin-bottom: 12px; }
.xp-sub { padding: 6px 13px; border-radius: var(--r-pill); border: 1px solid var(--line); background: rgba(150,180,235,0.04); font-family: var(--ui); font-weight: 600; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim); transition: all 0.13s; }
.xp-sub:hover { color: var(--cobalt-hi); border-color: var(--line-2); }
.xp-sub.on { color: var(--ink); border-color: var(--cobalt); background: rgba(62,107,168,0.16); }
.xp-note { font-family: var(--ui); font-size: 12.5px; line-height: 1.55; color: var(--ink-mid); max-width: 70ch; margin-bottom: 14px; }
.xp-table { display: flex; flex-direction: column; gap: 5px; }
.xp-row { display: grid; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--crust); font-family: var(--mono); font-size: 12.5px; color: var(--ink-mid); transition: border-color 0.13s, background 0.13s; }
.xp-round { grid-template-columns: 0.7fr 0.8fr 1.4fr 1fr; }
.xp-round:hover { border-color: var(--cobalt-steel); background: rgba(62,107,168,0.08); }
.xp-lb { grid-template-columns: 44px 1fr auto; }
.xp-lb.is-top { border-color: rgba(255,194,77,0.34); }
.xp-rank { font-family: var(--mono); font-weight: 700; color: var(--ink-dim); text-align: center; }
.xp-lb.is-top .xp-rank { color: var(--gold); }
.xp-mult { font-variant-numeric: tabular-nums slashed-zero; font-weight: 600; }
.xp-c4 b, .xp-v b { font-variant-numeric: tabular-nums slashed-zero; }
.xp-hash { color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; }
.xp-addr { color: var(--cobalt-hi); }
.xp-addr:hover { color: var(--ink); }
.xp-round.t-mid .xp-mult { color: var(--ember-hi); }
.xp-round.t-high .xp-mult, .xp-lb.t-high .xp-mult { color: var(--gold); }
.xp-round.t-ml .xp-mult, .xp-lb.t-ml .xp-mult { color: var(--gold); }
.xp-round.t-ml { border-color: rgba(255,194,77,0.4); background: rgba(255,194,77,0.06); }
.xp-round.t-bust { opacity: 0.62; }
.xp-empty { padding: 22px 16px; font-family: var(--ui); font-size: 13px; line-height: 1.6; color: var(--ink-dim); border: 1px dashed var(--line); border-radius: var(--r-control); }
/* protocol headline above the stat strip: one plain-English line, real bores count in mono */
.xp-headline { font-family: var(--ui); font-size: 15px; line-height: 1.6; color: var(--ink-mid); margin: 0 0 22px; }
.xp-headline b { font-family: var(--mono); color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; font-weight: 700; }
/* live buyback-burn rows: burned $DRILL reads in ember (the incinerate theme; not green/red/gold) */
.xp-buyback { grid-template-columns: 1.2fr 0.9fr 1.1fr 0.9fr; }
.xp-buyback:hover { border-color: var(--ember); background: rgba(255,129,36,0.06); }
.xp-buyback .xp-c3 { color: var(--ember-hi); }
.xp-buyback-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 12px; font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.xp-buyback-head b { font-family: var(--mono); color: var(--ember-hi); font-variant-numeric: tabular-nums slashed-zero; }
.xp-revcard { padding: 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--crust); margin-bottom: 10px; }
.xp-rev-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.xp-rev-v { font-family: var(--mono); font-size: 20px; color: var(--ink); margin: 6px 0 8px; font-variant-numeric: tabular-nums slashed-zero; }
.xp-rev-v b { color: var(--cobalt-hi); }
.xp-rev-sub { font-family: var(--ui); font-size: 12.5px; line-height: 1.55; color: var(--ink-mid); max-width: 64ch; }
.xp-foot { margin-top: 24px; font-family: var(--mono); font-size: 11px; color: var(--ink-dim); letter-spacing: 0.04em; }
@media (max-width: 620px) {
  .xp-round { grid-template-columns: 0.6fr 0.7fr 1fr; }
  .xp-round .xp-c4 { display: none; }
}

/* on-chain proof bar (token page): clickable Solana-explorer links, machined cobalt */
.proof-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 18px; }
.proof-link {
  display: flex; flex-direction: column; gap: 5px; padding: 13px 15px;
  border: 1px solid var(--line-2); border-radius: var(--r-control); background: var(--card);
  transition: border-color 0.14s, background 0.14s, transform 0.1s;
}
.proof-link:hover { border-color: var(--cobalt); background: rgba(62, 107, 168, 0.10); transform: translateY(-1px); }
.proof-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.proof-v { font-family: var(--mono); font-size: 13px; color: var(--cobalt-hi); font-variant-numeric: tabular-nums; }

/* ---------- toasts ---------- */

.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  font-family: var(--mono); font-size: 11px;
  padding: 11px 16px; max-width: 320px;
  background: var(--card-2); border: 1px solid var(--line-2);
  border-left: 3px solid var(--cobalt);
  color: var(--ink-mid);
  opacity: 0; transform: translateX(20px);
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast.show { opacity: 1; transform: none; }
.toast.warn { border-left-color: var(--ember); }
.toast.gold { border-left-color: var(--gold); color: var(--gold); }

/* ---------- manual & fairness pages ---------- */

.doc {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 250px 1fr; gap: 40px;
  max-width: 1180px; margin: 0 auto; padding: 38px 22px 80px;
  align-items: start;
}
.toc {
  position: sticky; top: 24px;
  display: flex; flex-direction: column; gap: 2px;
  border-left: 1px solid var(--line);
}
.toc-title {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.12em;
  color: var(--ink-dim); padding: 0 0 10px 16px;
}
.toc a {
  font-family: var(--mono); font-size: 11px; color: var(--ink-dim);
  padding: 7px 16px; border-left: 2px solid transparent; margin-left: -1px;
  transition: all 0.15s;
}
.toc a:hover, .toc a.on { color: var(--cobalt-hi); border-left-color: var(--cobalt); background: rgba(62, 107, 168, 0.12); }

.doc-body { min-width: 0; }
.doc-hero { margin-bottom: 46px; }
.doc-kicker {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--cobalt-hi); margin-bottom: 14px;
}
.doc-hero h1 {
  font-family: var(--ui); font-size: clamp(28px, 4.5vw, 44px);
  letter-spacing: -0.015em; line-height: 1.12; font-weight: 700;
}
.doc-hero h1 em { font-style: normal; color: var(--cobalt-hi); }
.doc-lede { margin-top: 16px; font-size: 15.5px; font-weight: 300; color: var(--ink-mid); max-width: 60ch; line-height: 1.65; }

.chapter { margin: 54px 0; scroll-margin-top: 24px; }
.ch-no {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-dim); margin-bottom: 8px;
}
.ch-no b { color: var(--cobalt-hi); }
.chapter h2 {
  font-family: var(--ui); font-size: 21px; letter-spacing: -0.01em;
  font-weight: 700; margin-bottom: 14px;
}
.chapter p { color: var(--ink-mid); font-weight: 300; line-height: 1.7; font-size: 14.5px; max-width: 64ch; margin-bottom: 12px; }
.chapter p b, .chapter li b { color: var(--ink); font-weight: 500; }
.chapter ul { margin: 0 0 12px 18px; color: var(--ink-mid); font-weight: 300; font-size: 14.5px; line-height: 1.7; max-width: 62ch; }
.chapter li { margin-bottom: 6px; }
.chapter code { font-size: 12.5px; color: var(--cobalt-hi); background: var(--card); padding: 1px 6px; border: 1px solid var(--line); }

.callout {
  border: 1px solid var(--line-2); border-left: 3px solid var(--cobalt);
  background: var(--card); padding: 14px 18px; margin: 16px 0;
  font-size: 13.5px; color: var(--ink-mid); font-weight: 300; line-height: 1.65; max-width: 64ch;
}
.callout.gold { border-left-color: var(--gold); }
.callout.ember { border-left-color: var(--ember); }

.spec-table { width: 100%; max-width: 560px; border-collapse: collapse; margin: 16px 0; }
.spec-table th, .spec-table td {
  font-family: var(--mono); font-size: 11.5px; text-align: left;
  padding: 9px 12px; border: 1px solid var(--line);
}
.spec-table th { color: var(--ink-dim); letter-spacing: 0.12em; font-weight: 500; background: var(--card); font-size: 9.5px; }
.spec-table td { color: var(--ink-mid); }
.spec-table td b { color: var(--cobalt-hi); }
.spec-table td.gold { color: var(--gold); }

.fact-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; margin: 18px 0; max-width: 720px;
}
.fact {
  border: 1px solid var(--line); background: var(--card);
  border-radius: var(--r); padding: 14px;
}
.fact-eyebrow { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--cobalt-hi); font-variant-numeric: tabular-nums slashed-zero; }
.fact-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--ink-dim); margin-top: 6px; line-height: 1.5; }

.hash-input {
  width: 100%; max-width: 560px;
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  font-variant-numeric: tabular-nums slashed-zero;
  background: var(--void); border: 1px solid var(--line-2);
  padding: 11px 14px; outline: none; border-radius: var(--r-control);
}
.hash-input:focus { border-color: var(--cobalt); }

/* WCAG 2.4.7: a visible keyboard-focus ring on every interactive control. :focus-visible keeps mouse
   clicks clean; !important overrides the outline:0 / outline:none suppressions used for styling. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, [role="button"]:focus-visible, .chip:focus-visible, .amt:focus-visible,
.tab:focus-visible, .action:focus-visible, .subtab:focus-visible {
  outline: 2px solid var(--cobalt-hi, #5db0ff) !important;
  outline-offset: 2px;
}

/* ONE shared disabled state for every control (was scattered across .faucet-btn[disabled],
   .action:disabled, body.is-loading .action). Consistent dimming + no pointer, anywhere. */
.connect-btn[disabled], .ghost-btn[disabled], .btn-primary[disabled], .chip[disabled],
.action:disabled, .lp-btn[disabled], button[disabled] {
  opacity: 0.5; cursor: default; box-shadow: none; filter: saturate(0.85);
}

/* Session net P&L coloring (shown in the feed footer beside W/L and BEST — no scene space taken). */
.pnl-net.up b { color: #46d39a; }
.pnl-net.down b { color: var(--ink-mid); }   /* one-red law: a persistent session-down stat is muted, not red (red = the live collapse flash only) */
.verify-out {
  font-family: var(--mono); font-size: 13px; margin-top: 14px;
  padding: 14px 18px; border: 1px solid var(--line); background: var(--card);
  max-width: 560px; color: var(--ink-mid); line-height: 1.8;
  word-break: break-all; border-radius: var(--r-panel);
}
.verify-out b { color: var(--extract); font-size: 17px; }
/* shareable proof CARD: the verified result laid out to screenshot. is-ok green, is-bad red (collapse
   colour is reserved, but a fairness MISMATCH is a genuine failure, so red is correct here). */
.proof-card { border: 1px solid var(--line-2); border-radius: var(--r-panel); background: linear-gradient(180deg, var(--card), var(--panel)); padding: 20px 22px; max-width: 460px; font-family: var(--ui); }
.proof-card.is-ok { border-color: rgba(32,208,138,0.42); }
.proof-card.is-bad { border-color: var(--danger); }
.pc-head { display: flex; justify-content: space-between; align-items: center; }
.pc-tag { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); }
.pc-block { font-family: var(--mono); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.pc-mult { font-family: var(--mono); font-weight: 800; font-size: clamp(40px, 8vw, 58px); line-height: 1.05; margin: 10px 0 2px; font-variant-numeric: tabular-nums slashed-zero; background: linear-gradient(180deg, #fff3e0, #ffb454 52%, #ff7a18); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.pc-verdict { font-family: var(--ui); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.proof-card.is-ok .pc-verdict { color: var(--extract); }
.proof-card.is-bad .pc-verdict { color: var(--danger); }
.pc-rows { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pc-rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--ink-mid); }
.pc-rows b { font-family: var(--mono); color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; font-weight: 600; }
.pc-rows b.pc-dim { color: var(--ink-dim); font-weight: 400; }
.pc-foot { font-size: 10.5px; color: var(--ink-dim); margin-top: 10px; line-height: 1.5; }
.pc-actions { display: flex; gap: 8px; margin-top: 14px; }
.pc-btn { font-family: var(--ui); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); padding: 9px 16px; border: 1px solid var(--cobalt); border-radius: var(--r-control); background: linear-gradient(180deg, rgba(62,107,168,0.32), rgba(62,107,168,0.1)); cursor: pointer; }
.pc-btn:hover { border-color: var(--cobalt-hi, #5db0ff); }
.btn-primary {
  font-family: var(--ui); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.08em;
  color: var(--ink); padding: 12px 26px; margin-top: 12px;
  border: 1px solid var(--cobalt); border-radius: var(--r-control);
  background: linear-gradient(180deg, rgba(62, 107, 168, 0.32), rgba(62, 107, 168, 0.1));
  transition: all 0.16s;
}
.btn-primary:hover { box-shadow: 0 0 22px rgba(62, 107, 168, 0.3); border-color: var(--cobalt-hi); }

/* ---------- FAQ accordion (faq.html) ---------- */
.faq-group { margin: 0 0 36px; }
.faq-cat {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); padding: 0 0 11px; margin-bottom: 2px; border-bottom: 1px solid var(--line-2);
}
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px;
  padding: 17px 2px; font-family: var(--ui); font-weight: 600; font-size: 15.5px;
  color: var(--ink); transition: color 0.15s; user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--cobalt-hi); }
.faq-item summary:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; border-radius: 3px; }
.faq-pm {
  margin-left: auto; flex: 0 0 auto; font-family: var(--mono); font-size: 19px; font-weight: 300;
  line-height: 1; color: var(--ink-dim); transition: transform 0.22s ease, color 0.15s;
}
.faq-item[open] > summary { color: var(--cobalt-hi); }
.faq-item[open] .faq-pm { transform: rotate(45deg); color: var(--cobalt-hi); }   /* + reads as × when open */
.faq-a { padding: 0 30px 20px 2px; }
.faq-a p {
  color: var(--ink-mid); font-weight: 300; font-size: 14.5px; line-height: 1.72;
  max-width: 66ch; margin: 0;
}
.faq-a p b { color: var(--ink); font-weight: 500; }
.faq-a a { color: var(--cobalt-hi); border-bottom: 1px dashed var(--line-2); padding-bottom: 1px; }
.faq-a a:hover { color: var(--ink); border-bottom-color: var(--cobalt-hi); }
@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: faqReveal 0.2s ease both; }
}
@keyframes faqReveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- rig header CLS, funds, idle-waiting, touch ---------- */
/* Reserve the header value-cell widths so the "…"/0 -> real-value swap can't reflow the right-anchored
   header (tabular-nums alone does not equalize the 1-glyph "…" against "2.02"). */
#bankrollVal { display: inline-block; min-width: 4.4ch; text-align: right; }
#coreBal { display: inline-block; min-width: 3.4ch; text-align: right; }
.wchip-bal b { display: inline-block; min-width: 3.4ch; text-align: right; }
/* card / Apple Pay on-ramp button (reuses .connect-btn sizing) */
.fund-btn { color: var(--ink); border-color: var(--cobalt); background: rgba(62, 107, 168, 0.18); }
.fund-btn:hover { color: var(--ink); border-color: var(--cobalt-hi); background: rgba(62, 107, 168, 0.32); }
/* reachable-but-no-round idle state: park the deploy action (no open block to deploy into) */
body[data-waiting="1"] .action { opacity: 0.55; pointer-events: none; }
/* kill double-tap-zoom delay on rapid-fire money controls + the one-thumb extract scene */
button, .chip, .action, .tab, a, summary, .scene-wrap, label.switch { touch-action: manipulation; }

/* ---------- login popup: wallet picker (Wallet-Standard) + email/social (Privy), one sheet ---------- */
.login-sheet { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 14, 0.74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
.login-card { position: relative; width: 100%; max-width: 350px; background: linear-gradient(180deg, #141c28, #0b111b);
  border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 20px 18px; box-shadow: 0 30px 80px -24px rgba(0,0,0,0.92); }
.login-x { position: absolute; top: 12px; right: 13px; width: 28px; height: 28px; border: 0; background: none;
  color: var(--ink-dim); font-size: 19px; line-height: 1; cursor: pointer; border-radius: 8px; transition: color 0.14s, background 0.14s; }
.login-x:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.login-h { font-family: var(--ui); font-weight: 700; font-size: 16px; color: var(--ink); margin: 0 0 4px; letter-spacing: 0.01em; }
.login-sub { font-family: var(--ui); font-size: 12px; color: var(--ink-dim); margin: 0 0 16px; }
.login-wallets { display: flex; flex-direction: column; gap: 7px; }
.login-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 14px; height: 52px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.025);
  color: var(--ink); font-family: var(--ui); font-weight: 500; font-size: 14.5px; letter-spacing: 0.005em; cursor: pointer; transition: border-color 0.14s, background 0.14s, transform 0.1s; text-align: left; }
.login-opt:hover { border-color: var(--cobalt-steel); background: rgba(62,107,168,0.12); }
.login-opt:active { transform: scale(0.99); }
.login-opt span:last-child { flex: 1; }
.login-opt .lo-ico { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 auto; color: var(--ink-mid); }
.login-opt .lo-ico img { width: 26px; height: 26px; border-radius: 7px; display: block; }
/* neutral placeholder for a wallet with no icon (NOT a blue gradient — that read as a fake logo bg) */
.login-wallet .lo-ico:empty { width: 26px; height: 26px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line-2); }
.login-or { display: flex; align-items: center; gap: 12px; margin: 14px 2px; color: var(--ink-dim);
  font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-none { color: var(--ink-mid); font-size: 13px; line-height: 1.55; padding: 4px 2px 10px; }

/* social row: Google + Apple side by side, centered icon+label (not the left-aligned wallet rows) */
.login-social { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.login-soc { justify-content: center; gap: 8px; height: 46px; padding: 0 10px; }
.login-soc span:last-child { flex: 0 0 auto; }
.login-soc .lo-ico { width: 18px; height: 18px; }
/* inline email / code forms (no separate Privy modal) */
.login-emailform, .login-codeform { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.login-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; background: var(--void);
  border: 1px solid var(--line-2); color: var(--ink); font-family: var(--ui); font-size: 14.5px; outline: 0; transition: border-color 0.14s; }
.login-input::placeholder { color: var(--ink-dim); }
.login-input:focus { border-color: var(--cobalt); }
#loginCodeInput { text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0.4em; font-size: 18px; }
.login-go { justify-content: center; height: 46px; border-color: var(--cobalt); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11.5px;
  background: linear-gradient(180deg, rgba(62,107,168,0.40), rgba(62,107,168,0.14)); }
.login-go:hover { border-color: var(--cobalt-hi); background: rgba(62,107,168,0.22); }
.login-code-note { font-family: var(--ui); font-size: 11.5px; color: var(--ink-mid); line-height: 1.5; margin: 2px 2px 0; }
.login-foot { font-family: var(--ui); font-size: 10px; color: var(--ink-dim); line-height: 1.55; margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) { .login-card { animation: loginIn 0.18s ease both; } }
@keyframes loginIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .feed { position: static; min-height: 0; max-height: 380px; order: 2; }
  .stage { order: 1; }
  .doc { grid-template-columns: 1fr; gap: 20px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; border-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
  .toc-title { display: none; }
  .toc a { border-left: 0; border-bottom: 2px solid transparent; padding: 6px 10px; }
  .toc a:hover, .toc a.on { border-bottom-color: var(--cobalt); }
}

@media (max-width: 760px) {
  /* ONE-ROW header: logo · balance · hamburger. Everything else → drawer. */
  .top { gap: 8px; padding: 8px 12px; flex-wrap: nowrap; }   /* stays sticky (top:0) from the base rule */
  .brand { margin-right: auto; }                          /* push brand left, the whole right group (bal/cta/hamburger) right, on EVERY page */
  .brand-word { font-size: 13px; }
  .brand .demo-badge { display: none; }                   /* save room; demo is disclosed in footer/manual */
  .bal-mini:not([hidden]) { display: inline-flex; align-items: center;
    font-family: var(--ui); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-dim); text-transform: uppercase; }
  .bal-mini b { color: var(--ink); font-weight: 700; font-size: 15px; font-family: var(--mono); font-variant-numeric: tabular-nums slashed-zero; margin-right: 4px; }
  .mobile-cta:not([hidden]) { display: inline-flex; align-items: center; height: var(--ctl-h);
    margin-left: 8px; padding: 0 14px; border-radius: var(--r-pill);
    font-family: var(--ui); font-weight: 800; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    color: #140A06; border: 1px solid var(--ember); background: linear-gradient(180deg, var(--ember-hi), var(--ember)); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center;
    width: var(--ctl-h); height: var(--ctl-h); border: 1px solid var(--line); border-radius: var(--r-pill);
    color: var(--ink-mid); background: var(--card); }
  .bar-collapse {                                  /* drawer, closed by default */
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
    flex-direction: column; gap: 9px; padding: 12px 14px 14px;
    background: linear-gradient(180deg, #141b28, #0c1320); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 44px -14px rgba(0,0,0,0.92);
  }
  .top.menu-open .bar-collapse { display: flex; }
  .bar-collapse .nav { display: flex; gap: 6px; width: 100%; justify-content: center; flex-wrap: wrap; }
  .bar-collapse .top-right { flex-direction: column; align-items: stretch; gap: 8px; margin-left: 0; }
  .bar-collapse .pill { justify-content: space-between; font-size: 10px; height: 30px; }
  .bar-collapse .wallet { justify-content: space-between; height: auto; padding: 7px 12px; }

  .layout { padding: 10px 10px 0; gap: 10px; }
  /* svh (not vh) so the iOS URL bar can't rescale the rig; raised floor (fixes the "game got very low") */
  .scene-wrap { height: 44vh; height: 44svh; min-height: 300px; }
  .phase-label { top: 8px; }
  /* Keep the active cashout button within easy reach over the lower scene. */
  body.is-running .hud-extract.on {
    display: block; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
    z-index: 6; padding: 11px 22px; border-radius: var(--r-pill); white-space: nowrap;
    font-family: var(--ui); font-weight: 800; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
    color: #08130d; border: 1px solid var(--extract);
    background: linear-gradient(180deg, #34e6a6, var(--extract));
    box-shadow: 0 8px 26px -8px rgba(32, 208, 138, 0.7);
  }
  /* readout: allow a wider panel; clamp the hero so it never overruns the short scene */
  .mult-wrap { max-width: 92cqw; padding: 10px 18px 12px; }
  .mult-row { font-size: clamp(58px, 19vw, 96px); }
  #panelB { display: none; }                              /* single bet on a phone */
  .panels { grid-template-columns: 1fr; }
  /* tighten the bet panel so the DRILL button stays in the thumb zone, no scroll */
  .panel { padding: 8px 11px 10px; gap: 5px; }
  .amt-row, .quick-row { gap: 5px; }
  .amt { font-size: 16px; padding: 6px 0; }                 /* 16px: iOS never force-zooms on focus */
  .autox-val { font-size: 16px; }
  .chip { padding: 6px; min-height: 44px; }                 /* 44px money-control floor */
  .adv > .adv-sum { padding: 8px 2px; min-height: 40px; }
  .action { padding: 14px 10px; min-height: 48px; }
  .menu-btn { width: 44px; height: 44px; }
  .tab { min-height: 44px; }
  /* WCAG 2.5.5 touch targets: nav + table-of-contents links reach 44px tall on phones */
  .nav a, .toc a, .bar-collapse .nav a, .foot-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .wchip-x { min-width: 40px; }
  .ghost-btn.sound, .faucet-mini { min-height: 40px; }
  .feed { max-height: 26vh; max-height: 26svh; }
  /* Hide the footer on mobile ONLY on the rig (it needs the vertical space); content pages keep their
     compact footer + trust/devnet disclaimers. Was a global hide that dropped disclaimers everywhere. */
  body:has(.layout) .foot { display: none; }
  /* mobile add-funds chip in the one-row header (ember, like the login CTA) */
  .fund-cta:not([hidden]) { display: inline-flex; align-items: center; height: var(--ctl-h); min-height: 40px;
    margin-left: 8px; padding: 0 13px; border-radius: var(--r-pill);
    font-family: var(--ui); font-weight: 800; font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase;
    color: #140A06; border: 1px solid var(--ember); background: linear-gradient(180deg, var(--ember-hi), var(--ember)); }
  /* safe-area: keep the header and the load-bearing toasts clear of the notch + home indicator */
  .top { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .toasts { bottom: calc(22px + env(safe-area-inset-bottom)); right: calc(14px + env(safe-area-inset-right)); left: max(10px, env(safe-area-inset-left)); }
  .bar-collapse { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  /* compact collapse card on mobile */
  .stamp { padding: 10px 20px 12px; max-width: 82%; }
  .stamp-mult { font-size: 36px; }
  .stamp-title { font-size: 11px; }

  /* CONTENT PAGES (no drawer): the header + its nav wrap so all links stay reachable, never clipped.
     Scoped to a .top whose .nav is a DIRECT child (content pages); play.html's nav lives in
     .bar-collapse, so the rig header is untouched. */
  .top:has(> .nav) { flex-wrap: wrap; row-gap: 4px; }
  .top > .nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; gap: 7px 14px; margin-top: 2px; }
  .top > .nav a { padding: 4px 2px; }

  /* DOC PAGES: lift the smallest copy/data off the squint floor and stop long mono tokens (SHA
     formulas, hashes) from clipping under body overflow-x:hidden. No-ops on the rig (no .doc there). */
  .chapter p, .chapter ul, .chapter li, .faq-a p, .callout { font-size: 15px; }
  .spec-table th { font-size: 10.5px; }
  .spec-table td { font-size: 12.5px; }
  .fact-label { font-size: 11px; }
  .chapter code, .callout code, .faq-a code, .spec-table code, .verify-out, .hash-input { overflow-wrap: anywhere; word-break: break-word; }
  .doc { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
}

/* landscape phone (very short viewport): shrink the scene so the bet panel + DRILL/EXTRACT action
   stay on-screen instead of below the fold */
@media (max-width: 940px) and (orientation: landscape) and (max-height: 560px) {
  .scene-wrap { height: 42svh; min-height: 170px; }
  .layout { padding: 8px 8px 0; gap: 8px; }
  .panel { padding: 7px 10px 9px; gap: 4px; }
  .mult-row { font-size: clamp(44px, 12vh, 84px); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-noise { animation: none; }
  .action.is-live, body.is-motherlode .pill-gold { animation: none; }
}

/* ---- fit the game to the viewport on desktop (no page scroll, adapts to any height) ---- */
@media (min-width: 1101px) {
  body:has(.layout) { min-height: 100vh; height: auto; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; }
  body:has(.layout) .layout { flex: 1 0 auto; min-height: calc(100vh - 130px); height: auto; align-items: stretch; }
  body:has(.layout) .foot { flex: 0 0 auto; margin-top: 0; padding-top: 10px; padding-bottom: 10px; }
  body:has(.layout) .feed { min-height: 0; max-height: none; height: auto; position: static; }
  body:has(.layout) .feed-list { flex: 1 1 auto; min-height: 0; }
  body:has(.layout) .stage { min-height: 0; height: auto; }
  body:has(.layout) .scene-wrap { flex: none; height: clamp(220px, 28vh, 360px); min-height: 220px; }
  body:has(.layout) .play-rule { display: none; }  /* the height-fit desktop has the onboarding; keep the rig fitted */
}

/* --- redesign polish --- */
.feed, .panel, .scene-wrap { box-shadow: var(--shadow); }
.action { transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.action:hover { transform: translateY(-1px); }
.chip { transition: all .12s ease; } .chip:hover { transform: translateY(-1px); }

/* tiering: ambient header cells recede behind the wallet balance */
.top-right .pill { color: var(--ink-dim); }
.top-right .pill b { color: var(--ink); }

/* auto-extract: clear armed vs idle state, visually bound to its toggle */
.autox-box { opacity: 0.5; transition: opacity .15s, border-color .15s, box-shadow .15s; }
.auto-row .switch:has(.autox-toggle:checked) ~ .autox-box {
  opacity: 1; border-color: var(--cobalt); box-shadow: 0 0 10px rgba(62, 107, 168, 0.3);
}

/* crash juice - the break is inflicted, not reported */
@keyframes scshake {
  0%,100%{transform:translate(0,0)} 12%{transform:translate(-4px,3px)} 24%{transform:translate(5px,-3px)}
  38%{transform:translate(-5px,2px)} 52%{transform:translate(4px,3px)} 68%{transform:translate(-3px,-2px)} 84%{transform:translate(2px,1px)}
}
body.is-crashed .scene-wrap { animation: scshake 0.5s cubic-bezier(.36,.07,.19,.97) both; }

/* danger zone - rising visual pressure as the multiplier climbs (synced to depth).
   one-red law: NO siren-red during the climb. Pressure reads as a WHITE-HOT heat shimmer
   (the seam running hotter) plus a faint shake; red is reserved for the actual collapse.
   PERF: this used to animate `background` on the fullscreen body::after (a per-frame
   full-viewport repaint, ~2-3x/sec, composited over two live canvases). It now lives on a
   dedicated fixed overlay (body::before) carrying a STATIC radial-gradient at the pulse-peak
   intensity, and we crossfade only `opacity` (compositor-only, no paint). Same felt pulse. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0; will-change: opacity;
  background: radial-gradient(ellipse at 50% 70%, rgba(255,247,224,0) 26%, rgba(255,247,224,0.20) 100%);
}
body.is-danger::before { animation: dangerpulse 0.5s ease-in-out infinite; }
@keyframes dangerpulse {
  0%,100% { opacity: 0.30; }
  50%     { opacity: 1; }
}
/* the danger ramp tightens at the magma/core zones - last-second pressure before collapse */
body.is-danger[data-zone="magma"]::before { animation-duration: 0.4s; }
body.is-danger[data-zone="core"]::before  { animation-duration: 0.3s; }
@media (prefers-reduced-motion: reduce) { body.is-danger::before { animation: none; opacity: 0.5; } }
/* a slight shake on the deck as the heat shimmer peaks (the rig straining, not bleeding).
   excluded on collapse so the harder scshake flash always wins. */
body.is-danger:not(.is-crashed) .scene-wrap { animation: heatshimmer 0.9s ease-in-out infinite; }
@keyframes heatshimmer {
  0%,100% { transform: translate(0, 0); } 25% { transform: translate(0.5px, -0.5px); }
  50% { transform: translate(-0.5px, 0.5px); } 75% { transform: translate(0.5px, 0.5px); }
}
@media (prefers-reduced-motion: reduce) { body.is-danger:not(.is-crashed) .scene-wrap { animation: none; } }

/* ── RECEDE EVERYTHING ON A HOT RUN ─────────────────────────────────────────────
   On a live run the only two loud objects are the white-hot number and the green
   EXTRACT pole. Push the chrome, feed, pills, and corner furniture back so the heat
   is the sole warm, loud thing on screen. */
body.is-running .feed,
body.is-running .top-right .pill,
body.is-running .scene-meta,
body.is-running .panel-tag,
body.is-running .panel-sub {
  opacity: 0.66; transition: opacity 0.4s ease;
}
body.is-running.is-danger .feed,
body.is-running.is-danger .top-right .pill,
body.is-running.is-danger .scene-meta {
  opacity: 0.5;
}
/* the phase-label recedes too so the hero owns the canvas mid-run */
body.is-running .phase-label { opacity: 0.78; }
body.is-running.is-danger .phase-label { opacity: 0.6; }
/* but the live EXTRACT action and the over-canvas extract echo stay full-bright */
body.is-running .action.is-live,
body.is-running .hud-extract { opacity: 1 !important; }

/* progressive disclosure - new user sees stake + DRILL; automation is opt-in */
.adv { margin: 2px 0 0; }
.adv > .adv-sum {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 6px;
  font: 600 10px/1 var(--ui); letter-spacing: 0.12em; color: var(--ink-dim);
  padding: 6px 2px; transition: color .15s;
}
.adv > .adv-sum::-webkit-details-marker { display: none; }
.adv > .adv-sum::before { content: "\25B8"; font-size: 9px; color: var(--ink-dim); transition: transform .15s; }
.adv[open] > .adv-sum::before { transform: rotate(90deg); }
.adv > .adv-sum:hover { color: var(--ink-mid); }
.adv .auto-row { margin-top: 6px; }
/* armed state stays visible even when the disclosure is collapsed */
.adv:has(.autox-toggle:checked) > .adv-sum::after,
.adv:has(.autodrill-toggle:checked) > .adv-sum::after {
  content: "ARMED"; margin-left: auto;
  font: 700 8.5px/1 var(--ui); letter-spacing: 0.1em;
  color: var(--cobalt-hi); padding: 3px 6px; border-radius: var(--r-pill);
  background: rgba(62, 107, 168, 0.14);
}

/* pumpjack rig - SVG asset seated on the surface line; positioned by pumpjack.js */
.rig { position: absolute; z-index: 1; pointer-events: none; }
.rig svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ============================================================================
   JURY DOPAMINE OVERHAUL  -  branch: staging/dopamine-overhaul
   Additive layer only. No game logic / payouts / RNG / provably-fair touched.
   M2 strata zones · M3 magnetic EXTRACT + phase-gated cockpit · M5 burial ·
   M6 FOMO feed + streak + ambient trust.
   ============================================================================ */

/* --- M2 · depth-driven strata tint: charcoal → iron → blood-orange → white-hot --- */
.strata-tint {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0; mix-blend-mode: screen;
  transition: opacity .5s ease, background .8s ease;
  background: radial-gradient(ellipse 120% 80% at 50% 100%, rgba(70,80,95,0), transparent 70%);
}
body[data-zone="topsoil"] .strata-tint { opacity: .32; background: radial-gradient(ellipse 120% 85% at 50% 100%, rgba(58,66,80,0.5), transparent 72%); }
body[data-zone="shale"]   .strata-tint { opacity: .5;  background: radial-gradient(ellipse 120% 90% at 50% 100%, rgba(92,106,122,0.6), transparent 74%); }
body[data-zone="magma"]   .strata-tint { opacity: .72; background: radial-gradient(ellipse 130% 95% at 50% 100%, rgba(255,138,60,0.55), rgba(255,122,46,0.32) 45%, transparent 80%); }
body[data-zone="core"]    .strata-tint { opacity: .92; background: radial-gradient(ellipse 150% 120% at 50% 96%, rgba(255,242,205,0.85), rgba(255,150,40,0.5) 40%, transparent 86%); }

/* M2 · at the Core the hero number is the BRIGHTEST object on screen - white-hot
   incandescent digits. The glare is pushed BEHIND the lockup (radial bloom on the
   glass plate), never darkening the digits. (Peak-inversion bug killed.) */
body[data-zone="core"] .mult, body[data-zone="core"] .mult-unit {
  background-image: linear-gradient(180deg, #ffffff 0%, #fff4d6 40%, #ffc14d 100%) !important;
  -webkit-text-stroke: 1.6px rgba(255, 220, 150, 0.55) !important;
  filter:
    drop-shadow(0 2px 3px rgba(40,10,0,0.6))
    drop-shadow(0 0 58px rgba(255,244,214,1))
    drop-shadow(0 0 130px rgba(255,170,70,0.95)) !important;
}
/* At the Core the hero blazes NAKED - no plate. A soft incandescent radial bloom sits
   BEHIND the digits (pushed back via blur, never a box), so the white-hot number owns
   the whole frame the way Aviator's number does at its loudest. No dark plate, no box. */
body[data-zone="core"] .mult-wrap {
  background:
    radial-gradient(ellipse 70% 110% at 50% 50%, rgba(255,150,50,0.16), transparent 72%);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: none; border-radius: 0; padding: 0;
}

/* --- M3 · phase-gated cockpit. BETTING: Drill A dominant, Drill B recedes (one loud action). --- */
body.is-betting #panelB {
  opacity: .56; transform: scale(.985); filter: saturate(.7);
  transition: opacity .3s ease, transform .3s ease, filter .3s ease;
}
body.is-betting #panelB:hover, body.is-betting #panelB:focus-within { opacity: 1; transform: none; filter: none; }
body.is-betting #panelA { box-shadow: 0 0 0 1px rgba(62, 107, 168, 0.18), var(--shadow); }
body.is-betting #panelA .action { padding: 13px 10px 12px; }
body.is-betting #panelA .act-main { font-size: 15px; }

/* M3 · magnetic EXTRACT - in a live run the green button is the gravitational centre */
.action.is-live {
  transform: scale(1.04); border-width: 2px;
  background: linear-gradient(180deg, rgba(43,217,138,0.42), rgba(43,217,138,0.12));
  animation: livepulse 0.7s ease-in-out infinite;
}
.action.is-live .act-main { font-size: 16px; text-shadow: 0 0 18px rgba(43,217,138,0.6); }
@keyframes livepulse {
  0%,100% { box-shadow: 0 0 0 rgba(43,217,138,0); }
  50%     { box-shadow: 0 0 34px rgba(43,217,138,0.55); }
}

/* Cashout remains interactive inside the otherwise non-interactive HUD layer. */
.hud-extract { display: none; min-height: 44px; border: 0; background: transparent; cursor: pointer; pointer-events: auto; padding: 8px 12px; }
.hud-extract:focus-visible { outline: 2px solid var(--extract); outline-offset: 3px; }
/* The floating cashout control uses the same bets and value as the scene action. */
@media (min-width: 761px) {
  body.is-running .hud-extract.on {
    display: block; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 6;
    font-family: var(--ui); font-weight: 600; font-size: 11px; letter-spacing: 0.04em; white-space: nowrap;
    color: var(--extract); opacity: 0.82; pointer-events: auto; text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  }
}


/* --- M5 · near-miss burial: the greedy position's would-be winnings get interred --- */
.stamp-buried {
  margin-top: 7px; font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.05em; color: var(--ember);
  animation: bury 1.15s cubic-bezier(.4,0,.5,1) both;
}
@keyframes bury {
  0%   { opacity: 0; transform: translateY(-15px) scale(1.25); color: #ffd86e; }
  18%  { opacity: 1; transform: translateY(0) scale(1);        color: #ffd86e; }
  60%  { opacity: 1; color: var(--ember); }
  100% { opacity: .26; transform: translateY(17px) scale(.9); filter: blur(1px); }
}

/* --- M6 · FOMO feed: whales float + gold flash; greedy losses pulse red --- */
.feed-row.is-whale { background: linear-gradient(90deg, rgba(255,194,77,0.16), transparent); animation: whaleflash 1s ease-out 1; }
.feed-row.is-whale .f-name { color: var(--gold); font-weight: 600; }
.feed-row.is-whale .f-mult, .feed-row.is-whale .f-win { color: var(--gold) !important; }
@keyframes whaleflash {
  0%   { background: rgba(255,194,77,0.5); box-shadow: inset 0 0 22px rgba(255,194,77,0.5); }
  100% { background: linear-gradient(90deg, rgba(255,194,77,0.16), transparent); box-shadow: none; }
}
.feed-row.is-rekt { animation: rektpulse 1.1s ease-in-out 2; }
.feed-row.is-rekt .f-win { color: var(--ink-dim) !important; }   /* one-red law: a past-loss feed row is muted, not red */
@keyframes rektpulse {
  0%,100% { background: transparent; }
  50%     { background: rgba(255, 46, 72, 0.12); box-shadow: inset 0 0 16px rgba(255, 46, 72, 0.25); }
}

/* M6 · streak chip surfaced over the canvas (commitment device) */
.streak-chip {
  position: absolute; top: 16px; right: 14px; z-index: 4;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--gold); padding: 5px 11px; border-radius: var(--r-pill);
  border: 1px solid rgba(255,194,77,0.4); background: rgba(255,194,77,0.08); white-space: nowrap;
  opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease;
}
.streak-chip.on { opacity: 1; transform: none; animation: goldpulse 1.6s ease-in-out infinite; }

/* provably-fair PROMOTED to a first-class on-rig trust beat (cobalt = trust pole).
   The collapse is committed BEFORE you deploy; that promise should be legible at the
   moment money is risked, not whispered. Reads as a tappable cobalt chip. */
.meta-fair {
  color: var(--cobalt-hi); letter-spacing: 0.1em; font-size: 10px; font-weight: 600;
  border: 1px solid rgba(138, 176, 222, 0.4); padding: 3px 10px; border-radius: var(--r-pill);
  background: rgba(62, 107, 168, 0.12); opacity: 1;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.meta-fair:hover { border-color: var(--cobalt-hi); background: rgba(62, 107, 168, 0.2); box-shadow: 0 0 16px rgba(62, 107, 168, 0.3); }
/* on a live run (money at risk) the trust chip pulses cobalt - surfaced first-class */
body.is-running .meta-fair { animation: fairpulse 1.8s ease-in-out infinite; opacity: 1; }
@keyframes fairpulse {
  0%, 100% { box-shadow: 0 0 0 rgba(62, 107, 168, 0); }
  50%      { box-shadow: 0 0 18px rgba(62, 107, 168, 0.45); }
}
/* the committed-crash hash stays legible (not a faint ghost) - it's the proof */
.scene-meta .meta-hash, .scene-meta .meta-hash code { color: var(--ink-mid); opacity: .82; font-size: 9.5px; }
.scene-meta .meta-hash code { color: var(--cobalt-hi); }

/* honour reduced-motion: kill the new looping animations */
@media (prefers-reduced-motion: reduce) {
  .action.is-live, .hud-extract.on, .streak-chip.on,
  .feed-row.is-whale, .feed-row.is-rekt, .stamp-buried,
  /* the loud loops the earlier blocks missed: climb pulse, fairness pulse, betting armed-glow, and the
     Motherlode group pulse (the old reset targeted .pill-gold, but the animation is on .pill-group). */
  body.is-running .mult-row,
  body.is-running .meta-fair,
  body.is-betting .mult, body.is-betting .mult-unit, body.is-betting .mult-wrap::before,
  body.is-motherlode .pill-group { animation: none !important; }
}


/* ---- My Position status card (always-on) ---- */
/* COCKPIT STATUS BAR: position strip (left, grows) + block/fairness meta (right) on ONE line so the
   three old stacked rows (meta, KOBOLD, position) collapse to one and the rig keeps its height. */
/* round timeline: a thin one-line stage strip above the cockpit bar (deterministic round progress) */
.round-timeline { display: flex; align-items: center; gap: 2px; padding: 2px 4px 4px; }
.rt-stage { flex: 1; text-align: center; position: relative; font-family: var(--ui); font-weight: 700; font-size: 8px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-dim); opacity: 0.5; white-space: nowrap; }
.rt-stage::after { content: '›'; position: absolute; right: -1px; top: -1px; opacity: 0.35; }
.rt-stage:last-child::after { content: none; }
.rt-stage.is-done { opacity: 0.82; color: var(--ink-mid); }
.rt-stage.is-active { opacity: 1; color: var(--cobalt-hi, #5db0ff); }
.cockpit-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 2px; min-width: 0; }
/* compact ONE-LINE strip (not a tall card): keeps the cockpit fitted so the rig stays dominant. */
.pos-card { display: flex; align-items: center; gap: 9px; margin: 0; padding: 5px 11px; flex: 1 1 auto; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--crust); }
.pos-card .pos-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-dim); flex: none; }
.pos-card .pos-main { display: flex; flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.pos-label { font-family: var(--ui); font-weight: 800; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); flex: none; white-space: nowrap; }
.pos-sub { font-family: var(--ui); font-size: 10.5px; line-height: 1.3; color: var(--ink-dim); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-val { display: flex; align-items: baseline; gap: 4px; flex: none; }
.pos-val b { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.pos-val span { font-family: var(--ui); font-size: 8.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.pos-card[data-tone="open"] .pos-dot { background: var(--cobalt-hi); box-shadow: 0 0 8px rgba(62,107,168,0.6); }
.pos-card[data-tone="open"] .pos-label { color: var(--cobalt-hi); }
.pos-card[data-tone="pending"] .pos-dot { background: var(--gold); box-shadow: 0 0 8px rgba(255,194,77,0.6); animation: posPulse 1.2s ease-in-out infinite; }
.pos-card[data-tone="pending"] .pos-label { color: var(--gold); }
.pos-card[data-tone="live"] { border-color: rgba(43,217,138,0.4); }
.pos-card[data-tone="live"] .pos-dot { background: var(--extract); box-shadow: 0 0 10px rgba(43,217,138,0.7); animation: posPulse 0.9s ease-in-out infinite; }
.pos-card[data-tone="live"] .pos-label, .pos-card[data-tone="live"] .pos-val b { color: var(--extract); }
.pos-card[data-tone="win"] { border-color: rgba(43,217,138,0.4); }
.pos-card[data-tone="win"] .pos-dot { background: var(--extract); }
.pos-card[data-tone="win"] .pos-label, .pos-card[data-tone="win"] .pos-val b { color: var(--extract); }
.pos-card[data-tone="loss"] .pos-dot { background: var(--danger); }
.pos-card[data-tone="loss"] .pos-label { color: var(--danger); }
@keyframes posPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .pos-card .pos-dot { animation: none !important; } }

/* ───────────────────────────── WALLET CENTER ─────────────────────────────
   Header chip (type · SOL · DRILL · state badge) + a global-overlay Wallet Center, withdraw sheet,
   and export sheet. All overlays (outside the rig, never steal scene height). Warnings use amber, not
   red: the one-red law keeps red for collapse only. */

/* header chip: now a type-first button that opens the Wallet Center */
.wchip-main { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 4px 0 0; background: none; border: 0; color: var(--ink); font-family: var(--ui); font-size: 11px; cursor: pointer; }
.wchip-type { font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.wchip-drill { display: inline-flex; align-items: baseline; gap: 3px; color: var(--ink-dim); font-size: 8.5px; }
.wchip-drill b { color: var(--gold); font-family: var(--mono); font-weight: var(--num-w); font-size: var(--num-s); font-variant-numeric: tabular-nums slashed-zero; }
.wchip-badge { display: inline-flex; align-items: center; height: 16px; padding: 0 7px; border-radius: var(--r-pill); font-family: var(--ui); font-weight: 600; font-size: 8.5px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.wchip-badge.is-claim { color: var(--gold); background: rgba(255, 194, 77, 0.14); border: 1px solid rgba(255, 194, 77, 0.4); }
.wchip-badge.is-play { color: var(--extract); background: var(--extract-dim); border: 1px solid rgba(32, 208, 138, 0.4); }
.wchip-badge.is-pending { color: var(--cobalt-hi); background: rgba(62, 107, 168, 0.16); border: 1px solid rgba(62, 107, 168, 0.42); }
.wchip-badge.is-low { color: var(--ember-hi); background: rgba(255, 180, 84, 0.13); border: 1px solid rgba(255, 180, 84, 0.4); }

/* overlay shell — mirrors .login-sheet so it never competes with the rig scene */
.wallet-center { position: fixed; inset: 0; z-index: 160; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 14, 0.74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
.wallet-center.wc-sub { z-index: 210; }   /* withdraw / export sit above the Wallet Center */
.wc-card { position: relative; width: 100%; max-width: 410px; max-height: calc(100dvh - 40px); overflow-y: auto;
  background: linear-gradient(180deg, #141c28, #0b111b); border: 1px solid var(--line-2); border-radius: 18px;
  padding: 20px 18px 16px; box-shadow: 0 30px 80px -24px rgba(0,0,0,0.92); }
.wc-card-sm { max-width: 360px; }
.wallet-center .wc-x { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--ink-mid); font-size: 17px; line-height: 1; cursor: pointer; }
.wallet-center .wc-x:hover { color: var(--ink); border-color: var(--line-2); }
.wc-head { font-family: var(--ui); font-weight: 700; font-size: 12px; letter-spacing: 0.14em; color: var(--ink-mid); text-transform: uppercase; margin-bottom: 12px; }

.wc-id { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.wc-type { align-self: flex-start; font-family: var(--ui); font-weight: 600; font-size: 12.5px; padding: 4px 11px; border-radius: var(--r-pill); border: 1px solid var(--line-2); color: var(--ink); }
.wc-type-privy { color: var(--extract); border-color: rgba(32, 208, 138, 0.42); background: var(--extract-dim); }
.wc-type-standard { color: var(--cobalt-hi); border-color: rgba(62, 107, 168, 0.42); background: rgba(62, 107, 168, 0.12); }
.wc-type-burner { color: var(--ember-hi); border-color: rgba(255, 180, 84, 0.42); background: rgba(255, 180, 84, 0.1); }
.wc-profile { font-family: var(--ui); font-size: 12px; color: var(--ink-mid); }
.wc-devnote { font-family: var(--ui); font-size: 11px; color: var(--ember-hi); }
.wc-signer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wc-k { font-family: var(--ui); font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.wc-addr { display: inline-flex; align-items: center; gap: 8px; max-width: 70%; padding: 5px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); cursor: pointer; }
.wc-addr-v { font-family: var(--mono); font-size: 11px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-copy { font-family: var(--ui); font-size: 9px; font-weight: 600; letter-spacing: 0.06em; color: var(--cobalt-hi); text-transform: uppercase; }
.wc-addr:hover { border-color: var(--cobalt-steel); }

.wc-warn { font-family: var(--ui); font-size: 11.5px; line-height: 1.4; color: var(--ember-hi); padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(255, 180, 84, 0.34); background: rgba(255, 180, 84, 0.08); margin-bottom: 12px; }
.wc-warn-soft { color: var(--ember-hi); margin: 10px 0; }

.wc-buckets { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.wc-b { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.wc-b-wide { grid-column: 1 / -1; }
.wc-b-k { font-family: var(--ui); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.wc-b-v { font-family: var(--mono); font-weight: var(--num-w); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }

.wc-embedded { padding: 10px 11px; border-radius: 10px; border: 1px solid rgba(62, 107, 168, 0.32); background: rgba(62, 107, 168, 0.08); margin-bottom: 12px; }
.wc-emb-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.wc-emb-addr { font-family: var(--mono); font-size: 11px; color: var(--ink); }
.wc-emb-warn { font-family: var(--ui); font-size: 10.5px; color: var(--ember-hi); margin-top: 7px; }
.wc-switch { width: 100%; height: 36px; border-radius: 9px; border: 1px solid var(--cobalt); background: rgba(62, 107, 168, 0.18); color: var(--ink); font-family: var(--ui); font-weight: 600; font-size: 12.5px; cursor: pointer; }

.wc-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.wc-act { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.03); color: var(--ink); font-family: var(--ui); font-weight: 600; font-size: 13px; cursor: pointer; transition: border-color 0.14s, background 0.14s, transform 0.1s; }
.wc-act:hover { border-color: var(--cobalt-steel); background: rgba(255,255,255,0.05); }
.wc-act:active { transform: translateY(1px); }
.wc-act:disabled { opacity: 0.45; cursor: default; }
.wc-act-primary { border-color: var(--cobalt); background: linear-gradient(180deg, rgba(62, 107, 168, 0.5), rgba(62, 107, 168, 0.18)); color: var(--ink); }
.wc-act-primary:hover { border-color: var(--cobalt-hi); }
.wc-act-gold { border-color: rgba(255, 194, 77, 0.5); background: linear-gradient(180deg, rgba(255, 194, 77, 0.22), rgba(255, 194, 77, 0.06)); color: var(--gold); }
.wc-act-ghost { background: none; color: var(--ink-mid); }

.wc-sub-h { font-family: var(--ui); font-weight: 600; font-size: 12px; color: var(--ink); }
.wc-note { font-family: var(--ui); font-size: 10.5px; line-height: 1.45; color: var(--ink-dim); }

.wc-receive { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); display: flex; flex-direction: column; gap: 9px; }
.wc-receive-addr { padding: 9px 10px; border-radius: 9px; border: 1px dashed var(--line-2); background: rgba(0,0,0,0.25); }
.wc-addr-full { font-family: var(--mono); font-size: 11.5px; color: var(--ink); word-break: break-all; line-height: 1.4; }
.wc-receive-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.wc-fastplay { margin-top: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.wc-fp-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wc-fp-status { font-family: var(--ui); font-weight: 700; font-size: 10px; letter-spacing: 0.08em; padding: 2px 8px; border-radius: var(--r-pill); }
.wc-fp-status.is-on { color: var(--extract); background: var(--extract-dim); border: 1px solid rgba(32, 208, 138, 0.4); }
.wc-fp-status.is-off { color: var(--ink-dim); background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.wc-fp-body { display: flex; flex-direction: column; gap: 9px; }
.wc-fp-copy { font-family: var(--ui); font-size: 11px; line-height: 1.45; color: var(--ink-mid); }
.wc-fp-limits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wc-fp-lim { display: flex; flex-direction: column; gap: 4px; font-family: var(--ui); font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); }
.wc-fp-row { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--ink-mid); }
.wc-fp-input { width: 64px; height: 30px; padding: 0 7px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(0,0,0,0.3); color: var(--ink); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums slashed-zero; }
.wc-fp-meter { font-family: var(--mono); font-size: 11px; color: var(--gold); font-variant-numeric: tabular-nums slashed-zero; }

.wc-foot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* withdraw + export sheet internals */
.wc-asset { display: inline-flex; gap: 0; width: 100%; border-radius: 9px; border: 1px solid var(--line-2); overflow: hidden; margin-bottom: 12px; }
.wc-asset-b { flex: 1; height: 34px; padding: 0 18px; background: none; border: 0; color: var(--ink-dim); font-family: var(--ui); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.wc-asset-b.is-on { background: rgba(62, 107, 168, 0.2); color: var(--ink); }
.wc-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 11px; font-family: var(--ui); font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }
.wc-field-row { display: flex; gap: 7px; }
.wc-input { width: 100%; height: 40px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0,0,0,0.3); color: var(--ink); font-family: var(--mono); font-size: 13px; }
.wc-input:focus { outline: none; border-color: var(--cobalt-steel); }
.wc-max { flex: 0 0 auto; padding: 0 13px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.04); color: var(--cobalt-hi); font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: 0.06em; cursor: pointer; }
.wc-rev { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.wc-rev-v { font-family: var(--mono); font-weight: var(--num-w); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.wc-rev-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 13px; }
.wc-export-copy { font-family: var(--ui); font-size: 12.5px; line-height: 1.5; color: var(--ink); margin-bottom: 10px; }
.wc-ack { display: flex; align-items: flex-start; gap: 9px; margin: 12px 0; font-family: var(--ui); font-size: 12px; line-height: 1.4; color: var(--ink-mid); cursor: pointer; }
.wc-ack input { margin-top: 2px; accent-color: var(--cobalt); }

/* mobile: Wallet Center + sheets become bottom sheets above the home indicator */
@media (max-width: 520px) {
  .wallet-center { align-items: flex-end; padding: 0; }
  .wc-card { max-width: 100%; border-radius: 18px 18px 0 0; max-height: calc(100dvh - 24px); padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* landing hero trust line: cluster + no-real-money + verifiability, in plain sight under the CTAs */
.lp-trust { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid rgba(140, 168, 210, 0.22); background: rgba(140, 168, 210, 0.06);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-mid); }

/* fairness verifier: block-source explainer + a manual-copy fallback box when the clipboard is blocked */
.vhint { margin: 12px 0 0; max-width: 62ch; font-family: var(--ui); font-size: 12px; line-height: 1.5; color: var(--ink-dim); }
.pc-manual { display: block; width: 100%; margin-top: 9px; min-height: 56px; padding: 8px 10px; resize: vertical;
  border: 1px solid var(--line-2); border-radius: 8px; background: rgba(0,0,0,0.3); color: var(--ink);
  font-family: var(--mono); font-size: 11px; line-height: 1.4; }

/* FAQ live search + expand/collapse */
.faq-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.faq-search-in { flex: 1 1 240px; height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(0,0,0,0.25); color: var(--ink); font-family: var(--ui); font-size: 14px; }
.faq-search-in:focus { outline: none; border-color: var(--cobalt-steel); }
.faq-search-tools { display: flex; gap: 8px; }
.faq-tool { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--ink-mid); font-family: var(--ui); font-weight: 600; font-size: 11px; cursor: pointer; }
.faq-tool:hover { color: var(--ink); border-color: var(--cobalt-steel); }
.faq-noresults { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); color: var(--ink-mid); font-family: var(--ui); font-size: 13px; }
.faq-noresults a { color: var(--cobalt-hi); }

/* loss result card: the same global overlay in collapse mode (one-red law: the collapse IS the red) */
.win-card.is-loss { border-color: var(--danger); box-shadow: 0 26px 64px -18px rgba(0,0,0,0.82), 0 0 0 1px rgba(255,46,72,0.20), inset 0 1px 0 rgba(255,255,255,0.04); }
.win-card.is-loss .wc-tag { color: var(--accentred-hi); }
.win-card.is-loss .wc-mult { background: none; -webkit-text-fill-color: var(--accentred-hi); color: var(--accentred-hi); }
.win-card.is-loss .wc-amt { color: var(--accentred-hi); }
/* session story: a compact this-run recap on the result card (rounds / best / net) */
.wc-session { margin-top: 8px; font-family: var(--ui); font-size: 11px; color: var(--ink-dim); letter-spacing: 0.01em; }
.wc-session:empty { display: none; }

/* risk presets: a compact Safe / Deep / Manual segmented control at the top of each bet panel */
.risk-presets { display: flex; gap: 5px; margin: 2px 0 8px; }
.risk-preset { flex: 1; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); color: var(--ink-dim); font-family: var(--ui); font-weight: 600; font-size: 10.5px; letter-spacing: 0.03em; cursor: pointer; transition: border-color 0.14s, color 0.14s, background 0.14s; }
.risk-preset:hover { color: var(--ink); border-color: var(--cobalt-steel); }
.risk-preset.is-on { color: var(--ink); border-color: var(--cobalt); background: rgba(62, 107, 168, 0.16); }

/* login sheet: two clearly separated paths (DRILL Wallet for new users, external wallet for crypto users) */
.login-seg-h { font-family: var(--ui); font-weight: 700; font-size: 13px; color: var(--ink); margin: 6px 0 4px; }
.login-seg-sub { font-family: var(--ui); font-size: 11.5px; line-height: 1.45; color: var(--ink-mid); margin: 0 0 10px; }

/* explore: protocol health header + buyback-burn proof rows + my-activity card */
.xp-health { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 18px; }
.xp-h-cell { display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.xp-h-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.xp-h-v { font-family: var(--mono); font-weight: var(--num-w); font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.xp-h-v.ok { color: var(--extract); }
.xp-row.xp-buyback { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xp-bb-proof { font-family: var(--ui); font-size: 13px; color: var(--ink); }
.xp-bb-proof b { font-family: var(--mono); font-weight: var(--num-w); color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.xp-bb-when { font-family: var(--mono); font-size: 10.5px; color: var(--ink-dim); white-space: nowrap; }
.xp-me { display: flex; flex-direction: column; }
.xp-me-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.xp-me-v { font-family: var(--mono); font-weight: var(--num-w); font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.xp-addr { font-family: var(--mono); font-size: 12px; color: var(--cobalt-hi); }
.xp-me-foot { padding: 12px 2px 2px; font-family: var(--ui); font-size: 11.5px; line-height: 1.5; color: var(--ink-dim); }
.xp-me-foot a { color: var(--cobalt-hi); }
@media (max-width: 620px) { .xp-health { grid-template-columns: repeat(2, 1fr); } }

/* explore: live-block round card (the only honest block-level Hashpower read) + per-round verify */
.xp-round-live { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(32,208,138,0.34); background: rgba(32,208,138,0.06); margin-bottom: 10px; }
.xp-rl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.xp-rl-tag { font-family: var(--ui); font-weight: 700; font-size: 9px; letter-spacing: 0.1em; color: var(--extract); padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid rgba(32,208,138,0.4); background: var(--extract-dim); }
.xp-rl-block { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.xp-rl-stats { display: flex; flex-wrap: wrap; gap: 18px; }
.xp-rl-stats > div { display: flex; flex-direction: column; gap: 3px; }
.xp-rl-stats b { font-family: var(--mono); font-weight: var(--num-w); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.xp-round-note { font-family: var(--ui); font-size: 11px; line-height: 1.45; color: var(--ink-dim); margin: 0 0 10px; }
.xp-verify { font-family: var(--ui); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; color: var(--cobalt-hi); text-transform: uppercase; }

/* explore: My Mining ledger (per-address public buckets) */
.xp-led-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.xp-addr-in { flex: 1 1 220px; min-width: 0; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(0,0,0,0.25); color: var(--ink); font-family: var(--mono); font-size: 12px; }
.xp-addr-in:focus { outline: none; border-color: var(--cobalt-steel); }
.xp-act { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--cobalt); background: linear-gradient(180deg, rgba(62,107,168,0.5), rgba(62,107,168,0.18)); color: var(--ink); font-family: var(--ui); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.xp-act:hover { border-color: var(--cobalt-hi); }
.xp-act-ghost { background: none; border-color: var(--line-2); color: var(--ink-mid); }
.xp-act-gold { border-color: rgba(255,194,77,0.5); background: linear-gradient(180deg, rgba(255,194,77,0.22), rgba(255,194,77,0.06)); color: var(--gold); }
.xp-led-who { font-family: var(--ui); font-size: 11px; color: var(--ink-mid); margin-bottom: 12px; }
.xp-led-who a { color: var(--cobalt-hi); font-family: var(--mono); }
.xp-led-dim { color: var(--ink-dim); }
.xp-led-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.xp-led { display: flex; flex-direction: column; gap: 3px; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.02); }
.xp-led.is-claim { border-color: rgba(255,194,77,0.4); background: rgba(255,194,77,0.06); }
.xp-led-k { font-family: var(--label-face); font-weight: var(--label-weight); font-size: var(--label-size); letter-spacing: var(--label-track); text-transform: uppercase; color: var(--ink-dim); }
.xp-led-v { font-family: var(--mono); font-weight: var(--num-w); font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums slashed-zero; }
.xp-led.is-claim .xp-led-v { color: var(--gold); }
.xp-led-h { font-family: var(--ui); font-size: 9.5px; line-height: 1.3; color: var(--ink-dim); }
.xp-led-live { margin-top: 10px; font-family: var(--ui); font-size: 12px; color: var(--extract); }
.xp-led-live b { font-family: var(--mono); }
.xp-led-cta { margin-top: 12px; }
.xp-led-note { margin: 10px 0 0; font-family: var(--ui); font-size: 12px; line-height: 1.5; color: var(--ink-mid); }
.xp-led-explain { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--ui); font-size: 11.5px; line-height: 1.55; color: var(--ink-mid); }
@media (max-width: 760px) { .xp-led-grid { grid-template-columns: 1fr 1fr; } .xp-rl-stats { gap: 14px; } }
@media (max-width: 420px) { .xp-led-grid { grid-template-columns: 1fr; } }

/* mobile-only devnet truth strip (footer + status note are hidden on the mobile rig) */
.devnet-strip { display: none; }
@media (max-width: 760px) {
  .devnet-strip { display: block; text-align: center; padding: 5px 10px; background: rgba(255, 180, 84, 0.08);
    border-bottom: 1px solid rgba(255, 180, 84, 0.22); color: var(--ember-hi); font-family: var(--ui);
    font-weight: 600; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; }
}

/* header wallet chip: compress gracefully so it never pushes other controls or wraps unpredictably */
.wchip-main { max-width: 100%; min-width: 0; overflow: hidden; }
.wchip-type { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .wchip-drill { display: none; } }   /* medium: type + SOL only */
@media (max-width: 900px) { .wallet-chip .wchip-badge { display: none; } }   /* tighter: drop the badge (mobile shows it in Wallet Center) */

/* mobile bal-mini: stack SOL over a $DRILL / claim-ready line (the header chip is hidden on mobile) */
.bal-mini-sub { display: none; }
@media (max-width: 760px) {
  .bal-mini { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.12; }
  .bal-mini-sub { display: block; font-family: var(--mono); font-weight: 600; font-size: 8.5px; color: var(--gold); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0.01em; }
}

/* Protocol controls: the scene carries the game identity; amounts and receipts
   use quiet surfaces, readable labels, and consistent action sizes. */
body:has(.layout) .layout { gap: 18px; grid-template-columns: 300px minmax(0, 1fr); }
.layout .stage { gap: 9px; }
.layout .scene-wrap { border-radius: 10px; }
.layout .cockpit-bar { margin: 0; min-height: 28px; }
.layout .scene-meta { width: 100%; gap: 14px; overflow: visible; font-size: 11px; }
.layout .meta-chip { letter-spacing: .04em; font-size: 11px; flex: none; }
.layout .meta-fair { padding: 0; border: 0; background: none; box-shadow: none; font-family: var(--ui); font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--ink-mid); text-transform: none; white-space: nowrap; }
.layout .meta-hash { font-size: 10px; color: var(--ink-dim); }
.layout .meta-hash code { font-size: 10px; }
.layout .meta-verify { margin-left: auto; font-family: var(--ui); font-size: 12px; font-weight: 600; letter-spacing: 0; border: 0; padding: 5px 0 5px 12px; }
.layout .round-timeline { gap: 0; padding: 0; border-bottom: 1px solid var(--line); }
.layout .rt-stage { padding: 7px 3px 9px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: 1; color: var(--ink-dim); }
.layout .rt-stage::after { content: none; }
.layout .rt-stage.is-active { color: var(--ink); border-bottom-color: var(--cobalt-hi); font-weight: 700; }
.layout .rt-stage.is-done { color: var(--cobalt-hi); }
.layout .pos-card { flex: none; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 78px; padding: 14px 16px; border-radius: 8px; background: var(--panel); border-color: var(--line-2); }
.layout .pos-card .pos-main { flex-direction: column; align-items: flex-start; gap: 4px; }
.layout .pos-card .pos-dot { animation: none; box-shadow: none; }
.layout .pos-label { font-size: 14px; font-weight: 650; text-transform: none; letter-spacing: 0; white-space: normal; }
.layout .pos-sub { flex: none; font-size: 12px; line-height: 1.45; color: #AAB5C5; white-space: normal; overflow: visible; text-overflow: clip; }
.layout .pos-val { flex-direction: column; align-items: flex-end; gap: 3px; }
.layout .pos-val b { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.layout .pos-val span { font-size: 11px; letter-spacing: 0; text-transform: none; color: #AAB5C5; }
.pos-detail { display: flex; align-items: center; gap: 12px; font-size: 11px; line-height: 1.4; color: #AAB5C5; }
.pos-detail:empty { display: none; }
.pos-detail a { color: var(--cobalt-hi); text-decoration: underline; text-underline-offset: 3px; }
.layout .panels { gap: 12px; }
.layout .panel { gap: 8px; padding: 14px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.is-betting .layout #panelB { opacity: 1; transform: none; filter: none; }
body.is-betting .layout #panelA { box-shadow: none; }
.layout .panel-head { align-items: baseline; gap: 10px; }
.layout .panel-tag { font-size: 14px; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--ink); }
.layout .panel-preset { margin-left: 7px; font-size: 11px; font-weight: 500; letter-spacing: 0; color: #AAB5C5; }
.layout .panel-sub { max-width: 60%; text-align: right; font-size: 11px; line-height: 1.35; color: #AAB5C5; }
.layout .risk-presets { margin: 0; gap: 6px; }
.layout .risk-preset { min-height: 44px; height: auto; font-size: 12px; border-radius: 6px; letter-spacing: 0; font-weight: 550; background: var(--crust); color: #AAB5C5; }
.layout .risk-preset.is-on { color: var(--ink); border-color: var(--cobalt-hi); background: rgba(62,107,168,.18); }
.layout .amt-row { display: grid; grid-template-columns: 42px 42px minmax(64px, 1fr) 42px 42px; gap: 6px; }
.layout .amt-box { min-width: 0; min-height: 44px; padding: 0 10px; border-radius: 6px; background: var(--void); }
.layout .amt { font-size: 19px; }
.layout .amt-unit { font-family: var(--ui); font-size: 11px; }
.layout .chip { font-size: 12px; font-weight: 550; padding: 8px 4px; min-height: 38px; border-radius: 6px; background: var(--crust); color: #B7C2D1; }
.layout .amt-row .chip { min-height: 44px; }
.layout .chip:hover { transform: none; color: var(--ink); background: rgba(62,107,168,.18); }
.layout .cap-hint { font-family: var(--ui); min-height: 0; font-size: 11px; line-height: 1.35; margin: 0; color: #AAB5C5; white-space: normal; overflow-wrap: anywhere; }
.layout .cap-hint:empty { display: none; }
.layout .adv > .adv-sum { min-height: 32px; padding: 6px 0; font-size: 12px; letter-spacing: 0; text-transform: none; color: #AAB5C5; }
.layout .autox-hint { font-size: 12px; line-height: 1.5; }
.layout .switch { font-size: 12px; }
.layout .autox-val { font-size: 16px; }
.layout .action, body.is-betting .layout #panelA .action { min-height: 58px; padding: 10px 12px; border-radius: 7px; background: #234975; border-color: #577FAE; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); transform: none; animation: none; }
.layout .action::before { content: none; }
.layout .action:hover { background: #2C5886; box-shadow: none; transform: none; }
.layout .act-main, body.is-betting .layout #panelA .act-main { font-size: 15px; font-weight: 650; letter-spacing: 0; text-indent: 0; text-transform: none; }
.layout .act-sub { font-size: 11px; line-height: 1.35; letter-spacing: 0; color: #C5D5E9; }
.layout .action.is-live { background: #143D32; border-color: #2B9E75; border-width: 1px; animation: none; transform: none; }
.layout .action.is-live .act-main { font-size: 16px; text-shadow: none; }
.layout .action.is-armed, .layout .action.is-pending { background: #3B321C; border-color: #8D7541; }
.layout .action.is-done { background: #143329; border-color: #357C61; }
.layout .action.is-bust { background: #341E27; border-color: #854250; }
.layout .tab { font-size: 12px; text-transform: none; letter-spacing: 0; min-height: 44px; }
.layout .feed-head { font-size: 10px; letter-spacing: .02em; }
.rig-tabs { display: none; }
.bal-mini { cursor: pointer; }
.bal-mini:focus-visible, .rig-tab:focus-visible, .pos-detail a:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }

@media (min-width: 1101px) {
  body:has(.layout) .scene-wrap { min-height: 220px; }
}
@media (max-width: 1100px) {
  body:has(.layout) .layout { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
}
@media (max-width: 760px) {
  body:has(.layout) { padding-bottom: env(safe-area-inset-bottom); }
  body:has(.layout) .layout { padding: 8px 10px 0; gap: 12px; }
  .layout .stage { gap: 6px; }
  .layout .hist-strip { min-height: 25px; padding-top: 0; padding-bottom: 0; }
  .layout .scene-wrap { height: clamp(160px, 23svh, 220px); min-height: 160px; }
  .layout .phase-label { top: 8px; font-size: 11px; }
  .layout .mult-wrap { padding: 7px 14px; }
  .layout .mult-row { font-size: clamp(48px, 15vw, 66px); }
  .layout .depth { font-size: 10px; }
  .layout .cockpit-bar { min-height: 25px; }
  .layout .scene-meta { gap: 9px; font-size: 10px; }
  .layout .meta-chip { font-size: 10px; letter-spacing: 0; }
  .layout .meta-fair { font-size: 10px; }
  .layout .meta-hash { display: none; }
  .layout .meta-verify { font-size: 11px; padding: 6px 0 6px 4px; }
  .layout .round-timeline { min-height: 29px; }
  .layout .rt-stage { font-size: 10px; padding: 6px 1px 7px; }
  .layout .pos-card { min-height: 80px; gap: 9px; padding: 12px; align-items: start; }
  .layout .pos-card .pos-dot { margin-top: 5px; width: 6px; height: 6px; }
  .layout .pos-label { font-size: 13px; }
  .layout .pos-sub { font-size: 12px; line-height: 1.4; }
  .layout .pos-val b { font-size: 19px; }
  .layout .pos-val span { font-size: 10px; }
  .layout .play-rule { display: none; }
  .layout .panels { position: relative; display: flex; flex-direction: column; gap: 0; padding: 0; background: #0E131B; border-top: 1px solid #344255; }
  .rig-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 0; }
  .rig-tab { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 6px; background: transparent; border: 1px solid transparent; color: #AAB5C5; font-family: var(--ui); font-size: 12px; font-weight: 550; text-align: left; }
  .rig-tab.is-active { background: #1C2B3D; border-color: #506E91; color: var(--ink); }
  .rig-tab-state { max-width: 65%; font-size: 10px; line-height: 1.2; text-align: right; font-weight: 400; }
  .layout #rigControls > .panel { margin: 0; padding: 0 0 10px; border: 0; border-radius: 0; background: transparent; max-height: none; overflow: visible; gap: 7px; box-shadow: none; }
  .layout #rigControls > .panel[data-mobile-active="false"] { display: none; }
  .layout #rigControls > .panel[data-mobile-active="true"] { display: flex; }
  .layout .panel-head { display: none; }
  .layout .risk-preset { min-height: 44px; font-size: 12px; }
  .layout .amt-row { grid-template-columns: 44px 44px minmax(64px, 1fr) 44px 44px; gap: 5px; }
  .layout .amt-row .chip, .layout .amt-box { min-height: 44px; }
  .layout .amt { font-size: 18px; }
  .layout .quick-row { display: none; }
  .layout .adv > .adv-sum { min-height: 36px; padding: 7px 1px; }
  .layout .action, body.is-betting .layout #panelA .action { min-height: 56px; flex: none; position: relative; }
  .layout .cap-hint { font-size: 11px; }
  .layout #rigControls > .panel:is([data-state="live"], [data-state="extracting"], [data-state="settling"], [data-state="settleable"]) :is(.risk-presets, .amt-row, .quick-row) { display: none; }
  .layout #rigControls > .panel:is([data-state="live"], [data-state="extracting"], [data-state="settling"], [data-state="settleable"]) .panel-head { display: flex; padding: 0 4px 3px; }
  .layout #rigControls > .panel:is([data-state="live"], [data-state="extracting"], [data-state="settling"], [data-state="settleable"]) .panel-sub { font-size: 11px; }
  .layout .feed { max-height: 370px; }
  .bal-mini:not([hidden]) { min-height: 44px; padding: 3px 8px; border: 0; border-radius: 6px; background: transparent; align-items: flex-end; gap: 2px; text-transform: none; letter-spacing: 0; }
  .bal-mini-amount { white-space: nowrap; font-size: 11px; }
  .bal-mini-amount::before { content: 'Available'; display: block; color: #AAB5C5; font-size: 11px; line-height: 1; margin-bottom: 3px; }
  .bal-mini b { font-size: 15px; }
  .bal-mini-sub { font-size: 10px; }
}
@media (max-width: 360px) {
  .layout .meta-fair { font-size: 9px; }
  .layout .pos-val b { font-size: 17px; }
  .layout .pos-card { gap: 7px; padding: 10px; }
  .layout .amt-row { grid-template-columns: 44px 44px minmax(48px,1fr) 44px 44px; gap: 4px; }
  .layout .amt-box { padding: 0 5px; }
}

.pos-heading { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pos-rig { color: #AAB5C5; font-size: 12px; line-height: 1.4; }
.layout .action:disabled { opacity: 1; }
body:has(.layout) .top #privyBtn { min-height: 38px; font-size: 12px; text-transform: none; letter-spacing: 0; }
body:has(.layout) .top .ghost-btn.sound { min-height: 38px; font-size: 11px; letter-spacing: 0; }
@media (max-width: 760px) and (max-height: 720px) {
  .layout .hist-strip { display: none; }
  .layout .scene-wrap { height: 120px; min-height: 120px; }
  .layout .phase-label { font-size: 10px; top: 6px; }
  .layout .mult-row { font-size: 44px; }
  .layout .pos-card { min-height: 74px; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .layout .scene-wrap { height: 80px; min-height: 80px; }
  .layout .cockpit-bar { display: none; }
  .layout .round-timeline { min-height: 24px; }
  .layout .rt-stage { padding-top: 3px; padding-bottom: 4px; }
}

.feed-panel { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.feed-panel:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: -2px; }

/* A cap is selected before acceptance and stays visible with the accepted bet. */
.layout .payout-cap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.layout .payout-cap-row label { font-size: 12px; color: #C5D5E9; }
.layout .payout-cap-row .autox-box { opacity: 1; min-height: 40px; }
.layout .payout-cap-row .autox-box:focus-within { border-color: #7FA7D4; box-shadow: 0 0 0 2px rgba(127,167,212,.16); }
.layout .payout-cap-row .autox-val { width: 78px; }
.layout .risk-preset:disabled, .layout .payout-cap-row input:disabled { cursor: default; opacity: .65; }
.layout .panel-head { align-items: flex-start; }
.layout .panel-sub { max-width: 68%; text-align: right; line-height: 1.45; }

.layout .payout-summary { margin: 0; color: #D7E3F1; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.bet-cost { padding-top: 8px; border-top: 1px solid var(--line); font-family: var(--ui); font-size: 12px; color: #AAB5C5; line-height: 1.45; }
.bet-cost-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cost-total { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.bet-cost details { margin-top: 5px; }
.bet-cost summary { cursor: pointer; width: fit-content; padding: 5px 0; }
.cost-detail, .cost-profit { margin: 4px 0; }
.cost-profit:empty { display: none; }
.stake-warning { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #8D7541; border-radius: 6px; color: #FFE0A3; font-size: 12px; line-height: 1.4; }
.use-max { flex: none; min-height: 36px; padding: 6px 10px; border: 1px solid #8D7541; border-radius: 5px; background: #3B321C; color: #FFE0A3; font: inherit; cursor: pointer; }
.wc-profit { margin: 6px 0 14px; font-size: 13px; color: #AAB5C5; }
.login-card, .wc-card, .ob-card { max-height: calc(var(--visible-height, 100dvh) - 32px); overflow-y: auto; overscroll-behavior: contain; }
input, button, summary { scroll-margin-block: 90px; }
.token-buy-panel { margin: 24px 0 0; padding: 20px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.token-buy-panel b { font-size: 18px; color: var(--ink); }
.token-buy-panel p { font-size: 14px; line-height: 1.6; margin: 8px 0 16px; }
.token-buy-panel .token-market-status { margin-bottom: 0; font-size: 12px; color: var(--ink-mid); }
.token-buy-panel code { display: block; margin-top: 10px; overflow-wrap: anywhere; font-size: 12px; }
.token-buy-panel [aria-disabled="true"] { opacity: .65; cursor: default; }

/* A single active bet keeps the round and cashout action in view. */
.layout #roundTimeline { position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.layout .pos-card:is([data-tone="watch"], [data-tone="open"]) { min-height: 44px; padding: 10px 14px; align-items: center; }
.layout .pos-card:is([data-tone="watch"], [data-tone="open"]) .pos-sub { display: none; }
.layout .pos-card:is([data-tone="watch"], [data-tone="open"]) .pos-dot { margin-top: 0; }
#miningPanel .mp-title { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
#miningPanel .mp-ready { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0 2px; }
#miningPanel .mp-ready-amount > span { display: block; margin-bottom: 5px; color: var(--ink-mid); font: 400 11px var(--ui); }
#miningPanel .mp-ready-amount > div { display: flex; align-items: baseline; gap: 5px; }
#miningPanel .mp-ready-amount b { color: var(--ink); font: 600 24px var(--mono); letter-spacing: -.03em; }
#miningPanel .mp-ready-amount div > span { color: var(--ink-mid); font: 400 11px var(--ui); }
#miningPanel .mp-ready #mpAction { width: auto; max-width: 58%; min-height: 38px; padding: 8px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
#miningPanel .mp-how { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
#miningPanel .mp-how > summary { font-size: 11px; padding: 2px 0; }
#miningPanel .mp-details-content { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
#miningPanel .mp-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#miningPanel .mp-epoch-row { flex-wrap: wrap; gap: 5px; }
.layout #rigControls { display: flex; flex-direction: column; gap: 0; padding: 0 16px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.layout #rigControls .rig-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 0 10px; }
.layout #rigControls .rig-tab { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 8px 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 5px 5px 0 0; background: transparent; color: #AAB5C5; font: 550 13px var(--ui); text-align: left; }
.layout #rigControls .rig-tab.is-active { border-bottom-color: #7FA7D4; background: rgba(62,107,168,.12); color: var(--ink); }
.layout #rigControls .rig-tab-state { max-width: 68%; font-size: 11px; font-weight: 400; line-height: 1.2; text-align: right; }
.layout #rigControls > .panel { margin: 0; padding: 0; gap: 10px; border: 0; border-radius: 0; background: transparent; max-height: none; overflow: visible; box-shadow: none; }
.layout #rigControls > .panel[data-mobile-active="false"] { display: none; }
.layout #rigControls > .panel[data-mobile-active="true"] { display: flex; }
.layout #rigControls .bet-amount-label { color: #C5D5E9; font: 500 12px var(--ui); }
.layout #rigControls .amt-row { display: grid; grid-template-columns: minmax(0, 1fr) 48px 56px; gap: 8px; margin-top: -3px; }
.layout #rigControls .amt-box { min-height: 52px; padding: 0 14px; }
.layout #rigControls .amt { font-size: 24px; }
.layout #rigControls .amt-row .chip { min-height: 52px; }
.layout #rigControls .amt-unit { font-size: 12px; }
.layout #rigControls .payout-cap-row { min-height: 44px; }
.layout #rigControls .payout-cap-row label { font-size: 13px; }
.layout #rigControls .bet-cost { padding-top: 2px; border: 0; font-size: 12px; }
.layout #rigControls .cost-total { font-size: 13px; font-weight: 550; }
.layout #rigControls .action { min-height: 54px; padding: 12px; }
.layout #rigControls .act-sub:empty { display: none; }
.layout #rigControls .bet-details { margin-top: 0; border-top: 1px solid var(--line); }
.layout #rigControls .bet-details > summary { width: fit-content; min-height: 36px; padding: 11px 0 3px; color: #AAB5C5; font: 500 12px var(--ui); cursor: pointer; }
.layout #rigControls .bet-details > summary:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }
.layout #rigControls .bet-details-content { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; }
.layout #rigControls .bet-details-content p { margin: 0; font-size: 12px; line-height: 1.5; }
.layout #rigControls .quick-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.layout #rigControls .risk-presets { display: flex; }
.layout #rigControls .bet-details .adv { border-top: 1px solid var(--line); padding-top: 2px; }
.layout #rigControls > .panel:is([data-state="live"], [data-state="extracting"], [data-state="settling"], [data-state="settleable"]) :is(.bet-amount-label, .amt-row, .bet-cost) { display: none; }
@media (max-width: 760px) {
  .layout #rigControls { padding: 0 12px 10px; }
  .layout #rigControls > .panel { gap: 8px; }
  .layout #rigControls .rig-tabs { padding-bottom: 9px; }
  .layout #rigControls .amt-row { grid-template-columns: minmax(0, 1fr) 44px 50px; gap: 6px; }
  .layout #rigControls .amt-box, .layout #rigControls .amt-row .chip { min-height: 48px; }
  .layout #rigControls .amt { font-size: 22px; }
}

/* Bet visibility is shared across desktop and mobile; each form keeps its own state. */
.layout #rigControls .rig-controls-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.layout #rigControls .rig-controls-heading .rig-tabs { flex: 1 1 auto; min-width: 0; }
.layout #toggleBetPanels { flex: none; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--crust); color: #B7C2D1; font: 550 12px var(--ui); white-space: nowrap; cursor: pointer; }
.layout #toggleBetPanels:hover { background: rgba(62,107,168,.18); color: var(--ink); }
.layout #toggleBetPanels:focus-visible { outline: 2px solid var(--cobalt-hi); outline-offset: 3px; }
.layout #rigControls > .panel .panel-head { display: none; }
.layout #rigControls[data-show-both="true"] > .panel { display: flex; }
.layout #rigControls[data-show-both="true"] > .panel .panel-head { display: flex; align-items: baseline; min-height: 24px; padding: 0; }
.layout #rigControls[data-show-both="true"] .panel-preset { display: none; }
.layout #rigControls[data-show-both="true"] .panel-tag { flex: none; }

@media (min-width: 1101px) {
  body:has(.layout) { height: 100dvh; min-height: 0; overflow: hidden; }
  body:has(.layout) .top { flex: none; }
  body:has(.layout) .layout { flex: 1 1 0; width: min(100%, 1320px); max-width: 1320px; min-height: 0; box-sizing: border-box; grid-template-columns: 288px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 20px; padding: 10px 16px; }
  body:has(.layout) .stage { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 8px; }
  body:has(.layout) .scene-wrap { flex: 1 1 0; height: auto; min-height: 140px; }
  body:has(.layout) .feed { min-height: 0; height: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
  body:has(.layout) .feed-panel { min-height: 0; overflow: hidden; }
  body:has(.layout) .foot { flex: none; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 16px; margin: 0; }
  .layout .hist-strip { min-height: 26px; padding-top: 3px; padding-bottom: 4px; }
  .layout .pos-card { min-height: 62px; padding: 10px 12px; }
  .layout #rigControls { flex: none; position: relative; padding: 7px 12px 8px; }
  .layout #rigControls .rig-controls-heading { min-height: 36px; gap: 10px; }
  .layout #rigControls .rig-tabs { padding: 0; gap: 16px; }
  .layout #rigControls .rig-tab { min-height: 36px; padding: 6px 8px; font-size: 12px; }
  .layout #rigControls > .panel { position: relative; gap: 6px; min-width: 0; }
  .layout #rigControls > .panel .panel-head, .layout #rigControls[data-show-both="true"] > .panel .panel-head { display: none; }
  .layout #rigControls .amt-row { grid-template-columns: minmax(0, 1fr) 42px 48px; gap: 6px; }
  .layout #rigControls .amt-box, .layout #rigControls .amt-row .chip { height: 48px; min-height: 48px; }
  .layout #rigControls .amt { font-size: 25px; }
  .layout #rigControls .payout-cap-row, .layout #rigControls .autox-box { min-height: 36px; }
  .layout #rigControls > .panel button.action { min-height: 50px; padding: 8px 12px; }
  .layout #rigControls .bet-details { position: relative; }
  .layout #rigControls .bet-details > summary { min-height: 26px; padding: 4px 0; }
  .layout #rigControls .bet-details[open] > .bet-details-content { position: absolute; bottom: calc(100% + 76px); left: 0; right: 0; z-index: 40; max-height: min(360px, calc(100dvh - 110px)); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border: 1px solid #42566F; border-radius: 8px; background: #192331; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
  .layout #rigControls[data-show-both="true"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
  .layout #rigControls[data-show-both="true"] .rig-controls-heading { grid-column: 1 / -1; }
}

@media (min-width: 1101px) and (min-height: 900px) {
  body:has(.layout) .layout { padding-top: 14px; padding-bottom: 14px; }
  body:has(.layout) .stage { gap: 10px; }
  .layout #rigControls { padding: 10px 16px; }
  .layout #rigControls > .panel { gap: 8px; }
  .layout #rigControls .amt-box, .layout #rigControls .amt-row .chip { height: 52px; min-height: 52px; }
  .layout #rigControls > .panel button.action { min-height: 56px; }
}

@media (min-width: 1101px) and (max-height: 700px) {
  body:has(.layout) .scene-wrap { min-height: 120px; }
  body:has(.layout .stake-warning:not([hidden])) .scene-wrap { min-height: 60px; }
  .layout .hist-strip { display: none; }
  .layout #rigControls .amt-box, .layout #rigControls .amt-row .chip { height: 44px; min-height: 44px; }
  .layout #rigControls > .panel button.action { min-height: 44px; }
}

@media (max-width: 1100px) {
  .layout #rigControls[data-show-both="true"] > .panel + .panel { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .layout #rigControls .rig-controls-heading { gap: 8px; }
  .layout #toggleBetPanels { padding: 7px 9px; font-size: 11px; }
}

/* Account controls share one quiet header rhythm. Protocol balances live in Rewards details. */
body:has(.layout) .top .top-right, body:has(.layout) .top .wallet { gap: 8px; }
body:has(.layout) .top .wallet { padding: 0; }
body:has(.layout) .top :is(#privyBtn, #addFundsBtn) { height: 36px; min-height: 36px; padding: 0 14px; border: 1px solid #B5D1F4; border-radius: 8px; background: #A8C8F0; color: #10233B; font: 600 13px var(--ui); letter-spacing: 0; text-transform: none; box-shadow: none; }
body:has(.layout) .top :is(#privyBtn, #addFundsBtn):hover { background: #C0D9F8; border-color: #C0D9F8; box-shadow: none; }
body:has(.layout) .top #soundBtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 1px solid #34445B; border-radius: 8px; background: #1A2432; color: #AEBBD0; box-shadow: none; }
body:has(.layout) .top #soundBtn::after { display: none; }
body:has(.layout) .top #soundBtn[data-on="1"] { color: #A8C8F0; }
body:has(.layout) .top #walletChip { height: 36px; padding: 0; border: 1px solid #34445B; border-radius: 8px; background: #1A2432; box-shadow: none; }
body:has(.layout) .top #walletBtn { height: 100%; padding: 0 11px; gap: 6px; font: 500 13px var(--ui); }
body:has(.layout) .top #walletBtn::after { content: ''; width: 6px; height: 6px; margin: -3px 1px 0 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
body:has(.layout) .top :is(.wchip-type, .wchip-drill, .wchip-badge, .wdot, #disconnectBtn) { display: none; }
body:has(.layout) .top .wchip-bal { height: auto; padding: 0; border: 0; gap: 4px; color: #D5DFED; font: 500 13px var(--ui); letter-spacing: 0; }
body:has(.layout) .top .wchip-bal::before { content: none; }
body:has(.layout) .top .wchip-bal b { min-width: 0; font: 600 13px var(--ui); }
body:has(.layout) .top #modeBadge { display: block; height: auto; padding: 0; color: #9DAABF; font: 400 12px/20px var(--ui); letter-spacing: 0; text-transform: lowercase; white-space: nowrap; }
body:has(.layout) .top #modeBadge::first-letter { text-transform: uppercase; }
body:has(.layout) .top :is(#privyBtn, #addFundsBtn, #soundBtn, #walletBtn):focus-visible { outline: 2px solid #D5E7FF; outline-offset: 3px; }
.protocol-stats { padding-top: 8px; border-top: 1px solid var(--line); }
body .protocol-stats .pill-group { display: grid; gap: 0; animation: none; }
.protocol-stats .pill { display: flex; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; box-shadow: none; }
.protocol-stats .pill-k { font: 500 12px var(--ui); letter-spacing: 0; text-transform: none; line-height: 1.4; }
.protocol-stats .pill-v { font: 400 11px var(--ui); letter-spacing: 0; white-space: nowrap; }
.protocol-stats .pill-v::before { content: none; }
.protocol-stats .pill b { min-width: 0; font: 600 12px var(--ui); }
@media (min-width: 761px) {
  body:has(.layout) .top { height: 52px; min-height: 52px; padding: 8px 16px; gap: 16px; background: #121922; }
  body:has(.layout) .top .wallet { height: 36px; }
  body:has(.layout) .top .nav a { height: 36px; padding: 0 10px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  body:has(.layout) .top { gap: 10px; padding-left: 12px; padding-right: 12px; }
  body:has(.layout) .top .brand-word { font-size: 15px; }
  body:has(.layout) .top .nav { gap: 0; }
  body:has(.layout) .top .nav a { padding: 0 7px; font-size: 12px; }
  body:has(.layout) .top #modeBadge { font-size: 11px; }
  body:has(.layout) .top :is(#privyBtn, #addFundsBtn) { padding: 0 12px; }
}
@media (max-width: 760px) {
  body:has(.layout) .top .bar-collapse .wallet { width: 100%; height: auto; flex-wrap: wrap; }
  body:has(.layout) .top :is(#mobileLoginBtn, #mobileFundBtn) { height: 44px; min-height: 44px; margin-left: 0; padding: 0 12px; border: 1px solid #B5D1F4; border-radius: 8px; background: #A8C8F0; color: #10233B; font: 600 12px var(--ui); letter-spacing: 0; text-transform: none; box-shadow: none; }
  body:has(.layout) .top .menu-btn { border-radius: 8px; }
  body:has(.layout) .top :is(#privyBtn, #addFundsBtn, #soundBtn, #walletChip) { height: 44px; min-height: 44px; }
  body:has(.layout) .top #soundBtn { width: 44px; }
  body:has(.layout) .top :is(#privyBtn, #addFundsBtn) { flex: 1 1 auto; }
}

/* Shared play controls use the same calm surfaces as the account header. */
body:has(.layout) {
  --control-fill: #A8C8F0;
  --control-ink: #10233B;
  --control-hover: #C0D9F8;
  --surface-soft: #1A2432;
  --surface-line: #34445B;
  --text-secondary: #A9B8CB;
  --r-control: 8px;
  --r-pill: 8px;
}

body:has(.layout) :is(button, input, summary, a):focus-visible {
  outline: 2px solid #D5E7FF;
  outline-offset: 3px;
}
body:has(.layout) :is(button, summary) { -webkit-tap-highlight-color: transparent; }
body:has(.layout) button:disabled { cursor: default; }
body:has(.layout) :is(.wc-act, .login-opt, .ob-go):disabled { opacity: .5; }

/* Bet entry keeps one clear action and a quiet, shared input treatment. */
.layout #rigControls {
  background: #172131;
  border-color: var(--surface-line);
  border-radius: 12px;
}
.layout #rigControls .rig-tab {
  border-radius: 8px 8px 0 0;
  color: var(--text-secondary);
  font-weight: 500;
}
.layout #rigControls .rig-tab.is-active {
  background: #223249;
  color: #E6ECF5;
  border-bottom-color: var(--control-fill);
}
.layout #rigControls .rig-tab-state { color: var(--text-secondary); }
.layout #toggleBetPanels {
  border-radius: 8px;
  background: #111A26;
  border-color: var(--surface-line);
  color: #CDD8E8;
  font-weight: 500;
}
.layout #posCard { grid-template-columns: 8px minmax(0, 1fr) auto auto; }
.layout #posCard #posVal { grid-column: 3; grid-row: 1; }
.layout #posCard #toggleBetPanels { grid-column: 4; grid-row: 1; height: 36px; min-height: 36px; }
.layout #posCard:is([data-tone="watch"], [data-tone="open"]) { padding-top: 3px; padding-bottom: 3px; }
.layout #rigControls :is(.amt-box, .autox-box, .chip, .risk-preset) {
  border-radius: 8px;
  border-color: var(--surface-line);
  background: #0E1722;
}
.layout #rigControls :is(.amt-box, .autox-box):focus-within {
  border-color: var(--control-fill);
  box-shadow: 0 0 0 2px rgba(168, 200, 240, .12);
}
.layout #rigControls :is(.chip, .risk-preset):hover:not(:disabled) {
  background: #27374D;
  border-color: #607B9A;
  color: #E6ECF5;
  transform: none;
}
.layout #rigControls .risk-preset.is-on {
  background: #283F5D;
  border-color: #A8C8F0;
  color: #E6ECF5;
}
.layout #rigControls :is(.bet-amount-label, .payout-cap-row label) { color: #CBD7E7; }
.layout #rigControls :is(.amt-unit, .bet-cost, .autox-hint, .cap-hint) { color: var(--text-secondary); }
.layout #rigControls > .panel button.action,
body.is-betting .layout #panelA .action {
  border-radius: 8px;
  border-color: #B5D1F4;
  background: var(--control-fill);
  color: var(--control-ink);
  box-shadow: none;
}
.layout #rigControls > .panel button.action:hover:not(:disabled, .is-queue, .is-armed, .is-pending, .is-live, .is-done, .is-bust) { background: var(--control-hover); }
.layout #rigControls .action .act-main { color: inherit; font-weight: 650; }
.layout #rigControls .action .act-sub { color: inherit; opacity: .84; }
.layout #rigControls > .panel button.action.is-live {
  background: #175640;
  border-color: #419D78;
  color: #DBF5E9;
}
.layout #rigControls > .panel button.action.is-live:hover:not(:disabled) { background: #21694F; }
.layout #rigControls > .panel button.action:is(.is-armed, .is-pending) {
  background: #28374B;
  border-color: #718AA7;
  color: #D8E6F8;
}
.layout #rigControls > .panel button.action.is-done { background: #1A3D30; border-color: #4B8E70; color: #D1EEDD; }
.layout #rigControls > .panel button.action.is-bust { background: #39242D; border-color: #975567; color: #F2BCC8; }
.layout #rigControls > .panel button.action.is-queue { background: #263B57; border-color: #5E7FA5; color: #D7E7FC; }
.layout #rigControls .bet-details > summary { color: #B8C8DC; }
.layout #rigControls .bet-details > summary:hover { color: #E6ECF5; }
.layout #rigControls .bet-details-content { color: #B8C8DC; }
.layout #rigControls .bet-details[open] > .bet-details-content { border-radius: 10px; background: #172333; }
.layout #rigControls .switch { min-height: 32px; color: #CBD7E7; }
.layout #rigControls .sw { width: 34px; height: 20px; border-radius: 12px; background: #111B28; }
.layout #rigControls .sw::after { width: 12px; height: 12px; top: 3px; left: 3px; border-radius: 50%; background: #9EADC0; box-shadow: none; }
.layout #rigControls .switch input:checked + .sw { background: #456B96; border-color: #97B8DD; }
.layout #rigControls .switch input:checked + .sw::after { left: 17px; background: #E1EDFB; }
.layout .stake-warning { border-radius: 8px; border-color: #8D7541; background: #302A1D; color: #F1D49B; }
.layout .use-max { border-radius: 6px; color: #F1D49B; background: #3A3020; }

/* Supporting information stays legible without competing with the rig. */
.layout .feed { opacity: 1; background: #101923; border-color: #2D3A4D; border-radius: 10px; }
.layout .tabs { padding: 0 8px; border-color: #2D3A4D; }
.layout .tab { font-weight: 500; color: var(--text-secondary); }
.layout .tab.on { color: #E6ECF5; border-bottom-color: var(--control-fill); }
.layout .tab em { color: var(--text-secondary); font-size: 11px; }
.layout .feed-head { text-transform: none; font-size: 11px; letter-spacing: 0; color: #A5B3C6; }
.layout .feed-row { border-bottom: 1px solid rgba(140, 168, 210, .06); animation: none; }
.layout .feed-row:hover { background: #1A2739; }
.layout .feed-row.is-you { background: #1D2E44; }
.layout .feed-empty { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.layout .feed-foot { gap: 8px; color: #9AAAC0; font-size: 10px; letter-spacing: 0; }
.layout .feed-foot b { margin-left: 3px; color: #D2DEED; }
.layout #miningPanel { background: #151E29; }
.layout #miningPanel .mp-title { color: #E9BC69; }
.layout #miningPanel :is(.mp-note, .mp-tagline, .mp-how, .mp-epoch-row) { color: var(--text-secondary); }
.layout #miningPanel .mp-how > summary { color: #B8C8DC; }
.layout #miningPanel .mp-ready #mpAction,
body:has(.layout) :is(.claim-btn, .wc-act-gold) {
  border-radius: 8px;
  background: #3A301D;
  border-color: #8C743C;
  box-shadow: none;
  color: #EFD39D;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
body:has(.layout) :is(.claim-btn, .wc-act-gold):hover:not(:disabled) { background: #4A3C24; border-color: #B49655; }
.layout .mining-hud { border-radius: 8px; background: rgba(18, 28, 40, .94); box-shadow: none; border-color: #5A4C31; }
.layout .mining-hud .mh-ico { filter: none; color: #E9BC69; }
.layout .mining-hud .mh-amt { color: #E9BC69; }
.layout .mining-hud .mh-note { color: var(--text-secondary); letter-spacing: 0; text-transform: none; font-size: 10px; }
.layout .mining-hud .mh-fill { box-shadow: none; background: #D5AE63; }
.layout .phase-label { border-radius: 6px; background: rgba(14, 23, 34, .88); box-shadow: none; letter-spacing: .04em; }
.layout .pos-card { border-radius: 10px; background: #172131; border-color: #34445B; }
.layout .pos-sub { color: #B5C4D8; }
.layout .meta-help,
.layout #howToPlayBtn { padding: 5px 0; border: 0; background: none; color: #C2D8F2; font: 500 12px var(--ui); white-space: nowrap; cursor: pointer; }
.layout .meta-help:hover,
.layout #howToPlayBtn:hover { color: #E6ECF5; }

/* Dialogs share the same type scale and control hierarchy. */
body:has(.layout) :is(.login-card, .wc-card, .ob-card) {
  border-radius: 14px;
  background: #151F2D;
  border-color: #3A4A61;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .45);
  scrollbar-width: thin;
  scrollbar-color: #3A4A61 transparent;
}
body:has(.layout) :is(.login-h, .wc-head) {
  color: #E6ECF5;
  font: 600 18px/1.3 var(--ui);
  letter-spacing: -.02em;
  text-transform: none;
  padding-right: 36px;
  margin-bottom: 16px;
}
body:has(.layout) :is(.login-x, .wallet-center .wc-x, .win-card .wc-x) {
  width: 36px;
  height: 36px;
  border: 1px solid #34445B;
  border-radius: 8px;
  color: #BDCADB;
  background: #1A2738;
}
body:has(.layout) :is(.login-x, .wallet-center .wc-x, .win-card .wc-x):hover { color: #E6ECF5; background: #25374F; }
body:has(.layout) :is(.login-input, .wc-input, .wc-fp-input) {
  border-radius: 8px;
  border-color: #3C4E66;
  background: #0F1824;
  color: #E6ECF5;
  box-shadow: none;
}
body:has(.layout) :is(.login-input, .wc-input) { height: 46px; }
body:has(.layout) :is(.login-input, .wc-input, .wc-fp-input):focus { border-color: #A8C8F0; }
body:has(.layout) .login-opt { border-radius: 8px; border-color: #3C4E66; font-size: 13px; font-weight: 500; background: #1C293B; letter-spacing: 0; text-transform: none; }
body:has(.layout) .login-opt:hover:not(:disabled) { background: #263952; }
body:has(.layout) :is(.login-go, .wc-act-primary, .ob-go) {
  border-radius: 8px;
  border-color: #B5D1F4;
  background: var(--control-fill);
  color: var(--control-ink);
  box-shadow: none;
  font: 600 13px var(--ui);
  letter-spacing: 0;
  text-transform: none;
}
body:has(.layout) :is(.login-go, .wc-act-primary, .ob-go):hover:not(:disabled) { background: var(--control-hover); border-color: var(--control-hover); }
body:has(.layout) :is(.login-code-note, .login-foot, .wc-note, .wc-fp-copy) { font: 400 12px/1.5 var(--ui); color: var(--text-secondary); }
body:has(.layout) .login-foot:empty { display: none; }
body:has(.layout) .wc-type { border: 0; padding: 0; background: none; color: #B8D2F0; font: 500 13px var(--ui); }
body:has(.layout) :is(.wc-k, .wc-b-k, .wc-field, .wc-fp-lim, .wc-copy) { font: 400 12px/1.4 var(--ui); color: var(--text-secondary); letter-spacing: 0; text-transform: none; }
body:has(.layout) .wc-addr { padding: 7px 9px; border-radius: 8px; background: #1A2738; border-color: #34445B; }
body:has(.layout) .wc-copy { color: #C4DCF8; }
body:has(.layout) .wc-b { border-radius: 8px; background: #111B28; border-color: #2E3D51; padding: 10px; gap: 5px; }
body:has(.layout) .wc-b-v { font-size: 15px; }
body:has(.layout) .wc-sub-h { font-size: 13px; font-weight: 600; margin-bottom: 7px; }
body:has(.layout) .wc-emb-row { color: var(--text-secondary); font: 400 12px/1.5 var(--ui); gap: 14px; }
body:has(.layout) .wc-emb-row > :last-child { text-align: right; color: #D8E4F3; }
body:has(.layout) :is(.wc-act, .wc-max, .wc-switch, .wc-asset-b) { min-height: 42px; border-radius: 8px; font: 500 13px var(--ui); letter-spacing: 0; text-transform: none; }
body:has(.layout) .wc-act { background: #1D2B3E; border-color: #3C4E66; color: #D8E4F3; }
body:has(.layout) .wc-act:hover:not(:disabled) { background: #293C55; border-color: #607B9A; }
body:has(.layout) .wc-act-primary { background: var(--control-fill); color: var(--control-ink); border-color: #B5D1F4; font-weight: 600; }
body:has(.layout) .wc-act-primary:hover:not(:disabled) { background: var(--control-hover); }
body:has(.layout) .wc-act-gold { background: #3A301D; color: #EFD39D; border-color: #8C743C; }
body:has(.layout) .wc-act-gold:hover:not(:disabled) { background: #4A3C24; border-color: #B49655; }
body:has(.layout) .wc-act-ghost { background: transparent; }
body:has(.layout) :is(.wc-fastplay, .wc-receive, .wc-embedded) { border-radius: 10px; background: #111B28; border-color: #2E3D51; }
body:has(.layout) .wc-fp-status { letter-spacing: 0; border-radius: 6px; }
body:has(.layout) .wc-asset { border-radius: 8px; border-color: #3C4E66; }
body:has(.layout) .wc-asset-b { border-radius: 0; }
body:has(.layout) .wc-asset-b.is-on { background: #2E486A; color: #E6ECF5; }
body:has(.layout) .wc-rev { font: 400 13px/1.5 var(--ui); color: #B8C8DC; }
body:has(.layout) .wc-rev > :last-child { text-align: right; overflow-wrap: anywhere; }
body:has(.layout) .wc-warn { border-radius: 8px; background: #302A1D; border-color: #78643F; color: #EBD3A6; }
body:has(.layout) .wc-foot-row { padding-top: 12px; border-top: 1px solid #2E3D51; }

body:has(.layout) .ob-card { text-align: left; padding: 24px; }
body:has(.layout) .ob-brand { font: 600 24px/1.2 var(--ui); letter-spacing: -.03em; }
body:has(.layout) .ob-tag { margin-top: 8px; color: #BDCCDF; font-size: 13px; line-height: 1.5; }
body:has(.layout) .ob-steps { gap: 16px; margin-top: 22px; }
body:has(.layout) .ob-n { border-radius: 7px; border-color: #45668F; background: #22364E; color: #C7DDF7; font-weight: 500; }
body:has(.layout) .ob-steps b { font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; }
body:has(.layout) .ob-steps div span { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
body:has(.layout) .ob-risk { border: 0; border-top: 1px solid #34445B; padding: 14px 0 0; background: none; font: 400 12px/1.5 var(--ui); color: #BAC9DE; }
body:has(.layout) .ob-fair { font-size: 12px; color: #C2D8F2; }
body:has(.layout) .toast { border-radius: 8px; background: #1A2738; color: #D6E3F4; font: 400 12px/1.5 var(--ui); border-color: #3A4A61; border-left-color: #9AB8DB; }
body:has(.layout) .toast.warn { border-left-color: #D8AC62; }
body:has(.layout) .toast.gold { border-left-color: #E9BC69; color: #EFD39D; }

/* Result values remain prominent while the receipt actions stay restrained. */
body:has(.layout) .win-card { border-radius: 14px; background: #151F2D; border-color: #456A58; box-shadow: 0 22px 70px rgba(0, 0, 0, .5); }
body:has(.layout) .win-card:is([data-tier="big"], [data-tier="huge"]).show { transform: translate(-50%, -50%); box-shadow: 0 22px 70px rgba(0, 0, 0, .5); }
body:has(.layout) .win-card :is(.wc-tag, .wc-track-k) { font: 500 12px var(--ui); letter-spacing: 0; text-transform: none; }
body:has(.layout) .win-card .wc-amt { text-shadow: none; font-size: 28px; }
body:has(.layout) .win-card .wc-meta { color: var(--text-secondary); font: 400 11px/1.5 var(--ui); letter-spacing: 0; }
body:has(.layout) .win-card :is(.wf-again, .wf-share, .wf-save, .wc-verify) { min-height: 40px; padding: 9px 14px; border-radius: 8px; box-shadow: none; font: 500 12px var(--ui); letter-spacing: 0; text-transform: none; }
body:has(.layout) .win-card .wf-again { background: var(--control-fill); border-color: #B5D1F4; color: var(--control-ink); }
body:has(.layout) .win-card :is(.wf-share, .wf-save, .wc-verify) { background: #1D2B3E; border-color: #3C4E66; color: #CBDDF2; }
body:has(.layout) .win-card :is(.wf-again, .wf-share, .wf-save, .wc-verify):hover { filter: none; background: #2B405B; color: #E6ECF5; }
body:has(.layout) .win-card .wf-again:hover { background: var(--control-hover); color: var(--control-ink); }

@media (max-width: 760px) {
  .layout :is(.meta-help, #howToPlayBtn) { font-size: 11px; }
  body:has(.layout) :is(.login-input, .wc-input) { font-size: 16px; }
  body:has(.layout) :is(.wc-act, .wc-max, .wc-switch, .wc-asset-b, .login-x, .wallet-center .wc-x, .win-card .wc-x) { min-height: 44px; }
  body:has(.layout) :is(.login-x, .wallet-center .wc-x, .win-card .wc-x) { width: 44px; height: 44px; }
  body:has(.layout) :is(.login-h, .wc-head) { padding-right: 42px; }
}
@media (max-width: 520px) {
  body:has(.layout) .wallet-center .wc-card { border-radius: 16px 16px 0 0; }
  body:has(.layout) .ob-card { padding: 20px; }
}

body:has(.layout) .wc-details {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid #2E3D51;
  border-radius: 0;
  background: transparent;
}
body:has(.layout) :is(.wc-details, .ob-details) > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  list-style: none;
  cursor: pointer;
  color: #C6D7ED;
  font: 500 13px/1.4 var(--ui);
}
body:has(.layout) :is(.wc-details, .ob-details) > summary::-webkit-details-marker { display: none; }
body:has(.layout) :is(.wc-details, .ob-details) > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: auto;
  margin-right: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  flex: none;
}
body:has(.layout) :is(.wc-details, .ob-details)[open] > summary::after { transform: rotate(225deg); }
body:has(.layout) .wc-details > .wc-fp-h { margin-bottom: 0; }
body:has(.layout) .wc-details > .wc-fp-h > :first-child { flex: 1; }
body:has(.layout) .wc-details > .wc-fp-h::after { margin-left: 2px; }
body:has(.layout) .wc-details > .wc-fp-body { padding-bottom: 14px; }
body:has(.layout) .wc-details > .wc-buckets { margin-bottom: 14px; }
body:has(.layout) .wc-details + .wc-actions-grid { margin-top: 14px; }
body:has(.layout) .ob-card { position: relative; }
body:has(.layout) .ob-card .wc-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid #34445B;
  border-radius: 8px;
  background: #1A2738;
  color: #BDCADB;
  font-size: 19px;
  cursor: pointer;
}
body:has(.layout) .ob-card .ob-brand { margin: 0; padding-right: 40px; }
body:has(.layout) .ob-details { border-bottom: 1px solid #34445B; margin-top: 6px; }
body:has(.layout) .ob-details > summary { font-size: 12px; }
body:has(.layout) .ob-details p { margin: 0 0 12px; font: 400 12px/1.5 var(--ui); color: var(--text-secondary); }
@media (max-width: 760px) {
  body:has(.layout) .ob-card .wc-x { width: 44px; height: 44px; top: 10px; right: 10px; }
  body:has(.layout) .ob-card .ob-brand { padding-right: 44px; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .layout .cockpit-bar:has(#howToPlayBtn) { display: block; }
}

.layout :is(.feed-head, .feed-row) { grid-template-columns: minmax(0, 1.15fr) .75fr .95fr .95fr; }
.layout .feed-head > :not(:first-child) { text-align: right; }
body:has(.layout) .login-social:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
body:has(.layout) .ob-risk { border-radius: 0; }
body:has(.layout) #wdForm .wc-note { margin: 12px 0; }
body:has(.layout) :is(#wdReview, #rewardReviewConfirm) { width: 100%; margin-top: 8px; }

.layout #rigControls > .panel button.action:disabled:not(.is-armed, .is-pending, .is-live, .is-done, .is-bust, .is-queue) {
  background: #2F435D;
  border-color: #4C6584;
  color: #BCCCE0;
}

@media (max-width: 760px) {
  .layout #rigControls :is(.rig-tab, .switch, #toggleBetPanels),
  .layout #miningPanel #mpAction { min-height: 44px; }
  .layout #posCard { grid-template-columns: 6px minmax(0, 1fr) auto; }
  .layout #posCard .pos-main { grid-column: 2; grid-row: 1; }
  .layout #posCard #posVal { grid-column: 2; grid-row: 2; align-items: flex-start; }
  .layout #posCard #toggleBetPanels { grid-column: 3; grid-row: 1 / span 2; align-self: center; height: 44px; min-height: 44px; }
  .layout #posCard:is([data-tone="watch"], [data-tone="open"]) { padding-top: 6px; padding-bottom: 6px; }
  .layout #rigControls .bet-details > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 0;
  }
  .layout #rigControls .bet-details > summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
  }
  .layout #rigControls .bet-details[open] > summary::after { transform: rotate(225deg); }
  .layout :is(.meta-help, #howToPlayBtn) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Keep both bet statuses visible without combining their stake or payment amounts. */
.layout #posCard { grid-template-columns: minmax(0, 1fr) auto; }
.layout #posCard #posEntries { display: grid; grid-column: 1; grid-row: 1; gap: 20px; min-width: 0; }
.layout #posCard[data-multiple="true"] #posEntries { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.layout #posCard .pos-entry { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; }
.layout #posCard .pos-entry .pos-main { grid-column: 2; grid-row: 1; }
.layout #posCard :is(#posVal, #posOtherVal) { grid-column: 3; grid-row: 1; align-items: flex-end; }
.layout #posCard #toggleBetPanels { grid-column: 2; grid-row: 1; }
.layout #posCard .pos-entry .pos-label,
.layout #posCard .pos-entry .pos-val b { color: var(--ink); }
.layout #posCard .pos-entry .pos-dot { background: var(--ink-dim); }
.layout #posCard .pos-entry[data-tone="open"] :is(.pos-dot, .pos-label) { color: var(--cobalt-hi); }
.layout #posCard .pos-entry[data-tone="open"] .pos-dot { background: var(--cobalt-hi); }
.layout #posCard .pos-entry[data-tone="pending"] .pos-label { color: var(--gold); }
.layout #posCard .pos-entry[data-tone="pending"] .pos-dot { background: var(--gold); }
.layout #posCard .pos-entry:is([data-tone="live"], [data-tone="win"]) :is(.pos-label, .pos-val b) { color: var(--extract); }
.layout #posCard .pos-entry:is([data-tone="live"], [data-tone="win"]) .pos-dot { background: var(--extract); }
.layout #posCard .pos-entry[data-tone="loss"] .pos-label { color: var(--danger); }
.layout #posCard .pos-entry[data-tone="loss"] .pos-dot { background: var(--danger); }
.layout #posCard[data-multiple="true"] .pos-entry:is([data-state="queued"], [data-state="placed"], [data-state="live"]) .pos-sub { display: none; }
@media (max-width: 760px) {
  .layout #posCard[data-multiple="true"] #posEntries { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .layout #posCard[data-multiple="true"] .pos-entry + .pos-entry { border-top: 1px solid var(--line); padding-top: 12px; }
  .layout #posCard .pos-entry { grid-template-columns: 6px minmax(0, 1fr) auto; gap: 9px; }
}
