/* Theme selection is independent of creative content and persists per browser. */
:root { color-scheme: dark; }
:root[data-studio-theme="light"] { color-scheme: light; }
.studio-theme-control { display: grid; gap: 9px; padding: 12px 8px; border-block: 1px solid var(--border); }
.studio-theme-label { font-size: 12px; color: var(--muted); }
.studio-theme-options { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 4px; border-radius: 9px; padding: 3px; background: #15161a; }
.studio-theme-control .studio-theme-options > button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; min-width: 0; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: #a6a8b1; font: inherit; font-size: 12px; cursor: pointer; }
.studio-theme-control .studio-theme-options > button:hover { background: #303037; color: #f5f5f7; }
.studio-theme-control .studio-theme-options > button[aria-checked="true"] { background: #3b304d; color: #e2d2ff; box-shadow: 0 1px 4px #0003; }
.studio-theme-control .studio-theme-options > button:focus-visible { outline: 2px solid #9d73ef; outline-offset: 2px; }
.studio-theme-options svg { flex: 0 0 15px; }
@media (pointer: coarse), (max-width: 640px) { .studio-theme-control .studio-theme-options > button { min-height: 44px; } }

/* Deliberate art-directed overrides; no filters on images, video or authored text. */
:root[data-studio-theme="light"] {
  --background: #f5f6fa; --surface: #ffffff; --surface-2: #eef0f5;
  --border: #dce0e9; --text: #232937; --muted: #626b7b; --accent: #7143d6; --success: #16744f;
}
:root[data-studio-theme][data-studio-theme="light"] .canvas-workspace {
  --canvas-bg: #f1f3f7; --canvas-panel: #fff; --canvas-panel-strong: #f8f9fc;
  --canvas-border: #d5dae4; --canvas-border-soft: #e0e4ec; --canvas-text: #232937;
  --canvas-muted: #626b7b; --canvas-accent: #7950d8; --canvas-accent-bright: #7143d6;
  --canvas-danger: #ad2945; --canvas-composer-bg: #fff; --canvas-composer-border: #d9dfe9;
  --canvas-composer-shadow: 0 16px 44px #1f293714; --canvas-floating-menu-bg: #fff;
}
:root[data-studio-theme][data-studio-theme="light"] .rich-text-node { --rich-text-surface: #fff; --rich-text-ink: #232937; }
:root[data-studio-theme][data-studio-theme="light"] :is(.rich-text-node--paper, .rich-text-editor--paper) { --rich-text-surface: #fff; }
:root[data-studio-theme][data-studio-theme="light"] :is(.rich-text-node--warm, .rich-text-editor--warm) { --rich-text-surface: #fff9ed; }
:root[data-studio-theme="light"] .studio-theme-control .studio-theme-options { background: #eceff5; }
:root[data-studio-theme="light"] .studio-theme-control .studio-theme-options > button { color: #626b7b; }
:root[data-studio-theme="light"] .studio-theme-control .studio-theme-options > button:hover { background: #e0e5ef; color: #232937; }
:root[data-studio-theme="light"] .studio-theme-control .studio-theme-options > button[aria-checked="true"] { background: #fff; color: #6639c2; box-shadow: 0 1px 4px #29324a1a; }
