/* Gambit — Mobile-First Blind-Setup Chess Styles */
:root {
  --bg: #1f1e1b;
  --bg-deep: #171614;
  --card: #262522;
  --surface: #33322e;
  --surface-hover: #403f3a;
  --border: #3f3d38;
  --text: #ffffff;
  --ink: #ffffff;
  --primary: #69a84f;
  --primary-soft: rgba(105, 168, 79, 0.2);
  --text-soft: #c9c7c1;
  --text-muted: #93918b;

  --green: #69a84f;
  --green-shadow: #4c7d37;
  --gold: #f5b642;
  --danger: #e04f44;

  /* Exact Classic Green & Cream Board */
  --sq-light: #ebecd0;
  --sq-dark: #739552;
  --sq-coord-l: #739552;
  --sq-coord-d: #ebecd0;

  /* Move Classification Colors */
  --c-brilliant: #26c2a3;
  --c-great: #5c8bb0;
  --c-best: #81b64c;
  --c-mistake: #ffa459;
  --c-miss: #fa7167;
  --c-blunder: #fa412d;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html.theme-light {
  --bg: #eeece6;
  --bg-deep: #e2dfd7;
  --card: #ffffff;
  --surface: #e5e2da;
  --surface-hover: #d8d4ca;
  --border: #ccc7bb;
  --text: #1c1c1a;
  --ink: #1c1c1a;
  --text-soft: #4a4945;
  --text-muted: #6e6c66;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overscroll-behavior: none;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.hidden {
  display: none !important;
}

/* ==========================================================================
   Full-Screen Mobile Shell (Zero Wasted Side Padding -> Edge-to-Edge Board!)
   ========================================================================== */
.app-shell {
  width: 100%;
  min-height: 100svh;
  padding-top: max(4px, env(safe-area-inset-top));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.board-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Top Move Tape (Matches IMG_1504 top move history strip) */
.top-bar {
  width: 100%;
  max-width: 520px;
  height: 36px;
  padding: 0 10px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.move-tape {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
}
.move-tape::-webkit-scrollbar {
  display: none;
}
.tape-placeholder {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.tape-num {
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 3px;
}
.tape-mv {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
}
.tape-mv-active {
  background: var(--surface);
  color: #ffffff;
}
html.theme-light .tape-mv-active {
  background: #1c1c1a;
  color: #ffffff;
}

.top-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.top-icon-btn {
  width: 34px;
  height: 32px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-soft);
}

/* Opponent & Player Strips */
.player-strip {
  width: 100%;
  max-width: 520px;
  min-height: 50px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-avatar {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  flex-shrink: 0;
}
.p-avatar-opp {
  background: #e5e5e2;
  color: #262522;
}
.p-avatar-you {
  background: #3b5998;
  color: #ffffff;
}

.strip-left {
  min-width: 0;
  flex: 1;
}
.strip-main {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
}
.p-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.caps-row {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 150ms ease;
}
.metric-pill strong {
  font-size: 15.5px;
  font-weight: 900;
}
.pill-prize {
  background: rgba(105, 168, 79, 0.2);
  border: 1px solid rgba(129, 199, 102, 0.55);
}
.pill-prize strong { color: #8ce06c; }
html.theme-light .pill-prize strong { color: #2f7a18; }

.pill-wallet {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.5);
}
.pill-wallet strong { color: #67d4ff; }
html.theme-light .pill-wallet strong { color: #0369a1; }

.case-val-bump {
  transform: scale(1.15);
}
.wing-tag {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.check-pill {
  font-size: 12px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--danger);
  color: #ffffff;
}

.clock-box {
  min-width: 78px;
  height: 38px;
  padding: 0 11px;
  border-radius: 7px;
  background: var(--bg-deep);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clock-active {
  background: #ffffff;
  color: #191917;
}
html.theme-light .clock-active {
  background: #1c1c1a;
  color: #ffffff;
}
.clock-low {
  background: var(--danger) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   EDGE-TO-EDGE 100vw CHESSBOARD (Maximized Square Size on iPhone!)
   ========================================================================== */
.board-wrap {
  width: 100vw;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  touch-action: none;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 100%;
  height: 100%;
  touch-action: none;
}

.sq {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
}
.sq-l { background-color: var(--sq-light); }
.sq-d { background-color: var(--sq-dark); }

.sq-setup {
  box-shadow: inset 0 0 0 2.5px rgba(245, 182, 66, 0.78);
}
.sq-last-l { background-color: #f5f682 !important; }
.sq-last-d { background-color: #b9ca43 !important; }
.sq-sel {
  background-color: #f5f682 !important;
}
.sq-aim {
  box-shadow: inset 0 0 0 4px var(--gold) !important;
}
.sq-gc-ok {
  background-color: rgba(105, 168, 79, 0.6) !important;
  box-shadow: inset 0 0 0 3.5px #ffffff !important;
}
.sq-gc-bad {
  box-shadow: inset 0 0 0 2.5px rgba(224, 79, 68, 0.78) !important;
}
.sq-radar {
  background-color: rgba(250, 204, 21, 0.68) !important;
}
.sq-smoke {
  box-shadow: inset 0 0 0 3.5px #f97316 !important;
}
.sq-chk {
  background: radial-gradient(circle, #ff5a4e 0%, #c8281e 75%, #8f1912 100%) !important;
}

.coord-rank {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}
.coord-file {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}
.sq-l .coord-rank, .sq-l .coord-file { color: var(--sq-coord-l); }
.sq-d .coord-rank, .sq-d .coord-file { color: var(--sq-coord-d); }

.piece-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.piece-svg {
  width: 88%;
  height: 88%;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

/* Corner Badges on Squares (King Win/Loss Badges from IMG_1504 + Review Grade Badges!) */
.sq-corner-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 4;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.xray-mini {
  position: absolute;
  bottom: 1px;
  left: 2px;
  background: #f5b642;
  color: #191917;
  font-size: 10px;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.25;
}

.fog-tile {
  width: 78%;
  height: 78%;
  border-radius: 10px;
  background: #262522;
  border: 2px solid #57554f;
  color: #ffffff;
  font-size: clamp(17px, 4.4vw, 23px);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  position: relative;
  pointer-events: none;
}
.gc-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #69a84f;
  border: 2px solid #ffffff;
}
.piece-freeze {
  position: absolute;
  top: 0;
  right: 1px;
  font-size: 14px;
  line-height: 1;
}

.mv-dot {
  width: 32%;
  height: 32%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.23);
  pointer-events: none;
}
.mv-ring {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 5px solid rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

/* ==========================================================================
   Persistent Character Voice Callout + Docks
   ========================================================================== */
.command-col {
  width: 100%;
  max-width: 520px;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-callout {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.voice-avatar svg {
  width: 44px;
  height: 44px;
  display: block;
}
.voice-bubble {
  position: relative;
  flex: 1;
  min-height: 44px;
  background: #ffffff;
  color: #1b1c1f;
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.32;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.voice-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 8px solid #ffffff;
}
.voice-cancel {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--danger);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  flex-shrink: 0;
}

.dock-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.brush-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}
.brush-btn {
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 17px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}
.brush-btn span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.brush-active {
  background: var(--green);
  color: #ffffff;
}
.brush-active span {
  color: #ffffff;
}

.preset-row, .action-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.act-btn {
  min-height: 50px;
  padding: 5px 8px;
  border-radius: var(--radius-md);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
.act-btn:active { transform: scale(0.97); }
.act-name {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
}
.act-cost {
  font-size: 13px;
  font-weight: 700;
  color: #67d4ff;
}
html.theme-light .act-cost { color: #0369a1; }
.act-btn-active {
  background: #3d3517 !important;
  box-shadow: inset 0 0 0 2px var(--gold);
}

/* 5-Slot Bottom Review Toolbar */
.rev-bottom-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr;
  align-items: center;
  gap: 6px;
  background: var(--bg-deep);
  border-radius: 14px;
  padding: 7px 6px;
}
.rev-nav-item {
  height: 48px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.rev-nav-item .rev-ic {
  font-size: 20px;
  line-height: 1;
}
.rev-nav-active {
  color: var(--gold);
}
.rev-star-btn {
  height: 46px;
  border-radius: 12px;
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-shadow);
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rev-star-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--green-shadow);
}

/* Tactile Green Primary CTA & Secondary Buttons */
.cta-green {
  width: 100%;
  min-height: 54px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--green);
  box-shadow: 0 4px 0 var(--green-shadow);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-green:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-shadow);
}

.sec-btn {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sec-btn-lg {
  min-height: 50px;
  font-size: 17px;
  font-weight: 800;
}

/* ==========================================================================
   FULL GAME REVIEW REPORT SCREEN
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.76);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.report-card {
  width: 100%;
  max-width: 410px;
  max-height: 94svh;
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.82);
}

.rep-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rep-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.rep-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rep-chart-box {
  width: 100%;
  height: 78px;
  border-radius: 10px;
  background: #2b2a27;
  overflow: hidden;
  border: 1px solid #3c3a36;
}
.rep-chart-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.rep-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  align-items: center;
  row-gap: 12px;
  column-gap: 8px;
}
.rep-lbl {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.rep-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.rep-p-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
}
.rep-avatar-box {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rep-av-def {
  background: #e5e5e2;
  color: #262522;
}
.rep-av-you {
  background: #3b5998;
  color: #ffffff;
  border: 2.5px solid var(--green);
}

.acc-pill {
  min-width: 76px;
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}
.acc-pill-hi {
  background: #ffffff;
  color: #191917;
}
html.theme-light .acc-pill-hi {
  background: #1c1c1a;
  color: #ffffff;
}

.rep-val-gold {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
}

.rep-breakdown {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.rep-b-row {
  display: grid;
  grid-template-columns: 1.25fr 0.7fr 40px 0.7fr;
  align-items: center;
  font-size: 16.5px;
  font-weight: 800;
}
.rep-b-num {
  text-align: center;
  font-size: 19px;
  font-weight: 900;
}
.rep-badge-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.bg-brilliant { background: var(--c-brilliant); }
.bg-great     { background: var(--c-great); }
.bg-best      { background: var(--c-best); }
.bg-mistake   { background: var(--c-mistake); }
.bg-miss      { background: var(--c-miss); }
.bg-blunder   { background: var(--c-blunder); }
.bg-star      { background: #2589bd; }

.tx-brilliant { color: var(--c-brilliant); }
.tx-great     { color: var(--c-great); }
.tx-best      { color: var(--c-best); }
.tx-mistake   { color: var(--c-mistake); }
.tx-miss      { color: var(--c-miss); }
.tx-blunder   { color: var(--c-blunder); }

/* ==========================================================================
   CALLOUT & PAID-MOVE BRIEFING MODAL
   ========================================================================== */
.callout-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 92svh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78);
  animation: popModal 170ms cubic-bezier(0.2, 0.9, 0.3, 1.08);
}

@keyframes popModal {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.callout-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.callout-header {
  text-align: center;
  padding: 0 24px;
}
.callout-title {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.callout-sub {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-soft);
}

.speech-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.speech-avatar {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}
.speech-avatar svg {
  width: 58px;
  height: 58px;
  display: block;
}
.speech-bubble {
  position: relative;
  flex: 1;
  background: #ffffff;
  color: #1b1c1f;
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.36;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.speech-bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 14px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid #ffffff;
}

.pros-cons {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pc-box {
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15.5px;
  line-height: 1.38;
  font-weight: 500;
}
.pc-box strong {
  display: block;
  font-size: 14.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.pc-helps {
  background: rgba(105, 168, 79, 0.16);
  border: 1.5px solid rgba(129, 199, 102, 0.45);
}
.pc-helps strong { color: #8ce06c; }
html.theme-light .pc-helps strong { color: #2f7a18; }

.pc-hurts {
  background: rgba(224, 79, 68, 0.14);
  border: 1.5px solid rgba(224, 79, 68, 0.45);
}
.pc-hurts strong { color: #ff7c70; }
html.theme-light .pc-hurts strong { color: #b91c1c; }

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 21px;
  font-weight: 900;
}
.stat-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stat-lbl {
  font-size: 14px;
  font-weight: 700;
}
.tone-good { color: #81b64c; }
.tone-good .stat-dot { background: #81b64c; }
.tone-warn { color: #ffa459; }
.tone-warn .stat-dot { background: #ffa459; }
.tone-bad { color: #fa7167; }
.tone-bad .stat-dot { background: #fa7167; }

.callout-sec-row, .promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.menu-actions, .guide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--text-soft);
}
.guide-card strong {
  display: block;
  font-size: 16.5px;
  color: var(--text);
  margin-bottom: 3px;
}

.archive-list {
  max-height: 50svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.archive-item {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.arch-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.arch-title {
  font-size: 16.5px;
  font-weight: 800;
}
.arch-sub {
  font-size: 14px;
  color: var(--text-soft);
}
.arch-cta {
  font-size: 15px;
  font-weight: 800;
  color: #8ce06c;
  flex-shrink: 0;
}

.elo-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.lab-note-box {
  display: flex;
  gap: 8px;
}
.lab-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  user-select: text;
  -webkit-user-select: text;
}
.lab-input:focus {
  outline: none;
  border-color: var(--green);
}
.lab-tech-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lab-tech-row:last-child {
  border-bottom: none;
}

.act-btn-gold {
  border: 1.5px solid rgba(245, 182, 66, 0.45);
}
.act-btn-armed {
  border: 2px solid var(--gold) !important;
  background: rgba(245, 182, 66, 0.16) !important;
}
.cta-stonewall {
  background: #8c3b32 !important;
  box-shadow: 0 4px 0 #5c221c !important;
  font-size: 15px !important;
}
.cta-panic {
  background: #26a688 !important;
  box-shadow: 0 4px 0 #176b57 !important;
}

.rep-fb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
}
.rep-fb-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.25;
}
.rep-fb-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.rep-fb-btn {
  padding: 6px 10px !important;
  font-size: 13px !important;
  min-height: 34px !important;
}
.rep-fb-picked {
  background: var(--green) !important;
  color: #ffffff !important;
}


/* ==========================================================================
   Desktop / Wide Landscape Arena (>= 920px)
   ========================================================================== */
@media (min-width: 920px) and (min-height: 580px) {
  .app-shell {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 16px 28px;
  }
  .board-stage {
    width: auto;
  }
  .board-wrap {
    --board-px: clamp(480px, min(calc(100svh - 165px), calc(100vw - 450px)), 760px);
    width: var(--board-px);
    max-width: 760px;
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  }
  .top-bar, .player-strip {
    width: clamp(480px, min(calc(100svh - 165px), calc(100vw - 450px)), 760px);
    max-width: 760px;
    padding-left: 4px;
    padding-right: 4px;
  }
  .command-col {
    width: 370px;
    padding: 0;
    justify-content: center;
    gap: 14px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (display-mode: standalone) {
  .site-menu {
    display: none;
  }
}
