:root{--bg: #0b0a0d;--text: #ece6da;--muted: #9a9384;--accent: #f5c542;--ink: #0c0c10;--tex-size: 128px;font-family:ui-monospace,Cascadia Mono,Consolas,Courier New,monospace;font-weight:700;color:var(--text);background:var(--bg);text-shadow:2px 2px 0 #000}*{box-sizing:border-box}html{background:#0b0a0d;-webkit-text-size-adjust:100%;text-size-adjust:100%}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{position:fixed;top:0;right:0;bottom:0;left:0}body{background:var(--tex-floor, #111) repeat;background-size:var(--tex-size);image-rendering:pixelated}canvas.px{image-rendering:pixelated;display:block}.panel,.card{background:var(--tex-panel, #1b1b22) repeat;background-size:var(--tex-size);border:3px solid var(--ink);box-shadow:inset 2px 2px #4a4b58,inset -2px -2px #111117,0 3px #000;image-rendering:pixelated}button,input{font:inherit;color:inherit;text-shadow:inherit;border-radius:0;border:3px solid var(--ink);padding:8px 12px;image-rendering:pixelated}button{cursor:pointer;background:var(--tex-button, #3a3a46) repeat;background-size:var(--tex-size);box-shadow:inset 2px 2px #7a7b8e,inset -2px -2px #22232b}button:hover:not(:disabled){filter:brightness(1.12)}button:active:not(:disabled){box-shadow:inset -2px -2px #7a7b8e,inset 2px 2px #22232b;transform:translateY(1px)}button:disabled{opacity:.45;cursor:default}button.primary{background-image:var(--tex-button-hot);color:#1a1205;text-shadow:1px 1px 0 #ffe9a8;box-shadow:inset 2px 2px #ffe08a,inset -2px -2px #7a5410}input{background:var(--tex-floor, #111) repeat;background-size:var(--tex-size);box-shadow:inset 2px 2px #000,inset -2px -2px #3a3a46}input{font-size:16px}input:focus{outline:2px solid var(--accent);outline-offset:0}.screen{display:flex;align-items:center;justify-content:center;height:100%;padding:12px;overflow:auto}.card{padding:20px;width:min(460px,94vw);display:flex;flex-direction:column;gap:12px;max-height:96vh;max-height:96dvh;overflow:auto}.card h1{margin:0 0 4px;font-size:26px;letter-spacing:1px;color:var(--accent);text-transform:uppercase}.row{display:flex;gap:8px;align-items:center}.row>input{flex:1;min-width:0}.muted{color:var(--muted);font-size:13px}.error{color:#ff7a7a;min-height:1.2em;font-size:13px}.code{font-size:38px;letter-spacing:8px;color:var(--accent)}.lobby{display:flex;gap:10px;width:min(1000px,100%);height:min(600px,100%)}.lobby .card{width:auto;max-height:none;padding:14px;gap:10px}.lobby-side{flex:0 0 280px;overflow:auto}.lobby-side .host{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px}.lobby-side .host .primary{grid-column:1 / -1;padding:12px;font-size:16px}.lobby-side .host button{padding:8px 4px;white-space:nowrap;font-size:13px}.lobby-side label.row{justify-content:space-between}.lobby-side label.row input{max-width:76px;flex:none}.lobby-players{flex:1;min-width:0}.lobby-players .title{display:flex;justify-content:space-between;align-items:baseline;color:var(--accent);text-transform:uppercase}.players{list-style:none;padding:0;margin:0;flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:4px;align-content:start}.players li{display:flex;align-items:center;gap:6px;padding:5px 6px;background:#0006;border:2px solid #000;min-width:0;font-size:13px}.players.hosting{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}.players li.me{border-color:var(--accent)}.players li .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.players li .dot{flex:none;width:8px;height:8px;background:#5fd36b;box-shadow:0 0 0 2px #000}.players li .dot.off{background:#777}.players li .dot.bot{background:#5fb0ff}.players li button{padding:0 6px;font-size:12px;line-height:18px;flex:none}.players li.empty{opacity:.25;border-style:dashed}.tag{font-size:9px;color:#1a1205;background:var(--accent);padding:1px 3px;text-shadow:none;flex:none}.tag.bot{background:#5fb0ff}.tag.off{background:#888}.tag.team{color:#fff;text-shadow:1px 1px 0 #000}.players li .ctid{color:var(--accent);font-size:11px;text-decoration:none;flex:none}.players li .ctid:hover{text-decoration:underline}.account{padding:6px 0}.account a{color:var(--accent);text-decoration:none}.account a:hover{text-decoration:underline}.players li canvas.av{flex:none;width:32px;height:26px;image-rendering:pixelated;margin:-4px 0}.players li select.team-pick{flex:none;font-size:12px;padding:1px 2px;background:#1a1a22;color:inherit;border:2px solid;max-width:74px}.look-pick{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.look-pick button{display:flex;flex-direction:column;align-items:center;gap:2px;padding:4px 2px;font-size:11px}.look-pick button canvas{width:48px;height:63px;image-rendering:pixelated}.look-pick button.on{outline:3px solid var(--accent);outline-offset:-1px}.look-pick .muted{grid-column:1 / -1}.overlay.help{z-index:50}.overlay.help .card{width:min(620px,96vw);gap:6px}.overlay.help h3{margin:8px 0 0;color:var(--accent);font-size:14px;text-transform:uppercase}.overlay.help p{margin:0;font-size:13px;line-height:1.45}@media(orientation:portrait){.lobby{flex-direction:column;height:auto}.lobby-side{flex:none}.lobby-players{min-height:50vh}}@media(max-height:480px){.screen{padding:6px}.lobby{height:100%;gap:6px}.lobby .card{padding:8px 10px;gap:6px}.lobby-side{flex-basis:240px}.lobby .code{font-size:28px;letter-spacing:6px}.lobby-side .host .primary{padding:8px}.players{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:3px}.players li{padding:3px 5px;font-size:12px}.players.hosting{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}}#game{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;contain:paint;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}#game canvas.main{display:block;width:100%;height:100%}.hud{position:fixed}.hidden{display:none!important}.dim{opacity:.6}.hud.topbar{top:calc(6px + env(safe-area-inset-top));left:calc(6px + env(safe-area-inset-left));display:flex;align-items:center;gap:12px;padding:6px 10px}.keybox{display:flex;align-items:center;min-width:74px}.topbar .stats{display:flex;gap:12px;align-items:center;font-size:15px}.topbar .timer{font-variant-numeric:tabular-nums;font-size:18px;min-width:52px}.topbar .timer.lastcall{color:#ff6b6b}.topbar .stat{display:flex;align-items:center;gap:4px}.topbar button.icon{padding:3px 6px}button.pvp.on{background-image:var(--tex-red);box-shadow:inset 2px 2px #d0565c,inset -2px -2px #3a0d10}button.pvp.off{background:#2f7d3e;box-shadow:inset 2px 2px #5fd36b,inset -2px -2px #123d1a}.hud.minimap-box{top:calc(6px + env(safe-area-inset-top));right:calc(6px + env(safe-area-inset-right));padding:4px}.miniwrap{width:132px;height:99px;overflow:hidden;background:#000;display:flex;align-items:center;justify-content:center}.miniwrap canvas{max-width:100%;max-height:100%;image-rendering:pixelated}.hud.scores{top:calc(123px + env(safe-area-inset-top));right:calc(6px + env(safe-area-inset-right));min-width:150px;padding:8px 12px;font-size:13px}.hud.scores .title{color:var(--accent);margin-bottom:4px;text-transform:uppercase}.hud.scores .s{display:flex;justify-content:space-between;gap:12px}.hud.scores button.endmatch{margin-top:8px;width:100%;font-size:11px;padding:6px;text-transform:uppercase;background-image:var(--tex-red);box-shadow:inset 2px 2px #d0565c,inset -2px -2px #3a0d10}button.subtle{font-size:12px;opacity:.8}.hud.log{top:calc(62px + env(safe-area-inset-top));left:calc(6px + env(safe-area-inset-left));max-width:min(340px,40vw);padding:6px 10px;font-size:12px;display:flex;flex-direction:column;gap:2px;pointer-events:none}.hud.bottom{left:calc(8px + env(safe-area-inset-left));right:calc(200px + env(safe-area-inset-right));bottom:calc(6px + env(safe-area-inset-bottom));pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:6px}.energy{display:flex;gap:4px;padding:4px;background:#000a;border:3px solid var(--ink)}.energy .pip{--fill: 1;position:relative;width:44px;height:12px;background:#1d2230;box-shadow:inset 2px 2px #000}.energy .pip:after{content:"";position:absolute;left:0;top:0;bottom:0;width:calc(var(--fill) * 100%);background:linear-gradient(#9feaff 0,#9feaff 3px,#39b8e8 3px,#39b8e8 9px,#1f7fae 9px)}.energy.low .pip{box-shadow:inset 0 0 0 2px #a33}.energy.blocking .pip:after{background:linear-gradient(#e6ecff 0,#e6ecff 3px,#9aa6c8 3px,#9aa6c8 9px,#6a7596 9px)}.inventory,.energy{pointer-events:auto}.inventory{display:flex;gap:4px;padding:4px}.slot{position:relative;width:min(52px,calc((100vw - 236px) / var(--n, 5) - 6px));aspect-ratio:1;height:auto;padding:0;display:flex;align-items:center;justify-content:center;background:var(--tex-floor, #111) repeat;background-size:var(--tex-size);box-shadow:inset 2px 2px #000,inset -2px -2px #3a3a46}.slot.empty{opacity:.6}.slot.equipped{border-color:var(--accent);box-shadow:inset 0 0 0 2px #7a5410,inset 3px 3px 0 1px #000}.slot .num{position:absolute;top:1px;left:3px;font-size:10px;color:var(--muted)}.slot .val{position:absolute;bottom:0;right:3px;font-size:11px;color:var(--accent)}.hud.slotmenu{display:flex;flex-direction:column;gap:6px;padding:8px;min-width:180px;z-index:5}.slotmenu .title{font-size:13px;color:var(--accent)}.slotmenu button.pick{display:flex;align-items:center;gap:8px;text-align:left}.slot{touch-action:none}.slot.gear{border-color:#5ad1ff;box-shadow:inset 0 0 0 2px #1d5c7a,inset 3px 3px 0 1px #000}.slot.droptarget{border-color:#7dff8a;filter:brightness(1.3)}.drag-ghost{position:fixed;z-index:20;pointer-events:none;transform:translate(-50%,-60%) scale(1.2);filter:drop-shadow(3px 3px 0 #000)}.hud.actions{right:calc(8px + env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;gap:8px;align-items:end}.act{width:72px;height:72px;padding:2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;touch-action:manipulation}.act .ico{display:flex;align-items:center;justify-content:center;min-height:36px}.act .lbl{font-size:10px;text-transform:uppercase}.act.big{width:104px;height:104px}.act.blk{grid-row:1;grid-column:1}.act.use{grid-row:2;grid-column:1}.attackcol{grid-row:1 / span 2;grid-column:2;display:flex;flex-direction:column;justify-content:flex-end;gap:6px}.hud.actions button.pvp{width:104px;font-size:11px;padding:6px 4px;text-transform:uppercase;white-space:nowrap}.act.red{background-image:var(--tex-red);box-shadow:inset 2px 2px #d0565c,inset -2px -2px #3a0d10}.act.disabled{opacity:.5;filter:grayscale(1)}.hud.dead{left:50%;top:38%;transform:translate(-50%,-50%);padding:14px 22px;font-size:20px;pointer-events:none}.hud.puzzle{top:calc(64px + env(safe-area-inset-top));left:50%;transform:translate(-50%);z-index:6;width:min(420px,60vw);padding:8px 12px;font-size:13px;display:flex;flex-direction:column;gap:6px}.hud.puzzle .title{color:var(--accent);text-transform:uppercase}.hud.puzzle .title.bad,.hud.puzzle .bad{color:#ff9a9a}.hud.puzzle .clue{font-size:18px;color:#fff}.hud.puzzle .small{font-size:11px}.hud.puzzle .options{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:6px}.hud.puzzle .options button,.hud.puzzle>button{padding:8px 6px;font-size:13px}.hud.puzzle button.call{padding:8px;background-image:var(--tex-button-hot);color:#1a1205;text-shadow:none}.hud.puzzle .wires{display:flex;flex-direction:column;gap:4px}.hud.puzzle button.wire{display:flex;align-items:center;gap:8px;padding:4px 8px;font-size:12px}.hud.puzzle button.wire .n{width:14px}.hud.puzzle button.wire .cable{flex:1;height:8px;background:var(--wire);box-shadow:0 0 0 2px #000,inset 0 2px #fff4}.hud.puzzle button.wire .c{width:50px;text-align:right;text-transform:uppercase;font-size:10px;color:var(--muted)}.hud.puzzle button.wire.armed{outline:3px solid #ff6b6b}.hud.puzzle button.wire.armed .cable{background:repeating-linear-gradient(90deg,var(--wire) 0 10px,transparent 10px 14px)}.hud.puzzle .tabs{display:flex;gap:4px}.hud.puzzle .tabs button{flex:1;padding:5px 2px;font-size:11px}.hud.puzzle .tabs button.on{background-image:var(--tex-button-hot);color:#1a1205;text-shadow:none}.hud.puzzle ol.rules{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:3px;font-size:12px}@media(orientation:landscape){#game.puzzling .hud.log{max-width:calc(50vw - min(210px,30vw) - 14px)}}.hud.chatbox{left:50%;transform:translate(-50%);top:calc(8px + env(safe-area-inset-top));z-index:25;display:flex;gap:6px;padding:6px;width:min(460px,90vw)}.hud.chatbox input{flex:1;min-width:0}.topbar button.chatbtn{font-size:12px;padding:4px 8px;text-transform:uppercase}@media(orientation:portrait){.hud.puzzle{top:auto;bottom:calc(210px + env(safe-area-inset-bottom));left:calc(96px + env(safe-area-inset-left));right:calc(8px + env(safe-area-inset-right));width:auto;transform:none}}@media(max-height:480px)and (orientation:landscape){.hud.puzzle{top:calc(54px + env(safe-area-inset-top));width:min(400px,52vw);padding:6px 10px;gap:4px}.hud.puzzle .clue{font-size:15px}.hud.puzzle .options{grid-template-columns:repeat(5,1fr);gap:4px}.hud.puzzle .options button{padding:6px 2px;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud.puzzle .small.dim,.hud.puzzle>button:not(.call){display:none}.hud.puzzle .wires{flex-direction:row}.hud.puzzle button.wire{flex-direction:column;flex:1;gap:2px;padding:3px 2px}.hud.puzzle button.wire .cable{width:8px;height:16px;flex:none}.hud.puzzle button.wire .c{width:auto;text-align:center;font-size:9px}.hud.puzzle ol.rules{font-size:11px;gap:1px}}.hud.consume{position:fixed;z-index:15;flex-direction:column;gap:0;border-color:#7dff8a;pointer-events:auto}.hud.consume .lbl{font-size:10px;text-transform:uppercase;color:#b5f0a2}.hud.consume.droptarget{filter:brightness(1.4);box-shadow:0 0 0 3px #7dff8a}@media(max-height:480px){.hud.bottom{right:calc(164px + env(safe-area-inset-right));align-items:flex-start}.slot{width:min(44px,calc((100vw - 196px) / var(--n, 5) - 6px));height:auto}.energy .pip{width:34px;height:10px}.act{width:58px;height:58px}.act .ico{min-height:28px}.act.big{width:84px;height:84px}.hud.actions button.pvp{width:84px;padding:4px 2px;font-size:10px}.miniwrap{width:106px;height:79px}.hud.scores{top:calc(101px + env(safe-area-inset-top))}.topbar .stats{gap:8px;font-size:13px}.topbar .timer{font-size:15px}}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#000c;z-index:10}.offline{position:fixed;top:0;left:0;right:0;text-align:center;background:#a33;padding:4px;font-size:13px;z-index:40;border-bottom:3px solid #000}table.results{border-collapse:collapse;width:100%;font-size:13px}table.results td,table.results th{padding:4px 6px;text-align:left;border-bottom:2px solid #000}@media(orientation:portrait){.hud.topbar{right:calc(152px + env(safe-area-inset-right));flex-wrap:wrap;gap:6px 10px;padding:5px 8px}.topbar .stats{flex-wrap:wrap;gap:6px 10px;font-size:13px}.topbar .timer{font-size:15px}.hud.bottom{left:calc(6px + env(safe-area-inset-left));right:auto;top:calc(112px + env(safe-area-inset-top));bottom:calc(8px + env(safe-area-inset-bottom));flex-direction:row-reverse;align-items:center;justify-content:flex-end;gap:4px}.inventory{flex-direction:column}.slot{width:min(52px,calc((100svh - 140px) / var(--n, 5) - 6px));height:auto}.energy{flex-direction:column-reverse;padding:3px}.energy .pip{width:12px;height:34px}.energy .pip:after{top:auto;right:0;width:auto;height:calc(var(--fill) * 100%);background:linear-gradient(90deg,#9feaff 0,#9feaff 3px,#39b8e8 3px,#39b8e8 9px,#1f7fae 9px)}.energy.blocking .pip:after{background:linear-gradient(90deg,#e6ecff 0,#e6ecff 3px,#9aa6c8 3px,#9aa6c8 9px,#6a7596 9px)}.hud.log{top:calc(112px + env(safe-area-inset-top));left:calc(92px + env(safe-area-inset-left));max-width:52vw}.hud.dead{font-size:16px}}
