/* Games share the site's saved light/shadow choice. */
:root{
  color-scheme:light;
  --game-gold:#8b611a;
  --game-console-bg:var(--surface);
  --game-stage-bg:#e5effd;
  --game-overlay-bg:#f7fbfff0;
  --game-control-bg:var(--surface2);
  --game-control-line:var(--line);
  --game-control-text:var(--text);
  --game-action-bg:#dceaff;
  --game-action-text:#164779;
  --game-button-bg:#e9c471;
  --game-button-text:#14203b;
  --game-hero-wash:linear-gradient(90deg,#f5f9fff7 0%,#f5f9ffe8 34%,#f5f9ff38 76%);
  --game-invitation-wash:linear-gradient(90deg,#f4f9fff5,#f4f9ffda);
}
html[data-theme=shadow]{
  color-scheme:dark;
  --game-gold:#edd391;
  --game-console-bg:#0a152b;
  --game-stage-bg:#040b1c;
  --game-overlay-bg:#050e22e8;
  --game-control-bg:#172c4e;
  --game-control-line:#35537a;
  --game-control-text:#d8ecff;
  --game-action-bg:#325475;
  --game-action-text:#ffedbe;
  --game-button-bg:#edcf8b;
  --game-hero-wash:linear-gradient(90deg,#071021f0 0%,#071021c0 34%,#07102120 76%);
  --game-invitation-wash:linear-gradient(90deg,#071125ed,#071125aa);
}
/* The Games pages inherit the selected palette instead of the saga's fixed one. */
body.universe{
  --bg:inherit;
  --surface:inherit;
  --surface2:inherit;
  --text:inherit;
  --muted:inherit;
  --line:inherit;
  --accent:inherit;
  --shadow:inherit;
  --hero:inherit;
}
.universe .theme-control{display:flex}
.universe-hero{background-image:var(--game-hero-wash),url('../images/universe/games-hero.webp');color:var(--text)}
.universe-hero p{color:var(--muted)}
.games-invitation{background:var(--surface);color:var(--text);border-color:var(--line)}
.games-invitation:before{background:var(--game-invitation-wash),url('../images/universe/games-hero.webp') center/cover}
.games-invitation .eyebrow,.games-invitation .section-link,.game-card .game-type{color:var(--accent)}
.games-invitation .section-head p,.game-card p{color:var(--muted)}
.game-card{background:var(--surface);border-color:var(--line);color:var(--text)}
.game-card .play-link{color:var(--game-gold)}
.universe .btn,.game-filters button.active{background:var(--game-button-bg);color:var(--game-button-text);border-color:var(--game-button-bg)}
.universe .btn.secondary{background:var(--surface2);color:var(--text);border-color:var(--line)}
.game-companion strong{color:var(--game-gold)}
.game-console{background:var(--game-console-bg);border-color:var(--line);box-shadow:var(--shadow);color:var(--text)}
.game-hud,.game-feedback{color:var(--muted)}
.game-hud strong,.game-overlay strong,.game-pause-state{color:var(--game-gold)}
.canvas-stage{background:var(--game-stage-bg);border-color:var(--line)}
.game-overlay{background:var(--game-overlay-bg)}
.game-overlay p{color:var(--muted)}
.touch-controls button{background:var(--game-control-bg);color:var(--game-control-text);border-color:var(--game-control-line)}
.touch-controls .action-key,.touch-controls.expanded-controls button[data-control="Space"],.touch-controls.expanded-controls button[data-control="Build"],.touch-controls.expanded-controls button[data-control="Flag"]{background:var(--game-action-bg);color:var(--game-action-text)}
.game-word-entry label{color:var(--game-gold)}
.game-word-entry input{background:var(--surface2);color:var(--text);border-color:var(--game-control-line)}
.game-word-entry small{color:var(--muted)}
@media(max-width:600px){
  :root{--game-hero-wash:linear-gradient(90deg,#f5f9fff7,#f5f9ffd9)}
  html[data-theme=shadow]{--game-hero-wash:linear-gradient(90deg,#071021ed,#071021a8)}
}
