/* =========================
   Game Shell Layout (Desktop)
   ========================= */

@media (min-width: 960px) {
  .scorecard-container {
    max-width: min(1920px, 100vw);
    margin-left: auto;
    margin-right: auto;
    border-radius: 18px 18px 0 0;
  }

  .game-section {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    position: relative;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    background: linear-gradient(
      to bottom,
      var(--bg) 0px,
      var(--panel-alt) 40px,
      var(--panel-alt) calc(100% - 40px),
      var(--bg) 100%
    );
  }

  .game-section::before,
  .game-section::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: max(0px, calc(50vw - 619px));
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(120% 85% at 50% 0%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 56%),
      repeating-linear-gradient(135deg, rgba(136, 165, 191, 0.18) 0 10px, rgba(136, 165, 191, 0.08) 10px 20px),
      linear-gradient(180deg, rgba(223, 233, 244, 0.92), rgba(209, 221, 234, 0.82));
    box-shadow: inset -1px 0 0 var(--line-mute);
  }

  .game-section::before { left: 0; }

  .game-section::after {
    right: 0;
    box-shadow: inset 1px 0 0 var(--line-mute);
  }

  :root:not([data-theme="light"]) .game-section::before,
  :root:not([data-theme="light"]) .game-section::after {
    background:
      radial-gradient(120% 85% at 50% 0%, rgba(151, 185, 210, 0.28), rgba(151, 185, 210, 0) 56%),
      repeating-linear-gradient(135deg, rgba(99, 138, 171, 0.24) 0 10px, rgba(99, 138, 171, 0.12) 10px 20px),
      linear-gradient(180deg, rgba(19, 37, 56, 0.82), rgba(12, 26, 40, 0.74));
    box-shadow: inset -1px 0 0 var(--line-warm);
  }

  :root:not([data-theme="light"]) .game-section::after {
    box-shadow: inset 1px 0 0 var(--line-warm);
  }

  .game-section > * {
    max-width: 1238px;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative;
    z-index: 1;
  }

  :root[data-font-size="large"] .game-section > * {
    max-width: 1486px;
  }

  .live-results-card,
  .banker-header-totals,
  .vegas-rotation-breakdown,
  #gameTotalsCard {
    border-radius: 18px;
  }

  body.mode-games .game-section[aria-hidden="false"] .results-card-wrap {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1032px, 100vw);
    max-width: 100vw;
  }

  :root[data-font-size="large"] body.mode-games .game-section[aria-hidden="false"] .results-card-wrap {
    width: min(1238px, 100vw);
  }

  body.mode-games .game-section[aria-hidden="false"] .results-card-wrap .banker-header-totals,
  body.mode-games .game-section[aria-hidden="false"] .results-card-wrap .live-results-card {
    border-left: revert;
    border-right: revert;
    border-radius: 18px 18px 0 0;
  }

  body.mode-games .game-section[aria-hidden="false"] .results-card-wrap.is-collapsed .results-collapse-bar {
    border-left: revert;
    border-right: revert;
    border-radius: 18px 18px 0 0;
  }

  #gameTotalsCard {
    width: 100%;
    box-sizing: border-box;
  }
}

/* =========================
   Games Launcher / Sections
   Appended from main.css
   ========================= */

/* =========================
   Games Launcher / Sections
   ========================= */
.games-launcher-shell {
  margin: var(--space-xs) var(--space-lg) 0;
}

.games-controls-shell {
  background: var(--panel-alt);
  border-top: 2px solid var(--line);
  border-left: none;
  border-right: none;
  border-radius: 0;
  overflow: hidden;
  margin: 0;
  padding-bottom: 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--footer-bottom-offset, 0px);
  z-index: 34;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.games-card-footer {
  min-height: 53px;
  padding: 3px 8px 0;
  border-top: none;
}

.games-controls-shell .games-launcher-shell {
  margin: 0;
  width: 100%;
  position: relative;
}

/* Mini scroll indicator track + thumb. Always rendered so its height is
   reserved on first paint — prevents the footer from bouncing 7px when JS
   later adds the overflow class. Thumb is hidden until overflow detected. */
.gamesbar-scroll-indicator {
  position: relative;
  height: 3px;
  margin: 4px 8px 0;
  border-radius: 2px;
  background: rgba(74, 158, 255, 0.18);
  pointer-events: none;
}

.gamesbar-scroll-indicator__thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 2px;
  background: #4a9eff;
  opacity: 0;
  transition: left 80ms linear, width 120ms ease, opacity 120ms ease;
}

.games-launcher-shell.has-scroll-overflow .gamesbar-scroll-indicator__thumb {
  opacity: 0.95;
}
.games-controls-shell .gamesbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.games-controls-shell .game-toggle-item {
  scroll-snap-align: start;
}

.games-controls-shell .gamesbar::-webkit-scrollbar {
  display: none;
}

.games-controls-shell .game-toggle-item {
  flex: 0 0 auto;
  min-width: 128px;
}

.gamesbar {
  margin: 0;
  display: flex;
  gap: var(--games-launcher-gap, 6px);
  flex-wrap: wrap;
  align-items: center;
  overflow: visible;
  position: relative;
}

body.mode-games .gamesbar {
  margin-top: 0;
}

.game-toggle-item {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
}

.gamesbar::-webkit-scrollbar {
  display: none;
}

.game-toggle {
  cursor: pointer;
  border: 2px solid var(--line);
  background: var(--panel-alt);
  border-radius: var(--radius-3xl);
  padding: 10px 2px;
  min-height: var(--footer-action-h);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  white-space: nowrap;
  -webkit-tap-highlight-color: rgba(104, 211, 145, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  position: relative;
  z-index: 1;
  font-size: 19px;
}

.game-toggle.active {
  background: rgba(74, 158, 255, 0.2);
  border-color: #4a9eff;
  color: #d8ecff;
  box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.45), 0 0 0 1px rgba(74, 158, 255, 0.25);
}

/* Pop keyframe plays when a game tab becomes active (JS adds/removes class) */
@keyframes gameTabActivate {
  0%   { transform: scale(0.93); }
  55%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.game-toggle.tab-activating {
  animation: gameTabActivate 220ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.game-section {
  display: none;
  position: relative;
  margin: 0 0 24px;
  padding: 0 0 var(--space-md);
  border: none;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: var(--panel-alt);
  overflow: visible;
}

.game-section.open {
  display: block;
}

/* Game tables stretch edge-to-edge; inset only non-table children. */
.game-section > *:not(.vegas-wrap):not(.banker-wrap):not(.live-results-panel):not(.live-results-card):not(#bankerFooterTotals):not(.vegas-controls):not(.hilo-bottom-results):not(.game-options-panel):not(.results-card-wrap):not(.game-scroll-body) {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Scroll body is the sole vertical-scroll container inside each game section.
   Its direct children get the same side padding as game-section direct children. */
.game-scroll-body {
  padding-left: 0;
  padding-right: 0;
}

.game-scroll-body > *:not(.vegas-wrap):not(.banker-wrap) {
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

/* Game options open as a popover over the game content (do not reflow table). */
.game-section > .game-options-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--game-sticky-head-top, 0px) + 52px);
  z-index: 60;
  margin: 0;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  background: var(--panel-alt, #1a2a38);
  border: 1.5px solid var(--line, #2b3a47);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.game-section h2 {
  margin: 0;
  font-size: var(--text-lg);
  line-height: 1.1;
}

.game-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
  padding: 6px 0;
  min-height: 44px;
  position: sticky;
  top: 0;
  z-index: 31;
  background: var(--panel-alt);
  box-shadow: 0 2px 0 0 var(--line);
  overflow: visible;
}

.game-section-header h2 {
  margin: 0;
  flex: 1 1 auto;
}

.skins-header-value {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-left: 6px;
}

.game-section-header .controls {
  display: flex;
  align-items: center;
  margin: 0;
  flex: 0 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  overflow: visible;
}

.game-activity-toggle {
  min-width: 88px;
  justify-content: center;
}

.game-activity-toggle.is-inactive,
.game-activity-toggle[data-active="false"] {
  background: color-mix(in srgb, var(--panel-alt) 88%, transparent);
  border-color: color-mix(in srgb, #d17a7a 54%, var(--line));
  color: color-mix(in srgb, #efb0b0 88%, var(--text));
  box-shadow: none;
}

.game-section.is-inactive > :not(.game-section-header):not(.game-inactive-state) {
  display: none !important;
}

.game-inactive-state {
  margin: 14px 0 8px;
  padding: 18px 14px;
  border: 1px dashed color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-alt) 82%, transparent);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.game-toggle.is-inactive {
  opacity: 0.55;
}

.live-results-card {
  display: block;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 6px 16px color-mix(in srgb, #000 10%, transparent);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.live-results-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.live-results-table th,
.live-results-table td {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  text-align: center;
  padding: 7px 8px;
  white-space: nowrap;
  font-size: var(--text-md);
}

.live-results-title-row th {
  height: 34px;
  font-size: var(--text-md);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--panel-alt) 96%, transparent),
    color-mix(in srgb, var(--panel-alt) 90%, transparent)
  );
  color: var(--ink);
}

.live-results-data-row td {
  height: var(--touch-min);
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}

.live-results-table tbody tr.live-results-data-row:nth-child(odd) td {
  background: color-mix(in srgb, var(--panel) 97%, transparent);
}

.live-results-table tbody tr.live-results-data-row:nth-child(even) td {
  background: color-mix(in srgb, var(--panel-alt) 90%, transparent);
}

.live-results-table tbody tr.live-results-data-row:hover td {
  background: color-mix(in srgb, var(--panel-alt) 84%, transparent);
}.game-totals-hilo-mini-table tbody th,
.game-totals-hilo-mini-table tbody td {
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.game-totals-skins-mini-table tbody th,
.game-totals-skins-mini-table tbody td {
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.live-results-label {
  text-align: left;
  font-weight: 700;
  position: sticky;
  left: 0;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  z-index: 2;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  padding-left: 8px;
  padding-right: 8px;
  box-shadow: 2px 0 0 0 var(--line);
}

.live-results-title-row .live-results-label {
  background: color-mix(in srgb, var(--panel-alt) 95%, transparent);
}

.live-results-data-row .live-results-label {
  background: color-mix(in srgb, var(--panel) 96%, transparent);
}

.live-results-table td:not(.live-results-label),
.live-results-table th:not(.live-results-label) {
  font-variant-numeric: tabular-nums;
}

.live-results-table td.banker-total-positive,
.live-results-table th.banker-total-positive {
  color: var(--accent);
  font-weight: 700;
}

.live-results-table td.banker-total-negative,
.live-results-table th.banker-total-negative {
  color: var(--danger);
  font-weight: 700;
}

.live-results-table tr:last-child td {
  border-bottom: none;
}

.live-results-card.is-disabled {
  background: color-mix(in srgb, var(--panel) 82%, #808080 18%);
}

.live-results-card.is-disabled .live-results-table {
  opacity: 0.72;
}

.live-results-card.is-disabled .live-results-warning-row td {
  opacity: 1;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

.vegas-results-placeholder .live-results-warning-row td {
  height: 34px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.vegas-results-table {
  table-layout: fixed;
}

/* Rotation settlement: let columns size naturally and scroll when narrow */
.vegas-results-table.is-rotation {
  table-layout: auto;
  width: max-content;
  min-width: 460px;
}

.vegas-results-table col.lr-col-label,
.wolf-results-table col.lr-col-label {
  width: 60px;
}

.hilo-results-table col.lr-col-label {
  width: 160px;
}

.hilo-results-table {
  table-layout: auto;
}

.hilo-results-table .live-results-label {
  position: sticky;
  left: 0;
  background: var(--panel);
  z-index: 1;
  text-align: left;
  font-weight: 600;
  width: 160px;
  min-width: 120px;
  max-width: 200px;
  box-shadow: 2px 0 0 0 var(--line);
  white-space: normal;
}

.live-results-title-row .hilo-results-table .live-results-label {
  background: var(--panel-alt);
}

.hilo-results-table .live-results-data-row .live-results-label {
  background: transparent;
}

.vegas-results-table .live-results-label {
  position: static;
  left: auto;
  z-index: auto;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  padding-left: 6px;
  padding-right: 6px;
  box-shadow: none;
}

.wolf-results-table {
  table-layout: fixed;
}

.wolf-results-table .live-results-label {
  position: static;
  left: auto;
  z-index: auto;
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  padding-left: 5px;
  padding-right: 5px;
  box-shadow: none;
}

/* Compact layout on narrow screens so all player columns fit without scrolling */
@media (max-width: 600px) {
  .live-results-table th,
  .live-results-table td {
    padding: 4px 5px;
    font-size: var(--text-sm);
  }
  .live-results-title-row th {
    height: 28px;
    font-size: var(--text-sm);
  }
  .live-results-data-row td {
    height: 36px;
  }

  .vegas-results-table .live-results-label {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .wolf-results-table .live-results-label {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

/* Persistent bottom results cards (Vegas, Junk) + Banker bottom totals */
.vegas-bottom-results,
.hilo-bottom-results,
.junk-bottom-results,
.wolf-bottom-results,
#bankerFooterTotals {
  margin: 10px 0 0;
}

#bankerFooterTotals {
  position: static;
  z-index: auto;
}

/* Keep game results cards pinned above the fixed games footer while a game tab is visible.
   Table viewport/padding adjustments are handled in JS so rows can still scroll past hole 18. */
body.mode-games #bankerSection[aria-hidden="false"],
body.mode-games #vegasSection[aria-hidden="false"],
body.mode-games #hiloSection[aria-hidden="false"],
body.mode-games #junkSection[aria-hidden="false"],
body.mode-games #wolfSection[aria-hidden="false"] {
  padding-bottom: 108px;
}

body.mode-games #bankerSection[aria-hidden="false"] #bankerResultsWrap,
body.mode-games #vegasSection[aria-hidden="false"] #vegasResultsWrap,
body.mode-games #hiloSection[aria-hidden="false"] #hiloResultsWrap,
body.mode-games #junkSection[aria-hidden="false"] #junkResultsWrap,
body.mode-games #wolfSection[aria-hidden="false"] #wolfResultsWrap {
  position: fixed;
  left: 0;
  right: 0;
  /* Sit flush above the fixed games footer. JS sets --games-footer-h. */
  bottom: calc(var(--games-footer-h, 126px) + var(--footer-bottom-offset, 0px) + 4px);
  z-index: 35;
  margin: 0;
  pointer-events: none;
}

body.mode-games #bankerSection[aria-hidden="false"] #bankerResultsWrap .banker-header-totals,
body.mode-games #vegasSection[aria-hidden="false"] #vegasResultsWrap .live-results-card,
body.mode-games #hiloSection[aria-hidden="false"] #hiloResultsWrap .live-results-card,
body.mode-games #junkSection[aria-hidden="false"] #junkResultsWrap .live-results-card,
body.mode-games #wolfSection[aria-hidden="false"] #wolfResultsWrap .live-results-card {
  border-left: none;
  border-right: none;
  border-radius: 0;
}

@media (max-width: 900px) {
  body.mode-games #vegasSection[aria-hidden="false"] #vegasResultsWrap .live-results-card,
  body.mode-games #wolfSection[aria-hidden="false"] #wolfResultsWrap .live-results-card {
    max-height: 156px;
    overflow-y: auto;
  }

  body.mode-games #hiloSection[aria-hidden="false"] #hiloResultsWrap .live-results-card,
  body.mode-games #junkSection[aria-hidden="false"] #junkResultsWrap .live-results-card {
    max-height: 220px;
    overflow-y: auto;
  }
}

body.mode-games #bankerSection[aria-hidden="false"] #bankerResultsWrap.is-collapsed .results-collapse-bar,
body.mode-games #vegasSection[aria-hidden="false"] #vegasResultsWrap.is-collapsed .results-collapse-bar,
body.mode-games #hiloSection[aria-hidden="false"] #hiloResultsWrap.is-collapsed .results-collapse-bar,
body.mode-games #junkSection[aria-hidden="false"] #junkResultsWrap.is-collapsed .results-collapse-bar,
body.mode-games #wolfSection[aria-hidden="false"] #wolfResultsWrap.is-collapsed .results-collapse-bar {
  border-left: none;
  border-right: none;
  border-radius: 0;
}

/* Results card collapsible wrapper */
.results-card-wrap {
  display: flex;
  flex-direction: column;
  margin: 0;
}

/* When collapsed: add margin back */
.results-card-wrap.is-collapsed {
  margin: 10px 0 0;
}

.results-card-wrap .live-results-card,
.results-card-wrap .banker-header-totals {
  margin: 0 !important;
}

/* Collapse button as a real header bar above the card content */
.results-collapse-bar {
  order: -1; /* Always render above the card regardless of DOM order */
  position: static;
  width: 100%;
  height: auto;
  min-height: 40px;
  background: var(--panel-alt);
  border: 2px solid var(--line);
  border-bottom: none;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  z-index: 2;
  gap: 12px;
}

.results-collapse-bar:hover {
  background: color-mix(in srgb, var(--panel-alt) 85%, var(--accent) 15%);
}

/* Game name label always visible */
.results-collapse-label {
  display: inline;
}

.results-collapse-chevron::before {
  content: '▲ Hide';
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.6;
}

.results-collapse-bar:hover .results-collapse-chevron::before {
  opacity: 1;
}

/* Hide the card's own title row — button header replaces it */
.results-card-wrap:not(.is-collapsed) .live-results-title-row,
.results-card-wrap:not(.is-collapsed) .banker-header-title-row,
.results-card-wrap:not(.is-collapsed) .banker-header-totals-table .live-results-title-row {
  display: none;
}

/* Remove top border-radius from card since button is the header */
.results-card-wrap:not(.is-collapsed) .live-results-card,
.results-card-wrap:not(.is-collapsed) .banker-header-totals {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  margin-top: 0;
}

/* When collapsed: full rounded bar with ▼ Show */
.results-card-wrap.is-collapsed .results-collapse-bar {
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  opacity: 1;
}

.results-card-wrap.is-collapsed .results-collapse-bar:hover {
  background: color-mix(in srgb, var(--panel-alt) 80%, var(--accent) 20%);
}

.results-card-wrap.is-collapsed .results-collapse-chevron::before {
  content: '▼ Show';
  font-size: 12px;
  font-weight: 400;
  opacity: 0.6;
}

.results-card-wrap.is-collapsed .results-collapse-bar:hover .results-collapse-chevron::before {
  opacity: 1;
}

.results-card-wrap.is-collapsed .live-results-card,
.results-card-wrap.is-collapsed .banker-header-totals {
  display: none;
}

.vegas-rotation-breakdown {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-alt);
  color: var(--ink);
  line-height: 1.4;
}

.banker-header-totals {
  display: block;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.banker-header-totals-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.banker-header-totals-table th,
.banker-header-totals-table td {
  border-bottom: 2px solid var(--line);
  text-align: center;
  padding: 4px 8px;
  white-space: nowrap;
  font-size: var(--text-lg);
}

.banker-header-totals-table .banker-header-data-row td {
  min-width: 72px;
}

.banker-header-title-row th {
  height: 34px;
  font-size: var(--text-xl);
  background: var(--panel-alt);
  color: var(--ink);
}

.banker-header-data-row td {
  height: var(--touch-min);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.banker-header-totals-table tr:last-child td {
  border-bottom: none;
}
@media (max-width: 600px) {
  .banker-header-totals-table th,
  .banker-header-totals-table td {
    padding: 2px 6px;
    font-size: var(--text-sm);
  }
  .banker-header-totals-table .banker-header-data-row td {
    min-width: 64px;
  }
  .banker-header-title-row th {
    height: 28px;
    font-size: var(--text-lg);
  }
  .banker-header-data-row td {
    height: 36px;
  }
}

.game-options-panel {
  margin-bottom: 10px;
}

.game-options-toggle {
  position: relative;
  gap: 4px;
  border-color: #2b3a47;
  background: #182430;
  white-space: nowrap;
}

.game-options-toggle::after {
  content: '▾';
  font-size: 0.92em;
  transform: rotate(-90deg);
  transition: transform var(--transition-fast) ease;
}

.game-options-icon-btn,
.banker-options-icon-btn {
  min-width: 40px !important;
  width: 40px !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 !important;
  justify-content: center;
  position: relative;
  z-index: 32;
}

.game-options-icon-btn::after,
.banker-options-icon-btn::after {
  content: none;
}

.standings-toggle-btn {
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  justify-content: center;
  font-size: calc(15px + var(--font-size-step));
}

.standings-toggle-btn.is-collapsed {
  border-color: var(--line);
  background: #1c2b38;
}

.game-options-toggle.is-open {
  border-color: var(--accent);
  background: rgba(104, 211, 145, 0.22);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(104, 211, 145, 0.35);
}

.game-options-toggle.is-open::after {
  transform: rotate(0deg);
}

.scorecard-footer-controls .scorecard-main-options-icon::after {
  content: none !important;
}

.scorecard-main-options-icon.is-open,
.scorecard-clear-actions-toggle.is-open {
  border-color: var(--accent);
  background: rgba(104, 211, 145, 0.22);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(104, 211, 145, 0.35);
}

/* Dark mode micro-contrast pass for inactive controls */
:root:not([data-theme="light"]) .btn:not(.accent):not(.active):not(.is-open),
:root:not([data-theme="light"]) .theme-toggle,
:root:not([data-theme="light"]) .game-toggle:not(.active),
:root:not([data-theme="light"]) .entry-switcher-btn:not(.active),
:root:not([data-theme="light"]) .game-options-toggle:not(.is-open),
:root:not([data-theme="light"]) .banker-toggle-btn:not(.is-active),
:root:not([data-theme="light"]) .junk-cell summary,
:root:not([data-theme="light"]) .junk-cell button {
  background: #232b33;
  border-color: #627080;
  box-shadow: inset 0 0 0 1px var(--hi-thin);
}

:root:not([data-theme="light"]) .btn:not(.accent):not(.active):not(.is-open):hover,
:root:not([data-theme="light"]) .theme-toggle:hover,
:root:not([data-theme="light"]) .game-toggle:not(.active):hover,
:root:not([data-theme="light"]) .entry-switcher-btn:not(.active):hover,
:root:not([data-theme="light"]) .game-options-toggle:not(.is-open):hover,
:root:not([data-theme="light"]) .banker-toggle-btn:not(.is-active):hover,
:root:not([data-theme="light"]) .junk-cell summary:hover,
:root:not([data-theme="light"]) .junk-cell button:hover {
  background: #2a343e;
  border-color: #708093;
}

/* Dark mode: To Par text in white */
:root:not([data-theme="light"]) .to-par[data-sign="+"],
:root:not([data-theme="light"]) .to-par[data-sign="0"] {
  color: #ffffff;
}

:root:not([data-theme="light"]) .scorecard-mobile-to-par[data-sign="+"],
:root:not([data-theme="light"]) .scorecard-mobile-to-par[data-sign="0"] {
  color: #ffffff;
}

.pill {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* =========================
   Games Native Polish (final overrides)
   Appended from main.css
   ========================= */

/* =========================
   Games Native Polish (final overrides)
   ========================= */

/* Cleaner game surface hierarchy: less border noise, more depth by layer. */
.game-section {
  border-top-color: rgba(128, 153, 178, 0.22);
  border-bottom-color: var(--line-base);
}

.game-section-header {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-base);
}

.game-section-header .controls {
  gap: 8px;
}

.game-options-icon-btn,
.banker-options-icon-btn {
  border-width: 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 16px -14px rgba(36, 71, 102, 0.34);
}

.game-options-panel {
  border-color: var(--line-base);
  box-shadow: 0 14px 28px -24px rgba(36, 71, 102, 0.28);
}

.final-round-report-panel.game-options-panel {
  background: rgba(255, 255, 255, 0.006) !important;
  backdrop-filter: blur(5px) !important;
  -webkit-backdrop-filter: blur(5px) !important;
}
:root:not([data-theme="light"]) .final-round-report-panel.game-options-panel {
  background: rgba(0, 0, 0, 0.002) !important;
}
:root:not([data-theme="light"]) .final-round-report-sheet {
  background: #122234;
}

.control-box,
.team-box,
.opts-box {
  border-color: rgba(128, 153, 178, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.results-card-wrap {
  border-color: rgba(128, 153, 178, 0.24);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 16px 28px -24px rgba(36, 71, 102, 0.22);
}

.results-card-wrap .live-results-card,
.results-card-wrap .banker-header-totals {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.99), rgba(239, 246, 253, 0.99));
}

.results-collapse-bar {
  min-height: 42px;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.results-collapse-label {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.game-toggle {
  border-width: 1px;
  border-color: rgba(128, 153, 178, 0.3);
  box-shadow: 0 8px 16px -14px var(--shadow-tint);
}

.gamesbar-scroll-indicator {
  height: 4px;
  border-radius: 999px;
  opacity: 0.85;
}

.gamesbar-scroll-indicator__thumb {
  border-radius: 999px;
}

.vegas-table th,
.vegas-table td,
.banker-table th,
.banker-table td,
.skins-table th,
.skins-table td,
.junk-table th,
.junk-table td {
  border-color: var(--line-base);
}

.vegas-table thead th,
.banker-table thead th,
.skins-table thead th,
.junk-table thead th {
  font-size: clamp(1.05rem, 2.35vw, 1.28rem);
  letter-spacing: 0.01em;
}

:root:not([data-theme="light"]) .game-section {
  border-top-color: rgba(112, 148, 178, 0.28);
  border-bottom-color: rgba(112, 148, 178, 0.24);
}

:root:not([data-theme="light"]) .game-section-header {
  border-bottom-color: rgba(112, 148, 178, 0.26);
}

:root:not([data-theme="light"]) .game-options-icon-btn,
:root:not([data-theme="light"]) .banker-options-icon-btn {
  border-color: rgba(112, 148, 178, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 18px -14px rgba(0, 0, 0, 0.56);
}

:root:not([data-theme="light"]) .game-options-panel {
  border-color: rgba(112, 148, 178, 0.26);
  box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.62);
}

:root:not([data-theme="light"]) .control-box,
:root:not([data-theme="light"]) .team-box,
:root:not([data-theme="light"]) .opts-box {
  border-color: rgba(112, 148, 178, 0.24);
}

:root:not([data-theme="light"]) .results-card-wrap {
  border-color: rgba(112, 148, 178, 0.28);
  box-shadow: 0 16px 28px -20px rgba(0, 0, 0, 0.68);
}

:root:not([data-theme="light"]) .results-card-wrap .live-results-card,
:root:not([data-theme="light"]) .results-card-wrap .banker-header-totals {
  background: linear-gradient(180deg, rgba(16, 34, 52, 0.99), rgba(12, 27, 42, 0.99));
}

:root:not([data-theme="light"]) .game-toggle {
  border-color: rgba(112, 148, 178, 0.38);
  box-shadow: 0 10px 18px -16px rgba(0, 0, 0, 0.58);
}

:root:not([data-theme="light"]) .vegas-table th,
:root:not([data-theme="light"]) .vegas-table td,
:root:not([data-theme="light"]) .banker-table th,
:root:not([data-theme="light"]) .banker-table td,
:root:not([data-theme="light"]) .skins-table th,
:root:not([data-theme="light"]) .skins-table td,
:root:not([data-theme="light"]) .junk-table th,
:root:not([data-theme="light"]) .junk-table td {
  border-color: rgba(112, 148, 178, 0.24);
}

@media (max-width: 480px) {
  .game-section-header {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .game-section-header h2 {
    font-size: calc(16px + var(--font-size-step));
  }

  .results-card-wrap {
    border-radius: 20px;
  }

  .results-collapse-bar {
    min-height: 40px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .game-toggle {
    border-radius: 20px;
  }
}

/* =========================================================================
   Light theme overrides — moved from light-theme-overrides.css
   ========================================================================= */

:root[data-theme="light"] .gamesbar-scroll-indicator {
  background: rgba(37, 99, 235, 0.18);
}

:root[data-theme="light"] .gamesbar-scroll-indicator__thumb {
  background: #2563eb;
}

:root[data-theme="light"] .final-round-report-panel.game-options-panel {
  background: rgba(255, 255, 255, 0.006) !important;
}

:root[data-theme="light"] .final-round-report-sheet {
  background: #f8fbff;
}

/* More light-theme rules — moved from light-theme-overrides.css.
   Note: ui-polish.css also defines :root[data-theme="light"] .game-toggle
   and .entry-switcher-btn.active; the rules below intentionally win the
   cascade because ui-polish loads before this file gets re-loaded... wait,
   that's not the case. To preserve current rendering, the conflicting
   duplicates were removed from ui-polish.css. See git history. */

:root[data-theme="light"] .game-toggle {
  background: #edf2f6;
  border-color: #b3bfcc;
  color: #1a1c1f;
}

:root[data-theme="light"] .game-toggle.active {
  background: #0b74d1;
  border-color: #095ba3;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--hi-medium), 0 0 0 1px rgba(11, 116, 209, 0.3);
}

:root[data-theme="light"] .game-section {
  background: #e2e9f0;
  border-color: #bcc7d2;
}

:root[data-theme="light"] .entry-switcher-btn {
  background: #edf2f6;
  border-color: #b3bfcc;
  color: #4a5560;
}

:root[data-theme="light"] .entry-switcher-btn:hover {
  background: #e4ecf2;
  border-color: #b3bfcc;
  color: #2d3640;
}

:root[data-theme="light"] .entry-switcher-btn.active,
:root[data-theme="light"] .entry-switcher-btn.active:hover {
  background: #0b74d1;
  border-color: #095ba3;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px var(--hi-medium);
}
