/* ============================================================
   BRICK STACKER — night construction / skyline theme
   ============================================================ */
.bs-page {
  --bs-bg: #070B14;
  --bs-text: #F4F1EA;
  --bs-sub: rgba(244, 241, 234, 0.55);
  --bs-line: rgba(255, 255, 255, 0.08);
  --bs-line-2: rgba(255, 255, 255, 0.06);
  --bs-gold: #FFC857;
  --bs-gold-2: #F0A62E;
  --bs-coral: #FF6B57;
  --bs-cyan: #59D8FF;
  --bs-display: var(--font-display);

  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bs-bg);
  color: var(--bs-text);
  z-index: 100;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ------------------------------ header ------------------------------ */
.bs-header {
  display: flex; align-items: center; gap: 10px;
  padding: calc(9px + env(safe-area-inset-top, 0px)) 14px 5px;
  z-index: 12;
  flex-shrink: 0;
}
.bs-icon-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--bs-line);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(244, 241, 234, 0.86);
  cursor: pointer;
  transition: transform .12s ease, background .18s ease;
}
.bs-icon-btn:active { transform: scale(.92); background: rgba(255, 255, 255, 0.1); }
.bs-icon-btn svg { width: 17px; height: 17px; }
.bs-header-actions { display: flex; gap: 7px; flex-shrink: 0; }

.bs-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.bs-brand-mark {
  width: 27px; height: 27px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 2px;
}
.bs-brand-mark .bm {
  display: block; height: 5px; border-radius: 1.5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.bm.b1 { width: 26px; background: #E85D4A; }
.bm.b2 { width: 20px; background: #F4C542; }
.bm.b3 { width: 14px; background: #3D8BFF; }
.bs-brand-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bs-brand-txt b {
  font-family: var(--bs-display);
  font-size: 12px; font-weight: 800; letter-spacing: 1.9px;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-brand-txt em {
  font-style: normal; font-size: 7.5px; font-weight: 800;
  letter-spacing: 1.9px; color: rgba(244, 241, 234, 0.38);
}

/* -------------------------------- HUD ------------------------------- */
.bs-hud {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  margin: 4px 14px 7px;
  border-radius: 16px;
  border: 1px solid var(--bs-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  flex-shrink: 0;
  z-index: 11;
}
.bs-hud-cell { padding: 7px 12px 8px; position: relative; }
.bs-hud-cell + .bs-hud-cell { border-left: 1px solid var(--bs-line); }
.bs-hud-cell.coin .bs-hud-val { color: var(--bs-gold); font-size: 18px; }
.bs-hud-label {
  display: block; margin-bottom: 1px;
  font-size: 7.5px; font-weight: 800; letter-spacing: 1.6px;
  color: rgba(244, 241, 234, 0.42);
}
.bs-hud-line { display: flex; align-items: center; gap: 5px; }
.bs-hud-val {
  display: inline-block;
  font-size: 20px; font-weight: 800; line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.bs-hud-val.gold { color: var(--bs-gold); }
.bs-hud-val.bs-pop { animation: bs-num-pop .3s cubic-bezier(.2,1.4,.4,1); }
@keyframes bs-num-pop {
  0% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* hide game chrome while the menu is open */
.bs-page.bs-idle-mode .bs-header,
.bs-page.bs-idle-mode .bs-hud { display: none; }

/* ------------------------------- canvas ----------------------------- */
.bs-main { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.bs-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* overlaid gameplay chrome */
.bs-tap-hint {
  position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(7px);
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(8, 13, 24, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 9px; font-weight: 800; letter-spacing: 1.8px;
  color: rgba(244, 241, 234, 0.82);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 6;
}
.bs-tap-hint.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.bs-tap-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--bs-gold);
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.9);
  animation: bs-dot 1.2s ease-in-out infinite;
}
@keyframes bs-dot {
  0%, 100% { transform: scale(.7); opacity: .55; }
  50% { transform: scale(1.15); opacity: 1; }
}

.bs-combo {
  position: absolute; left: 50%; top: 10px;
  transform: translateX(-50%) translateY(-8px) scale(.9);
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 128, 70, 0.22), rgba(255, 90, 64, 0.07));
  border: 1px solid rgba(255, 148, 96, 0.34);
  color: #FFB46B;
  font-size: 8.5px; font-weight: 800; letter-spacing: 1.4px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 6;
}
.bs-combo.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.bs-combo b { font-size: 13px; color: #fff; }
.bs-combo .ic svg { width: 13px; height: 13px; }

.bs-best-chip {
  position: absolute; right: 12px; top: 9px;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255, 200, 87, 0.09);
  border: 1px solid rgba(255, 200, 87, 0.22);
  color: #FFD98A;
  font-size: 8.5px; font-weight: 800; letter-spacing: 1.2px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 5;
}
.bs-best-chip.show { opacity: 1; }
.bs-best-chip .ic svg { width: 11px; height: 11px; }

.bs-milestone {
  position: absolute; left: 0; right: 0; top: 21%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: 0; transform: translateY(10px) scale(.94);
  pointer-events: none; z-index: 7;
  transition: opacity .2s ease, transform .2s ease;
}
.bs-milestone.show {
  opacity: 1; transform: translateY(0) scale(1);
  animation: bs-mile .45s cubic-bezier(.2,1.2,.4,1);
}
.bs-milestone b {
  font-family: var(--bs-display);
  font-size: 34px; font-weight: 800; line-height: 1;
  color: #FFD166;
  text-shadow: 0 0 28px rgba(255, 209, 102, 0.45);
}
.bs-milestone span {
  font-size: 9.5px; font-weight: 800; letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.7);
}
@keyframes bs-mile {
  0% { transform: translateY(16px) scale(.9); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ------------------------------ overlays ---------------------------- */
.bs-overlay {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.bs-overlay.bs-visible { opacity: 1; pointer-events: auto; }
.bs-overlay[data-mode="idle"] {
  align-items: flex-end; padding: 0;
  background: linear-gradient(180deg,
    rgba(7, 11, 20, 0.08) 0%,
    rgba(7, 11, 20, 0.22) 26%,
    rgba(7, 11, 20, 0.80) 58%,
    #070B14 100%);
}
.bs-overlay[data-mode="count"] {
  background: radial-gradient(80% 55% at 50% 40%,
    rgba(7, 11, 20, 0.10), rgba(7, 11, 20, 0.50));
  padding: 0;
}
.bs-overlay[data-mode="pause"],
.bs-overlay[data-mode="result"],
.bs-overlay[data-mode="loading"] {
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.bs-overlay[data-mode="result"] {
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.bs-overlay[data-mode="result"] .bs-result {
  min-height: 100%;
  align-items: center;
  padding: 6px 0;
}

/* shared bits */
.bs-coin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
  background: radial-gradient(circle at 32% 30%, #FFE7A8, #F5B93E 70%);
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.45), inset 0 -1px 2px rgba(120, 60, 0, 0.35);
}
.bs-coin-dot.lg { width: 24px; height: 24px; }

/* ------------------------------- idle ------------------------------- */
.bs-sheet {
  position: relative;
  width: 100%; max-height: 74vh;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 28px 28px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(16, 26, 46, 0.97), rgba(8, 13, 24, 0.995));
  box-shadow: 0 -26px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: bs-sheet-in .38s cubic-bezier(.2, .9, .3, 1);
}
.bs-sheet::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 190px;
  background: radial-gradient(130% 100% at 50% 0%, rgba(255, 200, 87, 0.10), transparent 72%);
  pointer-events: none;
}
.bs-sheet > * { position: relative; z-index: 1; }
@keyframes bs-sheet-in {
  0% { transform: translateY(38px); opacity: .4; }
  100% { transform: translateY(0); opacity: 1; }
}
.bs-sheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--bs-line);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 241, 234, 0.75);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
  transition: transform .12s ease, background .18s ease;
}
.bs-sheet-close:active { transform: scale(.9); background: rgba(255, 255, 255, 0.12); }
.bs-sheet-close svg { width: 15px; height: 15px; }

.bs-kicker {
  display: flex; align-items: center; gap: 7px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 2.4px;
  color: rgba(244, 241, 234, 0.45);
  margin-bottom: 14px; padding-right: 40px;
}
.bs-kicker-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--bs-gold);
  box-shadow: 0 0 8px rgba(255, 200, 87, 0.8);
}

.bs-lockup { display: flex; align-items: center; gap: 14px; }
.bs-logo {
  width: 66px; height: 66px; flex-shrink: 0;
  border-radius: 18px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 3px;
  padding-bottom: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.bs-logo .bl {
  display: block; height: 11px; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.35);
}
.bl.b1 { width: 44px; background: #E85D4A; }
.bl.b2 { width: 35px; background: #F4C542; }
.bl.b3 { width: 26px; background: #3D8BFF; }

.bs-lockup-txt { min-width: 0; }
.bs-title {
  margin: 0;
  font-family: var(--bs-display);
  font-size: 29px; font-weight: 800; line-height: 1.02;
  letter-spacing: 0.2px;
  color: #fff;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.4);
}
.bs-tagline {
  margin: 5px 0 0;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  color: var(--bs-sub);
}

.bs-statgrid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; margin: 15px 0 14px;
}
.bs-stat {
  padding: 9px 8px 8px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.033);
  border: 1px solid var(--bs-line-2);
  text-align: center;
}
.bs-stat span {
  display: block;
  font-size: 7.5px; font-weight: 800; letter-spacing: 1.1px;
  color: rgba(244, 241, 234, 0.4);
  margin-bottom: 3px;
}
.bs-stat b {
  display: block;
  font-size: 19px; font-weight: 800; line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.bs-stat:first-child b { color: var(--bs-gold); }
.bs-stat i {
  display: block; font-style: normal;
  font-size: 8px; font-weight: 700; letter-spacing: .5px;
  color: rgba(244, 241, 234, 0.36);
  margin-top: 2px;
}

.bs-how { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.bs-how-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.bs-how-num {
  width: 23px; height: 23px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255, 200, 87, 0.11);
  border: 1px solid rgba(255, 200, 87, 0.24);
  color: var(--bs-gold);
  font-size: 10.5px; font-weight: 800;
}
.bs-how-txt { min-width: 0; }
.bs-how-txt strong {
  display: block; font-size: 11.5px; font-weight: 800;
  color: #fff; letter-spacing: .1px;
}
.bs-how-txt em {
  display: block; font-style: normal;
  font-size: 10px; line-height: 1.35;
  color: rgba(244, 241, 234, 0.45);
  margin-top: 1px;
}

.bs-wallet {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 13px; margin-bottom: 9px;
  border-radius: 13px;
  border: 1px solid var(--bs-line);
  background: rgba(255, 255, 255, 0.028);
  font-size: 10px; color: var(--bs-sub);
}
.bs-wallet-left { display: flex; align-items: center; gap: 7px; }
.bs-wallet-left b {
  font-size: 15px; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums;
}
.bs-wallet-left span { font-size: 9.5px; letter-spacing: .4px; }
.bs-wallet-right { display: flex; align-items: center; gap: 5px; }
.bs-wallet-right span { font-size: 8px; font-weight: 800; letter-spacing: 1.4px; }
.bs-wallet-right b { font-size: 13px; font-weight: 800; color: var(--bs-gold); }
.bs-wallet-warn {
  margin: -2px 0 8px;
  text-align: center;
  font-size: 10px; font-weight: 700;
  color: #FF9A8A;
}

.bs-cta {
  position: relative;
  width: 100%; height: 54px;
  border: none; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #FFD166, #F0A62E);
  color: #241503;
  font-family: var(--bs-display);
  font-size: 13.5px; font-weight: 800; letter-spacing: 1.7px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(240, 166, 46, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform .12s ease, box-shadow .2s ease;
}
.bs-cta:active { transform: scale(.985); }
.bs-cta[disabled] {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--bs-line);
  color: rgba(244, 241, 234, 0.42);
  box-shadow: none;
}
.bs-cta-main { display: flex; align-items: center; gap: 8px; }
.bs-cta-main .ic svg { width: 17px; height: 17px; }
.bs-cta-cost {
  position: absolute; right: 15px;
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 800;
  color: rgba(36, 21, 3, 0.68);
}
.bs-cta-cost .bs-coin-dot { width: 13px; height: 13px; }

.bs-sheet-note {
  margin-top: 8px;
  text-align: center;
  font-size: 9px; font-weight: 600; letter-spacing: .3px;
  color: rgba(244, 241, 234, 0.34);
}
.bs-sheet-error {
  max-width: 380px; border-radius: 24px;
  padding-top: 26px; padding-bottom: 24px;
  display: flex; flex-direction: column; align-items: center;
  gap: 6px;
}
.bs-sheet-error .bs-kicker { margin-bottom: 2px; }
.bs-sheet-error .bs-tagline { margin-bottom: 14px; text-align: center; }

/* ----------------------------- countdown ---------------------------- */
.bs-count {
  position: absolute; left: 0; right: 0; top: 24%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.bs-count-ring {
  width: 112px; height: 112px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(255, 209, 102, 0.22), rgba(255, 209, 102, 0.03) 68%);
  border: 2px solid rgba(255, 209, 102, 0.62);
  box-shadow: 0 0 42px rgba(255, 209, 102, 0.22), inset 0 0 26px rgba(255, 209, 102, 0.12);
  animation: bs-count-in .62s cubic-bezier(.2, 1.1, .4, 1);
}
.bs-count-ring span {
  font-family: var(--bs-display);
  font-size: 52px; font-weight: 800; line-height: 1;
  color: #FFE3A6;
}
.bs-count p {
  margin: 0;
  font-size: 10.5px; font-weight: 800; letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.72);
}
.bs-count em {
  font-style: normal;
  font-size: 9.5px; font-weight: 700; letter-spacing: 1.6px;
  color: rgba(255, 255, 255, 0.4);
}
@keyframes bs-count-in {
  0% { transform: scale(1.35); opacity: 0; }
  45% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ------------------------------- pause ------------------------------ */
.bs-pause-card {
  width: 100%; max-width: 318px;
  padding: 22px 20px 18px;
  border-radius: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  background: linear-gradient(168deg, rgba(20, 31, 54, 0.98), rgba(9, 15, 27, 0.995));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: bs-card-in .3s cubic-bezier(.2, .9, .3, 1);
}
.bs-pause-kicker {
  display: flex; align-items: center; gap: 6px;
  font-size: 8px; font-weight: 800; letter-spacing: 2.3px;
  color: rgba(244, 241, 234, 0.45);
}
.bs-pause-title {
  margin: 0;
  font-family: var(--bs-display);
  font-size: 22px; font-weight: 800; letter-spacing: .2px;
  color: #fff;
}
.bs-pause-sub {
  margin: -3px 0 5px;
  font-size: 10.5px; color: rgba(244, 241, 234, 0.45);
  text-align: center;
}
.bs-pause-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; width: 100%; margin-bottom: 4px;
}
.bs-pause-stats div {
  padding: 8px; border-radius: 12px; text-align: center;
  background: rgba(255, 255, 255, 0.033);
  border: 1px solid var(--bs-line-2);
}
.bs-pause-stats span {
  display: block;
  font-size: 7.5px; font-weight: 800; letter-spacing: 1.4px;
  color: rgba(244, 241, 234, 0.4); margin-bottom: 1px;
}
.bs-pause-stats b { font-size: 19px; font-weight: 800; color: #fff; }
.bs-pause-stats b.gold { color: var(--bs-gold); }
.bs-pause-note {
  font-size: 8.5px; letter-spacing: .3px;
  color: rgba(244, 241, 234, 0.3);
}

/* ------------------------------ buttons ----------------------------- */
.bs-btn {
  width: 100%; height: 48px;
  border: 1px solid transparent;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--bs-display);
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.8px;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease;
}
.bs-btn:active { transform: scale(.985); }
.bs-btn .ic svg { width: 15px; height: 15px; }
.bs-btn-primary {
  background: linear-gradient(180deg, #FFD166, #F0A62E);
  color: #241503;
  box-shadow: 0 10px 22px rgba(240, 166, 46, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.bs-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--bs-line);
  color: rgba(244, 241, 234, 0.78);
}
.bs-btn-ghost.bs-btn-danger {
  color: #FF9A8A;
  border-color: rgba(255, 107, 87, 0.24);
  background: rgba(255, 107, 87, 0.05);
}

/* ------------------------------ loading ----------------------------- */
.bs-loading {
  display: flex; flex-direction: column; align-items: center; gap: 15px;
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: rgba(244, 241, 234, 0.55);
  text-transform: uppercase;
}
.bs-loading p { margin: 0; }
.bs-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--bs-gold);
  animation: bs-spin .8s linear infinite;
}
@keyframes bs-spin { to { transform: rotate(360deg); } }

/* ------------------------------- result ----------------------------- */
.bs-result { width: 100%; display: flex; align-items: center; justify-content: center; }
.bs-res-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 338px;
  padding: 20px 20px 18px;
  border-radius: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: linear-gradient(165deg, rgba(21, 33, 57, 0.985), rgba(8, 14, 26, 0.995));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.66), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: bs-card-in .35s cubic-bezier(.2, .9, .3, 1);
}
.bs-res-card.is-best {
  border-color: rgba(255, 200, 87, 0.42);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.66),
              0 0 48px rgba(255, 200, 87, 0.13),
              inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
@keyframes bs-card-in {
  0% { transform: translateY(24px) scale(.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.bs-res-kicker {
  font-size: 8px; font-weight: 800; letter-spacing: 2.6px;
  color: rgba(244, 241, 234, 0.4);
}
.bs-res-medal {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(89, 216, 255, 0.16), rgba(89, 216, 255, 0.02));
  border: 1px solid rgba(89, 216, 255, 0.28);
  color: #9FE7FF;
  margin-top: 2px;
}
.bs-res-medal.is-best {
  background: radial-gradient(circle at 35% 30%, rgba(255, 209, 102, 0.26), rgba(255, 209, 102, 0.04));
  border-color: rgba(255, 209, 102, 0.48);
  color: #FFD166;
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.18);
}
.bs-res-medal .ic svg { width: 25px; height: 25px; }
.bs-res-rank {
  font-family: var(--bs-display);
  font-size: 13.5px; font-weight: 800; letter-spacing: 1.5px;
  color: #fff; text-align: center;
}
.bs-res-height { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.bs-res-height b {
  font-family: var(--bs-display);
  font-size: 58px; font-weight: 800; letter-spacing: -1.5px;
  color: #fff;
}
.bs-res-height i {
  font-style: normal;
  font-size: 8.5px; font-weight: 800; letter-spacing: 3px;
  color: rgba(244, 241, 234, 0.42);
  margin-top: 1px;
}
.bs-res-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; width: 100%; margin: 5px 0 2px;
}
.bs-res-stat {
  padding: 7px 4px; border-radius: 12px; text-align: center;
  background: rgba(255, 255, 255, 0.033);
  border: 1px solid rgba(255, 255, 255, 0.055);
}
.bs-res-stat span {
  display: block;
  font-size: 7px; font-weight: 800; letter-spacing: 1.1px;
  color: rgba(244, 241, 234, 0.4);
  margin-bottom: 2px;
}
.bs-res-stat b { font-size: 14.5px; font-weight: 800; color: #fff; }
.bs-res-coins {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 13px;
  border-radius: 14px;
  background: rgba(255, 200, 87, 0.07);
  border: 1px solid rgba(255, 200, 87, 0.17);
}
.bs-res-coins-txt b {
  display: block;
  font-family: var(--bs-display);
  font-size: 21px; font-weight: 800; line-height: 1;
  color: #FFD166;
}
.bs-res-coins-txt span {
  display: block;
  font-size: 8.5px; font-weight: 700; letter-spacing: .5px;
  color: rgba(244, 241, 234, 0.45);
  margin-top: 3px;
}
.bs-res-err {
  width: 100%; padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 107, 87, 0.07);
  border: 1px solid rgba(255, 107, 87, 0.2);
  font-size: 10.5px; font-weight: 600; line-height: 1.4;
  color: #FF9A8A; text-align: center;
}
.bs-res-bestline { width: 100%; margin-top: 2px; }
.bs-res-besthead {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 5px;
  font-size: 7.5px; font-weight: 800; letter-spacing: 1.2px;
  color: rgba(244, 241, 234, 0.4);
}
.bs-res-besthead b { font-size: 8.5px; color: rgba(255, 255, 255, 0.78); }
.bs-res-track {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}
.bs-res-track i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #F0A62E, #FFD166);
  transition: width .65s cubic-bezier(.2, .9, .3, 1);
}
.bs-res-buttons {
  display: flex; flex-direction: column; gap: 7px;
  width: 100%; margin-top: 4px;
}
.bs-confetti {
  position: absolute; top: -14px;
  width: 7px; height: 12px; border-radius: 2px;
  opacity: 0; pointer-events: none; z-index: 0;
  animation: bs-confetti-fall linear forwards;
}
@keyframes bs-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(430px) rotate(340deg); opacity: 0; }
}

@media (max-height: 700px) {
  .bs-sheet { max-height: 82vh; padding-top: 16px; }
  .bs-lockup { gap: 11px; }
  .bs-logo { width: 56px; height: 56px; }
  .bs-title { font-size: 25px; }
  .bs-statgrid { margin: 11px 0; }
  .bs-how { gap: 5px; }
  .bs-how-row { padding: 7px 10px; }
  .bs-res-height b { font-size: 52px; }
}

/* ------------------------- arcade entry card ------------------------ */
.bs-entry {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  margin-top: 12px; padding: 15px;
  border-radius: 22px; color: var(--stage-text);
  border: none; cursor: pointer;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 46%),
    linear-gradient(160deg, #1A2744 0%, #0F1A30 55%, #162040 100%);
  box-shadow:
    inset 0 0 0 1px rgba(241,196,15,.3),
    0 14px 30px rgba(0,0,0,.42),
    0 0 26px rgba(52,152,219,.12);
  transition: transform .14s ease, box-shadow .2s ease;
  overflow: hidden;
  animation: bs-entry-glow 3.2s ease-in-out infinite;
}
.bs-entry::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241,196,15,.5), rgba(52,152,219,.5), transparent);
}
.bs-entry::after {
  content: ""; position: absolute; top: -60%; bottom: -60%;
  width: 46px; left: 0;
  background: linear-gradient(100deg,
    transparent,
    rgba(255,255,255,.09) 40%,
    rgba(241,196,15,.14) 50%,
    rgba(255,255,255,.09) 60%,
    transparent);
  transform: translateX(-140%) skewX(-18deg);
  pointer-events: none;
  animation: bs-entry-shine 4.2s ease-in-out infinite;
}
.bs-entry:active {
  transform: scale(.977);
  box-shadow:
    inset 0 0 0 1px rgba(241,196,15,.5),
    0 8px 20px rgba(0,0,0,.5),
    0 0 34px rgba(52,152,219,.2);
}
@keyframes bs-entry-shine {
  0%, 64% { transform: translateX(-140%) skewX(-18deg); }
  86%, 100% { transform: translateX(340%) skewX(-18deg); }
}
@keyframes bs-entry-glow {
  0%, 100% {
    box-shadow:
      inset 0 0 0 1px rgba(241,196,15,.3),
      0 14px 30px rgba(0,0,0,.42),
      0 0 26px rgba(52,152,219,.12);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(241,196,15,.45),
      0 14px 30px rgba(0,0,0,.42),
      0 0 34px rgba(241,196,15,.14);
  }
}
.bs-entry-art {
  position: relative; flex-shrink: 0;
  width: 86px; height: 86px;
}
.bs-entry-fx {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 2;
}
.bs-entry-spark {
  position: absolute; top: 18%;
  width: 5px; height: 5px; border-radius: 50%;
  background: #FFE066;
  box-shadow: 0 0 8px 2px rgba(241,196,15,.55);
  opacity: 0;
  animation: bs-spark-twinkle 2.6s ease-in-out infinite;
}
@keyframes bs-spark-twinkle {
  0%, 100% { opacity: 0; transform: scale(.4); }
  12% { opacity: 1; transform: scale(1.25); }
  24% { opacity: 0; transform: scale(.4); }
}
.bs-brick-stack {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; gap: 3px;
  padding-bottom: 10px;
}
.bs-mini-brick {
  height: 12px; border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
  animation: bs-brick-bounce 2.4s ease-in-out infinite;
}
.bs-mini-brick.b1 { width: 52px; background: #E74C3C; animation-delay: 0s; }
.bs-mini-brick.b2 { width: 48px; background: #3498DB; animation-delay: .15s; }
.bs-mini-brick.b3 { width: 44px; background: #2ECC71; animation-delay: .3s; }
.bs-mini-brick.b4 { width: 40px; background: #F1C40F; animation-delay: .45s; }
@keyframes bs-brick-bounce {
  0%, 100% { transform: translateY(0); }
  18% { transform: translateY(-4px); }
  36% { transform: translateY(0); }
}
.bs-falling-brick {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 10px; border-radius: 2px;
  background: #9B59B6;
  box-shadow: 0 2px 6px rgba(155,89,182,.5), inset 0 1px 0 rgba(255,255,255,.25);
  animation: bs-drop-anim 1.8s ease-in-out infinite;
}
@keyframes bs-drop-anim {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(14px); }
  50% { transform: translateX(-50%) translateY(14px) scale(1.05); }
  60% { transform: translateX(-50%) translateY(0); }
}
.bs-holder-line {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 2px; height: 14px;
  background: rgba(255,255,255,.25);
  border-radius: 1px;
}
.bs-entry-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.bs-entry-kicker {
  font-size: 9px; font-weight: 800; letter-spacing: 2.6px;
  color: #3498DB;
  text-shadow: 0 0 10px rgba(52,152,219,.5);
}
.bs-entry-title {
  font-size: 23px; line-height: 1.05; font-weight: 800; letter-spacing: 3px;
  background: linear-gradient(92deg, #F1C40F 8%, #E67E22 52%, #E74C3C 94%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(241,196,15,.35));
}
.bs-entry-sub {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: rgba(235,228,248,.55);
}
.bs-entry-meta {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  color: rgba(241,196,15,.85);
}
.bs-entry-meta .bs-coin-dot { width: 11px; height: 11px; }
.bs-entry-chev {
  flex-shrink: 0; align-self: center;
  font-size: 26px; font-weight: 700; color: var(--stage-gold);
}
