.bounce-game { max-width:640px; margin:20px auto 0; color:var(--ink); }
.bounce-game [hidden] { display:none !important; }
.bounce-level-title { margin:0 0 10px; font-size:20px; line-height:1.5; text-align:left; }
.bounce-count { margin:10px 0 18px; font-size:15px; font-weight:650; font-variant-numeric:tabular-nums; }
.bounce-track { max-width:100%; overflow-x:auto; overflow-y:hidden; padding:12px 4px; border:2px solid var(--line); border-radius:16px; background:var(--accent-soft); overscroll-behavior-x:contain; scrollbar-width:thin; }
.bounce-track:focus-visible { outline:3px solid var(--purple); outline-offset:3px; }
.bounce-line { display:grid; grid-template-columns:repeat(var(--bounce-count),40px); width:max-content; min-width:100%; min-height:190px; justify-content:center; }
.bounce-cell { position:relative; width:40px; height:190px; border-bottom:8px solid color-mix(in srgb,var(--purple) 25%,var(--surface)); }
.bounce-cell::after { position:absolute; content:""; left:0; right:0; bottom:28px; border-top:1px solid var(--control-ink); opacity:.3; }
.bounce-value { position:absolute; inset:auto 0 2px; text-align:center; font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; }
.bounce-platform { position:absolute; left:3px; right:3px; bottom:29px; height:13px; border:2px solid var(--control-ink); border-radius:5px; background:var(--surface); z-index:1; }
.bounce-station { position:absolute; left:6px; right:6px; bottom:48px; padding:2px 0; border-radius:5px; background:var(--surface); color:var(--control-ink); font-size:16px; line-height:22px; }
.bounce-star { position:absolute; left:0; right:0; top:8px; font-size:23px; line-height:28px; color:var(--control-ink); }
.bounce-star[data-collected="true"], .bounce-star.is-collected { opacity:.5; }
.bounce-friend { position:absolute; left:6px; bottom:82px; width:28px; height:34px; border:2px solid var(--control-ink); border-radius:8px 8px 5px 5px; background:var(--purple); z-index:2; }
.bounce-eyes { position:absolute; top:7px; left:3px; display:flex; gap:4px; }
.bounce-eyes i { width:7px; height:9px; border:2px solid #fff; border-radius:50%; background:#30253d; }
.bounce-mouth { position:absolute; left:8px; top:21px; width:8px; height:4px; border:1px solid #30253d; border-top:0; border-radius:0 0 5px 5px; }
.bounce-spring { position:absolute; top:32px; left:6px; width:13px; height:20px; border-left:3px dashed var(--control-ink); border-right:3px dashed var(--control-ink); }
.bounce-equation { min-height:36px; margin:18px 0; font-size:25px; line-height:1.5; font-weight:750; font-variant-numeric:tabular-nums; }
.bounce-tools { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.bounce-power { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-width:70px; min-height:70px; padding:10px; border:2px solid var(--line); border-radius:12px; background:var(--surface); color:var(--ink); font:inherit; font-weight:700; cursor:pointer; touch-action:manipulation; }
.bounce-power[aria-pressed="true"] { border-color:var(--control-ink); background:var(--accent-soft); }
.bounce-power:disabled { cursor:default; opacity:.65; }
.bounce-power .bounce-step-units { display:flex; gap:3px; }
.bounce-unit { display:block; width:10px; height:10px; border:1px solid var(--control-ink); border-radius:2px; background:var(--purple); }
.bounce-help { margin:14px 0; font-size:14px; line-height:1.6; color:var(--control-ink); }
.bounce-status { min-height:26px; margin:14px 0; font-size:15px; font-weight:600; line-height:1.6; color:var(--control-ink); }
.bounce-controls { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
@media (max-width:480px) {
  .bounce-level-title { font-size:18px; }
  .bounce-tools { gap:8px; }
  .bounce-power { min-width:66px; font-size:14px; }
  .bounce-game .game-button { padding:10px 12px; }
}
