/* Shared Games surfaces; game worlds retain their own palette. */
[data-theme=gilded] .games-app{--bg:#fffdf8;--soft:#f5f0e3;--ink:#30281a;--muted:#756547;--line:#d7c9a4;--blue:#876019;background:var(--bg)}
[data-theme=vermilion] .games-app{--bg:#fffaf7;--soft:#f9ece6;--ink:#301b19;--muted:#805b54;--line:#e5c0b7;--blue:#bd3027;background:var(--bg)}
.adventure-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;border-block:1px solid var(--game-line);padding:16px 0;margin:24px 0}.adventure-shortcuts a{display:inline-flex;align-items:center;min-height:44px}
.games-app{--game-radius:24px;--game-panel:var(--soft,#f5f5f7);--game-line:var(--line,#e5e5e8);--game-ink:var(--ink,#1d1d1f);--game-soft:var(--muted,#6e6e73);--game-accent:var(--blue,#0071e3);color:var(--game-ink)}
.games-app [hidden]{display:none!important}
.games-app .arcade-hero{padding-top:48px;padding-bottom:32px}.games-app .arcade-hero h1{font-size:clamp(2.6rem,5vw,4rem);letter-spacing:-.04em;line-height:1.12}.games-app .identity{flex-wrap:wrap;gap:16px}
.games-app button,.games-app .button,.games-app input,.games-app select{touch-action:manipulation}.games-app .button{min-height:44px}.games-app button:active{transform:scale(.97)}
.games-app button.text-link{background:transparent;border:0;cursor:pointer;color:var(--game-accent)}
.games-app button:focus-visible,.games-app a:focus-visible,.games-app input:focus-visible,.games-app select:focus-visible{outline:3px solid var(--game-accent);outline-offset:4px}
.games-app .game-tile{border-radius:var(--game-radius);text-align:left;position:relative}.games-app .game-tile[aria-pressed=true],.games-app .game-tile:has([data-select-game][aria-pressed=true]){border-color:var(--game-accent);box-shadow:0 0 0 2px var(--game-accent)}
.games-app .game-tile strong{letter-spacing:-.025em}.games-app .tile-meta{font-size:.75rem}.games-app .tile-description{line-height:1.6}.games-app .game-filters{gap:8px;flex-wrap:wrap}.games-app .game-filters .filter{min-height:44px}
.room-picker{grid-column:1/-1;width:100%;min-width:0;background:var(--game-panel);border:1px solid var(--game-line);border-radius:var(--game-radius);padding:24px;margin:8px 0 16px;scroll-margin-top:88px}
.picker-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.picker-heading .text-link{min-height:44px;padding:8px}.games-app .room-picker .game-feature{margin:0;padding:12px 0 20px;background:none;border:0;border-radius:0}.games-app .room-picker .rooms-section{padding:16px 0 0;margin:0;border-top:1px solid var(--game-line)}.games-app .room-picker .rules{margin:18px 0 0}.games-app .room-picker h2{font-size:1.6rem;letter-spacing:-.03em}.games-app .room-picker .permission-copy{font-size:.82rem}
.games-app .room-list{gap:12px}.games-app .room-item{border:1px solid var(--game-line);border-radius:16px;background:var(--bg,#fff);padding:16px;min-width:0}.games-app .room-item .text-link{display:inline-flex;align-items:center;min-height:44px}.room-item button:disabled{color:var(--game-soft)}
.games-app .join-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px}.games-app .join-form input{width:100%;min-width:0;min-height:46px;font-size:1rem}.games-app .game-table{scroll-margin-top:0}.games-app .table-toolbar{gap:16px}.games-app .toolbar-actions{gap:8px;flex-wrap:wrap}.games-app .table-toolbar h2{font-size:clamp(1.3rem,3vw,1.8rem);letter-spacing:-.03em}
.ready-progress{margin:12px 0;padding:12px 16px;border:1px solid var(--game-line);border-radius:14px;background:var(--game-panel);font-size:.9rem}.connection-status{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff4dd;color:#6a4514;padding:12px 16px;border-radius:14px;line-height:1.6}.connection-status .text-link{white-space:nowrap;min-height:44px}.connection-status[hidden],.ready-progress[hidden]{display:none}
.invite-dialog{width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--game-line);border-radius:var(--game-radius);padding:28px;background:var(--bg,#fff);color:var(--game-ink);box-shadow:0 24px 80px #0003}.invite-dialog::backdrop{background:#18232c60}.invite-dialog h2{font-size:1.8rem;letter-spacing:-.035em}.invite-dialog label{display:block;font-size:.85rem;margin:18px 0 8px}.invite-dialog input{width:100%;font-size:1rem;min-height:46px;box-sizing:border-box}.dialog-close{float:right;min-height:44px}.invite-actions{display:flex;gap:8px;margin-top:16px;flex-wrap:wrap}
.solo-utility{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.games-app .solo-tabs{display:flex;gap:8px;overflow-x:auto;flex-wrap:nowrap;max-width:100%;padding:4px 4px 12px;scrollbar-width:thin}.games-app .solo-tabs button{white-space:nowrap;flex:0 0 auto}.game-load-status{padding:14px 16px;background:var(--game-panel);border-radius:14px}.games-app .solo-shell{scroll-margin-top:12px}.games-app .solo-shell>section{scroll-margin-top:16px}
.games-app .solo-heading h2,.games-app .expedition-heading h2,.games-app .survivor-heading h2{letter-spacing:-.035em}.games-app .solo-tools{gap:12px}.games-app .direction-pad{gap:10px}.games-app .direction-pad button{min-width:52px;min-height:48px}.games-app .mine-cell{touch-action:none}.games-app .mine-nine .mine-cell{min-height:32px}.games-app #merge-board{touch-action:none;overscroll-behavior:contain}
.solo-journey{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.journey-card{padding:18px;border-radius:18px;border:1px solid var(--game-line);background:var(--game-panel)}.journey-card h3{margin:0 0 8px;font-size:1rem}.journey-card p{margin:4px 0;line-height:1.6;font-size:.9rem}.journey-card small{color:var(--game-soft)}.journey-card progress{width:100%;height:8px;accent-color:var(--game-accent)}.journey-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.survivor-builds{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.survivor-builds button{border:1px solid var(--game-line);border-radius:16px;padding:16px;background:var(--game-panel);color:var(--game-ink);text-align:left;min-height:90px}.survivor-builds button strong,.survivor-builds button small{display:block}.survivor-builds button small{line-height:1.5;margin-top:6px;color:var(--game-soft)}.survivor-builds button[aria-pressed=true]{border-color:var(--game-accent);box-shadow:inset 0 0 0 1px var(--game-accent)}
.games-app .fishing-controls .fish-action{min-height:56px;font-size:1rem;touch-action:none;user-select:none}.games-app .fish-control-mode{min-height:44px}.games-app .fish-ponds button,.games-app .fish-upgrade{min-height:48px}.games-app .survivor-top-actions button,.games-app .survivor-dash{min-width:44px;min-height:44px;touch-action:none}.games-app .survivor-dash{right:max(18px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));width:78px;height:78px}.games-app .survivor-touch-hint{pointer-events:none}
[data-theme=aurora] .games-app{--bg:#101a2b;--ink:#eff4ff;--muted:#b2c1d7;--soft:#162338;--line:#354760;--blue:#8dc9ff;--game-panel:#162338;--game-line:#354760;--game-ink:#eff4ff;--game-soft:#b2c1d7;--game-accent:#8dc9ff;background:#101a2b}
[data-theme=aurora] .games-app .topbar{background:#101a2bf2;border-color:#354760}
[data-theme=aurora] .games-app .solo-tabs{scrollbar-color:#354760 #101a2b}
[data-theme=aurora] .games-app .solo-tabs button[aria-pressed=true]{color:#102135}
[data-theme=aurora] .games-app :is(.join-form,.room-picker,.invite-dialog) :is(input,select){background:#101a2b;color:#eff4ff;border-color:#354760}
[data-theme=aurora] .games-app :is(.lobby-actions,.join-form,.invite-actions) .button:not(.secondary){background:#8dc9ff;color:#102135}
.games-app.at-table{padding-bottom:env(safe-area-inset-bottom)}
@media(hover:hover) and (pointer:fine){.games-app .game-tile:hover{transform:translateY(-3px)}.games-app .room-item .text-link:hover{color:var(--game-accent)}}
@media(max-width:600px){.games-app .arcade-hero{padding-top:28px}.games-app .catalog{grid-template-columns:1fr}.room-picker{padding:16px;margin:4px 0 12px}.games-app .room-picker .game-feature{display:block}.games-app .lobby-actions{margin-top:16px}.games-app .join-form{grid-template-columns:1fr 1fr}.games-app .join-form>.button{grid-column:1/-1}.games-app .table-toolbar{align-items:start}.games-app .table-toolbar .toolbar-actions{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.games-app .toolbar-actions>.button{font-size:.78rem;padding:10px 8px;min-width:0}.games-app .toolbar-actions>.game-sound,.games-app .toolbar-actions>.audio-settings-button{min-height:44px}.games-app .table-actions{position:relative;gap:8px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.games-app .hand{padding-top:26px;padding-bottom:10px}.games-app .playing-card{min-width:38px}.games-app .seats .seat{padding:10px}.games-app .seat h3{font-size:.85rem;overflow-wrap:anywhere}.games-app .ready-progress{font-size:.8rem}.survivor-builds{grid-template-columns:1fr}.survivor-builds button{min-height:68px;padding:12px}.solo-journey{grid-template-columns:1fr}.invite-dialog{padding:20px}.games-app .fish-reel-meter{min-height:160px}.games-app .fishing-controls{padding:18px}.games-app .fish-action{position:relative}}
@media(max-width:390px){.games-app .survivor-stats{gap:5px}.games-app .survivor-stats span{font-size:9px}.games-app .survivor-stats strong{font-size:14px}.games-app .survivor-top-actions{gap:4px}.games-app .survivor-top-actions button{font-size:11px;padding:8px}.games-app .survivor-vitals{min-width:90px}.games-app .join-form{grid-template-columns:1fr}.games-app .join-form>.button{grid-column:auto}}
@media(prefers-reduced-motion:reduce){.games-app button,.games-app .game-tile{transition:none;animation:none}.games-app button:active,.games-app .game-tile:hover{transform:none}}
@media(prefers-reduced-transparency:reduce){.games-app .topbar{background:var(--bg,#fff);backdrop-filter:none}}
@media(prefers-contrast:more){.room-picker,.journey-card,.invite-dialog,.room-item{border-width:2px}.games-app{--game-soft:var(--game-ink)}}
