/* Shared semantic roles. The default palette's values are inlined in :root as
   a first-frame fallback; src/ui-themes.js holds every palette. */
:root {
  /* Fallback: the default palette (navy-gold in src/ui-themes.js), so the
     first frame paints before src/ui-theme.js sets the chosen theme inline.
     Keep in step with src/ui-themes.js; test-core.mjs checks it. */
  color-scheme: dark;
  --background: #0a1018;
  --surface: #131f2d;
  --raised: #1b2b3e;
  --text: #e6eef7;
  --muted: #a4b4c6;
  --accent-primary: #f2c14e;
  --accent-secondary: #7ec8f2;
  --on-accent: #14100a;
  --status-success: #54d399;
  --status-error: #ff98a1;
  --on-error: #221018;
  --status-warning: #efb65e;
  --hero-art: none;

  --panel-fill: linear-gradient(180deg, var(--surface), var(--background));
  --panel: var(--surface);
  --line: color-mix(in srgb, var(--text) 18%, var(--surface));
  --line-bright: color-mix(in srgb, var(--text) 38%, var(--surface));
  --track: color-mix(in srgb, var(--text) 13%, var(--surface));
  --recess: color-mix(in srgb, var(--background) 80%, var(--surface));
  --accent-wash: color-mix(in srgb, var(--accent-primary) 9%, var(--surface));
  --accent-line: color-mix(in srgb, var(--accent-primary) 65%, var(--surface));
  --primary-fill: linear-gradient(180deg, var(--accent-primary), color-mix(in srgb, var(--accent-primary) 94%, var(--background)));
  --secondary-fill: linear-gradient(90deg, var(--accent-secondary), color-mix(in srgb, var(--accent-secondary) 85%, var(--surface)));
  --panel-lift: 0 10px 24px color-mix(in srgb, var(--background) 35%, transparent), inset 0 1px 0 var(--line);
  --control-shadow: 0 4px 12px color-mix(in srgb, var(--background) 45%, transparent), inset 0 1px 0 var(--line);
}

.ui-theme-select {
  font: inherit;
  font-size: 12px;
  max-width: 210px;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.ui-theme-select:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.ui-theme-select option { background: var(--surface); color: var(--text); }
@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; gap: 6px; }
  .topbar .wallet { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
}
