.warmup-page .game-panel { min-width: 0; }
.warmup-page .swatch-card { position: relative; isolation: isolate; background: light-dark(#ded4ef, #211930); }
.warmup-page .swatch-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: var(--target);
}

.warmup-page :is([data-phase="study"], [data-phase="result"]) #targetSwatch::before { opacity: 1; }
.warmup-page [data-phase="result"] #targetSwatch::before { transition: opacity var(--motion-quick); }
.warmup-page #guessSwatch::before { opacity: 1; background: var(--guess); }
.warmup-page [data-phase="ready"] #guessSwatch::before { opacity: 0; }
.warmup-page .swatch-label { color: #fff; background: #211930; }
.warmup-page .controls { border: 0; min-width: 0; padding: 0; }
.warmup-page .controls:disabled { opacity: .64; }
.warmup-page .control-row input { min-width: 0; min-height: 35px; margin: 0; }
.warmup-page .button-row button { min-height: 44px; }
.warmup-page .button-row { min-height: 44px; }
.warmup-page .result-box { animation: site-reveal var(--motion-quick); }
.warmup-page :is(.control-head, .result-box) { font-variant-numeric: tabular-nums; }
.warmup-page .challenge-action { text-decoration: none; }
.legends-page .tab { min-height: 44px; }
.legends-page .your-row {
  display: grid;
  align-items: center;
  min-height: 64px;
  margin: 0 0 16px;
  font-variant-numeric: tabular-nums;
}
.legends-page .your-row > [data-period] {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity var(--motion-quick);
}
.legends-page .your-row[data-active-period="today"] > [data-period="today"],
.legends-page .your-row[data-active-period="alltime"] > [data-period="alltime"] {
  opacity: 1;
  pointer-events: auto;
  user-select: text;
}
.legends-page .record-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  user-select: none;
  white-space: nowrap;
}
.legends-page .tier-reference summary { min-height: 44px; }
.legends-page .tier-reference .rank-list { margin: 0 12px 12px; }
.legends-page .tier-reference .rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  gap: 12px;
}
.legends-page .rank-row dd { margin: 0; color: var(--body); text-align: right; }
.legends-page .metric { font-variant-numeric: tabular-nums; }

@media (prefers-color-scheme: light) {
  .warmup-page :is(.game-panel, .challenge-strip-inner, .result-box, .info-card, .game-copy),
  .legends-page :is(.board, .rank-row, .your-row) {
    background: #f2ebfa;
    border-color: #d8cde8;
    color: var(--ink);
  }
  .warmup-page :is(.control-head, .challenge-strip h2, .challenge-meta span, .prompt),
  .legends-page .tab.active { color: var(--ink); }
  .legends-page .tab.active { background: #e0d1f3; border-color: #a68cce; }
}
