/* GTV Blocks V1.3.0 – Dark skin for the existing light homepage design.
   Scoped to the iframe's html[data-gtv-theme="dark"] only.
   Board, controls, animations and game calculations remain unchanged. */
html[data-gtv-theme="dark"] {
  color-scheme: dark;
  --ink: #100e1e;
  --panel: #1f1a30;
  --line: rgba(178, 152, 255, .20);
  --text: #f5f1ff;
  --muted: #ada7c6;
  --cyan: #bf98ff;
  --violet: #9b65ff;
}
html[data-gtv-theme="dark"],
html[data-gtv-theme="dark"] body {
  background: #100e1e;
  color: #f5f1ff;
}
html[data-gtv-theme="dark"] .ambient {
  background: radial-gradient(ellipse 60% 60% at 50% 12%,rgba(104,48,197,.23),transparent 75%),
    radial-gradient(ellipse 39% 46% at 90% 18%,rgba(66,44,138,.13),transparent 82%),
    #100e1e;
}
html[data-gtv-theme="dark"] .ambient:before {
  background-image: linear-gradient(rgba(164,125,234,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(164,125,234,.035) 1px,transparent 1px);
}
html[data-gtv-theme="dark"] .ambient:after {
  background: radial-gradient(circle,rgba(125,67,225,.16),transparent 67%);
}
html[data-gtv-theme="dark"] .header { border-color: rgba(182,158,240,.17); }
html[data-gtv-theme="dark"] .brand-name,
html[data-gtv-theme="dark"] .headline h1 { color: #f7f4ff; }
html[data-gtv-theme="dark"] .brand-name em { color: #ae7eff; }
html[data-gtv-theme="dark"] .brand-sub,
html[data-gtv-theme="dark"] .edition,
html[data-gtv-theme="dark"] .headline .eyebrow { color: #b4a7cd; }
html[data-gtv-theme="dark"] .edition .dot { background: #ab74ff; box-shadow: 0 0 8px #9553f4; }
html[data-gtv-theme="dark"] .headline h1 span {
  background: linear-gradient(105deg,#d1abff,#9652ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-gtv-theme="dark"] .panel {
  background: linear-gradient(150deg,#231c37,#1a162a);
  border-color: rgba(187,160,247,.18);
  box-shadow: 0 12px 29px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.025);
}
html[data-gtv-theme="dark"] .stat-label,
html[data-gtv-theme="dark"] .stat-card .best,
html[data-gtv-theme="dark"] .progress-top,
html[data-gtv-theme="dark"] .progress-card p,
html[data-gtv-theme="dark"] .tip p,
html[data-gtv-theme="dark"] .key-row,
html[data-gtv-theme="dark"] .empty-scores,
html[data-gtv-theme="dark"] .live,
html[data-gtv-theme="dark"] .meta-id,
html[data-gtv-theme="dark"] .preview .stat-label,
html[data-gtv-theme="dark"] .hold-hint { color: #b2a9cc; }
html[data-gtv-theme="dark"] .score-value {
  background: linear-gradient(110deg,#f5eaff,#bd8aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-gtv-theme="dark"] .best strong,
html[data-gtv-theme="dark"] .mini-stat .num,
html[data-gtv-theme="dark"] .progress-top strong,
html[data-gtv-theme="dark"] .section-top h3,
html[data-gtv-theme="dark"] .help-title,
html[data-gtv-theme="dark"] .tip strong,
html[data-gtv-theme="dark"] .player-name,
html[data-gtv-theme="dark"] .player-score { color: #f4edff; }
html[data-gtv-theme="dark"] .progress-track { background: #3b2f55; }
html[data-gtv-theme="dark"] .tip {
  background: linear-gradient(145deg,#2b2146,#1e1931);
}
html[data-gtv-theme="dark"] .tip .symbol { color: #bb85ff; }
html[data-gtv-theme="dark"] .arena-status,
html[data-gtv-theme="dark"] .arena-status strong { color: #a69bbb; }
html[data-gtv-theme="dark"] .local-tag {
  background: rgba(149,89,243,.2);
  color: #dabaff;
  border-color: rgba(182,136,255,.28);
}
html[data-gtv-theme="dark"] .rank { color: #ab9bc8; }
html[data-gtv-theme="dark"] .leaderboard li { border-color: rgba(196,163,255,.13); }
html[data-gtv-theme="dark"] .empty-scores b { color: #d1adff; }
html[data-gtv-theme="dark"] .key {
  background: #322543;
  border-color: rgba(195,151,255,.25);
  color: #e8d4ff;
}
html[data-gtv-theme="dark"] .chip-button,
html[data-gtv-theme="dark"] .rail-pause {
  background: #312347;
  border-color: rgba(196,154,255,.27);
  color: #e7d3ff;
}
html[data-gtv-theme="dark"] .chip-button:hover,
html[data-gtv-theme="dark"] .rail-pause:hover {
  background: #412c66;
}
/* Sound toggle in the top-right: explicitly override the original white light pill. */
html[data-gtv-theme="dark"] #soundBtn.chip-button {
  background: #30243f;
  color: #f3e7ff;
  border-color: #7958aa;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .20);
}
html[data-gtv-theme="dark"] #soundBtn.chip-button:hover {
  background: #483163;
  border-color: #b98cf7;
}
/* Important: the light skin overrides --text, so the dark board overlay needs
   its own explicit text colors to remain readable when starting a game. */
html[data-gtv-theme="dark"] .overlay h2,
html[data-gtv-theme="dark"] .overlay .final-score { color: #fff; }
html[data-gtv-theme="dark"] .overlay p { color: #d1c8e4; }
html[data-gtv-theme="dark"] .overlay .overlay-kicker { color: #ccabff; }
html[data-gtv-theme="dark"] .primary {
  background: linear-gradient(110deg,#ad4cf8,#6425e9);
  color: #fff;
}
html[data-gtv-theme="dark"] .footer { color: #aba0c3; }
html[data-gtv-theme="dark"] .footer span { color: #b88cff; }
@media (max-width: 620px) {
  html[data-gtv-theme="dark"] .ctrl {
    background: linear-gradient(150deg,#332448,#221c38);
    color: #f0e4ff;
    border-color: rgba(177,138,244,.32);
    box-shadow: inset 0 1px rgba(255,255,255,.05);
  }
  html[data-gtv-theme="dark"] .ctrl span,
  html[data-gtv-theme="dark"] .ctrl-rotate span { color: #e2baff; text-shadow: none; }
  html[data-gtv-theme="dark"] .ctrl small,
  html[data-gtv-theme="dark"] .ctrl-rotate small { color: #cfc0e6; }
  html[data-gtv-theme="dark"] .ctrl:active,
  html[data-gtv-theme="dark"] .ctrl.pressed { background: #4a2b76; border-color: #be8cff; }
  html[data-gtv-theme="dark"] .ctrl.drop { background: linear-gradient(135deg,#9145e9,#5124c3); border-color: #a86cf1; }
  html[data-gtv-theme="dark"] .ctrl.drop span,
  html[data-gtv-theme="dark"] .ctrl.drop small { color: #fff; }
}
