@import url('/game/theme.css?v=20260817-light-contrast-1');

/*
 * Light-theme state restoration layer.
 * Keep the shared light palette, but restore semantic states that must remain
 * visually distinct after the generic light-mode surface overrides.
 */
html[data-theme="light"] {
  --muted: #626d7e;
  --game-footer-text: #626d7e;
}

/* Home: a live game label is a status, not muted footer copy. */
html[data-theme="light"] .coming-label.live-label {
  color: var(--good) !important;
}

/* Shared party-game states. */
html[data-theme="light"] .timer.is-urgent {
  background: rgba(187, 64, 80, .11) !important;
  color: var(--bad) !important;
}

html[data-theme="light"] .rank-item.winner {
  border: 1px solid rgba(169, 99, 8, .28);
  background: rgba(169, 99, 8, .09) !important;
}

/* Chosung special-round modes must remain distinguishable. */
html[data-theme="light"] .round-mode.lightning {
  border-color: rgba(169, 99, 8, .28);
  background: rgba(169, 99, 8, .07) !important;
}

html[data-theme="light"] .round-mode.double {
  border-color: rgba(201, 88, 52, .3);
  background: rgba(201, 88, 52, .07) !important;
}

html[data-theme="light"] .round-mode.royal {
  border-color: rgba(169, 99, 8, .42);
  background: linear-gradient(135deg, rgba(169, 99, 8, .12), rgba(201, 88, 52, .07)) !important;
}

/* Vault collisions are failure states and should not look like normal rows. */
html[data-theme="light"] .result-item.vault-result.collision {
  border: 1px solid rgba(187, 64, 80, .2);
  background: rgba(187, 64, 80, .075) !important;
}

/* Grid: preserve progress, current-position and local-player cues. */
html[data-theme="light"] .grid-cell.is-filled {
  border-color: rgba(54, 95, 125, .38);
  background: linear-gradient(145deg, rgba(54, 95, 125, .18), rgba(91, 61, 153, .11)) !important;
  box-shadow: 0 0 0 1px rgba(54, 95, 125, .05), inset 0 -5px 12px rgba(45, 52, 64, .04);
}

html[data-theme="light"] .grid-cell.is-current {
  border-color: #a46d00;
  box-shadow: 0 0 0 2px rgba(169, 99, 8, .16), 0 0 18px rgba(169, 99, 8, .13);
}

html[data-theme="light"] .grid-racer.is-me {
  border-color: rgba(54, 95, 125, .3);
  background: rgba(54, 95, 125, .085) !important;
}

/*
 * The host game-master panel shares the bottom-right corner with the sound
 * and guide controls. Move those controls above it whenever the panel is
 * actually visible.
 */
.fun-sound-toggle,
.game-guide-fab {
  transition: bottom .18s ease, transform .15s ease;
}

body:has(.game-master-control:not([hidden])) .fun-sound-toggle,
body:has(.game-master-control:not([hidden])) .game-guide-fab {
  bottom: 132px;
}

@media (max-width: 520px) {
  body:has(.game-master-control:not([hidden])) .fun-sound-toggle,
  body:has(.game-master-control:not([hidden])) .game-guide-fab {
    bottom: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fun-sound-toggle,
  .game-guide-fab {
    transition: none;
  }
}
