/* BackgammonX v1.0.2 — 26-v102-play.css (new in v1.0.2)
   Owns: the PLAY AREA of v1.0.2 (js/48 and js/49 are the JS halves; js/46 and js/47 add the cube and the seats):
     • a much larger board — the board column takes the page width it is given, capped only so the whole board (with its two
       trays) fits the window height; a restrained size control beside the board scales it (js/48 remembers the choice);
     • the full-screen play view (the browser's full screen, or a full-window view where that is unavailable) with an exit key;
     • the play console in the arrangement of the owner's reference: the status across the top; the current player, Roll, the
       rolled dice, Undo and the cube key; the Available Moves row; then the game actions (saves, New Game, Pause, Combined Moves);
     • the Bar and Borne-off trays drawn with player-coloured checker pieces beside the count;
     • the footer's TrigammonX line.
   PRESENTATION ONLY and override-only: it sits after css/01–25 and edits none of them. It sets no size, position, transform or
   z-index on the board frame, the board stage, the play-area shell, the checkers on the board, the hit targets, the rotation
   stage or the dice layers; it sizes the board COLUMN (as css/16, css/23 and css/24 did) and restyles the two TRAYS' own cells
   and pieces (outside the rotating board; the geometry of the points is untouched). */

:root {
  --bgx-css-26: 1;
  /* the height the board column may take so the whole board and its trays fit the window */
  --bgx-v102-fit-h: calc(100vh - 150px);
  --bgx-v102-board-scale: 1;
}
@supports (height: 100dvh) { :root { --bgx-v102-fit-h: calc(100dvh - 150px); } }

/* ═══ 1. the larger board ═══════════════════════════════════════════════════════════════════════════════════════════
   v1.0.1 sized the column to the window height LESS the console (so a turn fitted above the fold, ≈595px at 1440×900). v1.0.2
   takes the available width, capped so the board itself fits the window; the console follows below (scrolling is fine).
   The size control multiplies that by --bgx-v102-board-scale (0.6 to 1.6), never past the width available. */
body.bgx-v1-board-first .bgx-board-row > .board-column {
  width: clamp(min(280px, calc(100% - var(--bgx-v1-side, 46px) - var(--bgx-v1-gap, 14px))),
               calc(min(100% - var(--bgx-v1-side, 46px) - var(--bgx-v1-gap, 14px), var(--bgx-v102-fit-h)) * var(--bgx-v102-board-scale, 1)),
               calc(100% - var(--bgx-v1-side, 46px) - var(--bgx-v1-gap, 14px)));
}
@media (max-width: 699px) {
  body.bgx-v1-board-first .bgx-board-row > .board-column {
    width: clamp(min(260px, 100%), calc(min(100%, var(--bgx-v102-fit-h)) * var(--bgx-v102-board-scale, 1)), 100%);
  }
}
/* the console is as wide as the board and its side tabs (never narrower than 720px where there is room), centred under it */
body.bgx-v1-board-first .bgx-play-body > .bgx-console {
  width: min(100%, max(720px, calc(min(100% - var(--bgx-v1-side, 46px) - var(--bgx-v1-gap, 14px), var(--bgx-v102-fit-h)) * var(--bgx-v102-board-scale, 1) + var(--bgx-v1-side, 46px) + var(--bgx-v1-gap, 14px))));
  max-width: none;
  margin: 0 auto;
}
@media (max-width: 699px) { body.bgx-v1-board-first .bgx-play-body > .bgx-console { width: 100%; } }

/* the restrained size control beside the board: − / Fit / + and the full-screen key */
.bgx-boardbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  font: 600 12px/1.2 var(--x-font-ui, system-ui, sans-serif);
  color: var(--x-text-muted, #c9b88f);
}
.bgx-boardbar__label { margin-right: 2px; }
.bgx-boardbar__pct { min-width: 3.4em; text-align: center; font-variant-numeric: tabular-nums; }
.bgx-boardbar button {
  min-width: 34px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--x-line, #6b5333);
  background: var(--x-surface-2, #1a1f2b);
  color: var(--x-text, #efe2c4);
  font: inherit;
  cursor: pointer;
}
.bgx-boardbar button:hover { border-color: var(--x-accent, #d8b46a); }
.bgx-boardbar button:focus-visible { outline: 3px solid #80d8ff; outline-offset: 2px; }
.bgx-boardbar button[disabled] { opacity: .45; cursor: default; }
.bgx-boardbar .bgx-boardbar__full { border-color: var(--x-accent, #d8b46a); color: var(--x-accent-text, #f0cf8c); }
@media (pointer: coarse) { .bgx-boardbar button { min-width: 44px; min-height: 44px; } }
/* the Light appearance: the same keys as the app's light buttons, and a dark focus ring that shows on the light page */
html[data-appearance="light"] .bgx-boardbar { color: #4a3100; }
html[data-appearance="light"] .bgx-boardbar button { background: #efe3c8; color: #4a3100; border-color: #8a6a2f; }
html[data-appearance="light"] .bgx-boardbar .bgx-boardbar__full { border-color: #7a5200; color: #4a3100; }
html[data-appearance="light"] .bgx-boardbar button:focus-visible { outline-color: #1d4f7a; }

/* ═══ 2. the full-screen play view ══════════════════════════════════════════════════════════════════════════════════════
   One view for the browser's full screen and for the full-window fallback: the play body covers the window (dialogs, z-index 60,
   still open above it); the board keeps its square proportions and fits the window; the console sits beside it on a wide
   screen and under it otherwise, compact and scrollable. Escape or the exit key leaves it. */
body[data-bgx-playview="on"] { overflow: hidden; }
body[data-bgx-playview="on"] .bgx-play-body {
  position: fixed;
  inset: 0;
  z-index: 55;
  margin: 0;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background-color: #070a12;
  background-image: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}
body[data-bgx-playview="on"] .bgx-board-row { --bgx-v1-side: 0px; --bgx-v1-gap: 0px; width: 100%; justify-content: center; }
/* the section's own body styles (a transparent panel inside the stack) must not show the page through the view */
body[data-bgx-playview="on"] #bgx-section-stack .bgx-play-body { background-color: #070a12; background-image: none; border: 0; border-radius: 0; box-shadow: none; }
html[data-appearance="light"] body[data-bgx-playview="on"] #bgx-section-stack .bgx-play-body { background-color: #f3eee2; }
/* the board (a square) plus its two trays and the key row fit the window height */
body[data-bgx-playview="on"] .bgx-board-row > .board-column { width: min(100%, calc(100vh - 190px)); }
@supports (height: 100dvh) {
  body[data-bgx-playview="on"] .bgx-board-row > .board-column { width: min(100%, calc(100dvh - 190px)); }
}
body[data-bgx-playview="on"] .bgx-play-body > .bgx-console { width: 100%; max-width: 900px; margin: 0; }
@media (min-aspect-ratio: 5/4) and (min-width: 900px) {
  body[data-bgx-playview="on"] .bgx-play-body { flex-direction: row; align-items: flex-start; justify-content: center; }
  body[data-bgx-playview="on"] .bgx-play-body > .bgx-board-row { width: auto; flex: 0 0 auto; }
  body[data-bgx-playview="on"] .bgx-board-row > .board-column { width: min(calc(100vw - 470px), calc(100vh - 130px)); }
  @supports (height: 100dvh) {
    body[data-bgx-playview="on"] .bgx-board-row > .board-column { width: min(calc(100vw - 470px), calc(100dvh - 130px)); }
  }
  body[data-bgx-playview="on"] .bgx-play-body > .bgx-console { flex: 0 1 420px; width: 420px; max-height: calc(100vh - 20px); overflow: auto; }
}
body[data-bgx-playview="on"] .bgx-boardbar__size { display: none; }
body[data-bgx-playview="on"] .bgx-sidetabs { display: none; }
body[data-bgx-playview="on"] .bgx-play-body > .bgx-side-column { display: none; }
.bgx-playview-exit[hidden] { display: none; }

/* ═══ 3. the play console (the owner's reference 02) ═══════════════════════════════════════════════════════════════════ */
.bgx-c2 { display: flex; flex-direction: column; gap: 10px; }
.bgx-c2-status {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 4px 10px;
  border-bottom: 1px solid rgba(120, 140, 200, .16);
}
.bgx-c2-status .dtf-status { margin: 0; font: 500 17px/1.35 var(--x-font-ui, system-ui, sans-serif); color: var(--x-text, #e0e4ea); }
.bgx-c2-status .dtf-opening-attribution,
.bgx-c2-status .dtf-result,
.bgx-c2-status .dtf-test-mode-note { margin: 0; font-size: 13px; color: var(--x-text-muted, #c9b88f); }
.bgx-c2-status .dtf-result { color: var(--x-accent-text, #f0cf8c); font-weight: 700; font-size: 15px; }
/* v1.0.5 — the finished-game message and View Certificate on one row (js/49); the key drops under the message on a narrow screen */
.bgx-c2-result-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.bgx-c2-result-row[hidden], .bgx-c2-cert[hidden] { display: none; }
.bgx-c2-status .bgx-c2-cert { min-height: 44px; padding: 6px 16px; font-weight: 700; border-color: var(--x-gold, #d8b46a); color: var(--x-accent-text, #f0cf8c); }
.bgx-c2-status .bgx-c2-cert:focus-visible { outline: 3px solid #80d8ff; outline-offset: 2px; }
html[data-appearance="light"] .bgx-c2-status .bgx-c2-cert { border-color: #7a5200; color: #5c3f00; }
.bgx-c2-main, .bgx-c2-moves, .bgx-c2-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.bgx-c2-field { display: flex; flex-direction: column; gap: 4px; }
.bgx-c2-label {
  font: 700 11px/1 var(--x-font-ui, system-ui, sans-serif);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--x-text-muted, #b9c2d3);
}
.bgx-c2-main .dtf-active-side {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 18px;
  border-radius: 999px;
  border: 2px solid currentColor;
  font: 700 17px/1.2 var(--x-font-ui, system-ui, sans-serif);
  background: rgba(255, 255, 255, .04);
}
.bgx-c2-main .dtf-active-side-label { display: none; }
.bgx-c2-main .dtf-roll-btn, .bgx-c2-actions .dtf-new-game-btn { min-height: 48px; padding: 8px 22px; font-size: 16px; }
.bgx-c2-dice .dtf-dice-stage { display: inline-flex; align-items: center; min-height: 64px; padding: 4px 8px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.bgx-c2-dice .dtf-die { width: 56px; height: 56px; }
.bgx-c2-main .bgx-undo-btn { min-height: 48px; padding: 8px 18px; }
.bgx-c2-cube-slot:empty { display: none; }
.bgx-c2-moves {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}
.bgx-c2-tiles { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bgx-c2-tile {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  border: 2px solid var(--bgx-c2-tile-line, #f08ba0);
  background: rgba(80, 10, 30, .55);
  color: #ffd6df;
  font: 800 22px/1 var(--x-font-ui, system-ui, sans-serif);
}
.bgx-c2-tile[data-state="used"] { opacity: .38; text-decoration: line-through; border-style: dashed; }
.bgx-c2-tile[data-state="unplayable"] { opacity: .5; border-color: #8a8f99; color: #c9cdd6; background: rgba(60, 64, 72, .4); }
.bgx-c2-tile__n { position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 700; opacity: .8; }
.bgx-c2-tiles-note { font-size: 13px; color: var(--x-text-muted, #b9c2d3); }
.bgx-c2-moves .bgx-route-chips { flex-basis: 100%; }
.bgx-c2-moves .bgx-dice-left { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bgx-c2-actions { padding: 2px 0 0; }
body.bgx-v1-board-first .bgx-console > .bgx-c2-actions > .bgx-saves-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; flex: 1 1 auto;
}
body.bgx-v1-board-first .bgx-c2-actions .bgx-saves-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
body.bgx-v1-board-first .bgx-c2-actions .bgx-saves-status { flex: 1 1 100%; margin: 0; font-size: 12px; }
/* the game keys below the console keep the measured key look they had inside the HUD (css/11, css/16, css/22) */
.bgx-c2-actions .x-button { min-height: 44px; border-radius: var(--x-radius-sm); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.bgx-c2-actions [data-action="dtf-new-game"], .bgx-c2-actions .bgx-c2-pause { border: 1px solid rgba(230, 230, 235, 0.72); }
html[data-appearance="light"] .bgx-c2-actions [data-action="dtf-new-game"], html[data-appearance="light"] .bgx-c2-actions .bgx-c2-pause { border-color: #5c625d; }
html[data-appearance="dark"] .bgx-c2-actions .x-button {
  background-color: var(--x-panel-2);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  box-shadow: var(--x-key-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s, color 0.15s;
}
html[data-appearance="dark"] .bgx-c2-actions .x-button:hover:not(:disabled) { box-shadow: var(--x-key-shadow-hover); filter: none; }
html[data-appearance="dark"] .bgx-c2-actions .x-button:active:not(:disabled) { transform: translateY(2px); box-shadow: var(--x-key-shadow-active); }
html[data-appearance="dark"] .bgx-c2-actions .x-button:disabled { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 1px 0 rgba(0, 0, 0, 0.5); }
html[data-appearance="dark"] .bgx-c2-actions .dtf-new-game-btn { background-color: #221a13; background-image: none; border-color: #8a6d45; color: #e0c48f; }
html[data-appearance="dark"] .bgx-c2-actions .dtf-new-game-btn:hover:not(:disabled) { background-color: #8a6d45; color: #140f08; }
html[data-appearance="dark"] .bgx-c2-actions .bgx-c2-pause { color: var(--x-text); }
.bgx-c2-pause[aria-pressed="true"] { border-color: #6fe0c1; color: #8ff0d4; }
body .bgx-console > .dtf-hud > .bgx-c2-emptied, body .dtf-hud > .bgx-c2-emptied { display: none; }
/* the HUD is now the box of this console: it is no longer css/23's grid / flex row of its own keys */
body .bgx-console > .dtf-hud.bgx-c2-host { display: block; }
body .bgx-console > .dtf-hud.bgx-c2-host::after { content: none; }
body .bgx-console > .dtf-hud.bgx-c2-host .bgx-c2 :is(.dtf-roll-btn, .dtf-new-game-btn, .bgx-undo-btn, .bgx-combo-toggle) { width: auto; min-width: 0; grid-column: auto; }
body .bgx-console > .dtf-hud.bgx-c2-host .bgx-c2 .dtf-active-side { grid-column: auto; margin: 0; }
/* the keys keep the order of their row (css/23 had ordered them inside the v0.3.06 rows) */
body .bgx-console > .dtf-hud .bgx-c2 :is(.dtf-roll-btn, .dtf-new-game-btn, .bgx-undo-btn, .bgx-combo-toggle, .dtf-dice-stage, .dtf-active-side, .bgx-saves-buttons) { order: 0; margin: 0; }
/* the dice animation still starts from the tray's origin; the marker itself is not shown in this console */
.bgx-c2-dice .dtf-dice-tray-origin { visibility: hidden; }
@media (max-width: 699px) {
  .bgx-c2 { gap: 8px; }
  .bgx-c2-status { padding: 0 4px 6px; }
  .bgx-c2-status .dtf-status { font-size: 15px; }
  .bgx-c2-main { gap: 8px 10px; }
  /* on a phone the field names are spoken, not shown, so the turn, ROLL, the dice and Undo take two short lines */
  .bgx-c2-main .bgx-c2-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bgx-c2-main .dtf-active-side { min-height: 44px; padding: 4px 14px; font-size: 16px; }
  .bgx-c2-dice .dtf-dice-stage { min-height: 56px; padding: 4px 6px; }
  .bgx-c2-dice .dtf-die { width: 48px; height: 48px; }
  .bgx-c2-main .dtf-roll-btn { flex: 1 1 auto; }
  .bgx-c2-moves { padding: 6px 8px; }
}

/* ═══ 4. the trays: player-coloured pieces beside the count (Bar and Borne off) ═════════════════════════════════════════
   The pieces are js/20's own markers (the Bar ones are js/21's re-entry keys when the Bar is a legal source); here they become
   pieces of the same colours as the board's checkers, in a tray, never clipped: up to 15 overlap to fit; the count stays. */
body.bgx-v1-board-first .bgx-rail-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
body.bgx-v1-board-first .bgx-rail-cell {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: calc(var(--bgx-v102-chip, 16px) + 10px);
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(255, 255, 255, .07);
}
body.bgx-v1-board-first .bgx-rail-checkers {
  --bgx-v102-chip: var(--bgx-rail-marker-size, 16px);   /* exactly a board checker's own diameter (js/20 measures it), as since v0.2.12 */
  position: static;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  align-items: center;
  padding: 2px 0;
}
body.bgx-v1-board-first .bgx-rail-checker {
  width: var(--bgx-v102-chip);
  height: var(--bgx-v102-chip);
  flex: 0 1 var(--bgx-v102-chip);
  min-width: 6px;
}
body.bgx-v1-board-first .bgx-rail-checker + .bgx-rail-checker { margin-left: calc(var(--bgx-v102-chip) * -0.38); }
body.bgx-v1-board-first .bgx-rail-cell-text { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 699px) {
  body.bgx-v1-board-first .bgx-rail-cell { flex-direction: column; align-items: stretch; gap: 4px; }
  body.bgx-v1-board-first .bgx-rail-checkers { width: 100%; flex: 0 0 auto; justify-content: flex-start; }
}

/* ═══ 5. the footer's TrigammonX line ═══════════════════════════════════════════════════════════════════════════════════ */
.bgx-footer-tx { margin: 18px auto 4px; text-align: center; max-width: 60rem; }
.bgx-tx-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--x-accent-text, #f0cf8c);
  text-decoration: underline;
  text-underline-offset: 3px;
  font: italic 600 16px/1.5 Georgia, "Times New Roman", serif;
}
.bgx-tx-link:hover { color: #fff0cd; }
.bgx-tx-link:focus-visible { outline: 3px solid #f6d88f; outline-offset: 2px; }
.bgx-footer-meta { margin: 6px 0 0; font-size: 12px; color: var(--x-text-muted, #cbb68b); }
.bgx-footer-meta a { color: inherit; text-decoration: underline; }
html[data-appearance="light"] .bgx-tx-link { color: #6b4a12; }

/* ═══ 6. seats, Basic AI and Pause (js/45, js/47) ════════════════════════════════════════════════════════════════════════ */
.bgx-seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid rgba(230, 230, 235, 0.55); border-radius: 10px; overflow: hidden; }
.bgx-seg__opt {
  min-height: 36px;
  padding: 4px 12px;
  border: 0;
  border-right: 1px solid rgba(230, 230, 235, 0.25);
  background: transparent;
  color: var(--x-text, #e6e9ef);
  font: 600 13px/1.2 var(--x-font-ui, system-ui, sans-serif);
  cursor: pointer;
}
.bgx-seg__opt:last-child { border-right: 0; }
.bgx-seg__opt[aria-pressed="true"] { background: #d8b46a; color: #15110a; }
.bgx-seg__opt:focus-visible { outline: 3px solid #80d8ff; outline-offset: -3px; }
@media (pointer: coarse) { .bgx-seg__opt { min-height: 44px; } }
html[data-appearance="light"] .bgx-seg { border-color: #8a6a2f; }
html[data-appearance="light"] .bgx-seg__opt { color: #4a3100; border-right-color: rgba(138, 106, 47, 0.4); }
html[data-appearance="light"] .bgx-seg__opt[aria-pressed="true"] { background: #7a5200; color: #fff; }
html[data-appearance="light"] .bgx-seg__opt:focus-visible { outline-color: #1d4f7a; }
.bgx-player-seat-row { flex-wrap: wrap; gap: 6px 8px; }
.bgx-seat-options { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 2px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.bgx-seat-option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bgx-seat-option__label { font: 700 12px/1.2 var(--x-font-ui, system-ui, sans-serif); letter-spacing: .04em; color: var(--x-text-muted, #c9b88f); min-width: 6.5em; }
.bgx-seat-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--x-text-muted, #c9b88f); }
html[data-appearance="light"] .bgx-seat-option__label, html[data-appearance="light"] .bgx-seat-note { color: #5a4316; }
.bgx-player-card[data-seat-type="ai"] .bgx-player-role { color: #8ff0d4; font-weight: 700; }
html[data-appearance="light"] .bgx-player-card[data-seat-type="ai"] .bgx-player-role { color: #0b6b55; }
.bgx-c2-control-note { margin: 2px 0 0; font: 600 14px/1.4 var(--x-font-ui, system-ui, sans-serif); color: #8ff0d4; }
html[data-appearance="light"] .bgx-c2-control-note { color: #0b6b55; }
.bgx-c2-control-note[hidden] { display: none; }
/* paused: the board is quietly dimmed and says so; nothing on it answers until Resume */
.bgx-paused-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.86);
  border: 1px solid rgba(143, 240, 212, 0.7);
  color: #e9fff8;
  font: 700 18px/1.2 var(--x-font-ui, system-ui, sans-serif);
  letter-spacing: .06em;
  pointer-events: none;
}
.bgx-paused-banner[hidden] { display: none; }
body[data-bgx-paused="on"] #bgx-play-area-shell .board-frame { filter: saturate(.55) brightness(.8); }

/* ═══ 7. the doubling cube (js/46) ═══════════════════════════════════════════════════════════════════════════════════════
   The picture sits on the board's right-hand edge, in the corners the hexagonal frame leaves free (never over a point): centred at
   the middle, or on its owner's side (top or bottom). Its size is a share of the board, so it follows the board's size. */
.bgx-cube-dock {
  position: absolute;
  right: 0.6%;
  width: 9.5%;
  aspect-ratio: 1 / 1;
  z-index: 6;
  transition: top 0.35s ease;
  pointer-events: none;
}
.bgx-cube-dock[hidden] { display: none; }
.bgx-cube-dock[data-bgx-cube-at="middle"] { top: 45.25%; }
.bgx-cube-dock[data-bgx-cube-at="top"] { top: 15.5%; }
.bgx-cube-dock[data-bgx-cube-at="bottom"] { top: 75%; }
@media (prefers-reduced-motion: reduce) { .bgx-cube-dock { transition: none; } }
.bgx-cube {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 14%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.bgx-cube:focus-visible { outline: 3px solid #80d8ff; outline-offset: 2px; }
.bgx-cube__img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)); }
.bgx-cube__img[hidden] { display: none; }
/* above 64: an honest numeric cube in the same colours, showing the exact value */
.bgx-cube__num {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 16%;
  border: 3px solid #d8b46a;
  background: linear-gradient(160deg, #1d2a44, #0b1220);
  color: #f3d58c;
  font: 700 clamp(9px, 2.2vw, 22px)/1 Georgia, "Times New Roman", serif;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55);
}
.bgx-cube__num[hidden] { display: none; }
.bgx-cube-dock[data-pending="true"] .bgx-cube { box-shadow: 0 0 0 3px rgba(143, 240, 212, 0.9), 0 0 16px rgba(143, 240, 212, 0.6); }
/* the console's cube field, its keys and the question a double asks */
.bgx-c2-cube-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.bgx-c2-cube-slot:empty { display: none; }
.bgx-cube-caption { font: 600 13px/1.3 var(--x-font-ui, system-ui, sans-serif); color: var(--x-text, #e6e9ef); max-width: 18em; }
.bgx-cube-field { align-items: flex-start; }
.bgx-cube-field .bgx-cube-help { padding: 2px 0; min-height: 0; font-size: 12px; }
@media (pointer: coarse) { .bgx-cube-field .bgx-cube-help { min-height: 44px; } }
.bgx-cube-offer[hidden], .bgx-cube-help[hidden] { display: none; }
.bgx-c2-main .bgx-cube-offer { min-height: 44px; padding: 6px 14px; border: 1px solid #d8b46a; color: #f0cf8c; }
html[data-appearance="light"] .bgx-c2-main .bgx-cube-offer { border-color: #7a5200; color: #4a3100; }
.bgx-cube-question {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid rgba(143, 240, 212, 0.75);
  background: rgba(20, 60, 52, 0.45);
}
.bgx-cube-question[hidden] { display: none; }
.bgx-cube-question__text { margin: 0 0 8px; font: 700 16px/1.35 var(--x-font-ui, system-ui, sans-serif); color: #e9fff8; }
.bgx-cube-question__keys { display: flex; flex-wrap: wrap; gap: 10px; }
.bgx-cube-question__keys .x-button { min-height: 48px; min-width: 110px; font-size: 16px; font-weight: 700; }
.bgx-cube-question__keys .x-button[hidden] { display: none; }
.bgx-cube-take { border: 2px solid #6fe0c1; color: #8ff0d4; }
.bgx-cube-pass { border: 2px solid #f0a0a8; color: #ffc9cf; }
.bgx-cube-question__help { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: #cfeee6; }
html[data-appearance="light"] .bgx-cube-question { background: #e7f6f1; border-color: #0b6b55; }
html[data-appearance="light"] .bgx-cube-question__text { color: #08392f; }
html[data-appearance="light"] .bgx-cube-question__help { color: #18463c; }
html[data-appearance="light"] .bgx-cube-take { border-color: #0b6b55; color: #0b4f40; }
html[data-appearance="light"] .bgx-cube-pass { border-color: #9b2232; color: #7a1626; }
html[data-appearance="light"] .bgx-cube-caption { color: #2b2418; }
.bgx-cube-points { margin: 4px 0 0; font: 700 14px/1.35 var(--x-font-ui, system-ui, sans-serif); color: var(--x-accent-text, #f0cf8c); }
.bgx-cube-points[hidden] { display: none; }
html[data-appearance="light"] .bgx-cube-points { color: #6b4a12; }
.bgx-cube-switch__note { flex-basis: 100%; font-size: 12px; color: var(--x-text-muted, #c9b88f); }
html[data-appearance="light"] .bgx-cube-switch__note { color: #5a4316; }
.bgx-cube-howto p { margin: 0 0 10px; line-height: 1.5; }

/* v1.0.3 — a seat chosen for the next new game (independent review R1) */
.bgx-seat-next { font: 600 12px/1.3 var(--x-font-ui, system-ui, sans-serif); color: #8ff0d4; }
.bgx-seat-next[hidden] { display: none; }
html[data-appearance="light"] .bgx-seat-next { color: #0b6b55; }

/* v1.0.4 — Scotty's control in Players / Seats (js/52): On / Off, his style, his volume; a compact row group in the seat options */
.bgx-scotty { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.bgx-scotty-style { min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(230, 230, 235, 0.55); background: #11182a; color: #f3ead7; font: 600 13px/1.2 var(--x-font-ui, system-ui, sans-serif); }
.bgx-scotty-style:focus-visible, .bgx-scotty-volume:focus-visible { outline: 3px solid #80d8ff; outline-offset: 2px; }
.bgx-scotty-volume { width: min(180px, 46vw); accent-color: #d8b46a; }
.bgx-scotty-volume-value { min-width: 3em; font: 600 12px/1 var(--x-font-ui, system-ui, sans-serif); color: var(--x-text-muted, #c9b88f); }
.bgx-scotty[data-on="false"] .bgx-scotty-style-row, .bgx-scotty[data-on="false"] .bgx-scotty-volume-row { opacity: 0.55; }
@media (pointer: coarse) { .bgx-scotty-style, .bgx-scotty-volume { min-height: 44px; } }
html[data-appearance="light"] .bgx-scotty { border-top-color: rgba(0, 0, 0, 0.12); }
html[data-appearance="light"] .bgx-scotty-style { background: #fff; color: #2a1d05; border-color: #8a6a2f; }
html[data-appearance="light"] .bgx-scotty-volume-value { color: #5a4316; }

/* v1.0.5 — the Music control (js/53): one compact row in the play console under the game's keys — On / Off, the track, the volume;
   it wraps on a narrow screen and every key is a 44px target */
.bgx-music { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 8px 0 0; padding: 8px 10px; border: 1px solid rgba(120, 140, 200, .16); border-radius: 10px; }
.bgx-music__label { font: 700 14px/1.2 var(--x-font-ui, system-ui, sans-serif); color: var(--x-accent-text, #f0cf8c); white-space: nowrap; }
.bgx-music__field { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1.2 var(--x-font-ui, system-ui, sans-serif); color: var(--x-text-muted, #c9b88f); }
.bgx-music__track { min-height: 44px; max-width: 12em; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(230, 230, 235, 0.55); background: #11182a; color: #f3ead7; font: 600 13px/1.2 var(--x-font-ui, system-ui, sans-serif); }
.bgx-music__volume { width: min(160px, 40vw); min-height: 44px; accent-color: #d8b46a; }
.bgx-music__value { min-width: 3em; font: 600 12px/1 var(--x-font-ui, system-ui, sans-serif); color: var(--x-text-muted, #c9b88f); }
.bgx-music__track:focus-visible, .bgx-music__volume:focus-visible { outline: 3px solid #80d8ff; outline-offset: 2px; }
.bgx-music .bgx-seg__opt { min-height: 44px; }
.bgx-music__status { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--x-text-muted, #c9b88f); }
.bgx-music__status[hidden] { display: none; }
html[data-appearance="light"] .bgx-music { border-color: rgba(0, 0, 0, 0.14); }
html[data-appearance="light"] .bgx-music__label { color: #5c3f00; }
html[data-appearance="light"] .bgx-music__field, html[data-appearance="light"] .bgx-music__value, html[data-appearance="light"] .bgx-music__status { color: #5a4316; }
html[data-appearance="light"] .bgx-music__track { background: #fff; color: #2a1d05; border-color: #8a6a2f; }
