:root{font-family:Segoe UI,system-ui,sans-serif;color-scheme:dark;color:#e5eaf3;background:#0b1220}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%}body{margin:0;min-width:320px;overflow-x:hidden;min-height:100vh;min-height:100dvh;background:radial-gradient(circle at top,#152238,#0b1220 55%)}button{font:inherit;cursor:pointer}button,a,input,select,label,canvas{touch-action:manipulation;-webkit-tap-highlight-color:transparent}.minesweeper{display:grid;gap:.65rem}.minesweeper-difficulty{border:1px solid #2f3d5d;border-radius:12px;padding:.75rem;background:#0f172a;display:grid;gap:.7rem}.preset-row{display:flex;flex-wrap:wrap;gap:.45rem}.difficulty-chip{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.42rem .62rem}.difficulty-chip.active{border-color:#63a7ff;background:#18355f}.custom-config{display:grid;gap:.45rem}.custom-config label{display:grid;gap:.2rem;color:#c2cee5;font-size:.86rem}.custom-config input[type=range]{width:100%}.minesweeper-panel{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:"btn flag flag" "timer timer mines" "status status status";gap:.5rem;align-items:center}.new-game-button{grid-area:btn;justify-self:start;border:0;border-radius:10px;padding:.5rem .75rem;font-weight:600;background:#4d7cff;color:#fff}.flag-mode-toggle{grid-area:flag;justify-self:end;border:1px solid #3a5380;border-radius:10px;padding:.5rem .75rem;background:#1a2b47;color:#e7edff;font-weight:600;min-height:44px}.flag-mode-toggle.active{border-color:#ef4444;background:#4a1d24}.mine-badge{background:#1f2a40;border:1px solid #2e3e5f;border-radius:10px;padding:.45rem .65rem}.timer-badge{grid-area:timer;justify-self:start}.mines-badge{grid-area:mines;justify-self:end}.game-status{grid-area:status;min-height:1.4em;color:#b8c2d4}.board-wrap{display:block;width:max-content;justify-self:center;border:2px solid #3b4c6e;border-radius:12px;overflow:hidden;background:#9ea9b8}.board-canvas{display:block;max-width:100%;touch-action:manipulation;-webkit-tap-highlight-color:transparent;width:auto;height:auto;image-rendering:pixelated;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.help-text{margin:0;font-size:.9rem;color:#93a3c6}.connect-drop,.connect-mode-shell{display:grid;gap:.7rem}.connect-mode-controls,.connect-drop-panel{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem}.connect-drop-scoreboard{display:flex;flex-wrap:wrap;gap:.45rem;margin-left:auto}.score-token{border:1px solid #2e3e5f;border-radius:999px;padding:.35rem .62rem;font-weight:600;font-size:.88rem}.score-token.red{background:#ef44442e;color:#fecaca}.score-token.yellow{background:#facc152e;color:#fde68a}.connect-board-wrap{display:block;width:max-content;max-width:100%;justify-self:center;border:2px solid #2e4d99;border-radius:12px;overflow:hidden;background:#081126}.connect-board-canvas{display:block;width:auto;height:auto;cursor:pointer}.connect-game-card{align-content:start;justify-items:center;gap:.75rem;min-height:min(78dvh,920px)}.connect-multiplayer .connect-drop-scoreboard{width:100%;justify-content:center;margin-left:0}.game-leaderboard{border:1px solid #2f3d5d;border-radius:12px;background:#0f172a;padding:.75rem}.game-leaderboard-head h3{margin:0 0 .45rem;font-size:.96rem;color:#c4d2f0}.game-leaderboard-table{display:grid;gap:.3rem}.game-leaderboard-row{display:grid;grid-template-columns:46px 1fr 120px;gap:.45rem;border-radius:8px;padding:.36rem .45rem;background:#12203a;color:#e5eaf3}.game-leaderboard-row.header{background:#162746;color:#b9c8e8;font-size:.82rem;text-transform:uppercase;letter-spacing:.04em}.game-leaderboard-state{margin:.3rem 0 0;color:#9fb0d4;font-size:.88rem}.pong{display:grid;gap:1rem}.pong-card{border:1px solid #2f3d5d;border-radius:12px;padding:.85rem;background:#0f172a;display:grid;gap:.65rem}.pong-room-card{align-content:start;transition:padding .22s ease,border-color .22s ease,background-color .22s ease,box-shadow .22s ease}.pong-room-card-controls{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.pong-room-card.collapsed{position:sticky;top:.75rem;z-index:8;padding:.55rem .7rem;box-shadow:0 8px 18px #01061247}.pong-room-content{display:grid;gap:.65rem;max-height:1400px;opacity:1;transform:translateY(0);transition:max-height .24s ease,opacity .18s ease,transform .22s ease;overflow:hidden}.pong-room-card.collapsed .pong-room-content{max-height:0;opacity:0;transform:translateY(-8px);pointer-events:none}.pong-expand-browser{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.45rem .65rem}.pong-game-card{min-height:min(74dvh,820px);display:grid;place-items:center;padding:1rem;scroll-margin-block:10vh}.room-browser{display:grid;gap:.6rem}.room-browser-head{display:flex;align-items:center;justify-content:space-between;gap:.6rem}.room-browser-head h3{margin:0;font-size:1rem}.room-browser-head button{border:1px solid #3a5380;border-radius:10px;background:#162746;color:#dce8ff;padding:.35rem .55rem}.room-list{display:grid;gap:.4rem}.room-empty{margin:0;color:#a8b6d4;font-size:.9rem}.room-row{border:1px solid #32486f;border-radius:10px;background:#0f1d37;display:flex;justify-content:space-between;align-items:center;padding:.35rem;gap:.4rem}.room-row.selected{border-color:#5f84d6;background:#17294b}.room-row-select{border:0;background:transparent;color:#e5eaf3;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:.6rem;width:100%;padding:.35rem .45rem}.room-row-join{border:1px solid #3a5380;border-radius:8px;background:#1a2b47;color:#e7edff;padding:.35rem .55rem}.room-row-join:disabled{opacity:.55}.room-row-joined{border:1px solid #2f5f49;border-radius:8px;background:#103526;color:#a7f3d0;padding:.35rem .55rem;font-size:.86rem}.room-name{font-weight:600}.room-meta{color:#9fb0d4;font-size:.86rem}.room-field{display:grid;gap:.35rem}.room-field label{font-size:.82rem;color:#93a3c6}.room-field input{border:1px solid #32486f;border-radius:10px;background:#111d35;color:#e5eaf3;padding:.5rem .6rem}.room-browser-actions{display:flex;flex-wrap:wrap;gap:.5rem}.room-browser-actions button{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.45rem .65rem}.room-browser-actions button:disabled,.room-browser-head button:disabled{opacity:.55}.room-browser-connection{margin:0;color:#9fb0d4;font-size:.86rem}.room-selection{margin:0;color:#b5c4e2;font-size:.9rem}.name-modal-backdrop{position:fixed;inset:0;background:#020617a6;display:grid;place-items:center;padding:1rem;z-index:40}.name-modal{width:min(420px,94vw);border:1px solid #415b8f;border-radius:14px;background:#0c172b;padding:.9rem;display:grid;gap:.6rem}.name-modal h4{margin:0}.name-modal p{margin:0;color:#b4c3e3}.name-modal-form{display:grid;gap:.45rem}.name-modal-form label{font-size:.82rem;color:#93a3c6}.name-modal-form input{border:1px solid #32486f;border-radius:10px;background:#111d35;color:#e5eaf3;padding:.5rem .6rem}.name-modal-actions{display:flex;justify-content:flex-end;gap:.5rem}.name-modal-actions button{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.42rem .62rem}.pong-field{display:grid;gap:.35rem}.pong-field label{font-size:.82rem;color:#93a3c6}.pong-field input{border:1px solid #32486f;border-radius:10px;background:#111d35;color:#e5eaf3;padding:.5rem .6rem}.pong-actions{display:flex;flex-wrap:wrap;gap:.5rem}.pong-actions-secondary{margin-top:.2rem}.pong-actions button{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.45rem .65rem}.pong-actions button:disabled{opacity:.55}.pong-meta{display:flex;flex-wrap:wrap;gap:.8rem;color:#9fb0d4;font-size:.88rem}.pong-status{margin:0;color:#d3ddf4}.pong-error{margin:0;color:#fca5a5}.pong-board-wrap{--pong-height: min(540px, max(260px, calc(100dvh - 360px) ));border:2px solid #30466f;border-radius:12px;overflow:hidden;background:#081326;width:100%;max-width:min(900px,calc(var(--pong-height) * 5 / 3));justify-self:center}.pong-canvas{display:block;width:100%;height:auto;aspect-ratio:5 / 3}.pong-touch-controls{display:none;grid-template-columns:1fr 2.4fr 1fr;gap:.6rem;height:96px;width:100%;max-width:900px;justify-self:center}@media(pointer:coarse){.pong-touch-controls{display:grid}}.pong-touch-button,.pong-touch-pad{border:1px solid #3a5380;border-radius:14px;background:#1a2b47;color:#e7edff;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.pong-touch-button{font-size:1.8rem}.pong-touch-button:active{background:#24406d;border-color:#63a7ff}.pong-touch-pad{display:grid;place-items:center;background:repeating-linear-gradient(0deg,transparent 0 14px,rgba(99,167,255,.1) 14px 16px),#12213b;color:#7f94bd;font-size:.85rem}.ttt-game-card{min-height:min(68dvh,760px)}.ttt-board-wrap{border:2px solid #30466f;border-radius:12px;background:#081326;padding:.85rem;display:grid;gap:.7rem;width:min(100%,440px)}.ttt-turn{color:#c4d2f0;font-weight:600;text-align:center}.ttt-score{display:flex;justify-content:space-between;gap:.6rem;color:#b9c8e8;font-size:.9rem}.ttt-board{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}.ttt-cell{border:1px solid #395482;border-radius:10px;background:#132342;color:#e5eaf3;min-height:96px;font-size:2.1rem;font-weight:700}.ttt-cell:disabled{opacity:.9}.ttt-cell.win{border-color:#58d0a4;background:#0e3b2e;color:#b7f7df}.ttt-players{display:flex;justify-content:space-between;gap:.6rem;color:#9fb0d4;font-size:.86rem}.ttt-player-slot{border:1px solid #395482;border-radius:8px;background:#12233f;padding:.3rem .5rem}.ttt-player-slot.self{border-color:#57c7ff;background:#103247;color:#c7ebff}.ttt-next-round{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.45rem .65rem;justify-self:center}@media(max-width:860px){.pong-room-card.collapsed{top:.5rem}.pong-game-card{min-height:auto;padding:.9rem .75rem}@media(prefers-reduced-motion:reduce){.pong-room-card,.pong-room-content{transition:none}}.pong-board-wrap{--pong-height: min(540px, max(220px, calc(100dvh - 420px) ))}.ttt-cell{min-height:78px}}@media(prefers-reduced-motion:reduce){.pong-room-card,.pong-room-content{transition:none}}.rps-play-stack{display:grid;gap:1rem;scroll-margin-block:10vh}.rps-setup-card{align-content:start}.rps-setup-title{margin:0;font-size:1rem}.rps-setup-group{display:grid;gap:.45rem}.rps-setup-label{font-size:.85rem;color:#9fb0d4}.rps-ready-row{display:flex;flex-wrap:wrap;gap:.5rem}.rps-ready-chip{border:1px solid #32486f;border-radius:999px;background:#0f1d37;color:#a8b6d4;padding:.25rem .7rem;font-size:.85rem}.rps-ready-chip.ready{border-color:#4ade80;color:#bbf7d0;background:#123122}.rps-action-button{border:1px solid #3a5380;border-radius:10px;background:#18355f;color:#e7edff;padding:.5rem .9rem}.rps-action-button:disabled{opacity:.55;cursor:default}.rps-ready-local{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}.rps-key-hint{color:#9fb0d4}.rps-action-zone{display:grid;gap:.5rem;justify-items:center;align-content:center;min-height:84px;border-top:1px solid #24314c;padding-top:.6rem}.rps-action-controls{display:grid;justify-items:center;min-height:40px;align-content:center}.rps-action-hint{margin:0;color:#9fb0d4;font-size:.9rem}.rps-scoreline{display:flex;align-items:center;justify-content:space-between;gap:.6rem;color:#d3ddf4;font-size:.95rem}.rps-scoreline strong{font-size:1.3rem;color:#e7edff}.rps-bestof{color:#9fb0d4;font-size:.8rem;text-transform:uppercase;letter-spacing:.05em}.rps-arena-grid{display:grid;grid-template-columns:1fr minmax(180px,1.4fr) 1fr;gap:.75rem;align-items:stretch}.rps-player-card{border:1px solid #32486f;border-radius:12px;background:#0f1d37;padding:.7rem;display:grid;gap:.4rem;align-content:start}.rps-player-card.you{border-color:#63a7ff;box-shadow:0 0 0 1px #63a7ff59}.rps-player-head{display:flex;align-items:baseline;justify-content:space-between;gap:.4rem}.rps-player-name{font-weight:600;color:#e7edff}.rps-player-you{font-size:.7rem;text-transform:uppercase;color:#63a7ff}.rps-player-score{font-size:2rem;font-weight:700;color:#f4f7ff;line-height:1}.rps-player-state{min-height:1.5rem}.rps-badge{display:inline-block;font-size:.8rem;color:#a8b6d4}.rps-badge.ready{color:#bbf7d0}.rps-badge.locked{color:#fcd34d}.rps-player-throw{font-size:1.1rem;color:#e7edff}.rps-center-field{border:1px solid #2f3d5d;border-radius:12px;background:radial-gradient(circle at top,#16294a,#0c1526 70%);display:grid;place-items:center;padding:1rem;min-height:150px;text-align:center}.rps-flash{display:grid;justify-items:center}.rps-result{display:grid;gap:.35rem;justify-items:center}.rps-timer-ring{position:relative;width:150px;height:150px;display:grid;place-items:center}.rps-timer-ring svg{position:absolute;inset:0;width:100%;height:100%}.rps-timer-track{fill:none;stroke:#24314c;stroke-width:7}.rps-timer-progress{fill:none;stroke-width:7;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:0;transform:rotate(-90deg);transform-origin:center;animation-name:rps-timer-drain;animation-timing-function:linear;animation-fill-mode:forwards}@keyframes rps-timer-drain{0%{stroke-dashoffset:0;stroke:#4ade80}55%{stroke:#fbbf24}to{stroke-dashoffset:100;stroke:#f87171}}.rps-flash-word{font-size:2.6rem;font-weight:800;letter-spacing:.04em;color:#e7edff;animation:rps-word-pop .26s cubic-bezier(.2,.9,.3,1.2)}.rps-timer-ring .rps-flash-word{position:relative;z-index:1;font-size:1.6rem}.rps-shoot{color:#fcd34d}@keyframes rps-word-pop{0%{opacity:.2;transform:scale(1.35)}to{opacity:1;transform:scale(1)}}.rps-outcome-banner{margin:0;font-size:1.3rem;font-weight:700;color:#e7edff}.rps-match-banner{margin:0;font-size:1.35rem;font-weight:800;color:#fcd34d}.rps-result.outcome-tie .rps-outcome-banner{color:#a8b6d4}.rps-throws{display:flex;flex-wrap:wrap;gap:.6rem;justify-content:center;min-height:88px;align-items:center}.rps-throw-button{border:1px solid #3a5380;border-radius:12px;background:#142743;color:#e7edff;padding:.7rem 1.1rem;display:grid;gap:.2rem;justify-items:center;min-width:92px}.rps-throw-button:disabled{opacity:.5;cursor:default}.rps-throw-button.selected{border-color:#63a7ff;background:#18355f;box-shadow:0 0 0 1px #63a7ff66}.rps-throw-icon{font-size:1.8rem}.rps-throw-label{font-size:.85rem}.rps-local-legend{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;transition:opacity .16s ease}.rps-local-legend.dim{opacity:.5}.rps-legend-col{border:1px solid #32486f;border-radius:10px;background:#0f1d37;padding:.6rem;display:grid;gap:.4rem}.rps-legend-title{font-weight:600;color:#e7edff}.rps-legend-keys{display:grid;gap:.25rem;color:#a8b6d4;font-size:.9rem}.rps-legend-key kbd{display:inline-block;min-width:1.4rem;text-align:center;border:1px solid #3a5380;border-bottom-width:2px;border-radius:6px;background:#1a2b47;color:#e7edff;padding:.05rem .3rem;margin-right:.3rem;font-family:inherit;font-size:.8rem}@media(max-width:640px){.rps-arena-grid,.rps-local-legend{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.rps-flash-word{animation:none}.rps-timer-progress{animation:none;stroke:#63a7ff;stroke-dashoffset:0}}.chess,.checkers{display:grid;gap:1rem}.game-setup-card{align-content:start}.game-setup-title{margin:0;font-size:1rem}.game-setup-group{display:grid;gap:.45rem}.game-setup-label{font-weight:600;color:#c4d2f0;font-size:.9rem}.game-setup-actions-card{display:grid;gap:.5rem;justify-items:start}.chess-game-card,.checkers-game-card{display:flex;flex-direction:column;align-items:center;gap:.6rem;min-height:auto}.chess-scoreline{font-weight:700;color:#dbe7ff;text-align:center}.chess-player-row{width:min(calc(100vw - 3.5rem),70vh,560px);width:min(calc(100vw - 3.5rem),70dvh,560px);max-width:100%;display:flex;align-items:center;justify-content:space-between;gap:.6rem}.chess-player-name{display:inline-flex;align-items:center;gap:.4rem;color:#c4d2f0;font-weight:600;font-size:.92rem}.chess-color-dot{width:.85rem;height:.85rem;border-radius:50%;border:1px solid #64748b}.chess-color-dot.white{background:#f8fafc}.chess-color-dot.black{background:#10182b}.chess-color-dot.red{background:#ef4444}.chess-status{margin:0;color:#d3ddf4;font-weight:600;text-align:center}.chess-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:center}.chess-ready-row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.chess-ready-chip{border:1px solid #32486f;border-radius:999px;background:#0f1d37;color:#a8b6d4;padding:.3rem .6rem;font-size:.85rem;font-weight:600}.chess-ready-chip.ready{border-color:#4ade80;color:#bbf7d0;background:#4ade8024}.chess-board-wrap{position:relative;width:max-content;max-width:100%}.square-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:min(calc(100vw - 3.5rem),70vh,560px);width:min(calc(100vw - 3.5rem),70dvh,560px);aspect-ratio:1 / 1;border:2px solid #30466f;border-radius:12px;overflow:hidden;background:#081326;position:relative;font-size:clamp(1.4rem,8vw,2.8rem);touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.square-cell{position:relative;border:0;margin:0;padding:0;aspect-ratio:1 / 1;display:grid;place-items:center;font-size:inherit;line-height:1;cursor:pointer}.square-piece{display:grid;place-items:center;width:100%;height:100%;pointer-events:none}.square-piece.drag-origin{opacity:.3}.square-anim-layer{position:absolute;inset:0;pointer-events:none;z-index:5}.square-anim-piece{position:absolute;width:12.5%;height:12.5%;display:grid;place-items:center;line-height:1;will-change:transform}.square-drag-ghost{position:fixed;z-index:50;display:grid;place-items:center;line-height:1;font-size:clamp(1.4rem,8vw,2.8rem);pointer-events:none;transform:translate(-50%,-58%) scale(1.2) rotate(-4deg);filter:drop-shadow(0 8px 6px rgba(0,0,0,.45))}.square-cell.light{background:#b7c1d9}.square-cell.dark{background:#3f4d6c}.square-cell.selected{box-shadow:inset 0 0 0 3px #63a7ff}.square-cell.legal-capture{box-shadow:inset 0 0 0 3px #f87171e6}.square-cell.last-move:after{content:"";position:absolute;inset:0;background:#facc153d;pointer-events:none}.square-cell.in-check:after{content:"";position:absolute;inset:0;background:radial-gradient(circle,#ef444499,#ef444400 68%);pointer-events:none}.square-move-dot{width:26%;height:26%;border-radius:50%;background:#0f172a66}.square-coord{position:absolute;font-size:.58rem;font-weight:700;color:#0f172a8c;pointer-events:none}.square-cell.dark .square-coord{color:#e2e8f099}.square-coord.rank{top:2px;left:3px}.square-coord.file{bottom:1px;right:3px}.chess-piece{position:relative;z-index:1;line-height:1}.chess-piece.white{color:#fbfcfe;text-shadow:0 0 1px #1e293b,0 1px 2px rgba(0,0,0,.55)}.chess-piece.black{color:#101726;text-shadow:0 1px 1px rgba(255,255,255,.25)}.checkers-disc{position:relative;z-index:1;width:74%;height:74%;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 -3px 6px #00000059,0 2px 4px #0006}.checkers-disc.red{background:radial-gradient(circle at 35% 30%,#f87171,#b91c1c);border:2px solid #7f1d1d}.checkers-disc.black{background:radial-gradient(circle at 35% 30%,#475569,#0f172a);border:2px solid #020617}.checkers-disc .king-crown{font-size:.7em;color:#fde68a}.game-clock{display:inline-flex;align-items:baseline;gap:.4rem;border:1px solid #32486f;border-radius:10px;background:#101d35;padding:.3rem .6rem}.game-clock.active{border-color:#63a7ff;background:#16294a}.game-clock.low .game-clock-time{color:#fbbf24}.game-clock.flagged .game-clock-time{color:#f87171}.game-clock-label{font-size:.72rem;color:#93a3c6;text-transform:uppercase;letter-spacing:.04em}.game-clock-time{font-variant-numeric:tabular-nums;font-weight:800;font-size:1.15rem;color:#e7edff}.promotion-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#020617a8;z-index:5}.promotion-picker{background:#0f172a;border:1px solid #32486f;border-radius:12px;padding:.8rem;display:grid;gap:.6rem;justify-items:center}.promotion-title{font-weight:700;color:#dbe7ff}.promotion-options{display:flex;gap:.5rem}.promotion-option{border:1px solid #3a5380;border-radius:10px;background:#b7c1d9;padding:.4rem;display:grid;gap:.2rem;justify-items:center;min-width:60px;font-size:2rem}.promotion-label{font-size:.72rem;color:#10182b;font-weight:600}.promotion-cancel{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.35rem .7rem}@media(max-width:640px){.difficulty-chip,.new-game-button{min-height:44px}.minesweeper-difficulty{padding:.75rem}}@media(max-width:860px){.game-surface,.game-surface *{min-width:0}.game-surface{width:100%}.game-surface canvas{max-width:100%;height:auto}.game-surface p,.game-surface .pong-status,.game-surface h2{overflow-wrap:anywhere}}.room-link-only-option{display:flex;align-items:flex-start;gap:.5rem;margin-top:.4rem;font-size:.9rem}.app-shell{--sidebar-width: 240px;--sidebar-gap: 1.25rem;--header-height: 76px;--page-pad-x: 1rem}.app-shell{position:relative;width:100%;height:100vh;height:100dvh;overflow:hidden}.app-header{position:fixed;top:0;left:0;right:0;z-index:20;height:var(--header-height);min-height:var(--header-height);margin-bottom:0;padding:.35rem var(--page-pad-x);border-bottom:1px solid #2b364f;background:#0b1220;display:flex;align-items:center;justify-content:space-between;gap:1rem}.app-header h1{margin:0;font-size:1.9rem}.points-summary{margin:0;color:#a9b8d6;font-size:.92rem}.header-account{display:flex;align-items:center;gap:.55rem}.header-account-button{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.38rem .62rem}.app-header p{margin:.3rem 0 0;color:#b8c2d4}.app-content{position:relative;height:100%}.app-main-scroll{position:fixed;top:var(--header-height);right:var(--page-pad-x);bottom:0;left:calc(var(--sidebar-width) + var(--sidebar-gap));overflow-y:auto;overflow-x:hidden;padding:1rem 0 1.8rem;display:grid;align-content:start;gap:2rem}.game-sidebar{background:#111827;border:1px solid #2b364f;border-left:0;border-radius:0;padding:.85rem;position:fixed;top:var(--header-height);left:0;bottom:0;width:var(--sidebar-width);overflow-y:auto}.sidebar-title{margin:0 0 .7rem;font-size:1rem;color:#b8c2d4}.game-picker{display:grid;grid-template-columns:1fr;gap:.55rem}.game-tab{border:1px solid #334155;background:#182133;color:#d7e1f5;text-decoration:none;border-radius:10px;padding:.65rem .75rem;text-align:left;display:flex;justify-content:space-between;align-items:center}.game-tab.active{border-color:#4d7cff;background:#1f2c45}.game-tab small{text-transform:uppercase;letter-spacing:.06em;color:#8fa3cb}.game-surface{background:#111827;border:1px solid #2b364f;border-radius:14px;padding:1rem;margin:0 auto;width:fit-content;max-width:100%}.game-meta h2{margin:0;font-size:1.2rem}.game-meta p{margin:.3rem 0 .9rem;color:#b8c2d4}.placeholder{border:1px dashed #3b4a6a;border-radius:12px;padding:1rem;text-align:left;background:#0f172a}.placeholder h3{margin:0 0 .45rem}.placeholder p{margin:0;color:#a9b8d6}.app-footer{margin-top:0;padding:1.25rem 0 .5rem;color:#8fa3cb;border-top:1px solid #2b364f}.signin-backdrop{position:fixed;inset:0;background:#020617b3;display:grid;place-items:center;padding:1rem;z-index:30}.signin-modal{width:min(440px,95vw);background:#0f172a;border:1px solid #2f3d5d;border-radius:14px;padding:1rem}.signin-modal h2{margin:0 0 .35rem}.signin-modal p{margin:0;color:#b8c2d4}.signin-modal form{margin-top:.75rem;display:grid;gap:.45rem}.signin-modal label{font-size:.9rem;color:#c5d0e5}.signin-modal input{border:1px solid #32486f;border-radius:10px;background:#111d35;color:#e5eaf3;padding:.55rem .65rem}.signin-modal button{border:1px solid #3a5380;border-radius:10px;background:#1a2b47;color:#e7edff;padding:.5rem .7rem}.signin-actions{display:flex;gap:.45rem;align-items:center}.signin-cancel{background:#162238;border-color:#304261}.signin-error{margin:0;color:#fca5a5;font-size:.88rem}@media(max-width:860px){.app-shell{width:min(980px,94vw);margin:0 auto;height:auto;overflow:visible;padding:1.2rem 0 1.8rem}.app-header{position:static;height:auto;min-height:0;padding:0;background:transparent;border-bottom:0;display:grid;justify-content:start}.app-content{grid-template-columns:1fr;margin-left:0;margin-top:0;padding-bottom:12vh}.app-main-scroll{position:static;overflow:visible;padding:0;display:grid;gap:2rem}.app-footer{margin-left:0}.game-surface{width:100%}.game-sidebar{position:static;width:auto;border-left:1px solid #2b364f;border-radius:0;overflow:visible}}@media(max-width:640px){.app-shell{width:100%;padding:.75rem .75rem 1.5rem}.game-surface{padding:.75rem;width:100%}}.qr-popover-root{position:relative}.qr-popover{position:absolute;top:calc(100% + .5rem);right:0;z-index:30;width:min(280px,calc(100vw - 2rem));display:grid;gap:.6rem;justify-items:center;padding:.9rem;border:1px solid #3a5380;border-radius:12px;background:#111827;box-shadow:0 12px 32px #00000080}.qr-popover-title{margin:0;font-weight:600}.qr-popover-image{width:100%;max-width:220px;aspect-ratio:1 / 1;border-radius:8px;background:#fff;image-rendering:pixelated}.qr-popover-url{margin:0;max-width:100%;font-size:.78rem;color:#93a3c6;overflow-wrap:anywhere;text-align:center}.qr-popover-warning{margin:0;font-size:.8rem;color:#fbbf24;text-align:center}@media(max-width:860px){.header-account{flex-wrap:wrap}.qr-popover{right:auto;left:0}}.qr-popover-option{display:flex;align-items:flex-start;gap:.5rem;width:100%;font-size:.88rem;cursor:pointer}.qr-popover-option.disabled{opacity:.6;cursor:not-allowed}.qr-popover-option input,.room-link-only-option input{margin-top:.2rem;width:1.05rem;height:1.05rem;flex:none}.qr-popover-option small,.room-link-only-option small{display:block;color:#93a3c6;font-size:.78rem}.game-meta-bar{display:flex;align-items:center;gap:.6rem}.game-meta-bar h2{flex:1;min-width:0}.surface-button{border:1px solid #334155;background:#182133;color:#d7e1f5;border-radius:8px;padding:.4rem .65rem;cursor:pointer;white-space:nowrap;font-size:.85rem}.surface-button:hover{border-color:#4d7cff}.app-shell.sidebar-collapsed{--sidebar-width: 0px;--sidebar-gap: 0px}.app-shell.sidebar-collapsed .game-sidebar{display:none}.game-surface.is-fullscreen{position:fixed;inset:0;z-index:100;width:100%;max-width:none;height:100dvh;margin:0;border:0;border-radius:0;overflow:auto;padding:max(.5rem,env(safe-area-inset-top)) max(.5rem,env(safe-area-inset-right)) max(.5rem,env(safe-area-inset-bottom)) max(.5rem,env(safe-area-inset-left));box-sizing:border-box}.game-surface.is-fullscreen .game-meta p,.game-surface.is-fullscreen .game-meta h2,.game-surface.is-fullscreen .game-meta-bar>.surface-button:first-child{display:none}.game-surface.is-fullscreen .game-meta{margin-bottom:.4rem}.game-surface.is-fullscreen .game-meta-bar{justify-content:flex-end}.game-surface.is-fullscreen .fullscreen-toggle{opacity:.85}body.css-fullscreen{overflow:hidden}.game-surface.is-fullscreen .dungeon-stage{max-width:min(100%,calc((100dvh - 7rem) * var(--stage-aspect, 1.3333)))}@media(max-width:640px){.game-meta>p{display:none}.game-meta{margin-bottom:.6rem}.game-meta-bar h2{font-size:1rem}.surface-button{padding:.4rem .5rem}}@media(max-width:860px){.app-shell.sidebar-collapsed .game-sidebar{display:none}.app-shell{min-height:100dvh}}@media(max-height:520px)and (orientation:landscape){.game-surface.is-fullscreen .dungeon{grid-template-columns:auto minmax(0,1fr);align-items:start;column-gap:.75rem}.game-surface.is-fullscreen .dungeon>*{grid-column:2}.game-surface.is-fullscreen .dungeon>.dungeon-stage{grid-column:1;grid-row:1 / span 8;width:calc((100dvh - 4rem) * var(--stage-aspect, 1.3333));max-width:60vw}.game-surface.is-fullscreen .dungeon-keys-hint{display:none}}.dungeon{display:grid;gap:.75rem;font-family:Georgia,Times New Roman,"Noto Serif","DejaVu Serif",serif}.dungeon button,.dungeon input,.dungeon select,.dungeon textarea,.dungeon kbd{font-family:inherit}.dungeon-roombar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem .75rem;padding:.5rem .75rem;border:1px solid #2f3d5d;border-radius:12px;background:#0f172a}.dungeon-stage{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;position:relative;justify-self:center;width:100%;max-width:640px;border:2px solid #30466f;border-radius:12px;overflow:hidden;background:#061024}.dungeon-canvas{display:block;width:100%;height:auto;touch-action:none}.dungeon-restart{display:grid;justify-items:center;gap:.3rem}.dungeon-restart .help-text{text-align:center}@media(pointer:coarse){.dungeon-keys-hint{display:none}}.dungeon-victory-actions{display:flex;justify-content:center}.dungeon-stage.is-hidden{display:none}.dungeon-lobby{display:grid;gap:.8rem;padding:.9rem;border:1px solid #2f3d5d;border-radius:12px;background:#0f172a}.dungeon-lobby h3{margin:0}.lobby-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:0;padding:0;list-style:none}.lobby-player{display:flex;align-items:center;gap:.5rem;padding:.55rem .65rem;border:1px solid #2e3e5f;border-radius:10px;background:#1a2640}.lobby-player.empty{opacity:.6;border-style:dashed}.lobby-player.me{border-color:#63a7ff}.lobby-swatch{flex:none;width:14px;height:14px;border-radius:3px}.lobby-name{flex:1;min-width:0;overflow-wrap:anywhere}.lobby-rule-head{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .5rem}.lobby-badge{margin-left:.4rem;padding:.05rem .4rem;border-radius:999px;font-size:.7rem;font-weight:700;background:#31446b;color:#dbe7ff;white-space:nowrap}.lobby-rule-head .lobby-badge{margin-left:0}.lobby-badge.host{background:#7c5a10;color:#fde68a}.lobby-badge.points{background:#14532d;color:#bbf7d0}.lobby-ready{flex:none;font-size:.78rem;color:#93a3c6}.lobby-ready.on{color:#86efac;font-weight:700}.lobby-rules{display:grid;gap:.45rem;margin:0;padding:.6rem .75rem;border:1px solid #2e3e5f;border-radius:10px}.lobby-rules legend{padding:0 .35rem;font-weight:700}.lobby-rules:disabled{opacity:.85}.lobby-rule{display:flex;align-items:flex-start;gap:.55rem;padding:.4rem .45rem;border-radius:8px;cursor:pointer}.lobby-rules:disabled .lobby-rule{cursor:default}.lobby-rule.selected{background:#4d7cff29}.lobby-rule input{margin-top:.25rem;width:1.05rem;height:1.05rem;flex:none}.lobby-rule small{display:block;color:#93a3c6;font-size:.8rem}.lobby-delay{display:flex;align-items:center;gap:.6rem;padding-left:.45rem}.lobby-delay select{padding:.3rem .4rem;border-radius:8px;border:1px solid #3a5380;background:#1a2b47;color:#e7edff}.lobby-ready-button{padding:.75rem 1rem;border-radius:12px;border:2px solid #4d7cff;background:#223a73;color:#fff;font-weight:700;font-size:1.05rem;min-height:48px}.lobby-ready-button.on{border-color:#4ade80;background:#14532d}.lobby-start-button{padding:.85rem 1rem;border-radius:12px;border:2px solid #fbbf24;background:#78350f;color:#fff;font-weight:700;font-size:1.15rem;min-height:52px}.lobby-start-button:hover{background:#92400e}.lobby-waiting{text-align:center;margin:0}@media(max-width:520px){.lobby-roster{grid-template-columns:1fr}}.lobby-generator{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.6rem 1rem;padding:.2rem .45rem .4rem}.lobby-generator label,label.lobby-generator{display:grid;gap:.2rem;font-size:.85rem;color:#c2cee5}.lobby-generator select,.lobby-generator input[type=text]{padding:.35rem .45rem;border-radius:8px;border:1px solid #3a5380;background:#1a2b47;color:#e7edff;min-width:7rem}.lobby-scale-note{margin:.2rem 0 0;padding-left:.45rem}
