/* /break-bricks/ — Break Bricks, the Pocket Games "Brick Breaker" (Neon Circuit) port.
   Page frame, headline, SEO cards, FAQ, rank rows and the more-games row come from games.css.
   The board keeps the app's neon-circuit colours in both themes; page chrome reads tokens. */

.bb-seo-lead { max-width: 68ch; color: var(--text-muted); }
.bb-play { display: grid; gap: var(--space-3); inline-size: 100%; max-inline-size: 800px; margin-inline: auto; }
.bb-play > h1 { text-align: center; margin: 0; }

/* Mode tabs (the play shell mirrors them as chips on the cover) */
.bb-mode-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.bb-mode-tab {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-block-size: var(--tap); padding-inline: var(--space-4);
  border-radius: var(--radius-pill, 999px); border: 1px solid var(--border);
  background: var(--surface-1); color: var(--text-muted);
  font-family: var(--font-body); font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.bb-mode-tab:hover { color: var(--text); background: var(--surface-2); }
.bb-mode-tab[aria-selected="true"] { color: var(--text); border-color: color-mix(in oklab, var(--accent) 60%, transparent); background: color-mix(in oklab, var(--accent) 16%, var(--surface-1)); }
.bb-mode-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Stage: a phone-shaped neon board */
.bb-stage {
  --bb-h: clamp(460px, calc(100svh - var(--header-stuck, 64px) - 260px), 760px);
  position: relative; block-size: var(--bb-h); inline-size: min(100%, calc(var(--bb-h) * 0.62)); min-inline-size: min(300px, 100%);
  margin-inline: auto; border-radius: var(--radius-lg, 16px); overflow: hidden; isolation: isolate;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #ebfaff;
  background:
    linear-gradient(#8aace408 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, #8aace408 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 58% 30%, #11415435, transparent 70%),
    linear-gradient(155deg, #080f25, #070d1e 65%, #18102b);
  border: 1px solid #345569; box-shadow: 0 0 40px #35d5f216, inset 0 1px #b3f4ff28;
  -webkit-tap-highlight-color: transparent;
}
.bb-run { position: absolute; inset: 0; display: flex; flex-direction: column; }
.bb-stats { display: flex; gap: 16px; align-items: center; flex: none; block-size: 51px; padding: 3px 16px 6px; }
.bb-stats > div { display: flex; gap: 4px; flex-direction: column; }
.bb-stats span { font-size: 8px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #819fba; }
.bb-stats strong { color: #a1f8ff; font: 800 17px/1 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.bb-score { flex: 1; }
.bb-stats .bb-score strong { color: #f5f8ff; }
.bb-energy { text-align: right; align-items: flex-end; }
.bb-energy strong { block-size: 17px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.bb-energy i { inline-size: 7px; block-size: 12px; transform: skewX(-15deg); border: 1px solid #a7a0c847; background: #23263d; }
.bb-energy i.charged { background: #ec87ca; border-color: #ffc4ed; box-shadow: 0 0 8px #f787d13c; }
.brick-touch { position: relative; flex: 1; inline-size: 100%; min-block-size: 0; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.brick-touch canvas { position: absolute; inset: 0; display: block; inline-size: 100%; block-size: 100%; }
.brick-touch canvas:focus-visible { outline: 2px solid #67dfee; outline-offset: -3px; }
.bb-fx {
  position: absolute; inset-block-end: 6px; inset-inline-end: 6px; inline-size: 32px; block-size: 32px; display: grid; place-items: center;
  border-radius: 5px; border: 1px solid #426678; background: #13253bcc; color: #8ca5c4; cursor: pointer; font-size: 13px; opacity: .7;
}
.bb-fx[aria-pressed="true"] { color: #a1f8ff; border-color: #8de7fa80; }
.bb-fx:hover, .bb-fx:focus-visible { opacity: 1; }
.bb-fx:focus-visible { outline: 2px solid #67dfee; outline-offset: 2px; }

/* Praise banner (power-ups, waves) */
.bb-praise {
  position: absolute; inset-inline: 0; inset-block-start: 38%; display: grid; justify-items: center; gap: 4px;
  pointer-events: none; opacity: 0; transform: translateY(8px) scale(.94); text-align: center;
}
.bb-praise b { font: 950 clamp(22px, 7vw, 30px)/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.03em; color: #e8faff; text-shadow: 0 0 18px #6de6f3aa, 0 0 2px #fff; }
.bb-praise small { font: 700 11px ui-monospace, monospace; letter-spacing: .08em; color: #9fd8e6; }
.bb-praise.is-on { animation: bb-praise 1.3s cubic-bezier(.2, .9, .3, 1.2) forwards; }
@keyframes bb-praise { 0% { opacity: 0; transform: translateY(10px) scale(.9); } 14% { opacity: 1; transform: none; } 78% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }

/* Overlay: start card, pause and result (standalone page; the play layer uses its own sheets) */
.bb-overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; overflow: auto;
  padding: 16px 22px 20px;
  background: radial-gradient(ellipse at 50% 45%, #14435250, transparent 57%), linear-gradient(160deg, #080f23f2, #0d1229f2 65%, #18102af2);
}
.bb-overlay[hidden] { display: none; }
.bb-overlay[data-kind="card"] { background: #070d1ec7; backdrop-filter: blur(3px); }
.bb-circuit-lines { position: absolute; inset: 0; pointer-events: none; opacity: .23; background-image: linear-gradient(#92dbff17 1px, transparent 1px), linear-gradient(90deg, #92dbff17 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(transparent, #000 15%, #000 80%, transparent); }
.bb-launch-card { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch; inline-size: min(100%, 390px); margin-block: auto; text-align: start; }
.bb-eyebrow { color: #87c8d5; font-size: 9px; letter-spacing: .2em; font-weight: 800; }
.bb-wordmark { font: 950 clamp(36px, 11vw, 52px)/.94 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.065em; margin: 16px 0 0; color: #e8faff; text-shadow: 0 0 24px #8bd6fa28; }
.bb-wordmark em { font-style: normal; color: #89eff5; }
.bb-tagline { color: #92a6c1; font-size: 11px; margin: 12px 0 0; letter-spacing: .02em; }
.bb-hero { position: relative; block-size: clamp(110px, 20vh, 190px); margin: 4px -6px 6px; overflow: hidden; perspective: 400px; }
.bb-hero-bricks { position: absolute; inset: 18px 12px auto; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; transform: rotate(-9deg) rotateY(-8deg); filter: drop-shadow(0 0 12px #58c8ff20); }
.bb-hero-bricks i { block-size: 20px; background: linear-gradient(#67dff665, #2f698e33); border: 1px solid #86f0ffbd; border-top: 2px solid #d1ffffd0; border-radius: 3px; box-shadow: inset 0 -3px #15335aa0, 0 0 9px #73cdff14; }
.bb-hero-bricks i:nth-child(-n+6) { background: linear-gradient(#d486f78a, #843e9540); border-color: #f39dec; }
.bb-hero-bricks i:nth-child(n+13) { background: linear-gradient(#59cff68a, #28736d30); }
.bb-hero-bricks i:nth-child(10), .bb-hero-bricks i:nth-child(15), .bb-hero-bricks i:nth-child(16) { visibility: hidden; }
.bb-hero > b { position: absolute; left: 49%; top: 55%; inline-size: 14px; block-size: 14px; border-radius: 50%; background: #edffff; box-shadow: 0 0 10px #82e8ff, 0 0 24px #49c9ff; }
.bb-hero > span { position: absolute; left: calc(49% + 1px); top: calc(55% + 11px); block-size: 50px; inline-size: 11px; transform: rotate(-33deg); transform-origin: top; background: linear-gradient(#8aefff80, transparent); clip-path: polygon(0 0, 100% 0, 65% 100%, 35% 100%); }
.bb-hero-paddle { position: absolute; bottom: 12px; left: calc(50% - 54px); inline-size: 108px; block-size: 13px; border: 1px solid #b9f7ff; transform: rotate(-9deg); background: linear-gradient(#d7feff 0, #63dbef 33%, #24435d 45%, #131d39); box-shadow: 0 0 17px #64e5fa38; border-radius: 3px; }
.bb-modes-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.bb-modes-inline button { padding: 10px 8px; border: 1px solid #426678; border-radius: 5px; background: #13253b; color: #8ca5c4; font: 800 12px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; display: grid; gap: 4px; cursor: pointer; }
.bb-modes-inline button small { font: 600 9px var(--font-body, sans-serif); letter-spacing: 0; text-transform: none; color: #6f8eaa; }
.bb-modes-inline button[aria-pressed="true"] { border-color: #8de7fa; background: #17384f; color: #d4faff; box-shadow: 0 0 14px #72deee2a; }
.bb-modes-inline button[aria-pressed="true"] small { color: #9fd8e6; }

/* Level chooser: the shared StagePicker in circuit-board clothes */
.bb-stage-picker { display: grid; gap: 8px; border-block: 1px solid #5fd6eb36; padding: 10px 0; }
.stage-picker-head { display: flex; align-items: center; gap: 12px; }
.stage-picker-label { font: 800 9px ui-monospace, monospace; color: #8ca5c4; letter-spacing: .13em; text-transform: uppercase; }
.stage-picker-current { font: 800 20px ui-monospace, monospace; color: #d4faff; text-shadow: 0 0 12px #6de6f355; }
.stage-picker-stars { font-style: normal; color: #f8b5ed; letter-spacing: 4px; }
.stage-picker-steps { margin-inline-start: auto; display: flex; gap: 6px; }
.stage-picker-steps button { inline-size: 36px; block-size: 36px; border-radius: 3px; background: #13253b; border: 1px solid #426678; color: #a1f8ff; font: 800 18px ui-monospace, monospace; cursor: pointer; }
.stage-picker-steps button:disabled { opacity: .35; cursor: default; }
.stage-picker-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.stage-picker-strip::-webkit-scrollbar { display: none; }
.stage-picker-more { align-self: center; color: #6f8eaa; }
.stage-chip { flex: none; display: grid; place-items: center; gap: 1px; min-inline-size: 44px; block-size: 44px; border-radius: 3px; background: #13253b; border: 1px solid #426678; color: #d4faff; cursor: pointer; padding: 2px 4px; }
.stage-chip b { font: 800 14px ui-monospace, monospace; }
.stage-chip i { font-style: normal; font-size: 8px; color: #f8b5ed; letter-spacing: 1px; }
.stage-chip[aria-checked="true"] { background: linear-gradient(110deg, #a0faff, #61d6ec); border-color: #a6fcff; color: #0b2131; box-shadow: 0 0 18px #6de6f355; }
.stage-chip[aria-checked="true"] i { color: #5a1d4a; }
.bb-endless-record { grid-template-columns: auto 1fr; align-items: center; }
.bb-endless-record label { font-size: 9px; color: #8ca5c4; letter-spacing: .13em; text-transform: uppercase; grid-column: 1 / -1; }
.bb-endless-record strong { color: #f8b5ed; font: 800 22px ui-monospace, monospace; }
.bb-endless-note { margin-inline-start: auto; max-inline-size: 60%; font-size: 9px; line-height: 1.5; color: #8ca5c4; text-align: end; }
.bb-launch {
  margin-top: 14px; inline-size: 100%; border: 1px solid #a6fcff; border-radius: 4px; background: linear-gradient(110deg, #a0faff, #61d6ec);
  box-shadow: 0 0 24px #6de6f323; color: #0b2131; padding: 15px 20px; font: 900 14px ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.bb-launch:hover { box-shadow: 0 0 32px #6de6f355; }
.bb-launch:active { transform: scale(.98); }
.bb-launch span { font-size: 23px; line-height: 1; }
.bb-ghost { margin-top: 8px; inline-size: 100%; padding: 12px 20px; border: 1px solid #426678; border-radius: 4px; background: #13253b; color: #d4faff; font: 800 12px ui-monospace, monospace; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.bb-launch:focus-visible, .bb-ghost:focus-visible, .bb-modes-inline button:focus-visible, .stage-chip:focus-visible, .stage-picker-steps button:focus-visible { outline: 2px solid #f8b5ed; outline-offset: 2px; }
.bb-instructions { text-align: center; color: #b8d1df; font-size: 10px; line-height: 1.8; margin: 14px 0 0; }
.bb-instructions span { color: #6f8eaa; }
.bb-result { text-align: center; align-items: center; }
.bb-result-title { font: 950 clamp(28px, 8vw, 40px)/1 ui-monospace, monospace; letter-spacing: -.05em; color: #e8faff; margin: 12px 0 6px; text-shadow: 0 0 24px #8bd6fa40; }
.bb-stars { display: flex; justify-content: center; gap: 10px; margin: 6px 0 4px; font-size: 34px; line-height: 1; }
.bb-stars i { font-style: normal; color: #2a3550; }
.bb-stars i.on { color: #f8b5ed; text-shadow: 0 0 14px #f787d1aa; animation: bb-star .45s calc(var(--i) * .16s + .1s) cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes bb-star { from { transform: scale(.2) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bb-result-score { display: grid; gap: 4px; margin: 8px 0 0; }
.bb-result-score small { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: #819fba; }
.bb-result-score b { font: 900 30px ui-monospace, monospace; color: #f5f8ff; font-variant-numeric: tabular-nums; }
.bb-result-note { margin: 6px 0 0; font-size: 11px; color: #8ca5c4; }

/* Life lost inside the play layer */
.bb-shake { animation: bb-shake .28s linear; }
@keyframes bb-shake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }

/* Play layer: the stage fills the slot height */
.play-slot .bb-play { inline-size: min(100%, 1100px); gap: var(--space-2); }
.play-slot .bb-play > h1 { display: none; }
.play-slot .bb-stage { inline-size: min(calc(100vw - 2 * var(--gutter, 16px)), calc(var(--bb-h) * 0.64)); }

@media (max-height: 700px) {
  .bb-hero { display: none; }
  .bb-wordmark { font-size: 34px; margin-top: 10px; }
  .bb-launch { padding: 12px 18px; margin-top: 10px; }
  .bb-instructions { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bb-praise.is-on { animation: none; opacity: 1; transform: none; }
  .bb-stars i.on, .bb-shake { animation: none; }
  .bb-launch { transition: none; }
}

/* Joined scripts (Arabic, Devanagari) must not be letter-spaced */
:is(html[lang|="ar"], html[lang|="hi"], html[data-locale="sa"], html[data-locale="hi"]) .bb-stage :is(span, strong, small, b, label, button, p, h2) { letter-spacing: 0; }

/* /break-bricks-leaderboard/: season 2 boards first, the read-only Classic boards below */
.bb-season-title { text-align: center; margin-block: var(--space-4) 0; }
.bb-classic { display: grid; gap: var(--space-3); margin-block-start: var(--space-7, 3rem); padding-block-start: var(--space-5, 1.5rem); border-block-start: 1px solid var(--border); }
.bb-classic > h2 { text-align: center; margin: 0; }
.bb-classic .lblb-intro { text-align: center; margin: 0 auto; max-inline-size: 60ch; color: var(--text-muted); }

/* The playfield setting is unavailable behind the start, pause and result sheets. */
.bb-stage:has(> .bb-overlay:not([hidden])) .bb-fx { visibility: hidden; pointer-events: none; }
@media (pointer: coarse) {
  .bb-fx { inline-size: 44px; block-size: 44px; }
}
