/*
 * Copyright (c) 2025-2026 Yoda Games. All rights reserved.
 * Unauthorized copying, modification, or distribution is strictly prohibited.
 *
 * Checkers vanilla — style sheet.
 * Every rule is namespaced with .gck- (game-checkers) so the game cannot
 * leak into the surrounding SEO / more-games / footer sections.
 *
 * Colours mirror the Flutter widgets exactly — see config.js COLORS for
 * the lookup table and the per-widget source citations.
 */

/* ── Local CSS variables (kept private to .game-checkers-root) ───────── */
/* Palette v9 — "Tabletop Linen" — built FOR the Checkers game, not
   borrowed from anywhere.
   Reasoning:
   - Checkers is a centuries-old wood-and-pieces game. The right backdrop
     is the real-world surface a checker set is played on — a tabletop.
     Not a casino felt, not a neon page, not a deep-space void.
   - Mid-light sand colour reads as a warm wood tabletop without being
     either dark (the user said no) or stark white (also rejected).
   - One unified page tone — no stacked felt / wall / page layers fighting
     each other. The wood board becomes the only colourful object on the
     desk, which is exactly what happens with a real checker set.
   - Action-bar uses translucent dark-on-light controls so they read as
     "labels on the tabletop", not "buttons on a HUD". */
.game-checkers-root {
  /* The single tabletop surface — soft sand / linen. */
  --gck-bg: #D8CDB4;
  --gck-bg-edge: #C7BAA0;
  /* The wood board itself provides the contrast; the surrounds are
     intentionally one calm warm tone. */
  --gck-surface: rgba(40, 30, 15, 0.06);
  --gck-surface-hover: rgba(40, 30, 15, 0.12);
  --gck-border: rgba(80, 60, 30, 0.22);
  --gck-border-strong: rgba(80, 60, 30, 0.45);
  --gck-text: #2E2418;            /* deep walnut for body text */
  --gck-text-dim: rgba(46, 36, 24, 0.72);
  --gck-text-faint: rgba(46, 36, 24, 0.42);

  --gck-cell-light: #FFEFCD;
  --gck-cell-dark: #DAA755;
  --gck-cell-selected: #29B6F6;
  --gck-cell-valid-target: #66BB6A;

  --gck-wood-1: #E4AC5C;
  --gck-wood-2: #D29C50;
  --gck-wood-3: #DCA456;
  --gck-wood-4: #C99449;
  --gck-wood-5: #DCA456;
  --gck-wood-inner-edge: #885434;

  --gck-primary-blue: #1565C0;
  --gck-new-game-blue: #1A3A6B;
  --gck-dialog-bg: #1A1A2E;

  --gck-stat-win: #4CAF50;
  --gck-stat-loss: #E53935;
  --gck-stat-draw: #9E9E9E;

  --gck-cell-transition: 300ms;

  /* Reserved chrome around the board (landing header + turn indicator +
     action bar + paddings). The board's max-height subtracts this from
     100dvh so the action bar is never pushed off-screen. */
  --gck-chrome-reserve: 180px;

  /* Single tabletop tone with a barely-there top-down warmth shift.
     No layered "stage / felt" structure — the wood board IS the only
     featured object on the desk. */
  background:
    linear-gradient(180deg,
      var(--gck-bg) 0%,
      var(--gck-bg-edge) 100%);
  color: var(--gck-text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px 16px 14px;
  box-sizing: border-box;
  position: relative;
}

.game-checkers-root *,
.game-checkers-root *::before,
.game-checkers-root *::after { box-sizing: border-box; }

.game-checkers-root button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
}

.gck-hidden { display: none !important; }

/* ── Shell column ────────────────────────────────────────────────────── */
/* Sizing strategy:
   - Default cap 640px so the board feels substantial on a typical laptop.
   - At ≥900px viewports, allow growth up to 720px (still has comfortable
     air around the board on a 1280-wide layout but the wood frame is
     clearly the focal point).
   - Mobile media queries below tighten frame padding so the playable
     squares stay roomy even on narrow viewports. */
.gck-shell {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
@media (min-width: 900px) {
  .gck-shell { max-width: 640px; gap: 12px; }
}

/* ── Turn indicator (mirrors turn_indicator.dart) ────────────────────── */
.gck-turn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 22px;
  font-size: 14px;
  color: var(--gck-text-dim);
  margin-top: 4px;
}
.gck-turn-chip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1.5px solid transparent;
}
.gck-chip-red {
  background: #E53935;
  border-color: #FFCDD2;
}
.gck-chip-black {
  background: #212121;
  border-color: #616161;
}
/* Thinking colour — sage / desaturated green that reads on the sand
   tabletop without screaming. Matches the calm tone of the surround. */
.gck-turn-thinking { color: #5C7A4F; }
.gck-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(92, 122, 79, 0.28);
  border-top-color: #5C7A4F;
  animation: gck-spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes gck-spin { to { transform: rotate(360deg); } }
.gck-turn-over {
  color: var(--gck-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── Action bar — single row under the board, no container. ──────────
   Designer note: we tried wrapping the controls in a tinted "HUD strip"
   but with the new linen background it competed with the board for
   attention. The strip is gone — the controls float on the linen and
   each one carries its own minimal styling, so the row reads as quiet
   chrome that supports the board instead of upstaging it. */
.gck-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  margin-top: 2px;
  padding: 0 2px;
  min-width: 0;
}

/* ── Stats bar — compact inline chips (W L D on one line each). ────────
   Inside the action-bar HUD, the W L D groups use a baseline alignment
   so the label sits next to the value like "W 0" and reads as a
   metric chip rather than two stacked elements. */
.gck-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.gck-stat-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.gck-stat-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gck-text);
}
.gck-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gck-text);
  font-variant-numeric: tabular-nums;
}

/* ── Board frame (mirrors _WoodFramePainter) ─────────────────────────── */
/* Sizing strategy: the frame is a square (aspect-ratio 1/1), but on
   short / wide viewports the width-driven height could push the action
   bar off-screen. We cap the frame to a percentage of the viewport
   height so the Turn indicator + Board + Action Bar always fit. The
   `min-height: 0` on .gck-board-wrap lets the flex parent actually
   shrink the frame when needed. */
.gck-board-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 0;
  flex-shrink: 1;
}
.gck-board-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  /* Reserve roughly: 56px header + ~28px Turn + ~50px action bar + 32px
     padding = ~166px of chrome. The board can use the rest. Increase
     --gck-chrome-reserve at :root if the action bar wraps to two rows. */
  max-height: calc(100dvh - var(--gck-chrome-reserve));
  max-width: calc(100dvh - var(--gck-chrome-reserve));
  margin-inline: auto;
  border-radius: 6px;
  /* Flat uniform wood tone — every gradient removed so the frame reads
     the same brightness top-left and bottom-right. */
  background-color: var(--gck-wood-1) !important;
  background-image: none !important;
  /* Symmetric drop-shadow so the frame doesn't visually lean to one side. */
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  padding: 12px;
  overflow: hidden;
}
/* Inner edge — dark border just inside the wood frame. */
.gck-board-frame::before {
  content: '';
  position: absolute;
  inset: 10.5px;
  border: 1.5px solid var(--gck-wood-inner-edge);
  pointer-events: none;
}
/* Top bevel highlight removed — it gave the top edge an asymmetric
   brightness boost which read as "top brighter than bottom". */

/* ── 8×8 grid ────────────────────────────────────────────────────────── */
.gck-board {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}
.gck-board.gck-locked {
  pointer-events: none;
}

/* ── Cell ────────────────────────────────────────────────────────────── */
.gck-cell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gck-cell-light) !important;
  background-image: none !important;
  outline: none;
  border: 0;
  padding: 0;
}
.gck-cell.gck-dark {
  background-color: var(--gck-cell-dark) !important;
  background-image: none !important;
}
.gck-cell.gck-light {
  cursor: default;
}
.gck-cell.gck-dark { cursor: pointer; }
/* ── Selection & valid-target highlights ─────────────────────────────────
   Original Flutter version used flat sky-blue / leaf-green fills which
   fought with the warm wood board. The redesign keeps the wood visible
   underneath and uses light/glow overlays so the piece still reads cleanly.
   Implementation note: ::after is the highlight layer (so the wood
   background colour stays intact), z-index 0 keeps it under the piece. */
.gck-cell.gck-selected::after,
.gck-cell.gck-valid-target::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 2px;
  z-index: 0;
}
/* Selected — warm amber / gold glow that pairs with the wood frame. */
.gck-cell.gck-selected::after {
  background: rgba(255, 196, 0, 0.22);
  box-shadow:
    inset 0 0 0 3px rgba(255, 200, 0, 0.85),
    inset 0 0 14px rgba(255, 220, 80, 0.55),
    0 0 10px rgba(255, 200, 0, 0.35);
  animation: gck-selected-pulse 1.4s ease-in-out infinite;
}
@keyframes gck-selected-pulse {
  0%, 100% { box-shadow:
    inset 0 0 0 3px rgba(255, 200, 0, 0.85),
    inset 0 0 14px rgba(255, 220, 80, 0.55),
    0 0 10px rgba(255, 200, 0, 0.35); }
  50% { box-shadow:
    inset 0 0 0 3px rgba(255, 215, 60, 1),
    inset 0 0 18px rgba(255, 230, 120, 0.75),
    0 0 16px rgba(255, 200, 0, 0.55); }
}
/* Valid target — soft mint tint + bright inner border so empty squares
   read as "you can move here" without overpowering the board. */
.gck-cell.gck-valid-target::after {
  background: rgba(120, 230, 140, 0.16);
  box-shadow:
    inset 0 0 0 2px rgba(120, 230, 140, 0.7),
    inset 0 0 10px rgba(120, 230, 140, 0.35);
}
/* Keep the piece (and target dot) above the highlight overlay. */
.gck-cell > .gck-piece-wrap,
.gck-cell > .gck-target-dot { position: relative; z-index: 1; }
/* Selected piece gets a subtle gold drop-shadow so it stands out against
   the amber overlay without changing the piece colours themselves. */
.gck-cell.gck-selected > .gck-piece-wrap {
  filter:
    drop-shadow(1px 3px 4px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}
.gck-cell:focus-visible { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }

/* The piece SVG fills 92% of the cell with a slight pad (matches the
   Padding(EdgeInsets.all(4.0)) in piece_widget.dart). */
.gck-piece-wrap {
  width: 92%;
  height: 92%;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Symmetric soft shadow centred under each piece — the previous
     drop-shadow(1px 3px 4px) was offset right+down, so all 24 pieces
     together drew a visible diagonal "left-bright / right-dark" sheen
     across the board. */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.gck-piece-svg { width: 100%; height: 100%; display: block; }

/* Inner dot shown on an empty valid-target cell. Larger + brighter than
   the original Flutter dot so it reads clearly against the new mint-
   tinted highlight overlay. */
.gck-target-dot {
  width: 28%;
  height: 28%;
  max-width: 16px;
  max-height: 16px;
  border-radius: 50%;
  background: rgba(180, 255, 200, 0.95);
  box-shadow:
    0 0 0 2px rgba(40, 120, 60, 0.55),
    0 0 8px rgba(120, 230, 140, 0.6);
}

/* ── Flying piece layer (slide animations live here) ─────────────────── */
.gck-fly-layer {
  position: absolute;
  inset: 12px; /* match .gck-board-frame padding so 0,0 = top-left of board */
  pointer-events: none;
  overflow: visible;
}
.gck-fly-piece {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.gck-fly-piece > svg {
  /* Mirror the same 92% sizing as a settled piece. */
  width: 92%;
  height: 92%;
  filter: drop-shadow(1px 3px 4px rgba(0, 0, 0, 0.5));
}

/* ── Difficulty selector — three flat rectangular buttons ─────────────
   Note: rules below use `.gck-difficulty .gck-diff-pill` (specificity
   0,2,0) so they outrank the global button reset `.game-checkers-root
   button` (0,1,1) — without this extra specificity, the reset's
   `background: none; border: 0` would wipe these styles.
   Visual design: three equally-weighted flat buttons, 6px rounded
   corners, with a subtle difficulty-colour wash on the SELECTED one
   (Easy=green / Medium=orange / Hard=red, set inline by JS). */
.gck-difficulty {
  display: flex;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}
/* JS still emits a "Difficulty:" <span> label; collapse it visually. */
.gck-difficulty .gck-diff-label { display: none; }

.gck-difficulty .gck-diff-pill {
  background: rgba(255, 255, 255, 0.35);
  color: var(--gck-text);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1.5px solid rgba(80, 60, 30, 0.55);
  line-height: 1.15;
  min-width: 56px;
  text-align: center;
  cursor: pointer;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    transform 80ms ease;
}
.gck-difficulty .gck-diff-pill:hover:not(.gck-diff-selected):not(.gck-diff-disabled) {
  background: rgba(255, 255, 255, 0.55);
  color: var(--gck-text);
  border-color: rgba(80, 60, 30, 0.75);
}
.gck-difficulty .gck-diff-pill:active { transform: translateY(1px); }
/* Selected — JS sets the background inline; we just bump weight + colour
   contrast and tweak the border. Difficulty colours (--green, --orange,
   --red) are kept low-saturation in JS so they don't shout on the linen
   background. */
.gck-difficulty .gck-diff-pill.gck-diff-selected {
  color: #ffffff;
  font-weight: 700;
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 3px rgba(46, 36, 24, 0.25);
}
.gck-difficulty .gck-diff-pill.gck-diff-disabled {
  color: rgba(46, 36, 24, 0.32);
  cursor: not-allowed;
  opacity: 0.8;
}
.gck-difficulty .gck-diff-pill.gck-diff-disabled:hover {
  background: transparent;
  color: rgba(46, 36, 24, 0.32);
  border-color: var(--gck-border);
}

/* ── New Game button — solid amber CTA. */
.gck-action-bar .gck-new-game {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #F2BE6E 0%, #DAA452 100%);
  color: #2A1810;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: 1.5px solid rgba(80, 60, 30, 0.45);
  box-shadow:
    0 3px 8px rgba(60, 40, 20, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
  transition: filter 150ms ease, transform 80ms ease, box-shadow 150ms ease;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.15;
}
.gck-action-bar .gck-new-game:hover {
  filter: brightness(1.06);
  box-shadow:
    0 4px 12px rgba(60, 40, 20, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
.gck-action-bar .gck-new-game:active { transform: translateY(1px); }

/* Sound button.
   Desktop (>680px): position: fixed against the viewport. The `top`
   value is computed at runtime by syncSoundTop() to always match the
   vertical centre of the "Your turn" line, so it never appears
   visually offset from the indicator.
   Mobile (≤680px): falls back to absolute positioning inside .game-
   checkers-root so it lines up with the .gck-turn at the top of the
   shell (which is centred over the board). */
.gck-action-sound {
  position: fixed;
  right: 16px;
  top: 80px; /* updated by JS — fallback value before first sync */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--gck-text);
  cursor: pointer;
  transition: color 150ms ease, opacity 150ms ease, transform 80ms ease;
  z-index: 6;
}
.gck-action-sound:hover { color: #000; transform: scale(1.08); }
.gck-action-sound:active { transform: scale(0.94); }
.gck-action-sound .gck-sound-off { display: none; }
.gck-action-sound[aria-pressed="false"] .gck-sound-on { display: none; }
.gck-action-sound[aria-pressed="false"] .gck-sound-off {
  display: block;
  opacity: 0.4;
}
@media (max-width: 680px) {
  /* On narrow viewports the board fills (almost) the whole window, so
     the sound button drops to absolute positioning relative to the
     game root, which puts it right next to the .gck-turn text. */
  .gck-action-sound {
    position: absolute;
    top: 10px;
    right: 12px;
  }
}

/* ── Result overlay — parchment card on a warm dark backdrop, matching
   the Game Options / New Game? dialogs so the win/loss/draw screen
   reads as part of the same warm theme. */
.gck-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.gck-overlay-card {
  background: linear-gradient(180deg, #FBF5E6 0%, #EFE3C6 100%);
  border: 1px solid rgba(139, 111, 71, 0.35);
  border-radius: 20px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 48px rgba(40, 25, 10, 0.45), 0 2px 0 rgba(255, 255, 255, 0.7) inset;
}
.gck-overlay-emoji { font-size: 48px; line-height: 1; }
.gck-overlay-title {
  margin-top: 12px;
  font-size: 26px;
  font-weight: 800;
  color: #2A1810;
  letter-spacing: 0.3px;
}
.gck-overlay-sub {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #5C3D24;
  line-height: 1.45;
}
.gck-overlay .gck-overlay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  background: linear-gradient(180deg, #D14638 0%, #A82D1F 100%) !important;
  color: #FFFFFF !important;
  padding: 12px 28px;
  border-radius: 12px;
  border: 0;
  min-height: 46px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(167, 45, 31, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -2px 0 rgba(0, 0, 0, 0.12) inset;
  transition: filter 150ms ease, box-shadow 150ms ease, transform 80ms ease;
}
.gck-overlay .gck-overlay-btn svg { color: #FFFFFF; }
.gck-overlay .gck-overlay-btn:hover {
  filter: brightness(1.1);
  box-shadow:
    0 6px 18px rgba(167, 45, 31, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 0 rgba(0, 0, 0, 0.12) inset;
}
.gck-overlay .gck-overlay-btn:active { transform: scale(0.97); }

/* ── Dialogs (mirrors dialogs.dart) ──────────────────────────────────── */
.gck-dialog-backdrop {
  /* Anchored to .gck-board-wrap so the dialog sits visually centred over
     the board. No tint / blur — the board stays fully visible. Only the
     dialog itself is interactive; the rest of the page (header, board)
     remains clickable. */
  position: absolute;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
  pointer-events: none;
}
.gck-dialog-backdrop > .gck-dialog {
  pointer-events: auto;
}
.gck-dialog {
  background: linear-gradient(180deg, #FBF5E6 0%, #EFE3C6 100%);
  border: 1px solid rgba(139, 111, 71, 0.35);
  border-radius: 18px;
  padding: 22px 22px 18px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 18px 40px rgba(40, 25, 10, 0.4), 0 2px 0 rgba(255, 255, 255, 0.8) inset;
}
.gck-dialog .gck-dialog-row {
  padding: 4px 0;
}
.gck-dialog .gck-dialog-title {
  font-size: 19px;
  font-weight: 800;
  color: #2A1810;
  letter-spacing: 0.3px;
  text-align: center;
}
.gck-dialog .gck-dialog-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 111, 71, 0.4), transparent);
  margin: 12px 0 14px;
  border: 0;
}
.gck-dialog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gck-dialog-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gck-dialog .gck-dialog-label {
  font-size: 15px;
  font-weight: 700;
  color: #2A1810;
}
.gck-dialog .gck-dialog-sub {
  font-size: 12px;
  color: #6B4F35;
  font-weight: 500;
}
.gck-dialog .gck-dialog-body { padding: 4px 0 8px; font-size: 14px; color: #4A3322; text-align: center; }
.gck-dialog .gck-dialog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.gck-dialog .gck-dialog-actions--center {
  justify-content: center;
}
.gck-dialog .gck-dialog-actions--center .gck-dialog-confirm {
  min-width: 180px;
  padding: 0 32px;
}
.gck-dialog .gck-dialog-cancel,
.gck-dialog .gck-dialog-confirm {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.gck-dialog .gck-dialog-cancel {
  color: #5C3D24;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  background: #FFFFFF;
  border: 2px solid #8B6F47;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.gck-dialog .gck-dialog-cancel:hover {
  background: #F5EBD6;
  border-color: #5C3D24;
  color: #2A1810;
}
.gck-dialog .gck-dialog-cancel:active { transform: scale(0.97); }
.gck-dialog .gck-dialog-confirm {
  background: linear-gradient(180deg, #D14638 0%, #A82D1F 100%);
  color: #FFFFFF;
  padding: 0 28px;
  border-radius: 12px;
  border: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow:
    0 4px 12px rgba(167, 45, 31, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -2px 0 rgba(0, 0, 0, 0.12) inset;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.gck-dialog .gck-dialog-confirm:hover {
  filter: brightness(1.1);
  box-shadow:
    0 6px 18px rgba(167, 45, 31, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -2px 0 rgba(0, 0, 0, 0.12) inset;
}
.gck-dialog .gck-dialog-confirm:active { transform: scale(0.97); }

/* ── Custom switch (mirrors the Flutter Material Switch styling) ─────── */
.gck-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  display: inline-block;
}
.gck-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.gck-dialog .gck-switch {
  width: 52px;
  height: 30px;
}
.gck-dialog .gck-switch-track {
  position: absolute;
  inset: 0;
  background: #8B6F47;
  border: 2px solid #5C3D24;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(40, 25, 10, 0.25) inset;
  transition: background 150ms ease, border-color 150ms ease;
}
.gck-dialog .gck-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(40, 25, 10, 0.45);
  transition: transform 180ms cubic-bezier(.4,0,.2,1), background 150ms ease;
}
.gck-dialog .gck-switch input:checked + .gck-switch-track {
  background: linear-gradient(180deg, #D14638 0%, #A82D1F 100%);
  border-color: #7A1E12;
}
.gck-dialog .gck-switch input:checked + .gck-switch-track .gck-switch-thumb {
  background: #FFFFFF;
  transform: translateX(22px);
  box-shadow: 0 2px 5px rgba(40, 25, 10, 0.5);
}
/* Keep original (dark) switch styles available outside the dialog. */
.gck-switch-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  transition: background 150ms ease;
}
.gck-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  transition: transform 150ms ease, background 150ms ease;
}
.gck-switch input:checked + .gck-switch-track {
  background: rgba(21, 101, 192, 0.4);
}
.gck-switch input:checked + .gck-switch-track .gck-switch-thumb {
  background: var(--gck-primary-blue);
  transform: translateX(20px);
}

/* ── Responsive tweaks ───────────────────────────────────────────────── */
/* Desktop / wide tablets: slightly bigger HUD chrome so it doesn't look
   undersized next to the larger board. */
@media (min-width: 720px) {
  .gck-board-frame { padding: 16px; }
  .gck-board-frame::before { inset: 14.5px; }
  .gck-fly-layer { inset: 16px; }
  .gck-turn { font-size: 15px; min-height: 24px; }
  .gck-stat-value { font-size: 18px; }
  .gck-stat-label { font-size: 12px; }
  /* Keep the diff buttons rectangular at desktop sizes — slightly more
     horizontal padding only, line-height unchanged. */
  .gck-diff-pill { font-size: 13px; padding: 8px 16px; min-width: 64px; }
  .gck-new-game { padding: 10px 16px; font-size: 14px; }
  .gck-stats { gap: 14px; }
}
@media (max-width: 480px) {
  .game-checkers-root { padding: 8px 12px; }
  .gck-shell { gap: 8px; }
  .gck-board-frame { padding: 10px; }
  .gck-board-frame::before { inset: 8.5px; }
  .gck-fly-layer { inset: 10px; }
  .gck-action-bar { gap: 6px; }
  .gck-stats { gap: 6px; }
  .gck-stat-label { font-size: 11px; }
  .gck-stat-value { font-size: 15px; }
  .gck-difficulty { gap: 3px; }
  .gck-difficulty .gck-diff-label { display: none; }
  .gck-difficulty .gck-diff-pill { padding: 5px 9px; font-size: 11px; min-width: 44px; }
  .gck-action-bar .gck-new-game { padding: 6px 10px; font-size: 11px; }
  /* Game Options dialog — shrink on narrow screens so it doesn't cover
     the whole board. */
  .gck-dialog-backdrop { padding: 12px; }
  .gck-dialog { max-width: 260px; padding: 18px 18px 14px; border-radius: 14px; }
  .gck-dialog .gck-dialog-title { font-size: 16px; }
  .gck-dialog .gck-dialog-divider { margin: 10px 0 12px; }
  .gck-dialog .gck-dialog-row { padding: 2px 0; }
  .gck-dialog .gck-dialog-label { font-size: 13px; }
  .gck-dialog .gck-dialog-sub { font-size: 11px; }
  .gck-dialog .gck-dialog-actions { margin-top: 10px; }
  .gck-dialog .gck-dialog-cancel,
  .gck-dialog .gck-dialog-confirm { min-height: 38px; font-size: 13px; }
  .gck-dialog .gck-dialog-actions--center .gck-dialog-confirm { min-width: 140px; padding: 0 24px; }
  .gck-dialog .gck-switch { width: 44px; height: 26px; }
  .gck-dialog .gck-switch-thumb { width: 18px; height: 18px; }
  .gck-dialog .gck-switch input:checked + .gck-switch-track .gck-switch-thumb { transform: translateX(18px); }
}
@media (max-width: 360px) {
  .gck-board-frame { padding: 8px; }
  .gck-board-frame::before { inset: 6.5px; }
  .gck-fly-layer { inset: 8px; }
  .gck-stat-value { font-size: 14px; }
  .gck-turn { font-size: 13px; }
  .gck-action-bar { gap: 4px; }
  .gck-difficulty .gck-diff-pill { padding: 5px 7px; font-size: 10px; min-width: 38px; }
  .gck-action-bar .gck-new-game { padding: 5px 8px; }
  .gck-dialog { max-width: 230px; padding: 14px 14px 12px; }
  .gck-dialog .gck-dialog-title { font-size: 15px; }
  .gck-dialog .gck-dialog-actions--center .gck-dialog-confirm { min-width: 120px; padding: 0 20px; }
}
