:root{color-scheme:dark;--bg:#0b1420;--surface:#121f30;--surface2:#192a3f;--border:#2d4057;--text:#f6f7fb;--muted:#95a9c1;--yellow:#ffd16e;--blue:#64c7fa;--red:#ff817a;--green:#8de1ac;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 30% -8%,#213c59 0,transparent 43%),radial-gradient(ellipse at 92% 78%,#1b2d39 0,transparent 42%),var(--bg);color:var(--text);min-height:100vh}
button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--blue);outline-offset:3px}a{color:inherit;text-decoration:none}.app-shell{max-width:1450px;margin:0 auto;padding:22px clamp(14px,3vw,42px) 38px}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.brand{display:flex;align-items:center;gap:13px}.brand-mark{width:47px;height:47px;background:linear-gradient(145deg,#fac766,#e98736);color:#17263a;display:grid;place-items:center;border-radius:14px;font-weight:900;font-size:32px;transform:rotate(-5deg);box-shadow:0 5px 20px #efad5340}.brand-kicker{font-size:9px;letter-spacing:2.6px;color:#8da2bc;font-weight:800}.brand h1{font-size:clamp(20px,2.6vw,27px);line-height:1.05;margin:5px 0 0;letter-spacing:1px}.brand h1 span{color:var(--yellow)}.top-actions{display:flex;align-items:center;gap:20px}.demo-badge{font-size:11px;letter-spacing:1.15px;font-weight:800;border:1px solid #2b4f54;color:#a6dac2;padding:10px 12px;border-radius:100px;white-space:nowrap}.status-dot{display:inline-block;width:7px;height:7px;background:#54d7a0;border-radius:100px;box-shadow:0 0 12px #54d7a0;margin-right:7px}.top-link{font-weight:800;font-size:12px;color:#c4d9ed}.top-link:hover{color:white}
.dashboard{display:grid;grid-template-columns:minmax(290px,510px) minmax(450px,1fr);gap:22px;align-items:start}.stage-column{position:sticky;top:18px}.stage-frame{position:relative;max-width:510px;overflow:hidden;border:6px solid #263951;border-radius:23px;box-shadow:0 22px 60px #0008,inset 0 0 0 1px #4b6381;background:#141e2c}.stage-frame canvas{display:block;width:100%;height:auto;aspect-ratio:9/16}.stage-bottom{position:absolute;bottom:8px;left:14px;right:14px;font-size:9px;letter-spacing:.8px;font-weight:900;color:#bed1e0;display:flex;justify-content:space-between;pointer-events:none}.stage-tip{max-width:510px;color:#8396af;line-height:1.65;font-size:11px;padding:15px 3px}.stage-tip kbd{color:#d6e5f5;border:1px solid #43576e;border-radius:4px;padding:1px 5px;background:#1b2b3d}
.controls{display:flex;flex-direction:column;gap:14px}.panel{background:linear-gradient(150deg,#17263a,#101d2e);border:1px solid var(--border);border-radius:17px;padding:21px;box-shadow:0 8px 20px #050c152a}.intro-card{padding:22px 24px;background:linear-gradient(140deg,#203650,#17283f 52%,#142235)}.eyebrow{color:#eab761;font-weight:900;letter-spacing:1.9px;font-size:10px;margin-bottom:8px}.panel h2,.panel h3{margin:0;line-height:1.15}.panel h2{font-size:28px;letter-spacing:-.8px}.panel h3{font-size:17px;letter-spacing:-.3px}.intro-card p{font-size:13px;line-height:1.75;color:#bfcfe0;margin:13px 0}.notice{display:flex;gap:10px;align-items:start;font-size:11px;line-height:1.5;color:#a7bed5;background:#111e2da6;border:1px solid #35516b;padding:11px;border-radius:10px}.notice>span:first-child{font-size:15px;color:#ffe0a6}.notice strong{color:#f2f5f8}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:17px}.chip{color:#b7ccdc;background:#23374d;font-size:9px;letter-spacing:1.2px;padding:7px 9px;border-radius:6px;font-weight:900}
.action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.action{padding:12px;display:flex;gap:10px;align-items:center;min-width:0;text-align:left;min-height:74px;border:1px solid #3b5066;border-radius:11px;background:#23364c;color:white;transition:transform .12s,background .12s,border-color .12s;box-shadow:inset 0 1px 0 #ffffff18}.action:hover{transform:translateY(-2px);background:#2a415c}.action:active{transform:scale(.98)}.action-icon{font-size:24px;min-width:33px;height:39px;display:grid;place-items:center;border-radius:9px;background:#ffffff19;color:#ffd78a}.action strong{font-size:12px;display:block;white-space:nowrap}.action small{font-size:10px;display:block;margin-top:4px;color:#bbc9d7}.keycap{font-size:9px;color:#8d9fb2;background:#172436;border:1px solid #394f65;padding:3px 5px;border-radius:4px;margin-left:auto;align-self:start}.action-brick{background:#493424;border-color:#83603d}.action-brick:hover{background:#63442a}.action-water{background:#1e3a57;border-color:#346c95}.action-water:hover{background:#254e70}.action-floor{background:#2e4635;border-color:#467c54}.action-floor:hover{background:#395c42}.action-destroy{background:#512b33;border-color:#89505b}.action-destroy:hover{background:#64313b}.action-repair{background:#2b4056}.action-reset{background:#3d3150}
.auto-row{display:flex;justify-content:space-between;gap:10px;align-items:center;border-top:1px solid #2f465b;padding-top:16px;margin-top:17px}.auto-title strong{display:block;font-size:12px}.auto-title small{display:block;color:#8da7bf;font-size:10px;margin-top:5px}.toggle{position:relative;display:inline-block;width:46px;height:27px;flex-shrink:0}.toggle input{position:absolute;opacity:0}.switch{display:block;background:#415267;border-radius:100px;width:100%;height:100%;transition:background .2s}.switch:before{position:absolute;content:"";width:20px;height:20px;left:4px;top:3.5px;background:white;border-radius:50%;transition:transform .2s}.toggle input:checked+.switch{background:#3cba8b}.toggle input:checked+.switch:before{transform:translateX(19px)}
.comment-form{display:flex;flex-direction:column;gap:7px}.comment-form label,.settings-grid label{font-size:11px;color:#a3b6c9;font-weight:700}.comment-form input,.settings-grid select{width:100%;background:#0d1b2b;border:1px solid #37516b;border-radius:9px;padding:11px 12px;color:#f2f6fc;outline:none;font-size:12px}.comment-form input:focus,.settings-grid select:focus{border-color:#7abce9}.input-line{display:flex;gap:8px}.submit-button{white-space:nowrap;border:0;background:#f4bc5f;border-radius:9px;color:#1b2530;font-size:11px;font-weight:900;padding:0 17px}.submit-button:hover{background:#ffcf81}.comment-examples{margin-top:13px;color:#8299b1;font-size:10px;line-height:2}.comment-examples code{background:#23374c;border-radius:5px;padding:4px;margin:0 2px;color:#cdd9ea;font-family:inherit;font-size:9px}
.double-panel{display:grid;grid-template-columns:1fr 1.12fr;gap:14px}.stat-row{display:flex;justify-content:space-between;border-bottom:1px solid #2d4055;padding:10px 0;gap:7px}.stat-row:last-child{border:0;padding-bottom:0}.stat-row span{color:#9ab0c7;font-size:11px}.stat-row strong{font-size:12px;text-align:right;white-space:nowrap}.stats-panel h3,.feed-panel h3{margin-bottom:9px}.feed{display:flex;flex-direction:column;gap:9px;max-height:244px;overflow-y:auto;scrollbar-width:thin}.feed-item{font-size:10px;border-bottom:1px solid #2b4052;padding:0 0 9px;line-height:1.5;display:flex;gap:9px}.feed-avatar{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#3c5874;color:#f9c77d;flex:none;font-size:11px;font-weight:900}.feed-text{min-width:0;word-break:break-word}.feed-item b{color:#f1d18d}.feed-item span{color:#98b0c9}.feed-item em{display:block;font-style:normal;color:#6d829d;font-size:9px;margin-top:2px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.settings-grid label{display:flex;flex-direction:column;gap:8px}.settings-grid select{padding:10px}.settings-actions{margin-top:15px;display:flex;gap:10px}.ghost-button{background:#1c3047;color:#c4d7eb;border:1px solid #38516e;border-radius:9px;padding:10px 13px;flex:1;text-align:center;font-size:11px;font-weight:800}.ghost-button:hover{background:#29425e}.smallprint{text-align:center;color:#607990;font-size:10px;line-height:1.5;padding:0 5px 5px}
.game-toast{z-index:4;position:absolute;left:50%;bottom:12%;transform:translateX(-50%) translateY(10px);min-width:65%;max-width:90%;pointer-events:none;text-align:center;opacity:0;transition:opacity .18s,transform .18s;padding:11px 14px;background:#102036eb;border:1px solid #ffffff55;border-radius:12px;color:white;font-weight:800;font-size:14px;text-shadow:0 1px 1px #0007;box-shadow:0 8px 28px #0007}.game-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.game-toast.warn{border-color:#f19b8c;color:#ffd5ca}
body[data-mode=overlay]{background:#070c15;min-height:100vh;overflow:hidden}.overlay-shell{height:100vh;width:100vw;position:relative;display:flex;align-items:center;justify-content:center}.overlay-shell canvas{height:100vh;width:auto;max-width:100vw;max-height:100vh;object-fit:contain;aspect-ratio:9/16}.overlay-notice{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:10px;font-weight:900;letter-spacing:1px;color:#a8bed2;background:#0d1c2be5;padding:7px 9px;border-radius:5px}
@media(max-width:980px){.dashboard{grid-template-columns:minmax(290px,410px) minmax(330px,1fr);gap:14px}.panel{padding:16px}.action{gap:6px;padding:9px;min-height:68px}.action strong{font-size:11px}.action-icon{min-width:25px;font-size:20px}.keycap{display:none}.double-panel{grid-template-columns:1fr}.feed{max-height:170px}}
@media(max-width:750px){.app-shell{padding:14px 12px 28px}.topbar{margin-bottom:15px;align-items:flex-start}.brand-mark{width:37px;height:37px;border-radius:10px;font-size:24px}.brand{gap:9px}.brand h1{font-size:21px}.brand-kicker{font-size:7px;letter-spacing:1.4px}.top-actions{gap:8px;flex-direction:column;align-items:flex-end}.top-link{font-size:10px}.demo-badge{font-size:9px;padding:7px}.dashboard{display:flex;flex-direction:column;align-items:center}.stage-column{position:static;width:100%;max-width:460px}.stage-frame{max-width:380px;margin:auto;border-width:4px}.stage-tip{max-width:380px;margin:auto}.controls{width:100%;max-width:700px}.panel{padding:17px}.double-panel{grid-template-columns:1fr 1.12fr}.feed{max-height:240px}}
@media(max-width:425px){.top-actions .top-link{display:none}.brand h1{font-size:18px}.brand-kicker{font-size:6.5px}.action-grid{gap:8px}.action{padding:8px;min-height:64px}.action-icon{font-size:19px;min-width:24px}.action strong{font-size:10px}.action small{font-size:9px}.double-panel{grid-template-columns:1fr}.settings-actions{flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition-duration:0s!important}}
