/* Shadow Step: night plaza noir. Ink ground, sodium lamps, one cyan figure. */
.ss{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.ss-stage{position:relative;width:min(100%,calc((100vh - 200px) * .6667));width:min(100%,calc((100dvh - 200px) * .6667));min-width:280px;aspect-ratio:2/3;margin:0 auto;border-radius:16px;overflow:hidden;background:#0d1424;border:1px solid #22304f;box-shadow:0 10px 30px rgba(0,0,0,.45)}
#ss-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:pointer;-webkit-tap-highlight-color:transparent;outline:none}
.ss-mute{position:absolute;top:2px;right:2px;width:48px;height:48px;border:0;border-radius:12px;background:transparent;color:#e8f0ff;display:flex;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;z-index:3}
.ss-mute .x{display:none}.ss-mute.off .x{display:inline}.ss-mute.off .w{display:none}.ss-mute.off{color:#8fa0c4}
.ss-mute:focus-visible,.ss-btn:focus-visible{outline:3px solid #ffd166;outline-offset:2px}
.ss-panel{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom));background:rgba(6,9,18,.8);overflow:auto;touch-action:manipulation}
.ss-panel[hidden]{display:none}
.ss-card{width:100%;max-width:320px;text-align:center;display:flex;flex-direction:column;align-items:stretch;gap:10px;animation:ssIn .28s ease-out both}
.ss-kicker{font-size:.72rem;letter-spacing:.22em;text-transform:uppercase;color:#8fa0c4}
.ss-title{font:800 2.5rem/1 "Arial Narrow",system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#f3f7ff;text-shadow:0 0 22px rgba(255,209,102,.45)}
.ss-title.win{color:#5ef0d0;text-shadow:0 0 22px rgba(94,240,208,.4)}.ss-title.lose{color:#ff7a6a;text-shadow:0 0 22px rgba(255,90,70,.4)}
.ss-sub,.ss-note{font-size:.92rem;color:#b8c4de;line-height:1.35}
.ss-flag{font-size:.9rem;font-weight:700;color:#ffd166}
.ss-medal{font-size:.9rem;color:#dfe6f5}
.ss-stepper{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:4px}
.ss-mid{display:flex;flex-direction:column;gap:2px;flex:1}.ss-mid strong{font-size:1.15rem;color:#fff}.ss-mid span{font-size:.78rem;color:#8fa0c4}
.ss-btn{font:700 1rem system-ui,sans-serif;min-height:48px;border-radius:12px;border:1px solid #31456e;background:#16213a;color:#e8f0ff;cursor:pointer;padding:0 16px;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .08s,background .15s}
.ss-btn:active{transform:scale(.97)}
.ss-btn:disabled{opacity:.35;cursor:default}
.ss-sq{width:48px;padding:0;font-size:1.6rem;line-height:1}
.ss-primary{background:#ffd166;border-color:#ffd166;color:#1a1305;font-size:1.1rem;box-shadow:0 0 22px rgba(255,209,102,.35)}
.ss-ghost{background:transparent}
.ss-pips{display:flex;justify-content:center;gap:8px}.ss-pips i{width:16px;height:16px;transform:rotate(45deg);border:2px solid #4b5b82;border-radius:3px}.ss-pips i.on{background:#ffd166;border-color:#ffd166;box-shadow:0 0 10px rgba(255,209,102,.6)}
.ss-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.ss-grid div{background:#111a2f;border:1px solid #22304f;border-radius:10px;padding:8px 2px;display:flex;flex-direction:column;gap:2px}.ss-grid b{font-size:1.05rem;color:#fff}.ss-grid span{font-size:.68rem;color:#8fa0c4;text-transform:uppercase;letter-spacing:.08em}
.ss-how{list-style:none;text-align:left;font-size:.84rem;color:#b8c4de;display:flex;flex-direction:column;gap:5px;padding:4px 2px}
.ss-how li{padding-left:14px;position:relative}.ss-how li:before{content:"";position:absolute;left:0;top:.5em;width:6px;height:6px;background:#5ef0d0;transform:rotate(45deg)}
.ss-foot{font-size:.75rem;color:#6f80a6}
.ss-keys{font-size:.76rem;color:#6f80a6;text-align:center;margin:.6rem 0 0}
.ss-nojs{padding:1rem;color:#fff}
.ss-about{max-width:420px;margin:1rem auto 0;padding:0 1rem 1rem;color:#9fb0d2;font-size:.9rem;line-height:1.5}.ss-about h2{font-size:1.05rem;color:#dfe6f5;margin-bottom:.4rem}.ss-about p+p{margin-top:.6rem}
@keyframes ssIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.ss-card{animation:none}.ss-btn{transition:none}}
@media (hover:none){.ss-keys{display:none}}
/* Full screen: stage fills the shell stage, canvas keeps 2:3 and is centred */
html.pip-immersive .game-wrap,html.pip-native .game-wrap,.game-wrap:fullscreen{display:flex!important;flex-direction:column;overflow:hidden!important}
html.pip-immersive .game-wrap>.ad-well,html.pip-immersive .ss-keys,html.pip-immersive .ss-about,html.pip-native .game-wrap>.ad-well,html.pip-native .ss-keys,html.pip-native .ss-about,.game-wrap:fullscreen .ss-keys,.game-wrap:fullscreen .ss-about{display:none!important}
html.pip-immersive .ss,html.pip-native .ss,.game-wrap:fullscreen .ss{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;padding-bottom:max(8px,env(safe-area-inset-bottom))}
html.pip-immersive .ss-stage,html.pip-native .ss-stage,.game-wrap:fullscreen .ss-stage{height:100%;width:auto;max-width:100%;min-width:0;margin:0}
@supports (width:1cqw){
html.pip-immersive .ss,html.pip-native .ss,.game-wrap:fullscreen .ss{container-type:size}
html.pip-immersive .ss-stage,html.pip-native .ss-stage,.game-wrap:fullscreen .ss-stage{width:min(100cqw,66.667cqh);height:auto;max-height:100%}
}
@media (orientation:landscape) and (max-height:520px){html.pip-immersive .ss-title,html.pip-native .ss-title{font-size:1.6rem}html.pip-immersive .ss-panel,html.pip-native .ss-panel{padding-top:8px;padding-bottom:8px}html.pip-immersive .ss-btn,html.pip-native .ss-btn{min-height:44px}}
/* Full screen v2: no title, no wrap padding, board fills all it can at 2:3 */
html.pip-immersive .game-wrap>.game-title,html.pip-native .game-wrap>.game-title,.game-wrap:fullscreen>.game-title{display:none!important}
html.pip-immersive .game-wrap,html.pip-native .game-wrap,.game-wrap:fullscreen{padding:0!important;margin:0!important}
html.pip-immersive .ss,html.pip-native .ss,.game-wrap:fullscreen .ss{padding-top:0;padding-bottom:max(2px,env(safe-area-inset-bottom));padding-left:max(0px,env(safe-area-inset-left));padding-right:max(0px,env(safe-area-inset-right))}
html.pip-immersive .ss-stage,html.pip-native .ss-stage,.game-wrap:fullscreen .ss-stage{border-radius:0;border-width:0;box-shadow:none}
@media (orientation:landscape) and (max-height:520px){html.pip-immersive .ss,html.pip-native .ss{padding-bottom:0}}
