/*! Copyright (c) 2026 BamByte (bambyte.net). All rights reserved.
 * Proprietary code: no copying, redistribution, or use to train or prompt
 * AI / machine-learning systems without written permission from BamByte. */
/* Bunker Blitz -- game page (game.html).
   The console on the left, the site's sidebar on the right: HUD panel with
   the round controls on top (js/sidebarLayout.js), the same shell, frame and
   sizes Solitz!, Blockz and Brick Blast use, so every game reads the same.
   Single player only, so none of the online chat / lobby chrome is here.

   Reskin points: the neon backdrop (.bkb-board background, drawn here, not on
   the canvas) and --game-accent (keep in step with --bkb-accent in
   menu.css). The board sprite, pad colours and tones are in js/config.js. */

:root {
  --game-accent: #ffd21f;
  --game-accent-rgb: 255, 210, 31;
  --panel: #0d1a14;
  --text: #f4f7fb;
  --muted: #b3b6d6;
  --bkb-sidebar-w: clamp(220px, 24vw, 340px);
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(47, 139, 255, 0.22), transparent 38%),
    radial-gradient(circle at 92% 12%, rgba(255, 59, 78, 0.2), transparent 38%),
    radial-gradient(ellipse at 50% 40%, #10301c, #040b07 85%),
    #040b07;
  overflow: hidden;
}

/* Full-height flex + dvh, same as the rest of the site. */
.bkb-shell {
  display: flex;
  gap: 16px;
  height: var(--bb-vh, 100vh);
  height: var(--bb-vh, 100dvh);
  padding: 16px;
}

/* The stage takes the slack and the board fills it; the canvas inside is
   any shape (js/render.js centres the console in it). */
.bkb-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
  order: 2;
}

.bkb-board {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #0b1f12;
  border: 2px solid rgba(var(--game-accent-rgb), 0.45);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(var(--game-accent-rgb), 0.18),
    inset 0 0 80px rgba(0, 0, 0, 0.5);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#screen {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  outline: none;
}
/* Pause cover. */
.bkb-pause {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  /* Paused hides the board: no planning the next move with the clock stopped. */
  background: rgba(8, 4, 20, 0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  z-index: 5;
}
.bkb-pause[hidden] { display: none; }
.bkb-pause__card {
  padding: 18px 34px;
  border-radius: 16px;
  background: rgba(18, 10, 38, 0.94);
  border: 2px solid rgba(var(--game-accent-rgb), 0.8);
  box-shadow: 0 0 18px rgba(var(--game-accent-rgb), 0.45), 0 14px 34px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.bkb-pause__card h2 {
  margin: 0 0 4px;
  font: 900 clamp(22px, 5cqw, 40px)/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 14px rgba(var(--game-accent-rgb), 0.9);
}
.bkb-pause__card p { margin: 0; color: var(--muted); font-weight: 600; font-size: clamp(12px, 2cqw, 15px); }

/* ---- Round controls (moved into the sidebar HUD by sidebarLayout.js) ------ */
.bkb-side { display: none; }
.bb-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  /* One row whatever the sidebar width: the buttons shrink (to 26px) instead. */
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 16px;
  background: #4a4a4a;
  border: 2px solid #6d6d6d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.45);
}
.bb-icon-btn {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
/* Up to 40px, shrinking together on a narrow sidebar. Also sizes the shared
   HUD menu button (/net/offline_hud_menu.js) appended to this row. */
.bb-toolbar .bb-icon-btn,
.bb-toolbar .bb-offline-hud-menu-btn {
  flex: 0 1 40px;
  width: auto;
  height: auto;
  min-width: 26px;
  aspect-ratio: 1;
}
.bb-icon-btn img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.bb-icon-btn:hover { transform: translateY(-1px) scale(1.08); filter: brightness(1.15); }
.bb-icon-btn:active { transform: scale(0.94); }
.bb-icon-btn:focus-visible { outline: 2px solid var(--game-accent); outline-offset: 2px; }
.bb-icon-btn--gear { color: #111; background: #d9d9d9; width: 32px; height: 32px; padding: 5px; }
.bb-icon-btn--gear svg { width: 100%; height: 100%; display: block; }
/* The shared HUD menu's Settings item clicks this hidden gear; it only shows
   when that menu could not load (this folder served without the site root). */
#btn-settings { display: none; }
body.bkb-no-hud-menu #btn-settings { display: grid; }

/* ---- Sidebar -------------------------------------------------------------- */
#rightPanel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 var(--bkb-sidebar-w);
  width: var(--bkb-sidebar-w);
  max-height: 100%;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  position: relative;
  order: 4;
}
/* No room, no chat: the chat mount stays hidden in single player. */
#sb-content { display: none; }

body.bkb-dock-left #rightPanel { order: 1; }
body.bkb-dock-left .bkb-resize-handle { order: 2; }
body.bkb-dock-left .bkb-stage { order: 3; }

/* The grab strip between the board and the sidebar: the 10px strip is the
   hit area, the 2px line down its middle is what you see. */
.bkb-resize-handle {
  display: block;
  position: relative;
  flex: 0 0 10px;
  align-self: stretch;
  cursor: col-resize;
  background: transparent;
  order: 3;
}
.bkb-resize-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--game-accent);
  opacity: 0.35;
  border-radius: 2px;
  transition: opacity 0.18s ease, width 0.18s ease;
}
.bkb-resize-handle:hover::before,
.bkb-resize-handle.bkb-resizing::before { opacity: 1; width: 4px; }
body.bkb-resizing-cursor { cursor: col-resize; user-select: none; }

/* ---- HUD panel -------------------------------------------------------------- */
.hud-panel { display: none; }
#rightPanel > .hud-panel {
  display: flex;
  flex-direction: column;
  position: relative;          /* the settings popover is placed against it */
  width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;            /* the body below scrolls; controls + logo stay put */
  border: 3px solid var(--game-accent);
  border-radius: 8px;
  background-color: rgba(12, 16, 24, 0.4);
  padding: 8px;
}
.hud-panel[hidden] { display: none !important; }

.hud-panel__title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.hud-panel__logo-card { width: 100%; padding: 4px 6px; }
.hud-panel__logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.45));
}
.hud-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--game-accent-rgb), 0.6) transparent;
}

/* "Hide HUD": just the control strip stays. */
#rightPanel .hud-collapsed > *:not(.bb-toolbar) { display: none; }
#rightPanel .hud-collapsed {
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

/* Logo: the art is 4:3, so cap its height to leave the stats room. */
.hud-panel__logo { max-height: 150px; object-fit: contain; border-radius: 12px; }

/* Round / best / pattern length. */
.bkb-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.bkb-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}
.bkb-stat:first-child { grid-column: 1 / -1; }
.bkb-stat__label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--game-accent);
  white-space: nowrap;
}
.bkb-stat__value {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Start / High scores. */
.bkb-actions { display: flex; gap: 6px; margin-top: 12px; }
.bkb-actions .bkb-btn { flex: 1 1 0; padding: 10px 8px; font-size: 13.5px; }
.bkb-btn:disabled { opacity: 0.45; cursor: default; filter: none; transform: none; }

/* ---- Settings popover ----------------------------------------------------------- */
.settings-menu {
  position: absolute;
  right: 8px;
  top: 64px;
  z-index: 40;
  width: min(280px, calc(100% - 16px));
  max-height: calc(var(--bb-vh, 100dvh) - 120px);
  overflow-y: auto;
  padding: 12px;
  border-radius: 14px;
  background: #2b2a2a;
  border: 2px solid rgba(var(--game-accent-rgb), 0.55);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}
.settings-menu[hidden] { display: none; }
/* In the sidebar it opens like BAMO's / Boom Boats': a full-width panel inside
   the side panel. Solitaire's HUD box runs the whole height of the sidebar
   (there's no chat under it), so instead of hanging below it, the panel fills
   the HUD box from just under the control bar and its Game Settings button
   down to the bottom, and scrolls. The small-screen rule further down still
   floats it centred instead. */
#hud-panel > #settings-menu {
  top: 132px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  width: auto;
  max-height: none;
  padding: 14px 16px 12px;
  background: rgba(22, 22, 22, 0.97);
  border: 2px solid var(--game-accent);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 18px rgba(var(--game-accent-rgb), 0.22);
  text-align: left;
}
.settings-note { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.settings-group { margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 10px; }
.settings-title { margin: 0 0 8px; font-size: 13px; color: var(--game-accent); }

.bkb-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  margin: 6px 0;
}
.bkb-set-row input[type="range"] { flex: 1 1 auto; max-width: 140px; accent-color: var(--game-accent); }
.bkb-toggle-row input { width: 18px; height: 18px; accent-color: var(--game-accent); }
.bkb-select {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(var(--game-accent-rgb), 0.6);
  background: var(--panel);
  color: #fff;
  font: inherit;
}
.bkb-set-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.bkb-set-buttons .bkb-btn--go:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

/* Statistics dialog. */
.bkb-statlist { margin: 0; display: grid; gap: 6px; }
.bkb-statlist div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 2px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.bkb-statlist dt { color: var(--muted); font-weight: 700; }
.bkb-statlist dd { margin: 0; color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; }

.bkb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  font: 800 12.5px/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff;
  text-decoration: none;
  text-align: center;
  background: #3a3a3a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.bkb-btn:hover, .bkb-btn:focus-visible { filter: brightness(1.18); transform: translateY(-1px); }
.bkb-btn--go {
  background: linear-gradient(180deg, #2bd35a, #138a35);
  box-shadow: 0 0 0 2px rgba(70, 230, 120, 0.8), 0 0 12px 2px rgba(70, 230, 120, 0.45);
}

.rules { margin: 0; }
.rules dt { margin-top: 8px; font-weight: 800; font-size: 12.5px; color: var(--game-accent); }
.rules dd { margin: 2px 0 6px; font-size: 12px; line-height: 1.45; color: #fff; }

/* ---- Dialogs (high scores, name entry) ---------------------------------------- */
.bkb-modal {
  position: fixed;
  inset: 0;
  z-index: 4100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.6);
}
.bkb-modal__card {
  width: min(360px, 92vw);
  max-height: calc(var(--bb-vh, 100dvh) - 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px;
  border-radius: 20px;
  background: #1c1c1c;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
}
.bkb-modal__title {
  margin: 0;
  text-align: center;
  font: 900 clamp(18px, 4vw, 24px)/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
}
.bkb-modal__score {
  margin: 0;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 14px rgba(var(--game-accent-rgb), 0.8);
}
.bkb-modal__label { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; }
/* The signed-in name the high score is saved under (no name box to fill in). */
.bkb-modal__name {
  margin: -6px 0 0;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  overflow-wrap: anywhere;
  text-shadow: 0 0 10px rgba(var(--game-accent-rgb), 0.6);
}
.bkb-input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid rgba(var(--game-accent-rgb), 0.7);
  background: #0e0a1e;
  color: #fff;
  font: 700 16px system-ui, sans-serif;
  text-align: center;
}
.bkb-modal .bkb-btn { padding: 12px 0; font-size: 14px; text-transform: uppercase; }

.bkb-scores-wrap { overflow-y: auto; min-height: 0; }
.bkb-scores { width: 100%; border-collapse: collapse; font-size: 14px; }
.bkb-scores th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--game-accent);
  padding: 4px 8px;
}
.bkb-scores td { padding: 6px 8px; border-top: 1px solid rgba(255, 255, 255, 0.07); color: #fff; }
.bkb-scores td:first-child { width: 2.5em; color: var(--muted); }
.bkb-scores td:last-child, .bkb-scores th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bkb-scores tr.is-me td { background: rgba(var(--game-accent-rgb), 0.22); font-weight: 800; }
.bkb-empty { text-align: center; color: var(--muted) !important; }

/* ==== Phones and tablets ====================================================
   Desktop is untouched: everything below is gated on a portrait viewport no
   wider than 1024px (stacked) or a landscape one no taller than 500px. */

/* Portrait: board on top at full width, sidebar under it. */
@media (orientation: portrait) and (max-width: 1024px) {
  html, body { height: auto; min-height: 100%; }
  body { overflow-x: hidden; overflow-y: auto; }

  .bkb-shell {
    flex-direction: column;
    height: auto;
    min-height: var(--bb-vh, 100dvh);
    padding: 8px;
    gap: 8px;
  }
  .bkb-stage,
  body.bkb-dock-left .bkb-stage {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    /* About square (the console plus its status line), never taller than
       the screen, so the whole console is in view while playing; the
       sidebar is a scroll away below. */
    height: min(calc((100vw - 16px) * 1.1), calc(var(--bb-vh, 100dvh) - 16px));
  }
  #rightPanel,
  body.bkb-dock-left #rightPanel {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    max-height: none;
    padding: 0;
    overflow: visible;
  }
  #rightPanel > .hud-panel,
  .hud-panel__body { overflow: visible; }
  .bkb-resize-handle { display: none; }
  .hud-panel__logo { max-width: 320px; margin: 0 auto; }
}

/* Phones on their side: keep side by side, narrower sidebar. */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --bkb-phone-side-w: clamp(180px, 26vw, 240px); }
  .bkb-shell { padding: 6px; gap: 6px; }
  #rightPanel {
    flex: 0 0 var(--bkb-phone-side-w);
    width: var(--bkb-phone-side-w);
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bkb-resize-handle { display: none; }
  /* Tighter control row in the narrow sidebar (the buttons shrink to fit). */
  .bb-toolbar { gap: 5px; padding: 4px 6px; }
  .hud-panel__logo { max-height: 48px; width: auto; margin: 0 auto; }
  .hud-panel__title { padding: 4px 6px; }
  #rightPanel > .hud-panel { padding: 6px; }
  .bkb-stat { padding: 5px 8px; }
  .bkb-stat--score .bkb-stat__value { font-size: 22px; }
  .bkb-mode-blurb { display: none; }
  .bkb-pips { display: none; }
}

/* Settings popover on small screens: floats over the viewport, centred. */
@media (orientation: portrait) and (max-width: 1024px), (orientation: landscape) and (max-height: 500px) {
  #rightPanel #settings-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    bottom: auto;
    width: min(320px, calc(100vw - 24px));
    max-height: calc(var(--bb-vh, 100dvh) - 24px);
    z-index: 900;
  }
}

/* The first settings group sits right at the top: no divider above it. */
.settings-group--first { margin-top: 0; border-top: 0; padding-top: 0; }
.rules dd b { color: var(--game-accent); }
p.bkb-modal__label { margin: 0; }

/* ---- Bunker Blitz HUD extras ----------------------------------------------------- */

/* The round number is the big one. */
.bkb-stat--score .bkb-stat__value { font-size: 30px; text-shadow: 0 0 12px rgba(var(--game-accent-rgb), 0.6); }

/* Pattern progress: one pip per light, lit in its colour as you enter it. */
.bkb-pips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  min-height: 14px;
  margin: 10px 0 0;
}
.bkb-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.bkb-pip.is-done {
  background: var(--pip);
  border-color: var(--pip);
  box-shadow: 0 0 8px var(--pip);
}
.bkb-pip.is-miss {
  border-color: #ff4a5e;
  background: rgba(255, 74, 94, 0.35);
  box-shadow: 0 0 8px #ff4a5e;
}
.bkb-pip-more { font-size: 11px; font-weight: 800; color: var(--muted); align-self: center; }

/* Mode picker (sidebar, and the high-score tabs). */
.bkb-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.bkb-mode {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 7px 4px;
  background: transparent;
  color: var(--muted);
  font: 800 12px/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.bkb-mode:hover { color: #fff; }
.bkb-mode.is-on {
  background: rgba(var(--game-accent-rgb), 0.9);
  color: #04121f;
  box-shadow: 0 0 10px rgba(var(--game-accent-rgb), 0.5);
}
.bkb-mode:focus-visible { outline: 2px solid var(--game-accent); outline-offset: 1px; }
.bkb-mode-blurb { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; min-height: 2.8em; }
.bkb-modal .bkb-modes { margin-top: 0; }
/* Three stats: the round across the top, best + pattern under it. */
.bkb-stats { grid-template-columns: 1fr 1fr; }


/* ==== Bunker Blitz sidebar ================================================= */
.bkb-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.bkb-vs {
  font: 900 18px/1 "Arial Black", Impact, sans-serif;
  color: var(--game-accent);
  text-shadow: 0 2px 0 #000, 0 0 10px rgba(var(--game-accent-rgb), 0.6);
}
.bkb-card {
  --team: #fff;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--team) 26%, transparent), rgba(255, 255, 255, 0.04));
  border: 2px solid color-mix(in srgb, var(--team) 80%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--team) 35%, transparent);
  min-width: 0;
}
.bkb-card__face {
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: 50% 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--team);
}
.bkb-card__face:not([src]) { visibility: hidden; }
.bkb-card__name {
  max-width: 100%;
  font-weight: 900;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bkb-card__lives { display: flex; gap: 4px; }
.bkb-heart {
  width: 18px;
  height: 16px;
  background: rgba(255, 255, 255, 0.18);
  clip-path: path("M9 16 C8 14 0 10 0 4.5 C0 1.5 2.4 0 4.6 0 C6.6 0 8 1.3 9 3 C10 1.3 11.4 0 13.4 0 C15.6 0 18 1.5 18 4.5 C18 10 10 14 9 16 Z");
}
.bkb-heart.is-full { background: linear-gradient(180deg, #ff7a8e, #e0153a); }
.bkb-stats { margin-top: 10px; }
.bkb-stat:first-child { grid-column: auto; }
.bkb-status {
  margin: 10px 0 0;
  min-height: 2.6em;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  font-size: 13.5px;
  line-height: 1.35;
  text-align: center;
}
.bkb-subhead {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.bkb-subhead span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.bkb-subhead + .bkb-modes { margin-top: 6px; }
.bkb-mode--blue.is-on { background: #2f8bff; color: #fff; }
.bkb-mode--red.is-on { background: #ff3b4e; color: #fff; }
.bkb-mode--bambot.is-on { background: #7ed321; color: #10240a; }

/* ---- Pick your player ------------------------------------------------------- */
.bkb-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bkb-team {
  --team: #fff;
  --team-dark: #333;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px 14px;
  border-radius: 18px;
  border: 3px solid color-mix(in srgb, var(--team) 55%, transparent);
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--team) 45%, transparent), transparent 65%),
    linear-gradient(180deg, var(--team-dark), #0b0b14);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.bkb-team img {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
}
.bkb-team__name { font: 900 22px/1 "Arial Black", Impact, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; }
.bkb-team__who { font-size: 12.5px; font-weight: 700; color: rgba(255, 255, 255, 0.75); }
.bkb-team:hover, .bkb-team:focus-visible, .bkb-team.is-on {
  border-color: var(--team);
  box-shadow: 0 0 22px color-mix(in srgb, var(--team) 60%, transparent);
  transform: translateY(-2px);
  outline: none;
}
.bkb-modal--teams .bkb-modal__card { width: min(480px, 100%); }
