/* The game shell sets data-theme before paint and supplies the shared Tour palette. */
:root[data-theme="dark"] {
  --action-fill: var(--lime);
  --action-text: #15271e;
  --choice-fill: #304b37;
  --control-line: #7e9482;
  --gold-text: #e6cd9c;

  .hero, .split, .note, .itinerary article:first-child,
  .broadcast, .identityPreview:not([hidden]),
  #avatarForm .avatarCards label, .teamTile,
  .tourStops li, .tourStops [data-tour-stop],
  .partnerAccess, .partnerBody [data-access=stages] article,
  .atlasFrame, .prizeViewer, .rewardFeature, .rewardLocker, .rewardFinish,
  .rewardPrizes li, .tourScorePanel thead {
    background: var(--card);
    border-color: var(--rule);
    color: var(--ink);
  }

  .field input:not([type=range]):not([type=radio]):not([type=checkbox]), select,
  .showcaseTools input, .showcaseTools select {
    background: var(--card);
    border-color: var(--control-line);
    color: var(--ink);
  }
  input::placeholder { color: var(--muted); opacity: 1; }
  .secondary { border-color: var(--control-line); }
  input[type=radio], input[type=checkbox], input[type=range],
  #avatarForm .avatarCards input, .teamTile input { accent-color: var(--lime); }
  #avatarForm .avatarCards label:has(input:checked), .teams label:has(:checked), .teamTile:has(:checked) {
    background: var(--choice-fill);
    border-color: var(--lime);
    box-shadow: inset 0 0 0 1px var(--lime);
  }
  #avatarForm .avatarCards label:has(input:focus-visible),
  .teamTile:has(:focus-visible), :focus-visible { outline-color: var(--lime); }
  .teamPlate:not(.dark), .tourScoreBadge:not(.dark) { background: #f5f6ee; }

  .identityPreview small, .stageCopy .stageDescription, .stageCopy .stageState,
  .stageDates>span, .partnerBody .accessCourse p, .accessConditions p,
  .atlasStages small, .atlasStepNumber, .atlasExternal, .atlasCredits,
  .atlasDetail .atlasState { color: var(--muted); }
  .stageDates time, .tourAtlas, .atlasStages button { color: var(--ink); }
  [data-status=open] .stageState { color: var(--lime); }
  [data-status=open] .stageState::before { background: currentColor; }
  .stageDates, .accessConditions, .atlasStages li, .tourScoreStages { border-color: var(--rule); }
  .accessCourse small, .rewardEyebrow, .prizeViewerHead p,
  .prizeDetail>[data-lot=status], .prizeCurrent small { color: var(--gold-text); }

  .atlasStages button:hover, .atlasStages button[aria-pressed=true],
  .tourScoreMe, .tourScoreSelected { background: var(--choice-fill); color: var(--ink); }
  .picker button[aria-pressed=true], .prizeRanks [aria-pressed=true] {
    background: var(--action-fill);
    color: var(--action-text);
  }
  .atlasMapControls { background: var(--card); border-color: var(--control-line); }
  .atlasMapControls button { color: var(--ink); }
  .atlasMapControls button[aria-pressed=true] { background: var(--lime); color: var(--action-text); }
  .tourScorePanel .tourScoreBrandLink, .tourScoreAccount .tourScoreTeamLink {
    background: var(--card);
    border-color: var(--control-line);
    color: var(--ink);
  }
  .tourScorePanel .tourScoreBrandLink:hover { background: var(--choice-fill); }
  .rewardGalleryActions .button { background: var(--lime); color: var(--action-text); }
  .rewardGalleryActions .secondary { background: transparent; color: var(--ink); }
}
