/* Minimal surfaces share semantic colors so mode and purchased palettes compose. */
:root {
  color-scheme:light;
  --page-bg:#f7f8fa; --surface:#ffffff; --surface-soft:#f3f6f8; --surface-selected:#e9eff3;
  --text:#465762; --text-strong:#252b31; --text-muted:#68737c;
  --border:#dfe4e8; --border-strong:#aebdc8;
  --accent-color:#344b5b; --accent-hover:#2b414f; --accent-text:#ffffff; --focus:#536f83;
  --progress-track:#edf0f3; --progress-fill:#8c9fab; --badge-bg:#fffffff0;
  --success-bg:#f0f5f1; --success-text:#4e6c5d; --success-border:#dae6de; --backdrop:#15191c70;
  --void:var(--page-bg); --ink:var(--text-strong); --muted:var(--text-muted);
  --line:var(--border); --panel:var(--surface); --house-red:var(--accent-color); --brass:var(--text-muted);
}
body {background:var(--page-bg);color:var(--ink);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
h1,h2,h3,h1 em {font-family:inherit;font-style:normal;text-shadow:none;letter-spacing:-.025em}
button,a,input,select {transition:none!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible {outline:2px solid var(--focus);outline-offset:3px}
.wrap {max-width:1120px}
.grain,.orbit,.hero::before,.brand-mark,.brand-divider,.hero-stats,.machine-stage,.house-strip,.daily-stamp,.device-step {display:none!important}
.site-header {background:var(--surface);border-bottom:1px solid var(--border);backdrop-filter:none}
.nav {min-height:70px}
.brand {font-size:18px;font-weight:600;letter-spacing:-.025em;color:var(--text-strong)}
.nav-links,:root[data-device="phone"] .nav-links {display:flex}
.nav-links a {color:var(--text);font-weight:500;font-size:13px}
.nav-links a:hover {color:var(--text-strong)}
.device-settings,#deviceSettings,.sound-toggle {background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:5px;font-weight:500}
.device-settings:hover,#deviceSettings:hover,.sound-toggle:hover {background:var(--surface-soft);border-color:var(--border-strong)}
.sound-toggle[aria-pressed="true"] {color:var(--accent-color);background:var(--surface-selected)}
.hero,:root[data-device="phone"] .hero {display:block;min-height:0;max-height:none;padding:28px 0 16px}
.hero-copy {padding:0}
.hero-copy .eyebrow {display:none}
.hero-copy h1,:root[data-device="phone"] .hero-copy h1 {max-width:none;font-size:36px;font-weight:600;line-height:1.2;letter-spacing:-.035em}
.hero-copy>p:last-of-type {max-width:580px;margin:12px 0 20px;color:var(--text-muted);font-size:14px;line-height:1.7}
.hero-actions {display:flex;flex-direction:row;gap:9px;align-items:center}
.hero-actions .button,:root[data-device="phone"] .hero-actions>.button {flex:0 1 auto;width:auto;max-width:none}
.button {font-size:12px;font-weight:550;letter-spacing:0;border-radius:5px;box-shadow:none!important;min-height:var(--control-size,44px);padding:11px 16px}
.button:hover {transform:none}
.button-primary {color:var(--accent-text);background:var(--accent-color);border:1px solid var(--accent-color)}
.button-primary:hover {background:var(--accent-hover);border-color:var(--accent-hover)}
.button-quiet {color:var(--text);background:var(--surface);border-color:var(--border)}
.button-quiet:hover {color:var(--text-strong);background:var(--surface-soft);border-color:var(--border-strong)}
.section {padding:20px 0 32px}
.section-heading {margin-bottom:20px;gap:20px;align-items:center}
.section-heading .eyebrow {display:none}
.section-heading h2 {font-size:25px;font-weight:600;line-height:1.2}
.mode-label {font-family:inherit;font-size:11px;letter-spacing:0;color:var(--text-muted);font-weight:500;margin-bottom:7px}
.difficulty button {color:var(--text-muted);background:var(--surface);border-color:var(--border);font-size:11px;letter-spacing:0;font-weight:500;box-shadow:none;padding:9px 13px}
.difficulty button.active {color:var(--text-strong);background:var(--surface-selected);border-color:var(--border-strong);box-shadow:none}
.mode-note {font-size:10px;color:var(--text-muted)}
.arcade-wallet {padding:17px 20px;background:var(--surface);border:1px solid var(--border);border-radius:5px;gap:24px;margin-bottom:12px}
.wallet-balance {border-color:var(--border)}
.wallet-balance>span {font:500 11px system-ui,sans-serif;letter-spacing:0;color:var(--text)}
.wallet-balance strong,.wallet-balance b {color:var(--accent-color);font-weight:550;font-size:26px}
.wallet-balance small,.wallet-progress {color:var(--text-muted)}
.wallet-progress label {color:var(--text);font-weight:500;font-size:12px}
.wallet-progress b {color:var(--text)}
progress,progress::-webkit-progress-bar {background:var(--border)}
progress::-webkit-progress-value {background:var(--progress-fill)}
progress::-moz-progress-bar {background:var(--progress-fill)}
.daily-reward {background:var(--surface);border:1px solid var(--border);border-radius:5px;padding:17px 20px;gap:16px;color:var(--text);margin-bottom:20px}
.daily-reward strong {font-size:13px;color:var(--text-strong);font-weight:600}
.daily-reward p {color:var(--text-muted);font-size:11px;line-height:1.6}
.daily-reward .button {color:var(--text);border-color:var(--border);min-height:44px}
.machine-toolbar p {font-size:11px;color:var(--text-muted)}
.machine-toolbar .button {color:var(--text);background:var(--surface);border:1px solid var(--border);box-shadow:none}
.arcade-notice {color:var(--focus);font-size:12px}
.arcade-notice:empty {display:none}
.machine-grid {gap:18px}
.machine-card {background:var(--surface);border:1px solid var(--border);border-radius:5px;box-shadow:none;transition:none}
.machine-card:hover {transform:none;background:var(--surface-soft);border-color:var(--border-strong);box-shadow:none}
.machine-card.active {border-color:var(--border-strong);box-shadow:none;transform:none}
.machine-card:focus-visible {outline:2px solid var(--focus);outline-offset:3px}
.cabinet-art {padding:0;background:transparent;border-bottom:1px solid var(--border)}
.cabinet-art::before,.cabinet-art::after,.glass-reflection,.card-no {display:none}
.card-art {aspect-ratio:16/9;width:100%;height:auto;margin:0;border:0;object-fit:cover;filter:saturate(.65)}
.machine-card.locked .card-art {opacity:.76;filter:saturate(.4)}
.card-meta {padding:14px}
.machine-card h3 {color:var(--text);font-size:15px;font-weight:600;line-height:1.35;letter-spacing:-.02em;min-height:0}
.machine-card p {color:var(--text-muted);font-size:10px;margin:5px 0 19px;min-height:0}
.machine-rating,.tier-standard,.tier-advanced,.tier-expert {font:400 10px/1.6 system-ui,sans-serif;color:var(--text-muted);margin:-8px 0 13px;min-height:0}
.card-bottom {border-color:var(--border);font:400 9px system-ui,sans-serif;color:var(--text-muted);letter-spacing:0;padding-top:10px}
.card-bottom>span {text-transform:lowercase}
.card-bottom b {color:var(--text);font-size:13px;font-weight:500}
.lock-badge {background:var(--badge-bg);border:1px solid var(--border);color:var(--text);border-radius:3px;font:500 8px system-ui,sans-serif;letter-spacing:0;padding:5px 7px;right:9px;bottom:9px}
.global-leaderboard {background:var(--surface);border:1px solid var(--border);border-radius:5px;margin-top:30px;padding:24px}
.global-leaderboard h3 {color:var(--text);font-size:22px;font-weight:600}
.global-leaderboard .eyebrow {display:none}
.global-leaderboard>header {border-color:var(--border)}
.board-actions label {color:var(--text-muted)}
#boardScope,.leaderboard-status,#playerForm p {color:var(--text-muted)}
.leaderboard-columns,.leaderboard-row {border-color:var(--border);color:var(--text-muted)}
.leaderboard-row>span,.leaderboard-row>b {color:var(--focus)}
.leaderboard-row strong {color:var(--text);font-weight:500}
.leaderboard-empty {background:var(--surface-soft);border:0;border-radius:4px;color:var(--text-muted);font-size:12px;padding:16px}
#playerForm {border-color:var(--border)}
#playerForm label {color:var(--text);font-size:13px;font-weight:500}
#boardCategory,#playerName,#gamePlayerName {background:var(--surface);border:1px solid var(--border);border-radius:4px;color:var(--text)}
.feature-panel,.collection-note {background:var(--surface);border:1px solid var(--border);border-radius:5px;padding:24px}
.feature-panel .eyebrow {display:none}
.feature-panel h3 {color:var(--text);font-size:20px;font-weight:600}
.feature-panel p {color:var(--text-muted);font-size:12px}
.collection-note a {color:var(--focus);border-color:var(--border-strong);font-size:12px}
.collection-note small {color:var(--text-muted)}
.key {color:var(--text-muted)}
kbd {background:var(--surface-soft);color:var(--text);border:1px solid var(--border);border-bottom-width:2px;font-weight:500}
.eyebrow {color:var(--text-muted)}
.eyebrow::before {display:none}
footer {color:var(--text-muted);font-size:10px}
.footer-line {border-color:var(--border)}
.boost-status {color:var(--success-text);background:var(--success-bg);border-color:var(--success-border);font-weight:500}
.unlock-dialog {color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:6px;box-shadow:none}
.unlock-dialog::backdrop {background:var(--backdrop);backdrop-filter:none}
.unlock-dialog h2 {font-size:22px;font-weight:600}
.unlock-dialog>p:not(.eyebrow),.unlock-balance {color:var(--text-muted)}
.unlock-balance strong {color:var(--text)}
.unlock-dialog small {color:var(--text-muted)}

/* A simple chooser; the three device modes and large touch targets remain. */
#deviceDialog {width:min(620px,calc(100% - 32px));padding:30px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text);box-shadow:none}
#deviceDialog::backdrop {background:var(--backdrop);backdrop-filter:none}
#deviceDialog .device-kicker {font:500 12px system-ui,sans-serif;letter-spacing:0;color:var(--text-muted);text-transform:none;margin-bottom:18px}
#deviceDialog h2 {font:600 26px/1.2 system-ui,sans-serif;letter-spacing:-.025em;max-width:none}
#deviceDialog .device-intro {color:var(--text-muted);font-size:13px;margin:12px 0 22px}
[data-device-choice] {background:var(--surface);border:1px solid var(--border);border-radius:5px;color:var(--text);min-height:140px;padding:18px;gap:8px;box-shadow:none}
[data-device-choice]:hover {background:var(--surface-soft);border-color:var(--border-strong)}
[data-device-choice][aria-pressed="true"] {background:var(--surface-selected);border-color:var(--border-strong);box-shadow:none}
[data-device-choice][aria-pressed="true"]::after {color:var(--focus);font-size:14px}
[data-device-choice] .device-icon {stroke:var(--focus);width:35px;height:32px;margin-bottom:7px;stroke-width:2.5}
[data-device-choice] strong {color:var(--text);font-size:15px;font-weight:550}
[data-device-choice] span:not(.device-icon) {color:var(--text-muted);font-size:11px}
[data-device-choice] i {display:none}
#deviceChoiceHint {border-color:var(--border);color:var(--text-muted);font-size:11px}
.device-footnote {display:block;color:var(--text-muted);font-size:11px;line-height:1.6;margin-top:6px}

/* Quiet colors still need sufficient contrast at these compact text sizes. */
.hero-copy>p:last-of-type,.mode-note,.mode-label,.wallet-balance small,.wallet-progress,
.daily-reward p,.machine-toolbar p,.machine-card p,.machine-rating,
.tier-standard,.tier-advanced,.tier-expert,.card-bottom,#boardScope,
.leaderboard-status,#playerForm p,.leaderboard-columns,.leaderboard-row,
.leaderboard-empty,.board-actions label,.feature-panel p,.collection-note small,
.key,footer,.unlock-dialog small,.unlock-dialog>p:not(.eyebrow),.unlock-balance,#deviceDialog .device-kicker,
#deviceDialog .device-intro,[data-device-choice] span:not(.device-icon),
#deviceChoiceHint,.device-footnote {color:var(--text-muted)}
:root:is([data-device="phone"],[data-device="tablet"]) .button {min-height:var(--control-size)}

/* Keep play focused: neutral dark chrome around the illustrated table. */
.game-overlay,:root:is([data-device="phone"],[data-device="tablet"]) .game-overlay {color:#e8edf0;background:#171b20;backdrop-filter:none}
.game-header h2 {color:#e5eaf0;font-weight:550}
.game-header small {color:#97a2ac}
.scoreboard,.game-side,:root:is([data-device="phone"],[data-device="tablet"]) .scoreboard {background:#20262c;border-color:#343d46;border-radius:5px;box-shadow:none}
.scoreboard h3,.game-side h3 {color:#99a5af;font-weight:500}
.stat {border-color:#343d46}
.stat span {color:#99a5af}
.stat strong,#scoreValue,.points-stat strong,.game-wallet>strong {color:#dce5ec;font-weight:500}
.game-side p,.game-side small,.game-side label,#gameBoardScope,#gamePlayerForm small,#gamePlayerForm label {color:#a0adb7}
.game-side #gamePlayerName {background:#171d23;color:#dce5ec;border-color:#46525d}
.game-side .button-quiet,.game-side .secondary {background:#262e36;border-color:#46525d;color:#c6d0d8}
.game-wallet {border-color:#343d46}
.game-wallet small {color:#99a5af}
.best-list li {color:#99a5af}.best-list li b {color:#dce5ec}
#gameBoardStatus {color:#aebbc5;background:#252e36;border-color:#627b8d}
.pinball-wrap {border-color:#3b444d;box-shadow:none;border-radius:5px}
.close-game,:root:is([data-device="phone"],[data-device="tablet"]) #gameDetailsToggle {color:#c6d0d8;border-color:#46525d;background:#252d35;border-radius:4px}
.mobile-flippers button,:root:is([data-device="phone"],[data-device="tablet"]) .mobile-flippers button {background:#29333d;color:#cdd7df;border:1px solid #4a5965;border-radius:4px;box-shadow:none}
.mobile-flippers button:active,.mobile-flippers button.is-held,
:root:is([data-device="phone"],[data-device="tablet"]) .mobile-flippers button:active,
:root:is([data-device="phone"],[data-device="tablet"]) .mobile-flippers button.is-held {background:#405462}
#launchButton,:root:is([data-device="phone"],[data-device="tablet"]) #launchButton {background:#cbd5dd;color:#263a49;border-color:#d6dfe6}
#launchButton:active,#launchButton.is-held,
:root:is([data-device="phone"],[data-device="tablet"]) #launchButton:active,
:root:is([data-device="phone"],[data-device="tablet"]) #launchButton.is-held {background:#aebfcb}
:root:is([data-device="phone"],[data-device="tablet"]) .game-overlay.details-open .game-side {background:#20262c;border-color:#46525d;box-shadow:none}
.game-notice {color:#a8c4b6!important}

@media(max-width:900px) {
  .nav-links {border-color:var(--border)}
}
@media(max-width:700px) {
  .nav-links,:root[data-device="phone"] .nav-links {order:3;width:100%;min-height:36px;display:flex;justify-content:flex-start;gap:24px;padding-top:4px;border-top:0}
  .nav-links a {min-height:36px;display:inline-flex;align-items:center;font-size:12px}
  .hero,:root[data-device="phone"] .hero {padding:28px 0 18px}
  .hero-copy h1,:root[data-device="phone"] .hero-copy h1 {font-size:30px}
  .hero-copy>p:last-of-type {font-size:13px}
  .hero-actions .button {font-size:12px}
  .section {padding:23px 0 28px}
  .section-heading {gap:18px}
  .section-heading h2 {font-size:23px}
  .difficulty button {padding:9px 5px;font-size:11px}
  .arcade-wallet,.daily-reward {padding:16px}
  .wallet-balance {border-color:var(--border)}
  .machine-grid {gap:12px}
  .machine-card h3,:root[data-device="phone"] .machine-card h3 {font-size:14px}
  .card-meta,:root[data-device="phone"] .card-meta {padding:12px}
  .machine-rating {font-size:10px;line-height:1.6}
  .global-leaderboard {padding:18px}
  .global-leaderboard h3 {font-size:21px}
  #deviceDialog {padding:24px}
  #deviceDialog h2 {font-size:25px}
  [data-device-choice] {min-height:84px;padding:14px 16px}
  [data-device-choice] .device-icon {width:32px;height:32px;margin:0}
  :root[data-device="computer"] .game-overlay {background:#171b20}
  :root[data-device="computer"] .scoreboard,:root[data-device="computer"] .game-overlay.details-open .game-side {background:#20262c}
  :root[data-device="computer"] #gameDetailsToggle {color:#c6d0d8;border-color:#46525d;background:#252d35}
}
@media(max-height:500px) and (orientation:landscape) {
  #deviceDialog {padding:20px 24px}
  [data-device-choice] {min-height:80px;padding:14px}
}

/* Compact, play-first navigation and collection controls. */
.hero {display:none!important}
#tables {padding-top:26px}
.catalog-info {display:grid;grid-template-columns:.9fr 1.1fr;gap:12px;margin-bottom:16px}
.catalog-info .arcade-wallet,.catalog-info .daily-reward {margin:0;padding:12px 14px;gap:14px}
.catalog-info .arcade-wallet {grid-template-columns:105px 1fr}
.catalog-info .wallet-balance {display:flex;flex-wrap:wrap;justify-content:space-between;padding-right:12px;gap:4px}
.catalog-info .wallet-balance small {display:none}
.catalog-info .wallet-balance strong {font-size:22px}
.catalog-info .wallet-progress label {font-size:10px}
.catalog-info .wallet-progress {font-size:10px;gap:6px}
.catalog-info .daily-reward {align-items:center}
.catalog-info .daily-reward p {max-width:460px}
.table-browser {display:flex;align-items:end;gap:12px;margin:16px 0 12px}
.table-browser label {display:grid;gap:6px;color:var(--text-muted);font-size:11px}
.table-browser label:first-child {flex:1}
#tableSearch,#tableFilter {min-width:0;width:100%;min-height:var(--control-size,44px);padding:10px 12px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);font:inherit;font-size:13px}
#tableCount {white-space:nowrap;font-size:11px;color:var(--text-muted);margin:0;padding-bottom:14px}
#tableEmpty {padding:22px;color:var(--text-muted);text-align:center;font-size:13px}
.machine-card[hidden],#tableEmpty[hidden] {display:none!important}
.machine-toolbar {margin:0 0 12px;padding:0}
.machine-toolbar p {margin:0}
#themeToggle {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:var(--control-size,44px);padding:9px 12px;border:1px solid var(--border);border-radius:5px;background:var(--surface);color:var(--text);font:500 12px system-ui,sans-serif;white-space:nowrap;cursor:pointer}
#themeToggle:hover {background:var(--surface-soft)}
#themeToggle svg {display:block;flex:none}
#themeToggle svg[hidden] {display:none}
#appearanceSettings {border:0;background:none;padding:0;min-height:36px;color:var(--text-muted);font:500 13px system-ui,sans-serif;cursor:pointer}
#appearanceSettings:hover {color:var(--text-strong)}
@media(max-width:900px) {.catalog-info{grid-template-columns:1fr}.table-browser{flex-wrap:wrap}}
@media(max-width:700px) {
  #themeLabel {display:none}
  #themeToggle {width:42px;padding:9px}
  .header-tools {gap:6px}
  .nav-links,:root[data-device="phone"] .nav-links {gap:18px}
  #appearanceSettings {font-size:12px}
  .catalog-info .arcade-wallet {grid-template-columns:105px 1fr}
  .catalog-info .wallet-balance {border:0;margin:0;padding:0 12px 0 0}
  .catalog-info .wallet-progress {min-width:0}
  .catalog-info .daily-reward {flex-direction:row;gap:12px}
  .catalog-info .daily-reward .button {width:auto;flex:none}
  .table-browser label:first-child {flex:1 1 100%}
  .table-browser label:nth-child(2) {flex:1}
  #tableCount {margin-left:auto}
}
@media(max-width:380px) {
  #deviceSettings [data-device-label] {display:none}
  #deviceSettings {width:42px;padding:9px}
}
.help-details {margin-top:20px;margin-bottom:30px;border-top:1px solid var(--border);padding-top:16px}
.help-details>summary {cursor:pointer;color:var(--text-muted);font-size:13px;padding:8px 0}
.help-details .how-grid {margin-top:16px}
