:root{color-scheme:dark;--bg:#080915;--panel:#101223;--line:#30334e;--muted:#b1b6cf;--cyan:#63ffe6;--red:#ff4a65}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at top,#171838,transparent 70%),var(--bg);color:#f2f2fa;font:14px/1.4 'Courier New',monospace}main{max-width:740px;margin:auto;padding:10px 14px 16px}button{font:inherit;cursor:pointer;color:inherit;border:1px solid var(--line);background:#1a1d32;min-height:44px;touch-action:manipulation}button:hover{border-color:var(--cyan)}button:active{filter:brightness(1.25)}button:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}button:disabled{opacity:.45;cursor:default}header{display:flex;align-items:center;gap:12px;height:48px}.brand{font-size:32px;font-weight:1000;letter-spacing:-3px;color:var(--red)}h1{font-size:15px;margin:0;flex:1}h1 em{color:var(--red);font-style:normal}header button{width:44px;flex-shrink:0}.dashboard{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);background:var(--panel);margin:8px 0}.dashboard>div{padding:6px 12px;border-right:1px solid var(--line)}small{display:block;color:var(--muted);font-size:9px}.dashboard strong{font-size:22px}.dashboard>div:first-child strong{color:var(--cyan)}#lives{font-size:15px;color:var(--red);white-space:nowrap}.play{border:1px solid var(--line);background:#0d0f20}.room-top{display:flex;justify-content:space-between;padding:6px 10px;font-size:10px;color:var(--muted)}#combo{color:var(--cyan)}.canvas-wrap{position:relative}canvas{width:100%;height:auto;display:block;image-rendering:pixelated}.bubbles{position:absolute;inset:0;pointer-events:none}.bubble{position:absolute;transform:translate(-50%,-100%);width:22%;padding:4px 3px;background:#171e35;border:2px solid var(--bubble-color);box-shadow:3px 3px 0 #070a15;text-align:center;line-height:1.15;font-size:12px;pointer-events:auto;z-index:2}.bubble:after{content:'';position:absolute;bottom:-7px;left:calc(50% - 5px);width:8px;height:8px;border-right:2px solid var(--bubble-color);border-bottom:2px solid var(--bubble-color);background:#171e35;transform:rotate(45deg)}.bubble b{display:block;font-size:10px;color:var(--bubble-color);margin-top:3px}.bubble i{position:absolute;bottom:0;left:0;height:2px;width:var(--patience);background:var(--bubble-color)}.bubble.urgent{background:#482035}.bubble.queued{border-style:dashed}.bubble.global{width:48%;background:#421c33;z-index:3}.ticker{border-top:1px solid var(--line);padding:7px 10px;color:#c5cbe2;min-height:32px;font-size:11px}.actions{display:flex;align-items:center;gap:12px;padding:8px 10px;border-top:1px solid var(--line)}.actions>div{flex:1;min-width:0}.actions strong{font-size:12px;display:block}.actions span{display:block;color:var(--muted);font-size:10px;margin-top:2px}#sos{background:#602039;border-color:var(--red);font-weight:bold;color:#fff;padding:5px 15px;min-width:105px}#sos small{color:#ffd8df;font-size:10px}.queue{display:flex;gap:5px;padding:0 10px 8px;min-height:28px;font-size:10px;color:var(--muted)}.queue span{border:1px solid var(--line);padding:3px 5px;flex:1}.queue span:first-child{color:var(--cyan)}footer{display:flex;justify-content:space-between;gap:14px;margin-top:9px;font-size:9px;color:var(--muted)}.overlay{position:fixed;inset:0;background:#050614cc;display:grid;place-items:center;padding:16px;z-index:10}.overlay.hidden{display:none}.modal{background:#12152a;border:1px solid #656398;box-shadow:5px 5px 0 #050610;max-width:420px;max-height:calc(100dvh - 32px);overflow:auto;padding:24px;text-align:center}.modal h2{font-size:23px;margin:8px 0}.modal p{font-size:12px;color:#c2c8de;line-height:1.6}.eyebrow{font-size:10px!important;letter-spacing:2px;color:var(--cyan)!important}.big{font-size:32px;color:var(--cyan);font-weight:bold;margin:12px}.primary{background:#ce284b;border-color:var(--red);width:100%;padding:12px;margin-top:10px;font-weight:bold}.upgrade{display:block;width:100%;text-align:left;padding:10px;margin:8px 0}.upgrade small{margin-top:4px}.help-list{text-align:left}.help-list p{margin:8px 0}@media(max-width:540px){main{padding:4px 6px 10px}header{gap:7px;height:44px}.brand{font-size:27px}h1{font-size:12px}header button{width:36px;min-width:36px}.dashboard{margin:4px 0}.dashboard>div{padding:4px 7px}.dashboard small{font-size:8px}.dashboard strong{font-size:20px}#lives{font-size:12px;letter-spacing:-1px}.room-top{padding:4px 8px;font-size:9px}.bubble{font-size:10px;padding:3px 2px;min-height:44px}.bubble b{font-size:9px}.ticker{font-size:10px;min-height:32px;padding:5px 8px}.actions{padding:6px 8px}.actions strong{font-size:11px}.actions span{font-size:9px}footer{font-size:8px}footer>span:first-child{max-width:75%}.queue{font-size:9px}.modal{padding:20px}}@media(min-width:541px) and (min-height:700px){main{max-width:min(740px,calc((100dvh - 250px)*1.16))}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* v3: manual stations, larger characters and live visitor choices */
header svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;vertical-align:middle}header{gap:8px}header h1{font-size:13px}.bubble{width:29%;font-size:11px;min-height:44px}.bubble b{font-size:10px}.bubble.global{width:41%;left:76%!important;z-index:4}.zones{position:absolute;left:1.5%;right:1.5%;bottom:0.6%;height:8%;display:flex;justify-content:space-around;gap:3%;pointer-events:none}.zones button{pointer-events:auto;width:30%;background:#141c31de;border-color:#55647d;font-size:12px;font-weight:bold;line-height:1.1}.zones small{font-size:8px;margin-top:3px;color:#c4d1e8}.zones .needed{border:2px solid var(--cyan);background:#16423be8;box-shadow:0 0 0 2px #63ffe62a}.visitor-buttons{position:absolute;inset:0;pointer-events:none}.visitor-buttons button{position:absolute;top:68.7%;width:28%;transform:translateX(-50%);pointer-events:auto;min-height:44px;padding:3px;background:#111a2bed;border-color:var(--visitor-color);font-size:10px;line-height:1.1;z-index:3}.visitor-buttons small{color:var(--visitor-color);font-size:9px;margin-top:3px}.choice{position:absolute;z-index:7;left:2%;right:2%;bottom:1%;background:#151d35;border:2px solid #b3a1e3;box-shadow:0 -6px 30px #070a20;padding:10px}.choice strong{font-size:12px}.choice small{font-size:9px;color:#c6ccdf}.choice-actions{display:flex;gap:6px;margin-top:7px}.choice-actions button{flex:1;padding:5px;font-size:11px;background:#343152}.choice-actions button:last-child{flex:0 0 auto;font-size:10px}.choice.hidden{display:none}.steps{display:flex;gap:5px;padding:0 8px 6px;color:#bac1dc;font-size:9px;min-height:22px}.steps span{padding:2px 4px}.steps .done{color:#7fd8c3}.steps .next{color:#fff;background:#6e3957;border:1px solid #ff7c99}.actions{padding:5px 8px}.ticker{min-height:30px;padding:5px 8px}.actions strong{font-size:11px}.actions span{font-size:10px}.dashboard>div{padding:3px 8px}main{padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(10px,env(safe-area-inset-bottom))}@media(max-width:540px){header{gap:5px}header h1{font-size:10px}header button{min-width:32px;width:32px}.brand{font-size:24px}.bubble{font-size:10px;min-height:44px}.bubble b{font-size:9px}.visitor-buttons button{font-size:9px}.visitor-buttons small{font-size:8px}.zones button{font-size:10px;min-height:44px}.zones small{font-size:7px}.actions span{font-size:9px}.choice{padding:7px}.choice-actions button{font-size:10px}.choice strong{font-size:11px}footer{margin-top:5px;font-size:8px}}@media(min-width:541px) and (min-height:700px){main{max-width:min(740px,calc((100dvh - 225px)*.947))}}
.visitor-buttons button{top:68.7%;height:18.8%;background:transparent;border:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;padding:0 2px 3px;text-shadow:1px 1px #060b19}.visitor-buttons button>span{background:#111a2bf2;border-top:1px solid var(--visitor-color);padding:3px 1px 0}.visitor-buttons small{background:#111a2bf2;margin:0;padding:2px 1px}.visitor-buttons button:hover>span{background:#303552}
.zones{height:max(44px,8%);bottom:0}.zones button{min-height:44px}
/* v4: progression, action queue, energy and unobscured work progress */
.status-strip{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:0 8px;min-height:18px;font-size:9px;color:#ffbe9d}#energy-wrap{display:flex;align-items:center;gap:5px;margin-left:auto;color:#add4ff}#energy-wrap[hidden]{display:none}#energy{width:70px;height:8px;accent-color:#83b7ff}#rest{font-size:10px;padding:4px;max-width:78px;color:#b8d6ff}#rest[hidden]{display:none}#action-queue{display:flex;gap:4px;overflow-x:auto;padding:4px 8px 7px;font-size:9px;align-items:center;min-height:29px}#action-queue>span{white-space:nowrap;color:#a6b4cf}#action-queue .current{color:#72edd8;border-left:2px solid #72edd8;padding-left:5px}#action-queue button{min-height:44px;flex-shrink:0;font-size:9px;padding:4px 6px}#work-progress-wrap{padding:0 8px 5px;font-size:10px;color:#b7ffe6}#work-progress-wrap[hidden]{display:none}#work-progress{width:100%;display:block;height:9px;accent-color:#63ffe6}#admin-progress{position:absolute;transform:translateX(-50%);width:76px;background:#071522;border:1px solid #90f9de;padding:3px;z-index:6;pointer-events:none;display:flex;gap:4px;align-items:center;box-shadow:2px 2px #050a16}#admin-progress[hidden]{display:none}#admin-progress>div{height:8px;background:#354553;flex:1}#admin-progress i{height:100%;display:block;background:#63ffe6}#admin-progress b{font-size:10px;color:#fff}.visitor-buttons button.roaming{height:13%;width:24%;z-index:3}.visitor-buttons button.roaming>span{font-size:8px}.visitor-buttons button.roaming small{font-size:8px}.steps{min-height:0}.zones button:disabled{opacity:.65;background:#111827}.status-strip:has(#energy-wrap[hidden]):has(#pressure:empty){display:none}@media(max-width:540px){#work-progress-wrap{font-size:9px}#action-queue{padding-top:2px;padding-bottom:4px}#admin-progress{width:65px}#admin-progress b{font-size:9px}.actions{gap:5px}.actions #sos{min-width:78px;padding:4px 8px}footer{display:none}.ticker{min-height:26px}.steps{font-size:8px;padding-bottom:3px}.status-strip{font-size:8px}main{padding-bottom:4px}}@media(min-width:541px) and (min-height:700px){main{max-width:min(740px,calc((100dvh - 295px)*.947))}}
@media(max-width:540px){.canvas-wrap{width:min(100%,max(280px,calc((100svh - 377px)*.947)));margin-inline:auto}.status-strip{min-width:0}#pressure{white-space:nowrap}#energy-wrap{flex-shrink:0}.actions>div{overflow-wrap:anywhere}}
/* Pressure: show the cause, consequence and affected timers together. */
#pressure-alert{height:52px;display:flex;gap:9px;align-items:center;margin:4px 8px 6px;padding:7px 9px;border:1px solid #ffab62;background:#442b24;color:#ffe0b3;box-shadow:inset 3px 0 #ffad62}#pressure-alert[hidden]{display:flex;visibility:hidden;pointer-events:none}.pressure-symbol{font-size:22px;font-weight:bold;color:#ffd08f}#pressure-headline{font-size:12px;display:block}#pressure-reasons{font-size:10px;color:#ffd6ae;margin-top:2px}.pressure-note{display:block;font-style:normal;font-size:9px;font-weight:bold;line-height:1.15;background:#4b2c1f;color:#ffe2b5;padding:3px 1px;margin-top:3px}.pressure-note[hidden]{display:none}.bubble.stressed{border-color:#ffaf69;background:#302536}.bubble.stressed:after{border-color:#ffaf69;background:#302536}.bubble.stressed b{color:#ffce99}.bubble.stressed i{height:4px;background:repeating-linear-gradient(120deg,#ffc27a 0 6px,#d06c30 6px 10px);transition:width 150ms linear}.bubble.stressed.urgent{background:#542736}.visitor-buttons button.stressed .pressure-note{border-bottom:3px solid #ffb16b}.visitor-buttons button.stressed small{color:#ffca8e}.bubble.global .pressure-note{color:#ffd5b5}.visitor-buttons button.roaming .pressure-note{font-size:8px}@media(max-width:540px){#pressure-alert{height:44px;padding:5px 7px;gap:6px;margin:2px 6px 4px}#pressure-headline{font-size:10px}#pressure-reasons{font-size:8px}.pressure-symbol{font-size:19px}.pressure-note{font-size:8px;padding:2px 0}.bubble.stressed i{transition:none}}@media(prefers-reduced-motion:reduce){.bubble.stressed i{transition:none}}
.pressure-note{white-space:nowrap;font-size:8px;margin-top:2px}.visitor-buttons .pressure-note{margin-top:0}.bubble.stressed i{height:3px}
.speaker{display:block;font-size:10px;color:#ffd294;margin-bottom:5px}
.test-controls{position:relative;z-index:11;display:flex;align-items:center;gap:6px;background:#171b2b;border:1px solid #78613b;padding:3px 6px;margin:4px 0;color:#ffe1a3}.test-controls[hidden]{display:none}.test-controls>span{font-size:10px;flex:1;white-space:nowrap}.test-controls button{min-height:44px;padding:5px 13px;font-size:12px;background:#302c29;border-color:#65543d;color:#ffe1a3}.test-controls button:hover{border-color:#ffe1a3}.test-controls button:disabled{opacity:.35}@media(max-width:540px){.test-controls{gap:4px;margin:2px 0;padding:2px 5px}.test-controls button{font-size:11px;padding:4px 10px}.test-controls>span{font-size:9px}}

/* Queue priority and unified shift report. */
#action-queue .queue-item{display:inline-flex;padding:0;border:0;flex-shrink:0;gap:2px}#action-queue .rush{color:#ffda9b;border-color:#8b6639;background:#3b2b25;font-weight:bold}#action-queue .rush:disabled{opacity:.45}.stars{font-size:42px;letter-spacing:7px;color:#ffd278;text-shadow:0 3px #764624}.shift-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px;text-align:left}.shift-stats span{padding:8px;background:#0b1021;font-size:10px;color:#b1bad2}.shift-stats b{display:block;font-size:16px;color:#e4f7f4;margin-top:3px}.star-rule{font-size:10px!important;color:#e2c794!important}.upgrade small{line-height:1.5}

@media(max-width:540px){.steps{display:none}#work-progress-wrap{display:none}.ticker{height:34px;min-height:34px;overflow:hidden}.bubble>span{display:block;max-height:23px;overflow:hidden}.bubble b{white-space:nowrap;font-size:8px}.bubble .pressure-note{font-size:7px}.bubble{font-size:9px;padding:2px;line-height:1.1}.bubble .pressure-note{padding:1px 0}.bubble.global{font-size:9px}}

body:has(.test-controls:not([hidden])) .overlay{padding-top:110px}body:has(.test-controls:not([hidden])) .modal{max-height:calc(100dvh - 126px)}

/* Telegram release: account and shared leaderboard. */
main{padding-top:max(4px,env(safe-area-inset-top),var(--tg-safe-top,0px))}#account-overlay{z-index:30;padding:16px}#account-modal{position:relative;width:min(100%,420px);max-height:calc(100dvh - 32px)}.panel-close{position:absolute;right:6px;top:6px;width:44px;font-size:23px}.account-links{display:flex;gap:8px;margin-top:12px}.account-links button{flex:1;font-size:12px}.practice-note,.privacy-note{font-size:10px!important;color:#a6b4ce!important}#nickname-form{text-align:left}#nickname-form label{display:block;margin-top:20px;font-size:12px}#nickname{width:100%;min-height:46px;background:#080f22;border:1px solid #687293;color:#f4f4fa;padding:10px;font:16px monospace;margin-top:8px}.input-hint{font-size:10px!important}#nickname-error{color:#ff8295}.leaderboard{width:100%;border-collapse:collapse;font-size:12px;text-align:left}.leaderboard th,.leaderboard td{padding:10px 5px;border-bottom:1px solid #30334e}.leaderboard td:nth-child(2){overflow-wrap:anywhere;max-width:140px}.my-rank{background:#163c3b;color:#87ffe8}.my-place{color:#87ffe8!important}#online-status{font-size:11px;color:#c2e6dc}
