@import url('/language.css');
:root { color-scheme: dark; }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --panel2: #f0f2f7;
  --line: #dfe3ec;
  --text: #252a38;
  --muted: #667085;
  --accent: #7046cb;
  --accent2: #7753d6;
  --green: #257656;
  --orange: #94601c;
  --red: #bc3d4c;
  --theme-surface-input: #f9fafc;
  --theme-surface-base: #ffffff;
  --theme-surface-raised: #eef1f7;
  --theme-ink-strong: #252a38;
  --theme-ink-secondary: #4b5569;
  --theme-ink-muted: #667085;
  --theme-border: #dfe3ec;
  --theme-accent-soft: #f0eafa;
  --theme-accent-ink: #7046b5;
  --theme-accent-line: #d9ccef;
  --theme-success-soft: #eaf6f0;
  --theme-success-ink: #257656;
  --theme-success-line: #bddfce;
  --theme-warning-soft: #fff5e4;
  --theme-warning-ink: #94601c;
  --theme-warning-line: #ead5ad;
  --theme-danger-soft: #fceef0;
  --theme-danger-ink: #bc3d4c;
  --theme-danger-line: #efc8cf;
  --theme-info-soft: #ecf2fc;
  --theme-info-ink: #36659e;
  --theme-info-line: #c7d8f0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-shrink: 0;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
}
.theme-toggle:hover { background: var(--panel2); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-icon { width: 16px; height: 16px; flex-shrink: 0; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }
.auth-theme-control { position: absolute; top: 26px; right: 32px; z-index: 3; }
.canvas-workbench, .canvas-view .canvas-workbench input { color-scheme: inherit; }
[data-theme="light"] .primary { background: var(--accent); color: #fff; }
[data-theme="light"] .primary:hover:not(:disabled) { background: #5f39b2; }
[data-theme="light"] .auth-story { background: #efedf8; }
[data-theme="light"] .art-frame { background: linear-gradient(120deg,#ffffffb3,#e8e1f6b3); border-color: #d4c7e7; }
[data-theme="light"] .art-frame span,
[data-theme="light"] .art-frame i { color: #6e578a; }
[data-theme="light"] .canvas-workbench .canvas-stage { background-image: radial-gradient(#d6d9e4 .8px,transparent .8px); }
[data-theme="light"] .canvas-workbench .canvas-node { box-shadow: 0 8px 24px #29334b0d; }
[data-theme="light"] .canvas-workbench .canvas-node.selected { box-shadow: 0 0 0 1px var(--accent),0 10px 28px #49347714; }
[data-theme="light"] .canvas-workbench .canvas-node-head button,
[data-theme="light"] .canvas-header-actions #canvasSaveStatus,
[data-theme="light"] .canvas-generator-form small,
[data-theme="light"] .canvas-prompt-usage,
[data-theme="light"] #canvasPromptHistorySummary,
[data-theme="light"] .canvas-project-row small { color: var(--muted); }
[data-theme="light"] .canvas-workbench .canvas-note,
[data-theme="light"] .canvas-workbench .canvas-note .canvas-node-head,
[data-theme="light"] .canvas-workbench .canvas-note textarea { background: #fff8e7; border-color: #e6d6ae; color: #705a2b; }
@media (max-width: 640px) {
  .auth-theme-control { top: 19px; right: 18px; }
  .theme-toggle { min-width: 36px; min-height: 36px; padding: 8px; }
  .topbar .theme-toggle [data-theme-label] { display: none; }
  .topbar { gap: 8px; }
  .topbar > div:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-right { flex-shrink: 0; }
}
@media (max-width: 380px) { .topbar #modeBadge { display: none; } }

[data-theme="light"] .sidebar { background: var(--panel); }
