/* Silverball Skies. Portrait layout: banner slot, then menu (header, panel, tabs) or game (HUD, table, controls). */
:root {
  --banner-h: 60px;
  --bg: #0b1730;
  --surface: #14264a;
  --surface-2: #1d3460;
  --ink: #eaf3ff;
  --ink-soft: #9db6dc;
  --line: #2a4478;
  --accent: #ffd23f;
  --accent-ink: #2a1d00;
  --gold: #ffc940;
  --gold-d: #d9a21c;
  --m2: #8a9bb8;
  --bad: #ff7b6b;
  --good: #4fdc9c;
  --ph: #0f2040;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
body[data-theme='light'] {
  --bg: #e8f3ff;
  --surface: #ffffff;
  --surface-2: #d8e8fb;
  --ink: #10264a;
  --ink-soft: #5b7299;
  --line: #bcd2ef;
  --accent: #f2a900;
  --accent-ink: #2a1d00;
  --gold: #e8a91c;
  --gold-d: #b97d08;
  --m2: #8a9bb8;
  --bad: #c93a2a;
  --good: #1f9a6a;
  --ph: #d8e8fb;
  --shadow: 0 2px 10px rgba(20, 50, 100, 0.16);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; }

#app {
  position: fixed;
  inset: 0;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---- the one banner slot ---- */
.banner {
  flex: 0 0 var(--banner-h);
  height: var(--banner-h);
  margin: 0 0 6px;
  background: var(--ph);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.banner.collapsed { display: none; margin: 0; }
.banner-ph { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); opacity: 0.7; }
.banner.filled .banner-ph { display: none; }

.screen { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* ---- menu ---- */
.top { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 8px; }
.ttl { font-size: 22px; font-weight: 800; letter-spacing: 0.01em; }
.ttl span { color: var(--accent); }
.pill { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 700; }
.coin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, var(--gold) 55%, var(--gold-d)); box-shadow: inset 0 0 0 2px rgba(120, 80, 0, 0.35); vertical-align: -2px; margin-right: 4px; }
.pill .coin { margin: 0; }

.panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 14px 16px; -webkit-overflow-scrolling: touch; }
.panel h2 { font-size: 17px; margin: 18px 2px 6px; }
.panel h2:first-child { margin-top: 6px; }
.tagline, .note { color: var(--ink-soft); font-size: 13px; margin: 2px 2px 10px; line-height: 1.4; }
.note { text-align: center; margin-top: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; }
.row.slim { padding: 8px 12px; }
.rinfo { flex: 1; min-width: 0; }
.rinfo h3, .tinfo h3 { margin: 0 0 3px; font-size: 15px; }
.rinfo p, .tinfo p { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.35; }
.how p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.4; }
.how p:last-child { margin: 0; }

.tcard { display: flex; gap: 12px; align-items: stretch; cursor: pointer; border-width: 2px; }
.tcard.sel { border-color: var(--accent); }
.tcard.locked { opacity: 0.92; }
.swatch { flex: 0 0 66px; border-radius: 12px; background: linear-gradient(160deg, var(--s0), var(--s1)); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.tinfo { flex: 1; min-width: 0; }
.tmeta { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; font-size: 12px; color: var(--ink-soft); }
.stars i { font-style: normal; color: var(--line); font-size: 17px; margin-right: 1px; }
.stars i.on { color: var(--gold); }

.btn { border: 0; background: var(--surface-2); color: var(--ink); padding: 11px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; }
.btn:active { transform: translateY(1px); filter: brightness(0.92); }
.btn.go { background: linear-gradient(180deg, #ffe27a, var(--accent)); color: var(--accent-ink); }
.btn.big { width: 100%; font-size: 18px; padding: 15px; margin-top: 6px; border-radius: 14px; }
.btn.sm { min-width: 74px; padding: 8px 12px; min-height: 40px; }
.btn.buy { min-width: 86px; }
.btn.buy.can { background: linear-gradient(180deg, #ffe27a, var(--accent)); color: var(--accent-ink); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.unlock { margin-top: 8px; padding: 8px 12px; min-height: 38px; font-size: 13px; background: var(--accent); color: var(--accent-ink); }
.btn.unlock.dim { background: var(--surface-2); color: var(--ink-soft); }
.btn.danger { background: transparent; border: 1px solid var(--bad); color: var(--bad); margin-top: 16px; width: 100%; }

.pips { display: flex; gap: 3px; margin-top: 7px; flex-wrap: wrap; }
.pip { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.pip.on { background: var(--accent); }
.bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--good); border-radius: 4px; }

.gift { border-color: var(--accent); }
.awards { display: grid; grid-template-columns: 1fr; gap: 6px; }
.award { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; opacity: 0.55; }
.award svg { width: 26px; height: 26px; flex: 0 0 26px; filter: grayscale(1); }
.award span { flex: 1; }
.award b { color: var(--gold); font-size: 12px; }
.award.on { opacity: 1; border-color: var(--gold-d); }
.award.on svg { filter: none; }

.tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); }
.tabs button { position: relative; background: none; border: 0; padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-soft); cursor: pointer; }
.tabs button svg { width: 24px; height: 24px; fill: currentColor; }
.tabs button.active { color: var(--accent); }
.badge { position: absolute; top: 6px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); box-sizing: content-box; }

/* ---- game ---- */
.hud { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; padding: 2px 10px 6px; gap: 8px; }
.hl { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.hl small { color: var(--ink-soft); font-size: 12px; font-weight: 600; white-space: nowrap; }
/* narrow phones: the Heat chip plus a 7-digit score no longer wraps the ball counter */
@media (max-width: 400px) {
  .hl { gap: 5px; }
  .hl small { font-size: 11px; }
  .hl .chip { font-size: 11px; padding: 3px 7px; }
  .hs { font-size: 24px; }
}
@media (max-width: 400px) { .hs.long { font-size: 20px; } }
@media (max-width: 340px) { .hs { font-size: 20px; } .hs.long { font-size: 16px; } .hud { gap: 5px; padding: 2px 6px 6px; } }
.hs { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; text-align: center; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; }
.chip.gold { background: var(--gold); margin-bottom: 8px; }
.icon-btn { justify-self: end; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: var(--ink); }

.stage { flex: 1 1 auto; min-height: 0; position: relative; background: #050b17; border-radius: 12px; margin: 0 6px; overflow: hidden; touch-action: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.tag { position: absolute; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; pointer-events: none; }
.tag.mb { top: 8px; left: 8px; padding: 4px 9px; border-radius: 8px; background: #ff4fa3; color: #fff; animation: pulse 0.8s infinite alternate; }
.tag.saver { top: 0; left: 0; right: 0; height: 4px; background: rgba(255, 255, 255, 0.12); }
.tag.saver i { display: block; height: 100%; background: #4fdc9c; width: 0; }
.msg { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(255, 210, 63, 0.8); pointer-events: none; animation: pop 0.35s ease-out; padding: 0 12px; }
.bonus { position: absolute; left: 12%; right: 12%; top: 28%; background: rgba(8, 18, 40, 0.88); border: 2px solid var(--accent); border-radius: 16px; padding: 14px; text-align: center; pointer-events: none; animation: pop 0.3s ease-out; }
.bonus h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent); }
.bonus p { margin: 0 0 4px; color: #cfe0ff; }
.bonus b { font-size: 26px; color: #fff; }
.chargebar { position: absolute; right: 4px; bottom: 6%; width: 8px; height: 38%; border-radius: 4px; background: rgba(255, 255, 255, 0.15); overflow: hidden; display: flex; align-items: flex-end; pointer-events: none; }
.chargebar i { display: block; width: 100%; background: linear-gradient(0deg, #4fdc9c, #ffd23f, #ff7a59); height: 0; }

.ctl { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 8px 6px 6px; height: 80px; }
.cmid { display: flex; flex-direction: column; gap: 6px; }
.cbtn { flex: 1; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--ink); font-weight: 800; font-size: 16px; letter-spacing: 0.04em; cursor: pointer; touch-action: none; }
.cbtn.flip { font-size: 28px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); }
.cbtn.flip:active { background: var(--accent); color: var(--accent-ink); }
.cbtn.launch { background: linear-gradient(180deg, #ffe27a, var(--accent)); color: var(--accent-ink); }
.cbtn.launch.hot { animation: pulse 0.7s infinite alternate; }
.cbtn.nudge { font-size: 13px; }
.cbtn:active { filter: brightness(0.9); }

/* ---- toast / modal ---- */
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow); font-size: 13px; font-weight: 700; z-index: 30; max-width: 92%; text-align: center; }
.toast.gold { border-color: var(--gold); color: var(--gold); }
.modal { position: absolute; inset: 0; background: rgba(3, 8, 20, 0.66); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 20; }
.modal-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); max-height: 92%; overflow-y: auto; }
.modal-card h2 { margin: 0 0 12px; font-size: 20px; text-align: center; }
.modal-card p { line-height: 1.4; }
.mrow { display: flex; gap: 10px; margin-top: 14px; }
.mrow .btn { flex: 1; }
.mcol { display: flex; flex-direction: column; gap: 10px; }
.over { text-align: center; }
.over .big { font-size: 40px; font-weight: 900; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.orow { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.orow span { color: var(--ink-soft); }

@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes pulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }

@media (max-height: 560px) {
  .hs { font-size: 22px; }
  .ctl { height: 60px; }
  .banner { margin-bottom: 2px; }
}
@media (min-width: 520px) and (min-height: 760px) {
  .panel { padding: 6px 22px 18px; }
}

/* big tables: difficulty dots and heat chip */
.tdiff { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tdiff small { font-size: 11px; opacity: 0.75; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.22); display: block; }
.dots i.on { background: #ff8a3d; }
.chip.heat { background: #ff6a3d; color: #fff; margin-left: 4px; }

/* ---- home screen (2nd edition) ---- */
.topr { display: flex; align-items: center; gap: 8px; }
.icon-btn.mini { width: 36px; height: 36px; border-radius: 50%; position: relative; }
.icon-btn.mini svg { width: 18px; height: 18px; }
.icon-btn.off svg { opacity: 0.45; }
.icon-btn.off::after { content: ''; position: absolute; left: 7px; right: 7px; top: 50%; height: 2px; background: var(--bad); transform: rotate(-40deg); border-radius: 2px; }
#menu[data-tab='play'] .ttl { visibility: hidden; }

.hero { position: relative; height: 176px; margin: 0 -14px 12px; overflow: hidden; border-radius: 0 0 26px 26px;
  background: linear-gradient(180deg, rgba(8, 18, 40, 0.15) 0%, rgba(8, 18, 40, 0.55) 100%), var(--art) center 35% / cover, linear-gradient(160deg, var(--s0), var(--s1));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.18), transparent 60%); pointer-events: none; }
.hero-txt { position: absolute; left: 18px; right: 18px; top: 20px; z-index: 3; }
.hero-txt h1 { margin: 0; font-size: 31px; line-height: 1.05; font-weight: 900; letter-spacing: 0.01em; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 0 22px rgba(255, 255, 255, 0.35); }
.hero-txt h1 span { background: linear-gradient(180deg, #fff2a8, #ffc940 70%, #f29b1c); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35)); }
.hero-txt p { margin: 6px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); letter-spacing: 0.04em; }
.cloud { position: absolute; z-index: 1; height: 26px; width: 90px; border-radius: 40px; background: rgba(255, 255, 255, 0.55); filter: blur(1px); opacity: 0.8; animation: drift 38s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 42px; height: 42px; left: 14px; top: -20px; }
.cloud::after { width: 32px; height: 32px; left: 46px; top: -12px; }
.cloud.c1 { top: 92px; left: -110px; }
.cloud.c2 { top: 52px; left: -110px; animation-duration: 52s; animation-delay: -20s; transform: scale(0.7); opacity: 0.55; }
.cloud.c3 { top: 118px; left: -110px; animation-duration: 44s; animation-delay: -33s; transform: scale(1.15); opacity: 0.45; }
.hero { --hh: 176px; }
.ball { position: absolute; z-index: 2; right: 64px; top: var(--hh); width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff, #dfe8f5 35%, #8c9db8 70%, #56637c); box-shadow: 0 0 14px rgba(255, 255, 255, 0.65); animation: fly 11s linear infinite; }
.np { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(6, 14, 32, 0.62); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); }
.np svg { width: 14px; height: 14px; fill: var(--accent); flex: 0 0 14px; }
.np span { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np b { font-size: 9px; opacity: 0.7; letter-spacing: -1px; }
.np.off svg { fill: #8a9bb8; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(760px); } }
/* launched from below the banner, drifts up past the bumpers, leaves through the top, then starts over from the bottom */
@keyframes fly {
  0% { transform: translate(24px, 0); }
  30% { transform: translate(-6px, calc(var(--hh) * -0.45)); }
  58% { transform: translate(16px, calc(var(--hh) * -0.78)); }
  100% { transform: translate(-20px, calc(var(--hh) * -1 - 40px)); }
}

.stats { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 6px; text-align: center; min-width: 0; }
.stats b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats b em { font-style: normal; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.stats small { display: block; margin-top: 2px; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.card.alert { border-color: var(--accent); background: linear-gradient(90deg, rgba(255, 210, 63, 0.14), var(--surface) 70%); }
.card.alert h3 { font-size: 14px; }

.rail { display: flex; gap: 10px; margin: 0 -14px 12px; padding: 4px 14px 8px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .tcard { flex: 0 0 96px; position: relative; padding: 0; margin: 0; border: 2px solid var(--line); border-radius: 16px; overflow: hidden; scroll-snap-align: center; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; background: var(--surface); transition: transform 0.15s, border-color 0.15s; }
.rail .tcard.sel { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 0 0 2px rgba(255, 210, 63, 0.35), var(--shadow); }
.rail .tcard.locked .pv { filter: saturate(0.4) brightness(0.62); }
.tcard .pv { position: relative; height: 128px; background: var(--art) center / contain no-repeat, linear-gradient(160deg, var(--s0), var(--s1)); }
.tcard .cap { flex: 1; padding: 5px 7px 6px; background: var(--surface); display: flex; flex-direction: column; justify-content: space-between; gap: 2px; min-height: 52px; }
.tcard .no { position: absolute; top: 5px; left: 5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: rgba(6, 14, 32, 0.78); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tcard .lk { position: absolute; top: 4px; right: 5px; width: 22px; height: 22px; fill: #fff; color: #fff; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)); }
.tcard .nm { color: var(--ink); font-size: 12px; font-weight: 800; line-height: 1.12; }
.tcard .sr { color: var(--ink); font-size: 12px; font-weight: 800; display: flex; align-items: center; }
.tcard .sr .stars i { font-size: 14px; }
.tcard .sr .coin { width: 12px; height: 12px; margin-right: 4px; }

.detail { padding: 14px; }
.dhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dhead h3 { margin: 0; font-size: 18px; }
.detail p { margin: 6px 0 4px; font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.bar.gold i { background: linear-gradient(90deg, #ffd23f, #ff9a3d); }
.detail .tmeta b { color: var(--ink); }
.cta { position: sticky; bottom: -16px; z-index: 5; margin: 0 -14px; padding: 12px 14px 16px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--bg) 38%); }
.cta .btn.big { margin: 0; box-shadow: 0 6px 18px rgba(255, 190, 40, 0.35); letter-spacing: 0.04em; }
.cta .btn.dim { background: var(--surface-2); color: var(--ink-soft); box-shadow: none; }
.btn .ib { width: 18px; height: 18px; fill: currentColor; color: inherit; vertical-align: -3px; margin-right: 8px; }
.btn.pulse { animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 18px rgba(255, 190, 40, 0.3); } 50% { box-shadow: 0 6px 28px rgba(255, 190, 40, 0.65); } }
input.vol { flex: 0 0 46%; accent-color: var(--accent); height: 28px; }

@media (max-height: 600px) {
  .bump.b2, .bump.b3 { display: none; }
  .hero { height: 128px; --hh: 128px; margin-bottom: 8px; }
  .hero-txt { top: 12px; }
  .hero-txt h1 { font-size: 24px; }
  .hero-txt p { display: none; }
  .rail .tcard { flex-basis: 84px; }
  .tcard .pv { height: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  .cloud, .ball, .btn.pulse { animation: none; }
}

.spark { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle 2px at 12% 22%, #fff, transparent), radial-gradient(circle 1.5px at 30% 62%, #fff, transparent), radial-gradient(circle 2px at 52% 18%, #fff, transparent), radial-gradient(circle 1.5px at 74% 74%, #fff, transparent), radial-gradient(circle 2px at 90% 40%, #fff, transparent), radial-gradient(circle 1.5px at 8% 80%, #fff, transparent);
  animation: twinkle 3.2s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 0.95; } }
.bump { position: absolute; z-index: 2; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--bp) 9% 55%, rgba(0, 0, 0, 0.35) 100%); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55), 0 0 18px var(--bp); animation: bumpPulse 1.7s ease-in-out infinite; }
.bump.b1 { width: 38px; height: 38px; right: 22px; top: 16px; }
.bump.b2 { width: 28px; height: 28px; right: 78px; top: 64px; animation-delay: -0.55s; }
.bump.b3 { width: 32px; height: 32px; right: 18px; top: 76px; animation-delay: -1.1s; }
@keyframes bumpPulse { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.75), 0 0 26px var(--bp); } }
@media (max-width: 340px) { .bump { display: none; } }
@media (prefers-reduced-motion: reduce) { .spark, .bump { animation: none; } }
/* balls and rebirth */
.bp { display: inline-block; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; }
.bp.lg { flex-basis: 54px; width: 54px; height: 54px; }
.bcard .bp { margin-right: 12px; }
.bcard.locked .bp { filter: grayscale(0.85) brightness(0.7); }
.bcard.sel { border-color: var(--accent); }
.bcard .chip.mx { font-size: 11px; padding: 2px 8px; margin-left: 4px; vertical-align: middle; }
.bcard .ul { color: var(--ink-soft); font-size: 12px; margin: 2px 0 0; }
.bcard .btn.buy { min-width: 74px; }
.ballsum { display: flex; align-items: center; gap: 14px; border-color: var(--accent); }
.ballcard .bp { margin-right: 10px; }
.rb { border-color: var(--gold-d); margin-top: 14px; }
.rb h3 { margin: 0 0 4px; color: var(--gold); }
.rb p { margin: 0 0 6px; font-size: 13px; color: var(--ink-soft); }
.rb .rbn { color: var(--ink); }
.rb .btn.big { margin-top: 8px; }
/* in-game score ticks up a little each time it changes */
.hs.tick { animation: scoreTick 0.18s ease-out; }
@keyframes scoreTick { 0% { transform: scale(1.14); color: var(--accent); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hs.tick { animation: none; } }
