/*! 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. */
/* BAMBARD -- game page (game.html).
   The battlefield 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 Bunker Blitz, Blockz and Brick Blast use.
   Single player only for now, so none of the online chat / lobby chrome is here.

   Reskin points: --game-accent (keep in step with --bmd-accent in menu.css)
   and the page backdrop below. The field itself is drawn by js/render.js
   from PALETTE / ART in js/config.js. */

:root {
  --game-accent: #ffcf3f;
  --game-accent-rgb: 255, 207, 63;
  --panel: #150b2e;
  --text: #f4f7fb;
  --muted: #b9b0dc;
  --bmd-sidebar-w: clamp(260px, 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, 214, 255, 0.2), transparent 38%),
    radial-gradient(circle at 92% 12%, rgba(255, 59, 176, 0.2), transparent 38%),
    radial-gradient(ellipse at 50% 85%, rgba(255, 138, 61, 0.18), transparent 50%),
    radial-gradient(ellipse at 50% 40%, #241046, #07030f 85%),
    #07030f;
  overflow: hidden;
}

/* Full-height flex + dvh, same as the rest of the site. */
.bmd-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). */
.bmd-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;
}

.bmd-board {
  position: relative;
  width: 100%;
  height: 100%;
  /* No outline (owner, 2026-11-08); square at the bottom, where the bevelled
     control panel butts up to it. */
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  background: #120a2e;
  /* Inset only: an outer shadow would fall across the panel's metal rim. */
  box-shadow: 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. */
.bmd-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;
}
.bmd-pause[hidden] { display: none; }
.bmd-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;
}
.bmd-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);
}
.bmd-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) ------ */
.bmd-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.bmd-no-hud-menu #btn-settings { display: grid; }

/* ---- Sidebar -------------------------------------------------------------- */
#rightPanel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 var(--bmd-sidebar-w);
  width: var(--bmd-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.bmd-dock-left #rightPanel { order: 1; }
body.bmd-dock-left .bmd-resize-handle { order: 2; }
body.bmd-dock-left .bmd-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. */
.bmd-resize-handle {
  display: block;
  position: relative;
  flex: 0 0 10px;
  align-self: stretch;
  cursor: col-resize;
  background: transparent;
  order: 3;
}
.bmd-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;
}
.bmd-resize-handle:hover::before,
.bmd-resize-handle.bmd-resizing::before { opacity: 1; width: 4px; }
body.bmd-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. */
.bmd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.bmd-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;
}
.bmd-stat:first-child { grid-column: 1 / -1; }
.bmd-stat__label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--game-accent);
  white-space: nowrap;
}
.bmd-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. */
.bmd-actions { display: flex; gap: 6px; margin-top: 12px; }
.bmd-actions .bmd-btn { flex: 1 1 0; padding: 10px 8px; font-size: 13.5px; }
.bmd-btn:disabled { opacity: 0.45; cursor: var(--bmd-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); }

.bmd-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  margin: 6px 0;
}
.bmd-set-row input[type="range"] { flex: 1 1 auto; max-width: 140px; accent-color: var(--game-accent); }
.bmd-toggle-row input { width: 18px; height: 18px; accent-color: var(--game-accent); }
.bmd-select {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(var(--game-accent-rgb), 0.6);
  background: var(--panel);
  color: #fff;
  font: inherit;
}
.bmd-set-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.bmd-set-buttons .bmd-btn--go:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

/* Statistics dialog. */
.bmd-statlist { margin: 0; display: grid; gap: 6px; }
.bmd-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); }
.bmd-statlist dt { color: var(--muted); font-weight: 700; }
.bmd-statlist dd { margin: 0; color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; }

.bmd-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;
}
.bmd-btn:hover, .bmd-btn:focus-visible { filter: brightness(1.18); transform: translateY(-1px); }
.bmd-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) ---------------------------------------- */
.bmd-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);
}
.bmd-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);
}
.bmd-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;
}
.bmd-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);
}
.bmd-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). */
.bmd-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);
}
.bmd-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;
}
.bmd-modal .bmd-btn { padding: 12px 0; font-size: 14px; text-transform: uppercase; }

.bmd-scores-wrap { overflow-y: auto; min-height: 0; }
.bmd-scores { width: 100%; border-collapse: collapse; font-size: 14px; }
.bmd-scores th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--game-accent);
  padding: 4px 8px;
}
.bmd-scores td { padding: 6px 8px; border-top: 1px solid rgba(255, 255, 255, 0.07); color: #fff; }
.bmd-scores td:first-child { width: 2.5em; color: var(--muted); }
.bmd-scores td:last-child, .bmd-scores th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bmd-scores tr.is-me td { background: rgba(var(--game-accent-rgb), 0.22); font-weight: 800; }
.bmd-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; }

  .bmd-shell {
    flex-direction: column;
    height: auto;
    min-height: var(--bb-vh, 100dvh);
    padding: 8px;
    gap: 8px;
  }
  .bmd-stage,
  body.bmd-dock-left .bmd-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.bmd-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; }
  .bmd-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 { --bmd-phone-side-w: clamp(180px, 26vw, 240px); }
  .bmd-shell { padding: 6px; gap: 6px; }
  #rightPanel {
    flex: 0 0 var(--bmd-phone-side-w);
    width: var(--bmd-phone-side-w);
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .bmd-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; }
  .bmd-stat { padding: 5px 8px; }
  .bmd-stat--score .bmd-stat__value { font-size: 22px; }
  .bmd-mode-blurb { display: none; }
  .bmd-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.bmd-modal__label { margin: 0; }

/* ---- BAMBARD HUD extras ----------------------------------------------------- */

/* The round number is the big one. */
.bmd-stat--score .bmd-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. */
.bmd-pips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  min-height: 14px;
  margin: 10px 0 0;
}
.bmd-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;
}
.bmd-pip.is-done {
  background: var(--pip);
  border-color: var(--pip);
  box-shadow: 0 0 8px var(--pip);
}
.bmd-pip.is-miss {
  border-color: #ff4a5e;
  background: rgba(255, 74, 94, 0.35);
  box-shadow: 0 0 8px #ff4a5e;
}
.bmd-pip-more { font-size: 11px; font-weight: 800; color: var(--muted); align-self: center; }

/* Mode picker (sidebar, and the high-score tabs). */
.bmd-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);
}
.bmd-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;
}
.bmd-mode:hover { color: #fff; }
.bmd-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);
}
.bmd-mode:focus-visible { outline: 2px solid var(--game-accent); outline-offset: 1px; }
.bmd-mode-blurb { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; min-height: 2.8em; }
.bmd-modal .bmd-modes { margin-top: 0; }
/* Three stats: the round across the top, best + pattern under it. */
.bmd-stats { grid-template-columns: 1fr 1fr; }

/* ==== BAMBARD sidebar ================================================= */
.bmd-wordmark {
  text-align: center;
  font: 900 clamp(30px, 3.4vw, 44px)/1 "Arial Black", Impact, system-ui, sans-serif;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 3px 0 #2a0f66, 0 0 18px rgba(var(--game-accent-rgb), 0.55);
  padding: 6px 0 4px;
}
.bmd-wordmark span { color: var(--game-accent); }

.bmd-versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
}
.bmd-vs {
  font: 900 16px/1 "Arial Black", Impact, sans-serif;
  color: var(--game-accent);
  text-shadow: 0 2px 0 #000;
}
.bmd-card {
  --team: #fff;
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--team) 20%, transparent), rgba(255, 255, 255, 0.03));
  border: 2px solid color-mix(in srgb, var(--team) 45%, transparent);
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bmd-card.is-turn {
  border-color: var(--team);
  box-shadow: 0 0 14px color-mix(in srgb, var(--team) 55%, transparent);
}
.bmd-card__name {
  font-weight: 900;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bmd-card__hp {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.bmd-card__hpfill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--team);
  transition: width 0.35s ease;
}
.bmd-card__hpnum { font-size: 12px; font-weight: 800; color: var(--team); font-variant-numeric: tabular-nums; }

.bmd-stats { margin-top: 10px; grid-template-columns: 1fr 1fr; }
.bmd-stat:first-child { grid-column: auto; }
.bmd-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;
}

/* Aim pad. */
.bmd-aim {
  margin-top: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 6px;
}
.bmd-aim.is-locked .bmd-step { opacity: 0.4; pointer-events: none; }
.bmd-aim__row {
  display: grid;
  grid-template-columns: 52px 36px 1fr 36px;
  align-items: center;
  gap: 6px;
}
.bmd-aim__label { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--game-accent); }
.bmd-aim__value {
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.bmd-step {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: 900 15px/1 system-ui, sans-serif;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}
.bmd-step:hover { background: rgba(255, 255, 255, 0.2); }
.bmd-step:active { transform: scale(0.95); }
.bmd-fuel {
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
.bmd-fuel__fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff8a3d, var(--game-accent)); }
.bmd-fire {
  margin-top: 2px;
  padding: 12px 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ff6a3d, #e0153a);
  color: #fff;
  font: 900 20px/1 "Arial Black", Impact, system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 0 #7a0d2a, 0 0 18px rgba(255, 80, 60, 0.4);
  cursor: pointer;
}
.bmd-fire:hover:not(:disabled) { filter: brightness(1.12); }
.bmd-fire:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #7a0d2a; }
.bmd-fire:disabled { filter: grayscale(0.8) brightness(0.6); cursor: var(--bmd-cursor, default); }

/* Arsenal. */
.bmd-subhead {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Two columns when the sidebar has room for the names, one when it doesn't. */
.bmd-weapons { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 5px; }
.bmd-weapon {
  --wc: #fff;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: 700 12.5px/1.1 system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.bmd-weapon__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wc); box-shadow: 0 0 6px var(--wc); }
.bmd-weapon:has(.bmd-weapon__icon) { grid-template-columns: 22px 1fr auto; }
.bmd-weapon__icon { width: 22px; height: 22px; object-fit: contain; }
.bmd-weapon__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmd-weapon__ammo { font-weight: 900; color: var(--game-accent); font-variant-numeric: tabular-nums; }
.bmd-weapon:hover:not(:disabled) { background: rgba(255, 255, 255, 0.11); }
.bmd-weapon.is-on { border-color: var(--wc); background: color-mix(in srgb, var(--wc) 22%, transparent); }
.bmd-weapon:disabled { cursor: var(--bmd-cursor, default); }
.bmd-weapon:disabled:not(.is-on) { opacity: 0.4; }
.bmd-weapon-blurb { margin: 6px 0 0; min-height: 2.6em; font-size: 12px; line-height: 1.35; color: var(--muted); text-align: center; }

.bmd-modes {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
}
.bmd-mode {
  flex: 1 1 0;
  padding: 7px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 800 12.5px/1 system-ui, sans-serif;
  cursor: pointer;
}
.bmd-mode:hover { color: #fff; }
.bmd-mode.is-on { background: var(--game-accent); color: #1a0f30; }

/* ==== Control bar under the field (js/controlbar.js) =====================
   The owner's HUD sheet cut into its pieces. Everything inside is in PLATE
   pixels: --u is one plate pixel, so the bar scales as one picture. */
.bmd-stage { flex-direction: column; gap: 8px; }
/* The board sits on top of the panel so the panel's top bevel tucks under the
   purple field, no dark seam (owner, 2026-11-08). */
.bmd-stage > .bmd-board { flex: 1 1 auto; min-height: 120px; height: auto; z-index: 1; }
/* The panel runs to the bottom of the screen: the stage eats the shell's
   bottom padding (16px; 6px on phones on their side). */
.bmd-stage { margin-bottom: -16px; }
@media (orientation: landscape) and (max-height: 500px) { .bmd-stage { margin-bottom: -6px; } }
@media (orientation: portrait) and (max-width: 1024px) { .bmd-stage { margin-bottom: 0; } }
/* The control panel under the field, the same size as Hover Blast's (owner,
   2026-11-15): the plate IS the panel -- no grey bevelled frame or padding
   round it -- and it runs the full width of the stage. --bmd-cbar-h is its
   height: what the full width gives, capped at --bmd-cbar-share of the stage
   (container units resolve against .bmd-stage) so the field keeps most of the
   screen. The field always has the same world height, so whatever height is
   left draws it bigger or smaller on screen without changing anything's real
   size or hit area. (The old frame art, assets/img/bevel_panel.webp, is no
   longer used.) */
.bmd-cbar-panel {
  --bmd-cbar-share: 33cqh;
  --bmd-cbar-h: min(var(--bmd-cbar-share), calc(100cqw * 336 / 1624));
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  /* Cancels the stage gap only, so the plate's top edge sits right on the field. */
  margin-top: -8px;
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  padding: 0;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
}
.bmd-cbar {
  position: relative;
  flex: 0 1 auto;
  width: 100%;
  max-width: calc(var(--bmd-cbar-h) * 1624 / 336);
  margin: 0 auto;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.bmd-cbar > *, .bmd-cbar .bmd-cb-part {
  --u: calc(100cqw / 1624);
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
}
.bmd-cb-spr {
  background-image: var(--sheet);
  background-repeat: no-repeat;
  background-size: calc(var(--bw) * var(--u)) calc(var(--bh) * var(--u));
  background-position: calc(var(--bx) * var(--u)) calc(var(--by) * var(--u));
}
.bmd-cb-plate { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55)); pointer-events: none; }
/* Power meter: the gradient + a top shine, masked to the track's segments
   (js/controlbar.js buildMeter), clipped at the power. The glow sits on the
   unclipped wrapper so it isn't cut off. */
.bmd-cb-meter {
  position: absolute;
  inset: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 calc(7 * var(--u)) var(--glow));
}
.bmd-cb-meter.is-empty { filter: none; }
.bmd-cb-meter__lit {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 38%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.22) 100%),
    var(--meter);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.08s linear;
}

/* Buttons: invisible hit areas over the drawn arrows / Fire. */
.bmd-cb-part {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
button.bmd-cb-part { cursor: pointer; border-radius: calc(14 * var(--u)); touch-action: none; }
button.bmd-cb-part:hover:not(:disabled) { background: rgba(255, 190, 60, 0.16); box-shadow: 0 0 calc(12 * var(--u)) rgba(255, 170, 40, 0.55); }
button.bmd-cb-part.is-down:not(:disabled),
button.bmd-cb-part:active:not(:disabled) { background: rgba(0, 0, 0, 0.28); transform: translateY(calc(1.5 * var(--u))); }
button.bmd-cb-part:focus-visible { outline: calc(3 * var(--u)) solid var(--game-accent); outline-offset: calc(2 * var(--u)); }
button.bmd-cb-part:disabled { cursor: var(--bmd-cursor, default); }
.bmd-cb-fire { transition: filter 0.15s ease; }
.bmd-cb-fire:hover:not(:has(button:disabled)) { filter: brightness(1.15) drop-shadow(0 0 calc(14 * var(--u)) rgba(255, 140, 30, 0.8)); }
.bmd-cb-fire:has(button.is-down), .bmd-cb-fire:active { filter: brightness(0.9); }
.bmd-cb-fire button.bmd-cb-part:hover:not(:disabled) { background: transparent; box-shadow: none; }
.bmd-cb-power .bmd-cb-track { cursor: pointer; }   /* like Angle: click, then the cursor hides (hudPanels) */

/* Not your turn (the Bambot's shot, rounds in the air): dimmed, no input. */
.bmd-cbar.is-locked .bmd-cb-piece { filter: saturate(0.55) brightness(0.8); }
.bmd-cbar.is-locked .bmd-cb-track { cursor: var(--bmd-cursor, default); pointer-events: none; }

/* Read-outs in the dark windows. */
.bmd-cb-read, .bmd-cb-name {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 900 calc(44 * var(--u)) / 1 "Segoe UI", system-ui, sans-serif;
  color: #ffd45a;
  text-shadow: 0 0 calc(10 * var(--u)) rgba(255, 170, 40, 0.75), 0 calc(2 * var(--u)) 0 #000;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}
.bmd-cb-power .bmd-cb-read { font-size: calc(38 * var(--u)); }
/* Move / Angle are drawn a little smaller (scale 0.58) so they clear the plate's top border. */
.bmd-cb-move .bmd-cb-read, .bmd-cb-angle .bmd-cb-read { font-size: calc(41 * var(--u)); }
/* ∞ (Target Practice) is drawn at x-height, below where digits sit: lift it to the window's middle. */
.bmd-cb-read.is-inf { transform: translateY(-0.13em); }
.bmd-cb-name {
  justify-content: space-between;
  gap: calc(10 * var(--u));
  padding: 0 calc(12 * var(--u));
  font-size: calc(29 * var(--u));
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
}
.bmd-cbar.is-locked .bmd-cb-name { pointer-events: none; }
.bmd-cb-wname { overflow: hidden; text-overflow: ellipsis; }
.bmd-cb-wammo { color: #ffd45a; flex: 0 0 auto; font-size: calc(26 * var(--u)); }
.bmd-cb-icon { display: grid; place-items: center; pointer-events: none; }
.bmd-cb-icon img { width: calc(102 * 0.62 * 0.78 * var(--u)); height: calc(102 * 0.62 * 0.78 * var(--u)); object-fit: contain; }   /* 78% of the old 102-px box: same size as the open list's icons */
.bmd-cb-dot {
  width: 48%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--wc) 45%, color-mix(in srgb, var(--wc) 50%, #000));
  box-shadow: 0 0 calc(14 * var(--u)) var(--wc);
}
/* The rig colour of whoever is shooting, on the readouts. */
.bmd-cbar[data-player="0"] .bmd-cb-read { color: #7fe6ff; text-shadow: 0 0 calc(10 * var(--u)) rgba(47, 214, 255, 0.8), 0 calc(2 * var(--u)) 0 #000; }
.bmd-cbar[data-player="1"] .bmd-cb-read { color: #ff8fd2; text-shadow: 0 0 calc(10 * var(--u)) rgba(255, 59, 176, 0.8), 0 calc(2 * var(--u)) 0 #000; }

/* Phones in portrait: the stage is a fixed height there, the bar takes its share. */
@media (orientation: portrait) and (max-width: 1024px) {
  .bmd-stage, body.bmd-dock-left .bmd-stage {
    height: min(calc((100vw - 16px) * 0.5625 + (100vw - 16px) * 0.23), calc(var(--bb-vh, 100dvh) - 16px));
  }
}

/* --------------------------------------------------------------------------
   v0.3: 295-weapon selector and point-scoring display. The owner's art HUD
   and its position/crop calculations remain unchanged.
   -------------------------------------------------------------------------- */
.bmd-card__hp { display: none; }
.bmd-card__hpnum { font-size: 17px; letter-spacing: .04em; }
.bmd-actions--mode .bmd-btn { font-size: 11px; }
.bmd-cb-name { cursor: pointer; }
/* The winner's helicopter (js/winHeli.js): over the field, under the result card. */
.bmd-winheli { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 60; cursor: pointer; touch-action: none; }
.bmd-result-overlay[hidden] { display: none; }
.bmd-result-overlay { position: fixed; z-index: 110; inset: 0; display: grid; place-items: center; padding: 20px; background: #050713d9; }
.bmd-result-card { width: min(520px, 100%); padding: 30px; text-align: center; color: #fff; border: 2px solid #ffcd61; border-radius: 18px; background: linear-gradient(140deg,#221734,#0b132a); box-shadow: 0 20px 80px #000; }
.bmd-result-card h2 { color: #ffcc67; margin: 0 0 14px; text-align: center; }
.bmd-result-card p { text-align: center; }
.bmd-result-actions { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
.bmd-result-actions button { cursor: pointer; border: 1px solid #e4ac47; border-radius: 9px; background: #3b2915; color: #fff; padding: 10px 18px; font-weight: 800; }
.bmd-result-actions button:hover { background: #6c4520; }


/* v0.4: direct HUD adjustment popups; no playfield aiming/trajectory helper. */
.bmd-cb-angle .bmd-cb-read, .bmd-cb-power .bmd-cb-read {
  pointer-events: auto; cursor: pointer; border-radius: calc(10 * var(--u));
}
.bmd-cb-angle .bmd-cb-read:hover:not(:disabled), .bmd-cb-power .bmd-cb-read:hover:not(:disabled),
.bmd-cb-weapon .bmd-cb-name:hover:not(:disabled) {
  background: rgba(255, 180, 50, .13);
}
.bmd-cbar:not(.is-locked) .bmd-cb-angle, .bmd-cbar:not(.is-locked) .bmd-cb-weapon,
.bmd-cbar:not(.is-locked) .bmd-cb-power { cursor: pointer; }
.bmd-shot-popup {
  position: fixed; z-index: 160; overflow: hidden; display: flex; flex-direction: column;
  color: #f8f6f5; border: 2px solid #b1b4c2; border-radius: 14px;
  background: linear-gradient(155deg, #28303c, #10141e 65%);
  box-shadow: 0 14px 48px #000b, inset 0 1px 1px #ffffff3c;
  font: 600 14px/1.4 system-ui, 'Segoe UI', sans-serif;
  touch-action: pan-y; user-select: text; -webkit-user-select: text;
}
.bmd-shot-popup__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 9px 12px; background: linear-gradient(90deg, #383f49, #141a24);
  border-bottom: 1px solid #606779;
}
.bmd-shot-popup__head strong { color: #ffd37c; font-size: 16px; }
.bmd-shot-popup__head button { border-radius: 6px; padding: 0 9px; border: 1px solid #8d919a;
  background: #202735; color: #fff; font-size: 24px; cursor: pointer; }
.bmd-shot-popup__body { padding: 14px; overflow-y: auto; }
.bmd-shot-popup__body p { margin: 0 0 15px; font-size: 13px; color: #cfd3e4; }
.bmd-shot-popup__value-row { display: flex; align-items: center; gap: 8px; }
.bmd-shot-popup__range { min-width: 0; flex: 1 1 auto; accent-color: #ff981e; cursor: ew-resize; }
.bmd-shot-popup__number { width: 69px; padding: 8px 4px; border-radius: 7px;
  background: #080b13; color: white; border: 1px solid #cc8d40;
  font: bold 18px/1.1 system-ui; text-align: center; font-variant-numeric: tabular-nums; }
.bmd-shot-popup__hint { margin-top: 12px; color: #ffcc68; font-size: 12px; }
.bmd-shot-popup__weapons { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.bmd-shot-popup__filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px; padding: 10px 10px 4px; }
.bmd-shot-popup__filters select, .bmd-shot-popup__filters input { width: 100%; min-width: 0;
  border: 1px solid #797d88; border-radius: 7px; padding: 9px 6px; background: #090e19;
  color: white; font: 600 12px system-ui; }
.bmd-shot-popup__count { color: #dfc58c; padding: 5px 12px 7px; font-size: 12px; }
.bmd-shot-popup__list { flex: 1 1 auto; overflow-y: auto; display: grid; align-content: start;
  gap: 4px; padding: 0 8px 9px; min-height: 80px; overscroll-behavior: contain; }
.bmd-shot-popup__weapon { width: 100%; display: flex; align-items: center; gap: 10px;
  color: #fff; background: #252c39; border: 1px solid #555c6c; border-radius: 7px;
  text-align: left; padding: 5px 8px; cursor: pointer; min-height: 49px; }
.bmd-shot-popup__weapon img { width: 37px; height: 37px; object-fit: contain; flex: 0 0 auto; }
.bmd-shot-popup__weapon span { min-width: 0; display: grid; gap: 1px; }
.bmd-shot-popup__weapon strong { font: bold 13px system-ui; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmd-shot-popup__weapon small { font: 11px system-ui; color: #bac1cd; }
.bmd-shot-popup__weapon:hover:not(:disabled), .bmd-shot-popup__weapon:focus-visible { background: #4d4438; border-color: #ffc767; }
.bmd-shot-popup__weapon.is-selected { background: #4c3921; border-color: #f4b64b; }
.bmd-shot-popup__weapon:disabled { opacity: .43; cursor: not-allowed; }
@media (max-width: 480px) {
  .bmd-shot-popup__filters { grid-template-columns: 1fr; }
  .bmd-shot-popup__head strong { font-size: 14px; }
}

/* v0.5: direct two-click HUD controls; NO numeric dialogs. */
.bmd-cb-piece.is-engaged { z-index: 8; filter: drop-shadow(0 0 calc(12 * var(--u)) #ffc44a); }
.bmd-cb-piece.is-engaged::after {
  content: 'MOVE MOUSE · CLICK TO LOCK';
  position: absolute;
  bottom: 102%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #080e1df0;
  border: 1px solid #ffb62c;
  border-radius: calc(5 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  color: #ffd37c;
  font: 900 calc(16 * var(--u))/1.2 system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: none;
}
.bmd-board.is-angle-setting { cursor: crosshair; }
/* Touch: Angle / Power are set by dragging (js/hudPanels.js touchMode). The
   page must not scroll or zoom under the finger while one is engaged. */
html.bmd-touch-aim, html.bmd-touch-aim body, html.bmd-touch-aim * { touch-action: none !important; }
html.bmd-touch-aim .bmd-cb-piece.is-engaged::after {
  content: 'DRAG LEFT / RIGHT · TAP TO LOCK';
  /* Phones shrink the bar's units to a few px: keep the hint readable, and
     right-aligned to the piece (Angle and Power sit at the bar's right end). */
  font-size: max(11px, calc(16 * var(--u)));
  padding: max(4px, calc(6 * var(--u))) max(8px, calc(10 * var(--u)));
  border-radius: max(5px, calc(5 * var(--u)));
  left: auto; right: 0; transform: none;
}
.bmd-angle-reticle {
  position: absolute;
  width: 29px;
  height: 29px;
  border: 2px solid #f5d56c;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px #18120d, 0 0 15px #f5bd59c0, inset 0 0 0 1px #141414;
  pointer-events: none;
  z-index: 20;
}
.bmd-angle-reticle::before, .bmd-angle-reticle::after {
  content: '';
  position: absolute;
  background: #fff7bb;
  box-shadow: 0 0 4px #f80;
}
.bmd-angle-reticle::before { width: 43px; height: 2px; left: -9px; top: 12px; }
.bmd-angle-reticle::after { height: 43px; width: 2px; top: -9px; left: 12px; }
.bmd-angle-reticle span { display: none; }
/* Weapon Select, open (js/hudPanels.js buildWeaponList; owner, 2026-11-16):
   the panel grows upward in place into assets/img/weapon_panel_open.webp
   (tools/bambard_weapon_panel.py) -- no popup. The row under the gold band
   is the pick. Sizes are plate px (--u); icon + name match the closed panel.
   It's taller than the bar, so the bar is lifted over the field while open. */
.bmd-cbar-panel:has(.bmd-cb-weapon.is-open) { z-index: 6; }
.bmd-cb-weapon.is-open::after { content: none; }      /* the panel says it all */
.bmd-cb-weapon.is-open > .bmd-cb-part:not(.bmd-wlist) { visibility: hidden; }
.bmd-wlist {
  z-index: 3;
  background: var(--wl-art) center / 100% 100% no-repeat;
  animation: bmd-wlist-grow 0.14s ease-out;
  transform-origin: 50% 100%;
}
@keyframes bmd-wlist-grow { from { transform: scaleY(0.42); } to { transform: none; } }
.bmd-wlist__view {
  overflow: hidden;
  border-radius: calc(6 * var(--u));
  touch-action: none;
  --fade-up: #000;
  --fade-down: #000;
  /* A soft fade at an edge only where more of the list lies beyond it. */
  -webkit-mask-image: linear-gradient(180deg, var(--fade-up) 0, #000 9%, #000 91%, var(--fade-down) 100%);
  mask-image: linear-gradient(180deg, var(--fade-up) 0, #000 9%, #000 91%, var(--fade-down) 100%);
}
.bmd-wlist__view.more-up { --fade-up: rgba(0, 0, 0, 0.25); }
.bmd-wlist__view.more-down { --fade-down: rgba(0, 0, 0, 0.25); }
.bmd-wlist__band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  box-sizing: border-box;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 196, 60, 0.30), rgba(255, 150, 20, 0.16));
  border-top: calc(2 * var(--u)) solid #ffc22e;
  border-bottom: calc(2 * var(--u)) solid #ffc22e;
  box-shadow: 0 0 calc(12 * var(--u)) rgba(255, 170, 40, 0.55), inset 0 0 calc(10 * var(--u)) rgba(255, 190, 60, 0.35);
}
.bmd-wlist__row {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  padding: 0 calc(12 * var(--u));
  box-sizing: border-box;
  color: #d9dde6;
  font: 900 calc(29 * var(--u)) / 1 "Segoe UI", system-ui, sans-serif;   /* = .bmd-cb-name */
  text-shadow: 0 calc(2 * var(--u)) 0 #000;
  white-space: nowrap;
  will-change: transform;
}
.bmd-wlist__row[hidden] { display: none; }
.bmd-wlist__row img { height: 88%; aspect-ratio: 1; object-fit: contain; flex: 0 0 auto; }   /* = the closed icon */
.bmd-wlist__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bmd-wlist__ammo { flex: 0 0 auto; color: #ffd45a; font-size: calc(26 * var(--u)); font-variant-numeric: tabular-nums; }
.bmd-wlist__row.is-sel { color: #ffd45a; text-shadow: 0 0 calc(10 * var(--u)) rgba(255, 170, 40, 0.75), 0 calc(2 * var(--u)) 0 #000; }
.bmd-wlist__row.is-sel .bmd-wlist__ammo { color: #fff; }

/* --------------------------------------------------------------------------
   Tanks picker (js/tankPicker.js): one row per rig, same pill dropdown as
   Pocket Kings' HUD pickers. The open list is position:fixed on <body> --
   the sidebar clips overflow. Hovering a colour shows it on the field.
   -------------------------------------------------------------------------- */
.bmd-tank-rows { display: grid; gap: 6px; }
.bmd-tank-row { display: flex; align-items: center; gap: 8px; }
.bmd-tank-row label {
  flex: 0 0 auto;
  min-width: 58px;
  max-width: 40%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #e6e6e6;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.bmd-tank-select { flex: 1 1 auto; min-width: 0; }
.bmd-tank-select__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 3px 12px 3px 6px;
  font: 700 13px/1.2 system-ui, sans-serif;
  color: #f2efff;
  text-align: left;
  background: #2c2444;
  border: 2px solid rgba(var(--game-accent-rgb), 0.55);
  border-radius: 999px;
  cursor: pointer;
}
.bmd-tank-select__btn::after {
  content: '';
  margin-left: auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #e6e6e6;
}
.bmd-tank-select__btn:hover { background: #3a3058; border-color: var(--game-accent); }
.bmd-tank-select__btn:focus-visible,
.bmd-tank-select__btn[aria-expanded="true"] {
  outline: none;
  border-color: var(--game-accent);
  box-shadow: 0 0 10px rgba(var(--game-accent-rgb), 0.45);
}
.bmd-tank-select__btn span,
.bmd-tank-select__opt span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bmd-tank-select__btn img,
.bmd-tank-select__opt img {
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}
.bmd-tank-select__list {
  position: fixed;
  z-index: 1000;
  max-height: min(340px, 70vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  background: #1b1530;
  border: 2px solid rgba(var(--game-accent-rgb), 0.55);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 10px rgba(var(--game-accent-rgb), 0.25);
}
.bmd-tank-select__list[hidden] { display: none; }
.bmd-tank-select__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  border-radius: 8px;
  font: 700 13px/1.2 system-ui, sans-serif;
  color: #f2efff;
  cursor: pointer;
}
.bmd-tank-select__opt:hover { background: #3a3058; }
.bmd-tank-select__opt.is-selected { background: #4b3d29; box-shadow: inset 0 0 0 1px rgba(var(--game-accent-rgb), 0.8); }

/* Hide the OS cursor while the Angle or Power HUD is engaged, including the
   fallback path for browsers without the Pointer Lock API. */
body.bmd-angle-engaged,
body.bmd-angle-engaged * { cursor: none !important; }

/* ---- "Choose your tank" (js/tankChooser.js), online lobby -----------------
   Copied from Hover Blast's "Choose your hover car": a big preview of the
   tank you're on, every colour in a grid, taken ones greyed with who has it. */
.bmd-tankpick {
  position: fixed;
  inset: var(--bb-nav-h, 0px) 0 0 0;   /* below the site nav, which sits on top */
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 4, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.bmd-tankpick__card {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100dvh - var(--bb-nav-h, 0px) - 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: rgba(18, 10, 38, 0.96);
  border: 2px solid rgba(var(--game-accent-rgb), 0.8);
  box-shadow: 0 0 18px rgba(var(--game-accent-rgb), 0.4), 0 14px 34px rgba(0, 0, 0, 0.6);
  color: #fff;
}
.bmd-tankpick__x {
  position: absolute; top: 8px; right: 10px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.bmd-tankpick__title {
  margin: 0;
  text-align: center;
  font: 900 clamp(18px, 3.2vw, 26px)/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px rgba(var(--game-accent-rgb), 0.85);
}
.bmd-tankpick__stage {
  --tank-glow: #3ee8ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 0;
  padding: 6px 0 2px;
  background: radial-gradient(ellipse 46% 60% at 50% 70%, color-mix(in srgb, var(--tank-glow) 30%, transparent), transparent 70%);
}
.bmd-tankpick__hero {
  width: clamp(120px, 30vh, 280px);
  max-width: 100%;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.55));
}
.bmd-tankpick__hero[hidden] { display: none; }
.bmd-tankpick__hero-name {
  font: 900 clamp(16px, 2.6vw, 22px)/1.1 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--game-accent);
  letter-spacing: 0.03em;
}
.bmd-tankpick__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  overflow-y: auto;
  min-height: 0;
  padding: 2px 4px 4px;
  scrollbar-color: rgba(var(--game-accent-rgb), 0.6) transparent;
}
.bmd-tankpick__tank {
  --tank-glow: #3ee8ff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px 7px;
  border: 0;
  border-radius: 12px;
  background: #241a40;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #fff;
  font: 800 12px/1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.bmd-tankpick__tank .bmd-tankfig { width: 92px; }
.bmd-tankpick__tank:hover, .bmd-tankpick__tank:focus-visible {
  background: #30244f;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tank-glow) 70%, transparent), 0 0 12px color-mix(in srgb, var(--tank-glow) 40%, transparent);
  outline: none;
}
.bmd-tankpick__tank.is-mine {
  background: #3a2c18;
  box-shadow: inset 0 0 0 2px var(--game-accent), 0 0 14px rgba(var(--game-accent-rgb), 0.5);
}
.bmd-tankpick__tank.is-taken { opacity: 0.38; filter: grayscale(0.8); cursor: not-allowed; }
.bmd-tankpick__tank em {
  position: absolute; top: 4px; right: 6px;
  font: 800 10px/1 system-ui, sans-serif; font-style: normal;
  padding: 2px 5px; border-radius: 999px; background: rgba(0, 0, 0, 0.6);
}
.bmd-tankpick__note { margin: 0; min-height: 1.2em; text-align: center; color: #ffb3c8; font-size: 12.5px; font-weight: 700; }
.bmd-tankpick__btns { display: flex; justify-content: center; gap: 10px; }
.bmd-tankpick__btns .bmd-btn { min-width: 120px; padding: 10px 16px; font-size: 14px; }
@media (max-width: 520px) {
  .bmd-tankpick { padding: 8px; }
  .bmd-tankpick__card { padding: 12px 10px 10px; }
  .bmd-tankpick__grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
  .bmd-tankpick__tank .bmd-tankfig { width: 76px; }
}

/* A tank drawn from its two art files (js/tankChooser.js tankFigure): the
   body, and the barrel raised from the gun collar. --px/--py = the collar,
   --bw/--bh = the barrel, all as shares of the body image (TANK_ART). */
.bmd-tankfig { position: relative; display: block; aspect-ratio: var(--ar); pointer-events: none; }
.bmd-tankfig img { position: absolute; display: block; max-width: none; }
.bmd-tankfig__body { inset: 0; width: 100%; height: 100%; }
.bmd-tankfig__barrel {
  left: calc(var(--px) * 100%);
  top: calc((var(--py) - var(--bh) / 2) * 100%);
  width: calc(var(--bw) * 100%);
  height: calc(var(--bh) * 100%);
  transform-origin: 0 50%;
  transform: rotate(-32deg);
}

/* --------------------------------------------------------------------------
   Weapon Select (js/weaponShop.js): before each match the two sides take turns
   picking the match's weapons from a pool. Covers the field, not the control
   bar. Sized from its own box (cqh / cqw), so it fits any board.
   -------------------------------------------------------------------------- */
.bmd-shop {
  position: absolute;
  inset: 0;
  z-index: 4;                                   /* under the pause cover (5) */
  container-type: size;
  border-radius: inherit;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(70, 40, 120, 0.55), rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, rgba(6, 4, 16, 0.94) 0%, rgba(20, 8, 44, 0.94) 60%, rgba(46, 12, 88, 0.94) 100%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.bmd-shop[hidden] { display: none; }
.bmd-shop__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2.4cqh 2.2cqw 2cqh;
  box-sizing: border-box;
}
.bmd-shop__title {
  margin: 0 0 1.2cqh;
  text-align: center;
  font: 900 min(7cqh, 5.4cqw) / 1 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #c9cfd8 45%, #7d8794 55%, #e3e7ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0.35cqh 0 rgba(0, 0, 0, 0.75));
}
.bmd-shop__row {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr) minmax(0, 1fr);
  gap: 1.6cqw;
}

/* Each side: the player's avatar and name, then their panel of picks. */
.bmd-shop__side { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bmd-shop__who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6cqh;
  margin-bottom: 1cqh;
}
.bmd-shop__avatar {
  width: min(9cqh, 7cqw);
  height: min(9cqh, 7cqw);
  border-radius: 50%;
  object-fit: cover;
  background: #1b1030;
  border: max(2px, 0.45cqh) solid var(--pc);
  box-shadow: 0 0 1.4cqh color-mix(in srgb, var(--pc) 60%, transparent);
}
.bmd-shop__name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 900 min(3.8cqh, 2.6cqw) / 1.1 "Segoe UI", system-ui, sans-serif;
  color: var(--pc);
  text-shadow: 0 0.3cqh 0 #000;
}
.bmd-shop__list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 1.2cqh 0.9cqw;
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(10, minmax(0, 1fr));
  align-content: start;
  column-gap: 0.6cqw;
  border: max(2px, 0.45cqh) solid var(--pc);
  border-radius: 1.4cqh;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), color-mix(in srgb, var(--pd) 35%, rgba(0, 0, 0, 0.55)));
  box-shadow: inset 0 0 2cqh rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.25s;
}
.bmd-shop__side.is-picking .bmd-shop__list {
  box-shadow: inset 0 0 2cqh rgba(0, 0, 0, 0.6), 0 0 2.2cqh color-mix(in srgb, var(--pc) 65%, transparent);
}
.bmd-shop__pick {
  display: flex;
  align-items: center;
  gap: 0.7cqw;
  min-width: 0;
  font: 700 min(2.7cqh, 1.55cqw) / 1.15 "Segoe UI", system-ui, sans-serif;
  animation: bmd-shop-in 0.28s ease-out;
}
@keyframes bmd-shop-in { from { opacity: 0; transform: translateY(-0.8cqh) scale(0.94); } to { opacity: 1; transform: none; } }

/* The pool in the middle. */
.bmd-shop__mid { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.bmd-shop__prompt {
  text-align: center;
  font: 800 min(4.2cqh, 2.8cqw) / 1.2 "Segoe UI", system-ui, sans-serif;
  margin-bottom: 1cqh;
  text-shadow: 0 0.3cqh 0 #000;
}
.bmd-shop__field {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8cqw;
}
.bmd-shop__pool {
  height: 100%;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 10), minmax(0, 1fr));
  gap: 0.25cqh 1cqw;
}
.bmd-shop__weapon {
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  min-width: 0;
  padding: 0 0.6cqw;
  border: max(1px, 0.3cqh) solid transparent;
  border-radius: 0.6cqh;
  background: transparent;
  color: #fff;
  font: 700 min(2.8cqh, 1.6cqw) / 1.15 "Segoe UI", system-ui, sans-serif;
  text-align: left;
  cursor: default;
}
.bmd-shop__weapon.is-taken { visibility: hidden; }
.bmd-shop.can-pick .bmd-shop__weapon:not(.is-taken) { cursor: pointer; }
.bmd-shop.can-pick .bmd-shop__weapon:not(.is-taken):hover,
.bmd-shop.can-pick .bmd-shop__weapon:not(.is-taken):focus-visible {
  outline: none;
  border-color: #3fe0d0;
  background: rgba(63, 224, 208, 0.1);
}
.bmd-shop__wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0.2cqh 0 #000; }
.bmd-shop__icon {
  flex: 0 0 auto;
  width: min(3.6cqh, 2.4cqw);
  height: min(3.6cqh, 2.4cqw);
  object-fit: contain;
  border-radius: 0.5cqh;
  background: linear-gradient(180deg, #4b4f58, #22252b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.bmd-shop__icon--dot {
  background: radial-gradient(circle at 35% 30%, #fff, var(--wc) 45%, color-mix(in srgb, var(--wc) 50%, #000));
  border-radius: 50%;
}

/* "Pick one": the arrow beside the pool, pointing at whoever picks. */
.bmd-shop__arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8cqh;
  width: min(9cqh, 7cqw);
}
.bmd-shop__arrow[hidden] { display: flex; visibility: hidden; }
.bmd-shop__arrow-text {
  text-align: center;
  font: 800 min(2.2cqh, 1.4cqw) / 1.15 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c9ced6;
}
.bmd-shop__arrow-head {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f2f4f7 0%, #a9b0ba 50%, #6e7682 100%);
  filter: drop-shadow(0 0.4cqh 0.4cqh rgba(0, 0, 0, 0.7)) drop-shadow(0 0 0.9cqh color-mix(in srgb, var(--pc) 70%, transparent));
  clip-path: polygon(0 50%, 50% 0, 50% 28%, 100% 28%, 100% 72%, 50% 72%, 50% 100%);
  animation: bmd-shop-nudge-left 0.9s ease-in-out infinite;
}
.bmd-shop__arrow--right .bmd-shop__arrow-head {
  clip-path: polygon(100% 50%, 50% 0, 50% 28%, 0 28%, 0 72%, 50% 72%, 50% 100%);
  animation-name: bmd-shop-nudge-right;
}
@keyframes bmd-shop-nudge-left { 50% { transform: translateX(-0.8cqw); } }
@keyframes bmd-shop-nudge-right { 50% { transform: translateX(0.8cqw); } }

.bmd-shop__info {
  min-height: 2.8cqh;
  margin: 0.6cqh 0;
  text-align: center;
  font: 600 min(2.3cqh, 1.4cqw) / 1.2 "Segoe UI", system-ui, sans-serif;
  color: #d8dbe6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bmd-shop__random {
  align-self: center;
  padding: 0.6cqh 2.4cqw;
  font: 800 min(3.6cqh, 2.4cqw) / 1.1 "Segoe UI", system-ui, sans-serif;
  color: #fff;
  border: max(2px, 0.35cqh) solid #d4d8de;
  border-radius: 0.8cqh;
  background: linear-gradient(180deg, #6a707a 0%, #3a3e46 52%, #2a2d33 100%);
  box-shadow: 0 0.4cqh 0 #000, inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 0.25cqh 0 #000;
  cursor: pointer;
}
.bmd-shop__random:hover:not(:disabled) { filter: brightness(1.15); }
.bmd-shop__random:active:not(:disabled) { transform: translateY(0.3cqh); box-shadow: 0 0.1cqh 0 #000; }
.bmd-shop__random:disabled { opacity: 0.6; cursor: default; }
.bmd-shop__random[hidden] { display: none; }
/* 20 weapons each (40 in the pool): three pool columns, one 20-row column per panel, all a bit smaller. */
.bmd-shop.is-long .bmd-shop__list { grid-template-rows: repeat(20, minmax(0, 1fr)); padding-block: 0.8cqh; }
.bmd-shop.is-long .bmd-shop__pick { font-size: min(2.25cqh, 1.45cqw); gap: 0.5cqw; }
.bmd-shop.is-long .bmd-shop__pick .bmd-shop__icon { width: min(2.6cqh, 1.8cqw); height: min(2.6cqh, 1.8cqw); }
.bmd-shop.is-long .bmd-shop__weapon { font-size: min(2.4cqh, 1.45cqw); gap: 0.5cqw; }
.bmd-shop.is-long .bmd-shop__weapon .bmd-shop__icon { width: min(3cqh, 2cqw); height: min(3cqh, 2cqw); }

/* Phones (js/weaponShop.js FULL_SCREEN): the whole screen, not the small board. */
.bmd-shop.is-full { position: fixed; z-index: 120; border-radius: 0; }
@media (max-width: 700px) and (orientation: portrait) {
  /* Portrait: the two players' panels side by side on top, the pool below. */
  .bmd-shop.is-full .bmd-shop__inner { padding: calc(1.6cqh + env(safe-area-inset-top, 0px)) 3cqw calc(1.6cqh + env(safe-area-inset-bottom, 0px)); }
  .bmd-shop.is-full .bmd-shop__title { font-size: min(4.4cqh, 8cqw); }
  .bmd-shop.is-full .bmd-shop__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.4cqh 3cqw; }
  .bmd-shop.is-full .bmd-shop__side--left { grid-column: 1; grid-row: 1; }
  .bmd-shop.is-full .bmd-shop__side--right { grid-column: 2; grid-row: 1; }
  .bmd-shop.is-full .bmd-shop__mid { grid-column: 1 / -1; grid-row: 2; }
  .bmd-shop.is-full .bmd-shop__who { flex-direction: row; justify-content: center; gap: 2cqw; margin-bottom: 0.8cqh; }
  .bmd-shop.is-full .bmd-shop__avatar { width: min(5.2cqh, 10cqw); height: min(5.2cqh, 10cqw); }
  .bmd-shop.is-full .bmd-shop__name { font-size: min(2.4cqh, 4.6cqw); }
  .bmd-shop.is-full .bmd-shop__pick { font-size: min(1.75cqh, 3.4cqw); gap: 1.5cqw; }
  .bmd-shop.is-full .bmd-shop__weapon { font-size: min(2cqh, 3.8cqw); gap: 1.6cqw; }
  .bmd-shop.is-full .bmd-shop__icon { width: min(2.4cqh, 4.6cqw); height: min(2.4cqh, 4.6cqw); }
  .bmd-shop.is-full .bmd-shop__prompt { font-size: min(2.4cqh, 4.6cqw); margin-bottom: 0.5cqh; }
  .bmd-shop.is-full .bmd-shop__arrow { width: 9cqw; }
  .bmd-shop.is-full .bmd-shop__arrow-text { font-size: min(1.4cqh, 2.6cqw); }
  .bmd-shop.is-full .bmd-shop__info { font-size: min(1.6cqh, 3.2cqw); white-space: normal; min-height: 3.6cqh; }
  .bmd-shop.is-full .bmd-shop__random { font-size: min(2.6cqh, 5cqw); padding: 0.6cqh 6cqw; }
  .bmd-shop.is-full.is-long .bmd-shop__pick { font-size: min(1.2cqh, 2.6cqw); }
  .bmd-shop.is-full.is-long .bmd-shop__weapon { font-size: min(1.5cqh, 2.9cqw); }
}
