/* Readable text on Playgrove's light and dark game themes. */
:root {
  --pg-ink: #30233f;
  --pg-secondary: #59456c;
  --pg-paper: #fffaf1;
  --pg-light: #f9efff;
}

main :is(.card-meta, .card-body p, .card-bottom span, .eyebrow) {
  color: var(--pg-secondary);
}

#game-dialog #game-subtitle,
#game-dialog :is(.label-small, .intro-details p, .instruction, .hud > span, .game-footer, .game-footer button, .difficulty button:not(.selected)) {
  color: var(--pg-secondary);
}

#game-dialog :is(.brain-display, .wave-game) {
  color: var(--pg-ink);
  background: var(--pg-paper);
  border: 1px solid #d8c6e2;
  border-radius: 16px;
}

#game-dialog .brain-display {
  min-height: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#game-dialog :is(.brain-choice, .word-pair-columns button, .frame-buttons button, .river-passengers .mini-button, .piano-key, .dpad button, .token-coins button, .shape-station span, .tool-cell-grid button, .ingredient-buttons button, .order-ticket b, .picnic-items button, .reaction-pad, #circuit-a, #circuit-b, #gate-a, #gate-b) {
  color: var(--pg-ink);
}

#game-dialog .cup-label {
  display: inline-block;
  padding: .1em .45em;
  border-radius: .5em;
  color: var(--pg-ink);
  background: var(--pg-paper);
}

#game-dialog :is(.game-help, .arena-message, .game-arena > label, .number-line b, .crossnumber-board b, .abacus-columns b, .abacus-columns span, .harvest-columns b, .harvest-columns strong, .harvest-goal, .fraction-models b, .array-equation, .clock-time, .compass-guide, .weekday-guide, .egg-basket, .tool-controls output, .alphabet-guide, .sequencer-labels, .picnic-summary, .fraction-label, .lock-ring b, .river-bank b, .river-passengers p, .treasury-target, #pair-sum, #token-total, .mirror-pair small, .shop-total) {
  color: var(--pg-secondary);
}

#game-dialog .game-arena:not(.theme-space) :is(.game-help, .arena-message) {
  color: var(--pg-secondary) !important;
}

#game-dialog .theme-space :is(.game-help, .arena-message, .coordinate-top b, .coordinate-side b, .switches button b) {
  color: var(--pg-light) !important;
}

#game-dialog .theme-space .wave-game :is(.game-help, .arena-message) {
  color: var(--pg-secondary) !important;
}

#game-dialog .slide-tile {
  background-color: #6845aa;
  color: #fff;
}

#game-dialog .slide-tile.inplace {
  background-color: #246f61;
  color: #fff;
}

#game-dialog .typing-word .correct {
  color: #80edc0;
}

#game-dialog :is(button, input, select, a, textarea):focus-visible {
  outline: 2px solid #251540;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #fff;
}

@media (forced-colors: active) {
  #game-dialog :is(button, input, select, a, textarea):focus-visible {
    outline-color: Highlight;
  }
}

#game-dialog .difficulty button.selected {
  background-color: #5840ae;
  color: #fff;
}
