.sr-shell { --sr-ink:#eafaff; --sr-muted:#a8c0d2; color:var(--sr-ink); display:grid; gap:16px; min-width:0; font-family:inherit; }
.sr-shell * { box-sizing:border-box; }
.sr-shell button { cursor:pointer; font:inherit; }
.sr-shell button:focus-visible, .sr-shell canvas:focus-visible { outline:3px solid #ffe590; outline-offset:2px; }
.sr-shell [hidden] { display:none !important; }
.sr-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sr-header h2 { margin:3px 0 0; font-size:clamp(1.5rem,3.4vw,2.6rem); line-height:1.05; }
.sr-eyebrow { color:#8beaff; font-size:.69rem; font-weight:900; letter-spacing:.2em; }
.sr-menu { display:grid; gap:18px; }
.sr-intro { display:grid; grid-template-columns:minmax(200px,.72fr) 1fr; overflow:hidden; border:1px solid #5adcf663; border-radius:25px; background:linear-gradient(115deg,#14344f,#142d50 65%,#173a5b); box-shadow:0 20px 52px #05182742; }
.sr-intro > div:last-child { padding:clamp(20px,3vw,42px); align-self:center; }
.sr-intro h3 { margin:12px 0; font-size:clamp(1.55rem,3vw,2.8rem); line-height:1.02; }
.sr-intro p { color:#d0e6ec; line-height:1.55; margin:0 0 14px; }
.sr-instructions { font-size:.86rem; }
.sr-instructions b { color:#ffe493; }
.sr-intro-art { position:relative; min-height:255px; isolation:isolate; display:grid; place-items:center; overflow:hidden; background:radial-gradient(circle at 52% 39%,#96f2ff55,transparent 32%),linear-gradient(153deg,#265b83,#112540); }
.sr-intro-art:before { content:''; position:absolute; width:100%; height:100%; background:repeating-linear-gradient(90deg,transparent 0 18%,#80d8ff15 19% 20%),linear-gradient(transparent 45%,#64dbfb29); transform:perspective(350px) rotateX(56deg) scale(1.5); transform-origin:center bottom; z-index:-1; }
.sr-intro-art span { font-size:7rem; text-shadow:0 0 25px #79f4ff,0 0 70px #79f4ff; filter:drop-shadow(0 10px 10px #091d44); }
.sr-intro-art i { position:absolute; width:15px; height:15px; background:#ffdf8f; transform:rotate(45deg); box-shadow:0 0 20px #ffdf8f; }
.sr-intro-art i:nth-of-type(1) { left:13%; top:22%; }.sr-intro-art i:nth-of-type(2) { right:17%; bottom:18%; }.sr-intro-art i:nth-of-type(3) { left:27%; bottom:15%; }
.sr-worlds { display:grid; gap:18px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.sr-worlds section { min-width:0; border:1px solid color-mix(in srgb,var(--sr-world) 45%,transparent); background:linear-gradient(140deg,#102b42,#152e49); padding:18px; border-radius:22px; }
.sr-worlds h3 { margin:0 0 12px; font-size:1.1rem; }
.sr-worlds h3 span { color:var(--sr-world); font-size:.8rem; margin-right:7px; }
.sr-levels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.sr-levels button { display:flex; flex-direction:column; min-width:0; min-height:84px; align-items:flex-start; text-align:left; gap:2px; border:1px solid #8bc8de33; border-radius:13px; background:#23445d; color:#eafaff; padding:8px 10px; transition:transform .15s,background .15s; }
.sr-levels button:hover { transform:translateY(-2px); background:#315975; }
.sr-levels button b { color:var(--sr-world); font-size:1rem; }.sr-levels button span { font-size:.78rem; line-height:1.16; }.sr-levels button small { color:#f7d88d; letter-spacing:.08em; margin-top:auto; }
.sr-play { display:grid; gap:8px; min-height:0; }
.sr-hud { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.sr-hud div { display:flex; align-items:baseline; justify-content:space-between; gap:5px; min-width:0; padding:9px 12px; background:#18384d; border:1px solid #79d6f43b; border-radius:12px; }
.sr-hud small { font-size:.64rem; letter-spacing:.1em; color:#b1d0d8; font-weight:800; }.sr-hud strong { font-size:.95rem; white-space:nowrap; }.sr-hud div:nth-child(2) strong { color:#ff9db8; }
.sr-stage { position:relative; min-width:0; height:clamp(420px,68vh,790px); overflow:hidden; border:2px solid #75d9f994; border-radius:20px; background:#1b435b; box-shadow:0 16px 36px #06182966; touch-action:none; }
.sr-stage canvas { display:block; width:100%; height:100%; touch-action:none; }
.sr-progress { position:absolute; top:0; left:0; right:0; height:7px; background:#051f38a8; pointer-events:none; }.sr-progress span { display:block; height:100%; width:0; background:linear-gradient(90deg,#5df0e3,#ffe18b); box-shadow:0 0 18px #9af7ed; }
.sr-stage-actions { position:absolute; top:16px; right:16px; display:flex; gap:8px; }
.sr-stage-actions button { border:1px solid #c5f2ff9c; border-radius:11px; background:#092740ba; color:white; width:42px; height:42px; font-size:1.25rem; backdrop-filter:blur(9px); }
.sr-status { position:absolute; inset:0; display:grid; place-items:center; background:#071c34a3; color:#fff7d6; text-align:center; font-size:clamp(1.2rem,3vw,2rem); font-weight:900; letter-spacing:.13em; pointer-events:none; }
.sr-overlay { position:absolute; inset:0; display:grid; place-items:center; background:#0b2139bd; padding:16px; z-index:3; backdrop-filter:blur(6px); }
.sr-result { width:min(420px,100%); text-align:center; border:1px solid #88eaff8a; border-radius:23px; padding:24px; background:linear-gradient(#173e5c,#142d49); box-shadow:0 18px 50px #07192baa; }
.sr-result > span { display:block; font-size:4rem; color:#ffe18b; line-height:1; text-shadow:0 0 20px #ffe18b; }.sr-result h3 { margin:8px 0 4px; font-size:clamp(1.5rem,4vw,2rem); }.sr-result p { color:#d7edf1; }
.sr-result div { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }.sr-result button { border:1px solid #9be9f1; background:#266b80; color:white; padding:10px 13px; border-radius:11px; font-weight:750; }.sr-result button:hover { background:#358da0; }
.sr-touch { position:absolute; bottom:14px; left:14px; right:14px; display:flex; align-items:flex-end; gap:8px; pointer-events:none; }
.sr-touch button { pointer-events:auto; display:flex; flex-direction:column; align-items:center; justify-content:center; flex:0 0 auto; width:56px; height:54px; border:1px solid #d5f7ffba; border-radius:16px; background:#073047b8; color:white; font-weight:900; font-size:1.28rem; user-select:none; backdrop-filter:blur(8px); box-shadow:0 3px 14px #0416246b; }
.sr-touch button:active { transform:scale(.93); background:#2497ab; }.sr-touch small { font-size:.52rem; letter-spacing:.08em; }
.sr-touch button:nth-child(3) { margin-left:auto; }.sr-touch button:last-child { width:67px; color:#ffedac; border-color:#ffe9ab; }.sr-touch button:disabled { color:#b8cbd0; opacity:.48; }
.sr-bottom { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#b9d6e3; font-size:.78rem; }.sr-bottom button { white-space:nowrap; }
.sr-shell:is(:fullscreen,.campaign-viewport) { display:flex; flex-direction:column; height:100dvh; overflow:hidden; padding:8px; background:#10253c; gap:7px; }.sr-shell:is(:fullscreen,.campaign-viewport) .sr-header { display:none; }.sr-shell:is(:fullscreen,.campaign-viewport) .sr-play { display:flex; flex-direction:column; flex:1; min-height:0; }.sr-shell:is(:fullscreen,.campaign-viewport) .sr-stage { height:auto; flex:1; min-height:0; }.sr-shell:is(:fullscreen,.campaign-viewport) .sr-bottom { flex:0 0 auto; }
@media (max-width:850px) { .sr-worlds { grid-template-columns:1fr; }.sr-intro { grid-template-columns:1fr; }.sr-intro-art { min-height:175px; }.sr-intro-art span { font-size:5rem; }.sr-hud div { flex-direction:column; align-items:flex-start; gap:0; padding:6px 8px; }.sr-hud strong { font-size:.86rem; }.sr-hud small { font-size:.55rem; } }
@media (max-width:600px) { .sr-header h2 { font-size:1.45rem; }.sr-header .control-button { font-size:.75rem; padding:7px 9px; }.sr-stage { height:min(64dvh,580px); min-height:360px; border-radius:15px; }.sr-touch { gap:5px; left:7px; right:7px; bottom:7px; }.sr-touch button { width:49px; height:52px; font-size:1.1rem; border-radius:12px; }.sr-touch button:last-child { width:58px; }.sr-stage-actions { top:9px; right:9px; }.sr-stage-actions button { width:36px; height:36px; }.sr-bottom { flex-wrap:wrap; }.sr-bottom span { max-width:46%; }.sr-intro > div:last-child { padding:20px; } }
@media (max-width:400px) { .sr-touch button { width:44px; height:48px; }.sr-touch button:last-child { width:54px; }.sr-hud strong { font-size:.74rem; }.sr-hud small { font-size:.5rem; }.sr-levels { gap:5px; }.sr-levels button { padding:7px; } }
@media (orientation:landscape) and (max-height:500px) { .sr-shell:has(.sr-play:not([hidden])) { gap:4px; }.sr-shell:has(.sr-play:not([hidden])) .sr-header { display:none; }.sr-play { gap:4px; }.sr-stage { height:calc(100dvh - 124px); min-height:235px; }.sr-hud div { padding:4px 8px; }.sr-bottom { font-size:.7rem; }.sr-bottom .control-button { padding:5px 9px; } }
@media (prefers-reduced-motion:reduce) { .sr-levels button { transition:none; } }
.sr-stage-actions button { min-width:44px; min-height:44px; }
.sr-touch button:not(:disabled):focus-visible { outline:3px solid #ffe590; }

.sr-stage::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 50% 38%,transparent 52%,#040e2420 100%);box-shadow:inset 0 1px 1px #e4ffff25;}

.sr-shell.campaign-viewport {position:fixed;inset:0;z-index:1200;width:100vw;max-width:none;height:100dvh;margin:0;box-sizing:border-box;}

.sr-near-miss{position:absolute;top:52px;left:12px;max-width:calc(100% - 24px);padding:7px 10px;border:1px solid #a4fff0;border-radius:10px;background:#083d46e8;color:#d6fff5;font-size:.7rem;font-weight:850;letter-spacing:.07em;pointer-events:none;z-index:2}
