:root {
  --bg-void: #0a0b0f;
  --bg-deep: #12141b;
  --panel: rgba(24, 27, 36, 0.72);
  --panel-solid: #1a1d27;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hi: rgba(255, 255, 255, 0.16);
  --red-1: #ff4b5c;
  --red-2: #c81e3a;
  --red-glow: #ff2d47;
  --white-1: #fdf6e3;
  --white-2: #e2cf9a;
  --white-glow: #fff3d0;
  --gold: #d4a537;
  --gold-soft: #e8c766;
  --text-main: #f3efe6;
  --text-dim: #ffffff;
  --text-faint: #ffffff;
  --success: #3ddc84;
  --danger: #ff5b6e;
  --board-bg: #181a22;
  --board-line: rgba(255, 255, 255, 0.05);
  --radius-lg: 26px;
  --radius-md: 30px;
  --radius-sm: 12px;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(rgba(28, 19, 82, 0.10), rgba(28, 19, 82, 0.10)),
    url('bg.png') center center / cover no-repeat;
  color: var(--text-main);
  font-family: var(--font-body);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
}

#appRoot {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  animation: blobFloat 18s ease-in-out infinite;
}

.bg-blob.b1 {
  width: 420px;
  height: 420px;
  background: rgba(200, 30, 58, 0.20);
  top: -120px;
  left: -100px;
  animation-delay: 0s;
}

.bg-blob.b2 {
  width: 380px;
  height: 380px;
  background: rgba(212, 165, 55, 0.14);
  bottom: -140px;
  right: -100px;
  animation-delay: -6s;
}

.bg-blob.b3 {
  width: 320px;
  height: 320px;
  background: rgba(90, 60, 150, 0.14);
  bottom: 20%;
  left: 40%;
  animation-delay: -11s;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -24px) scale(1.08);
  }
}

/* ===== Preloader ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-void);
  transition: opacity .6s ease, visibility .6s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pl-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 34px;
}

.pl-node {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  transform: rotate(45deg);
  animation: plPulse 1.4s ease-in-out infinite;
}

.pl-node.r {
  background: linear-gradient(135deg, var(--red-1), var(--red-2));
  box-shadow: 0 0 16px rgba(255, 60, 80, 0.7);
}

.pl-node.w {
  background: linear-gradient(135deg, var(--white-1), var(--white-2));
  box-shadow: 0 0 16px rgba(255, 240, 200, 0.6);
}

.pl-node:nth-child(1) {
  animation-delay: 0s;
}

.pl-node:nth-child(2) {
  animation-delay: .15s;
}

.pl-node:nth-child(3) {
  animation-delay: .3s;
}

.pl-node:nth-child(4) {
  animation-delay: .45s;
}

.pl-node:nth-child(5) {
  animation-delay: .6s;
}

@keyframes plPulse {

  0%,
  100% {
    opacity: .35;
    transform: rotate(45deg) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: rotate(45deg) scale(1.15);
  }
}

.pl-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 7vw, 42px);
  letter-spacing: 4px;
  text-align: center;
  background: #d4a538;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 6px 0;
}

.pl-sub {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 36px;
}

.pl-bar-track {
  width: min(260px, 60vw);
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.pl-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--red-1), var(--gold-soft));
  transition: width .18s ease;
  box-shadow: 0 0 12px rgba(255, 80, 80, 0.6);
}

.pl-pct {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

/* ===== Screens ===== */
.screen {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(14px) scale(0.99);
  transition: opacity .45s ease, transform .45s ease;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ===== Menu ===== */
#screen-menu {
  justify-content: flex-start;
  padding-top: max(28px, env(safe-area-inset-top));
}

.menu-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--gold-soft);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.menu-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.menu-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(38px, 10vw, 56px);
  letter-spacing: 2px;
  text-align: center;
  line-height: 1;
  background: #d5a73a;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
  filter: drop-shadow(0 4px 22px rgba(200, 40, 60, 0.35));
}

.menu-tagline {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin: 10px 0 30px 0;
  text-align: center;
  max-width: 350px;
  padding: 0 20px;
}

.mini-board {
  width: 0px;
  height: 0px;
  margin-bottom: 26px;
  position: relative;
}

.menu-panel {
  width: min(420px, 90vw);
  background: var(--panel);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.panel-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-label::before {
  content: '';
  width: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.choice-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.choice-row:last-child {
  margin-bottom: 0;
}

.choice-btn {
  flex: 1;
  padding: 13px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}

.choice-btn.active {
  border-color: var(--gold);
  color: var(--bg-void);
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 18px rgba(212, 165, 55, 0.35);
}

.choice-btn:active {
  transform: scale(0.96);
}

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  position: relative;
  width: min(420px, 90vw);
  padding: 18px;
  font-size: 15px;
  font-weight: 800;
  color: #1a0a0e;

  background: linear-gradient(135deg,
      var(--red-1) 0%,
      var(--gold-soft) 100%);

  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;

  /* 3D depth */
  box-shadow:
    0 7px 0 #9b2632,
    0 11px 0 #661923,
    0 18px 30px rgba(255, 60, 80, 0.35),

    /* Inner highlights */
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(120, 0, 15, 0.25);

  margin-bottom: 12px;

  cursor: pointer;
  transform: translateY(0);

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.2s ease;
}

/* Glossy top highlight */
.btn-primary::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 8%;
  width: 84%;
  height: 35%;
  border-radius: 10px;

  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.38),
      rgba(255, 255, 255, 0));

  pointer-events: none;
}

/* Hover = button rises */
.btn-primary:hover {
  filter: brightness(1.08);

  transform: translateY(-3px);

  box-shadow:
    0 10px 0 #9b2632,
    0 14px 0 #661923,
    0 22px 38px rgba(255, 60, 80, 0.45),
    inset 0 2px 0 rgba(255, 255, 255, 0.6),
    inset 0 -3px 0 rgba(120, 0, 15, 0.25);
}

/* Press = button goes down */
.btn-primary:active {
  transform: translateY(6px);

  box-shadow:
    0 2px 0 #9b2632,
    0 4px 0 #661923,
    0 8px 15px rgba(255, 60, 80, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(120, 0, 15, 0.3);
}

.btn-secondary {
  position: relative;
  width: min(420px, 90vw);
  padding: 24px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);

  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.10),
      var(--panel) 45%,
      rgba(0, 0, 0, 0.18));

  border: 1px solid var(--glass-border);
  border-radius: 30px;

  /* 3D depth */
  box-shadow:
    0 5px 0 rgba(0, 0, 0, 0.45),
    0 9px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);

  margin-bottom: 12px;

  cursor: pointer;
  overflow: hidden;

  transform: translateY(0);

  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.2s ease,
    filter 0.2s ease;
}

/* Top glossy highlight */
.btn-secondary::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 7%;
  width: 86%;
  height: 35%;

  border-radius: 9px;

  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.14),
      transparent);

  pointer-events: none;
}

/* Hover */
.btn-secondary:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);

  box-shadow:
    0 7px 0 rgba(0, 0, 0, 0.45),
    0 13px 25px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

/* Pressed */
.btn-secondary:active {
  transform: translateY(4px);

  box-shadow:
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 5px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  font-size: 11.5px;
  padding: 10px 18px;
  border: 1px solid var(--glass-border-hi);
  border-radius: 999px;
}

.menu-footer {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 26px;
  flex-wrap: wrap;
  justify-content: center;
}

.stats-strip {
  display: flex;
  gap: 10px;
  width: min(420px, 90vw);
  margin-bottom: 18px;
}

.stat-chip {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}

.stat-chip .num {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
}

.stat-chip.red .num {
  color: var(--red-1);
}

.stat-chip.white .num {
  color: var(--white-1);
}

.stat-chip .lbl {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ===== Game screen ===== */
#screen-game {
  padding: max(14px, env(safe-area-inset-top)) 12px 14px 12px;
  justify-content: flex-start;
}

.hud {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.hud-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
}

.hud-btn svg {
  width: 19px;
  height: 19px;
  stroke: var(--text-main);
}

.hud-btn:active {
  transform: scale(0.9);
}

.turn-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 9px 14px;
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.turn-dot {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: all .35s ease;
}

.turn-dot.red {
  background: linear-gradient(135deg, var(--red-1), var(--red-2));
  box-shadow: 0 0 14px var(--red-glow);
}

.turn-dot.white {
  background: linear-gradient(135deg, var(--white-1), var(--white-2));
  box-shadow: 0 0 14px var(--white-glow);
}

.turn-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.turn-text .who {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 10.5px;
  display: block;
  letter-spacing: 2px;
  margin-top: 1px;
}




.board-wrap {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  position: relative;
  margin-bottom: 12px;

  border-radius: var(--radius-lg);
  overflow: hidden;

  background: var(--board-bg);
  border: 1px solid var(--glass-border-hi);

  /* Premium 3D depth */
  box-shadow:
    /* Main floating shadow */
    0 30px 70px rgba(0, 0, 0, 0.55),

    /* Deep bottom extrusion */
    0 12px 0 rgba(0, 0, 0, 0.45),
    0 18px 0 rgba(0, 0, 0, 0.25),

    /* Outer rim */
    0 0 0 2px rgba(255, 255, 255, 0.04),

    /* Top glass highlight */
    inset 0 2px 0 rgba(255, 255, 255, 0.18),

    /* Inner bottom depth */
    inset 0 -5px 0 rgba(0, 0, 0, 0.35),

    /* Inner board shadow */
    inset 0 0 60px rgba(0, 0, 0, 0.4);

  transform: translateY(0);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

/* Top glossy frame highlight */
.board-wrap::before {
  content: "";
  position: absolute;
  inset: 1px;

  border-radius: inherit;

  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.12),
      transparent 25%,
      transparent 75%,
      rgba(0, 0, 0, 0.15));

  pointer-events: none;
  z-index: 10;
}

/* 3D bottom rim */
.board-wrap::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  bottom: -13px;
  height: 15px;

  border-radius: 0 0 var(--radius-lg) var(--radius-lg);

  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.85));

  filter: blur(1px);
  z-index: -1;
}


.board-plaque {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: linear-gradient(135deg, #7a1424, #4a0b16);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 16px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--gold-soft);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

#boardCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.toast {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(10, 10, 14, 0.92);
  border: 1px solid var(--glass-border-hi);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-main);
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
  z-index: 6;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.move-strip {
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #fff;
  padding: 5px 4px;
  letter-spacing: 0.5px;
}

.move-strip b {
  color: var(--text-dim);
  font-weight: 600;
}

/* ===== Modals ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 7, 10, 0.72);
  backdrop-filter: blur(6px);
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-box {
  width: min(440px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(28, 31, 41, 0.97), rgba(18, 20, 27, 0.97));
  border: 1px solid var(--glass-border-hi);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(24px) scale(0.96);
  transition: transform .32s cubic-bezier(.2, .9, .3, 1.3);
}

.modal-overlay.show .modal-box {
  transform: translateY(0) scale(1);
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
  margin: 0 0 4px 0;
  text-align: center;
}

.modal-sub {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-box {
  position: relative;
}

.htp-section {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.htp-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.htp-num {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red-1), var(--gold-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: #1a0a0e;
  flex-shrink: 0;
}

.htp-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-family: var(--font-body);
  font-weight: 700;
}

.htp-body {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 10px 0;
}

.htp-diagram {
  width: 100%;
  height: 90px;
  display: block;
  margin-top: 6px;
}

.htp-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.htp-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.htp-control .icn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.htp-control .icn svg {
  width: 15px;
  height: 15px;
  stroke: var(--gold-soft);
}

.win-emblem {
  width: 88px;
  height: 88px;
  margin: 6px auto 14px auto;
  position: relative;
}

.win-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  text-align: center;
  letter-spacing: 1px;
  margin: 0 0 6px 0;
}

.win-desc {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.win-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 4px;
  border-bottom: 1px solid var(--glass-border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 13.5px;
  font-weight: 600;
}

.settings-sub {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

.toggle {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  cursor: pointer;
  transition: background .25s ease;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.toggle.on {
  background: linear-gradient(90deg, var(--red-1), var(--gold-soft));
}

.toggle .knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: left .25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle.on .knob {
  left: 22px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  width: 100%;
  margin-bottom: 0;
}

@media (max-width:420px) {
  .menu-title {
    font-size: 34px;
  }

  .btn-primary,
  .btn-secondary {
    font-size: 13px;
  }
}

@media (max-height:680px) {
  .menu-tagline {
    margin-bottom: 16px;
  }

  .mini-board {
    margin-bottom: 14px;
  }

  .menu-panel {
    padding: 16px;
  }
}

#moveCount {
  font-weight: bold;
}