html[data-theme="dark"] {
  color-scheme: dark;
  --theme-canvas: #101820;
  --theme-panel: #18232d;
  --theme-raised: #202e3a;
  --theme-hover: #293947;
  --theme-ink: #f1f4f6;
  --theme-muted: #b3c0cb;
  --theme-line: #384957;
  --theme-control-border: #6b7d8b;
  --theme-accent: #ffbf36;
  --theme-on-accent: #101820;
  --theme-selected: #3b311c;

  --ink: var(--theme-ink);
  --muted: var(--theme-muted);
  --paper: var(--theme-canvas);
  --surface: var(--theme-panel);
  --warm: var(--theme-raised);
  --line: var(--theme-line);
  --rule: var(--line);
  --gold: var(--theme-accent);
  --focus: var(--theme-accent);
  accent-color: var(--gold);
}

html[data-theme="dark"] ::selection {
  color: var(--theme-on-accent);
  background: var(--theme-accent);
}

html[data-theme="dark"] .workspace-sidebar,
html[data-theme="dark"] .skip:focus {
  background: var(--theme-panel);
}
html[data-theme="dark"] .rail-group p,
html[data-theme="dark"] .rail-group a {
  color: var(--muted);
}
html[data-theme="dark"] .rail-group a[aria-current] {
  background: var(--theme-selected);
  color: var(--theme-accent);
}
html[data-theme="dark"] .rail-account { border-color: var(--line); }
html[data-theme="dark"] .account-initial {
  background: var(--theme-hover);
  color: var(--ink);
}
html[data-theme="dark"] .drawer-scrim:not([hidden]) { background: rgb(2 8 13 / .72); }
html[data-theme="dark"] .public-shell,
html[data-theme="dark"] .public-shell .auth-layout {
  background: var(--paper);
}

html[data-theme="dark"] .primary,
html[data-theme="dark"] .note-no {
  background: var(--gold);
  color: var(--theme-on-accent);
}
html[data-theme="dark"] .secondary {
  background: var(--surface);
  border-color: var(--theme-control-border);
  color: var(--ink);
}
html[data-theme="dark"] input:not([type="hidden"], [type="file"], [type="search"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: var(--theme-canvas);
  border-color: var(--theme-control-border);
  color: var(--ink);
}
html[data-theme="dark"] ::placeholder {
  color: var(--muted);
  opacity: 1;
}
html[data-theme="dark"] .notice { background: #203b32; color: #b1ebc8; }
html[data-theme="dark"] .notice.warning { background: #3b301c; color: #ffe1a3; }
html[data-theme="dark"] .notice.error,
html[data-theme="dark"] .errorlist {
  background: #452b31;
  color: #ffc4c8;
}

html[data-theme="dark"] .artwork-heading,
html[data-theme="dark"] .review-notes { background: var(--surface); }
html[data-theme="dark"] .art-mat { background: var(--warm); }
html[data-theme="dark"] .version { color: var(--muted); }
html[data-theme="dark"] .versions a[aria-current] {
  color: var(--theme-accent);
  background: var(--theme-selected);
}
html[data-theme="dark"] .pin-mark {
  color: var(--theme-on-accent);
  border-color: var(--theme-on-accent);
}
html[data-theme="dark"] .project-list a:is(:hover, :focus-visible) .open-arrow {
  color: var(--theme-on-accent);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] .rail-group a:not([aria-current]):hover,
  html[data-theme="dark"] .rail-account button:hover,
  html[data-theme="dark"] .menu-control:hover,
  html[data-theme="dark"] .secondary:is(:enabled, a):hover {
    background: var(--theme-hover);
    color: var(--ink);
  }
  html[data-theme="dark"] .primary:is(:enabled, a):hover { background: #ffcf67; }
}
