.ss{--ss-accent:#d6452e;--ss-wood:#2b1d15;--ss-wood2:#3c2a1e;--ss-cream:#f3e7cf;--ss-gold:#e8b02a;background:var(--ss-wood);color:var(--ss-cream);border-radius:18px;padding:12px 12px calc(12px + env(safe-area-inset-bottom));font:600 15px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.ss *{box-sizing:border-box}
.ss-hud{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:8px}
.ss-stat{display:flex;flex-direction:column;min-width:0}
.ss-stat.right{align-items:flex-end;text-align:right}
.ss-lab{font-size:.78rem;letter-spacing:.06em;text-transform:uppercase;color:#c9b48e}
.ss-stat b{font-size:1.25rem;font-variant-numeric:tabular-nums}
#ss-goaltxt{font-size:.95rem;color:var(--ss-cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ss-moves{text-align:center;background:var(--ss-wood2);border-radius:12px;padding:4px 16px 6px;min-width:84px;border-bottom:3px solid #1c130d}
.ss-moves b{display:block;font-size:2rem;line-height:1.05;font-variant-numeric:tabular-nums}
.ss-moves span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#c9b48e}
.ss-moves.low b{color:#ff7b5f;animation:ssPulse .8s ease-in-out infinite}
.ss-bar{height:8px;border-radius:6px;background:#1c130d;margin:8px 0 6px;overflow:hidden}
.ss-bar i{display:block;height:100%;width:0;background:var(--ss-gold);border-radius:6px;transition:width .25s ease-out}
.ss-tip{min-height:2.7em;font-size:.88rem;font-weight:500;color:#d9c8a6;margin:0 0 6px}
.ss-stage{position:relative;margin:0 auto;border-radius:14px;overflow:hidden;background:#1c130d;border:4px solid #4a3020;min-height:380px;touch-action:none;box-shadow:0 6px 0 #170f0a}
.ss-stage canvas{display:block;touch-action:none;outline:none;max-width:100%}
.ss-stage.dim canvas{filter:saturate(.7) brightness(.8)}
.ss-ov{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(24,14,8,.78);overflow-y:auto;touch-action:pan-y;padding:12px}
.ss-ov[hidden]{display:none}
.ss-card{width:100%;max-width:300px;text-align:center;display:flex;flex-direction:column;gap:10px;margin:auto}
.ss-logo{font-size:2rem;line-height:1;letter-spacing:.02em;color:var(--ss-cream);text-shadow:0 3px 0 #6b4429}
.ss-card h2{font-size:1.5rem;color:var(--ss-cream)}
.ss-sub,.ss-meta,.ss-note,.ss-unlock{font-size:.85rem;font-weight:500;color:#cdb98f}
.ss-btn{appearance:none;border:2px solid #7a5a3d;background:var(--ss-wood2);color:var(--ss-cream);font:700 1rem/1 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;min-height:52px;min-width:44px;padding:0 14px;border-radius:12px;cursor:pointer;touch-action:manipulation;box-shadow:0 3px 0 #170f0a}
.ss-btn:active{transform:translateY(2px);box-shadow:0 1px 0 #170f0a}
.ss-btn:disabled{opacity:.45;cursor:default}
.ss-btn:focus-visible,.ss-lv:focus-visible,.ss-link:focus-visible{outline:3px solid var(--ss-gold);outline-offset:2px}
.ss-primary{background:var(--ss-gold);border-color:#f6d27a;color:#2b1d15;font-size:1.15rem;min-height:58px}
.ss-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ss-link{appearance:none;background:none;border:0;color:#e8d3a6;font:700 .9rem system-ui,sans-serif;min-height:44px;text-decoration:underline;cursor:pointer;touch-action:manipulation}
.ss-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;max-height:260px;overflow-y:auto;padding:2px;touch-action:pan-y}
.ss-lv{appearance:none;border:2px solid #7a5a3d;background:var(--ss-wood2);color:var(--ss-cream);border-radius:10px;min-height:48px;min-width:44px;font:700 1rem system-ui,sans-serif;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;touch-action:manipulation}
.ss-lv em{font-style:normal;font-size:.7rem;color:var(--ss-gold);line-height:1}
.ss-stars{display:flex;justify-content:center;gap:8px}
.ss-stars[hidden]{display:none}
.ss-stars i{width:44px;height:42px;background:#4b3a2c;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.ss-stars i.on{background:var(--ss-gold);animation:ssPop .4s ease-out}
.ss-tools{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-top:10px}
.ss-tools .ss-btn{min-height:48px;padding:0 2px;font-size:.8rem}
.ss-how{margin-top:14px;font-size:.92rem;font-weight:400;color:#2b2118}
.ss-how h2{font-size:1.05rem;margin:10px 0 4px}
.ss-how p{margin:0 0 6px}
@keyframes ssPulse{50%{transform:scale(1.12)}}
@keyframes ssPop{0%{transform:scale(.3)}70%{transform:scale(1.2)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.ss *{animation:none!important;transition:none!important}}
@media (max-width:360px){.ss-logo{font-size:1.7rem}.ss-moves{padding:4px 10px 6px;min-width:70px}}

/* full screen: board fills the stage under the dock */
html.pip-immersive .game-wrap.pip-stage,html:has(.game-wrap:fullscreen) .game-wrap{display:flex;flex-direction:column;padding:6px 8px calc(6px + env(safe-area-inset-bottom));overflow:hidden}
html.pip-immersive .pip-stage .ss,.game-wrap:fullscreen .ss{flex:1;min-height:0;display:flex;flex-direction:column;border-radius:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
html.pip-immersive .pip-stage .ss-stage,.game-wrap:fullscreen .ss-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;width:auto;height:auto}
html.pip-immersive .pip-stage .ss-stage canvas,.game-wrap:fullscreen .ss-stage canvas{flex:none}
html.pip-immersive .ss-how,.game-wrap:fullscreen~.ss-how,.game-wrap:fullscreen .ss-how,html.pip-immersive .ss-tip,.game-wrap:fullscreen .ss-tip{display:none}
html.pip-immersive .ss-tools .ss-btn,.game-wrap:fullscreen .ss-tools .ss-btn{min-height:48px}
@media (orientation:landscape) and (max-height:520px){
html.pip-immersive .pip-stage .ss,.game-wrap:fullscreen .ss{display:grid;grid-template-columns:1fr 150px;grid-template-rows:auto auto 1fr;column-gap:8px}
.ss .ss-stage{grid-column:1;grid-row:1/4}
.ss .ss-hud,.ss .ss-bar{grid-column:2}
.ss .ss-tools{grid-column:2;grid-row:3;grid-template-columns:1fr 1fr;align-content:end;margin-top:0}
}
