/* Hallmark · macrostructure: Workbench · tone: atmospheric · anchor hue: forest-green · nav: N5 adaptation · footer: Ft5 adaptation */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  --color-canvas: oklch(12% 0.028 155);
  --color-surface: oklch(16% 0.032 155);
  --color-surface-raised: oklch(20% 0.038 155);
  --color-surface-bright: oklch(25% 0.042 155);
  --color-rule: oklch(31% 0.034 155);
  --color-ink: oklch(95% 0.018 150);
  --color-muted: oklch(74% 0.026 150);
  --color-faint: oklch(62% 0.024 150);
  --color-accent: oklch(85% 0.185 96);
  --color-accent-deep: oklch(76% 0.16 92);
  --color-accent-ink: oklch(22% 0.03 150);
  --color-success: oklch(74% 0.16 150);
  --platform-green: oklch(46% 0.095 165);
  --platform-green-deep: oklch(34% 0.08 165);
  --color-warning: oklch(84% 0.15 92);
  --color-error: oklch(70% 0.17 28);
  --color-info: oklch(75% 0.08 178);
  --shadow-soft: 0 18px 60px oklch(7% 0.03 155 / 0.38);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --font-body: 'Geist', 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', 'Cascadia Mono', monospace;
  color-scheme: dark;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
  html { min-width: 320px; background: var(--color-canvas); overflow-x: hidden; }
  body { min-width: 320px; min-height: 100dvh; margin: 0; background: var(--color-canvas); overflow-x: hidden; }
body::selection { color: var(--color-accent-ink); background: var(--color-accent); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.46; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.035em; }
h1 { font-size: clamp(2.15rem, 5vw, 4.7rem); line-height: 0.96; margin-bottom: var(--space-5); }
h2 { font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1; margin-bottom: var(--space-3); }
h3 { font-size: 1.2rem; line-height: 1.08; margin-bottom: var(--space-2); }
p { line-height: 1.55; }

.app-loading { display: grid; min-height: 100dvh; place-items: center; align-content: center; gap: 12px; color: var(--color-muted); }
.loading-orb { width: 32px; height: 32px; border: 2px solid var(--color-rule); border-top-color: var(--color-accent); border-radius: 50%; animation: spin 850ms linear infinite; }
.app-shell { min-height: 100dvh; }

.auth-layout { display: grid; min-height: 100dvh; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); background: radial-gradient(circle at 20% 25%, oklch(30% 0.08 145 / 0.34), transparent 37%), var(--color-canvas); }
.auth-visual { position: relative; display: flex; min-height: 100dvh; overflow: hidden; flex-direction: column; justify-content: space-between; padding: clamp(28px, 5vw, 72px); border-right: 1px solid var(--color-rule); }
.auth-visual::before, .auth-visual::after { position: absolute; z-index: 0; display: block; content: ''; border: 1px solid oklch(74% 0.185 96 / 0.22); border-radius: 50%; }
.auth-visual::before { width: min(56vw, 680px); height: min(56vw, 680px); right: -15%; bottom: -22%; }
.auth-visual::after { width: min(35vw, 440px); height: min(35vw, 440px); right: 3%; bottom: -4%; border-color: oklch(74% 0.185 96 / 0.12); }
.auth-visual > * { position: relative; z-index: 1; }
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.11em; }
.brand-lockup strong, .brand-lockup small { display: block; }
.brand-lockup small { margin-top: 3px; color: var(--color-muted); font-size: 0.62rem; letter-spacing: 0.17em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--color-accent); border-radius: 8px; color: var(--color-accent-ink); background: var(--color-accent); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.brand-lockup strong em, .topbar-brand strong em { font-style: normal; color: var(--color-accent); }
.auth-visual-copy { max-width: 760px; padding-top: 12vh; }
.auth-visual-copy h1 { max-width: 700px; }
.auth-visual-copy p { max-width: 470px; color: var(--color-muted); font-size: 1.08rem; }
.signal-readout { display: grid; max-width: 440px; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--color-rule); background: var(--color-rule); }
.signal-readout div { min-height: 92px; padding: var(--space-4); background: oklch(16% 0.032 155 / 0.92); }
.signal-readout span { display: block; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.11em; text-transform: uppercase; }
.signal-readout strong { display: block; margin-top: 13px; color: var(--color-accent); font-family: var(--font-display); font-size: 1.4rem; }
.auth-card-wrap { display: grid; min-height: 100dvh; place-items: center; padding: clamp(20px, 5vw, 70px); }
.auth-card { width: min(100%, 480px); }
.auth-card .brand-lockup { margin-bottom: clamp(48px, 10vh, 120px); }
.eyebrow { margin-bottom: 14px; color: var(--color-accent); font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.lede { max-width: 520px; margin-bottom: var(--space-8); color: var(--color-muted); font-size: 1rem; }
.stack-form { display: grid; gap: 12px; }
.stack-form label, .filter-bar label { color: var(--color-muted); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; }
.stack-form input, .stack-form select, .filter-bar input, .filter-bar select, .profile-form input, .profile-form select { width: 100%; min-height: 48px; margin-top: 7px; padding: 0 14px; border: 1px solid var(--color-rule); border-radius: var(--radius-sm); outline: 0; color: var(--color-ink); background: var(--color-surface); }
.stack-form input::placeholder, input::placeholder { color: var(--color-faint); }
.stack-form input:focus, .stack-form select:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px oklch(78% 0.185 96 / 0.12); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: var(--color-accent-ink); background: var(--color-accent); }
.button-primary:hover:not(:disabled) { background: oklch(84% 0.185 96); }
.button-ghost { border-color: var(--color-rule); color: var(--color-ink); background: transparent; }
.button-ghost:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.button-subtle { border-color: var(--color-rule); color: var(--color-muted); background: var(--color-surface); }
.button-danger { border-color: oklch(70% 0.17 28 / 0.35); color: var(--color-error); background: transparent; }
.button-full { width: 100%; }
.form-message { min-height: 22px; margin: 2px 0 0; color: var(--color-error); font-size: 0.82rem; }
.form-message.success { color: var(--color-success); }
.helper { color: var(--color-faint); font-size: 0.78rem; }
  .auth-legal { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-8); color: var(--color-faint); font-size: 0.72rem; }
  .auth-modal { width: min(92vw, 440px); padding: 30px; border: 1px solid #b7d9c9; border-radius: 14px; color: var(--color-ink); background: #f7fcf9; box-shadow: 0 24px 80px rgba(0,0,0,.34); }
  .auth-modal::backdrop { background: rgba(4, 25, 17, .72); backdrop-filter: blur(5px); }
  .auth-modal .dialog-close { position: absolute; top: 14px; right: 16px; border: 0; color: #527266; background: transparent; font-size: 1.5rem; cursor: pointer; }
  .auth-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
  .auth-modal-head h2 { margin: 0; color: #174d3b; font-size: 1.55rem; }
  .auth-modal .eyebrow { margin: 0 0 4px; color: #138762; }
  .auth-modal .stack-form label { color: #557369; }
  .auth-modal .stack-form input { color: #16372b; background: #fff; border-color: #b7d9c9; }
  .auth-switch { margin-top: 18px; border: 0; color: #138762; background: transparent; text-decoration: underline; cursor: pointer; }
.text-link { min-height: auto; padding: 0; border: 0; color: var(--color-accent); background: transparent; text-decoration: underline; text-underline-offset: 3px; }

.onboarding-layout { display: grid; min-height: 100dvh; place-items: center; padding: 28px; background: radial-gradient(circle at 70% 0%, oklch(26% 0.09 145 / 0.22), transparent 40%), var(--color-canvas); }
.onboarding-card { width: min(100%, 650px); padding: clamp(24px, 5vw, 56px); border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.onboarding-card .brand-lockup { margin-bottom: 60px; }
.profile-form { display: grid; gap: var(--space-4); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.check-line { display: flex; min-height: 44px; align-items: center; gap: 10px; color: var(--color-muted); font-size: 0.83rem; }
.check-line input { width: 18px; height: 18px; accent-color: var(--color-accent); }
.legal-inline { color: var(--color-muted); }
.legal-inline a { text-decoration: underline; text-underline-offset: 3px; }

.workspace { display: grid; min-height: 100dvh; grid-template-columns: 248px minmax(0, 1fr); }
.side-rail { position: sticky; top: 0; display: flex; height: 100dvh; flex-direction: column; padding: 28px 18px 20px; border-right: 1px solid var(--color-rule); background: oklch(14% 0.03 155 / 0.95); }
.side-rail .brand-lockup { padding: 0 10px; }
.rail-label { margin: 38px 10px 10px; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.61rem; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-list { display: grid; gap: 4px; }
.nav-button { display: flex; min-height: 44px; align-items: center; gap: 11px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--color-muted); background: transparent; text-align: left; }
.nav-button:hover, .nav-button.active { color: var(--color-ink); background: var(--color-surface-raised); }
.nav-button.active { box-shadow: inset 2px 0 var(--color-accent); }
.nav-icon { display: grid; width: 20px; place-items: center; color: var(--color-accent); font-family: var(--font-mono); font-size: 0.68rem; }
.rail-games { overflow-y: auto; }
.game-nav { display: flex; min-height: 40px; align-items: center; gap: 10px; padding: 0 10px; border-radius: 8px; color: var(--color-muted); background: transparent; text-align: left; }
.game-nav:hover, .game-nav.active { color: var(--color-ink); background: var(--color-surface); }
.game-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent-deep); box-shadow: 0 0 0 4px oklch(61% 0.16 92 / 0.1); }
.game-nav.active .game-dot { background: var(--color-accent); box-shadow: 0 0 0 4px oklch(78% 0.185 96 / 0.14); }
.rail-footer { display: grid; gap: 12px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--color-rule); }
.player-chip { display: flex; align-items: center; gap: 9px; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.67rem; }
.avatar { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--color-accent-ink); background: var(--color-accent); font-family: var(--font-display); font-weight: 700; }
.rail-language { width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--color-rule); border-radius: 8px; color: var(--color-muted); background: var(--color-surface); }
.workspace-main { min-width: 0; padding: 28px clamp(18px, 4vw, 64px) 100px; }
.mobile-topbar, .mobile-bottom-nav { display: none; }
.workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1440px; margin: 0 auto var(--space-8); }
.workspace-header h1 { max-width: 740px; margin-bottom: 11px; }
.workspace-header .lede { margin-bottom: 0; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
  .language-select { min-height: 44px; padding: 0 34px 0 14px; border: 2px solid #f3c623; border-radius: 8px; color: #f8f4df; background: #102b20; box-shadow: 0 0 0 3px rgba(243,198,35,.12), 0 8px 22px rgba(0,0,0,.22); font-family: var(--font-mono); font-weight: 800; cursor: pointer; }
  .language-select option { color: #17372b; background: #f8f4df; }
  .topbar-language { min-height: 34px; min-width: 132px; border-color: #f3c623; background: #102b20; box-shadow: 0 0 0 3px rgba(243,198,35,.14), 0 0 18px rgba(243,198,35,.18); }
.content-width { max-width: 1440px; margin: 0 auto; }
.status-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: var(--space-6); }
.status-badge { display: inline-flex; min-height: 28px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid oklch(78% 0.185 96 / 0.28); border-radius: 999px; color: var(--color-accent); background: oklch(78% 0.185 96 / 0.07); font-family: var(--font-mono); font-size: 0.63rem; font-weight: 600; letter-spacing: 0.08em; }
.status-badge::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.status-badge.muted { border-color: var(--color-rule); color: var(--color-muted); background: transparent; }
 .status-badge.warning { border-color: oklch(84% 0.15 92 / 0.3); color: var(--color-warning); background: oklch(84% 0.15 92 / 0.07); }
 .status-badge.online-badge { border-color: oklch(72% 0.19 145 / 0.35); color: oklch(78% 0.19 145); background: oklch(72% 0.19 145 / 0.08); }
 .status-badge.online-badge::before { display: none; }
 .online-pulse { width: 7px; height: 7px; border-radius: 50%; background: oklch(78% 0.19 145); box-shadow: 0 0 0 0 oklch(78% 0.19 145 / 0.6); animation: online-pulse-anim 1.8s ease-out infinite; }
 @keyframes online-pulse-anim { 0% { box-shadow: 0 0 0 0 oklch(78% 0.19 145 / 0.55); } 70% { box-shadow: 0 0 0 6px oklch(78% 0.19 145 / 0); } 100% { box-shadow: 0 0 0 0 oklch(78% 0.19 145 / 0); } }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: var(--space-6); border: 1px solid var(--color-rule); background: var(--color-rule); }
.metric { min-height: 122px; padding: 19px; background: var(--color-surface); }
.metric-label { display: block; margin-bottom: 22px; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; }
.metric-value { display: block; color: var(--color-ink); font-family: var(--font-display); font-size: clamp(1.55rem, 3vw, 2.3rem); letter-spacing: -0.05em; }
.metric-value.accent { color: var(--color-accent); }
.metric-meta { display: block; margin-top: 7px; color: var(--color-muted); font-size: 0.72rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr); gap: var(--space-6); align-items: start; }
.panel { min-width: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.panel-flat { box-shadow: none; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 0; }
.panel-head h2, .panel-head h3 { margin-bottom: 4px; }
.panel-kicker { margin-bottom: 8px; color: var(--color-accent); font-family: var(--font-mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; }
.panel-copy { color: var(--color-muted); font-size: 0.82rem; }
.panel-body { padding: 22px; }
.aviator-panel { overflow: hidden; background: linear-gradient(145deg, oklch(21% 0.045 152), var(--color-surface) 64%); }
.chart-wrap { position: relative; min-height: 300px; margin-top: 8px; overflow: hidden; border: 1px solid oklch(78% 0.185 96 / 0.15); border-radius: 13px; background: linear-gradient(180deg, oklch(22% 0.055 150 / 0.5), oklch(14% 0.03 155 / 0.68)); }
.chart-wrap canvas { display: block; width: 100%; height: 300px; }
.chart-axis { position: absolute; right: 14px; bottom: 10px; left: 14px; display: flex; justify-content: space-between; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.6rem; }
.aviator-readout { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; margin-top: 16px; }
.big-readout { color: var(--color-accent); font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 4.4rem); letter-spacing: -0.07em; line-height: 0.9; }
.readout-label { display: block; margin-bottom: 8px; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; }
.round-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.round-pill { display: inline-flex; min-height: 32px; align-items: center; padding: 0 10px; border: 1px solid var(--color-rule); border-radius: 999px; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.69rem; }
.round-pill.active { border-color: oklch(78% 0.185 96 / 0.35); color: var(--color-accent); }
.analysis-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.level-panel { overflow: hidden; }
.level-top { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.level-number { color: var(--color-accent); font-family: var(--font-display); font-size: 3rem; line-height: 0.85; }
.progress-track { height: 8px; margin: 23px 0 9px; overflow: hidden; border-radius: 999px; background: var(--color-surface-bright); }
.progress-fill { height: 100%; min-width: 2px; border-radius: inherit; background: var(--color-accent); transition: width 350ms ease; }
.progress-meta { display: flex; justify-content: space-between; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.64rem; }
.data-list { display: grid; gap: 0; margin: 0; }
.data-list div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--color-rule); }
.data-list div:last-child { border-bottom: 0; }
.data-list dt { color: var(--color-muted); font-size: 0.78rem; }
.data-list dd { margin: 0; color: var(--color-ink); font-family: var(--font-mono); font-size: 0.75rem; text-align: right; }
.game-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
.game-card { position: relative; display: flex; min-height: 140px; flex-direction: column; justify-content: space-between; padding: 16px; overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-md); color: var(--color-ink); background: var(--color-surface); text-align: left; }
.game-card::after { position: absolute; width: 90px; height: 90px; right: -25px; bottom: -35px; border: 1px solid oklch(78% 0.185 96 / 0.28); border-radius: 50%; content: ''; }
.game-card:hover { border-color: var(--color-accent-deep); background: var(--color-surface-raised); }
.game-card-index { color: var(--color-accent); font-family: var(--font-mono); font-size: 0.64rem; }
.game-card strong { max-width: 145px; font-family: var(--font-display); font-size: 1.2rem; line-height: 1; }
.game-card span:last-child { color: var(--color-muted); font-family: var(--font-mono); font-size: 0.63rem; }
.game-card-wide { grid-column: span 2; }
.empty-state { display: grid; min-height: 140px; place-items: center; padding: 28px; color: var(--color-muted); text-align: center; }
.empty-state p { max-width: 330px; margin-bottom: 0; font-size: 0.82rem; }
.player-list { display: grid; gap: 10px; }
.player-row { display: flex; min-height: 54px; align-items: center; gap: 10px; padding: 8px; border-bottom: 1px solid var(--color-rule); }
.player-row:last-child { border-bottom: 0; }
.player-row .avatar { flex: 0 0 auto; width: 30px; height: 30px; font-size: 0.78rem; }
.player-row-copy { min-width: 0; flex: 1; }
.player-row-copy strong, .player-row-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-row-copy strong { font-size: 0.82rem; }
.player-row-copy span { margin-top: 3px; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.62rem; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }
.beta-section { margin-top: var(--space-6); }
.beta-card { display: flex; min-height: 92px; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px dashed var(--color-rule); border-radius: var(--radius-md); color: var(--color-muted); }
.beta-card h3 { margin-bottom: 4px; color: var(--color-ink); }
.beta-card p { margin-bottom: 0; font-size: 0.8rem; }
.beta-stamp { color: var(--color-faint); font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.1em; }
.statement-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 70px auto 0; padding-top: 20px; border-top: 1px solid var(--color-rule); }
.statement-footer p { margin: 0; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.7; }
.statement-footer p:last-child { color: var(--color-faint); text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.footer-links .text-link { color: var(--color-muted); font-size: 0.67rem; }

.game-view { display: grid; gap: var(--space-6); }
.game-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: clamp(20px, 3vw, 34px); border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: radial-gradient(circle at 90% 15%, oklch(33% 0.1 146 / 0.24), transparent 32%), var(--color-surface); }
.game-hero h2 { max-width: 700px; font-size: clamp(2rem, 5vw, 4rem); }
.game-hero p { max-width: 600px; margin-bottom: 0; color: var(--color-muted); }
.game-hero-number { color: var(--color-accent); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: var(--space-6); align-items: start; }
.game-stage { min-height: 410px; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); }
.stage-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.stage-toolbar p { margin: 0; color: var(--color-muted); font-size: 0.78rem; }
.visual-stage { position: relative; min-height: 280px; overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-sm); background: linear-gradient(180deg, oklch(23% 0.06 149), oklch(15% 0.03 155)); }
.visual-stage::before { position: absolute; inset: 0; opacity: 0.42; background-image: linear-gradient(oklch(95% 0.018 150 / 0.06) 1px, transparent 1px), linear-gradient(90deg, oklch(95% 0.018 150 / 0.06) 1px, transparent 1px); background-size: 38px 38px; content: ''; }
.stage-center { position: absolute; inset: 0; display: grid; place-items: center; }
.visual-number { color: var(--color-accent); font-family: var(--font-display); font-size: clamp(4rem, 13vw, 9rem); font-weight: 700; letter-spacing: -0.09em; text-shadow: 0 0 36px oklch(78% 0.185 96 / 0.25); }
.stage-caption { position: absolute; right: 16px; bottom: 14px; left: 16px; display: flex; justify-content: space-between; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.64rem; }
.road-stage { display: grid; min-height: 280px; align-items: center; padding: 30px 20px; }
.road-lane { position: relative; height: 78px; border-top: 1px dashed var(--color-rule); border-bottom: 1px dashed var(--color-rule); background: repeating-linear-gradient(90deg, transparent 0 59px, oklch(95% 0.018 150 / 0.08) 60px 61px); }
.road-path { position: absolute; top: 50%; right: 5%; left: 5%; height: 3px; transform: translateY(-50%); background: linear-gradient(90deg, var(--color-accent-deep), var(--color-accent)); }
.road-person { position: absolute; top: 50%; left: 57%; display: grid; width: 56px; height: 56px; place-items: center; transform: translate(-50%, -50%); border: 1px solid var(--color-accent); border-radius: 50%; color: var(--color-accent-ink); background: var(--color-accent); font-size: 1.55rem; }
.road-steps { display: flex; justify-content: space-between; gap: 8px; margin-top: 24px; }
.road-step { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--color-rule); border-radius: 50%; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.72rem; }
.road-step.safe { border-color: oklch(78% 0.185 96 / 0.42); color: var(--color-accent); background: oklch(78% 0.185 96 / 0.09); }
.apple-stage { display: grid; gap: 10px; padding: 20px; }
.apple-row { display: grid; grid-template-columns: 56px repeat(5, minmax(74px, 1fr)); gap: 12px; align-items: center; }
.row-number { color: var(--color-faint); font-family: var(--font-mono); font-size: 0.65rem; }
.apple-cell { display: grid; min-height: 118px; place-items: center; border: 1px solid var(--color-rule); border-radius: 10px; color: var(--color-muted); background: var(--color-surface-raised); font-family: var(--font-mono); font-size: 0.72rem; }
.apple-cell.recommended { border-color: var(--color-accent); color: var(--color-accent-ink); background: var(--color-accent); box-shadow: 0 0 22px oklch(78% 0.185 96 / 0.12); }
.apple-cell.danger { color: var(--color-error); }
  .mine-stage { display: grid; place-items: center; padding: 24px; }
 .mines-embedded-stage, .football-embedded-stage { min-height: 620px; padding: 0; overflow: hidden; border-color: oklch(78% 0.185 96 / 0.34); background: #07130e; }
 .mines-game-embed, .football-game-embed, .external-game-embed { position: relative; z-index: 1; display: block; width: 100%; height: min(78dvh, 760px); min-height: 560px; border: 0; background: #07130e; pointer-events: auto; touch-action: manipulation; }
 .external-game-stage { min-height: 0; height: clamp(420px, 58dvh, 560px); padding: 0; overflow: hidden; border-color: #9ccfbb; background: #07130e; }
  .external-game-embed { height: 100%; min-height: 0; }
  .game-view .game-action-row { display: none; }
  .game-view [data-game-action="aviator-start"], .game-view [data-game-action="mine-start"], .game-view [data-game-action="mine-reset"], .game-view [data-game-action="chicken-step"], .game-view [data-game-action="football-run"] { display: none; }
  .game-view .game-actions:has([data-game-action="aviator-start"]), .game-view .game-actions:has([data-game-action="mine-start"]) { display: none; }

.mine-grid { display: grid; width: min(100%, 360px); grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mine-cell { display: grid; aspect-ratio: 1; place-items: center; border: 1px solid var(--color-rule); border-radius: 9px; color: var(--color-muted); background: var(--color-surface-raised); font-family: var(--font-mono); font-size: 0.7rem; }
.mine-cell.recommended { border-color: var(--color-accent); color: var(--color-accent); background: oklch(78% 0.185 96 / 0.12); }
.mine-cell.mine { color: var(--color-error); }
.football-stage { display: grid; min-height: 300px; place-items: center; padding: 26px 16px; }
.goal { position: relative; width: min(100%, 500px); height: 215px; border: 4px solid oklch(95% 0.018 150 / 0.82); border-bottom-width: 6px; background: linear-gradient(180deg, transparent, oklch(12% 0.028 155 / 0.44)); box-shadow: inset 0 0 0 1px oklch(95% 0.018 150 / 0.16); }
.goal::before, .goal::after { position: absolute; inset: 0; background-image: linear-gradient(90deg, transparent 24%, oklch(95% 0.018 150 / 0.19) 25%, transparent 26%, transparent 49%, oklch(95% 0.018 150 / 0.19) 50%, transparent 51%, transparent 74%, oklch(95% 0.018 150 / 0.19) 75%, transparent 76%), linear-gradient(transparent 24%, oklch(95% 0.018 150 / 0.19) 25%, transparent 26%, transparent 49%, oklch(95% 0.018 150 / 0.19) 50%, transparent 51%, transparent 74%, oklch(95% 0.018 150 / 0.19) 75%, transparent 76%); background-size: 58px 58px; content: ''; pointer-events: none; }
.keeper { position: absolute; z-index: 2; bottom: -8px; left: 48%; width: 55px; height: 120px; transform: translateX(-50%); border: 2px solid var(--color-accent); border-radius: 30px 30px 8px 8px; background: oklch(31% 0.07 150); }
.keeper::before { position: absolute; top: -27px; left: 10px; width: 31px; height: 31px; border: 2px solid var(--color-accent); border-radius: 50%; background: oklch(20% 0.038 155); content: ''; }
.shot-line { position: absolute; z-index: 3; top: 52%; left: 49%; width: 42%; height: 2px; transform: rotate(-20deg); transform-origin: left center; background: var(--color-accent); box-shadow: 0 0 12px var(--color-accent); }
.shot-ball { position: absolute; z-index: 4; top: 39%; right: 5%; width: 16px; height: 16px; border: 2px solid var(--color-accent-ink); border-radius: 50%; background: var(--color-accent); }
.zone-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: min(100%, 500px); margin-top: 15px; }
.zone { display: grid; min-height: 28px; place-items: center; border: 1px solid var(--color-rule); color: var(--color-faint); font-family: var(--font-mono); font-size: 0.62rem; }
.zone.selected { border-color: var(--color-accent); color: var(--color-accent); background: oklch(78% 0.185 96 / 0.11); }
.analysis-side { display: grid; gap: var(--space-6); }
.result-card { padding: 22px; border: 1px solid oklch(78% 0.185 96 / 0.28); border-radius: var(--radius-md); background: oklch(78% 0.185 96 / 0.07); }
.result-card h3 { color: var(--color-accent); }
.result-card p { color: var(--color-muted); font-size: 0.8rem; }
.result-card p:last-child { margin-bottom: 0; }
.result-empty { color: var(--color-faint); font-size: 0.82rem; }
.control-stack { display: grid; gap: 14px; }
.control-stack label { color: var(--color-muted); font-family: var(--font-mono); font-size: 0.67rem; letter-spacing: 0.05em; text-transform: uppercase; }
.control-stack select { width: 100%; min-height: 44px; margin-top: 7px; padding: 0 12px; border: 1px solid var(--color-rule); border-radius: var(--radius-sm); color: var(--color-ink); background: var(--color-surface-raised); }
.history-list { display: grid; gap: 0; max-height: 300px; overflow-y: auto; }
.history-item { display: grid; gap: 4px; padding: 13px 0; border-bottom: 1px solid var(--color-rule); }
.history-item:last-child { border-bottom: 0; }
.history-item strong { color: var(--color-ink); font-size: 0.8rem; }
.history-item span { color: var(--color-faint); font-family: var(--font-mono); font-size: 0.62rem; }

.profile-view, .activity-view { display: grid; gap: var(--space-6); }
.profile-grid-large { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: var(--space-6); align-items: start; }
.profile-identity { display: flex; align-items: center; gap: 16px; padding: 24px; border-bottom: 1px solid var(--color-rule); }
.profile-identity .avatar { width: 56px; height: 56px; font-size: 1.3rem; }
.profile-identity h2 { margin-bottom: 4px; }
.profile-identity p { margin-bottom: 0; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.72rem; }
.profile-body { padding: 24px; }
.withdrawal-card { padding: 24px; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); }
.withdrawal-card.locked { border-color: oklch(84% 0.15 92 / 0.2); }
.withdrawal-card h2 { margin-bottom: 10px; }
.withdrawal-card p { color: var(--color-muted); font-size: 0.82rem; }
.manual-balance-panel .manual-balance-note { margin-bottom: var(--space-4); color: var(--color-muted); font-size: 0.82rem; }
.manual-balance-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); }
.manual-balance-form label { flex: 1 1 240px; min-width: 200px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-faint); }
.manual-balance-form input { width: 100%; min-height: 48px; margin-top: 7px; padding: 0 14px; border: 1px solid var(--color-rule); border-radius: var(--radius-sm); outline: 0; color: var(--color-ink); background: var(--color-surface); font-family: var(--font-sans); text-transform: none; }
.manual-balance-form button { flex: 0 0 auto; }
.activity-table { width: 100%; border-collapse: collapse; }
.activity-table th, .activity-table td { padding: 14px 12px; border-bottom: 1px solid var(--color-rule); text-align: left; }
.activity-table th { color: var(--color-faint); font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.activity-table td { color: var(--color-muted); font-size: 0.78rem; }
.activity-table td strong { color: var(--color-ink); }
.table-overflow { overflow-x: auto; }
.mobile-only { display: none; }

.legal-dialog { width: min(680px, calc(100% - 32px)); max-height: min(80dvh, 620px); padding: 30px; border: 1px solid var(--color-rule); border-radius: var(--radius-md); color: var(--color-ink); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.legal-dialog::backdrop { background: oklch(6% 0.03 155 / 0.76); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 14px; right: 14px; display: grid; width: 36px; height: 36px; min-height: 36px; place-items: center; border: 1px solid var(--color-rule); border-radius: 50%; color: var(--color-muted); background: transparent; font-size: 1.3rem; }
.legal-dialog h2 { padding-right: 40px; }
.legal-dialog p { color: var(--color-muted); font-size: 0.88rem; }
.legal-dialog p:last-child { margin-bottom: 0; }
.game-frame-dialog { width: min(1040px, calc(100vw - 24px)); height: min(88dvh, 760px); max-width: none; padding: 0; overflow: hidden; border: 1px solid var(--color-accent); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.game-frame-dialog::backdrop { background: oklch(6% 0.03 155 / 0.82); backdrop-filter: blur(4px); }
.game-frame-head { display: flex; align-items: center; min-height: 48px; padding: 0 56px 0 18px; border-bottom: 1px solid var(--color-rule); background: linear-gradient(90deg, var(--platform-green-deep), var(--platform-green)); }
.game-frame-title { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.06em; color: var(--color-ink); }
.game-frame-embed { display: block; width: 100%; height: calc(100% - 48px); border: 0; background: #06120c; }
.game-frame-dialog .dialog-close { z-index: 2; color: var(--color-ink); }
.game-card-live { border-color: var(--color-accent); background: linear-gradient(135deg, oklch(46% 0.095 165 / 0.55), var(--color-surface)); }
.game-card-live::after { border-color: var(--color-accent); }
.game-card-live strong { color: var(--color-accent); }

.admin-body { padding: 28px; background: radial-gradient(circle at 85% 0%, oklch(27% 0.08 145 / 0.2), transparent 34%), var(--color-canvas); }
.admin-frame { width: min(1440px, 100%); margin: 0 auto; }
.admin-dashboard { padding-bottom: 60px; }
.admin-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.admin-header h1 { font-size: clamp(2.4rem, 6vw, 5.2rem); }
.filter-bar { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; padding: 16px; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-surface); }
.table-wrap table { width: 100%; min-width: 960px; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 14px 16px; border-bottom: 1px solid var(--color-rule); text-align: left; white-space: nowrap; }
.table-wrap th { color: var(--color-faint); font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.09em; text-transform: uppercase; }
.table-wrap td { color: var(--color-muted); font-size: 0.78rem; }
.table-wrap td strong { color: var(--color-ink); }
.admin-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.admin-stat { padding: 14px; border: 1px solid var(--color-rule); border-radius: 10px; background: var(--color-surface-raised); }
.admin-stat span, .detail-label { display: block; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.62rem; text-transform: uppercase; }
.admin-stat strong { display: block; margin-top: 7px; font-family: var(--font-display); font-size: 1.5rem; }
.detail-section { margin-top: 22px; }
.detail-section h3 { color: var(--color-accent); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.workspace-main, .auth-card, .onboarding-card { animation: rise 420ms ease both; }

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 210px minmax(0, 1fr); }
  .game-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-card-wide { grid-column: span 1; }
  .dashboard-grid, .game-layout, .profile-grid-large { grid-template-columns: 1fr; }
  .analysis-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-side > :last-child { grid-column: span 2; }
  .filter-bar { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 780px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-card-wrap { min-height: 100dvh; padding: 26px 20px; }
  .auth-card .brand-lockup { margin-bottom: 60px; }
  .workspace { display: block; }
  .side-rail { display: none; }
  .workspace-main { padding: 18px 16px 92px; }
  .mobile-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 30px; }
  .mobile-bottom-nav { position: fixed; z-index: 10; right: 12px; bottom: 12px; left: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; border: 1px solid var(--color-rule); border-radius: 17px; background: oklch(14% 0.03 155 / 0.94); box-shadow: var(--shadow-soft); backdrop-filter: blur(18px); }
  .mobile-bottom-nav .nav-button { justify-content: center; padding: 0 5px; font-size: 0.68rem; }
  .mobile-bottom-nav .nav-icon { display: none; }
  .workspace-header { display: block; margin-bottom: 26px; }
  .header-actions { justify-content: flex-start; margin-top: 18px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric { min-height: 104px; padding: 14px; }
  .metric-label { margin-bottom: 16px; }
  .metric-value { font-size: 1.65rem; }
  .two-column, .analysis-side { grid-template-columns: 1fr; }
  .analysis-side > :last-child { grid-column: auto; }
  .statement-footer { grid-template-columns: 1fr; margin-top: 44px; }
  .statement-footer p:last-child { text-align: left; }
  .game-hero { display: block; }
  .game-hero-number { display: block; margin-bottom: 16px; }
  .game-stage { min-height: 0; }
  .chart-wrap, .chart-wrap canvas { min-height: 230px; height: 230px; }
  .aviator-readout { grid-template-columns: 1fr; }
  .round-list { justify-content: flex-start; }
  .profile-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar .button { width: 100%; }
  .admin-body { padding: 18px 14px; }
  .admin-header { align-items: center; }
  .admin-header h1 { margin-bottom: 0; font-size: 2.7rem; }
}

@media (max-width: 420px) {
  .onboarding-layout { padding: 12px; }
  .onboarding-card { padding: 22px 16px; }
  .onboarding-card .brand-lockup { margin-bottom: 42px; }
  h1 { font-size: 2.35rem; }
  .panel-head, .panel-body { padding-right: 16px; padding-left: 16px; }
  .game-card-grid { gap: 8px; }
  .game-card { min-height: 126px; padding: 12px; }
  .game-card strong { font-size: 1.03rem; }
  .apple-stage { padding: 12px 8px; }
  .apple-row { grid-template-columns: 27px repeat(5, minmax(0, 1fr)); gap: 4px; }
  .apple-cell { min-height: 78px; border-radius: 7px; font-size: 0.62rem; }
  .mine-grid { gap: 5px; }
  .mine-cell { border-radius: 6px; font-size: 0.62rem; }
  .filter-bar { grid-template-columns: 1fr; }
  .admin-header { display: block; }
  .admin-header .button { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Final Betwinner Line layer: keep the sportsbook palette above legacy theme rules. */
body { background: #edf4f1 !important; }
.workspace { background: #edf4f1 !important; }
.side-rail { background: #f6faf8 !important; border-right: 1px solid #d4e2dd !important; }
.side-rail .brand-lockup { border-bottom: 1px solid #d4e2dd; }
.workspace-main { color: #17352c; }
.platform-topbar { background: linear-gradient(90deg, #07563f 0%, #138661 58%, #0a674b 100%) !important; border-bottom: 3px solid #056244 !important; }
.topbar-brand strong { color: #fff !important; }
.topbar-brand strong em { color: #ffd400 !important; }
.topbar-categories, .topbar-status { color: rgba(255,255,255,.84) !important; }
.topbar-category.active { color: #fff !important; }
.topbar-category.active::after { background: #ffd400 !important; }
.workspace-header h1 { color: #15382d !important; }
.metric-grid { border-color: #c8ddd5 !important; background: #c8ddd5 !important; }
.metric { background: #fff !important; }
.metric-value { color: #183a2f !important; }
.panel { border-color: #cadbd5 !important; background: #fff !important; box-shadow: 0 7px 22px rgba(4,57,39,.07) !important; }
.featured-panel, .game-stage { background: linear-gradient(145deg, #e5f4ed, #fff) !important; }
.game-card { border-color: #c6d9d1 !important; background: linear-gradient(145deg, #fff, #eaf4f0) !important; }
.game-card:hover, .game-card.active { border-color: #18a275 !important; background: #ddf3e9 !important; }
.button-primary { color: #1b3328 !important; background: #ffd400 !important; box-shadow: 0 3px 0 #c49e00; }
.button-ghost { color: #147654 !important; border-color: #9fcab7 !important; background: #f4fbf7 !important; }
.game-stage .visual-stage, .chart-wrap { background: linear-gradient(180deg, #083c2b, #061e16) !important; }
.aviator-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-bottom: 14px; }
.aviator-live-badge { display: grid; min-height: 46px; align-content: center; padding: 7px 12px; border: 1px solid #afd6c5; border-radius: 7px; background: #eff9f4; }
.aviator-live-badge strong { color: #087d59; font-size: .78rem; }
.aviator-live-badge small { color: #759188; font-size: .68rem; }
@media (max-width: 780px) { .aviator-control-grid { grid-template-columns: 1fr; } }


[hidden] { display: none !important; }

/* Betwinner Line visual system: dense sportsbook shell with yellow-green contrast. */
:root {
  --color-canvas: #071b16;
  --color-surface: #f1f6f3;
  --color-surface-raised: #e2eee9;
  --color-surface-bright: #ffffff;
  --color-rule: #c6d8d1;
  --color-ink: #17352c;
  --color-muted: #5c746b;
  --color-faint: #789087;
  --color-accent: #ffd400;
  --color-accent-deep: #e3b900;
  --color-accent-ink: #172b23;
  --color-success: #23a77b;
  --platform-green: #087d59;
  --platform-green-deep: #075940;
  --shadow-soft: 0 16px 42px rgba(0, 45, 30, .14);
}
body { background: #edf4f1; }
.workspace { grid-template-columns: 256px minmax(0, 1fr); background: #edf4f1; }
.side-rail { border-right: 0; background: #f6faf8; box-shadow: 5px 0 20px rgba(0, 49, 34, .08); }
.side-rail .brand-lockup { padding: 10px 12px 20px; border-bottom: 1px solid #d4e2dd; }
.brand-mark, .topbar-mark { border: 0; border-radius: 5px; color: #123b2d; background: var(--color-accent); transform: none; box-shadow: 0 3px 0 rgba(174, 137, 0, .32); }
.brand-mark::after { display: none; }
.brand-lockup strong, .topbar-brand strong { font-family: Arial, sans-serif; font-weight: 900; letter-spacing: -.04em; }
.brand-lockup strong { color: #197955; }
.brand-lockup strong em, .topbar-brand strong em { color: var(--color-accent-deep); }
.brand-lockup small { color: #6d877d; }
.rail-label { color: #759188; font-family: Arial, sans-serif; font-weight: 700; letter-spacing: .04em; }
.nav-button, .game-nav { color: #46665a; border-radius: 5px; font-family: Arial, sans-serif; }
.nav-button:hover, .nav-button.active, .game-nav:hover, .game-nav.active { color: #fff; background: #188b68; }
.nav-button.active { box-shadow: none; }
.game-nav.active::before { display: none; }
.game-nav.active .game-dot, .game-dot { background: var(--color-accent); box-shadow: none; }
.workspace-main { padding: 0 clamp(18px, 2.8vw, 48px) 80px; }
.platform-topbar { min-height: 58px; margin: 0 calc(clamp(18px, 2.8vw, 48px) * -1) 20px; padding: 0 clamp(18px, 2.8vw, 48px); gap: 22px; background: linear-gradient(90deg, #07563f, #138661 58%, #0a674b); border-bottom: 3px solid #056244; box-shadow: 0 4px 14px rgba(0, 46, 31, .16); }
.topbar-brand strong { color: #fff; font-size: 1.06rem; }
.topbar-brand small { color: rgba(255,255,255,.7); }
.topbar-categories { justify-content: flex-start; gap: 26px; color: rgba(255,255,255,.8); font-family: Arial, sans-serif; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.topbar-category.active { color: #fff; }
.topbar-category.active::after { background: var(--color-accent); }
  .topbar-status { display: flex; align-items: center; gap: 8px; margin-left: auto; color: #fff; }
  .topbar-auth-button { min-height: 34px; padding: 0 15px; border: 0; border-radius: 6px; font-family: Arial, sans-serif; font-size: .72rem; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease; }
  .topbar-auth-button:hover { transform: translateY(-1px); }
  .topbar-register { color: #16372b; background: #ffd400; }
  .topbar-login { color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26); }
.workspace-header h1 { color: #15382d; font-family: Arial, sans-serif; font-weight: 900; letter-spacing: -.045em; }
.eyebrow, .panel-kicker { color: #16815f; }
.lede, .panel-copy { color: #668077; }
.status-badge { color: #138762; border-color: #8bcdb5; background: #e1f3eb; }
.metric-grid { border-color: #c8ddd5; background: #c8ddd5; }
.metric { background: #fff; }
.metric:first-child { background: linear-gradient(135deg, #e5f6ee, #fff); }
.metric-label { color: #789188; }
.metric-value { color: #183a2f; }
.panel { border-color: #cadbd5; background: #fff; box-shadow: 0 7px 22px rgba(4, 57, 39, .07); }
.featured-panel, .game-stage { border-color: #9ccfbb; background: linear-gradient(145deg, #e5f4ed, #fff); }
.game-card { border-color: #c6d9d1; background: linear-gradient(145deg, #fff, #eaf4f0); }
.game-card:hover, .game-card.active { border-color: #18a275; background: #ddf3e9; }
.game-card strong { color: #1a4939; }
.chart-wrap, .visual-stage { border-color: #79bb9f; background: linear-gradient(180deg, #083c2b, #061e16); }
.big-readout { color: var(--color-accent-deep); text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.game-layout { grid-template-columns: minmax(0, 1.55fr) minmax(320px, .65fr); }
.aviator-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; margin-bottom: 14px; }
.aviator-live-badge { display: grid; min-height: 46px; align-content: center; padding: 7px 12px; border: 1px solid #afd6c5; border-radius: 7px; background: #eff9f4; }
.aviator-live-badge strong { color: #087d59; font-size: .78rem; }
.aviator-live-badge small { color: #759188; font-size: .68rem; }
.control-fields select, .control-fields input { color: #1a4033; background: #fff; border-color: #bfd5cb; }
.button-primary { color: #1b3328; background: var(--color-accent); box-shadow: 0 3px 0 #c49e00; }
.button-primary:hover:not(:disabled) { background: #ffe14a; }
.button-ghost { color: #147654; border-color: #9fcab7; background: #f4fbf7; }

@media (max-width: 780px) { .platform-topbar { min-height: 54px; margin-bottom: 16px; } .topbar-categories { display: none; } .aviator-control-grid { grid-template-columns: 1fr; } }


/* Verdant Signal redesign pass: platform shell + finite game motion */
:root {
  --color-canvas: #edf4f1;
  --color-surface: #ffffff;
  --color-surface-raised: #eaf3ef;
  --color-surface-bright: #f8fbfa;
  --color-rule: #c6d8d1;
  --color-ink: #17352c;
  --color-muted: #5c746b;
  --color-faint: #789087;
  --color-accent: #ffd400;
  --color-accent-deep: #e3b900;
  --color-accent-ink: #172b23;
  --color-warning: #c89800;
  --color-error: #b84e45;
  --shadow-soft: 0 16px 42px rgba(0, 45, 30, .12);
  --platform-green: #087d59;
  --platform-green-deep: #075940;
  --motion-snap: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

html, body { overflow-x: clip; }
body { background: var(--color-canvas); }
.auth-layout { background: #edf4f1; }
.auth-visual { border-right-color: #d4e2dd; background: #e7f2ee; }
.auth-visual::before { border-color: rgba(19, 135, 98, .12); }
.auth-visual::after { border-color: rgba(19, 135, 98, .08); }
.auth-card-wrap { background: #f4f8f6; }
.signal-readout { border-color: #c8ddd5; background: #c8ddd5; }
.signal-readout div { background: rgba(255, 255, 255, .72); }
.signal-readout strong { color: #16815f; }
.onboarding-layout { background: #edf4f1; }
.onboarding-card { border-color: #cadbd5; background: #fff; box-shadow: var(--shadow-soft); }
.auth-legal .text-link, .auth-legal a, .onboarding-card .text-link { color: #16815f; }
h1, h2, h3 { text-wrap: balance; }
.workspace { grid-template-columns: 236px minmax(0, 1fr); background: linear-gradient(90deg, rgba(2, 18, 12, 0.9), transparent 28%), var(--color-canvas); }
.side-rail { padding: 22px 15px 18px; border-right-color: rgba(156, 229, 158, 0.18); background: #03180f; }
.side-rail .brand-lockup { padding: 0 10px; }
.brand-link { color: var(--color-ink); }
.brand-link:hover { color: var(--color-accent); }
.brand-mark { border-radius: 9px; transform: rotate(-8deg); }
.brand-mark::after { display: block; width: 13px; height: 2px; background: currentColor; content: ''; transform: translate(8px, 9px) rotate(-38deg); }
.rail-label { margin-top: 31px; }
.game-nav { position: relative; min-height: 46px; gap: 10px; padding-inline: 10px; border: 1px solid transparent; }
.game-nav:hover, .game-nav.active { border-color: rgba(163, 237, 140, 0.24); background: linear-gradient(90deg, rgba(65, 178, 104, 0.18), transparent); }
.game-nav.active::before { position: absolute; inset: 7px auto 7px 0; width: 2px; background: var(--color-accent); content: ''; }
.game-nav-icon { width: 20px; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.62rem; }
.game-nav.active .game-nav-icon { color: var(--color-accent); }
.game-nav .game-dot { margin-left: auto; }
.workspace-main { padding: 0 clamp(18px, 3.1vw, 52px) 80px; }
.platform-topbar { display: flex; min-height: 76px; align-items: center; gap: 26px; margin: 0 calc(clamp(18px, 3.1vw, 52px) * -1) 43px; padding: 0 clamp(18px, 3.1vw, 52px); border-bottom: 1px solid rgba(183, 243, 170, 0.35); background: linear-gradient(90deg, var(--platform-green-deep), var(--platform-green) 50%, #0b6337); box-shadow: 0 8px 32px rgba(1, 20, 10, 0.28); }
.topbar-brand { display: flex; min-width: max-content; align-items: center; gap: 10px; color: var(--color-ink); }
.topbar-brand:hover { color: var(--color-accent); }
.topbar-brand strong, .topbar-brand small { display: block; }
.topbar-brand strong { font-family: var(--font-display); font-size: 0.93rem; letter-spacing: 0.12em; }
.topbar-brand small { margin-top: 3px; color: rgba(231, 255, 219, 0.62); font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.14em; text-transform: uppercase; }
.topbar-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(210, 255, 189, 0.8); border-radius: 7px; color: #ddffbe; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; transform: rotate(-8deg); }
.topbar-categories { display: flex; flex: 1; justify-content: center; gap: 25px; color: rgba(235, 255, 226, 0.63); font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.13em; text-transform: uppercase; }
.topbar-category { position: relative; padding: 9px 0; }
.topbar-category.active { color: #e6ffc9; }
.topbar-category.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: #c5f6a6; content: ''; }
.topbar-status { display: flex; min-width: max-content; align-items: center; gap: 8px; color: rgba(235, 255, 226, 0.75); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; }
.connection-indicator, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 0 4px rgba(163, 237, 140, 0.13); }
.topbar-status .language-select { min-height: 36px; margin-left: 12px; border-color: rgba(225, 255, 210, 0.25); color: var(--color-ink); background: rgba(2, 35, 19, 0.3); }
#main-content { min-width: 0; }
.workspace-header { max-width: 1440px; margin-bottom: 30px; }
.workspace-header h1 { max-width: 780px; font-size: clamp(2.5rem, 5vw, 4.9rem); }
.workspace-header .eyebrow { letter-spacing: 0.18em; }
.content-width { max-width: 1440px; }
.status-strip { margin-bottom: 18px; }
.status-strip-note { margin-left: auto; color: var(--color-faint); font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.04em; }
.metric-grid { margin-bottom: 26px; border-color: rgba(143, 217, 148, 0.2); background: rgba(143, 217, 148, 0.2); }
.metric { min-height: 114px; padding: 16px 18px; background: rgba(7, 35, 23, 0.92); }
.metric:first-child { background: linear-gradient(135deg, rgba(20, 75, 45, 0.78), rgba(7, 35, 23, 0.95)); }
.metric-value { font-variant-numeric: tabular-nums; }
.metric-value.is-open { color: var(--color-accent); }
.dashboard-grid { grid-template-columns: minmax(0, 1.4fr) minmax(288px, 0.68fr); gap: 28px; }
.panel { border-color: rgba(126, 211, 143, 0.22); border-radius: 12px; box-shadow: 0 14px 36px rgba(1, 16, 9, 0.2); }
.panel-head { padding: 20px 22px 0; }
.panel-body { padding: 20px 22px; }
.panel-copy { max-width: 430px; }
.featured-panel { border-color: rgba(163, 237, 140, 0.35); background: linear-gradient(150deg, rgba(11, 55, 34, 0.96), rgba(6, 30, 20, 0.97)); }
.featured-panel .panel-head { align-items: center; }
.featured-panel .panel-head h2 { font-size: clamp(1.55rem, 3vw, 2.7rem); }
.game-card-grid { gap: 10px; margin-top: 18px; }
.games-section { margin-top: 29px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(1.45rem, 2.5vw, 2.15rem); }
.section-count { color: var(--color-faint); font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.08em; text-transform: uppercase; }
.game-card { min-height: 135px; padding: 15px; border-radius: 10px; background: linear-gradient(145deg, rgba(14, 53, 34, 0.86), rgba(7, 31, 21, 0.96)); transition: transform 180ms var(--motion-snap), border-color 180ms ease, background 180ms ease; }
.game-card::after { width: 78px; height: 78px; border-color: rgba(163, 237, 140, 0.16); }
.game-card:hover, .game-card.active { border-color: rgba(163, 237, 140, 0.66); background: linear-gradient(145deg, rgba(18, 75, 44, 0.9), rgba(8, 36, 23, 0.98)); transform: translateY(-2px); }
.game-card strong { font-size: 1.14rem; }
.game-card span:last-child { display: flex; align-items: center; gap: 8px; }
.game-card span:last-child .game-dot { display: inline-block; flex: 0 0 auto; }
  .beta-section { margin-top: 25px; padding: 22px 24px; border: 1px solid #b7d9c9; border-left: 4px solid #f2c900; border-radius: 8px; background: linear-gradient(135deg, #f4fbf7, #e5f4ed); box-shadow: 0 8px 22px rgba(4,57,39,.06); }
 .beta-section .section-heading { align-items: center; }
  .beta-section h3 { color: #174d3b; font-family: Arial, sans-serif; font-weight: 800; }
  .beta-section > p { max-width: 520px; margin: 12px 0 0; color: #557369; font-size: 0.86rem; }
  .beta-stamp { color: #138762; font-weight: 800; }
.desktop-utility, .utility-stack { display: grid; gap: 20px; }
.mobile-utility { display: none; }
.statement-footer { margin-top: 60px; }

/* Shared game terminal */
.game-view { gap: 28px; }
.game-header { margin-bottom: 28px; }
.game-header .header-actions .game-exit-button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px; border: 1px solid rgba(163, 237, 140, 0.4); border-radius: 8px; color: #17372b; background: var(--color-accent); font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.game-header .header-actions .game-exit-button:hover { background: #b9f19b; }
.game-exit-icon { font-size: 0.9rem; line-height: 1; }
.game-layout { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 24px; }
.game-stage { padding: 18px; border-color: rgba(163, 237, 140, 0.28); background: linear-gradient(150deg, rgba(9, 43, 27, 0.98), rgba(4, 26, 18, 0.98)); }
.stage-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.stage-topline > div { display: flex; align-items: center; gap: 10px; }
.stage-index { color: var(--color-accent); font-family: var(--font-mono); font-size: 0.68rem; }
.stage-topline .round-state { color: var(--color-warning); }
.visual-stage { border-color: rgba(163, 237, 140, 0.22); border-radius: 8px; background: #061f14; }
.stage-caption { z-index: 3; color: #a0c7a7; }
.game-side { display: grid; align-content: start; gap: 16px; }
.game-side .panel { box-shadow: none; }
.control-panel { border-color: rgba(163, 237, 140, 0.34); }
.control-fields { display: grid; gap: 14px; }
.control-fields label { display: grid; gap: 6px; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; }
.control-fields select, .control-fields input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--color-rule); border-radius: 7px; outline: 0; color: var(--color-ink); background: var(--color-surface-raised); }
.control-fields input:focus, .control-fields select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(163, 237, 140, 0.12); }
.field-hint, .control-note { color: var(--color-faint); font-family: var(--font-body); font-size: 0.76rem; line-height: 1.45; letter-spacing: 0; text-transform: none; }
.control-note { padding: 10px 12px; border-left: 1px solid var(--color-accent-deep); background: rgba(79, 183, 112, 0.08); }
.game-action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.game-action-row .button { flex: 1 1 160px; }
.button { border-radius: 7px; font-size: 0.69rem; letter-spacing: 0.06em; text-transform: uppercase; transition: transform 150ms var(--motion-snap), border-color 150ms ease, color 150ms ease, background 150ms ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
/* Every tappable game object gets the same visible pressed feedback, not just .button elements. */
.mine-overlay .mine-cell:active:not(:disabled), .apple-cell:active:not(:disabled), .goal-zone:active:not(:disabled) { transform: scale(0.94); }
.apple-cell, .goal-zone { transition: transform 120ms var(--motion-snap), border-color 150ms ease, background 150ms ease; }
.button-primary { background: linear-gradient(135deg, #b0f28b, #72d77b); box-shadow: 0 9px 22px rgba(83, 194, 93, 0.16); }
.button-primary:hover:not(:disabled) { background: #c3fa9b; }
.button-ghost { border-color: rgba(163, 237, 140, 0.28); }
.result-panel { background: linear-gradient(145deg, rgba(14, 58, 35, 0.8), rgba(6, 31, 20, 0.98)); }
.result-detail { color: var(--color-ink); font-family: var(--font-mono); font-size: 0.77rem; }
.result-stamp { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--color-rule); color: var(--color-accent); font-family: var(--font-mono); font-size: 0.61rem; letter-spacing: 0.08em; }
.result-empty { display: grid; min-height: 116px; align-content: center; gap: 7px; }
.result-empty p, .result-empty small { margin: 0; }
.result-empty small, .empty-state small { color: var(--color-faint); font-size: 0.72rem; }
.empty-mark { color: var(--color-accent-deep); font-family: var(--font-mono); font-size: 1.2rem; }

/* Aviator: one canvas owns trace, plane and crash moment */
.aviator-stage { min-height: 430px; background: radial-gradient(circle at 72% 43%, rgba(47, 151, 75, 0.2), transparent 30%), #041b11; }
.aviator-stage::before { opacity: 0.58; background-size: 52px 52px; }
.aviator-stage canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.aviator-grid-labels { position: absolute; z-index: 2; top: 24px; bottom: 48px; left: 14px; display: flex; flex-direction: column; justify-content: space-between; color: rgba(180, 219, 176, 0.62); font-family: var(--font-mono); font-size: 0.61rem; }
.aviator-center-readout { position: absolute; z-index: 2; top: 43%; left: 50%; display: grid; justify-items: center; transform: translate(-50%, -50%); }
.aviator-center-readout strong { color: #b8ff9e; font-family: var(--font-display); font-size: clamp(3.6rem, 10vw, 7.2rem); letter-spacing: -0.09em; line-height: 0.84; text-shadow: 0 0 25px rgba(139, 241, 108, 0.18); }
.aviator-center-readout .round-state { margin-top: 18px; color: var(--color-warning); font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; }
.aviator-stage[data-phase="countdown"] .aviator-center-readout strong { color: var(--color-warning); }
.aviator-stage[data-phase="crash"] .aviator-center-readout strong { color: var(--color-warning); animation: crash-readout 650ms ease both; }
.aviator-stage[data-phase="crash"]::after { position: absolute; z-index: 4; inset: 0; background: rgba(240, 202, 108, 0.18); content: ''; pointer-events: none; animation: crash-flash 650ms ease both; }
.aviator-axis { position: absolute; z-index: 2; right: 16px; bottom: 14px; left: 58px; display: flex; justify-content: space-between; color: rgba(180, 219, 176, 0.62); font-family: var(--font-mono); font-size: 0.61rem; }

/* Chicken Road: target, jump and terminal fall are separate states */
.chicken-road-stage { min-height: 430px; padding: 24px 22px; background: radial-gradient(circle at 45% 18%, rgba(150, 157, 67, 0.22), transparent 28%), linear-gradient(180deg, #183b26, #071f16 63%, #051810); }
.road-sky { position: absolute; inset: 0 0 48% 0; opacity: 0.6; background: linear-gradient(160deg, transparent 55%, rgba(177, 210, 124, 0.1)); }
.road-cloud { position: absolute; width: 84px; height: 21px; border: 1px solid rgba(213, 235, 172, 0.18); border-radius: 50%; }
.cloud-a { top: 24%; left: 16%; }.cloud-b { top: 39%; right: 14%; transform: scale(0.7); }
.road-track { position: relative; z-index: 1; display: flex; min-height: 226px; align-items: end; margin-top: 45px; padding: 35px 12px 36px; border: 1px solid rgba(205, 235, 164, 0.26); border-radius: 18px 18px 7px 7px; background: repeating-linear-gradient(156deg, transparent 0 19px, rgba(225, 245, 178, 0.08) 20px 21px), linear-gradient(180deg, rgba(61, 118, 55, 0.35), rgba(5, 24, 16, 0.94)); box-shadow: inset 0 -18px 32px rgba(1, 11, 7, 0.35); }
.road-edge { position: absolute; right: 12px; bottom: 18px; left: 12px; border-top: 1px dashed rgba(209, 242, 174, 0.34); }
.road-cells { display: grid; width: 100%; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; align-items: end; }
.road-step { position: relative; display: grid; min-height: 105px; place-items: center; align-content: center; gap: 6px; border: 1px solid rgba(209, 242, 174, 0.24); border-radius: 8px; color: rgba(219, 242, 183, 0.66); background: rgba(4, 27, 17, 0.67); transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--motion-snap); }
.road-step:nth-child(even) { transform: translateY(-12px); }
.road-step.is-target { border-color: var(--color-warning); background: rgba(240, 202, 108, 0.12); box-shadow: 0 0 0 3px rgba(240, 202, 108, 0.08); }
.road-step.is-cleared { border-color: rgba(163, 237, 140, 0.55); color: var(--color-accent); background: rgba(107, 208, 111, 0.14); }
.road-step.is-danger { border-color: rgba(241, 139, 114, 0.8); color: var(--color-error); background: rgba(241, 139, 114, 0.13); }
.step-number { font-family: var(--font-mono); font-size: 0.67rem; }.step-mark { font-size: 1.6rem; }
.chicken-actor { position: absolute; z-index: 3; bottom: 41px; left: 8%; display: grid; width: 49px; height: 49px; place-items: center; border: 2px solid #ffd778; border-radius: 50%; color: #27321b; background: #f1cc6e; box-shadow: 0 5px 0 rgba(1, 13, 8, 0.3); transition: left 420ms var(--motion-snap); }
.chicken-actor span { position: absolute; }.chicken-body { font-size: 1.8rem; }.chicken-wing { right: -6px; color: #db9e42; font-size: 1rem; }.chicken-feet { bottom: -11px; color: #f0bd62; font-size: 1.1rem; }
.chicken-road-stage[data-step="1"] .chicken-actor { left: 26%; }.chicken-road-stage[data-step="2"] .chicken-actor { left: 44%; }.chicken-road-stage[data-step="3"] .chicken-actor { left: 62%; }.chicken-road-stage[data-step="4"] .chicken-actor { left: 80%; }.chicken-road-stage[data-step="5"] .chicken-actor { right: 8%; left: auto; }
.chicken-road-stage.is-jumping .chicken-actor { animation: chicken-jump 620ms var(--motion-snap) both; }.chicken-road-stage.is-fallen .chicken-actor { border-color: var(--color-error); background: #ad6c59; animation: chicken-fall 520ms ease both; }
.road-readout { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; }.road-readout strong { display: block; color: var(--color-accent); font-family: var(--font-display); font-size: 1.7rem; }

/* Apple: wood board, current row and progressive reveal */
.apple-stage { min-height: 430px; padding: 25px 20px; background: radial-gradient(circle at 48% 30%, rgba(208, 141, 58, 0.18), transparent 31%), linear-gradient(180deg, #1a492d, #071e15 76%); }
.orchard-glow { position: absolute; top: -35%; left: 28%; width: 44%; aspect-ratio: 1; border-radius: 50%; background: rgba(177, 220, 90, 0.12); filter: blur(24px); }
.apple-board { position: relative; z-index: 1; display: grid; gap: 9px; width: min(100%, 610px); margin: 0 auto; padding: 15px 13px 18px; border: 4px solid #986333; border-radius: 14px; background: linear-gradient(145deg, #6f4828, #3a291c); box-shadow: 0 11px 0 #1a1710, inset 0 0 0 2px rgba(238, 182, 100, 0.24); }
.apple-row { grid-template-columns: 46px repeat(5, minmax(0, 1fr)); gap: 8px; padding: 5px; border-radius: 8px; background: rgba(13, 29, 18, 0.25); }
.apple-row.is-current { background: rgba(233, 187, 91, 0.14); outline: 1px solid rgba(247, 201, 103, 0.44); }
.row-number { display: grid; gap: 4px; color: #edc979; font-size: 0.68rem; }.row-number small { color: rgba(255, 224, 151, 0.7); font-size: 0.57rem; }
.apple-cells { display: contents; }
.apple-cell { position: relative; min-height: 132px; overflow: hidden; border: 1px solid rgba(239, 199, 113, 0.38); border-radius: 6px; color: rgba(255, 227, 163, 0.65); background: linear-gradient(145deg, #9b6a38, #634222); transition: transform 220ms var(--motion-snap), border-color 180ms ease, background 180ms ease; }
.apple-cell::before { position: absolute; inset: 5px; border: 1px solid rgba(255, 227, 163, 0.13); content: ''; }
.apple-cell:hover:not(:disabled) { border-color: #f8dc91; transform: translateY(-2px); }.apple-cell:disabled { cursor: not-allowed; opacity: 0.5; }.apple-cell.is-suggested { border-color: #baf08b; box-shadow: 0 0 0 2px rgba(186, 240, 139, 0.16); }.apple-cell.is-safe { color: #142d18; background: #b3eb80; }.apple-cell.is-danger { color: #fff0db; background: #a95b4d; }.apple-face { position: relative; z-index: 1; font-size: 3.4rem; transform: scale(2.4); }.apple-leaf { position: absolute; right: 6px; top: 4px; color: rgba(219, 247, 143, 0.65); font-size: 0.66rem; }.apple-cell.is-flipping { animation: apple-flip 520ms ease both; }

/* Apple of Fortune: full fairy-tale stage, wood board with side multiplier column */
.apple-game-stage { display: flex; flex-direction: column; min-height: 0; padding: clamp(8px, 1.4vw, 14px); }
.apple-balance-panel .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apple-round-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.apple-round-metric { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--color-rule); border-radius: 10px; background: var(--color-surface-raised); }
.apple-round-metric .metric-value { font-size: 1.1rem; }
.apple-round-metric-stake, .apple-round-metric-potential { border-color: #1f7a35; background: linear-gradient(160deg, #0f3d1c, #0a2812); box-shadow: inset 0 0 0 1px rgba(90, 230, 130, 0.18); }
.apple-round-metric-stake .metric-label, .apple-round-metric-potential .metric-label { color: #8ff0ab; }
.apple-stake-value, .apple-potential-value { color: #4ade6a !important; text-shadow: 0 0 14px rgba(74, 222, 106, 0.55); }
.apple-inline-message { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(230, 90, 90, 0.4); border-radius: 8px; background: rgba(230, 90, 90, 0.12); color: #ffb4b4; font-size: 0.85rem; }
.apple-cashout-btn { grid-column: 1 / -1; padding: 12px 20px; border: none; border-radius: 10px; color: #072b0f; background: linear-gradient(160deg, #6bf58f, #2fb559); box-shadow: 0 4px 0 #1f7a3b, 0 7px 12px rgba(0, 0, 0, 0.35); font-weight: 700; letter-spacing: 0.03em; cursor: pointer; }
.apple-fullstage { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; width: 100%; min-height: 560px; border: 1px solid #3a2716; border-radius: 16px; background: #0c1f14; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.apple-fullstage .apple-bg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.apple-fullstage .apple-vignette { position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 42%, transparent 42%, rgba(3, 12, 7, 0.55) 82%), linear-gradient(180deg, rgba(4, 12, 8, 0.25), transparent 18%, transparent 74%, rgba(3, 10, 6, 0.55)); pointer-events: none; }
.apple-fullstage .apple-character { position: absolute; z-index: 2; bottom: 0; height: 96%; max-width: 30%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.45)); pointer-events: none; }
.apple-fullstage .apple-queen { left: -2%; }
.apple-fullstage .apple-snow { right: -2%; }
.apple-fullstage .apple-logo { position: absolute; z-index: 5; top: 2%; right: 2%; width: clamp(96px, 14vw, 168px); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5)); pointer-events: none; }
.apple-fullstage .apple-panel { position: relative; z-index: 4; display: grid; gap: 10px; width: min(92%, 640px); margin: clamp(14px, 3vw, 30px) auto 0; padding: clamp(10px, 1.6vw, 18px); border: 5px solid #a1723c; border-radius: 16px; background: linear-gradient(150deg, #6d4a29, #392616); box-shadow: 0 14px 0 rgba(10, 8, 5, 0.55), inset 0 0 0 2px rgba(244, 197, 120, 0.24), 0 20px 34px rgba(0, 0, 0, 0.4); }
.apple-fullstage.is-signal-only .apple-panel { margin-bottom: clamp(18px, 3vw, 32px); }
.apple-fullstage .apple-vine { position: absolute; z-index: 6; width: clamp(56px, 9vw, 108px); pointer-events: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)); }
.apple-fullstage .apple-vine-left { top: -14px; left: -14px; }
.apple-fullstage .apple-vine-right { top: -14px; right: -14px; transform: scaleX(-1); }
.apple-fullstage .apple-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid rgba(244, 197, 120, 0.3); border-radius: 10px; background: linear-gradient(180deg, #241a10, #120c07); }
.apple-fullstage .apple-panel-title { flex: 1; overflow: hidden; color: #f4e6c6; font-family: var(--font-display); font-size: clamp(0.72rem, 1.6vw, 0.98rem); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.apple-fullstage .apple-icon-btn { display: grid; flex: none; width: clamp(28px, 4vw, 38px); height: clamp(28px, 4vw, 38px); place-items: center; border: none; border-radius: 50%; color: #fff; background: linear-gradient(160deg, #d24b3f, #a12a20); box-shadow: 0 3px 0 #6e1a13, 0 5px 10px rgba(0, 0, 0, 0.4); cursor: pointer; }
.apple-fullstage .apple-icon-btn:hover { filter: brightness(1.08); }
.apple-fullstage .apple-icon-btn.is-active { background: linear-gradient(160deg, #7a7a7a, #4a4a4a); box-shadow: 0 3px 0 #262626, 0 5px 10px rgba(0, 0, 0, 0.4); }
.apple-fullstage .apple-board { display: grid; gap: 5px; padding: 4px; }
.apple-fullstage .apple-row { display: flex; align-items: stretch; gap: 6px; }
.apple-fullstage .apple-row.is-current .apple-cells { outline: 1px solid rgba(247, 201, 103, 0.5); }
.apple-fullstage .apple-cells { display: grid; flex: 1; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; border-radius: 6px; }
.apple-fullstage .apple-cell { position: relative; min-height: 0; aspect-ratio: 2.4 / 1; overflow: hidden; padding: 0; border: none; border-radius: 4px; background: none; cursor: pointer; transition: transform 200ms var(--motion-snap); }
.apple-fullstage.is-signal-only .apple-cell { cursor: default; pointer-events: none; }
.apple-fullstage .apple-cell:hover:not(:disabled) { transform: translateY(-2px); }
.apple-fullstage .apple-cell:disabled { cursor: not-allowed; }
.apple-fullstage .apple-cell-inner { position: relative; display: block; width: 100%; height: 100%; }
.apple-fullstage .apple-tile { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35); }
.apple-fullstage .apple-cell.is-suggested .apple-tile { box-shadow: inset 0 0 0 2px #baf08b, 0 0 10px rgba(186, 240, 139, 0.5); }
.apple-fullstage .apple-cell.is-safe .apple-tile { box-shadow: inset 0 0 0 2px #b3eb80, 0 0 10px rgba(179, 235, 128, 0.5); }
.apple-fullstage .apple-cell.is-danger .apple-tile { box-shadow: inset 0 0 0 2px #e0685a, 0 0 10px rgba(224, 104, 90, 0.5); }
.apple-fullstage .apple-sprite { position: absolute; z-index: 2; top: 50%; left: 50%; width: 42%; transform: translate(-50%, -50%); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45)); }
.apple-fullstage .apple-cell-animation { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; }
.apple-fullstage .apple-cell.is-flipping .apple-sprite { animation: apple-flip 520ms ease both; }
.apple-fullstage .apple-row-multiplier { display: grid; flex: none; width: clamp(46px, 8vw, 66px); place-items: center; border: 1px solid rgba(180, 190, 196, 0.35); border-radius: 4px; color: #dfe6e8; background: linear-gradient(180deg, #8b969c, #5c666b); font-family: var(--font-mono); font-size: clamp(0.56rem, 1.2vw, 0.72rem); font-weight: 700; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 0 rgba(0, 0, 0, 0.25); }
.apple-fullstage .apple-row-multiplier.is-current { color: #2b1c08; background: linear-gradient(180deg, #f8dc91, #e0af4c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 12px rgba(248, 220, 145, 0.55); }
.apple-fullstage .apple-bottom-bar { position: relative; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 18px); width: min(92%, 640px); margin: clamp(10px, 2vw, 20px) auto 16px; padding: clamp(10px, 1.6vw, 16px); border: 4px solid #a1723c; border-radius: 14px; background: linear-gradient(150deg, #6d4a29, #392616); box-shadow: 0 12px 0 rgba(10, 8, 5, 0.5), inset 0 0 0 2px rgba(244, 197, 120, 0.2); }
.apple-fullstage .apple-stake-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.apple-fullstage .apple-chip { padding: 6px 10px; border: 1px solid rgba(200, 208, 212, 0.4); border-radius: 6px; color: #e8edee; background: linear-gradient(180deg, #8b969c, #5c666b); font-family: var(--font-mono); font-size: 0.72rem; cursor: pointer; }
.apple-fullstage .apple-chip.is-active { color: #2b1c08; background: linear-gradient(180deg, #f8dc91, #e0af4c); }
.apple-fullstage .apple-chip:disabled { cursor: not-allowed; opacity: 0.55; }
.apple-fullstage .apple-stake-field { position: relative; display: flex; align-items: center; }
.apple-fullstage .apple-stake-field input { width: clamp(90px, 14vw, 150px); padding: 10px 30px 10px 12px; border: 1px solid rgba(120, 128, 132, 0.5); border-radius: 8px; color: #1a1a1a; background: #f4efe4; font-family: var(--font-mono); font-size: 0.85rem; }
.apple-fullstage .apple-stake-clear { position: absolute; right: 6px; display: grid; width: 20px; height: 20px; place-items: center; border: none; border-radius: 50%; color: #6b6b6b; background: none; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.apple-fullstage .apple-play-btn { display: grid; flex: none; width: clamp(52px, 8vw, 68px); height: clamp(52px, 8vw, 68px); place-items: center; border: 3px solid #d8f7c2; border-radius: 50%; color: #0e2b0a; background: radial-gradient(circle at 35% 30%, #a6e572, #4f9c2c); box-shadow: 0 5px 0 #2a5c17, 0 8px 14px rgba(0, 0, 0, 0.4); cursor: pointer; }
.apple-fullstage .apple-play-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.apple-fullstage .apple-auto-btn { padding: 12px 20px; border: none; border-radius: 10px; color: #fff; background: linear-gradient(160deg, #9b3ff0, #6a1fb0); box-shadow: 0 4px 0 #4a1580, 0 7px 12px rgba(0, 0, 0, 0.35); font-weight: 700; letter-spacing: 0.03em; cursor: pointer; }
.apple-fullstage .apple-auto-btn.is-active { background: linear-gradient(160deg, #f8dc91, #e0af4c); color: #2b1c08; box-shadow: 0 4px 0 #a1722c, 0 7px 12px rgba(0, 0, 0, 0.35); }

.apple-fullstage .apple-win-overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; pointer-events: none; animation: apple-win-fade 2800ms ease forwards; }
.apple-fullstage .apple-win-burst { position: absolute; width: min(70vw, 420px); height: min(70vw, 420px); border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, 0.55), rgba(255, 214, 120, 0) 70%); animation: apple-win-burst-pulse 1400ms ease-out both; }
.apple-fullstage .apple-win-apple { position: relative; z-index: 1; width: clamp(110px, 20vw, 210px); filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.55)); animation: apple-win-pop 900ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.apple-fullstage .apple-win-score { position: absolute; z-index: 1; bottom: 14%; padding: 10px 24px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 999px; color: #2b1c08; background: linear-gradient(180deg, #ffe9a8, #f0b94c); font-family: var(--font-display); font-size: clamp(1rem, 3.2vw, 1.7rem); font-weight: 800; text-align: center; white-space: nowrap; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); animation: apple-win-score-rise 700ms 260ms cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes apple-win-pop { 0% { transform: scale(0.2) rotate(-14deg); opacity: 0; } 55% { transform: scale(1.2) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes apple-win-score-rise { 0% { transform: translateY(26px) scale(0.8); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes apple-win-burst-pulse { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes apple-win-fade { 0%, 76% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .apple-fullstage .apple-win-overlay, .apple-fullstage .apple-win-burst, .apple-fullstage .apple-win-apple, .apple-fullstage .apple-win-score { animation: none; opacity: 1; }
}

@media (min-width: 861px) {
  .apple-fullstage { max-width: 980px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .apple-fullstage { aspect-ratio: auto; min-height: 0; }
  .apple-fullstage .apple-character { display: none; }
  .apple-fullstage .apple-logo { width: clamp(80px, 22vw, 120px); }
  .apple-fullstage .apple-panel, .apple-fullstage .apple-bottom-bar { width: 96%; }
  .apple-fullstage .apple-row-multiplier { width: clamp(38px, 12vw, 54px); font-size: 0.58rem; }
  .apple-fullstage .apple-win-apple { width: clamp(84px, 26vw, 150px); }
  .apple-fullstage .apple-win-score { font-size: clamp(0.82rem, 4vw, 1.15rem); padding: 8px 16px; }
}

@media (max-width: 480px) {
  .apple-fullstage .apple-panel, .apple-fullstage .apple-bottom-bar { width: 100%; border-radius: 12px; }
  .apple-fullstage .apple-board { gap: 4px; padding: 3px; }
  .apple-fullstage .apple-row { gap: 4px; }
  .apple-fullstage .apple-cells { gap: 4px; }
  .apple-fullstage .apple-row-multiplier { width: clamp(30px, 14vw, 42px); font-size: 0.52rem; }
  .apple-fullstage .apple-bottom-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .apple-fullstage .apple-stake-chips { grid-template-columns: repeat(3, 1fr); }
  .apple-fullstage .apple-stake-field, .apple-fullstage .apple-play-btn, .apple-fullstage .apple-auto-btn { justify-self: center; }
  .apple-fullstage .apple-bottom-bar > * { width: 100%; }
  .apple-fullstage .apple-stake-field input { width: 100%; box-sizing: border-box; }
  .apple-fullstage .apple-play-btn { width: 56px; height: 56px; margin: 0 auto; }
  .apple-fullstage .apple-auto-btn { text-align: center; }
  .apple-fullstage .apple-panel-title { font-size: 0.68rem; }
}

/* Mines: square target buttons keep the grid legible and keyboard friendly */
.mines-stage { min-height: 430px; padding: 25px; background: radial-gradient(circle at 50% 30%, rgba(91, 191, 101, 0.2), transparent 34%), #061d13; }
.mine-frame { width: min(100%, 470px); padding: 12px; border: 8px solid #1d5838; border-radius: 10px; background: #0a2b1b; box-shadow: 0 0 0 1px rgba(163, 237, 140, 0.38), inset 0 0 0 2px #03150d; }
.mines-stage .mine-grid { width: 100%; grid-template-columns: repeat(var(--mine-columns), minmax(0, 1fr)); gap: 7px; }
.mine-cell { position: relative; min-width: 0; min-height: 52px; aspect-ratio: 1; border-color: rgba(163, 237, 140, 0.23); border-radius: 6px; color: #6d9c7d; background: linear-gradient(145deg, #12442c, #092a1b); transition: transform 150ms var(--motion-snap), border-color 180ms ease, background 180ms ease; }
.mine-cell:hover:not(:disabled) { border-color: var(--color-accent); transform: translateY(-2px); }.mine-cell.is-suggested { border-color: rgba(163, 237, 140, 0.8); color: var(--color-accent); background: rgba(117, 218, 116, 0.12); }.mine-cell.is-safe { color: #102b17; background: #a6e583; box-shadow: 0 0 0 3px rgba(166, 229, 131, 0.12); }.mine-cell.is-mine { color: #fff0db; background: #a85d50; border-color: #f4a286; }.mine-cell.is-opening { animation: mine-open 460ms ease both; }.mine-cell small { position: absolute; right: 3px; bottom: 3px; color: inherit; font-family: var(--font-mono); font-size: 0.42rem; text-transform: uppercase; }.mine-readout { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; margin-top: 17px; color: var(--color-muted); font-family: var(--font-mono); font-size: 0.62rem; }

/* Football: goal zones are real controls, ball/keeper animate together */
.football-stage { min-height: 430px; padding: 24px 18px; background: linear-gradient(180deg, #0c3825, #061d14 66%, #052016); }
.goal-scene { position: relative; z-index: 1; width: min(100%, 560px); margin-top: 12px; }.goal-net { position: relative; height: 250px; overflow: hidden; border: 4px solid #e5f1dd; border-bottom-width: 7px; background: linear-gradient(180deg, rgba(227, 241, 218, 0.04), rgba(2, 21, 12, 0.62)), repeating-linear-gradient(0deg, transparent 0 28px, rgba(226, 242, 216, 0.18) 29px 30px), repeating-linear-gradient(90deg, transparent 0 37px, rgba(226, 242, 216, 0.18) 38px 39px); box-shadow: 0 12px 0 rgba(2, 11, 7, 0.25); }.goal-crossbar { position: absolute; top: 28%; right: 0; left: 0; border-top: 1px solid rgba(226, 242, 216, 0.34); }.goal-post { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(226, 242, 216, 0.3); }.post-left { left: 20%; }.post-right { right: 20%; }
.goal-zones { position: absolute; z-index: 3; inset: 7% 3% 34%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }.goal-zone { min-height: 78px; align-self: center; border: 1px dashed rgba(227, 244, 216, 0.22); border-radius: 4px; color: rgba(232, 247, 222, 0.64); background: rgba(11, 57, 32, 0.19); }  .goal-zone:hover:not(:disabled), .goal-zone:focus-visible, .goal-zone.is-selected { border-color: #f3cb6d; color: #122113; background: #eec66a; transform: translateY(-4px); box-shadow: 0 10px 22px rgba(243,203,109,.2); }
  .goal-zone.is-correct { border-color: #7ee787; color: #092d16; background: #42c96b; box-shadow: 0 0 0 3px rgba(126,231,135,.34), 0 0 28px rgba(66,201,107,.46); animation: football-correct 620ms ease both; }
  .goal-zone.is-wrong { border-color: #ff8b86; color: #fff; background: #c84b52; box-shadow: 0 0 0 3px rgba(255,139,134,.28), 0 0 28px rgba(200,75,82,.42); animation: football-wrong 620ms ease both; }
  .score-ball-icon { display: inline-block; width: 30px; height: 30px; margin-right: 6px; object-fit: contain; vertical-align: -9px; filter: drop-shadow(0 2px 6px rgba(247,241,216,.32)); }
  @keyframes football-correct { 0% { transform: translateY(-4px) scale(.86); } 60% { transform: translateY(-4px) scale(1.08); } 100% { transform: translateY(-4px) scale(1); } }
  @keyframes football-wrong { 0%, 100% { transform: translateY(-4px); } 35% { transform: translate(-4px, -4px); } 70% { transform: translate(4px, -4px); } }.goal-zone span { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 900; }.goal-zone .zone-coefficient { display: block; margin-top: 5px; color: #f5d37a; font-family: var(--font-mono); font-size: .72rem; font-weight: 800; letter-spacing: .05em; }.goal-zone.is-selected .zone-coefficient { color: #173021; } font-size: 0.72rem; }
.keeper-actor { position: absolute; z-index: 5; bottom: 12px; left: 50%; width: 48px; height: 104px; transform: translateX(-50%); }.keeper-head { position: absolute; top: 0; left: 12px; width: 25px; height: 25px; border: 2px solid #b4e894; border-radius: 50%; background: #1d6948; }.keeper-body { position: absolute; right: 7px; bottom: 0; left: 7px; height: 76px; border: 2px solid #b4e894; border-radius: 22px 22px 7px 7px; background: #1b6044; }.keeper-arm { position: absolute; z-index: -1; top: 42px; width: 42px; height: 9px; border: 2px solid #b4e894; border-radius: 50%; background: #1b6044; }.arm-left { right: 25px; transform: rotate(28deg); }.arm-right { left: 25px; transform: rotate(-28deg); }.football-ball { position: absolute; z-index: 3; bottom: 21px; left: 10%; display: grid; width: 24px; height: 24px; place-items: center; transition: left 680ms var(--motion-snap), bottom 680ms var(--motion-snap); }.football-stage.is-kick .football-ball, .football-stage.is-goal .football-ball, .football-stage.is-save .football-ball, .football-stage.is-miss .football-ball { left: 76%; bottom: 60%; }.football-stage.is-save .keeper-actor { animation: keeper-dive-left 760ms var(--motion-snap) both; }.football-stage.is-goal .keeper-actor { animation: keeper-dive-right 760ms var(--motion-snap) both; }.football-stage.is-miss .football-ball { left: 88%; bottom: 91%; }.football-readout { position: relative; z-index: 2; display: grid; justify-items: center; gap: 4px; margin-top: 17px; }.football-readout strong { color: var(--color-warning); font-family: var(--font-display); font-size: 1.8rem; }

.mobile-utility { margin: 0; }.mobile-utility summary { min-height: 46px; padding: 14px 16px; border: 1px solid var(--color-rule); border-radius: 8px; color: var(--color-ink); background: var(--color-surface); font-family: var(--font-mono); font-size: 0.69rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }.mobile-utility[open] summary { border-radius: 8px 8px 0 0; }.mobile-utility .utility-stack { padding-top: 12px; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 9px 13px; border-radius: 6px; color: var(--color-accent-ink); background: var(--color-accent); transform: translateY(-150%); }.skip-link:focus { transform: translateY(0); }

@keyframes crash-readout { 0%, 30% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes crash-flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
@keyframes chicken-jump { 0% { margin-bottom: 0; transform: rotate(0); } 45% { margin-bottom: 49px; transform: rotate(-11deg); } 100% { margin-bottom: 0; transform: rotate(0); } }
@keyframes chicken-fall { 0% { transform: rotate(0); } 100% { opacity: 0.52; transform: translateY(18px) rotate(78deg); } }
@keyframes apple-flip { 0% { transform: perspective(500px) rotateY(0); } 55% { transform: perspective(500px) rotateY(90deg); } 100% { transform: perspective(500px) rotateY(0); } }
@keyframes mine-open { 0% { transform: scale(0.84) rotate(-5deg); } 70% { transform: scale(1.08) rotate(2deg); } 100% { transform: scale(1); } }
@keyframes keeper-dive-left { 0% { transform: translateX(-50%); } 100% { transform: translateX(-95%) rotate(-15deg); } }
@keyframes keeper-dive-right { 0% { transform: translateX(-50%); } 100% { transform: translateX(38%) rotate(15deg); } }

@media (max-width: 1120px) {
  .platform-topbar { gap: 14px; }.topbar-categories { gap: 14px; }.dashboard-grid, .game-layout { grid-template-columns: 1fr; }.analysis-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }.desktop-utility { grid-template-columns: repeat(2, minmax(0, 1fr)); }.desktop-utility > :last-child { grid-column: span 2; }
}
@media (max-width: 780px) {
  .workspace { display: block; }.workspace-main { padding: 0 16px 90px; }.platform-topbar { min-height: 64px; margin: 0 -16px 28px; padding: 0 16px; gap: 10px; }.topbar-brand strong { font-size: 0.75rem; letter-spacing: 0.08em; }.topbar-brand small, .topbar-categories { display: none; }.topbar-status { margin-left: auto; }.topbar-status .language-select { width: auto; min-width: 60px; max-width: 78px; padding: 0 8px; margin-left: 4px; color: #f8f4df; font-size: 0.62rem; }.workspace-header { margin-bottom: 24px; }.workspace-header h1 { font-size: clamp(2.35rem, 12vw, 4rem); }.status-strip-note { width: 100%; margin-left: 0; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.metric { min-height: 106px; }.dashboard-grid, .game-layout { grid-template-columns: minmax(0, 1fr); }.analysis-side { grid-template-columns: 1fr; }.desktop-utility { display: none; }.mobile-utility { display: block; }.game-stage { padding: 12px; }.visual-stage { min-height: 380px; }.aviator-stage, .chicken-road-stage, .apple-stage, .mines-stage, .football-stage { min-height: 380px; }.aviator-center-readout strong { font-size: clamp(3rem, 16vw, 5rem); }.game-action-row { gap: 8px; }.game-action-row .button { flex-basis: 140px; }.statement-footer { margin-top: 40px; }.statement-footer p:last-child { text-align: left; }
}
@media (max-width: 480px) {
  .topbar-mark { width: 30px; height: 30px; }.topbar-brand strong { font-size: 0.69rem; }.topbar-status > span:not(.connection-indicator) { display: none; }.metric { padding: 13px 12px; }.metric-label { margin-bottom: 12px; font-size: 0.58rem; }.metric-value { font-size: 1.48rem; }.metric-meta { font-size: 0.64rem; }.game-card { min-height: 118px; padding: 12px 11px; }.game-card strong { font-size: 0.99rem; }.game-stage { padding: 9px; }.stage-topline { align-items: flex-start; }.stage-topline .status-badge { max-width: 145px; white-space: normal; }.visual-stage { min-height: 360px; }.aviator-stage, .chicken-road-stage, .apple-stage, .mines-stage, .football-stage { min-height: 360px; }.aviator-grid-labels { top: 18px; bottom: 45px; font-size: 0.53rem; }.aviator-axis { left: 45px; font-size: 0.54rem; }.road-track { margin-top: 34px; padding-inline: 7px; }.road-cells { gap: 4px; }.road-step { min-height: 91px; }.step-mark { font-size: 1.25rem; }.chicken-actor { width: 42px; height: 42px; }.apple-stage { padding: 17px 8px; }.apple-board { padding: 10px 7px 13px; border-width: 3px; }.apple-row { grid-template-columns: 28px repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px 2px; }.apple-cell { min-height: 48px; }.row-number { font-size: 0.56rem; }.row-number small { font-size: 0.48rem; }.mine-frame { padding: 7px; border-width: 5px; }.mines-stage .mine-grid { gap: 4px; }.mine-cell { min-height: 44px; }.mine-cell small { display: none; }.football-stage { padding-inline: 10px; }.goal-net { height: 214px; }.goal-zones { inset-inline: 2%; }.goal-zone { min-height: 42px; }.football-ball { bottom: 18px; left: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  .chicken-road-stage.is-jumping .chicken-actor, .chicken-road-stage.is-fallen .chicken-actor, .apple-cell.is-flipping, .mine-cell.is-opening, .football-stage.is-save .keeper-actor, .football-stage.is-goal .keeper-actor { animation: none; }
}

/* Runtime art-pack integration: transparent PNG models stay inside the existing mobile stages. */
.road-obstacle { position: absolute; z-index: 2; right: 11%; bottom: 27px; width: clamp(66px, 17vw, 112px); height: auto; pointer-events: none; filter: drop-shadow(0 8px 5px rgba(1, 12, 8, 0.42)); opacity: 0.92; }
.chicken-actor { z-index: 4; width: clamp(48px, 13vw, 72px); height: clamp(48px, 13vw, 72px); border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.chicken-actor img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 7px 4px rgba(1, 12, 8, 0.38)); }
.chicken-actor span { display: none; }
.chicken-road-stage.is-fallen .chicken-actor img { filter: grayscale(0.45) drop-shadow(0 7px 4px rgba(1, 12, 8, 0.38)); }

.apple-cell { background-image: linear-gradient(145deg, rgba(155, 106, 56, 0.78), rgba(99, 66, 34, 0.82)), url('/assets/verdant-artpack/apple/tiles/closed-wooden-board-tile-reconstruction.png'); background-position: center; background-size: cover; }
.apple-face { display: grid; width: 100%; height: 100%; place-items: center; }
.apple-sprite { position: relative; z-index: 1; display: block; width: 68%; height: 82%; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(43, 21, 8, 0.35)); pointer-events: none; }
.apple-sprite-suggested { opacity: 0.78; transform: scale(0.72); }
.apple-glyph { position: relative; z-index: 1; }

.keeper-actor { width: clamp(78px, 16vw, 112px); height: clamp(140px, 30vw, 190px); bottom: -9px; }
.keeper-sprite { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 5px rgba(1, 12, 8, 0.4)); }
.keeper-actor .keeper-head, .keeper-actor .keeper-body, .keeper-actor .keeper-arm { display: none; }

@media (max-width: 480px) {
  .road-obstacle { right: 7%; bottom: 25px; width: 70px; }
  .chicken-actor { width: 50px; height: 50px; }
  .keeper-actor { width: 84px; height: 154px; }
}

/* Art pipeline v1: scene objects have explicit bounds, pivots and z-order. */
.pipeline-stage { isolation: isolate; }
.pipeline-stage canvas { image-rendering: auto; }

/* Aviator uses one deterministic scene loop, while every visual layer keeps its own mount. */
.aviator-stage { min-height: 450px; overflow: hidden; border-color: rgba(164, 238, 142, 0.3); background: #061b12; }
.aviator-stage::after { position: absolute; z-index: 5; inset: 0; background: rgba(244, 196, 90, 0.18); content: ''; opacity: 0; pointer-events: none; }
.aviator-stage[data-phase="crash"]::after { animation: aviator-impact-flash 420ms ease-out both; }
.aviator-stage canvas { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
.aviator-grid-labels, .aviator-axis { z-index: 3; pointer-events: none; }
.aviator-center-readout { z-index: 4; pointer-events: none; }
.aviator-countdown { min-height: 1.1em; color: #f3cf78; font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.aviator-stage[data-phase="flying"] .aviator-center-readout strong { text-shadow: 0 0 32px rgba(165, 239, 142, 0.35); }
.aviator-stage[data-phase="ended"] .aviator-center-readout strong { color: #f3cf78; }

/* Chicken Road: road geometry never moves; only the chick actor receives a transform. */
.chicken-road-stage { min-height: 450px; overflow: hidden; background: radial-gradient(circle at 46% 14%, rgba(199, 177, 89, 0.2), transparent 27%), linear-gradient(180deg, #173c27 0%, #09251a 63%, #05170f 100%); }
.road-playfield { position: absolute; z-index: 2; right: 5%; bottom: 53px; left: 5%; height: 245px; border: 1px solid rgba(214, 236, 172, 0.28); border-radius: 22px 22px 10px 10px; background: linear-gradient(180deg, rgba(63, 117, 58, 0.35), rgba(5, 26, 17, 0.95)); box-shadow: inset 0 -22px 36px rgba(1, 12, 7, 0.34), 0 15px 0 rgba(1, 12, 7, 0.2); }
.road-playfield::before { position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(156deg, transparent 0 19px, rgba(225, 245, 178, 0.075) 20px 21px); content: ''; pointer-events: none; }
.road-shoulder { position: absolute; right: 14px; bottom: 18px; left: 14px; border-top: 1px dashed rgba(209, 242, 174, 0.34); }
.road-cells { position: absolute; z-index: 1; inset: 32px 12px 29px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; align-items: stretch; }
.road-step { min-height: 0; place-items: center; align-content: center; }
.road-step:nth-child(even) { transform: translateY(-11px); }
.road-step small { color: inherit; font-family: var(--font-mono); font-size: 0.48rem; letter-spacing: 0.04em; text-transform: uppercase; }
.step-marker { color: #c8efa6; font-family: var(--font-display); font-size: 1.28rem; line-height: 1; }
.road-step.is-target .step-marker { color: #f3cf78; }
.chick-object { position: absolute; z-index: 4; left: 0; bottom: 30px; width: clamp(58px, 12vw, 82px); transform-origin: 50% 93%; pointer-events: none; will-change: transform; }
.chick-object img { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 9px 5px rgba(1, 12, 8, 0.42)); }
.van-object { position: absolute; z-index: 3; top: 0; left: 0; width: clamp(86px, 17vw, 132px); height: auto; transform-origin: 50% 78%; pointer-events: none; filter: drop-shadow(0 9px 5px rgba(1, 12, 8, 0.42)); }
.road-shadow { position: absolute; z-index: 1; right: 8%; bottom: 19px; left: 8%; height: 11px; border-radius: 50%; background: rgba(0, 10, 6, 0.42); filter: blur(5px); }
.chicken-road-stage.is-fallen .chick-object img { filter: grayscale(0.45) drop-shadow(0 9px 5px rgba(1, 12, 8, 0.42)); }

/* Apple: each button owns its wood face and fruit face; the board never flips. */
.apple-stage { min-height: 450px; overflow: hidden; padding: 24px 18px; background: radial-gradient(circle at 49% 23%, rgba(220, 159, 69, 0.22), transparent 30%), linear-gradient(180deg, #1a4a2e 0%, #081f15 78%); }
.apple-board { width: min(100%, 640px); gap: 10px; padding: 16px 14px 19px; border-color: #a46d37; background: linear-gradient(145deg, #754a27, #382319); }
.apple-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; min-width: 0; padding: 5px; }
.apple-cells { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.apple-cell { position: relative; min-width: 0; min-height: 62px; padding: 0; overflow: visible; perspective: 560px; }
.apple-cell-inner { overflow: hidden; }
/* Grows the real tap target to the 44x44 minimum on narrow phones (measured ~38px wide at 320px)
   without resizing the wood-tile art itself. Uses ::after (::before is already the decorative inner
   border and is explicitly pointer-events:none further down). See the same pattern on Mines cells. */
.apple-cell::after { position: absolute; z-index: 4; inset: -4px; pointer-events: auto; content: ''; }
.apple-cell-inner { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; transform-style: preserve-3d; }
.apple-tile { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.95; }
.apple-cell::before { z-index: 3; pointer-events: none; }
.apple-sprite { position: relative; z-index: 2; display: block; width: min(68%, 56px); height: min(78%, 54px); object-fit: contain; filter: drop-shadow(0 4px 3px rgba(43, 21, 8, 0.38)); pointer-events: none; }
.apple-cell-mark { position: absolute; z-index: 3; right: 4px; bottom: 3px; color: #eaf8d7; font-family: var(--font-mono); font-size: 0.43rem; letter-spacing: 0.05em; }
.apple-cell.is-suggested .apple-cell-mark { color: #dcf3ae; font-size: 0.9rem; }
.apple-cell.is-safe { border-color: #c6f399; background: #95cc70; }
.apple-cell.is-danger { border-color: #efab83; background: #9c5144; }
.apple-cell.is-opening .apple-cell-inner { animation: apple-cell-flip 560ms cubic-bezier(0.2, 0.72, 0.25, 1) both; }
  .apple-score, .football-score { color: #f6d574; font-family: var(--font-display); font-size: 1rem; letter-spacing: .04em; text-shadow: 0 0 14px rgba(246,213,116,.28); }
  .apple-cell.is-safe { animation: apple-hit 520ms ease both; }
  @keyframes apple-hit { 0% { transform: scale(.82); box-shadow: 0 0 0 rgba(186,240,139,0); } 55% { transform: scale(1.12); box-shadow: 0 0 34px rgba(186,240,139,.72); } 100% { transform: scale(1); } }
  .apple-axis { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 12px; width: min(100%, 640px); margin: 13px auto 0; color: #b9d3ae; font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; }

/* Mines keeps 44px controls while the frame owns all internal spacing. */
.mines-stage { min-height: 450px; overflow: hidden; padding: 24px 16px; background: radial-gradient(circle at 50% 23%, rgba(90, 192, 102, 0.2), transparent 34%), #061d13; }
.mine-frame { width: min(100%, 500px); box-sizing: border-box; padding: 12px; border-width: 7px; }
.mine-topline { display: flex; justify-content: space-between; gap: 10px; margin: 2px 2px 12px; color: #c2e2ae; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; }
.mines-stage .mine-grid { width: 100%; grid-template-columns: repeat(var(--mine-columns), minmax(44px, 1fr)); gap: 7px; }
.mine-cell { min-width: 44px; min-height: 44px; padding: 0; }
.mine-face { font-size: 0.85rem; }
.mine-cell small { font-size: 0.42rem; }
.mine-readout { position: relative; z-index: 2; width: min(100%, 500px); }

/* Football: keeper and ball have independent normalized transforms and visible bounds. */
.football-stage { min-height: 465px; overflow: visible; padding: 23px 16px; background: linear-gradient(180deg, #0b3824, #061d14 67%, #052016); }
.goal-scene { z-index: 1; width: min(100%, 580px); }
.goal-net { height: 270px; overflow: visible; border-bottom-width: 8px; background: rgba(4, 26, 17, 0.45); }
.goal-grid { position: absolute; z-index: 0; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 28px, rgba(226, 242, 216, 0.17) 29px 30px), repeating-linear-gradient(90deg, transparent 0 37px, rgba(226, 242, 216, 0.17) 38px 39px); pointer-events: none; }
  .goal-zones { z-index: 3; inset: 7% 3% 34%; }
  .goal-zone { min-width: 44px; min-height: 78px; }
.keeper-actor { position: absolute; z-index: 3; top: 0; left: 0; bottom: auto; width: clamp(92px, 17vw, 128px); height: auto; transform-origin: 50% 100%; pointer-events: none; will-change: transform; }
.keeper-sprite { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; filter: drop-shadow(0 10px 6px rgba(1, 12, 8, 0.42)); }
/* Real stitched-ball art (public/assets/generated/football-ball.svg), not a bare CSS circle or glyph. */
.football-ball { position: absolute; z-index: 4; top: 0; left: 0; width: 25px; height: 25px; min-height: 0; padding: 0; will-change: transform; }
.football-ball img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4)); }
.football-stage.is-goal .football-readout strong { color: #b7ef8c; }
.football-stage.is-save .football-readout strong { color: #f3cf78; }
.football-stage.is-miss .football-readout strong { color: #f0a381; }

/* Developer-only art calibration panel, available with ?art-debug=1. */
.art-debug-panel { margin-top: 16px; padding: 14px; border: 1px solid rgba(163, 237, 140, 0.28); border-radius: 8px; background: rgba(3, 20, 13, 0.72); }
.art-debug-panel > summary { color: #d5efbd; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.debug-hint { max-width: 58ch; color: #9fc39e; font-size: 0.78rem; }
.debug-effect-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.debug-effect-button { min-height: 44px; padding: 6px 8px; border: 1px solid rgba(163, 237, 140, 0.24); border-radius: 5px; color: #b9d7ae; background: rgba(11, 49, 29, 0.8); font-family: var(--font-mono); font-size: 0.56rem; }
.debug-effect-button:hover, .debug-effect-button.is-active { border-color: #f3cf78; color: #112316; background: #f3cf78; }
.debug-preview { position: relative; min-height: 205px; margin: 12px 0; overflow: hidden; border: 1px dashed rgba(163, 237, 140, 0.24); border-radius: 6px; background: #071c13; }
.debug-preview canvas { display: block; width: 100%; height: 205px; }
.debug-dom-preview { display: none; position: absolute; inset: 0; place-items: center; }
.debug-preview.is-dom-preview canvas { display: none; }
.debug-preview.is-dom-preview .debug-dom-preview { display: grid; }
.debug-label { position: absolute; right: 10px; bottom: 8px; color: #bad3ac; font-family: var(--font-mono); font-size: 0.58rem; text-transform: uppercase; }
.debug-chick { width: 106px; transform-origin: 50% 93%; filter: drop-shadow(0 8px 5px rgba(1, 12, 8, 0.45)); }
.debug-keeper { width: 120px; align-self: end; transform-origin: 50% 100%; filter: drop-shadow(0 8px 5px rgba(1, 12, 8, 0.45)); }
.debug-apple-card { position: relative; width: 135px; height: 100px; overflow: hidden; border: 2px solid #b2763d; border-radius: 8px; transform-style: preserve-3d; }
.debug-apple-tile { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.debug-apple { position: absolute; z-index: 1; top: 50%; left: 50%; width: 58px; height: 58px; object-fit: contain; transform: translate(-50%, -50%); }

@keyframes aviator-impact-flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
@keyframes apple-cell-flip { 0% { transform: rotateY(0deg); } 48% { transform: rotateY(90deg); } 100% { transform: rotateY(0deg); } }

  @media (max-width: 780px) {
  .external-game-stage { width: 100%; height: min(76svh, 620px); min-height: 460px; border-radius: 10px; }
  .external-game-stage .external-game-embed { width: 100%; height: 100%; min-height: 0; }
  .aviator-embed-stage { height: min(76svh, 620px); min-height: 460px; }
 .game-view:has(.external-game-stage), .game-view:has(.mines-embedded-stage), .game-view:has(.football-embedded-stage) { --embed-active: 1; }
 .game-view:has(.external-game-stage) .game-stage-panel, .game-view:has(.mines-embedded-stage) .game-stage-panel, .game-view:has(.football-embedded-stage) .game-stage-panel { padding: 8px; }
 .game-view:has(.external-game-stage) .panel-body, .game-view:has(.mines-embedded-stage) .panel-body, .game-view:has(.football-embedded-stage) .panel-body { padding: 10px; }
 .game-view:has(.external-game-stage) .stage-caption, .game-view:has(.mines-embedded-stage) .stage-caption, .game-view:has(.football-embedded-stage) .stage-caption { display: none; }
  .pipeline-stage { min-height: 405px; }
  .aviator-stage, .chicken-road-stage, .apple-stage, .mines-stage, .football-stage { min-height: 405px; }
  .road-playfield { right: 3%; left: 3%; height: 224px; }
  .road-cells { inset-inline: 8px; gap: 5px; }
  .apple-row { grid-template-columns: 40px minmax(0, 1fr); }
  .apple-cells { gap: 5px; }
  .apple-cell { min-height: 58px; }
  .goal-net { height: 246px; }
  .debug-effect-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .game-stage { padding: 10px 6px; }
  .pipeline-stage { min-height: 385px; }
  .aviator-stage, .chicken-road-stage, .apple-stage, .mines-stage, .football-stage { min-height: 385px; }
  .aviator-center-readout strong { font-size: clamp(2.8rem, 15vw, 4.8rem); }
  .road-playfield { right: 2%; bottom: 50px; left: 2%; height: 210px; }
  .road-cells { inset: 30px 6px 27px; gap: 4px; }
  .road-step { font-size: 0.62rem; }
  .road-step small { font-size: 0.4rem; }
  .chick-object { width: 58px; }
  .van-object { width: 92px; }
  .apple-stage { padding: 17px 7px; }
  .apple-board { padding: 11px 7px 14px; border-width: 3px; }
  .apple-row { grid-template-columns: 28px minmax(0, 1fr); gap: 4px; padding: 4px 2px; }
  .apple-cells { gap: 3px; }
  .apple-cell { min-height: 50px; }
  .apple-sprite { width: 70%; height: 78%; }
  .apple-cell-mark { font-size: 0.35rem; }
  .mines-stage { padding: 16px 4px; }
  .mine-frame { padding: 7px; border-width: 5px; }
  .mines-stage .mine-grid { gap: 3px; }
  .mine-cell { min-width: 44px; min-height: 44px; }
  .mine-cell small { display: none; }
  .football-stage { padding-inline: 7px; }
  .goal-net { height: 220px; }
  .keeper-actor { width: 92px; }
  .debug-effect-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-stage *, .art-debug-panel * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* The mine frame, readout, and caption are a vertical stack on narrow screens. */
.mines-stage { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px; min-height: 500px; box-sizing: border-box; }
.mines-stage .mine-frame, .mines-stage .mine-readout { flex: 0 0 auto; }
.mines-stage .mine-readout { margin-top: 0; align-items: center; }
.mines-stage .stage-caption { position: static; width: min(100%, 500px); margin-top: auto; padding: 0 2px 2px; }

/* Runtime transforms own Football motion; neutralize the former CSS-only actor path. */
.football-stage .keeper-actor { top: auto; right: auto; bottom: 0; left: 50%; transform: translateX(-50%); }
.football-stage .football-ball { top: auto; right: auto; bottom: 18px; left: 8%; transform: none; }
.football-stage.is-kick .football-ball, .football-stage.is-goal .football-ball, .football-stage.is-save .football-ball, .football-stage.is-miss .football-ball { right: auto; bottom: auto; left: 0; top: 0; }
.football-stage.is-miss .football-ball { right: auto; bottom: auto; left: 0; top: 0; }
.football-stage.is-save .keeper-actor, .football-stage.is-goal .keeper-actor { animation: none; }

/* Corrected art pass: every actor has one coordinate owner and HUD stays out of the play path. */
.aviator-stage { min-height: 405px; overflow: hidden; }
/* Flight path is capped to the left ~58% of the stage (see pointOnAviatorPath); this HUD panel
   owns the right ~40% exclusively so the multiplier can never sit on top of the plane, trail or VFX. */
.aviator-center-readout { top: 50%; left: auto; right: 14px; z-index: 6; width: min(40%, 168px); max-width: 42%; padding: 10px 12px; border: 1px solid rgba(163, 237, 140, 0.22); border-radius: 12px; background: rgba(4, 20, 13, 0.56); backdrop-filter: blur(6px); text-align: right; justify-items: end; transform: translateY(-50%); }
.aviator-stage[data-phase="countdown"] .aviator-center-readout { display: none; }
.aviator-center-readout strong { font-size: clamp(1.9rem, 7vw, 3.4rem); line-height: .88; letter-spacing: -.05em; }
.aviator-center-readout .round-state { margin-top: 5px; }
.aviator-countdown { min-height: 1.1em; }
.aviator-stage[data-phase="crash"] .aviator-center-readout strong { animation: none; }
.aviator-rules-chip { position: absolute; top: 12px; left: 14px; z-index: 6; padding: 5px 12px; border: 1px solid rgba(240, 202, 108, 0.55); border-radius: 999px; color: #f3cf78; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; pointer-events: none; }

.chicken-road-stage { min-height: 405px; }
.road-playfield { overflow: visible; }
.chick-object { width: clamp(54px, 15vw, 78px); transform-origin: 50% 93%; }
.van-object { width: clamp(78px, 23vw, 116px); opacity: 1; transform-origin: 50% 78%; }
.chick-object img, .van-object { will-change: transform; }

.apple-cell.is-safe .apple-tile, .apple-cell.is-danger .apple-tile { opacity: .18; }
.apple-cell.is-safe .apple-sprite, .apple-cell.is-danger .apple-sprite { filter: drop-shadow(0 5px 4px rgba(12, 24, 12, .34)); }

/* Mines uses the supplied approved blue-metal scene for the canonical 5×5 board. */
.mines-stage { min-height: 500px; padding: 16px 12px 18px; gap: 10px; background: #031624; }
.mines-reference-board { position: relative; width: min(100%, 430px); aspect-ratio: 0.90 / 1; overflow: hidden; border: 2px solid #6f8fc0; border-radius: 12px; background: #061726; box-shadow: 0 0 0 4px rgba(14, 44, 76, .86), 0 14px 26px rgba(0, 0, 0, .32); isolation: isolate; }
.mines-reference-art { position: absolute; z-index: 0; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.mines-reference-board::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(4, 15, 27, .04), rgba(1, 8, 16, .15)); content: ''; pointer-events: none; }
.mine-overlay { position: absolute; z-index: 3; top: 18.2%; right: 3.4%; bottom: 5.6%; left: 8.8%; display: grid; grid-template-columns: repeat(var(--mine-columns), minmax(0, 1fr)); gap: 3.2%; pointer-events: none; }
/* The visible cell rect must stay aligned to the painted artwork underneath, but the tap target
   still has to clear the 44x44 minimum on the narrowest supported screens (320px), where each
   painted cell is only ~39px. A ::before with a negative inset grows the real, clickable hit box
   into the inter-cell gap (pointer events on a pseudo-element register on its host button) without
   resizing or shifting the visible cell itself. */
.mine-overlay .mine-cell { position: relative; min-width: 0; min-height: 0; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; color: #d9f4ff; background: transparent; box-shadow: none; pointer-events: auto; }
.mine-overlay .mine-cell::before { position: absolute; inset: -5px; content: ''; }
.mine-overlay .mine-cell:hover:not(:disabled), .mine-overlay .mine-cell.is-suggested { border-color: rgba(84, 230, 255, .92); background: rgba(17, 169, 235, .12); box-shadow: 0 0 0 2px rgba(47, 211, 255, .2), inset 0 0 18px rgba(22, 173, 244, .16); }
.mine-overlay .mine-cell.is-opening { animation: mines-cell-open 460ms cubic-bezier(.2, .72, .25, 1) both; }
.mine-overlay .mine-cell:disabled { cursor: default; opacity: 1; }
/* Real layered art for both reveal outcomes (public/assets/generated/mines-*.svg): a faceted,
   glowing crystal for safe, a fused bomb with a lit fuse for mine. No glyphs, no bare CSS circles. */
.mine-face { position: relative; display: grid; place-items: center; width: 74%; height: 74%; }
.mine-face img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }
.mine-face.is-revealed { animation: mine-face-in 360ms cubic-bezier(.2, .8, .3, 1) both; }
.mine-face.is-mine { animation: mine-face-in 360ms cubic-bezier(.2, .8, .3, 1) both, mine-explosion-flash 560ms ease-out 60ms; }
.mine-hint { display: block; width: 10px; height: 10px; border: 1px solid #75eaff; border-radius: 50%; background: #b5f8ff; box-shadow: 0 0 12px #27d8ff; }
@keyframes mine-face-in { 0% { transform: scale(0.4) rotate(-8deg); opacity: 0; } 65% { transform: scale(1.12) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes mine-explosion-flash { 0% { filter: drop-shadow(0 0 0 rgba(255, 120, 50, 0)); } 28% { filter: drop-shadow(0 0 26px rgba(255, 140, 60, 0.95)) brightness(1.5); } 100% { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); } }
/* The approved backdrop bakes in a "place your bet" banner across the mid-board rows. Once a round
   starts this plate covers just that banner rect (matched to the neighbouring cell material) so the
   grid underneath stays the only thing the player reads — never toggled before the round begins. */
.mine-banner-mask { position: absolute; z-index: 2; top: 49%; right: 3%; bottom: 24%; left: 3%; border-radius: 12px; background: linear-gradient(145deg, #0b2945, #061827); opacity: 0.99; pointer-events: none; }
  .mines-reference-board.is-active .mine-banner-mask { opacity: 0.98; }
.mine-readout { width: min(100%, 430px); margin: 0; color: #a8c4e7; }
.mine-readout strong { color: #e7f7ff; }
.mine-frame-fallback { width: min(100%, 430px); border-color: #4f78a8; border-radius: 12px; background: linear-gradient(145deg, #164168, #071b2f); box-shadow: 0 0 0 3px rgba(75, 164, 235, .22), inset 0 0 0 2px rgba(186, 229, 255, .16); }
.mine-frame-fallback .mine-grid { display: grid; grid-template-columns: repeat(var(--mine-columns), minmax(0, 1fr)); gap: 7px; }
.mine-frame-fallback .mine-cell { border-color: rgba(117, 205, 255, .28); background: linear-gradient(145deg, #123a5d, #061b2f); }

.football-ball { transition: none; }
.football-stage .keeper-actor, .football-stage .football-ball { animation: none !important; }

@keyframes mines-cell-open { 0% { transform: scale(.82); filter: brightness(1); } 55% { transform: scale(1.08); filter: brightness(1.5); } 100% { transform: scale(1); filter: brightness(1); } }

@media (max-width: 480px) {
  .aviator-stage { min-height: 385px; }
  .aviator-center-readout { right: 8px; width: min(44%, 148px); padding: 8px 10px; }
  .aviator-center-readout strong { font-size: clamp(1.5rem, 9vw, 2.6rem); }
  .chicken-road-stage { min-height: 385px; }
  .chick-object { width: 58px; }
  .van-object { width: 84px; }
  .mines-stage { min-height: 470px; padding-inline: 7px; }
  .mine-overlay .mine-cell { border-radius: 7px; }
  .mine-face { width: 44%; height: 44%; }
}

/* Production animation sheets: canvases keep the authored art aligned to the existing scene. */
.scene-animation-canvas, .apple-cell-animation, .mine-cell-animation, .football-animation-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.chicken-animation-canvas { z-index: 5; }
.road-playfield.has-animation-clip .chick-object, .road-playfield.has-animation-clip .van-object { visibility: hidden; }
.apple-cell { overflow: hidden; }
.apple-cell-animation { z-index: 2; }
.apple-cell.has-animation-clip .apple-sprite { visibility: hidden; }
.mine-face { overflow: hidden; }
.mine-cell-animation { z-index: 2; }
.mine-face.has-animation-clip img { visibility: hidden; }
.football-animation-canvas { z-index: 2; }
.goal-net.has-animation-clip .keeper-actor, .goal-net.has-animation-clip .football-ball { visibility: hidden; }
.goal-net.has-animation-clip .goal-zones { z-index: 6; }

/* Local reference games: the casino controls are intentionally absent. Only the host signal panel drives play. */
.reference-game { position: relative; width: 100%; min-height: 500px; overflow: hidden; border-radius: 8px; isolation: isolate; }
.reference-game::after { position: absolute; z-index: 20; right: 10px; bottom: 8px; padding: 4px 8px; border-radius: 999px; color: rgba(255,255,255,.62); background: rgba(0,0,0,.34); font: 600 .52rem/1 var(--font-mono); letter-spacing: .08em; content: 'SIGNAL MODE'; pointer-events: none; }
.signal-amount-field { position: relative; display: flex; align-items: center; }
.signal-amount-field input { width: 100%; padding-right: 58px; }
.signal-amount-field span { position: absolute; right: 13px; color: var(--color-muted); font: 700 .66rem/1 var(--font-mono); pointer-events: none; }
.signal-state-card, .fixed-role { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 12px; border: 1px solid #bfd5cb; border-radius: 7px; background: #eff8f3; }
.signal-state-card .status-dot { background: #23a77b; box-shadow: 0 0 0 4px rgba(35, 167, 123, .12); }
.signal-state-card strong { color: #17352c; }
.signal-state-card small { grid-column: 2; color: #789087; }
.fixed-role { grid-template-columns: 1fr auto; }
.fixed-role span { color: var(--color-muted); font: 600 .62rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.fixed-role strong { color: #138762; }
.signal-accuracy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #afd6c5; border-radius: 8px; background: linear-gradient(135deg, #eff9f4, #e3f4e9); }
.signal-accuracy span { color: #608174; font: 700 .62rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.signal-accuracy strong { color: #138762; font-family: var(--font-display); font-size: 1.65rem; }
.signal-amount-result strong { color: #17352c; }
.payout-calculation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 14px 0 16px; overflow: hidden; border: 1px solid #bfd5cb; border-radius: 9px; background: #c8ddd5; box-shadow: 0 7px 22px rgba(4, 57, 39, .05); }
.payout-calculation > div { min-width: 0; padding: 12px 13px; background: #fff; }
.payout-calculation span { display: block; margin-bottom: 7px; color: #688477; font: 700 .57rem/1.25 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.payout-calculation strong { display: block; overflow-wrap: anywhere; color: #17352c; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.05; }
.payout-calculation .payout-total { background: linear-gradient(135deg, #eff9f4, #e3f4e9); }
.payout-calculation .payout-total strong { color: #138762; font-size: 1.25rem; }
.payout-calculation .payout-profit strong { color: #138762; }
.payout-calculation .payout-profit.is-negative strong { color: var(--color-error); }
.payout-calculation small { grid-column: 1 / -1; padding: 10px 13px; color: #6d867b; background: #eef6f2; font-size: .66rem; line-height: 1.4; }
.topbar-session { max-width: 160px; overflow: hidden; color: rgba(255,255,255,.9); font: 700 .68rem/1 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 460px) {
  .payout-calculation { grid-template-columns: 1fr; }
  .payout-calculation small { grid-column: 1; }
  .topbar-session { display: none; }
}

/* Aviator — original AviaShow palette, radial field and gold aircraft atlas. */
.game-stage .visual-stage.reference-aviator { min-height: 500px; background: #020202 url('/assets/local-games/aviator/background.webp') center/cover no-repeat !important; box-shadow: inset 0 0 80px #000; }
.reference-aviator::before { position: absolute; z-index: 0; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.34)); content: ''; }
.reference-aviator-logo { position: absolute; z-index: 3; top: 48px; left: 38px; width: min(27%, 220px); height: auto; opacity: .96; }
.reference-aviator-history { position: absolute; z-index: 3; top: 10px; right: 18px; left: 18px; display: flex; gap: 18px; overflow: hidden; color: #9b7222; font: 600 .55rem/1 var(--font-mono); white-space: nowrap; }
.reference-aviator-history span:nth-child(4n) { color: #7e3f19; }
.reference-aviator-curve { position: absolute; z-index: 2; inset: 15% 7% 9% 4%; width: 89%; height: 76%; overflow: visible; }
.reference-aviator-curve path { fill: none; stroke: #f0ba22; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 8px rgba(255,207,65,.68)); }
.reference-aviator-stars { position: absolute; z-index: 1; inset: 34% 8% 5% 4%; overflow: hidden; opacity: 0; clip-path: polygon(0 100%, 34% 5%, 100% 5%, 100% 100%); transition: opacity .35s ease; }
.reference-aviator-stars i { position: absolute; top: calc(var(--star-y) * 1%); left: calc(var(--star-x) * 1%); width: var(--star-size); height: calc(var(--star-size) * 2.5); border-radius: 50%; background: linear-gradient(180deg, rgba(255,244,157,0), #ffe25d 45%, #e5a815); box-shadow: 0 0 8px #ffc82f; opacity: .8; animation: reference-starfall 1.45s var(--star-delay) linear infinite; }
.reference-aviator[data-phase="takeoff"] .reference-aviator-stars, .reference-aviator[data-phase="flying"] .reference-aviator-stars { opacity: .92; }
.reference-aviator-plane { position: absolute; z-index: 5; left: 7%; bottom: 13%; width: 160px; height: 90px; transition: opacity .2s ease; filter: drop-shadow(0 10px 9px rgba(0,0,0,.72)); }
.reference-plane-crop { position: absolute; top: 50%; left: 50%; width: 167px; height: 409px; background: url('/assets/local-games/aviator/plane.webp') -756px -113px / 1000px 524px no-repeat; transform: translate(-50%,-50%) rotate(90deg) scale(.37); }
.reference-plane-pilot { position: absolute; z-index: 3; top: 14px; right: 59px; width: 31px; height: 30px; transform: rotate(5deg); filter: drop-shadow(0 2px 1px rgba(0,0,0,.5)); }
.reference-plane-pilot::before { position: absolute; top: 0; right: 1px; width: 10px; height: 10px; border-radius: 50%; background: #090909; content: ''; }
.reference-plane-pilot::after { position: absolute; top: 8px; right: 6px; width: 19px; height: 8px; border-radius: 10px 2px 8px 8px; background: #090909; box-shadow: -8px 5px 0 -2px #090909; content: ''; transform: rotate(-17deg); transform-origin: right center; }
.reference-plane-pilot b { position: absolute; top: 4px; right: 8px; width: 24px; height: 5px; border-radius: 70% 10% 70% 20%; background: #090909; transform: rotate(-18deg); transform-origin: right center; }
.reference-plane-propeller { position: absolute; z-index: 2; top: 26px; right: -1px; width: 4px; height: 40px; border-radius: 100%; background: linear-gradient(180deg, transparent, #f7d44b 24%, #f7d44b 76%, transparent); transform-origin: center; animation: reference-propeller 90ms linear infinite; }
.reference-aviator[data-phase="ready"] .reference-aviator-plane { opacity: .12; }
.reference-aviator[data-phase="ended"] .reference-aviator-plane { animation: reference-aviator-away .58s ease-in both; }
.reference-aviator-readout { position: absolute; z-index: 6; top: 43%; left: 50%; display: grid; justify-items: center; color: #fff; transform: translate(-50%,-50%); text-shadow: 0 4px 15px #000; }
.reference-aviator-readout strong { color: #a70d0d; font: 800 clamp(3.5rem, 10vw, 6.5rem)/.88 Arial, sans-serif; letter-spacing: -.07em; }
.reference-aviator-readout span { margin-top: 10px; color: #d9d9d9; font: 700 .64rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.reference-aviator-ready { position: absolute; z-index: 5; right: 0; bottom: 22px; left: 0; color: rgba(255,255,255,.55); font: 700 .58rem/1 var(--font-mono); letter-spacing: .14em; text-align: center; }
@keyframes reference-propeller { to { transform: rotate(360deg); } }
@keyframes reference-starfall { 0% { opacity: 0; transform: translate3d(0,-24px,0) scale(.6); } 18% { opacity: .92; } 100% { opacity: 0; transform: translate3d(-18px,86px,0) scale(1.08); } }
@keyframes reference-aviator-away { to { opacity: 0; transform: translate(90px,-65px) scale(.8); } }

/* Chicken Road — original slate lanes, medallions and chicken sprites. */
.game-stage .visual-stage.reference-chicken { min-height: 500px; color: #fff; background: #3e466a !important; }
.reference-chicken-bar { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 22px; background: #363b56; box-shadow: 0 2px 0 rgba(0,0,0,.14); }
.reference-chicken-bar img { width: min(31%, 220px); max-height: 34px; }
.reference-chicken-bar span { color: #a7b2e8; font: 700 .58rem/1 var(--font-mono); letter-spacing: .06em; }
.reference-chicken-bar b { margin: 0 8px; color: #38ed6a; }
.reference-road-scene { position: absolute; inset: 54px 0 0; overflow: hidden; background: linear-gradient(90deg, rgba(32,37,62,.42) 0 15%, transparent 15% 100%); }
.reference-road-scene::after { position: absolute; right: 0; bottom: 0; left: 0; height: 28px; border-top: 7px solid #515a78; background: #30364f; content: ''; }
.reference-road-lanes { position: absolute; inset: 0 -1% 28px 14%; display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); }
.reference-road-lane { position: relative; display: grid; place-items: center; border-left: 3px dashed #aab3d9; }
.reference-road-lane::before, .reference-road-lane::after { position: absolute; width: 46px; height: 19px; border-radius: 8px; background: rgba(48,54,85,.55); content: ''; }
.reference-road-lane::before { top: 7%; right: 11%; }
.reference-road-lane::after { top: 56%; left: 10%; }
.reference-road-medal { position: relative; z-index: 2; display: grid; width: clamp(66px, 10vw, 92px); aspect-ratio: 1; place-items: center; border: 7px solid #303752; border-radius: 50%; color: #b9c3ee; background: radial-gradient(circle at 38% 28%, #6978b5, #4c5a91 66%, #394264 67%); box-shadow: inset 0 0 0 3px rgba(182,192,235,.22), 0 6px 0 #303650; font: 800 clamp(.92rem, 2vw, 1.3rem)/1 Arial, sans-serif; text-shadow: 0 2px 0 #41486a; }
.reference-road-lane.is-current .reference-road-medal { border-color: #188940; color: #eaffee; background: radial-gradient(circle at 38% 28%, #4ada6e, #1eae4a 68%, #157a35 69%); box-shadow: 0 0 26px rgba(42,224,96,.45), inset 0 0 0 3px rgba(216,255,223,.25); }
.reference-road-lane.is-used .reference-road-medal { border-color: #a27b18; color: #fff5b8; background: radial-gradient(circle at 38% 28%, #e6c347, #bd8e16 68%, #795b13 69%); }
.reference-road-grate { position: absolute; z-index: 2; bottom: 2px; left: 50%; width: 78px; height: 55px; border: 7px solid #555f81; border-bottom: 0; border-radius: 42px 42px 0 0; background: repeating-linear-gradient(90deg, #252b46 0 6px, #596282 6px 10px); transform: translateX(-50%); }
.reference-chicken-actor { position: absolute; z-index: 8; bottom: 18px; left: calc(7% + var(--chicken-step) * 15%); width: clamp(76px, 13vw, 112px); aspect-ratio: 1; transform: translateX(-50%); transition: left 760ms cubic-bezier(.22,.72,.2,1); filter: drop-shadow(0 8px 5px rgba(20,22,39,.52)); will-change: left, transform; }
.reference-chicken-actor span { position: absolute; inset: 0; background-image: var(--chicken-sprite); background-repeat: no-repeat; background-size: 500% 500%; background-position: 0 0; }
.reference-chicken[data-phase="jumping"] .reference-chicken-actor { animation: reference-chicken-jump 760ms cubic-bezier(.2,.7,.25,1) both; }
.reference-chicken[data-phase="jumping"] .reference-chicken-actor span { background-size: 400% 300%; }
.reference-chicken-result { position: absolute; z-index: 9; right: 18px; bottom: 36px; color: rgba(255,255,255,.72); font: 700 .58rem/1 var(--font-mono); letter-spacing: .08em; }
@keyframes reference-chicken-jump { 0%,100% { transform: translateX(-50%) translateY(0) rotate(0); } 48% { transform: translateX(-50%) translateY(-74px) rotate(-7deg); } }

/* Diamond Mines — original magenta board language, now generated at 4x4, 5x5 or 6x6. */
.game-stage .visual-stage.reference-mines { display: grid; grid-template-columns: minmax(120px, .42fr) minmax(260px, 1fr); align-items: center; gap: 20px; min-height: 540px; padding: 34px; background: #321037 url('/assets/local-games/mines/background.jpg') center/cover no-repeat !important; }
.reference-mines::before { position: absolute; z-index: 0; inset: 0; background: radial-gradient(circle at 29% 23%, rgba(252,50,224,.35), transparent 32%); content: ''; }
.reference-mines-logo { position: relative; z-index: 2; align-self: start; width: min(100%, 310px); margin-top: 20px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.35)); }
.reference-mines-board { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(var(--mine-columns), minmax(0,1fr)); gap: clamp(5px, 1vw, 10px); width: min(100%, 560px); justify-self: end; padding: clamp(10px, 2vw, 16px); border: 8px solid #2a0830; border-radius: 28px; background: rgba(35,5,42,.74); box-shadow: 0 0 0 3px #a04bab, inset 0 0 28px rgba(0,0,0,.72); }
.reference-mine-cell { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: clamp(8px,1.4vw,16px); background: #7d3388; box-shadow: 0 5px 0 #47154d, 0 0 0 2px #e282e7; }
.reference-mine-tile { position: absolute; inset: 0; background: url('/assets/local-games/mines/cell.png') 80% 0 / auto 100% no-repeat; }
.reference-mine-sprite { position: absolute; z-index: 3; inset: 0; opacity: 0; background-position: 0 0; background-repeat: no-repeat; transform: translateZ(0); }
.reference-mine-sprite.is-active, .reference-mine-cell.is-safe .reference-mine-sprite, .reference-mine-cell.is-bomb .reference-mine-sprite { opacity: 1; }
.reference-mine-sprite.is-reveal { background-image: url('/assets/mines-signals/diamond-reveal-spritesheet.png'); background-size: 400% 300%; background-position: 100% 100%; }
.reference-mine-sprite.is-bomb { background-image: url('/assets/mines-signals/bomb-explosion-spritesheet.png'); background-size: 400% 800%; background-position: 66.6667% 100%; }
.reference-mine-cell.is-opening { z-index: 8; box-shadow: 0 6px 0 #47154d, 0 0 0 2px #f0a0f2, 0 0 24px rgba(100,187,255,.48); }
.reference-mine-cell.is-safe { background: #100a28; box-shadow: 0 4px 0 #25123c, 0 0 0 2px #df77e5, 0 0 16px rgba(74,163,255,.3); }
.reference-mine-cell.is-bomb { z-index: 9; background: #54102c; box-shadow: 0 4px 0 #3b0c28, 0 0 0 2px #ff9e55, 0 0 30px rgba(255,75,36,.72); }
.reference-mine-cell.is-opening .reference-mine-tile, .reference-mine-cell.is-safe .reference-mine-tile, .reference-mine-cell.is-bomb .reference-mine-tile, .reference-mine-cell.is-closing .reference-mine-sprite { opacity: 0; }
.reference-mine-close { position: absolute; z-index: 5; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.reference-mines-blast { position: absolute; z-index: 20; inset: 0; opacity: 0; border-radius: 20px; background: radial-gradient(circle at 62% 52%, rgba(255,255,242,.96), rgba(255,219,55,.68) 8%, rgba(255,68,21,.3) 24%, transparent 58%); mix-blend-mode: screen; pointer-events: none; }
.reference-mines.is-blasting .reference-mines-blast { animation: reference-mines-blast .42s ease-out both; }
.reference-mines-status { position: absolute; z-index: 4; bottom: 17px; left: 34px; display: grid; gap: 5px; color: #f0a7f3; font: 700 .58rem/1 var(--font-mono); letter-spacing: .08em; }
.reference-mines-status strong { color: #ffdc5d; }
@keyframes reference-mines-blast { 0% { opacity: 0; } 35% { opacity: .92; } 100% { opacity: 0; } }

/* Penalty Champion — striker-only local signal playback. */
.game-stage .visual-stage.reference-football { min-height: 540px; background: #153e56 url('/assets/local-games/football/background.jpg') center/cover no-repeat !important; }
.reference-football::before { position: absolute; z-index: 0; inset: 0; background: linear-gradient(180deg, rgba(0,20,45,.18), rgba(0,35,15,.08)); content: ''; }
.reference-football-logo { position: absolute; z-index: 5; top: 20px; left: 50%; width: min(62%, 480px); transform: translateX(-50%); filter: drop-shadow(0 5px 7px rgba(0,0,0,.42)); }
.reference-scoreboard { position: absolute; z-index: 5; top: 102px; left: 50%; display: flex; align-items: center; gap: 18px; padding: 7px 18px; border: 3px solid #505b5d; border-radius: 4px; color: #ffe533; background: #111; box-shadow: inset 0 0 12px #000; transform: translateX(-50%); font: 800 .62rem/1 var(--font-mono); letter-spacing: .12em; white-space: nowrap; }
.reference-scoreboard strong { font-size: 1rem; }
.reference-goal { position: absolute; z-index: 3; right: 18%; bottom: 9%; left: 18%; height: 47%; border: 9px solid #f1f2ed; border-bottom-width: 11px; box-shadow: 0 10px 15px rgba(0,0,0,.45); }
.reference-net { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(255,255,255,.62) 28px 30px), repeating-linear-gradient(90deg, transparent 0 35px, rgba(255,255,255,.62) 36px 38px); transform: perspective(500px) rotateX(-4deg); }
.reference-goal-zones { position: absolute; z-index: 4; inset: 8% 4% 42%; display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.reference-goal-zone { display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; color: rgba(255,255,255,.5); background: rgba(0,25,42,.18); font: 800 .8rem/1 var(--font-mono); }
.reference-goal-zone.is-target { border-color: #ffd83c; color: #fff; background: rgba(255,216,60,.34); box-shadow: 0 0 20px rgba(255,216,60,.72); }
.reference-keeper { position: absolute; z-index: 5; bottom: 0; left: 50%; width: 108px; height: 152px; overflow: hidden; background: url('/assets/local-games/football/goalkeeper.png') -912px -18px / 1024px 1010px no-repeat; transform: translateX(-50%); transform-origin: 50% 100%; filter: drop-shadow(0 8px 5px rgba(0,0,0,.42)); }
.reference-ball { --ball-x:50%; position: absolute; z-index: 7; bottom: 4%; left: 50%; width: clamp(42px,6vw,62px); aspect-ratio: 1; border-radius: 50%; background: url('/assets/local-games/football/ball.png') 0 0 / 800% 400% no-repeat; transform: translateX(-50%); filter: drop-shadow(0 6px 5px rgba(0,0,0,.48)); }
.reference-football[data-zone="1"] { --ball-x:25%; }.reference-football[data-zone="2"] { --ball-x:37%; }.reference-football[data-zone="3"] { --ball-x:50%; }.reference-football[data-zone="4"] { --ball-x:63%; }.reference-football[data-zone="5"] { --ball-x:75%; }
.reference-football[data-phase="kick"] .reference-ball { animation: reference-ball-kick 1.2s cubic-bezier(.22,.72,.24,1) both; }
.reference-football[data-phase="goal"] .reference-ball, .reference-football[data-phase="save"] .reference-ball { bottom: 56%; left: var(--ball-x); width: 28px; }
.reference-football[data-phase="miss"] .reference-ball { bottom: 67%; left: calc(var(--ball-x) + 8%); width: 24px; }
.reference-football[data-phase="save"] .reference-keeper { animation: reference-keeper-save .58s ease-out both; }
.reference-football[data-phase="goal"] .reference-keeper { transform: translateX(-50%) rotate(12deg) translateX(-55px); }
.reference-football-status { position: absolute; z-index: 8; right: 0; bottom: 13px; left: 0; color: #fff; font: 800 .62rem/1 var(--font-mono); letter-spacing: .12em; text-align: center; text-shadow: 0 2px 5px #000; }
@keyframes reference-ball-kick { 0% { bottom: 4%; left: 50%; transform: translateX(-50%) scale(1) rotate(0); } 48% { bottom: 36%; transform: translateX(-50%) scale(.72) rotate(380deg); } 100% { bottom: 56%; left: var(--ball-x); transform: translateX(-50%) scale(.48) rotate(720deg); } }
@keyframes reference-keeper-save { to { transform: translateX(-50%) rotate(-68deg) translateY(-14px); } }

@media (max-width: 780px) {
  .reference-game { min-height: 420px; }
  .game-stage .visual-stage.reference-aviator { min-height: 420px; }
  .reference-aviator-logo { top: 42px; left: 20px; width: 34%; }
  .reference-aviator-history { gap: 12px; }
  .reference-aviator-plane { width: 125px; transform: scale(.82); transform-origin: left center; }
  .reference-aviator-readout strong { font-size: clamp(3rem,17vw,5rem); }
  .game-stage .visual-stage.reference-chicken { min-height: 430px; }
  .reference-chicken-bar { height: 48px; padding: 0 12px; }
  .reference-chicken-bar img { width: 44%; }
  .reference-chicken-bar span { font-size: .48rem; }
  .reference-road-scene { top: 48px; }
  .reference-road-lanes { grid-template-columns: repeat(6,minmax(52px,1fr)); }
  .reference-road-medal { width: clamp(48px,14vw,68px); border-width: 5px; font-size: .78rem; }
  .reference-road-grate { width: 54px; height: 43px; }
  .reference-chicken-actor { width: 78px; }
  .game-stage .visual-stage.reference-mines { grid-template-columns: 1fr; align-content: start; gap: 10px; min-height: 520px; padding: 16px 12px 38px; }
  .reference-mines-logo { width: 145px; margin: 0 auto; }
  .reference-mines-board { width: min(100%,430px); justify-self: center; padding: 9px; border-width: 6px; border-radius: 19px; }
  .reference-mines-status { bottom: 12px; left: 18px; }
  .game-stage .visual-stage.reference-football { min-height: 460px; }
  .reference-football-logo { top: 15px; width: 78%; }
  .reference-scoreboard { top: 83px; }
  .reference-goal { right: 8%; bottom: 11%; left: 8%; height: 45%; border-width: 6px; }
  .reference-keeper { transform: translateX(-50%) scale(.86); transform-origin: 50% 100%; }
}

@media (max-width: 430px) {
  .reference-game { min-height: 390px; }
  .game-stage .visual-stage.reference-aviator { min-height: 390px; }
  .game-stage .visual-stage.reference-chicken { min-height: 405px; }
  .reference-road-lanes { right: -23%; grid-template-columns: repeat(6,minmax(54px,1fr)); }
  .reference-chicken-actor { left: calc(5% + var(--chicken-step) * 15%); width: 70px; }
  .game-stage .visual-stage.reference-mines { min-height: 470px; padding-inline: 7px; }
  .reference-mines-board { gap: 4px; padding: 7px; }
  .game-stage .visual-stage.reference-football { min-height: 420px; }
  .reference-scoreboard { top: 72px; font-size: .5rem; }
  .reference-goal { bottom: 12%; height: 43%; }
  .reference-goal-zones { gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .reference-game * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
/* Authored local outcome recordings. The waiting scene stays DOM-rendered until
   the supplied main.mp4 loops arrive; outcome footage is never cropped. */
.game-outcome-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000 !important;
  border: 1px solid rgba(163, 237, 140, 0.18);
}

.game-outcome-stage::before,
.game-outcome-stage::after { display: none; }

.game-outcome-aviator { aspect-ratio: 792 / 440; }
.game-outcome-chicken-road { aspect-ratio: 816 / 304; }
.game-outcome-mines { aspect-ratio: 792 / 492; }
.game-outcome-football-penalties { aspect-ratio: 792 / 600; }

.game-outcome-video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: #000;
}
