/*! 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. */
/* Cupz! -- game page (game.html).
   The table 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
   Blinkz!, Solitz! and Blockz use, so every game reads the same.

   Reskin points: the backdrop (.cpz-board background, drawn here, not on the
   canvas) and --game-accent (keep in step with --cpz-accent in menu.css). All
   the other art, and where it sits, is in js/config.js. */

:root {
  --game-accent: #27aef4;
  --game-accent-rgb: 39, 174, 244;
  --panel: #120a26;
  --text: #f4f7fb;
  --muted: #b3b6d6;
  --cpz-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(ellipse at 50% 40%, #0d1f5c, #03061c 85%),
    #03061c;
  overflow: hidden;
}

/* Full-height flex + dvh, same as the rest of the site. */
.cpz-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 hangs the scene from its bottom edge). */
.cpz-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;
}

.cpz-board {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  /* Washed back, so the timer and the cups stand out from it. */
  background:
    linear-gradient(rgba(228, 240, 255, 0.8), rgba(228, 240, 255, 0.8)),
    #0a2a8c url("../asset/img/cupz_backdrop.webp") center / cover no-repeat;
  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. */
.cpz-pause {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  /* Paused hides the table: no planning the stack with the clock stopped. */
  background: rgba(4, 12, 56, 0.62);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: pointer;
  z-index: 5;
}
.cpz-pause[hidden] { display: none; }

/* ---- sidebar folded away (net/sidebar_collapse.js, the white arrow) -------------
   The table fills the window edge to edge: no page padding, no frame.
   js/render.js stretches the table and the shelf across it and scales the
   scene up. The arrow floats over the board's edge instead of taking a strip. */
.cpz-shell { position: relative; }
body.cpz-sidebar-folded .cpz-shell { padding: 0; gap: 0; }
body.cpz-sidebar-folded .cpz-board,
body.cpz-sidebar-folded .cpz-pause { border: 0; border-radius: 0; box-shadow: none; }
body.cpz-sidebar-folded .cpz-shell > .bb-sidebar-collapse-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 2px;
}
/* On the edge the sidebar went to (data-side is set by the module). */
body.cpz-sidebar-folded .cpz-shell > .bb-sidebar-collapse-btn[data-side="right"] {
  left: auto;
  right: 2px;
}
.cpz-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;
}
.cpz-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);
}
.cpz-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) ------ */
.cpz-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.cpz-no-hud-menu #btn-settings { display: grid; }

/* ---- Sidebar -------------------------------------------------------------- */
#rightPanel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 var(--cpz-sidebar-w);
  width: var(--cpz-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.cpz-dock-left #rightPanel { order: 1; }
body.cpz-dock-left .cpz-resize-handle { order: 2; }
body.cpz-dock-left .cpz-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. */
.cpz-resize-handle {
  display: block;
  position: relative;
  flex: 0 0 10px;
  align-self: stretch;
  cursor: col-resize;
  background: transparent;
  order: 3;
}
.cpz-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;
}
.cpz-resize-handle:hover::before,
.cpz-resize-handle.cpz-resizing::before { opacity: 1; width: 4px; }
body.cpz-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. */
.cpz-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.cpz-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;
}
.cpz-stat:first-child { grid-column: 1 / -1; }
.cpz-stat__label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--game-accent);
  white-space: nowrap;
}
.cpz-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. */
.cpz-actions { display: flex; gap: 6px; margin-top: 12px; }
.cpz-actions .cpz-btn { flex: 1 1 0; padding: 10px 8px; font-size: 13.5px; }
.cpz-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); }

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

/* Statistics dialog. */
.cpz-statlist { margin: 0; display: grid; gap: 6px; }
.cpz-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); }
.cpz-statlist dt { color: var(--muted); font-weight: 700; }
.cpz-statlist dd { margin: 0; color: #fff; font-weight: 900; font-variant-numeric: tabular-nums; }

.cpz-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;
}
.cpz-btn:hover, .cpz-btn:focus-visible { filter: brightness(1.18); transform: translateY(-1px); }
.cpz-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) ---------------------------------------- */
.cpz-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);
}
.cpz-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);
}
.cpz-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;
}
.cpz-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);
}
.cpz-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). */
.cpz-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);
}
.cpz-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;
}
.cpz-modal .cpz-btn { padding: 12px 0; font-size: 14px; text-transform: uppercase; }

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

  .cpz-shell {
    flex-direction: column;
    height: auto;
    min-height: var(--bb-vh, 100dvh);
    padding: 8px;
    gap: 8px;
  }
  .cpz-stage,
  body.cpz-dock-left .cpz-stage {
    order: 1;
    flex: 0 0 auto;
    width: 100%;
    /* The scene's shape, so the table fills the width; the sidebar is a
       scroll away below. */
    height: min(calc((100vw - 16px) * 0.74), calc(var(--bb-vh, 100dvh) - 16px));
  }
  #rightPanel,
  body.cpz-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; }
  .cpz-resize-handle { display: none; }
  .hud-panel__logo { max-width: 320px; margin: 0 auto; }
  /* No folding upright: the sidebar is under the table (game.html unfolds it). */
  .cpz-shell > .bb-sidebar-collapse-btn { display: none; }
}

/* Phones on their side: keep side by side, narrower sidebar. */
@media (orientation: landscape) and (max-height: 500px) {
  :root { --cpz-phone-side-w: clamp(180px, 26vw, 240px); }
  .cpz-shell { padding: 6px; gap: 6px; }
  #rightPanel {
    flex: 0 0 var(--cpz-phone-side-w);
    width: var(--cpz-phone-side-w);
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cpz-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; }
  .cpz-stat { padding: 5px 8px; }
  .cpz-stat--score .cpz-stat__value { font-size: 22px; }
  .cpz-mode-blurb { 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.cpz-modal__label { margin: 0; }

/* ---- Cupz! HUD extras ------------------------------------------------------- */

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

/* Classic's lives: three little cups, drained as they go. */
.cpz-lives { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.cpz-lives:empty { display: none; }
.cpz-life {
  width: 20px;
  height: 24px;
  background: rgba(255, 255, 255, 0.14);
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
  transition: background 0.2s ease;
}
.cpz-life.is-on { background: var(--game-accent); }

/* Mode picker (sidebar, and the high-score tabs). */
.cpz-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);
}
.cpz-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;
}
.cpz-mode:hover { color: #fff; }
.cpz-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);
}
.cpz-mode:focus-visible { outline: 2px solid var(--game-accent); outline-offset: 1px; }
.cpz-mode-blurb { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: center; min-height: 2.8em; }
.cpz-modal .cpz-modes { margin-top: 0; }
.cpz-modes--four { grid-template-columns: repeat(2, 1fr); border-radius: 18px; }
/* Three stats: the score across the top, best + cards under it. */
.cpz-stats { grid-template-columns: 1fr 1fr; }

/* ---- Name cards over the mini tables (js/seats.js) ------------------------
   Positioned from the renderer's layout; the mini table itself is drawn on
   the canvas underneath. They stay above the win banner, so the places show. */
.cpz-seats {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.cpz-seat {
  --seat-k: 1;
  position: absolute;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: calc(8px * var(--seat-k));
  padding: calc(8px * var(--seat-k));
  border-radius: calc(16px * var(--seat-k));
  transition: box-shadow 0.18s ease;
}
.cpz-seat__avatar {
  flex: none;
  width: calc(46px * var(--seat-k));
  height: calc(46px * var(--seat-k));
  border-radius: 22%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  background: #0b1a55;
  user-select: none;
}
.cpz-seat__text { display: grid; gap: calc(4px * var(--seat-k)); min-width: 0; }
.cpz-seat__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 max(10px, calc(19px * var(--seat-k)))/1.15 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff;
}
.cpz-seat__pips { display: flex; gap: calc(4px * var(--seat-k)); flex-wrap: wrap; }
.cpz-seat__pips i {
  width: calc(11px * var(--seat-k));
  height: calc(13px * var(--seat-k));
  background: rgba(255, 255, 255, 0.2);
  clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%);
}
.cpz-seat__pips i.is-on { background: #ffe14d; }
.cpz-seat__count { font-size: calc(18px * var(--seat-k)); line-height: 1; color: #ffe14d; }
.cpz-seat.is-mine .cpz-seat__name { color: #ffe14d; }
.cpz-seat.is-out .cpz-seat__avatar { filter: grayscale(1) brightness(0.5); }
.cpz-seat.is-out .cpz-seat__name { opacity: 0.6; }
.cpz-seat.is-won { box-shadow: 0 0 0 3px #ffe14d, 0 0 calc(22px * var(--seat-k)) #ffe14d; }

/* Finishing place, the same badges as BUMPZ. */
.cpz-place {
  position: absolute;
  top: calc(-6px * var(--seat-k));
  right: calc(-4px * var(--seat-k));
  padding: 1px 7px;
  border-radius: 99px;
  border: 1px solid #fff;
  font: 900 12px/1.2 Impact, "Arial Black", sans-serif;
  letter-spacing: 0.04em;
  color: #2a1c00;
  background: #ffd23f;
}
.cpz-place[hidden] { display: none; }
.cpz-place[data-place="2"] { background: #d9dde3; }
.cpz-place[data-place="3"] { background: #e0995a; }
.cpz-place[data-place="4"], .cpz-place[data-place="last"] { background: #555; color: #fff; }
