*{box-sizing:border-box}body{margin:0;background:#100d16;color:#f5e9d0;font:15px system-ui;overflow:hidden}canvas{width:100vw;height:100vh;display:block;image-rendering:auto}header{position:fixed;top:0;left:0;right:0;padding:18px 24px;background:linear-gradient(#100d16ef,transparent);display:flex;align-items:center;gap:25px;pointer-events:none}header b{font-size:24px;letter-spacing:2px}em{color:#ff713e;font-style:normal}#stats{flex:1;text-align:right;font-weight:700;text-shadow:2px 2px #000}button{cursor:pointer;border:1px solid #ff9458;background:#302332;color:#fff1dc;border-radius:4px;padding:12px 18px;font-weight:800;touch-action:none}button:hover{background:#a34029}header button{pointer-events:auto}#cross{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);font:30px monospace;color:#fff9}#message{position:fixed;top:21%;width:100%;text-align:center;color:#ffd388;font-size:28px;font-weight:900;text-shadow:2px 3px #000}#menu{position:fixed;inset:0;display:grid;place-items:center;background:radial-gradient(ellipse at 30% 10%,#69352b99,#100d16ed);overflow:auto}.card{margin:20px;padding:30px 45px;border-left:5px solid #ff713e;background:#16121ce8;box-shadow:0 30px 100px #0008;max-width:570px}h1{font-size:clamp(60px,12vw,100px);line-height:.85;letter-spacing:-5px;margin:25px 0}small{letter-spacing:3px;color:#e7bf91}p{line-height:1.6;color:#d8c9bd}#start{background:#e85a30;width:100%;font-size:18px}.fine{font-size:11px;opacity:.6}summary{cursor:pointer;margin:16px 0}#touch{display:none;position:fixed;bottom:15px;left:12px;right:12px;justify-content:space-between}#touch button{padding:14px;background:#251b2dbb;margin:2px;user-select:none}@media(pointer:coarse){#touch{display:flex}header{padding:12px;gap:8px}header b{font-size:15px}#stats{font-size:11px}header button{padding:9px}.card{padding:22px}#cross{pointer-events:none}}

/* Cartoon cabinet styling */
.card{border:4px solid #221b31;border-radius:18px;background:#362642;box-shadow:10px 10px 0 #161222}h1{font-family:Impact,'Arial Black',sans-serif;letter-spacing:1px;color:#ffd43b;-webkit-text-stroke:2px #171222;text-shadow:5px 5px #171222}em{color:#ff8247}button{border:3px solid #211b2c;border-radius:10px;box-shadow:3px 3px 0 #171222}#start{background:#ffc636;color:#241b2c}#menu{background:linear-gradient(135deg,#57bce485,#7356a5cc)}header b{color:#ffda3e;-webkit-text-stroke:.5px #201b2a}canvas{image-rendering:auto}
/* Multi-touch layout: joystick left, look right, independent fire pointer. */
html,body{width:100%;height:100%;overscroll-behavior:none}canvas{height:100dvh;touch-action:none}#cross,#message{pointer-events:none}header{z-index:20;padding-top:max(12px,env(safe-area-inset-top));padding-right:max(12px,env(safe-area-inset-right));padding-left:max(12px,env(safe-area-inset-left))}header button{min-height:48px}#menu{z-index:40;touch-action:pan-y}#settings{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:#171323db;overflow:auto;padding:12px;touch-action:pan-y}#settings[hidden]{display:none}#settings .card{width:min(520px,100%);margin:12px 0;padding:24px}#settings h2{margin:0;color:#ffda3e}#settings label{display:flex;align-items:center;gap:12px;margin:15px 0;flex-wrap:wrap}#settings select{margin-left:auto;min-height:48px;max-width:100%;padding:8px;border-radius:7px;background:#201b2a;color:#fff;border:2px solid #ffc636}input[type=range]{min-height:44px;flex:1;min-width:120px;accent-color:#ffc636}input[type=checkbox]{width:22px;height:22px;accent-color:#ffc636}.settings-buttons{display:flex;gap:12px;flex-wrap:wrap}.settings-buttons button{flex:1;min-height:48px}#resume{background:#418757}#touch{display:none!important;position:fixed;inset:0;z-index:10;pointer-events:none;user-select:none;-webkit-user-select:none;touch-action:none}[data-touch=on][data-playing=yes] #touch{display:block!important}#touch>*{pointer-events:auto}#lookzone{position:absolute;left:44%;right:0;top:75px;bottom:0;touch-action:none}#joystick{position:absolute;left:max(20px,env(safe-area-inset-left));bottom:max(28px,env(safe-area-inset-bottom));width:150px;height:150px;border:3px solid #ffe7a588;background:#211b2c66;border-radius:50%;touch-action:none}#stick{position:absolute;left:50%;top:50%;width:64px;height:64px;border-radius:50%;background:#ffca62aa;border:3px solid #201b2a;transform:translate(-50%,-50%);pointer-events:none}#joystick small{position:absolute;bottom:8px;left:0;width:100%;text-align:center;letter-spacing:2px;font-size:11px;pointer-events:none}#touch #fire{position:absolute;right:max(22px,env(safe-area-inset-right));bottom:max(32px,env(safe-area-inset-bottom));width:126px;height:126px;border-radius:50%;background:#cf4e32cc;border:3px solid #ffd577;font-size:23px;margin:0;touch-action:none}#fire small{display:block;font-size:8px;letter-spacing:0;color:#fff4d9;margin-top:6px}#touch-actions{position:absolute;right:max(18px,env(safe-area-inset-right));bottom:178px;display:grid;grid-template-columns:repeat(2,minmax(80px,110px));gap:8px;pointer-events:none}#touch-actions button{pointer-events:auto;min-height:48px;margin:0;padding:9px;font-size:11px;background:#211b2cd9;border-color:#d2b787}#lookhint{position:absolute;right:20px;top:90px;font-size:10px;opacity:.65;pointer-events:none;letter-spacing:1px}.mobile-guide{display:none}[data-touch=on] .mobile-guide{display:block;color:#ffdc75}[data-touch=on] header{gap:8px}[data-touch=on] header b{font-size:16px}[data-touch=on] #stats{font-size:11px;max-width:65%;line-height:1.6}[data-touch=on] #message{top:22%;font-size:19px;padding:0 18px}
@media(max-width:600px){#joystick{width:130px;height:130px;left:max(12px,env(safe-area-inset-left))}#touch #fire{width:112px;height:112px;right:max(12px,env(safe-area-inset-right))}#touch-actions{grid-template-columns:repeat(2,86px);right:max(12px,env(safe-area-inset-right));bottom:164px}.card{max-width:calc(100vw - 24px);margin:12px}#menu .card{padding:20px}#menu h1{font-size:64px}.fine{font-size:11px}}
@media(max-height:500px){#joystick{width:116px;height:116px;bottom:max(14px,env(safe-area-inset-bottom))}#stick{width:52px;height:52px}#touch #fire{width:104px;height:104px;bottom:max(14px,env(safe-area-inset-bottom))}#touch-actions{bottom:132px;grid-template-columns:repeat(2,90px);gap:5px}#touch-actions button{min-height:44px;padding:7px}#lookhint{top:70px}#menu .card{margin:10px;padding:16px 24px}#menu h1{font-size:56px;margin:14px 0}#menu p{margin:10px 0}#settings{align-items:start}}

/* Small-town campaign HUD and audio controls. */
[hidden]{display:none!important}#objective{position:fixed;left:20px;right:20px;top:70px;color:#fff1c5;font-size:13px;font-weight:700;text-shadow:1px 2px #171523;pointer-events:none;z-index:5;padding:8px 10px;background:#191725a8;border-left:3px solid #f6c85f}#boss{position:fixed;right:20px;top:125px;max-width:55%;padding:10px;background:#6b3457d9;color:#ffe0ac;border:2px solid #f2c86d;font-weight:800;z-index:6}#subtitles{position:fixed;bottom:20px;left:25%;right:25%;z-index:25;color:#fff5da;background:#191724e8;border-radius:8px;border:1px solid #d7a45e;padding:10px 14px;text-align:center;font-weight:600;pointer-events:none;line-height:1.45}#interact-hint{position:fixed;left:25%;right:25%;top:70%;text-align:center;color:#ffe6a0;text-shadow:2px 2px #1c1b28;font-weight:800;pointer-events:none;z-index:6}#level-screen{position:fixed;inset:0;z-index:45;display:grid;place-items:center;background:#1d2031dc;overflow:auto}#level-heading{font-size:30px;color:#ffda72;line-height:1.15}#next-level,#continue-campaign{width:100%;margin-top:12px;background:#467763;color:#fff5d8}#audio-panel{margin:15px 0;padding:12px;border:1px solid #806a84;border-radius:9px}#audio-panel label{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:9px 0}#audio-panel input[type=range]{min-width:90px;width:150px;flex:1}#audio-panel .fine{margin-bottom:0}#touch-actions{grid-template-columns:repeat(2,minmax(80px,110px))}#touch-actions #interact{grid-column:span 2;background:#526c55e6}#menu .card{margin-top:22px;margin-bottom:22px}.card h2{overflow-wrap:anywhere}[data-touch=on] #objective{top:80px;left:12px;right:12px;font-size:10px;padding:5px 7px}[data-touch=on] #boss{top:140px;right:12px;font-size:11px;max-width:48%}[data-touch=on] #subtitles{left:24%;right:23%;bottom:12px;font-size:11px;padding:6px}[data-touch=on] #interact-hint{top:56%;font-size:11px;left:20%;right:20%}[data-touch=on] header #mute{font-size:10px;padding:8px;min-height:44px}
@media(max-width:600px){header{gap:6px}header b{font-size:15px}header button{font-size:10px;padding:8px}#stats{font-size:10px}#objective{top:85px;font-size:11px}#touch-actions{bottom:150px;gap:5px}#touch-actions button{min-height:42px}#level-screen .card{padding:20px}#subtitles{left:12%;right:12%}}
@media(max-height:500px){#touch-actions{bottom:125px;gap:4px}#touch-actions button{min-height:36px;padding:5px}#objective{top:62px}[data-touch=on] #objective{top:62px}#boss{top:108px}[data-touch=on] #boss{top:112px}#level-screen .card{padding:18px;margin:12px}#level-heading{font-size:24px}}

#stats{min-width:0;font-size:13px}[data-touch=on] header{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:5px;padding-bottom:6px}[data-touch=on] header b{grid-column:1;grid-row:1}[data-touch=on] header #mute{grid-column:2;grid-row:1}[data-touch=on] header #pause{grid-column:3;grid-row:1}[data-touch=on] #stats{grid-column:1/-1;grid-row:2;text-align:left;max-width:none;line-height:1.3;font-size:10px}[data-touch=on] #objective{top:100px}[data-touch=on] #boss{top:148px}[data-touch=on] #subtitles{bottom:280px;left:16%;right:16%}
@media(max-height:500px){[data-touch=on] #objective{top:84px}[data-touch=on] #boss{top:122px}[data-touch=on] #subtitles{bottom:12px;left:24%;right:23%}}

button:disabled{opacity:.55;cursor:wait}#art-status{min-height:1.4em;color:#ffdb91}

.cast-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:14px 0}.cast-grid figure{margin:0;background:#241e33;border:1px solid #69546a;border-radius:12px;padding:5px}.villain-thumb{width:100%;aspect-ratio:3/4;background-size:300% 200%;background-position:left top;background-repeat:no-repeat}.cast-grid figcaption{font-size:10px;line-height:1.25;color:#f4e4c8;min-height:2.5em;text-align:center}.cast-gallery summary{cursor:pointer;color:#ffdc95}@media(max-width:480px){.cast-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

header{z-index:60;gap:12px}header .top-link{pointer-events:auto;color:#ffe5a9;text-decoration:none;font-size:12px;font-weight:800;white-space:nowrap}header button{padding:9px 12px}#online-panel{position:fixed;inset:0;z-index:100;background:#0e0c16ed;overflow:auto}#online-panel[hidden]{display:none}#online-panel .card{margin:65px auto 25px}#online-panel label{display:block;margin:12px 0}#online-panel input,#online-panel select{display:block;width:100%;padding:10px;margin-top:5px;color:#fce8cc;background:#231a2c;border:1px solid #8f6688}#online-panel button{margin:4px 0}#online-close{float:right}#room-list button{display:block;width:100%;text-align:left}#online-status{color:#ffd492}#map-title{color:#8edbfc;font-size:13px}@media(max-width:750px){header{padding:8px;gap:6px;flex-wrap:wrap;background:#17121ee8}header b{font-size:14px}header #stats{order:5;flex-basis:100%;text-align:left;font-size:10px}header button{padding:7px;font-size:10px}header .top-link{font-size:10px}#online-panel .card{margin:15px;padding:20px}#menu .card{margin-top:100px}}
