:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#151019;color:#f9ebe7;--red:#ff435f;--teal:#66e8d2;--muted:#c7adb6}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 48% 0%,#3a192b 0,transparent 55%);padding:clamp(8px,2vw,26px)}
.cabinet{max-width:1180px;margin:auto}
header,.hud,footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
header{padding:0 0 12px}
.brand{font-size:.78rem;font-weight:900;letter-spacing:.11em}
.mark{color:var(--red);font-size:1.2rem;margin-right:7px}
small,.hint,footer{color:var(--muted)}
.switches{display:flex;gap:6px}
button{color:inherit;background:#261b2a;border:1px solid #75505f;padding:7px 10px;border-radius:5px;font:700 .78rem system-ui;cursor:pointer;touch-action:manipulation}
button:disabled{opacity:.45;cursor:default}
button:focus-visible{outline:3px solid var(--teal);outline-offset:3px}
.hud{display:grid;grid-template-columns:1.45fr 1fr .9fr 1fr;background:#1c1520;border:1px solid #593844;border-radius:8px 8px 0 0;padding:8px clamp(8px,2vw,20px)}
.hud small{display:block;font-size:clamp(.54rem,1.65vw,.68rem);letter-spacing:.1em;font-weight:700}
.hud b{font-size:clamp(.87rem,2.7vw,1.42rem);font-variant-numeric:tabular-nums;white-space:nowrap}
.hud i{font-style:normal;color:var(--muted);font-size:.66em}
.armor{color:var(--red);letter-spacing:.05em}
.stage{height:min(70vh,720px);height:min(70dvh,720px);min-height:275px;position:relative;background:#211826;overflow:hidden;border:1px solid #593844;border-top:0;border-radius:0 0 8px 8px;isolation:isolate;touch-action:none}
canvas{width:100%;height:100%;display:block}
.overlay{position:absolute;inset:0;display:grid;place-items:center;background:linear-gradient(95deg,#100a14ec,#1d1019ac 60%,#310e22a0);padding:12px;overflow:auto;touch-action:pan-y}
.card{width:min(100%,560px);padding:clamp(8px,4vw,40px);text-align:left}
.kicker{color:var(--teal);font-size:.7rem;letter-spacing:.25em;font-weight:900;margin:0 0 10px}
h1{font-size:clamp(2.8rem,9vw,6.4rem);line-height:.81;letter-spacing:-.075em;margin:0;font-weight:950}
h1 em{font-style:normal;color:var(--red)}
#brief{max-width:35ch;line-height:1.4;font-size:clamp(.85rem,2.5vw,1.08rem);margin:16px 0}
.primary{background:var(--red);color:#1d0d16;border:none;border-radius:5px;padding:11px 15px;font-size:1rem;min-width:164px;text-align:left}
.primary span{float:right;margin-left:13px}
.primary:hover{background:#ff7990}
.hint{font-size:.72rem;margin:11px 0 0}
.objective{position:absolute;left:50%;top:8px;transform:translateX(-50%);padding:5px 10px;border:1px solid #7c4b60;border-radius:20px;background:#18101ded;color:#fff4e9;white-space:nowrap;font-size:clamp(.65rem,2vw,.8rem);pointer-events:none}
footer{padding:10px 0;font-size:.7rem;flex-wrap:wrap}
footer b{color:var(--teal);margin-left:.5em}
footer b:first-child{margin-left:0}
.touch{position:absolute;inset:auto 0 0;display:flex;justify-content:space-between;align-items:end;padding:9px;pointer-events:none}
#stick,.actions button{pointer-events:auto;touch-action:none;user-select:none}
#stick{height:76px;width:76px;border:2px solid #f9ebe780;border-radius:50%;background:#1c1520ad;display:grid;place-items:center}
#stick span{width:30px;height:30px;border-radius:50%;background:#f9ebe7c9;pointer-events:none}
.actions{display:flex;align-items:end;gap:7px}
.actions button{border-radius:50%;width:54px;height:54px;padding:0;background:#242032dc;border-color:#e9c1d2}
.actions #pulse{width:65px;height:65px;background:#801f3de6}
.actions button:disabled{opacity:.55}
@media(max-width:390px){.brand small{display:none}}
@media(max-height:550px){.stage{height:calc(100vh - 110px);height:calc(100dvh - 110px);min-height:180px}.card h1{font-size:clamp(1.65rem,7vh,3.2rem)}.card{padding:0}.kicker,.hint{margin:3px 0}#brief{margin:7px 0}}
.stage:has(.touch:not([hidden])) canvas{height:calc(100% - 90px)}
.touch{height:90px;background:#1b1421;border-top:1px solid #593844}
button,#stick{-webkit-tap-highlight-color:transparent}
@media(max-height:450px){.stage:has(.touch:not([hidden])) canvas{height:100%}.touch{height:auto;background:none;border:0}}

.howto{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}
.howto>div{background:#281d2ce6;border:1px solid #775268;border-radius:10px;padding:10px 7px;text-align:center}
.howto b,.howto small{display:block}
.howto b{font-size:.9rem;margin:5px 0}
.howto small{font-size:.7rem;line-height:1.35}
.demo{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:50%;font-size:25px}
.hero{background:#ff435f;color:#fff0df}
.bag{background:#ffe083;color:#59331e;border-radius:9px;font-weight:900}
.car{background:#66e8d2;color:#19434e;border-radius:7px}
.card h1{font-size:clamp(2.6rem,7vw,5rem)}
.card{padding:12px 20px}
.primary{min-height:48px;font-size:1.1rem}
.hint{line-height:1.5}
.objective{font-size:clamp(.7rem,2.4vw,.95rem);max-width:96%;white-space:normal;text-align:center;font-weight:800;border-color:#ffe08380}
#progress{position:absolute;top:49px;left:50%;transform:translateX(-50%);width:130px;height:7px;accent-color:#ffe083;pointer-events:none}
.stage:has(.overlay:not([hidden])) #progress{display:none}
.hud{grid-template-columns:1.5fr 1.1fr 1fr 1fr}
.hud .armor{font-size:clamp(.68rem,2.7vw,1.3rem);letter-spacing:0}
.touch-help{align-self:center;text-align:right;margin:0 5px;color:#fff1e8;font-weight:800;font-size:.9rem}
.touch-help small{font-size:.7rem;font-weight:500}
canvas{cursor:crosshair}
@media(max-width:420px){.card{padding:6px}.howto{gap:5px;margin:12px 0}.howto>div{padding:8px 4px}.howto b{font-size:.8rem}.howto small{font-size:.63rem}.hud small{letter-spacing:0}.hud b{font-size:.9rem}.hud i{display:block}}
@media(max-height:550px){.card h1{font-size:2rem}.howto{margin:7px 0}.howto>div{padding:5px}.demo{width:26px;height:26px;font-size:20px}.howto b{margin:2px 0}.hint{margin:4px 0}.overlay{place-items:start center}}
