/* Scrap Brigade - stage, HUD, touch pad and menus. Scoped under #stage so site styles never leak in. */
html.pip-big, html.pip-big body { overflow: hidden; }
.sb-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: .75rem 0 .25rem; }
.sb-bar .btn { min-height: 44px; min-width: 44px; background: #D9541E; }
.sb-keysline { text-align: center; font-size: .8rem; color: #64748b; margin: .25rem 0 0; }
.sb-guide { max-width: 640px; margin: 1.5rem auto; padding: 0 1rem; line-height: 1.6; }
.sb-guide h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.sb-guide h3 { font-size: 1rem; margin: 1rem 0 .25rem; }
.sb-guide p { margin-bottom: .5rem; font-size: .95rem; }

#stage { --rust:#d9541e; --hot:#ff7a3d; --gold:#ffd23f; --ink:#0d1017; --steel:#1b2230; --plate:#283244; --line:#3d4a61; --pale:#e8edf5; --dim:#93a0b5; --u:1.75px;
  position: relative; width: min(100%, calc(84vh * 0.7)); width: min(100%, calc(84svh * 0.7)); aspect-ratio: 7 / 10; margin: 0 auto; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; border-radius: 14px; background: var(--ink); color: var(--pale);
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; line-height: 1.25;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: none; }
#stage.is-big, #stage:fullscreen, #stage:-webkit-full-screen { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; border-radius: 0; z-index: 99999; }
/* the site shell's own full screen pins the stage to the viewport: drop the portrait cap so landscape fills */
html.pip-immersive #stage, html.pip-native #stage { width: auto; max-width: none; aspect-ratio: auto; border-radius: 0; margin: 0; }
#stage.is-wide { justify-content: center; }
#stage *, #stage *::before, #stage *::after { box-sizing: border-box; }
#stage [hidden] { display: none !important; }
#stage button { font-family: inherit; cursor: pointer; touch-action: manipulation; color: inherit; }
#stage button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#sb-view { position: relative; flex: none; width: 100%; aspect-ratio: 4 / 3; background: #000; }
#sb-canvas { display: block; width: 100%; height: 100%; }
#sb-load { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--gold); font-weight: 800; letter-spacing: .12em; }

/* ---------- HUD (sizes ride on --u = screen pixels per game pixel) ---------- */
#sb-hud { position: absolute; inset: 0; pointer-events: none; font-size: calc(var(--u) * 6.5); font-weight: 800; text-shadow: 0 calc(var(--u) * .6) 0 #000; }
.sb-hl { position: absolute; left: calc(var(--u) * 4); top: calc(var(--u) * 4); width: calc(var(--u) * 78); }
.sb-hp { position: relative; height: calc(var(--u) * 8); background: #000a; border: calc(var(--u) * 1) solid #000; border-radius: calc(var(--u) * 1.5); overflow: hidden; }
.sb-hp i { display: block; height: 100%; background: linear-gradient(#ff6b6b, #d92c3f); transition: width .12s; }
.sb-hp.is-low i { animation: sb-blink .4s steps(2) infinite; }
.sb-hp span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--u) * 5.5); }
.sb-xp { height: calc(var(--u) * 2.5); margin-top: calc(var(--u) * 1); background: #000a; border-radius: calc(var(--u) * 1); overflow: hidden; }
.sb-xp i { display: block; height: 100%; background: var(--gold); }
.sb-meta { display: flex; gap: calc(var(--u) * 5); margin-top: calc(var(--u) * 1.5); }
.sb-meta b { color: var(--gold); } .sb-meta span::before { content: "\2665  "; color: #ff5c7a; }
.sb-hr { position: absolute; right: calc(max(34px, var(--u) * 14) + var(--u) * 6); top: calc(var(--u) * 4); text-align: right; }
.sb-wpn span { margin-left: calc(var(--u) * 3); color: #fff; }
.sb-nd { margin-top: calc(var(--u) * 1); color: #b8f08a; } .sb-nd i::before { content: "BOMB "; font-style: normal; color: var(--dim); }
.sb-sc { margin-top: calc(var(--u) * 1); color: var(--dim); font-size: calc(var(--u) * 5.5); }
.sb-boss { position: absolute; left: 14%; right: 14%; bottom: calc(var(--u) * 5); text-align: center; color: #ff8e7a; }
.sb-boss div { height: calc(var(--u) * 5); margin-top: calc(var(--u) * 1); background: #000b; border: calc(var(--u) * 1) solid #000; border-radius: calc(var(--u) * 1.5); overflow: hidden; }
.sb-boss i { display: block; height: 100%; background: linear-gradient(90deg, #ff3b4d, #ff9a3d); transition: width .15s; }
#stage .sb-pause { position: absolute; right: calc(var(--u) * 3); top: calc(var(--u) * 3); width: max(34px, calc(var(--u) * 14)); height: max(34px, calc(var(--u) * 14)); pointer-events: auto;
  background: #000a; border: 2px solid #fff5; border-radius: 8px; font-weight: 800; font-size: 13px; letter-spacing: 1px; }
@keyframes sb-blink { 50% { opacity: .35; } }

/* ---------- touch pad ---------- */
#sb-pad { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; touch-action: none;
  background: repeating-linear-gradient(135deg, #161c28 0 14px, #131822 14px 28px); border-top: 3px solid var(--rust); }
.sb-stick { position: relative; width: min(42%, 150px); aspect-ratio: 1; flex: none; touch-action: none; }
.sb-ring { position: absolute; inset: 6%; border-radius: 50%; background: #0008; border: 3px solid var(--line); }
.sb-knob { position: absolute; left: 31%; top: 31%; width: 38%; height: 38%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffb07a, var(--rust)); border: 3px solid #000; pointer-events: none; }
.sb-btns { position: relative; width: min(48%, 170px); aspect-ratio: 1; flex: none; }
#stage .sb-b { position: absolute; border-radius: 50%; border: 3px solid #000; font-weight: 800; font-size: 11px; letter-spacing: .5px; color: #10131a; box-shadow: 0 4px 0 #0009; touch-action: none; }
#stage .sb-b.is-on { transform: translateY(3px); box-shadow: 0 1px 0 #0009; filter: brightness(1.25); }
.sb-b--fire { right: 0; bottom: 20%; width: 46%; height: 46%; background: #ff5a4d; font-size: 13px !important; }
.sb-b--jump { right: 48%; bottom: 0; width: 40%; height: 40%; background: #ffd23f; }
.sb-b--nade { right: 6%; top: 0; width: 32%; height: 32%; background: #9be564; }
.sb-b--roll { left: 4%; top: 12%; width: 32%; height: 32%; background: #7fd4ff; }
#stage.is-wide #sb-pad { position: absolute; inset: 0; background: none; border: 0; pointer-events: none; align-items: flex-end; padding: 0 3% 4%; display: none; z-index: 2; }
#stage.is-wide.has-touch #sb-pad { display: flex; }
#stage.is-wide #sb-pad > * { pointer-events: auto; opacity: .62; }
#stage.is-wide .sb-stick { width: min(24%, 34vh); } #stage.is-wide .sb-btns { width: min(26%, 38vh); }

/* ---------- menus ---------- */
#sb-ui { position: absolute; inset: 0; z-index: 5; display: flex; overflow: hidden; touch-action: pan-y; background: #0d1017ee; font-size: 13px; }
#sb-ui[data-screen="title"] { background: linear-gradient(#0d1017aa, #0d1017f2 62%); }
#sb-ui[data-screen="pause"], #sb-ui[data-screen="levelup"] { background: #0d1017d9; }
.sb-scr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; max-width: 640px; margin: 0 auto; }
.sb-scr h2 { font-size: 22px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.sb-scr h3 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.sb-kick { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--z, var(--hot)); }
.sb-note { color: var(--dim); font-size: 12px; line-height: 1.45; } .sb-note--hot { color: var(--gold); font-weight: 700; }
.sb-px { flex: none; } .sb-px.sil { filter: brightness(0) invert(.28); }
#stage .sb-btn { min-height: 46px; padding: 0 16px; border: 3px solid #000; border-radius: 10px; background: var(--plate); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .08em; box-shadow: 0 4px 0 #000; }
#stage .sb-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
#stage .sb-btn:disabled { opacity: .4; cursor: default; }
#stage .sb-btn--big { background: var(--rust); font-size: 17px; min-height: 54px; }
#stage .sb-btn--ghost { background: transparent; border-color: var(--line); box-shadow: none; color: var(--pale); }
#stage .sb-btn--alert { background: var(--gold); color: #1a1300; animation: sb-pulse 1s ease-in-out infinite; }
#stage .sb-btn--sm { min-height: 40px; padding: 0 10px; font-size: 11px; background: var(--rust); flex: none; min-width: 74px; }
#stage .sb-btn--danger { background: #5a1a22; }
@keyframes sb-pulse { 50% { filter: brightness(1.25); } }
.sb-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; } .sb-foot .sb-btn { flex: 1; padding: 0 6px; }

.sb-title { align-items: stretch; justify-content: flex-end; text-align: center; padding-bottom: 8%; }
.sb-logo { display: flex; flex-direction: column; align-items: center; margin: auto 0 4px; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; line-height: .86; letter-spacing: -.02em; transform: rotate(-4deg); }
.sb-logo span { font-size: clamp(44px, 17cqw, 84px); font-size: clamp(44px, 15vmin, 84px); color: var(--gold); text-shadow: 0 4px 0 var(--rust), 0 8px 0 #000, 4px 4px 0 #000, -4px 4px 0 #000; }
.sb-logo span + span { color: #fff; font-size: clamp(36px, 12vmin, 68px); margin-left: 12%; }
.sb-sub { color: var(--pale); font-size: 12px; margin: 14px 0 6px; }

.sb-top { display: flex; align-items: center; gap: 8px; }
.sb-chip { padding: 5px 9px; border-radius: 6px; background: var(--plate); font-size: 12px; white-space: nowrap; } .sb-chip--lv { color: var(--gold); } .sb-chip--scrap { color: #ffb07a; }
.sb-xpbar { flex: 1; height: 8px; border-radius: 4px; background: var(--steel); overflow: hidden; } .sb-xpbar i { display: block; height: 100%; background: var(--gold); }
.sb-pips { display: inline-flex; gap: 3px; vertical-align: middle; } .sb-pips i { width: 9px; height: 6px; border-radius: 1px; background: var(--line); }
.sb-stars { display: inline-flex; gap: 2px; flex: none; }
.sb-stars i { width: 14px; height: 14px; background: var(--line); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); }
.sb-stars i.on { background: var(--gold); }
.sb-zones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
#stage .sb-zones button { min-height: 40px; border: 2px solid var(--line); border-radius: 8px; background: var(--steel); font-weight: 800; }
#stage .sb-zones button.on { background: var(--z); border-color: #000; color: #10131a; } #stage .sb-zones button.locked { opacity: .45; }
.sb-zhead { border-left: 5px solid var(--z); padding-left: 10px; } .sb-zhead p { color: var(--dim); font-size: 12px; margin-top: 2px; }
.sb-levels { list-style: none; display: flex; flex-direction: column; gap: 6px; }
#stage .sb-levels button { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 10px; text-align: left; border: 2px solid var(--line); border-radius: 10px; background: var(--steel); }
#stage .sb-levels button.next { border-color: var(--z); box-shadow: inset 4px 0 0 var(--z); } #stage .sb-levels button.boss { background: #2c1a20; }
#stage .sb-levels button:disabled { opacity: .45; cursor: default; }
.sb-num { width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--plate); font-weight: 800; }
.sb-lname { flex: 1; min-width: 0; font-weight: 700; } .sb-lname em { margin-left: 8px; padding: 1px 5px; border-radius: 4px; background: #ff3b4d; color: #fff; font-size: 10px; font-style: normal; }
.sb-lock { font-size: 10px; color: var(--dim); letter-spacing: .1em; }

.sb-best { color: var(--dim); font-size: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sb-foes { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.sb-foes li { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 6px; border-radius: 8px; background: var(--steel); font-size: 11px; min-height: 40px; }
.sb-foes img { max-height: 34px; width: auto; }
.sb-load { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
#stage .sb-load button { min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; border: 2px solid var(--line); border-radius: 8px; background: var(--steel); font-size: 10px; font-weight: 700; }
#stage .sb-load button.on { border-color: var(--gold); background: #3a3110; }

.sb-wlist, .sb-plist, .sb-stats, .sb-hlist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sb-wlist li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--steel); } .sb-wlist li.locked { opacity: .6; }
.sb-wi { width: 72px; flex: none; display: flex; justify-content: center; } .sb-wt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sb-wt span { color: var(--dim); font-size: 11px; line-height: 1.35; } .sb-wt .sb-wstat { color: var(--pale); }
.sb-cards { display: flex; flex-direction: column; gap: 8px; }
#stage .sb-card { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 12px; min-height: 64px; border: 3px solid #000; border-left: 8px solid var(--c); border-radius: 10px; background: var(--plate); box-shadow: 0 4px 0 #000; }
#stage .sb-card b { font-size: 15px; color: var(--c); } #stage .sb-card span { font-size: 12px; color: var(--pale); }
#stage .sb-card:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.sb-plist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 9px; border-radius: 8px; background: var(--steel); opacity: .62; font-size: 12px; } .sb-plist li.has { opacity: 1; }
.sb-plist li span:last-child { grid-column: 1 / -1; color: var(--dim); font-size: 11px; }
.sb-levelup, .sb-pausescr { justify-content: center; } .sb-levelup h2 { font-size: 34px; color: var(--gold); } .sb-pausescr h2 { text-align: center; margin-bottom: 6px; }
.sb-keys { color: var(--dim); font-size: 11px; text-align: center; line-height: 1.5; }
.sb-togs { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
#stage .sb-tog { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border: 2px solid var(--line); border-radius: 8px; background: var(--steel); font-weight: 700; font-size: 12px; letter-spacing: .08em; }
.sb-tog i { width: 38px; height: 20px; border-radius: 10px; background: var(--line); position: relative; } .sb-tog i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .12s; }
.sb-tog.on i { background: #4ad45a; } .sb-tog.on i::after { transform: translateX(18px); }
.sb-hlist li { padding: 8px 10px; border-radius: 8px; background: var(--steel); font-size: 12px; line-height: 1.5; color: var(--pale); } .sb-hlist b { color: var(--gold); }
.sb-result h2 { font-size: 28px; } .sb-result.win h2 { color: var(--gold); } .sb-result.lose h2 { color: #ff5a4d; }
.sb-bigstars .sb-stars i { width: 40px; height: 40px; }
.sb-stats li { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; background: var(--steel); font-size: 12px; } .sb-stats span { color: var(--dim); }
.sb-new { font-size: 12px; color: var(--pale); }
@media (prefers-reduced-motion: reduce) { #stage .sb-btn--alert, .sb-hp.is-low i { animation: none; } }

/* ---- desktop default: a wide 16:9 stage that fills the window (phones keep the tall stage + pad) ---- */
#sb-ui .sb-scr { scrollbar-width: thin; scrollbar-color: #3d4a61 transparent; }
#sb-ui .sb-scr::-webkit-scrollbar { width: 8px; } #sb-ui .sb-scr::-webkit-scrollbar-thumb { background: #3d4a61; border-radius: 4px; } #sb-ui .sb-scr::-webkit-scrollbar-track { background: transparent; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body[data-pip-frame] .game-wrap { max-width: min(1500px, 97vw); padding: .75rem 1rem 1rem; }
  body[data-pip-frame] .game-wrap .game-title { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin-bottom: .6rem; text-align: left; }
  body[data-pip-frame] .game-wrap .game-title h1 { font-size: 1.5rem; margin: 0; }
  body[data-pip-frame] .game-wrap .game-title p { margin: 0; }
  /* game first: the top ad well drops below the game so the whole stage sits centred in the window */
  body[data-pip-frame] { display: flex; flex-direction: column; }
  body[data-pip-frame] > .game-header { order: -3; } body[data-pip-frame] > .game-wrap { order: -2; width: 100%; } body[data-pip-frame] > .ad-well[data-ad-slot="leaderboard"] { order: -1; }
  body[data-pip-frame] .game-wrap .sb-bar, body[data-pip-frame] .game-wrap .sb-keysline { margin-top: .5rem; }
  #stage { width: min(100%, max(720px, calc((100vh - 222px) * 16 / 9))); aspect-ratio: 16 / 9; }
  #sb-ui { font-size: 15px; }
  #sb-ui .sb-scr { max-width: 780px; padding: 20px; }
}

/* ---- control card: on the title screen and over the first seconds of each level ---- */
.sb-ctl { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0d1017cc; font-size: 12px; color: var(--pale); }
.sb-ctl__k { display: flex; flex-direction: column; align-items: center; gap: 4px; } .sb-ctl__k b { font-weight: 600; color: var(--gold); font-size: 11px; }
.sb-ctl kbd { display: inline-block; min-width: 22px; padding: 2px 6px; margin: 0 1px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 5px; background: var(--plate); color: #fff; font: inherit; font-weight: 700; text-align: center; }
.sb-ctl__t { display: none; width: 100%; text-align: center; color: var(--gold); font-weight: 600; }
#stage.has-touch .sb-ctl__k { display: none; } #stage.has-touch .sb-ctl__t { display: block; }
.sb-ctlwrap { position: absolute; left: 0; right: 0; top: 3%; z-index: 3; display: flex; justify-content: center; padding: 0 8px; pointer-events: none; opacity: 0; transition: opacity .6s; }
.sb-ctlwrap.on { opacity: .95; }

/* ---- cyberpunk skin (2026-11-23): neon glow on HUD, logo, menus. Layout untouched. ---- */
#sb-hud { text-shadow: 0 0 calc(var(--u) * 2.4) rgba(53, 240, 255, .7), 0 calc(var(--u) * .6) 0 #05030c; letter-spacing: .04em; }
.sb-hp { background: #0a0616cc; border-color: #35f0ff; box-shadow: 0 0 calc(var(--u) * 3) rgba(53, 240, 255, .55); border-radius: calc(var(--u) * .8); transform: skewX(-12deg); }
.sb-hp i { background: linear-gradient(90deg, #ff2a6d, #ff7a3d); box-shadow: 0 0 calc(var(--u) * 4) #ff2a6d; }
.sb-hp span { transform: skewX(12deg); }
#sb-ui { background-color: #07050fee; background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 3px); }
#sb-ui[data-screen="title"] { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px), linear-gradient(#07050f88, #07050ff2 62%); }
#sb-ui[data-screen="pause"], #sb-ui[data-screen="levelup"] { background-color: #07050fd9; }
.sb-logo { transform: rotate(-3deg) skewX(-6deg); }
.sb-logo span { color: #fff; text-shadow: 0 0 6px #fff, 0 0 18px #ff2a6d, 0 0 42px #ff2a6d, 0 0 80px #ff2a6daa, 3px 3px 0 #2a0620; }
.sb-logo span + span { color: #eaffff; text-shadow: 0 0 6px #fff, 0 0 18px #35f0ff, 0 0 42px #35f0ff, 0 0 80px #35f0ffaa, 3px 3px 0 #06202a; }
#stage .sb-btn { border: 1.5px solid #35f0ff; border-radius: 3px; background: linear-gradient(#131028, #0a0818); color: #eaffff; box-shadow: 0 0 14px rgba(53, 240, 255, .35), inset 0 0 12px rgba(53, 240, 255, .12); text-shadow: 0 0 8px rgba(53, 240, 255, .8); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
#stage .sb-btn:hover { border-color: #ff2a6d; box-shadow: 0 0 18px rgba(255, 42, 109, .55), inset 0 0 14px rgba(255, 42, 109, .18); text-shadow: 0 0 8px rgba(255, 42, 109, .9); }
#stage .sb-btn:active { transform: translateY(2px); box-shadow: 0 0 8px rgba(53, 240, 255, .5); }
.sb-chip { border: 1px solid #35f0ff44; border-radius: 2px; background: #0d0a1ecc; }
.sb-ctl { border-color: #35f0ff66 !important; box-shadow: 0 0 18px rgba(53, 240, 255, .25); }

/* ---- feedback layer (2026-11-27): kill chain, hurt flash, result extras, streak line ---- */
.sb-chain { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); font-size: calc(var(--u) * 7); font-weight: 800; color: #ffe27a; letter-spacing: .06em; white-space: nowrap; pointer-events: none; text-shadow: 0 0 calc(var(--u) * 2.4) rgba(255, 42, 109, .8), 0 calc(var(--u) * .6) 0 #05030c; }
.sb-chain[hidden] { display: none; }
.sb-chain.is-big { color: #ff7ab0; font-size: calc(var(--u) * 9); }
.sb-chain.pop { animation: sb-pop .28s ease-out; }
.sb-hurt { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 calc(var(--u) * 24) calc(var(--u) * 4) rgba(255, 42, 109, .75); }
.sb-hurt.on { animation: sb-hurt .35s ease-out; }
@keyframes sb-pop { 0% { transform: translateX(-50%) scale(1.5); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes sb-hurt { 0% { opacity: 1; } 100% { opacity: 0; } }
.sb-streak { color: var(--gold); font-size: 13px; font-weight: 700; margin: 0 0 8px; text-align: center; }
.sb-hint { text-align: center; color: var(--gold); }
.sb-stats li.sb-hotrow b { color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .sb-chain.pop, .sb-hurt.on { animation: none; } }

/* ---------- shell full screen (third pass): no chrome, safe areas, controls clear of notch and home bar ---------- */
html.pip-immersive .sb-bar, html.pip-native .sb-bar, html.pip-immersive .sb-keysline, html.pip-native .sb-keysline,
html.pip-immersive .game-title, html.pip-native .game-title { display: none; }
html.pip-immersive #stage, html.pip-native #stage { overscroll-behavior: none; }
html.pip-immersive #sb-pad, html.pip-native #sb-pad, #stage:fullscreen #sb-pad {
  padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); }
html.pip-immersive #stage.is-wide #sb-pad, html.pip-native #stage.is-wide #sb-pad, #stage.is-wide:fullscreen #sb-pad {
  padding-left: max(3%, env(safe-area-inset-left)); padding-right: max(3%, env(safe-area-inset-right)); padding-bottom: max(4%, env(safe-area-inset-bottom)); }
html.pip-immersive #stage .sb-pause, html.pip-native #stage .sb-pause { right: max(calc(var(--u) * 3), env(safe-area-inset-right)); }
html.pip-immersive #stage .sb-b, html.pip-native #stage .sb-b { min-width: 44px; min-height: 44px; }
@media (orientation: landscape) and (max-height: 520px) {
  html.pip-immersive #stage.is-wide .sb-stick, html.pip-native #stage.is-wide .sb-stick { width: clamp(110px, 34vh, 150px); }
  html.pip-immersive #stage.is-wide .sb-btns, html.pip-native #stage.is-wide .sb-btns { width: clamp(120px, 38vh, 170px); }
}
