:root{--ink:#fff9e9;--orange:#ff693c;--yellow:#ffd74d;--deep:#151124;--safe:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;touch-action:none}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#0c0915;color:var(--ink);font-family:Inter,ui-rounded,system-ui,sans-serif;user-select:none}
body{display:grid;place-items:center;background:radial-gradient(circle at 50% 10%,#352456 0,#151124 48%,#08070e 100%)}
main{width:min(100vw,560px);height:100dvh;display:grid;grid-template-rows:54px minmax(0,1fr) 38px 112px;padding:max(7px,env(safe-area-inset-top)) 9px calc(7px + var(--safe));gap:6px}
header,.status{display:flex;align-items:center;justify-content:space-between}
header>div:not(.title){min-width:70px;display:flex;flex-direction:column}header>div:last-child{text-align:right}
header small{font-size:9px;letter-spacing:.16em;color:#aaa1ba;font-weight:900}header b{font-size:18px;color:var(--yellow)}
.title{text-align:center;font-size:14px;font-weight:1000;letter-spacing:.08em}.title span{color:var(--orange)}
#stage{position:relative;min-height:0;display:grid;place-items:center}
canvas{display:block;max-width:100%;max-height:100%;width:auto;height:auto;aspect-ratio:15/17;border:2px solid #493b64;border-radius:14px;background:#271e3b;box-shadow:0 14px 40px #0008}
.status{padding:0 7px;font-size:12px;font-weight:900;letter-spacing:.04em}.status b{font-size:20px;color:var(--yellow)}#lives{color:#ff6c72;letter-spacing:.12em}#powers{color:#bdb0d4;font-size:10px}
.screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border-radius:14px;background:linear-gradient(#161126e8,#0c0915f5);padding:24px;z-index:5}
.screen.hidden{display:none}.logo{display:flex;align-items:center;gap:10px;transform:rotate(-3deg)}.logo i{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:var(--orange);font-style:normal;font-size:35px;box-shadow:0 8px 0 #a9362a}.logo strong{font-size:30px;line-height:.86;text-align:left;text-shadow:0 4px 0 #000}.logo strong span{color:var(--yellow)}
.screen p{max-width:290px;color:#c7bfd1;font-size:14px;line-height:1.45}
.logo.small strong{font-size:24px}
.slots{display:grid;grid-template-columns:1fr 1fr;gap:9px;width:min(300px,84%);margin:18px 0 4px}
.slot{padding:12px 8px;border:1px dashed #55476f;border-radius:13px;background:#1d1631;text-align:center;transition:.25s}
.slot b{display:block;font-size:14px;letter-spacing:.05em}
.slot span{display:block;margin-top:3px;color:#8d82a3;font-size:10px}
.slot.you{border:1px solid #5ee7ff88;background:#173042}.slot.you span{color:#5ee7ff}
.slot.filled{border:1px solid #ff9a65aa;background:#39203a;animation:slotPop .3s}
.slot.filled span{color:#ffb98a}
@keyframes slotPop{from{transform:scale(.85)}to{transform:scale(1)}}
.lobbyNote{min-height:44px;display:grid;place-items:center}
.count{font-size:44px;color:var(--yellow);text-shadow:0 4px 0 #000;animation:slotPop .25s}.screen button{border:0;border-radius:14px;background:linear-gradient(#ff7c49,#ff5338);color:white;padding:14px 32px;font-weight:1000;letter-spacing:.09em;box-shadow:0 6px 0 #9f2e2b;cursor:pointer}.screen button:active{transform:translateY(4px);box-shadow:0 2px 0 #9f2e2b}.screen>small{margin-top:16px;color:#81788d;font-size:10px}
.controls{display:flex;align-items:center;justify-content:space-between;padding:0 14px}.dpad{width:108px;height:104px;display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:3px}.dpad button,.drop{border:1px solid #5b4a73;background:#29203c;color:#e9e1f2;border-radius:9px;font-weight:900;font-size:15px;box-shadow:0 3px 0 #08060d}.dpad button:active,.dpad button.active,.drop:active{transform:translateY(2px);background:#4a3869;box-shadow:0 1px 0 #08060d}.dpad [data-dir=up]{grid-column:2}.dpad [data-dir=left]{grid-row:2;grid-column:1}.dpad [data-dir=down]{grid-row:2;grid-column:2}.dpad [data-dir=right]{grid-row:2;grid-column:3}
.drop{width:88px;height:76px;border-radius:50%;background:#ff633f;border-color:#ff9a65;color:#fff;font-size:11px;letter-spacing:.08em;box-shadow:0 6px 0 #8c2928}.drop span{display:block;font-size:25px}
@media(max-height:650px){main{grid-template-columns:minmax(0,1fr) 120px;grid-template-rows:45px minmax(0,1fr) 32px}.controls{grid-column:2;grid-row:2/4;flex-direction:column;justify-content:center;gap:20px;padding:0}.status{grid-column:1}.drop{width:72px;height:64px}.dpad{width:96px;height:92px}}
