:root {
  --accent-soft: #edf2ff;
  --ok-soft: #f4faf6;
  --photo-bg: #e8ebf0;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --panel: #192230;
  --raised: #263246;
  --line: #43516a;
  --line-soft: #303d52;
  --text: #edf2f9;
  --muted: #b1bed0;
  --faint: #9aabc1;
  --accent: #88adff;
  --accent-hi: #adc7ff;
  --accent-ink: #112044;
  --ok: #7bd9b0;
  --risk: #edc078;
  --bad: #ff9f9f;
  --accent-soft: #23375b;
  --ok-soft: #1b352d;
  --photo-bg: #111923;
}
.workspace-top-right { display: flex; gap: 14px; align-items: center; }
.ui-language { display: inline-flex; border: 1px solid var(--line); padding: 2px; border-radius: 6px; background: var(--panel); }
.ui-language button { height: 28px; min-width: 35px; border: 0; border-radius: 3px; padding: 0 7px; background: transparent; color: var(--muted); font: inherit; cursor: pointer; }
.ui-language button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.ui-theme { width: 35px; height: 35px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text); font-size: 21px; line-height: 1; cursor: pointer; }
.ui-theme:hover { border-color: var(--accent); }
.login-page .workspace-top { display: flex; position: absolute; inset: 0 0 auto; margin-left: 0; border: 0; background: transparent; justify-content: flex-end; }
.login-page .workspace-top > span, .login-page .connection { display: none; }
html[data-theme="dark"] .top,
html[data-theme="dark"] .btn:not(.primary):not(.ghost),
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] input[type="password"], html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] select, html[data-theme="dark"] textarea,
html[data-theme="dark"] .character-reference-section .drop, html[data-theme="dark"] .character-body-reference-section .drop,
html[data-theme="dark"] .character-reference, html[data-theme="dark"] .character-photo-number,
html[data-theme="dark"] .character-variant, html[data-theme="dark"] .compute-target,
html[data-theme="dark"] .tile, html[data-theme="dark"] .reel-bulk-actions { background: var(--panel); }
html[data-theme="dark"] .source-option, html[data-theme="dark"] .source-option .drop,
html[data-theme="dark"] .reference-choice, html[data-theme="dark"] .mode-option,
html[data-theme="dark"] .runpod-pod, html[data-theme="dark"] .uploads, html[data-theme="dark"] .toast { background: var(--panel); }
html[data-theme="dark"] .library, html[data-theme="dark"] .body-placeholder, html[data-theme="dark"] .gpu-panel { background: var(--raised); }
html[data-theme="dark"] .mode-option.on, html[data-theme="dark"] .queue-reel.selected,
html[data-theme="dark"] .queue-reel:hover, html[data-theme="dark"] .runpod-quote { background: var(--accent-soft); }
html[data-theme="dark"] .reel-action-errors { background: #382528; border-color: #82565c; }
html[data-theme="dark"] .tabs a.on, html[data-theme="dark"] .icon-link.on,
html[data-theme="dark"] .character-draft.on, html[data-theme="dark"] .character-variant.on,
html[data-theme="dark"] .character-trait-choice:has(input:checked), html[data-theme="dark"] .chip.run,
html[data-theme="dark"] .drop:hover, html[data-theme="dark"] .drop.over { background: var(--accent-soft); }
html[data-theme="dark"] .character-anchor.chosen { background: var(--ok-soft); border-color: #457a64; }
html[data-theme="dark"] .character-reference-photo { background: var(--photo-bg); }
html[data-theme="dark"] .tab-count, html[data-theme="dark"] .skip-link { color: var(--accent-ink); }
html[data-theme="dark"] .studio-symbol { color: #4f6079; }
@media (max-width: 760px) {
  .workspace-top { min-height: 52px; height: auto; padding-top: 8px; padding-bottom: 8px; gap: 10px; }
  .workspace-top > span { min-width: 0; font-size: 10px; }
  .workspace-top .breadcrumb-slash { margin: 0 6px; }
  .workspace-top-right { gap: 6px; flex-shrink: 0; }
  .workspace-top-right .connection { display: none; }
  .ui-language button { min-width: 30px; }
  .ui-theme { width: 32px; height: 32px; }
}
