:root[data-theme=light] {
  color-scheme: light;
  --bg: #f4f5f7; --card: #fff; --text: #191f28; --sub: #6b7684;
  --accent: #3182f6; --ok: #1f9d55; --warn: #d97706; --bad: #e5484d; --field: #f9fafb;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --paper: #101513; --white: #1a211e; --ink: #e7eee7; --muted: #a8b9ae;
  --green: #abc99b; --lime: #253c28; --line: #344239;
  --bg: var(--paper); --card: var(--white); --text: var(--ink); --sub: var(--muted);
  --accent: #8eb5ff; --ok: #74d99a; --warn: #f4bd65; --bad: #ff9a9d; --field: #141c18;
}
[data-theme-toggle] {
  flex-shrink: 0; font: inherit; font-size: 12px; font-weight: 650;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink, var(--text)); padding: 8px 13px;
  white-space: nowrap; cursor: pointer;
}
[data-theme-toggle]:hover { background: var(--white, var(--card)); }
[data-theme-toggle]:focus-visible { outline: 3px solid var(--green, var(--accent)); outline-offset: 3px; }
html[data-theme=dark] body { background: var(--paper); color: var(--ink); }
[data-theme=dark] :is(.eyebrow,.hero-description,.filter,.result-count,.card-description,.card-unavailable,.closing-note p,.site-footer,.studio-footer,.panel-help,.field-help,.editor-empty,.item-summary small,.visibility-button,.item-index,.field-label span,.editor-actions p,.image-preview p,.admin-toolbar #revision-label) { color: var(--muted); }
[data-theme=dark] :is(.hero h1 span,.brand-dot,.card-link,.closing-note strong,.footer-brand,.closing-mark,.art-placeholder,.empty-symbol) { color: var(--green); }
[data-theme=dark] :is(.header-link:hover,.card-link:hover) { color: #d0e6c2; }
[data-theme=dark] :is(.hero-cta,.tag,.button,.local-badge,.local-note,.admin-message,.empty-state,.image-preview,.connection,.task-button,.actions button+button,.visibility-badge) { background: #24332a; color: var(--ink); border-color: var(--line); }
[data-theme=dark] :is(.hero-cta:hover,.filter:hover,.button:hover:not(:disabled),.task-button[aria-current=true]) { background: #304637; }
[data-theme=dark] :is(.search-field,.studio-item,#item-form>input,#item-form>textarea,#item-form select,.field-row input,body[data-ui=operator] input,body[data-ui=operator] textarea) { background: var(--field); color: var(--ink); border-color: var(--line); }
[data-theme=dark] :is(.search-field input::placeholder,#item-form input::placeholder,#item-form textarea::placeholder) { color: var(--muted); }
[data-theme=dark] :is(.creation-card,.card-link,.card-unavailable,.item-controls,.order-button) { border-color: var(--line); }
[data-theme=dark] :is(.filter.active,.button-primary,.button-primary:hover:not(:disabled),body[data-ui=operator] button:not([data-theme-toggle]):not(#logout):not(#reload):not(.task-button),button.primary) { background: var(--green); color: #122015; border-color: var(--green); }
[data-theme=dark] body[data-ui=operator] :is(#logout,#reload) { color: var(--green); }
[data-theme=dark] :is(.button-danger,.admin-message.error) { color: #ffc5b4; background: #3d2925; border-color: #805146; }
[data-theme=dark] #message { color: #f4bd65; }
[data-theme=dark] .art-grid { background-image: linear-gradient(#34423980 1px,transparent 1px),linear-gradient(90deg,#34423980 1px,transparent 1px); }
[data-theme=dark] .art-kind { background: #1a211eee; color: #d1e4c5; border-color: #344239; }
@media(max-width:760px) {
  .site-header,.admin-header { height: auto; min-height: 87px; flex-wrap: wrap; padding: 18px 0; gap: 12px; }
  .header-nav { flex-wrap: wrap; gap: 12px; }
  body[data-ui=operator] header { flex-wrap: wrap; gap: 14px; }
  body[data-ui=operator] nav { flex-wrap: wrap; gap: 12px; }
}
body[data-ui=game-admin] .issue-form :is(input,textarea) { color: var(--text); }
[data-theme=light] body[data-ui=game-admin] { --line: #e3e5e8; }
[data-theme=dark] :is(.list-panel,.editor) { background: var(--white); }
[data-theme=dark] .skip-link { color: #122015; }
