/* Shared consumer palette. The editorial panel keeps its independent theme. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151b19;
  --white: #202925;
  --ink: #eceee8;
  --muted: #afb9b1;
  --line: #3c4942;
  --sage: #2b3b33;
  --gold: #a0cdbb;
  --accent: #a0cdbb;
  --on-accent: #142b23;
  --accent-hover: #bcdfd0;
  --placeholder: #2b332e;
  --placeholder-ink: #a4afa5;
  --tag: #303b34;
  --tag-ink: #d2dcd3;
  --demo: #3c3426;
  --demo-ink: #e1c79c;
  --classical: #28322b;
  --general: #2c332c;
  --nav: #202925fa;
  --back: #202925ed;
  --selected-border: #a0cdbb;
  --timeline: #708e7f;
  --hover-ring: #a0cdbb80;
  --danger: #ffa99a;
}
/* Respect the device setting even when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #151b19;
    --white: #202925;
    --ink: #eceee8;
    --muted: #afb9b1;
    --line: #3c4942;
    --sage: #2b3b33;
    --gold: #a0cdbb;
    --accent: #a0cdbb;
    --on-accent: #142b23;
    --accent-hover: #bcdfd0;
    --placeholder: #2b332e;
    --placeholder-ink: #a4afa5;
    --tag: #303b34;
    --tag-ink: #d2dcd3;
    --demo: #3c3426;
    --demo-ink: #e1c79c;
    --classical: #28322b;
    --general: #2c332c;
    --nav: #202925fa;
    --back: #202925ed;
    --selected-border: #a0cdbb;
    --timeline: #708e7f;
    --hover-ring: #a0cdbb80;
    --danger: #ffa99a;
  }
}
.theme-switch { display:flex; align-items:center; gap:8px; padding:8px 8px 12px; border-bottom:1px solid var(--line); margin-bottom:8px; }
.theme-switch[hidden] { display:none; }
.theme-switch label { font-size:12px; color:var(--muted); }
.theme-switch select { margin-inline-start:auto; max-width:145px; min-height:44px; padding:8px; font:inherit; font-size:14px; color:var(--ink); background:var(--white); border:1px solid var(--line); border-radius:8px; }
.language-switch select { background:var(--white); }
input::placeholder, textarea::placeholder { color:var(--muted); opacity:1; }
.entry-form .errorlist { color:var(--danger, #a33125); }
.danger { color:var(--danger, #973f32); }
.lead { color:var(--muted); }
.reading+.reading { border-color:var(--line); }
.skip:focus { background:var(--white); color:var(--ink); z-index:40; }
@media (max-width:600px) { .theme-switch select { font-size:16px; } }
