body{--bg:#0d1420;--bg-deep:#0a0f18;--surface:#0e1624c7;--surface-strong:#101a2b;--surface-soft:#141e30a8;--text:#e9f0fb;--text-soft:#c3d0e4;--muted:#93a5c4;--muted-strong:#a9b8d2;--line:#7e9ccd3d;--line-strong:#7e9ccd66;--accent:#ffb340;--accent-bright:#ffc266;--accent-rgb:255, 179, 64;--radius-sm:9px;--radius-md:14px;--radius-lg:16px;background:var(--bg);min-height:100dvh}.game-shell{min-height:100dvh;padding-inline:max(16px, env(safe-area-inset-left));flex-direction:column;display:flex}.game-header{justify-content:space-between;align-items:center;gap:12px;width:100%;max-width:1180px;margin-inline:auto;padding:14px 4px;display:flex}.game-header .brand{letter-spacing:.02em;align-items:center;gap:10px;font-weight:700;display:inline-flex}.game-header .brand-mark{color:#241503;background:linear-gradient(135deg,#ffb340,#e08a1e);border-radius:10px;place-items:center;width:34px;height:34px;font-size:13px;font-weight:800;display:grid}.header-actions{align-items:center;gap:10px;display:inline-flex}.icon-button{border:1px solid var(--line);background:var(--surface-soft);width:38px;height:38px;color:var(--text-soft);cursor:pointer;transition:border-color .16s var(--ease), color .16s var(--ease);border-radius:12px;place-items:center;display:grid}.icon-button:hover{color:var(--accent);border-color:var(--line-strong)}.nick-chip{white-space:nowrap;text-overflow:ellipsis;border:1px solid var(--line);background:var(--surface-soft);max-width:168px;color:var(--text-soft);cursor:pointer;transition:border-color .16s var(--ease), color .16s var(--ease);border-radius:999px;align-items:center;gap:7px;padding:8px 13px;font-size:13.5px;display:inline-flex;overflow:hidden}.nick-chip:hover{color:var(--accent);border-color:var(--line-strong)}.conn-dot{background:#64748b;border-radius:50%;width:9px;height:9px}.conn-online{background:#34d399;box-shadow:0 0 0 4px #34d39924}.conn-offline{background:#fb7185;box-shadow:0 0 0 4px #fb718524}.conn-connecting{background:#fbbf24;animation:1.2s ease-in-out infinite pulse-dot}@keyframes pulse-dot{50%{opacity:.4}}.conn-banner{z-index:30;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#fda4af;text-align:center;max-width:min(560px,100vw - 32px);animation:toast-in .22s var(--ease);background:#180a10eb;border:1px solid #fb718559;border-radius:12px;padding:9px 18px;font-size:13.5px;position:fixed;top:64px;left:50%;transform:translate(-50%)}.game-main{flex:1;width:100%;max-width:1180px;margin-inline:auto;padding-bottom:26px}.game-footer{padding:18px 0 max(18px, env(safe-area-inset-bottom));color:var(--muted);justify-content:center;gap:14px;font-size:12.5px;display:flex}.game-footer a{color:var(--muted-strong)}.game-footer a:hover{color:var(--accent)}.btn{border:1px solid var(--line-strong);background:var(--surface-soft);min-height:44px;color:var(--text);cursor:pointer;transition:border-color .16s var(--ease), background .16s var(--ease), filter .16s var(--ease), opacity .16s var(--ease);border-radius:13px;justify-content:center;align-items:center;gap:8px;padding:10px 20px;font-size:14.5px;font-weight:600;display:inline-flex}.btn:hover:not(:disabled){border-color:rgba(var(--accent-rgb), .55);filter:brightness(1.08)}.btn:disabled{opacity:.48;cursor:not-allowed}.btn-primary{background:var(--accent);color:#241503;border-color:#0000}.btn-primary:hover:not(:disabled){background:var(--accent-bright);box-shadow:0 10px 26px #ffb34038}.btn-primary.is-copied{color:#032117;background:#34d399}.btn-ghost{border-color:var(--line);color:var(--text-soft);background:0 0}.btn-ghost:hover:not(:disabled){color:var(--accent)}.btn-ghost.is-copied{color:var(--accent);border-color:rgba(var(--accent-rgb), .55)}.btn-danger{color:#fda4af;background:#fb718514;border-color:#fb718580}.btn-danger:hover:not(:disabled){border-color:#fb7185}.btn-sm{border-radius:11px;min-height:38px;padding:7px 14px;font-size:13.5px}.spinner{border:2.4px solid rgba(var(--accent-rgb), .25);border-top-color:var(--accent);border-radius:50%;width:18px;height:18px;animation:.8s linear infinite spin;display:inline-block}.spinner-sm{width:14px;height:14px;margin-right:8px}@keyframes spin{to{transform:rotate(360deg)}}.sr-only{clip:rect(0 0 0 0);border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.toast-stack{z-index:60;pointer-events:none;flex-direction:column;align-items:center;gap:8px;display:flex;position:fixed;top:14px;left:50%;transform:translate(-50%)}.toast{border:1px solid var(--line-strong);color:var(--text-soft);animation:toast-in .24s var(--ease);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background:#091425eb;border-radius:999px;padding:9px 18px;font-size:13.5px;box-shadow:0 14px 40px #0006}.toast-error{color:#fda4af;border-color:#fb71858c}.toast-warn{color:#fcd34d;border-color:#fbbf2480}@keyframes toast-in{0%{opacity:0;transform:translateY(-8px)}}.dialog-mask{-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:70;animation:toast-in .2s var(--ease);background:#030810a8;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.dialog{border-radius:var(--radius-md);background:var(--surface-strong);border:1px solid var(--line-strong);width:min(94vw,380px);box-shadow:var(--shadow);padding:24px}.dialog h3{margin:0 0 10px;font-size:18px}.dialog p{color:var(--text-soft);margin:0 0 16px;font-size:14.5px}.dialog-note{color:var(--muted)!important;font-size:13px!important}.dialog-actions{flex-wrap:wrap;gap:10px;display:flex}.nick-input{border:1px solid var(--line-strong);width:100%;color:var(--text);background:#040a1499;border-radius:12px;margin-bottom:12px;padding:12px 14px;font-size:15px}.nick-input:focus{outline:2px solid rgba(var(--accent-rgb), .6);border-color:#0000}.avatar{color:#fff;text-shadow:0 1px 3px #00000059;border-radius:50%;flex:none;place-items:center;font-weight:700;display:inline-grid}.lobby{flex-direction:column;gap:26px;padding-top:14px;display:flex}.lobby-hero{text-align:center;padding:22px 12px 2px}.lobby-hero h1{letter-spacing:.04em;background:linear-gradient(120deg,#f4f8ff 30%,#ffb340);color:#0000;-webkit-background-clip:text;background-clip:text;margin:0 0 10px;font-size:clamp(30px,5.4vw,44px)}.lobby-hero p{max-width:520px;color:var(--text-soft);margin:0 auto;font-size:15.5px}.offline-note{color:#fcd34d!important;margin-top:10px!important;font-size:13.5px!important}.mode-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;display:grid}.mode-card{border-radius:var(--radius-md);border:1px solid var(--line);background:var(--surface);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);transition:border-color .2s var(--ease), box-shadow .2s var(--ease);flex-direction:column;gap:9px;padding:24px 22px;display:flex}.mode-card:hover{border-color:rgba(var(--accent-rgb), .4);box-shadow:0 18px 44px #0000004d}.mode-card.is-disabled{opacity:.62}.mode-card h3{margin:0;font-size:18.5px}.mode-card p{color:var(--muted-strong);flex:1;margin:0 0 6px;font-size:13.8px}.mode-icon{background:rgba(var(--accent-rgb), .1);border:1px solid rgba(var(--accent-rgb), .22);border-radius:14px;place-items:center;width:46px;height:46px;display:grid}.mode-glyph{color:var(--accent);font-size:21px;font-weight:700}.mode-glyph-red{color:#f87171}.mode-glyph-blue{color:#7ea8f0}.mode-glyph-amber{color:#ffb340}.mode-hint{color:var(--muted);text-align:center;font-size:12.5px}.game-tabs{border:1px solid var(--line);background:var(--surface-soft);border-radius:999px;justify-content:center;gap:8px;width:fit-content;margin-inline:auto;padding:4px;display:flex}.game-tab{min-height:40px;color:var(--muted-strong);cursor:pointer;transition:background .18s var(--ease), color .18s var(--ease);background:0 0;border:none;border-radius:999px;padding:8px 22px;font-size:14.5px;font-weight:600}.game-tab.is-active{background:var(--accent);color:#241503}.badge-game{color:#a5b4fc;background:#818cf824;border:1px solid #818cf852}.join-code form{flex-direction:column;gap:8px;width:100%;max-width:430px;margin-inline:auto;display:flex}.join-code label{color:var(--muted-strong);font-size:13.5px}.join-code form>div{gap:10px;display:flex}.join-code input{border:1px solid var(--line-strong);min-width:0;color:var(--text);letter-spacing:.24em;text-transform:uppercase;background:#040a1499;border-radius:13px;flex:1;padding:12px 16px;font-size:16px}.join-code input:focus{outline:2px solid rgba(var(--accent-rgb), .6);border-color:#0000}.room-list header{justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:12px;display:flex}.room-list h2{margin:0;font-size:19px}.room-list header span{color:var(--muted);font-size:13px}.room-empty{border-radius:var(--radius-md);border:1px dashed var(--line-strong);color:var(--muted-strong);text-align:center;padding:30px 20px;font-size:14.5px}.room-list ul{flex-direction:column;gap:10px;margin:0;padding:0;list-style:none;display:flex}.room-list li{border:1px solid var(--line);background:var(--surface-soft);border-radius:14px;flex-wrap:wrap;align-items:center;gap:14px;padding:13px 16px;display:flex}.badge{border-radius:999px;flex:none;padding:4px 11px;font-size:12px;font-weight:600}.badge-live{color:#6ee7b7;background:#34d39924;border:1px solid #34d39959;animation:1.6s ease-in-out infinite pulse-dot}.badge-wait{color:#fcd34d;background:#fbbf241f;border:1px solid #fbbf244d}.badge-idle{color:#cbd5e1;background:#94a3b81f;border:1px solid #94a3b847}.room-players{align-items:center;gap:9px;min-width:0;font-size:14px;font-weight:600;display:inline-flex}.room-players i{color:var(--muted);font-size:11.5px;font-style:normal}.player-name{align-items:center;gap:6px;display:inline-flex}.player-name.is-empty{color:var(--muted);font-weight:400}.room-meta{color:var(--muted);flex:1;font-size:12.5px}.room-list li .btn{margin-left:auto}.room{display:contents}.room.play-screen{z-index:30;background:var(--bg);position:fixed;inset:0}.board-wrap{outline:none;position:absolute;inset:0;overflow:clip}.board-wrap:focus-visible{outline:3px solid rgba(var(--accent-rgb), .55);outline-offset:-3px}.board3d,.board2d{width:100%;height:100%}.board2d{cursor:pointer;display:block}.board-loading{place-items:center;width:100%;height:100%;display:grid}.hud{z-index:10;position:absolute}.hud-panel{top:calc(12px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-md);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);flex-direction:column;gap:10px;width:252px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 96px);padding:12px 14px;display:flex;overflow-y:auto;box-shadow:0 14px 44px #00000059}.hud-title-row{align-items:center;gap:8px;display:flex}.hud-title-row .btn{border-radius:8px;min-height:32px;padding:4px 10px;font-size:12.5px}.room-title{flex-direction:column;flex:1;min-width:0;display:flex}.room-id{letter-spacing:.05em;white-space:nowrap;text-overflow:ellipsis;font-size:14.5px;font-weight:700;overflow:hidden}.room-sub{color:var(--muted);font-size:11.5px}.hud-actions{top:calc(12px + env(safe-area-inset-top));right:calc(12px + env(safe-area-inset-right));flex-direction:column;align-items:stretch;gap:8px;display:flex}.hud-actions .btn{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);min-height:40px;padding:8px 14px;font-size:13.5px}.hud-bottom{pointer-events:none;bottom:calc(16px + env(safe-area-inset-bottom));justify-content:center;width:max-content;max-width:calc(100vw - 20px);animation:.6s 8s forwards tip-fade;display:flex;left:50%;transform:translate(-50%)}.room-tip{border:1px solid var(--line);color:var(--muted);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);text-align:center;background:#0a101b99;border-radius:999px;margin:0;padding:7px 14px;font-size:12px}.confirm-chip{z-index:12;bottom:calc(60px + env(safe-area-inset-bottom));border:1px solid rgba(var(--accent-rgb), .45);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:toast-in .2s var(--ease);z-index:5;background:#07101feb;border-radius:999px;align-items:center;gap:10px;padding:9px 12px 9px 18px;display:flex;position:absolute;left:50%;transform:translate(-50%);box-shadow:0 16px 44px #00000080}.confirm-chip>span{letter-spacing:.05em;color:var(--accent);font-weight:700}.confirm-chip .btn{white-space:nowrap}.board-overlay{z-index:20;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:overlay-in .24s var(--ease);background:#0509108c;justify-content:center;align-items:center;padding:20px;display:flex;position:absolute;inset:0}@keyframes overlay-in{0%{opacity:0}}.banner-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);text-align:center;width:min(92vw,400px);padding:26px 28px;box-shadow:0 18px 60px #00000080}.banner-card h3{margin:0 0 8px;font-size:22px}.banner-card p{color:var(--text-soft);margin:0 0 16px;font-size:14.5px}.board-overlay-end .banner-card h3{font-size:26px}.overlay-actions,.board-overlay .btn,.board-overlay strong{position:relative}.board-overlay-card,.board-overlay-inner{display:contents}.board-overlay h3{margin:0 0 6px;font-size:24px}.board-overlay p{color:var(--text-soft);margin:0 0 14px;font-size:14.5px}.board-overlay-end h3{font-size:28px}.rotate-note{font-weight:600;color:var(--accent)!important}.overlay-actions{flex-wrap:wrap;justify-content:center;gap:10px;display:flex}.room-side{border-radius:var(--radius-md);border:1px solid var(--line);background:var(--surface);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);flex-direction:column;gap:14px;padding:18px;display:flex}.status-line{border:1px solid var(--line);color:var(--text-soft);background:#090e188c;border-radius:10px;align-items:center;margin:0;padding:9px 12px;font-size:13.5px;display:flex}.status-line.is-mine{border-color:rgba(var(--accent-rgb), .5);color:var(--accent-bright);font-weight:600;animation:2.2s ease-in-out infinite breathe}@keyframes breathe{50%{box-shadow:0 0 0 5px rgba(var(--accent-rgb), .07)}}.seat-list{flex-direction:column;gap:5px;display:flex}.vs-divider{text-align:center;color:var(--muted);letter-spacing:.2em;font-size:10px;font-weight:800}.seat-card{border:1px solid var(--line);transition:border-color .2s var(--ease), box-shadow .2s var(--ease);background:#090e1880;border-radius:11px;align-items:center;gap:10px;padding:8px 10px;display:flex}.seat-card.is-active{border-color:rgba(var(--accent-rgb), .55);box-shadow:0 0 0 3px rgba(var(--accent-rgb), .08)}.seat-card.is-offline{opacity:.75}.seat-avatar{flex:none;place-items:center;width:58px;height:58px;display:inline-grid;position:relative}.timer-ring{position:absolute;inset:0}.seat-info{flex:1;min-width:0}.seat-info strong{white-space:nowrap;text-overflow:ellipsis;font-size:15px;display:block;overflow:hidden}.seat-info em{color:var(--accent);font-size:12.5px;font-style:normal}.seat-sub{color:var(--muted-strong);align-items:center;gap:5px;font-size:12.5px;display:inline-flex}.seat-empty{color:var(--muted);border-style:dashed}.seat-empty-mark{border:1.6px dashed var(--line-strong);width:46px;height:46px;color:var(--muted);border-radius:50%;flex:none;place-items:center;font-size:18px;display:grid}.seat-empty .seat-info strong{color:var(--muted-strong);font-weight:600}.seat-empty .seat-info span{color:var(--muted);font-size:12.5px}.side-actions{flex-wrap:wrap;gap:8px;display:flex}.side-actions .btn{flex:1;min-width:96px;min-height:40px;padding:8px 12px;font-size:13.5px}.queue-panel h4{color:var(--muted-strong);margin:0 0 8px;font-size:13.5px;font-weight:600}.queue-panel ol{counter-reset:q;flex-direction:column;gap:7px;margin:0;padding:0;list-style:none;display:flex}.queue-panel li{color:var(--text-soft);counter-increment:q;align-items:center;gap:9px;font-size:13.5px;display:flex}.queue-panel li:before{content:counter(q);color:var(--muted);width:15px;font-size:12px}.invite-panel{border:1px dashed var(--line-strong);color:var(--muted-strong);border-radius:12px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:8px 11px;font-size:13.5px;display:flex}.invite-panel strong{color:var(--text);letter-spacing:.1em}.room-tip{color:var(--muted);margin:0;font-size:12.5px;line-height:1.6}.room-loading,.room-fatal{color:var(--text-soft);text-align:center;flex-direction:column;align-items:center;gap:14px;padding:90px 20px;display:flex}.room-fatal h2{margin:0}.room-fatal p{color:var(--muted-strong);margin:0}.ai-setup{text-align:center;flex-direction:column;align-items:center;gap:18px;padding:44px 16px;display:flex}.ai-setup h1{margin:0;font-size:clamp(26px,4.5vw,36px)}.ai-setup>p{color:var(--text-soft);margin:0}.level-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;width:min(620px,100%);display:grid}.level-card{border:1px solid var(--line);background:var(--surface-soft);color:var(--text);cursor:pointer;transition:border-color .18s var(--ease), background .18s var(--ease), filter .18s var(--ease);border-radius:14px;flex-direction:column;gap:6px;padding:18px 16px;display:flex}.level-card:hover{border-color:rgba(var(--accent-rgb), .45);filter:brightness(1.06)}.level-card.is-active{border-color:rgba(var(--accent-rgb), .7);background:rgba(var(--accent-rgb), .08)}.level-card strong{font-size:16.5px}.level-card span{color:var(--muted-strong);font-size:12.8px;line-height:1.5}.color-row{flex-wrap:wrap;justify-content:center;gap:12px;display:flex}@media (width<=900px){.hud-panel{width:232px;padding:10px 12px}}@media (width<=560px){.game-header{padding-inline:0}.nick-chip{max-width:110px}.hud-panel{top:calc(8px + env(safe-area-inset-top));gap:7px;width:auto;max-height:34dvh;padding:9px 11px;left:8px;right:8px}.seat-list{flex-direction:row;align-items:stretch;gap:6px}.seat-list .seat-card{flex:1;gap:7px;min-width:0;padding:6px 8px}.seat-avatar{width:40px!important;height:40px!important}.seat-avatar .avatar{width:32px!important;height:32px!important;font-size:13px!important}.vs-divider{place-items:center;display:grid}.status-line{padding:7px 10px;font-size:12.5px}.hud-actions{top:auto;bottom:calc(10px + env(safe-area-inset-bottom));flex-flow:wrap;justify-content:flex-end;max-width:calc(100vw - 16px);left:auto;right:8px}.hud-actions .btn{min-height:42px;padding:8px 13px;font-size:13px}.hud-bottom{bottom:calc(64px + env(safe-area-inset-bottom))}.confirm-chip{bottom:calc(110px + env(safe-area-inset-bottom))}.banner-card{padding:20px 18px}.room-list li .btn{width:100%;margin-left:0}.room-meta{flex-basis:100%}.invite-panel{display:none}}@media (prefers-reduced-motion:reduce){.status-line.is-mine,.badge-live,.conn-connecting,.toast,.board-overlay,.confirm-chip,.dialog-mask{animation:none}.btn,.mode-card,.icon-button{transition:none}}@keyframes tip-fade{to{opacity:0;visibility:hidden}}.board-overlay-end{animation:.45s both end-fade}@keyframes end-fade{0%{opacity:0}to{opacity:1}}.board-overlay-end .banner-card{animation:.45s cubic-bezier(.2,.9,.3,1.15) both end-pop}@keyframes end-pop{0%{opacity:0;transform:translateY(14px)scale(.96)}to{opacity:1;transform:none}}.peek-chip{bottom:calc(72px + env(safe-area-inset-bottom,0px));z-index:30;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#ffb340;cursor:pointer;background:#0d1420d1;border:1px solid #ffb3408c;border-radius:999px;padding:10px 18px;font-size:14px;position:fixed;left:50%;transform:translate(-50%)}@media (prefers-reduced-motion:reduce){.board-overlay-end,.board-overlay-end .banner-card{animation:none}}
