:root {
  --bg-base: #09090b;
  --bg-primary: #18181b;
  --bg-secondary: #111113;
  --bg-surface: #1f1f22;
  --bg-elevated: #27272a;
  --bg-deep: #09090b;
  --bg-sunken: #141416;
  --bg-hover: #2f2f33;
  --border-primary: #3f3f46;
  --border-secondary: #71717a;
  --border-default: #3f3f46;
  --border-subtle: #27272a;
  --text-primary: #fafafa;
  --text-secondary: #e4e4e7;
  --text-tertiary: #a1a1aa;
  --text-muted: #71717a;
  --scrollbar-track: #111113;
  --scrollbar-thumb: #3f3f46;
  --scrollbar-thumb-hover: #71717a;
  --glass-bg: rgba(24, 24, 27, 0.96);
  --glass-border: rgba(255, 255, 255, 0.12);
  --nav-active-bg: rgba(236, 72, 153, 0.16);
  --nav-hover-bg: #1f1f22;
  --btn-primary-bg: #ec4899;
  --btn-primary-text: #000000;
  --btn-primary-hover: #f472b6;
  --btn-primary-shadow: rgba(236, 72, 153, 0.22);
  --btn-selected-bg: rgba(236, 72, 153, 0.18);
  --btn-selected-border: #ec4899;
  --overlay-heavy: rgba(0, 0, 0, 0.78);
  --overlay-medium: rgba(0, 0, 0, 0.58);
  --overlay-light: rgba(0, 0, 0, 0.32);
  --overlay-full: rgba(0, 0, 0, 0.92);
  --overlay-border: rgba(255, 255, 255, 0.12);
  --selection-bg: rgba(236, 72, 153, 0.28);
  --accent: #ec4899;
  --accent-primary: #ec4899;
  --accent-hover: #f472b6;
  --accent-muted: #f9a8d4;
  --accent-bg: rgba(236, 72, 153, 0.14);
  --accent-bg-hover: rgba(236, 72, 153, 0.24);
  --accent-hover-bg: rgba(236, 72, 153, 0.24);
  --accent-border: #ec4899;
  --accent-text: #f9a8d4;
  --accent-text-hover: #fbcfe8;
  --accent-on: #000000;
  --accent-rgb: 236, 72, 153;
  --accent-shadow: rgba(236, 72, 153, 0.22);
  --toggle-active: #ec4899;
  --toggle-inactive: #52525b;
  --toggle-knob: #ffffff;
  --success: #34d399;
  --success-text: #6ee7b7;
  --success-bg: rgba(16, 185, 129, 0.14);
  --success-border: #34d399;
  --error: #f87171;
  --error-text: #fca5a5;
  --error-bg: rgba(239, 68, 68, 0.14);
  --error-border: #f87171;
  --error-hover-bg: rgba(239, 68, 68, 0.22);
  --error-hover-bg-strong: rgba(239, 68, 68, 0.3);
  --warning: #fbbf24;
  --warning-text: #fcd34d;
  --warning-bg: rgba(245, 158, 11, 0.14);
  --warning-border: #fbbf24;
  --info: #60a5fa;
  --chrome-bg: #111113;
  --chrome-surface: #18181b;
  --chrome-text: #fafafa;
  --chrome-muted: #a1a1aa;
  --chrome-border: #27272a;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.16);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.34);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html, body, #root { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  background: var(--bg-base);
  color: var(--text-secondary);
  transition: background-color 200ms ease, color 200ms ease;
}
button, input, select, textarea { font: inherit; }
button {
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, opacity 200ms ease, transform 120ms ease;
}
button:active:not(:disabled) { transform: scale(0.98); }
button:disabled { cursor: not-allowed; }
input, select, textarea { border-radius: var(--radius-md); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
::selection { background: var(--selection-bg); }

.brand-page-shell { background: var(--bg-base); }
.brand-sidebar {
  background: var(--chrome-bg);
  color: var(--chrome-text);
  box-shadow: 1px 0 0 var(--chrome-border);
}
.brand-page-header { position: relative; }
.brand-page-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 3px;
  background: var(--accent);
}
.brand-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.brand-card:hover { box-shadow: var(--shadow-md); }
.brand-toolbar { background: var(--bg-primary); border: 1px solid var(--border-primary); box-shadow: var(--shadow-sm); }
.brand-sidebar .nav-item-active {
  background: var(--nav-active-bg);
  box-shadow: inset 3px 0 0 var(--accent);
}
.brand-sidebar > div:first-child { background: var(--chrome-bg); border-bottom-color: var(--chrome-border); }
.brand-sidebar > div:nth-child(2) { background: var(--chrome-surface); }
.brand-sidebar nav button:hover:not([class*="opacity-50"]) { background: var(--chrome-surface); }
.brand-kicker { color: var(--accent-text); letter-spacing: 0.08em; }

/* Shared surfaces keep the same Swiss geometry across every stage. */
main [class*="border-[var(--border-primary)]"],
#root [class*="border-[var(--border-primary)]"] { border-color: var(--border-primary); }
main [class*="bg-[var(--bg-primary)]"],
main [class*="bg-[var(--bg-elevated)]"],
#root [class*="bg-[var(--bg-primary)]"],
#root [class*="bg-[var(--bg-elevated)]"] { box-shadow: none; }
main [class*="bg-[var(--bg-secondary)]"],
#root [class*="bg-[var(--bg-secondary)]"] { background-color: var(--bg-secondary); }
main [class*="h-full bg-[var(--bg-base)]"] { background-color: var(--bg-secondary); }
main .h-16 { background-color: var(--bg-primary); border-bottom-color: var(--border-primary); }
main .sticky.top-0 {
  margin: 10px 18px 0;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
}
main [class*="group bg-"],
#root .brand-card { border-radius: var(--radius-lg); }
main [class*="group bg-"]:hover,
#root .brand-card:hover {
  border-color: var(--accent);
  background-color: var(--bg-hover);
}
main .rounded-2xl, #root .rounded-2xl { border-radius: var(--radius-xl); }
main .rounded-xl, #root .rounded-xl { border-radius: var(--radius-lg); }
main .rounded-lg, #root .rounded-lg { border-radius: var(--radius-md); }
main .rounded-md, #root .rounded-md { border-radius: var(--radius-sm); }
main .rounded-full, #root .rounded-full { border-radius: 999px; }

/* Selected, pressed, focus and disabled states are semantic, not color-only. */
main [class*="border-[var(--accent-border)]"],
main [class*="border-[var(--accent)]"],
#root [class*="border-[var(--accent-border)]"],
#root [class*="border-[var(--accent)]"] { border-color: var(--accent) !important; }
main [class*="bg-[var(--accent-bg)]"],
#root [class*="bg-[var(--accent-bg)]"] { background-color: var(--accent-bg); }
main [class*="bg-[var(--btn-primary-bg)]"],
#root [class*="bg-[var(--btn-primary-bg)]"] { box-shadow: 0 4px 14px var(--btn-primary-shadow); }
[aria-selected="true"], [aria-pressed="true"], [data-selected="true"] {
  background-color: var(--btn-selected-bg);
  border-color: var(--btn-selected-border);
  color: var(--text-primary);
}
main [class*="border-dashed"], #root [class*="border-dashed"] { border-style: dashed; border-color: var(--accent-border); }

/* Firefly-like modal layer, adapted to the new Swiss system. */
main [class*="fixed"][class*="inset-0"],
#root [class*="fixed"][class*="inset-0"] {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(4px);
}
main [class*="fixed"][class*="inset-0"] > [class*="bg-[var(--bg-primary)]"],
#root [class*="fixed"][class*="inset-0"] > [class*="bg-[var(--bg-primary)]"],
main [class*="fixed"][class*="inset-0"] > [class*="bg-[var(--bg-elevated)]"],
#root [class*="fixed"][class*="inset-0"] > [class*="bg-[var(--bg-elevated)]"] {
  border-color: var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}
main [class*="fixed"][class*="inset-0"] button,
#root [class*="fixed"][class*="inset-0"] button { border-radius: var(--radius-md); }

main [class*="shadow-xl"], main [class*="shadow-2xl"],
#root [class*="shadow-xl"], #root [class*="shadow-2xl"] { box-shadow: var(--shadow-xl) !important; }
main [class*="fixed"][class*="inset-0"] input,
main [class*="fixed"][class*="inset-0"] select,
main [class*="fixed"][class*="inset-0"] textarea,
#root [class*="fixed"][class*="inset-0"] input,
#root [class*="fixed"][class*="inset-0"] select,
#root [class*="fixed"][class*="inset-0"] textarea { min-height: 40px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
.font-mono { font-family: var(--font-mono); }
.font-sans { font-family: var(--font-body) !important; }
select option { background: var(--bg-surface); color: var(--text-primary); }
.glass-panel { background: var(--glass-bg); backdrop-filter: blur(8px); border: 1px solid var(--glass-border); }

/* UI PRO MAX shell: shared Adobe-inspired workstation treatment. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --z-sidebar: 40;
  --z-sticky: 20;
  --z-modal: 100;
}

body {
  background: var(--bg-base);
  color: var(--text-secondary);
  font-size: 13px;
}

#root { min-width: 1080px; background: var(--bg-base); }
.brand-main-shell { background: var(--bg-base); isolation: isolate; }
.brand-main-shell > * { min-width: 0; }

/* The left rail is the visual anchor across every production page. */
.brand-sidebar {
  width: 224px;
  z-index: var(--z-sidebar);
  background: var(--chrome-bg) !important;
  border-right: 1px solid var(--chrome-border);
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.08);
}
.brand-sidebar > div:first-child { padding: 20px 18px 18px; }
.brand-sidebar nav { padding: 14px 6px; }
.brand-sidebar nav button {
  min-height: 42px;
  width: calc(100% - 8px);
  margin-inline: 4px;
  border: 1px solid transparent;
  color: var(--chrome-muted);
  border-radius: 6px;
  letter-spacing: 0;
}
.brand-sidebar nav button:hover:not([class*="opacity-50"]) {
  background: var(--chrome-hover-bg) !important;
  color: var(--chrome-text) !important;
  border-color: var(--chrome-border);
}
.brand-sidebar nav button:hover:not([class*="opacity-50"]) svg,
.brand-sidebar nav button:hover:not([class*="opacity-50"]) span {
  color: inherit !important;
}
.brand-sidebar .nav-item-active,
.brand-sidebar nav button[aria-current="page"] {
  background: rgba(183, 167, 255, 0.12) !important;
  color: var(--chrome-text) !important;
  border-color: transparent !important;
  box-shadow: inset 2px 0 0 #b7a7ff;
  border-radius: 8px;
}
.brand-sidebar .nav-item-active svg,
.brand-sidebar nav button[aria-current="page"] svg { color: #cfc4ff; }
.brand-sidebar .nav-item-active > div > span,
.brand-sidebar nav button[aria-current="page"] > div > span { color: #f4f0ff !important; }
.brand-sidebar .nav-item-active > span,
.brand-sidebar nav button[aria-current="page"] > span { color: #a69bc8 !important; }
.brand-sidebar .text-\[var\(--accent-text\)\] { color: var(--accent-muted) !important; }

/* Sidebar glass layer: keep the rail readable while letting the workspace depth show through. */
.brand-sidebar {
  background:
    linear-gradient(180deg, rgba(183, 167, 255, 0.055), transparent 34%, rgba(126, 231, 233, 0.025)),
    rgba(11, 11, 13, 0.64) !important;
  border-right-color: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  backdrop-filter: blur(22px) saturate(125%);
}
.brand-sidebar > div:first-child,
.brand-sidebar > div:nth-child(2),
.brand-sidebar > div:last-child {
  background: rgba(11, 11, 13, 0.3) !important;
}
.brand-sidebar > div:first-child { background: rgba(11, 11, 13, 0.76) !important; border-bottom-color: rgba(255, 255, 255, 0.1) !important; }
.brand-sidebar > div:nth-child(2) { border-bottom-color: rgba(255, 255, 255, 0.08) !important; }
.brand-sidebar > div:last-child { border-top-color: rgba(255, 255, 255, 0.08) !important; }

/* Page headers and repeated cards use one measured rhythm. */
.brand-dashboard,
.brand-project-overview,
.brand-library-page,
.brand-canvas-list {
  background: var(--bg-base) !important;
  color: var(--text-secondary);
}
.brand-dashboard,
.brand-project-overview,
.brand-library-page,
.brand-canvas-list { padding: 32px 40px !important; }
.brand-page-header {
  margin-bottom: 28px !important;
  padding-bottom: 18px !important;
  border-color: var(--border-primary) !important;
}
.brand-page-header::after { width: 64px; height: 2px; }
.brand-page-header h1,
.brand-page-header h2,
.brand-dashboard h1,
.brand-project-overview h1,
.brand-library-page h1,
.brand-canvas-list h1 {
  color: var(--text-primary);
  letter-spacing: 0;
}
.brand-card {
  border-radius: 8px !important;
  border-color: var(--border-primary) !important;
  background: var(--bg-primary) !important;
  box-shadow: var(--shadow-sm);
}
.brand-card:hover {
  background: var(--bg-surface) !important;
  border-color: var(--accent-border) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}
.brand-toolbar {
  border-color: var(--border-primary) !important;
  background: var(--bg-primary) !important;
  border-radius: 8px;
}

/* Seko-style asset library: a dense desktop workspace with focused overlays. */
.seko-assets-page {
  min-width: 1180px;
  min-height: 100vh;
  padding: 24px 52px 72px;
  color: #f4f2fa;
  background:
    radial-gradient(circle at 74% -18%, rgba(117, 89, 228, 0.2), transparent 34%),
    radial-gradient(circle at 12% 12%, rgba(42, 117, 137, 0.12), transparent 28%),
    #08080a;
  overflow-x: hidden;
}
.seko-assets-shell { width: min(100%, 1420px); margin: 0 auto; }
.seko-assets-top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; color: #85828f; font-size: 12px; }
.seko-assets-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px !important; padding: 0 10px 0 2px; border: 0; color: #b9b5c3; background: transparent; font-size: 13px; }
.seko-assets-back:hover { color: #fff; }
.seko-assets-back svg { width: 16px; height: 16px; }
.seko-assets-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 30px 0 25px; }
.seko-assets-heading h1 { margin: 0; color: #fff; font-size: 31px; font-weight: 650; letter-spacing: -0.02em; }
.seko-assets-heading p { margin: 9px 0 0; color: #8e8a99; font-size: 13px; }
.seko-assets-primary, .seko-asset-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px !important; padding: 0 16px; border: 1px solid var(--border-secondary); border-radius: 10px; color: var(--btn-primary-text); background: var(--btn-primary-bg); box-shadow: 0 9px 24px var(--btn-primary-shadow); font-size: 13px; font-weight: 650; }
.seko-assets-primary:hover, .seko-asset-primary:hover { background: var(--btn-primary-hover); transform: translateY(-1px); }
.seko-assets-primary:disabled, .seko-asset-primary:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }
.seko-assets-primary svg, .seko-asset-primary svg { width: 17px; height: 17px; }
.seko-assets-toolbar { display: flex; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.seko-assets-tabs { display: flex; align-items: center; gap: 5px; }
.seko-assets-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px !important; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; color: #8f8b98; background: transparent; font-size: 13px; }
.seko-assets-tabs button:hover { color: #fff; background: rgba(255,255,255,0.06); }
.seko-assets-tabs button.is-active { color: #f5f1ff; background: rgba(144, 122, 247, 0.18); border-color: rgba(176, 157, 255, 0.36); box-shadow: inset 0 -2px 0 #b7a7ff; }
.seko-assets-tabs svg { width: 16px; height: 16px; }
.seko-assets-tabs span { min-width: 20px; color: #7d7888; font-size: 11px; text-align: center; }
.seko-assets-tabs button.is-active span { color: #cfc4ff; }
.seko-assets-search { position: relative; display: flex; align-items: center; width: min(330px, 30vw); margin-left: auto; }
.seko-assets-search > svg { position: absolute; left: 13px; width: 16px; height: 16px; color: #777180; pointer-events: none; }
.seko-assets-search input { width: 100%; min-height: 38px !important; padding: 0 37px 0 38px; border: 1px solid rgba(255,255,255,0.11) !important; border-radius: 8px; color: #eee !important; background: rgba(255,255,255,0.06) !important; font-size: 13px; }
.seko-assets-search input::placeholder { color: #6f6b78; }
.seko-assets-search input:focus { border-color: rgba(183,167,255,0.8) !important; box-shadow: 0 0 0 3px rgba(183,167,255,0.14) !important; }
.seko-assets-search button { position: absolute; right: 7px; display: grid; place-items: center; width: 26px; height: 26px; min-height: 26px !important; padding: 0; border: 0; border-radius: 6px; color: #a7a2b0; background: transparent; }
.seko-assets-search button:hover { color: #fff; background: rgba(255,255,255,0.1); }
.seko-assets-search button svg { width: 15px; height: 15px; }
.seko-assets-count { color: #77727f; font-size: 12px; white-space: nowrap; }
.seko-assets-content { padding-top: 28px; }
.seko-assets-content-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.seko-assets-content-head h2 { margin: 0; color: #f5f3f8; font-size: 17px; font-weight: 620; }
.seko-assets-content-head p { margin: 5px 0 0; color: #76727e; font-size: 12px; }
.seko-assets-view-button { display: grid; grid-template-columns: repeat(2, 5px); grid-template-rows: repeat(2, 5px); gap: 3px; width: 31px; height: 31px; min-height: 31px !important; place-content: center; padding: 0; border: 1px solid rgba(255,255,255,0.11); border-radius: 7px; color: #aba5b5; background: rgba(255,255,255,0.04); }
.seko-assets-view-button span { width: 5px; height: 5px; border-radius: 1px; background: currentColor; }
.seko-assets-view-button:hover { color: #d7ceff; border-color: rgba(183,167,255,0.45); }
.seko-asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.seko-asset-card { display: block; width: 100%; min-height: 0 !important; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); border-radius: 11px; color: inherit; background: #111114; text-align: left; transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.seko-asset-card:hover { border-color: rgba(183,167,255,0.66); box-shadow: 0 12px 28px rgba(0,0,0,0.3); transform: translateY(-2px); }
.seko-asset-media { position: relative; display: grid; aspect-ratio: 1.42; place-items: center; overflow: hidden; background: linear-gradient(140deg, #19171d, #24202d); }
.seko-asset-media::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, rgba(8,8,10,0.02) 50%, rgba(8,8,10,0.54)); pointer-events: none; }
.seko-asset-media img { width: 100%; height: 100%; object-fit: cover; }
.seko-asset-placeholder { display: grid; place-items: center; gap: 7px; color: #aba3bb; }
.seko-asset-placeholder svg { width: 32px; height: 32px; color: #9582e9; }
.seko-asset-placeholder small { color: #807987; font-size: 11px; }
.seko-asset-badge { position: absolute; z-index: 1; top: 10px; right: 10px; padding: 4px 7px; border: 1px solid rgba(255,255,255,0.13); border-radius: 999px; color: #d0c5ff; background: rgba(12,11,16,0.7); backdrop-filter: blur(10px); font-size: 10px; }
.seko-asset-linked { top: auto; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; }
.seko-asset-linked svg { width: 11px; height: 11px; }
.seko-asset-card-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 76px; padding: 13px 14px 14px; }
.seko-asset-card-body strong { display: block; overflow: hidden; color: #f0edf5; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.seko-asset-card-body small { display: block; margin: 6px 0 0; overflow: hidden; color: #85808c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.seko-asset-card-body > svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; color: #77717f; }
.seko-asset-empty { display: grid; min-height: 330px; place-items: center; align-content: center; gap: 10px; border: 1px dashed rgba(255,255,255,0.14); border-radius: 11px; color: #817b89; background: rgba(255,255,255,0.025); text-align: center; }
.seko-asset-empty svg { width: 38px; height: 38px; color: #8774d9; }
.seko-asset-empty strong { color: #d9d4e1; font-size: 14px; }
.seko-asset-empty span { color: #77727e; font-size: 12px; }
.seko-asset-icon-button { display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px !important; padding: 0; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; color: #bcb7c5; background: rgba(255,255,255,0.05); }
.seko-asset-icon-button:hover { color: #fff; border-color: rgba(183,167,255,0.52); background: rgba(183,167,255,0.14); }
.seko-asset-icon-button svg { width: 17px; height: 17px; }
.seko-asset-drawer-shade, .seko-assets-modal-shade { position: fixed; z-index: 60; inset: 0; background: rgba(0,0,0,0.62); backdrop-filter: blur(5px); }
.seko-asset-drawer { position: fixed; z-index: 61; top: 0; right: 0; display: flex; flex-direction: column; width: min(440px, calc(100vw - 42px)); height: 100vh; border-left: 1px solid rgba(255,255,255,0.13); color: #f2eff8; background: #111115; box-shadow: -18px 0 55px rgba(0,0,0,0.4); }
.seko-asset-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 23px 24px 18px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.seko-asset-drawer-head h2 { margin: 0; color: #fff; font-size: 18px; font-weight: 620; }
.seko-asset-drawer-head p { margin: 7px 0 0; color: #817b89; font-size: 11px; }
.seko-asset-drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px 28px; }
.seko-asset-drawer-preview { position: relative; display: grid; aspect-ratio: 1.58; place-items: center; overflow: hidden; margin-bottom: 23px; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; background: #1a181e; }
.seko-asset-drawer-preview img { width: 100%; height: 100%; object-fit: cover; }
.seko-asset-drawer-preview > span { display: grid; place-items: center; gap: 8px; color: #958fa0; }
.seko-asset-drawer-preview > span svg { width: 44px; height: 44px; color: #9b88eb; }
.seko-asset-drawer-preview > span small { color: #807987; font-size: 11px; }
.seko-asset-drawer-preview > button { position: absolute; right: 10px; bottom: 10px; background: rgba(9,9,12,0.72); backdrop-filter: blur(10px); }
.seko-asset-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 12px; }
.seko-asset-fields label { display: grid; gap: 7px; min-width: 0; }
.seko-asset-fields label.is-wide { grid-column: 1 / -1; }
.seko-asset-fields label > span { color: #98929f; font-size: 11px; }
.seko-asset-fields input, .seko-asset-fields textarea { width: 100%; min-height: 39px !important; box-sizing: border-box; padding: 9px 11px; border: 1px solid rgba(255,255,255,0.12) !important; border-radius: 7px; outline: none; color: #eee !important; background: rgba(255,255,255,0.055) !important; font-size: 12px; resize: vertical; }
.seko-asset-fields textarea { line-height: 1.55; }
.seko-asset-fields input:focus, .seko-asset-fields textarea:focus { border-color: #a995ff !important; box-shadow: 0 0 0 3px rgba(169,149,255,0.14) !important; }
.seko-asset-upload { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; color: #b5a9f0; font-size: 12px; cursor: pointer; }
.seko-asset-upload:hover { color: #d8d0ff; }
.seko-asset-upload svg { width: 16px; height: 16px; }
.seko-asset-upload input { display: none; }
.seko-asset-drawer-foot { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 10px; padding: 16px 24px 21px; border-top: 1px solid rgba(255,255,255,0.09); background: #111115; }
.seko-asset-danger, .seko-asset-reset { display: grid; place-items: center; width: 38px; height: 38px; min-height: 38px !important; padding: 0; border: 1px solid rgba(255,255,255,0.12); border-radius: 8px; color: #a9a2b2; background: rgba(255,255,255,0.045); }
.seko-asset-danger { color: #ee8a98; border-color: rgba(238,138,152,0.25); }
.seko-asset-danger:hover { color: #ffacb7; border-color: rgba(238,138,152,0.52); background: rgba(238,138,152,0.11); }
.seko-asset-reset:hover:not(:disabled) { color: #fff; border-color: rgba(183,167,255,0.5); background: rgba(183,167,255,0.12); }
.seko-asset-danger svg, .seko-asset-reset svg { width: 17px; height: 17px; }
.seko-asset-secondary { min-height: 42px !important; padding: 0 16px; border: 1px solid rgba(255,255,255,0.14); border-radius: 9px; color: #cbc5d2; background: rgba(255,255,255,0.05); font-size: 13px; }
.seko-asset-secondary:hover { color: #fff; background: rgba(255,255,255,0.09); }
.seko-assets-modal-shade { z-index: 50; display: grid; place-items: center; padding: 24px; }
.seko-assets-modal { width: min(540px, calc(100vw - 48px)); max-height: min(700px, calc(100vh - 48px)); overflow: auto; border: 1px solid rgba(255,255,255,0.14); border-radius: 13px; color: #f2eff8; background: #111115; box-shadow: 0 22px 70px rgba(0,0,0,0.48); }
.seko-assets-modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 18px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.seko-assets-modal h2 { margin: 0; color: #fff; font-size: 18px; }
.seko-assets-modal header p { margin: 7px 0 0; color: #817b89; font-size: 11px; }
.seko-assets-modal-body { padding: 22px 24px 24px; }
.seko-assets-modal > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 21px; border-top: 1px solid rgba(255,255,255,0.09); }
.seko-asset-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seko-assets-lightbox { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 36px; background: rgba(0,0,0,0.82); backdrop-filter: blur(8px); }
.seko-assets-lightbox img { max-width: min(1120px, 90vw); max-height: 86vh; border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; object-fit: contain; box-shadow: 0 22px 80px rgba(0,0,0,0.6); }
.seko-assets-lightbox > button { position: absolute; top: 25px; right: 28px; }
@media (max-width: 1320px) { .seko-asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .seko-asset-card, .seko-assets-primary, .seko-asset-primary { transition: none; } }

/* Form controls: clear 40px hit targets and a single focus language. */
main input:not([type="checkbox"]):not([type="radio"]),
main select,
main textarea,
#root input:not([type="checkbox"]):not([type="radio"]),
#root select,
#root textarea {
  border-color: var(--border-primary) !important;
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  min-height: 40px;
}
main input:hover,
main select:hover,
main textarea:hover,
#root input:hover,
#root select:hover,
#root textarea:hover { border-color: var(--border-secondary) !important; }
main input:focus,
main select:focus,
main textarea:focus,
#root input:focus,
#root select:focus,
#root textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-bg) !important;
}
main button:not(.react-flow__controls-button),
#root button:not(.react-flow__controls-button) {
  min-height: 36px;
  border-radius: 6px;
}
main button[class*="bg-[var(--btn-primary-bg)]"],
#root button[class*="bg-[var(--btn-primary-bg)]"],
main button[class*="bg-[var(--accent)]"],
#root button[class*="bg-[var(--accent)]"] {
  color: var(--btn-primary-text) !important;
  box-shadow: 0 4px 12px var(--btn-primary-shadow);
}
main button:disabled,
#root button:disabled { filter: saturate(0.45); opacity: 0.58; }

/* Stage workspaces: dense desktop panels with an explicit top bar. */
.brand-stage-script,
.brand-stage-assets,
.brand-stage-director,
.brand-stage-export,
.brand-stage-prompts,
.brand-canvas-workspace {
  background: var(--bg-secondary) !important;
  color: var(--text-secondary);
}
.brand-stage-script .h-16,
.brand-stage-assets .brand-stage-header,
.brand-stage-director .brand-stage-header,
.brand-stage-export .brand-stage-header {
  min-height: 64px;
  background: var(--bg-primary) !important;
  border-color: var(--border-primary) !important;
}
.brand-stage-script .sticky.top-0 {
  margin: 12px 16px 0;
  background: var(--bg-primary) !important;
  border-color: var(--border-primary) !important;
}
.brand-stage-script .border-r,
.brand-stage-assets .border-r,
.brand-stage-director .border-r { border-color: var(--border-primary) !important; }
.brand-stage-script .overflow-y-auto,
.brand-stage-assets .brand-stage-content,
.brand-stage-director .overflow-y-auto,
.brand-stage-export .overflow-y-auto,
.brand-stage-prompts .overflow-y-auto { scrollbar-gutter: stable; }
.brand-stage-assets .brand-stage-content { padding: 28px 32px !important; gap: 28px; }
.brand-stage-assets .brand-stage-header,
.brand-stage-director .brand-stage-header,
.brand-stage-export .brand-stage-header { padding-left: 28px; padding-right: 28px; }
.brand-stage-assets [class*="rounded-2xl"],
.brand-stage-director [class*="rounded-2xl"],
.brand-stage-export [class*="rounded-2xl"],
.brand-stage-prompts [class*="rounded-2xl"] { border-radius: 8px !important; }
.brand-stage-assets [class*="bg-[var(--bg-surface)]"],
.brand-stage-director [class*="bg-[var(--bg-surface)]"],
.brand-stage-export [class*="bg-[var(--bg-surface)]"],
.brand-stage-prompts [class*="bg-[var(--bg-surface)]"] { box-shadow: var(--shadow-sm); }

/* Canvas controls keep the artwork area quiet and the utility rail legible. */
.brand-canvas-list { background: var(--bg-base) !important; }
.brand-canvas-workspace .bg-white,
.brand-canvas-workspace .bg-gray-50 { background: var(--bg-primary) !important; }
.brand-canvas-workspace .border-gray-200,
.brand-canvas-workspace .border-gray-300 { border-color: var(--border-primary) !important; }
.brand-canvas-workspace [class*="shadow"] { box-shadow: var(--shadow-md); }

/* Canvas library: creation is the primary action, while backup tools stay quiet. */
.seko-canvas-page { min-width: 1180px; min-height: 100vh; padding: 24px 54px 72px; color: #f4f2fa; background: radial-gradient(circle at 78% -16%, rgba(117,89,228,.18), transparent 32%), radial-gradient(circle at 12% 10%, rgba(42,117,137,.1), transparent 26%), #08080a; }
.seko-canvas-shell { width: min(100%, 1420px); margin: 0 auto; }
.seko-canvas-header { padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.seko-canvas-back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px !important; padding: 0 10px 0 2px; border: 0; color: #aaa5b2; background: transparent; font-size: 12px; }
.seko-canvas-back:hover { color: #fff; }
.seko-canvas-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-top: 28px; }
.seko-canvas-eyebrow { display: block; margin-bottom: 8px; color: #b5a7ff; font: 700 9px var(--font-mono); letter-spacing: .16em; }
.seko-canvas-heading h1 { margin: 0; color: #fff; font-size: 30px; font-weight: 680; letter-spacing: -.02em; }
.seko-canvas-heading p { margin: 9px 0 0; color: #8e8a99; font-size: 12px; }
.seko-canvas-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.seko-canvas-primary, .seko-canvas-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px !important; padding: 0 14px; border-radius: 9px; font-size: 12px; font-weight: 650; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease; }
.seko-canvas-primary { border: 1px solid var(--border-secondary); color: var(--btn-primary-text); background: var(--btn-primary-bg); box-shadow: 0 9px 24px var(--btn-primary-shadow); }
.seko-canvas-primary:hover { background: var(--btn-primary-hover); transform: translateY(-1px); }
.seko-canvas-secondary { border: 1px solid rgba(255,255,255,.13); color: #aaa5b2; background: rgba(255,255,255,.045); }
.seko-canvas-secondary:hover { color: #fff; border-color: rgba(183,167,255,.45); background: rgba(183,167,255,.1); }
.seko-canvas-primary svg, .seko-canvas-secondary svg { width: 15px; height: 15px; }
.seko-canvas-create-panel { margin-top: 18px; padding: 17px 18px; border: 1px solid rgba(183,167,255,.3); border-radius: 11px; background: linear-gradient(135deg, rgba(183,167,255,.1), rgba(255,255,255,.03)); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.seko-canvas-create-form { display: grid; grid-template-columns: minmax(0,1fr) 220px auto; align-items: end; gap: 14px; }
.seko-canvas-create-form label { display: grid; gap: 7px; }
.seko-canvas-create-form label > span { color: #aaa5b2; font-size: 10px; }
.seko-canvas-input { width: 100%; min-height: 40px !important; box-sizing: border-box; padding: 0 11px; border: 1px solid rgba(255,255,255,.13) !important; border-radius: 8px; outline: none; color: #eee !important; background: rgba(255,255,255,.06) !important; font-size: 12px; }
.seko-canvas-input:focus { border-color: rgba(183,167,255,.8) !important; box-shadow: 0 0 0 3px rgba(183,167,255,.14) !important; }
.seko-canvas-create-actions { display: flex; align-items: center; gap: 8px; }
.seko-canvas-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 14px; }
.seko-canvas-toolbar > div { display: flex; align-items: baseline; gap: 10px; }
.seko-canvas-toolbar strong { color: #f4f2fa; font-size: 15px; }
.seko-canvas-toolbar span { color: #77727f; font: 10px var(--font-mono); }
.seko-canvas-toolbar label { position: relative; display: block; width: min(330px, 30vw); }
.seko-canvas-toolbar label > svg { position: absolute; top: 50%; left: 12px; width: 15px; height: 15px; color: #77727f; transform: translateY(-50%); pointer-events: none; }
.seko-canvas-toolbar label input { padding-left: 36px; }
.seko-canvas-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; }
.seko-canvas-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; color: inherit; background: #111114; text-align: left; cursor: pointer; transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.seko-canvas-card:hover { border-color: rgba(183,167,255,.66); box-shadow: 0 13px 30px rgba(0,0,0,.3); transform: translateY(-2px); }
.seko-canvas-card:focus-visible { outline: 2px solid #b7a7ff; outline-offset: 3px; }
.seko-canvas-card-preview { position: relative; display: grid; aspect-ratio: 16/9; place-items: center; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.08); color: #9582e9; background: radial-gradient(circle at 55% 35%, rgba(183,167,255,.18), transparent 40%), #1a181e; }
.seko-canvas-card-preview::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, transparent 45%, rgba(8,8,10,.58)); pointer-events: none; }
.seko-canvas-card-preview svg { width: 34px; height: 34px; }
.seko-canvas-card-preview span { position: absolute; z-index: 1; right: 12px; bottom: 10px; color: #cfc4ff; font: 9px var(--font-mono); }
.seko-canvas-card-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; }
.seko-canvas-card-title { min-width: 0; flex: 1; }
.seko-canvas-card-name { display: block; width: 100%; overflow: hidden; padding: 0; border: 0; color: #f0edf5; background: transparent; font-size: 14px; font-weight: 620; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.seko-canvas-card-name:hover { color: #d2c7ff; }
.seko-canvas-card-title p { margin: 6px 0 0; color: #85808c; font: 10px var(--font-mono); }
.seko-canvas-rename-input { width: 100%; min-height: 30px !important; padding: 0 0 4px; border: 0 !important; border-bottom: 1px solid #b7a7ff !important; border-radius: 0 !important; outline: none; color: #f0edf5 !important; background: transparent !important; font-size: 14px; font-weight: 620; }
.seko-canvas-card-actions { display: flex; gap: 3px; flex: 0 0 auto; }
.seko-canvas-icon-button { display: grid; width: 29px; height: 29px; min-height: 29px !important; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 7px; color: #77727f; background: transparent; cursor: pointer; }
.seko-canvas-icon-button:hover { color: #fff; border-color: rgba(183,167,255,.35); background: rgba(183,167,255,.1); }
.seko-canvas-icon-button.is-danger:hover { color: #ffacb7; border-color: rgba(238,138,152,.45); background: rgba(238,138,152,.1); }
.seko-canvas-icon-button svg { width: 14px; height: 14px; }
.seko-canvas-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px 13px; border-top: 1px solid rgba(255,255,255,.08); color: #77727f; font: 9px var(--font-mono); }
.seko-canvas-empty { display: grid; min-height: 330px; place-items: center; align-content: center; gap: 10px; border: 1px dashed rgba(255,255,255,.14); border-radius: 11px; color: #817b89; background: rgba(255,255,255,.025); text-align: center; }
.seko-canvas-empty > svg { width: 38px; height: 38px; color: #8774d9; }
.seko-canvas-empty strong { color: #d9d4e1; font-size: 14px; }
.seko-canvas-empty span { color: #77727e; font-size: 12px; }
.seko-canvas-empty .seko-canvas-primary { margin-top: 6px; }
@media (max-width: 1320px) { .seko-canvas-page { padding-left: 38px; padding-right: 38px; } .seko-canvas-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .seko-canvas-card, .seko-canvas-primary { transition: none; } }

/* Canvas editor: keep the canvas open and move details into a quiet inspector rail. */
.seko-canvas-workspace { background: radial-gradient(circle at 55% -20%, rgba(117,89,228,.11), transparent 34%), #08080a !important; }
.seko-canvas-workspace-topbar { min-height: 66px; padding-inline: 18px !important; border-color: rgba(255,255,255,.1) !important; background: rgba(14,14,17,.94) !important; }
.seko-canvas-workspace-topbar > div:first-child { gap: 11px; }
.seko-canvas-workspace-topbar > div:first-child > button { width: 34px; height: 34px; min-height: 34px !important; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.seko-canvas-workspace-topbar > div:first-child > button:hover { border-color: rgba(183,167,255,.48); background: rgba(183,167,255,.1); }
.seko-canvas-workspace-topbar h1 { font-size: 13px; }
.seko-canvas-workspace-topbar p { margin-top: 3px; color: #77727f; font: 9px var(--font-mono); }
.seko-canvas-workspace-tools { gap: 5px !important; }
.seko-canvas-workspace-tools > button, .seko-canvas-workspace-tools > a { min-height: 34px !important; border: 1px solid rgba(255,255,255,.11) !important; border-radius: 8px; color: #aaa5b2 !important; background: rgba(255,255,255,.04) !important; font-size: 10px !important; }
.seko-canvas-workspace-tools > button:hover, .seko-canvas-workspace-tools > a:hover { color: #fff !important; border-color: rgba(183,167,255,.5) !important; background: rgba(183,167,255,.1) !important; }
.seko-canvas-workspace-tools > button:first-child, .seko-canvas-workspace-tools > button:nth-child(2), .seko-canvas-workspace-tools > button:nth-child(3), .seko-canvas-workspace-tools > button:nth-child(4) { width: 32px; padding: 0; border-color: transparent !important; background: transparent !important; }
.seko-canvas-workspace-tools > button:first-child:hover, .seko-canvas-workspace-tools > button:nth-child(2):hover, .seko-canvas-workspace-tools > button:nth-child(3):hover, .seko-canvas-workspace-tools > button:nth-child(4):hover { background: rgba(255,255,255,.07) !important; }
.seko-canvas-workspace-tools > button:last-child { color: var(--btn-primary-text) !important; border-color: var(--border-secondary) !important; background: var(--btn-primary-bg) !important; box-shadow: 0 8px 20px var(--btn-primary-shadow); }
.seko-canvas-workspace-tools > button:last-child:hover { background: var(--btn-primary-hover) !important; }
.seko-canvas-workspace-stage { position: relative; background-color: #0b0b0e; background-image: radial-gradient(rgba(170,155,255,.12) 1px, transparent 1px); background-size: 24px 24px; }
.seko-canvas-workspace-stage .react-flow__pane { cursor: grab; }
.seko-canvas-workspace-stage .react-flow__node { border-color: rgba(255,255,255,.14) !important; border-radius: 10px !important; box-shadow: 0 14px 32px rgba(0,0,0,.3) !important; }
.seko-canvas-workspace-stage .react-flow__node.selected { border-color: #b7a7ff !important; box-shadow: 0 0 0 2px rgba(183,167,255,.22), 0 16px 34px rgba(0,0,0,.35) !important; }
.seko-canvas-workspace-stage .react-flow__controls, .seko-canvas-workspace-stage .react-flow__minimap { overflow: hidden; border-radius: 9px !important; box-shadow: 0 10px 26px rgba(0,0,0,.24) !important; }
.seko-canvas-workspace-stage .react-flow__controls button { min-height: 30px !important; border-bottom-color: rgba(255,255,255,.1) !important; background: #151519 !important; color: #aaa5b2 !important; }
.seko-canvas-workspace-inspector { width: 360px !important; padding: 22px !important; border-color: rgba(255,255,255,.1) !important; background: rgba(17,17,21,.97) !important; box-shadow: -18px 0 48px rgba(0,0,0,.24); }
.seko-canvas-workspace-inspector input, .seko-canvas-workspace-inspector select, .seko-canvas-workspace-inspector textarea { border-radius: 7px; background: rgba(255,255,255,.055) !important; }
.seko-canvas-workspace-inspector h2 { color: #f4f2fa; font-size: 11px; letter-spacing: .12em; }
.seko-canvas-workspace-inspector button { border-radius: 7px; }
@media (max-width: 1320px) { .seko-canvas-workspace-inspector { width: 330px !important; } .seko-canvas-workspace-tools > a { display: none; } }

/* Replace hard-coded zinc utility colors with theme tokens where components use them. */
#root [class*="text-zinc-950"], #root [class*="text-zinc-900"], #root [class*="text-gray-900"] { color: var(--text-primary) !important; }
#root [class*="text-zinc-700"], #root [class*="text-zinc-600"], #root [class*="text-gray-700"] { color: var(--text-secondary) !important; }
#root [class*="text-zinc-500"], #root [class*="text-zinc-400"], #root [class*="text-gray-500"] { color: var(--text-tertiary) !important; }
#root [class*="text-zinc-300"], #root [class*="text-gray-400"] { color: var(--text-muted) !important; }
#root [class*="border-zinc-"], #root [class*="border-gray-"] { border-color: var(--border-primary) !important; }
#root [class*="bg-zinc-950"], #root [class*="bg-zinc-900"], #root [class*="bg-gray-900"] { background: var(--bg-base) !important; }
#root [class*="bg-zinc-800"], #root [class*="bg-zinc-700"], #root [class*="bg-gray-800"] { background: var(--bg-surface) !important; }

/* Dialogs and alerts share the same visual weight. */
#root [role="dialog"],
#root [aria-modal="true"] > div {
  border-color: var(--border-primary);
  border-radius: 10px;
  box-shadow: var(--shadow-xl);
}
#root [role="dialog"] header,
#root [role="dialog"] [class*="border-b"] { border-color: var(--border-primary); }
#root [role="dialog"] [class*="bg-white"],
#root [role="dialog"] [class*="bg-gray-50"] { background: var(--bg-primary) !important; }
#root [role="alert"] { border-radius: 8px; box-shadow: var(--shadow-lg); }

/* Model settings: a focused workspace dialog with persistent category navigation. */
.model-config-overlay { padding: 24px; }
.model-config-backdrop { background: rgba(4,4,7,.78) !important; }
.model-config-dialog { width: min(980px, calc(100vw - 48px)); max-width: none !important; height: min(720px, calc(100vh - 48px)); max-height: none !important; overflow: hidden; border: 1px solid rgba(255,255,255,.14) !important; border-radius: 14px !important; background: #111115 !important; box-shadow: 0 30px 90px rgba(0,0,0,.58) !important; }
.model-config-header { min-height: 82px; padding: 19px 24px !important; border-color: rgba(255,255,255,.1) !important; background: linear-gradient(135deg, rgba(183,167,255,.09), rgba(255,255,255,.015)); }
.model-config-title-icon { width: 38px !important; height: 38px !important; border-radius: 9px !important; background: rgba(183,167,255,.13) !important; border-color: rgba(183,167,255,.3) !important; }
.model-config-title h2 { color: #f8f6fb; font-size: 17px; font-weight: 680; }
.model-config-title p { margin-top: 4px; color: #85808c; font: 9px var(--font-mono); letter-spacing: .08em; }
.model-config-close { width: 32px !important; height: 32px !important; min-height: 32px !important; border: 1px solid rgba(255,255,255,.1); border-radius: 8px !important; }
.model-config-close:hover { border-color: rgba(183,167,255,.45); background: rgba(183,167,255,.1) !important; }
.model-config-body { min-height: 0; }
.model-config-tabs { display: flex; flex-direction: column; gap: 4px; width: 184px; padding: 18px 12px; border-right: 1px solid rgba(255,255,255,.09); background: rgba(7,7,10,.35); }
.model-config-tab { min-height: 42px !important; justify-content: flex-start !important; gap: 10px !important; padding: 0 12px !important; border: 1px solid transparent !important; border-radius: 8px !important; color: #8f8a98 !important; background: transparent !important; font-size: 11px !important; font-weight: 620 !important; letter-spacing: 0 !important; }
.model-config-tab:hover { color: #f0edf5 !important; background: rgba(255,255,255,.055) !important; }
.model-config-tab[aria-current="page"] { color: #f4f0ff !important; border-color: rgba(183,167,255,.35) !important; background: rgba(183,167,255,.14) !important; box-shadow: inset 3px 0 0 #b7a7ff; }
.model-config-tab svg { width: 16px; height: 16px; color: #8d7ae0; }
.model-config-tab[aria-current="page"] svg { color: #cfc4ff; }
.model-config-content { padding: 24px 28px !important; background: #111115; }
.model-config-content > div { gap: 16px; }
.model-config-content [class*="rounded-lg"] { border-radius: 9px !important; border-color: rgba(255,255,255,.11) !important; }
.model-config-content [class*="bg-[var(--accent-bg)]"] { background: rgba(183,167,255,.11) !important; border-color: rgba(183,167,255,.3) !important; }
.model-config-content [class*="bg-[var(--bg-hover)]"] { background: rgba(255,255,255,.045) !important; }
.model-config-content input, .model-config-content select, .model-config-content textarea { border-radius: 7px !important; }
.model-config-content button { border-radius: 7px !important; }
.model-config-footer { min-height: 58px; padding: 13px 24px !important; border-color: rgba(255,255,255,.1) !important; background: #0d0d10 !important; }
.model-config-footer p { color: #77727f; font: 9px var(--font-mono); }
.model-config-done { min-height: 36px !important; padding-inline: 15px !important; border: 1px solid var(--border-secondary); border-radius: 8px !important; color: var(--btn-primary-text) !important; background: var(--btn-primary-bg) !important; }
.model-config-done:hover { background: var(--btn-primary-hover) !important; }
@media (max-width: 760px) { .model-config-overlay { padding: 12px; } .model-config-dialog { width: calc(100vw - 24px); height: calc(100vh - 24px); } .model-config-tabs { width: 138px; padding-inline: 8px; } .model-config-tab { padding-inline: 9px !important; } .model-config-content { padding: 18px 16px !important; } }

/* Avoid decorative gradients and oversized blur blobs in production surfaces. */
#root [class*="blur-[120px]"], #root [class*="blur-[100px]"] { display: none; }

@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled) { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Project library: a dark creative workspace inspired by Seko's information hierarchy. */
.seko-dashboard {
  min-width: 1180px;
  min-height: 100vh;
  background: var(--bg-base);
  color: var(--text-secondary);
}

.seko-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 18px;
  border-right: 1px solid var(--border-subtle);
  background: rgba(8, 8, 10, 0.88);
  backdrop-filter: blur(18px);
}

.seko-rail-brand {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
}

.seko-rail-brand img { width: 27px; height: 27px; border-radius: 8px; }
.seko-rail-nav, .seko-rail-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.seko-rail-footer { margin-top: auto; }

.seko-rail-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.seko-rail-button:hover { color: var(--text-primary); background: var(--nav-hover-bg); border-color: var(--border-subtle); }
.seko-rail-button.is-active { color: var(--text-primary); background: var(--nav-active-bg); border-color: rgba(181, 167, 255, 0.36); box-shadow: inset 0 0 20px rgba(155, 140, 255, 0.08); }

.seko-dashboard-main { min-height: 100vh; margin-left: 76px; }

.seko-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 24px 54px 36px;
  background-image: linear-gradient(180deg, rgba(7, 7, 8, 0.38), rgba(7, 7, 8, 0.92) 92%), linear-gradient(100deg, rgba(7, 7, 8, 0.9) 0%, rgba(35, 25, 70, 0.4) 48%, rgba(7, 7, 8, 0.66) 100%);
  background-position: center, center, center 34%;
  background-size: cover;
}

.seko-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.18) .7px, transparent .7px); background-size: 5px 5px; opacity: .08; mix-blend-mode: screen; }
.seko-topbar, .seko-hero-copy, .seko-quick-create { position: relative; z-index: 1; }
.seko-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.seko-breadcrumb, .seko-top-actions, .seko-save-state, .seko-ghost-button { display: inline-flex; align-items: center; }
.seko-breadcrumb { gap: 9px; color: rgba(247, 247, 248, 0.66); font-size: 12px; }
.seko-breadcrumb strong { color: var(--text-primary); font-size: 14px; }
.seko-breadcrumb span { color: rgba(247, 247, 248, 0.42); }
.seko-top-actions { gap: 10px; }
.seko-save-state { gap: 7px; color: #baf59e; font-size: 11px; }
.seko-ghost-button { gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: rgba(247,247,248,.76); background: rgba(15,15,18,.46); font-size: 11px; cursor: pointer; transition: background 160ms ease, border-color 160ms ease, color 160ms ease; }
.seko-ghost-button:hover { color: var(--text-primary); border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.12); }
.seko-icon-action { width: 34px; justify-content: center; padding: 0; }
.seko-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #111113; background: linear-gradient(135deg, #b5a7ff, #7ee7e9); font-size: 10px; font-weight: 800; }

.seko-hero-copy { max-width: 690px; padding: 66px 0 30px; }
.seko-eyebrow { color: #bdb5ff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.seko-hero-copy h1 { margin: 14px 0 12px; color: #fff; font-size: 52px; font-weight: 650; letter-spacing: 0; line-height: 1.08; }
.seko-hero-copy p { margin: 0; color: rgba(247,247,248,.68); font-size: 14px; line-height: 1.7; }

.seko-quick-create { max-width: 820px; padding: 22px 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(15, 15, 18, .64); box-shadow: 0 18px 60px rgba(0,0,0,.32); backdrop-filter: blur(18px); }
.seko-create-panel-copy { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.seko-create-panel-copy > div { display: flex; flex-direction: column; gap: 7px; }
.seko-create-panel-copy strong { color: var(--text-primary); font-size: 16px; }
.seko-create-panel-copy span { color: var(--text-tertiary); font-size: 12px; }
.seko-create-submit { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; flex: 0 0 auto; border: 0; border-radius: 11px; color: var(--btn-primary-text); background: var(--btn-primary-bg); cursor: pointer; box-shadow: 0 8px 22px var(--btn-primary-shadow); transition: transform 160ms ease, background 160ms ease; font-size: 12px; font-weight: 700; }
.seko-create-submit:hover { background: var(--btn-primary-hover); transform: translateY(-1px); }

.seko-project-section { padding: 34px 54px 52px; background: var(--bg-base); }
.seko-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.seko-section-head h2 { margin: 0 0 7px; color: var(--text-primary); font-size: 22px; letter-spacing: 0; }
.seko-section-head p { margin: 0; color: var(--text-tertiary); font-size: 12px; }
.seko-project-search { width: 240px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--border-primary); border-radius: 10px; color: var(--text-muted); background: var(--bg-primary); }
.seko-project-search:focus-within { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(155,140,255,.1); }
.seko-project-search input { width: 100%; border: 0; outline: 0; color: var(--text-primary); background: transparent; font-size: 12px; }
.seko-project-search input::placeholder { color: var(--text-muted); }
.seko-project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.seko-project-card { position: relative; min-height: 232px; overflow: hidden; border: 1px solid var(--border-primary); border-radius: 17px; color: var(--text-primary); background: var(--bg-primary); cursor: pointer; box-shadow: 0 12px 34px rgba(0,0,0,.16); transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.seko-project-card:hover, .seko-project-card:focus-visible { border-color: rgba(181,167,255,.66); box-shadow: 0 18px 42px rgba(0,0,0,.32), 0 0 0 3px rgba(155,140,255,.1); outline: none; transform: translateY(-2px); }
.seko-project-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .76; }
.seko-project-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,10,.05) 15%, rgba(8,8,10,.78) 66%, rgba(8,8,10,.96)); pointer-events: none; }
.seko-project-card-empty { display: grid; place-items: center; border-style: dashed; border-color: rgba(181,167,255,.34); background: linear-gradient(145deg, rgba(155,140,255,.14), rgba(16,16,19,.86)); min-height: 200px !important; }
.seko-project-card-empty::after { display: none; }
.seko-project-card-empty span { position: relative; z-index: 1; display: grid; justify-items: center; color: #fff; }
.seko-project-card-empty svg { color: #b5a7ff; }
.seko-project-card-empty strong { font-size: 15px; }
.seko-project-card-empty small { margin-top: 6px; color: var(--text-tertiary); font-size: 11px; }
.seko-project-card-content { position: absolute; inset: auto 18px 17px; z-index: 1; }
.seko-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; color: rgba(247,247,248,.62); font-size: 10px; }
.seko-card-meta span { display: inline-flex; align-items: center; gap: 6px; color: #baf59e; }
.seko-card-meta i { width: 6px; height: 6px; border-radius: 50%; background: #baf59e; box-shadow: 0 0 9px rgba(186,245,158,.72); }
.seko-card-meta time { color: rgba(247,247,248,.46); }
.seko-project-card-content h3 { margin: 0 0 7px; overflow: hidden; color: #fff; font-size: 16px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.seko-project-card-content p { margin: 0; overflow: hidden; color: rgba(247,247,248,.58); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.seko-card-arrow { position: absolute; right: 16px; top: 16px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: rgba(255,255,255,.76); background: rgba(8,8,10,.36); backdrop-filter: blur(8px); }
.seko-delete-button { position: absolute; right: 16px; bottom: 16px; z-index: 3; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; color: rgba(255,255,255,.62); background: rgba(8,8,10,.38); cursor: pointer; }
.seko-delete-button:hover { color: #ffd0cc; border-color: rgba(255,120,120,.55); background: rgba(130,20,25,.5); }
.seko-delete-cover { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; color: #fff; background: rgba(18, 12, 18, .9); backdrop-filter: blur(16px); }
.seko-delete-cover svg { color: #ffd59e; }
.seko-delete-cover strong { font-size: 14px; }
.seko-delete-cover small { color: var(--text-tertiary); font-size: 11px; }
.seko-delete-cover div { display: flex; gap: 8px; margin-top: 7px; }
.seko-delete-cover button { padding: 7px 12px; border: 1px solid var(--border-primary); border-radius: 8px; color: var(--text-secondary); background: rgba(255,255,255,.08); font-size: 11px; cursor: pointer; }
.seko-delete-cover button:last-child { color: #ffd0cc; border-color: rgba(255,120,120,.4); background: rgba(130,20,25,.34); }
.seko-loading, .seko-empty-search { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 180px; border: 1px dashed var(--border-primary); border-radius: 16px; color: var(--text-tertiary); font-size: 12px; }
.seko-workflow-strip { display: grid; grid-template-columns: 1.4fr .9fr .9fr; gap: 14px; margin-top: 20px; }
.seko-workflow-strip > div { min-height: 78px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 15px 17px; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(17,17,19,.68); }
.seko-workflow-strip small { color: var(--text-muted); font-size: 10px; }
.seko-workflow-strip strong { overflow: hidden; color: var(--text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.seko-progress { display: block; height: 3px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.1); }
.seko-progress i { display: block; width: 36%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9b8cff, #7ee7e9); }

@media (max-width: 1380px) {
  .seko-hero, .seko-project-section { padding-left: 36px; padding-right: 36px; }
  .seko-project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Project overview V2: continue work first, resources second, series management below. */
.seko-overview { min-width: 1180px; min-height: 100vh; padding: 24px 54px 72px; color: var(--text-secondary); background: radial-gradient(circle at 80% -10%, rgba(104,80,210,.12), transparent 28%), var(--bg-base); }
.seko-overview-shell { width: min(100%, 1420px); margin-inline: auto; }
.seko-overview button:focus-visible, .seko-overview input:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; }
.seko-overview-top { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.seko-overview-back { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 2px; border: 0; color: var(--text-tertiary); background: transparent; font-size: 13px; cursor: pointer; }
.seko-overview-back:hover { color: var(--text-primary); }
.seko-overview-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.seko-overview-save-state { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 8px; border: 1px solid rgba(186,245,158,.22); border-radius: 999px; color: #c5f7ad; background: rgba(186,245,158,.08); font-size: 11px; line-height: 1; white-space: nowrap; }
.seko-overview-save-state i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #baf59e; box-shadow: 0 0 10px rgba(186,245,158,.72); }
.seko-overview-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 26px; border-bottom: 1px solid var(--border-primary); }
.seko-overview-title { min-width: 0; }
.seko-project-title-button { display: flex; align-items: center; gap: 8px; max-width: 680px; margin: 0 0 9px; padding: 0; border: 0; color: var(--text-primary); background: transparent; text-align: left; cursor: pointer; }
.seko-project-title-button h1 { min-width: 0; overflow: hidden; margin: 0; font-size: 34px; font-weight: 650; letter-spacing: 0; line-height: 1.18; text-overflow: ellipsis; white-space: nowrap; }
.seko-project-title-button svg { flex: 0 0 auto; color: var(--text-muted); opacity: .72; transition: color 160ms ease, opacity 160ms ease; }
.seko-project-title-button:hover svg { color: var(--accent-text); opacity: 1; }
.seko-overview-title > p, .seko-overview-meta p { margin: 0; color: var(--text-tertiary); font-size: 12px; }
.seko-title-editor { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.seko-title-editor input { width: min(520px, 42vw); min-height: 48px; padding: 0 14px; border: 1px solid var(--accent-border); border-radius: 10px; color: var(--text-primary); background: var(--bg-primary); font-size: 26px; font-weight: 650; }
.seko-title-editor button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border-primary); border-radius: 10px; color: var(--text-tertiary); background: var(--bg-primary); cursor: pointer; }
.seko-title-editor button:first-of-type { color: var(--success); }
.seko-title-editor button:hover { border-color: var(--border-secondary); color: var(--text-primary); }
.seko-overview-export, .seko-overview-primary, .seko-overview-secondary { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border-radius: 10px; font-size: 13px; font-weight: 650; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease, opacity 160ms ease; }
.seko-overview-export { border: 1px solid var(--border-secondary); color: var(--text-secondary); background: rgba(255,255,255,.035); }
.seko-overview-export:hover { color: var(--text-primary); background: rgba(255,255,255,.07); }
.seko-overview-primary { border: 0; color: var(--btn-primary-text); background: var(--btn-primary-bg); box-shadow: 0 12px 30px var(--btn-primary-shadow); }
.seko-overview-primary:hover { background: var(--btn-primary-hover); }
.seko-overview-secondary { border: 1px solid var(--border-primary); color: var(--text-tertiary); background: transparent; }
.seko-overview-secondary:hover { color: var(--text-primary); border-color: var(--border-secondary); }
.seko-overview-export:disabled, .seko-overview-primary:disabled { cursor: wait; opacity: .48; }
.seko-overview-workspace { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(390px, .82fr); gap: 20px; margin-top: 24px; }
.seko-continue-card { min-height: 310px; overflow: hidden; display: grid; grid-template-columns: minmax(280px, .9fr) minmax(340px, 1fr); border: 1px solid var(--border-primary); border-radius: 18px; background: var(--bg-primary); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.seko-continue-visual { position: relative; min-height: 310px; overflow: hidden; display: grid; place-items: center; color: var(--text-muted); background: var(--bg-sunken); }
.seko-continue-visual img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(.82) contrast(1.05); }
.seko-continue-visual.has-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 58%, var(--bg-primary) 100%); pointer-events: none; }
.seko-continue-placeholder { width: 70px; height: 70px; opacity: .25; }
.seko-visual-caption { position: absolute; left: 20px; bottom: 18px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.84); font-size: 11px; }
.seko-visual-caption i { width: 7px; height: 7px; border-radius: 50%; background: var(--info); box-shadow: 0 0 14px rgba(126,231,233,.7); }
.seko-continue-copy { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 32px 32px 30px 26px; }
.seko-continue-label { margin-bottom: 15px; color: var(--text-tertiary); font-size: 12px; }
.seko-continue-copy h2 { overflow-wrap: anywhere; margin: 0; color: var(--text-primary); font-size: 24px; line-height: 1.35; font-weight: 650; letter-spacing: 0; }
.seko-continue-copy > p { margin: 10px 0 20px; color: var(--text-tertiary); font-size: 12px; line-height: 1.6; }
.seko-stage-flow { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-bottom: 24px; }
.seko-stage-flow span { min-width: 0; display: flex; align-items: center; gap: 6px; padding-top: 8px; border-top: 3px solid rgba(255,255,255,.08); color: var(--text-muted); font-size: 10px; }
.seko-stage-flow span.is-complete { border-color: rgba(181,167,255,.42); color: var(--text-tertiary); }
.seko-stage-flow span.is-current { border-color: var(--stage-color); color: var(--text-primary); }
.seko-stage-flow i, .seko-stage-special i, .seko-episode-stage i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--stage-color); box-shadow: 0 0 10px rgba(181,167,255,.38); }
.seko-stage-special { display: flex; align-items: center; gap: 7px; margin-bottom: 24px; color: var(--text-secondary); font-size: 11px; }
[data-stage='script'] { --stage-color: #b5a7ff; }
[data-stage='assets'] { --stage-color: #ffd59e; }
[data-stage='director'] { --stage-color: #7ee7e9; }
[data-stage='export'] { --stage-color: #baf59e; }
[data-stage='prompts'] { --stage-color: #e2a8ff; }
.seko-continue-actions { display: flex; align-items: center; gap: 12px; }
.seko-continue-actions > button { min-width: 132px; }
.seko-continue-actions > span { margin-left: auto; color: var(--text-tertiary); font-size: 11px; text-align: right; }
.seko-resource-panel { min-width: 0; padding: 2px 0; }
.seko-resource-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 12px; }
.seko-resource-panel-head h2, .seko-series-section-head h2 { margin: 0; color: var(--text-primary); font-size: 17px; font-weight: 650; letter-spacing: 0; }
.seko-resource-panel-head span, .seko-series-section-head p { color: var(--text-muted); font-size: 11px; }
.seko-resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seko-resource-card { position: relative; min-height: 124px; overflow: hidden; display: flex; align-items: flex-end; padding: 14px; border: 1px solid var(--border-primary); border-radius: 13px; color: var(--text-primary); text-align: left; background: var(--bg-surface); cursor: pointer; isolation: isolate; transition: border-color 180ms ease, background-color 180ms ease; }
.seko-resource-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,10,12,.08), rgba(10,10,12,.94)); }
.seko-resource-card:hover { border-color: rgba(181,167,255,.54); background: var(--bg-elevated); }
.seko-resource-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: .5; transition: opacity 180ms ease, transform 220ms ease; }
.seko-resource-card:hover img { opacity: .62; transform: scale(1.03); }
.seko-resource-placeholder { position: absolute; inset: 22px auto auto 18px; z-index: -1; width: 42px; height: 42px; color: var(--text-muted); opacity: .35; }
.seko-resource-arrow { position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; color: rgba(255,255,255,.7); }
.seko-resource-copy { display: flex; flex-direction: column; gap: 5px; }
.seko-resource-copy strong { font-size: 13px; font-weight: 650; }
.seko-resource-copy small { color: rgba(255,255,255,.62); font-size: 10px; }
.seko-series-section { margin-top: 42px; }
.seko-series-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.seko-series-section-head p { margin: 7px 0 0; }
.seko-new-series-form { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; margin-bottom: 12px; padding: 16px; border: 1px solid rgba(181,167,255,.28); border-radius: 14px; background: rgba(181,167,255,.07); }
.seko-new-series-form input { min-width: 0; min-height: 42px; padding: 0 13px; border: 1px solid var(--border-secondary); border-radius: 9px; color: var(--text-primary); background: rgba(0,0,0,.22); font-size: 13px; }
.seko-new-series-form input::placeholder { color: var(--text-muted); }
.seko-series-list { display: grid; gap: 10px; }
.seko-series-card { overflow: hidden; border: 1px solid var(--border-primary); border-radius: 14px; background: rgba(17,17,19,.82); }
.seko-series-card-head { min-height: 64px; display: grid; grid-template-columns: minmax(0,1fr) 84px; align-items: center; gap: 10px; padding: 0 18px; transition: background-color 160ms ease; }
.seko-series-card-head:hover { background: rgba(255,255,255,.025); }
.seko-series-expand { min-width: 0; min-height: 62px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 0; border: 0; color: var(--text-secondary); text-align: left; background: transparent; cursor: pointer; }
.seko-series-toggle { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--text-tertiary); background: rgba(255,255,255,.04); }
.seko-series-toggle svg { width: 15px; height: 15px; transition: transform 180ms ease; }
.seko-series-card.is-open .seko-series-toggle svg { transform: rotate(90deg); }
.seko-series-name { min-width: 0; }
.seko-series-name strong { display: block; overflow: hidden; color: var(--text-primary); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.seko-series-name small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.seko-series-modified { color: var(--text-tertiary); font-size: 11px; white-space: nowrap; }
.seko-series-card-actions { display: flex; justify-content: flex-end; gap: 4px; }
.seko-series-card-actions button, .seko-episode-delete { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; color: var(--text-muted); background: transparent; cursor: pointer; }
.seko-series-card-actions button:hover, .seko-episode-delete:hover { color: var(--text-primary); border-color: var(--border-primary); background: var(--nav-hover-bg); }
.seko-series-card-actions button:last-child:hover, .seko-episode-delete:hover { color: var(--error-text); border-color: rgba(248,113,113,.34); background: var(--error-bg); }
.seko-episode-list { border-top: 1px solid var(--border-subtle); background: rgba(0,0,0,.1); }
.seko-episode-row { min-height: 64px; display: flex; align-items: center; border-bottom: 1px solid var(--border-subtle); transition: background-color 150ms ease; }
.seko-episode-row:hover { background: rgba(255,255,255,.035); }
.seko-episode-main { min-width: 0; min-height: 64px; flex: 1; display: grid; grid-template-columns: 46px minmax(0,1fr) 130px 118px 18px; align-items: center; gap: 14px; padding: 0 8px 0 18px; border: 0; color: var(--text-secondary); text-align: left; background: transparent; cursor: pointer; }
.seko-episode-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--accent-text); background: var(--accent-bg); font: 500 11px var(--font-mono); }
.seko-episode-copy { min-width: 0; }
.seko-episode-copy strong { display: block; overflow: hidden; color: var(--text-secondary); font-size: 13px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
.seko-episode-copy small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.seko-episode-stage { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.seko-episode-modified { color: var(--text-tertiary); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.seko-episode-arrow { color: var(--text-muted); }
.seko-episode-delete { flex: 0 0 auto; margin-right: 14px; opacity: 0; transition: opacity 160ms ease; }
.seko-episode-row:hover .seko-episode-delete, .seko-episode-delete:focus-visible { opacity: 1; }
.seko-add-episode { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 22px; border: 0; color: var(--text-muted); background: transparent; font-size: 11px; cursor: pointer; }
.seko-add-episode:hover { color: var(--text-primary); background: rgba(181,167,255,.055); }
.seko-episode-empty { padding: 28px 20px; color: var(--text-muted); text-align: center; font-size: 11px; }
.seko-episode-empty button { margin-left: 6px; border: 0; color: var(--accent-text); background: transparent; cursor: pointer; }
.seko-series-empty { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; border: 1px dashed var(--border-primary); border-radius: 14px; color: var(--text-muted); }
.seko-series-empty svg { margin-bottom: 4px; color: var(--accent-text); opacity: .7; }
.seko-series-empty strong { color: var(--text-secondary); font-size: 13px; }
.seko-series-empty span { font-size: 11px; }

/* The shared button baseline uses an ID selector, so these overview sizes need the same scope. */
#root .seko-overview button.seko-overview-back { min-height: 40px; }
#root .seko-overview button.seko-overview-export, #root .seko-overview button.seko-overview-primary, #root .seko-overview button.seko-overview-secondary { min-height: 42px; }
#root .seko-overview button.seko-resource-card { min-height: 124px; }
#root .seko-overview button.seko-series-expand { min-height: 62px; }
#root .seko-overview button.seko-episode-main { min-height: 64px; }
#root .seko-overview button.seko-add-episode { min-height: 48px; }
#root .seko-overview .seko-new-series-form input { min-height: 42px; }

@media (max-width: 1320px) {
  .seko-overview { padding-left: 38px; padding-right: 38px; }
  .seko-overview-workspace { grid-template-columns: minmax(0,1.25fr) 390px; }
  .seko-continue-card { grid-template-columns: minmax(260px,.82fr) 1fr; }
  .seko-continue-copy { padding-left: 22px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .seko-overview *, .seko-overview *::before, .seko-overview *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Script workspace: stage navigation plus a wide editor and an on-demand settings drawer. */
.seko-script-workspace { position: relative; min-width: 1056px; overflow: hidden; background: var(--bg-base) !important; }
.seko-script-story-layout { position: relative; height: 100%; display: flex; min-width: 0; color: var(--text-secondary); background: var(--bg-base); }
.seko-script-config-drawer { position: absolute; inset: 0 0 0 auto; z-index: 35; width: 390px; display: flex; flex-direction: column; border-left: 1px solid var(--glass-border); color: var(--text-secondary); background: rgba(16,16,18,.96); box-shadow: -24px 0 70px rgba(0,0,0,.46); backdrop-filter: blur(20px); visibility: hidden; pointer-events: none; transform: translateX(100%); transition: transform 220ms ease, visibility 0s linear 220ms; }
.seko-script-config-drawer.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
.seko-script-config-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--border-primary); }
.seko-script-config-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-primary); font-size: 13px; }
.seko-script-config-head h2 svg { color: var(--accent-text); }
.seko-script-config-head p { margin: 5px 0 0; color: var(--text-muted); font-size: 9px; }
.seko-script-config-head > button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border-primary); border-radius: 9px; color: var(--text-tertiary); background: var(--bg-surface); cursor: pointer; }
.seko-script-config-head > button:hover { color: var(--text-primary); border-color: var(--border-secondary); }
.seko-script-config-body { flex: 1; overflow-y: auto; padding: 20px; scrollbar-gutter: stable; }
.seko-script-config-footer { padding: 14px 20px; border-top: 1px solid var(--border-primary); background: rgba(16,16,18,.92); }
.seko-script-config-footer > button:first-child { min-height: 44px; border-radius: 10px; }
.seko-script-editor { min-width: 0; flex: 1; display: flex; flex-direction: column; background: radial-gradient(circle at 80% 5%, rgba(68,48,140,.09), transparent 28%), var(--bg-base); }
.seko-script-editor-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--border-primary); background: rgba(9,9,11,.9); }
.seko-script-editor-heading { min-width: 260px; display: flex; align-items: center; gap: 13px; }
.seko-script-editor-title { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--text-primary); font-size: 12px; }
.seko-script-editor-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--info); box-shadow: 0 0 8px rgba(126,231,233,.65); }
.seko-script-summary { min-width: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; }
.seko-script-summary span { max-width: 112px; overflow: hidden; padding: 4px 7px; border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted); background: rgba(255,255,255,.025); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.seko-script-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 0 0 auto; }
.seko-script-tool { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid var(--border-primary); border-radius: 9px; color: var(--text-tertiary); background: var(--bg-surface); font-size: 9px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: color 160ms ease, border-color 160ms ease, background 160ms ease; }
.seko-script-tool:hover:not(:disabled) { color: var(--text-primary); border-color: var(--accent-border); background: var(--accent-bg); }
.seko-script-tool.is-primary { color: var(--btn-primary-text); border-color: transparent; background: var(--btn-primary-bg); }
.seko-script-tool.is-primary:hover:not(:disabled) { color: var(--btn-primary-text); background: var(--btn-primary-hover); }
.seko-script-tool.is-settings { color: var(--accent-text); border-color: rgba(181,167,255,.35); background: rgba(155,140,255,.1); }
.seko-script-tool.is-generate { color: #0b0b0d; border-color: transparent; background: linear-gradient(135deg, #b5a7ff, #8ae5e7); box-shadow: 0 8px 24px rgba(155,140,255,.18); }
.seko-script-tool.is-disabled, .seko-script-tool:disabled { color: var(--text-muted); border-color: var(--border-subtle); background: var(--bg-sunken); box-shadow: none; opacity: .58; cursor: not-allowed; }
.seko-selection-rewrite { padding: 12px 24px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-base); }
.seko-script-paper-scroll { flex: 1; min-height: 0; overflow: auto; padding: 30px 0 }
.seko-script-paper { width: min(100%, 95%); min-height: 100%; display: flex; margin: 0 auto; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(18,18,21,.62); box-shadow: 0 22px 60px rgba(0,0,0,.2); }
.seko-script-textarea { width: 100%; min-height: 540px; flex: 1; resize: none; border: 0; outline: 0; color: #d8d8de; background: transparent; font-family: Merriweather, "Noto Serif SC", serif !important; font-size: 15px; line-height: 2; padding: 10px; }
.seko-script-textarea::placeholder { color: var(--text-muted); }
.seko-script-textarea:focus-visible { outline: 0; }
.seko-script-status { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 18px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); background: var(--bg-base); font: 400 9px var(--font-mono); user-select: none; }

@media (max-width: 1439px) {
  .seko-script-editor-head { padding-inline: 18px; }
  .seko-script-editor-heading { min-width: 210px; }
  .seko-script-summary span:nth-last-child(-n+2) { display: none; }
  .seko-script-tool { padding-inline: 8px; }
}

/* Episode assets: browse first, edit on demand. */
.stage-assets-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 1056px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  color: var(--text-secondary);
  background: radial-gradient(circle at 74% -10%, rgba(119, 91, 255, .12), transparent 30%), var(--bg-base);
}
.stage-assets-topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--border-primary); background: rgba(14, 14, 17, .9); }
.stage-assets-breadcrumb, .stage-assets-top-actions, .stage-assets-save-state, .stage-assets-toolbar-button, .stage-assets-ratio-control, .stage-assets-section-nav a, .stage-assets-primary-action, .stage-asset-summary-status, .stage-asset-summary-actions button { display: inline-flex; align-items: center; }
.stage-assets-breadcrumb { min-width: 0; gap: 10px; font-size: 12px; }
.stage-assets-breadcrumb-icon { width: 17px; height: 17px; color: var(--accent-text); }
.stage-assets-breadcrumb strong { color: var(--text-primary); font-weight: 700; }
.stage-assets-breadcrumb span { color: var(--text-muted); }
.stage-assets-top-actions { gap: 8px; }
.stage-assets-save-state { gap: 5px; padding: 7px 9px; color: var(--text-muted); font: 600 9px var(--font-mono); white-space: nowrap; }
.stage-assets-save-state svg:first-child { width: 13px; height: 13px; color: var(--info); }
.stage-assets-save-state svg:last-child { width: 11px; height: 11px; color: var(--success); }
.stage-assets-toolbar-button, .stage-assets-ratio-control { min-height: 34px; gap: 7px; padding: 0 10px; border: 1px solid var(--border-primary); border-radius: 8px; color: var(--text-tertiary); background: var(--bg-surface); font-size: 10px; font-weight: 650; }
.stage-assets-toolbar-button { cursor: pointer; }
.stage-assets-toolbar-button:hover:not(:disabled) { color: var(--text-primary); border-color: var(--accent-border); background: var(--accent-bg); }
.stage-assets-toolbar-button svg { width: 14px; height: 14px; }
.stage-assets-ratio-control { gap: 10px; padding-right: 5px; }
.stage-assets-ratio-control > span { color: var(--text-muted); font-size: 9px; }
.stage-assets-ratio-control button { min-height: 26px !important; padding: 0 7px; border-color: transparent !important; background: transparent !important; box-shadow: none !important; color: var(--text-primary) !important; font-size: 9px; }
.stage-assets-content { flex: 1; min-height: 0; overflow-y: auto; padding: 30px 34px 72px; scrollbar-gutter: stable; }
.stage-assets-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; max-width: 1420px; margin: 0 auto 24px; }
.stage-assets-eyebrow { color: var(--accent-text); font: 700 9px var(--font-mono); letter-spacing: .16em; }
.stage-assets-heading h1 { margin: 8px 0 7px; color: var(--text-primary); font-size: 25px; font-weight: 720; letter-spacing: -.01em; }
.stage-assets-heading p { margin: 0; color: var(--text-tertiary); font-size: 12px; }
.stage-assets-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.stage-assets-count-note { color: var(--text-muted); font: 10px var(--font-mono); white-space: nowrap; }
.stage-assets-primary-action { min-height: 38px; gap: 8px; padding: 0 14px; border: 0; border-radius: 9px; color: var(--btn-primary-text); background: var(--btn-primary-bg); box-shadow: 0 10px 26px var(--btn-primary-shadow); font-size: 10px; font-weight: 700; cursor: pointer; }
.stage-assets-primary-action:hover:not(:disabled) { background: var(--btn-primary-hover); transform: translateY(-1px); }
.stage-assets-primary-action svg { width: 15px; height: 15px; }
.stage-assets-section-nav { position: sticky; top: -30px; z-index: 4; display: flex; gap: 5px; max-width: 1420px; margin: 0 auto 30px; padding: 9px 0; border-bottom: 1px solid var(--border-primary); background: rgba(14, 14, 17, .9); backdrop-filter: blur(16px); }
.stage-assets-section-nav a { gap: 7px; padding: 7px 10px; border-radius: 7px; color: var(--text-muted); font-size: 10px; font-weight: 650; text-decoration: none; }
.stage-assets-section-nav a:hover { color: var(--text-primary); background: var(--bg-surface); }
.stage-assets-section-nav a svg { width: 14px; height: 14px; }
.stage-assets-section-nav a b { min-width: 18px; padding: 2px 5px; border-radius: 5px; color: var(--text-tertiary); background: var(--bg-surface); font: 700 9px var(--font-mono); text-align: center; }
.stage-assets-section { max-width: 1420px; margin: 0 auto 42px; scroll-margin-top: 65px; }
.stage-assets-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--border-primary); }
.stage-assets-section-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-primary); font-size: 13px; font-weight: 700; }
.stage-assets-section-head h3 > div { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.stage-assets-section-head p { margin: 5px 0 0 14px; color: var(--text-muted); font-size: 10px; }
.stage-assets-section-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.stage-assets-section-tools button { min-height: 31px !important; border-radius: 7px !important; font-size: 9px !important; }
.stage-assets-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stage-asset-summary-card { min-width: 0; overflow: hidden; border: 1px solid var(--border-primary); border-radius: 12px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--bg-surface); box-shadow: 0 12px 34px rgba(0,0,0,.14); transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
.stage-asset-summary-card:hover { border-color: var(--border-secondary); box-shadow: 0 18px 42px rgba(0,0,0,.22); transform: translateY(-2px); }
.stage-asset-summary-card.is-linked { border-color: var(--accent-border); }
.stage-asset-summary-media { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; padding: 0; border: 0; border-radius: 0; background: var(--bg-elevated); cursor: pointer; }
.stage-asset-summary-media img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 220ms ease; }
.stage-asset-summary-card:hover .stage-asset-summary-media img { transform: scale(1.025); }
.stage-asset-summary-placeholder { display: flex; width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-muted); background: radial-gradient(circle at 50% 30%, rgba(143,124,255,.15), transparent 55%), var(--bg-elevated); }
.stage-asset-summary-placeholder svg { width: 28px; height: 28px; opacity: .6; }
.stage-asset-summary-placeholder small { font-size: 10px; }
.stage-asset-summary-status { position: absolute; top: 10px; left: 10px; gap: 5px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: var(--text-primary); background: rgba(12,12,15,.72); backdrop-filter: blur(10px); font: 700 9px var(--font-mono); }
.stage-asset-summary-status svg { width: 12px; height: 12px; }
.stage-asset-summary-status.is-complete svg { color: var(--success); }
.stage-asset-summary-status.is-generating svg { color: var(--info); animation: spin 1s linear infinite; }
.stage-asset-summary-status.is-pending svg { color: var(--accent-text); }
.stage-asset-summary-body { padding: 14px; }
.stage-asset-summary-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stage-asset-summary-title strong { display: block; overflow: hidden; color: var(--text-primary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.stage-asset-summary-title span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 9px; }
.stage-asset-summary-title > svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--accent-text); }
.stage-asset-summary-body p { min-height: 32px; margin: 11px 0 13px; overflow: hidden; color: var(--text-tertiary); font-size: 10px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stage-asset-summary-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.stage-asset-summary-actions > span { color: var(--text-muted); font-size: 9px; }
.stage-asset-summary-actions > div { display: flex; gap: 5px; }
.stage-asset-summary-actions button { min-height: 28px !important; gap: 4px; padding: 0 7px; border: 1px solid var(--border-primary); border-radius: 6px !important; color: var(--text-tertiary); background: var(--bg-elevated); font-size: 9px; cursor: pointer; }
.stage-asset-summary-actions button:hover:not(:disabled) { color: var(--text-primary); border-color: var(--accent-border); background: var(--accent-bg); }
.stage-asset-summary-actions button:first-child { color: var(--accent-text); border-color: var(--accent-border); background: var(--accent-bg); }
.stage-asset-summary-actions button svg { width: 11px; height: 11px; }
.stage-asset-drawer-shade { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.46); backdrop-filter: blur(3px); }
.stage-asset-drawer { position: fixed; inset: 0 0 0 auto; z-index: 71; display: flex; width: min(580px, 48vw); min-width: 460px; flex-direction: column; border-left: 1px solid var(--border-secondary); color: var(--text-secondary); background: rgba(18,18,22,.97); box-shadow: -24px 0 70px rgba(0,0,0,.48); }
.stage-asset-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 17px; border-bottom: 1px solid var(--border-primary); }
.stage-asset-drawer-head h2 { margin: 0; color: var(--text-primary); font-size: 14px; }
.stage-asset-drawer-head p { margin: 5px 0 0; color: var(--text-muted); font: 9px var(--font-mono); }
.stage-asset-drawer-close { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--border-primary); border-radius: 8px !important; color: var(--text-tertiary); background: var(--bg-surface); cursor: pointer; }
.stage-asset-drawer-close:hover { color: var(--text-primary); border-color: var(--accent-border); background: var(--accent-bg); }
.stage-asset-drawer-close svg { width: 15px; height: 15px; }
.stage-asset-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; scrollbar-gutter: stable; }
.stage-asset-drawer .stage-asset-detail-card { width: 100%; margin: 0; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important; }
.stage-asset-drawer .stage-asset-detail-card:hover { transform: none; }
@keyframes stage-assets-spin { to { transform: rotate(360deg); } }
.stage-asset-summary-status.is-generating svg { animation: stage-assets-spin 1s linear infinite; }

@media (max-width: 1320px) {
  .stage-assets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-assets-heading h1 { font-size: 22px; }
}

/* Director workspace: a clear shot board with an inspector that opens beside it. */
.stage-director-workspace { position: relative; display: flex; height: 100%; min-width: 1056px; flex-direction: column; overflow: hidden; color: var(--text-secondary); background: radial-gradient(circle at 78% -10%, rgba(119,91,255,.12), transparent 28%), var(--bg-base); }
.stage-director-topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--border-primary); background: rgba(14,14,17,.92); }
.stage-director-breadcrumb { display: flex; align-items: center; gap: 11px; min-width: 0; }
.stage-director-breadcrumb-icon { width: 17px; height: 17px; flex: 0 0 auto; color: var(--accent-text); }
.stage-director-breadcrumb strong { display: block; color: var(--text-primary); font-size: 13px; }
.stage-director-breadcrumb span { display: block; margin-top: 4px; color: var(--text-muted); font: 9px var(--font-mono); }
.stage-director-top-actions { display: flex; align-items: center; gap: 12px; }
.stage-director-save-state { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font: 9px var(--font-mono); white-space: nowrap; }
.stage-director-save-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 9px rgba(109,218,179,.7); }
.stage-director-topbar .stage-director-top-actions > div:last-child { display: flex; align-items: center; gap: 10px; }
.stage-director-topbar .stage-director-top-actions > div:last-child > div:first-child { display: flex; align-items: center; gap: 6px; }
.stage-director-topbar .stage-director-top-actions button { min-height: 36px !important; border-radius: 8px !important; font-size: 9px !important; }
.stage-director-topbar .stage-director-top-actions input[type="checkbox"] { min-height: 0; }
.stage-director-summary { display: grid; grid-template-columns: 130px 150px 150px 140px minmax(220px,1fr); gap: 1px; padding: 14px 28px; border-bottom: 1px solid var(--border-primary); background: var(--bg-surface); }
.stage-director-summary > div { min-height: 52px; display: flex; flex-direction: column; justify-content: center; padding: 0 16px; border-right: 1px solid var(--border-subtle); }
.stage-director-summary > div:first-child { padding-left: 0; }
.stage-director-summary > div:last-child { border-right: 0; }
.stage-director-summary span { color: var(--text-muted); font-size: 9px; }
.stage-director-summary strong { margin-top: 5px; color: var(--text-primary); font: 700 20px var(--font-mono); }
.stage-director-summary strong em { margin-left: 4px; color: var(--text-muted); font-size: 10px; font-style: normal; }
.stage-director-summary-copy { padding-left: 22px !important; }
.stage-director-summary-copy p { margin: 5px 0 0; color: var(--text-tertiary); font-size: 10px; line-height: 1.5; }
.stage-director-main { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.stage-director-shot-area { display: flex; min-width: 0; flex: 1; flex-direction: column; overflow-y: auto; padding: 20px 28px 56px; scrollbar-gutter: stable; transition: padding 180ms ease; }
.stage-director-shot-area.has-inspector { border-right: 1px solid var(--border-primary); }
.stage-director-shot-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-primary); }
.stage-director-shot-head strong { display: block; color: var(--text-primary); font-size: 13px; }
.stage-director-shot-head div span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10px; }
.stage-director-shot-head > span { color: var(--text-muted); font: 9px var(--font-mono); }
.stage-director-shot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; align-content: start; }
.stage-director-shot-grid > div { min-width: 0; border-radius: 10px; }
.stage-director-shot-grid > div:hover { transform: translateY(-2px); }
.stage-director-shot-grid > div > div:first-child { padding: 9px 11px; }
.stage-director-shot-grid > div > div:last-child { padding: 11px; }
.stage-director-shot-grid button { border-radius: 6px !important; }
.stage-director-inspector { width: min(500px, 38vw) !important; min-width: 430px; border-left: 1px solid var(--border-secondary); background: rgba(18,18,22,.98) !important; box-shadow: -22px 0 55px rgba(0,0,0,.3) !important; }
.stage-director-inspector > div:first-child { min-height: 66px; background: var(--bg-surface) !important; }
.stage-director-inspector section, .stage-director-inspector [class*="rounded-xl"] { border-radius: 8px; }
.stage-director-workspace > .fixed { border-radius: 9px; }
.stage-director-empty { display: flex; height: 100%; min-width: 1056px; flex-direction: column; align-items: center; justify-content: center; color: var(--text-tertiary); background: radial-gradient(circle at 50% 30%, rgba(119,91,255,.12), transparent 30%), var(--bg-base); }
.stage-director-empty-icon { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 14px; border: 1px solid var(--border-primary); border-radius: 15px; color: var(--accent-text); background: var(--accent-bg); }
.stage-director-empty-icon svg { width: 23px; height: 23px; }
.stage-director-empty strong { color: var(--text-primary); font-size: 14px; }
.stage-director-empty p { margin: 7px 0 0; color: var(--text-muted); font-size: 11px; }
@media (max-width: 1320px) {
  .stage-director-summary { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .stage-director-summary-copy { display: none !important; }
  .stage-director-shot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Export workspace: make delivery status and output choices easy to scan. */
.stage-export-workspace { position: relative; display: flex; height: 100%; min-width: 1056px; flex-direction: column; overflow: hidden; color: var(--text-secondary); background: radial-gradient(circle at 76% -12%, rgba(186,245,158,.08), transparent 28%), var(--bg-base); }
.stage-export-topbar { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px; border-bottom: 1px solid var(--border-primary); background: rgba(14,14,17,.92); }
.stage-export-breadcrumb { display: flex; align-items: center; gap: 11px; min-width: 0; }
.stage-export-breadcrumb > svg { width: 17px; height: 17px; color: var(--success-text); }
.stage-export-breadcrumb strong { display: block; color: var(--text-primary); font-size: 13px; }
.stage-export-breadcrumb span { display: block; margin-top: 4px; color: var(--text-muted); font: 9px var(--font-mono); }
.stage-export-top-actions { display: flex; align-items: center; gap: 13px; }
.stage-export-save { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font: 9px var(--font-mono); white-space: nowrap; }
.stage-export-save svg { width: 13px; height: 13px; color: var(--info); }
.stage-export-status { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px; border: 1px solid var(--warning-border); border-radius: 8px; color: var(--warning-text); background: var(--warning-bg); font-size: 10px; font-weight: 650; }
.stage-export-status > span { width: 7px; height: 7px; border-radius: 50%; background: var(--warning-text); box-shadow: 0 0 8px rgba(250,190,80,.7); }
.stage-export-status.is-ready { border-color: var(--success-border); color: var(--success-text); background: var(--success-bg); }
.stage-export-status svg { width: 13px; height: 13px; }
.stage-export-content { flex: 1; min-height: 0; overflow-y: auto; padding: 30px 34px 70px; scrollbar-gutter: stable; }
.stage-export-inner { width: min(100%, 1420px); margin: 0 auto; }
.stage-export-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.stage-export-eyebrow { color: var(--success-text); font: 700 9px var(--font-mono); letter-spacing: .16em; }
.stage-export-heading h1 { margin: 8px 0 7px; color: var(--text-primary); font-size: 25px; font-weight: 720; }
.stage-export-heading p { margin: 0; color: var(--text-tertiary); font-size: 12px; }
.stage-export-heading-meta { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border-primary); border-radius: 8px; color: var(--text-tertiary); background: var(--bg-surface); font: 10px var(--font-mono); white-space: nowrap; }
.stage-export-heading-meta svg { width: 14px; height: 14px; color: var(--success-text); }
.stage-export-workspace .stage-export-inner > div > div:first-child { margin-bottom: 0; }
.stage-export-workspace .stage-export-inner > div > div:first-child > div:first-child { margin-bottom: 22px; }
.stage-export-workspace .stage-export-inner [class*="max-w-6xl"] { max-width: none; }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] { display: flex; flex-direction: column; gap: 18px; }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] > * { margin: 0; }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] > div:first-child { display: flex; flex-direction: column; gap: 18px; }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] > div:first-child > div:first-child { margin: 0; padding: 24px; border: 1px solid var(--border-primary); border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), var(--bg-surface); box-shadow: 0 16px 48px rgba(0,0,0,.16); }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] > div:first-child > div:nth-child(2) { margin: 0; }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] > div:first-child > div:nth-child(2) > div { margin-bottom: 0; padding: 0 2px; }
.stage-export-workspace .stage-export-inner [class*="space-y-8"] > div:first-child > div:nth-child(3) { margin: 0; }
.stage-export-workspace [class*="rounded-xl"] { border-radius: 10px; }
.stage-export-workspace button { min-height: 40px; }
.stage-export-workspace select { min-height: 34px !important; }
.stage-export-workspace .stage-export-inner [class*="grid-cols-1 lg:grid-cols-3"] { gap: 12px; }
.stage-export-workspace .stage-export-inner [class*="grid-cols-1 lg:grid-cols-3"] > div { min-height: 168px; border-color: var(--border-primary); background: var(--bg-surface); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.stage-export-workspace .stage-export-inner [class*="grid-cols-1 md:grid-cols-3"] { gap: 12px; }
.stage-export-workspace .stage-export-inner [class*="grid-cols-1 md:grid-cols-3"] > div { min-height: 132px; border-color: var(--border-primary); background: var(--bg-surface); }
.stage-export-workspace .stage-export-inner [class*="grid-cols-1 md:grid-cols-3"] > div:hover { border-color: var(--border-secondary); transform: translateY(-1px); }
.stage-export-workspace .stage-export-inner [class*="bg-black"] { border-radius: 8px; }
@media (max-width: 1320px) {
  .stage-export-heading h1 { font-size: 22px; }
  .stage-export-heading-meta { display: none; }
}

/* Prompt library: searchable reference material with calm, editable sections. */
.stage-prompts-workspace { position: relative; display: flex; height: 100%; min-width: 1056px; flex-direction: column; overflow: hidden; color: var(--text-secondary); background: radial-gradient(circle at 75% -14%, rgba(226,168,255,.09), transparent 30%), var(--bg-base); }
.stage-prompts-topbar { flex: 0 0 auto; border-bottom: 1px solid var(--border-primary); background: rgba(14,14,17,.92); }
.stage-prompts-toolbar-inner { width: min(100%, 1420px); margin: 0 auto; padding: 26px 34px 20px; }
.stage-prompts-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 21px; }
.stage-prompts-eyebrow { display: block; margin-bottom: 8px; color: #e2a8ff; font: 700 9px var(--font-mono); letter-spacing: .16em; }
.stage-prompts-heading h1 { margin-bottom: 6px !important; font-size: 24px; }
.stage-prompts-heading p { font-size: 11px; }
.stage-prompts-heading > div:last-child { display: flex; align-items: center; gap: 7px; }
.stage-prompts-heading > div:last-child > span { min-height: 30px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 7px; font: 9px var(--font-mono); }
.stage-prompts-category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 8px !important; margin-bottom: 15px; }
.stage-prompts-category-grid button { min-height: 62px; padding: 10px 12px; border-radius: 9px !important; border-color: var(--border-primary) !important; background: var(--bg-surface) !important; }
.stage-prompts-category-grid button:hover { border-color: var(--border-secondary) !important; transform: translateY(-1px); }
.stage-prompts-category-grid button[class*="bg-[var(--accent-bg)]"] { border-color: var(--accent-border) !important; background: var(--accent-bg) !important; }
.stage-prompts-search-row { gap: 8px !important; }
.stage-prompts-search-row > div:first-child { min-height: 38px; }
.stage-prompts-search-row input { min-height: 38px !important; border-radius: 8px !important; background: var(--bg-surface) !important; font-size: 11px !important; }
.stage-prompts-search-row > div:not(:first-child) button { min-height: 32px !important; border-radius: 7px !important; font-size: 9px !important; }
.stage-prompts-content { flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
.stage-prompts-content-inner { width: min(100%, 1420px); margin: 0 auto; padding: 24px 34px 72px !important; }
.stage-prompts-content-inner > section, .stage-prompts-content-inner > div { border-color: var(--border-primary); }
.stage-prompts-content-inner [class*="rounded-xl"] { border-radius: 10px; }
.stage-prompts-content-inner [class*="bg-[var(--bg-elevated)]"] { background: linear-gradient(145deg, rgba(255,255,255,.03), rgba(255,255,255,.01)), var(--bg-surface); }
.stage-prompts-content-inner [class*="bg-[var(--bg-surface)]"] { box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.stage-prompts-content-inner textarea { min-height: 150px !important; border-radius: 8px !important; font-size: 11px !important; line-height: 1.65; }
.stage-prompts-content-inner button { border-radius: 7px !important; }
@media (max-width: 1320px) {
  .stage-prompts-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .stage-prompts-heading h1 { font-size: 22px; }
}

/* Liquid glass surfaces: reserve translucency for navigation and transient controls.
   Content-heavy work areas stay opaque so text, forms, and media remain sharp. */
.brand-sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0) 24%),
    linear-gradient(180deg, rgba(183,167,255,.07), rgba(126,231,233,.025) 68%, rgba(11,11,13,.16)),
    rgba(11,11,13,.58) !important;
  border-right-color: rgba(255,255,255,.19) !important;
  box-shadow:
    inset -1px 0 rgba(255,255,255,.08),
    inset 0 1px rgba(255,255,255,.08),
    14px 0 38px rgba(0,0,0,.3) !important;
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
}
.brand-sidebar > div:first-child,
.brand-sidebar > div:nth-child(2),
.brand-sidebar > div:last-child {
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}
.brand-sidebar > div:first-child { background: rgba(11,11,13,.72) !important; }
.brand-sidebar > div:nth-child(2) { background: rgba(11,11,13,.28) !important; }
.brand-sidebar > div:last-child { background: rgba(11,11,13,.42) !important; }

/* Shared top chrome across project overview and production stages. */
.brand-toolbar,
main .sticky.top-0,
.seko-canvas-workspace-topbar,
.stage-assets-topbar,
.stage-director-topbar,
.stage-export-topbar,
.stage-prompts-topbar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,0) 42%),
    rgba(14,14,17,.68) !important;
  border-color: rgba(255,255,255,.16) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 10px 28px rgba(0,0,0,.16);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
  backdrop-filter: blur(22px) saturate(135%);
}

/* Drawers and inspectors use a stronger glass layer because they float over work. */
.seko-asset-drawer,
.stage-asset-drawer,
.seko-script-config-drawer,
.stage-director-inspector,
.seko-canvas-workspace-inspector {
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,0) 34%),
    rgba(17,17,21,.68) !important;
  border-left-color: rgba(255,255,255,.2) !important;
  box-shadow: inset 1px 0 rgba(255,255,255,.07), -26px 0 72px rgba(0,0,0,.48) !important;
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
}
.seko-asset-drawer-head,
.stage-asset-drawer-head,
.seko-script-config-drawer > header,
.stage-director-inspector > div:first-child {
  background: rgba(255,255,255,.035) !important;
  border-bottom-color: rgba(255,255,255,.13) !important;
}

/* Modal shells get the same surface treatment; backdrops remain dark and calm. */
main [class*="fixed"][class*="inset-0"],
#root [class*="fixed"][class*="inset-0"] {
  background: rgba(0,0,0,.62);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
  backdrop-filter: blur(8px) saturate(115%);
}
.seko-assets-modal,
.model-config-dialog,
#root [role="dialog"] {
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,0) 30%),
    rgba(17,17,21,.78) !important;
  border-color: rgba(255,255,255,.2) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 30px 90px rgba(0,0,0,.62) !important;
  -webkit-backdrop-filter: blur(26px) saturate(135%);
  backdrop-filter: blur(26px) saturate(135%);
}

.glass-panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,0) 38%),
    rgba(24,24,27,.68);
  border-color: rgba(255,255,255,.16);
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 14px 36px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  backdrop-filter: blur(20px) saturate(130%);
}
