@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #141210;
  --bg-elev: #1c1916;
  --panel: #221e1a;
  --panel-solid: #221e1a;
  --panel2: #2d2721;
  --border: rgba(235, 225, 213, 0.12);
  --border-strong: rgba(238, 139, 74, 0.48);
  --line: rgba(235, 225, 213, 0.11);
  --line-strong: rgba(238, 139, 74, 0.42);
  --text: #f6f0e9;
  --text-sub: #e4d9cd;
  --muted: #a99d91;
  --accent: #f08b4a;
  --accent-rgb: 240, 139, 74;
  --accent-soft: rgba(240, 139, 74, 0.12);
  --accent-border: rgba(240, 139, 74, 0.34);
  --primary: #df7138;
  --primary-hover: #ee8549;
  --primary-fg: #ffffff;
  --secondary: #f3c28f;
  --green: #77c69a;
  --danger: #f08e8e;
  --code: #100e0c;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  --sidebar-w: 208px;
  --notice-h: 36px;
}

:root[data-palette="ocean"] {
  --bg: #10161c;
  --bg-elev: #151e27;
  --panel: #19232d;
  --panel-solid: #19232d;
  --panel2: #22313f;
  --border: rgba(207, 226, 242, 0.12);
  --line: rgba(207, 226, 242, 0.11);
  --text: #f0f6fb;
  --text-sub: #d9e6f0;
  --muted: #96a9b9;
  --accent: #62aaff;
  --accent-rgb: 98, 170, 255;
  --accent-soft: rgba(98, 170, 255, 0.12);
  --accent-border: rgba(98, 170, 255, 0.36);
  --border-strong: rgba(98, 170, 255, 0.5);
  --line-strong: rgba(98, 170, 255, 0.42);
  --primary: #347fce;
  --primary-hover: #4a94e2;
  --secondary: #8bd3f2;
  --green: #70cfaf;
  --danger: #f28e9b;
  --code: #0b1117;
}

:root[data-palette="forest"] {
  --bg: #111713;
  --bg-elev: #172019;
  --panel: #1c2820;
  --panel-solid: #1c2820;
  --panel2: #26362b;
  --border: rgba(218, 237, 222, 0.12);
  --line: rgba(218, 237, 222, 0.11);
  --text: #f0f6f0;
  --text-sub: #dbe9dd;
  --muted: #9aafa0;
  --accent: #71c99a;
  --accent-rgb: 113, 201, 154;
  --accent-soft: rgba(113, 201, 154, 0.12);
  --accent-border: rgba(113, 201, 154, 0.36);
  --border-strong: rgba(113, 201, 154, 0.5);
  --line-strong: rgba(113, 201, 154, 0.42);
  --primary: #36966a;
  --primary-hover: #49ac7c;
  --secondary: #b3d99c;
  --green: #71c99a;
  --danger: #ec9696;
  --code: #0b110d;
}

:root[data-palette="rose"] {
  --bg: #1a1215;
  --bg-elev: #24191e;
  --panel: #2d1f25;
  --panel-solid: #2d1f25;
  --panel2: #3b2830;
  --border: rgba(242, 221, 229, 0.12);
  --line: rgba(242, 221, 229, 0.11);
  --text: #faf1f4;
  --text-sub: #efdee4;
  --muted: #b69da7;
  --accent: #ed91aa;
  --accent-rgb: 237, 145, 170;
  --accent-soft: rgba(237, 145, 170, 0.12);
  --accent-border: rgba(237, 145, 170, 0.36);
  --border-strong: rgba(237, 145, 170, 0.5);
  --line-strong: rgba(237, 145, 170, 0.42);
  --primary: #c9587a;
  --primary-hover: #db6d8e;
  --secondary: #efb08e;
  --green: #83c6a4;
  --danger: #f28e9b;
  --code: #130c0f;
}

:root[data-palette="slate"] {
  --bg: #151719;
  --bg-elev: #1d2023;
  --panel: #24282c;
  --panel-solid: #24282c;
  --panel2: #30363b;
  --border: rgba(226, 232, 238, 0.12);
  --line: rgba(226, 232, 238, 0.11);
  --text: #f2f5f7;
  --text-sub: #e0e6eb;
  --muted: #a2adb6;
  --accent: #b3bec9;
  --accent-rgb: 179, 190, 201;
  --accent-soft: rgba(179, 190, 201, 0.12);
  --accent-border: rgba(179, 190, 201, 0.36);
  --border-strong: rgba(179, 190, 201, 0.5);
  --line-strong: rgba(179, 190, 201, 0.42);
  --primary: #697681;
  --primary-hover: #7d8993;
  --secondary: #d2dbe2;
  --green: #7fc6a2;
  --danger: #ed969c;
  --code: #0f1113;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #faf7f2;
  --bg-elev: #f3ede5;
  --panel: #fffdfa;
  --panel-solid: #fffdfa;
  --panel2: #ede4da;
  --border: rgba(74, 58, 43, 0.14);
  --border-strong: rgba(190, 91, 42, 0.42);
  --line: rgba(74, 58, 43, 0.12);
  --line-strong: rgba(190, 91, 42, 0.36);
  --text: #2c241e;
  --text-sub: #4b3e34;
  --muted: #7e7065;
  --accent: #c65f2e;
  --accent-rgb: 198, 95, 46;
  --accent-soft: rgba(198, 95, 46, 0.09);
  --accent-border: rgba(198, 95, 46, 0.28);
  --primary: #c65f2e;
  --primary-hover: #ad4e22;
  --primary-fg: #ffffff;
  --secondary: #9a642f;
  --green: #27825a;
  --danger: #c74848;
  --code: #f3ede5;
  --shadow: 0 14px 36px rgba(69, 48, 30, 0.07);
}

:root[data-theme="light"][data-palette="ocean"] {
  --bg: #f2f7fb;
  --bg-elev: #e9f1f7;
  --panel: #fcfefe;
  --panel2: #e1ecf4;
  --text: #1e2d3a;
  --text-sub: #334c60;
  --muted: #687f90;
  --accent: #2276bd;
  --accent-rgb: 34, 118, 189;
  --accent-soft: rgba(34, 118, 189, 0.09);
  --accent-border: rgba(34, 118, 189, 0.28);
  --border-strong: rgba(34, 118, 189, 0.42);
  --line-strong: rgba(34, 118, 189, 0.36);
  --primary: #2276bd;
  --primary-hover: #1964a1;
  --secondary: #197a94;
  --green: #24825f;
  --danger: #c7485c;
  --code: #e9f1f7;
}

:root[data-theme="light"][data-palette="forest"] {
  --bg: #f2f7f2;
  --bg-elev: #e9f1e9;
  --panel: #fcfefb;
  --panel2: #e0ece1;
  --text: #203027;
  --text-sub: #365040;
  --muted: #6d8272;
  --accent: #2c8558;
  --accent-rgb: 44, 133, 88;
  --accent-soft: rgba(44, 133, 88, 0.09);
  --accent-border: rgba(44, 133, 88, 0.28);
  --border-strong: rgba(44, 133, 88, 0.42);
  --line-strong: rgba(44, 133, 88, 0.36);
  --primary: #2c8558;
  --primary-hover: #226e48;
  --secondary: #71813c;
  --green: #2c8558;
  --danger: #bf4b4b;
  --code: #e9f1e9;
}

:root[data-theme="light"][data-palette="rose"] {
  --bg: #fbf4f6;
  --bg-elev: #f6e9ed;
  --panel: #fffdfd;
  --panel2: #f0e0e6;
  --text: #38242b;
  --text-sub: #593b47;
  --muted: #907481;
  --accent: #bb4f73;
  --accent-rgb: 187, 79, 115;
  --accent-soft: rgba(187, 79, 115, 0.09);
  --accent-border: rgba(187, 79, 115, 0.28);
  --border-strong: rgba(187, 79, 115, 0.42);
  --line-strong: rgba(187, 79, 115, 0.36);
  --primary: #bb4f73;
  --primary-hover: #a33f60;
  --secondary: #a5663e;
  --green: #2f805c;
  --danger: #bf4b4b;
  --code: #f6e9ed;
}

:root[data-theme="light"][data-palette="slate"] {
  --bg: #f4f6f7;
  --bg-elev: #ebeff1;
  --panel: #fdfefe;
  --panel2: #e2e8eb;
  --text: #252d33;
  --text-sub: #3e4b54;
  --muted: #6f7d86;
  --accent: #536571;
  --accent-rgb: 83, 101, 113;
  --accent-soft: rgba(83, 101, 113, 0.09);
  --accent-border: rgba(83, 101, 113, 0.28);
  --border-strong: rgba(83, 101, 113, 0.42);
  --line-strong: rgba(83, 101, 113, 0.36);
  --primary: #536571;
  --primary-hover: #405461;
  --secondary: #687b86;
  --green: #287b59;
  --danger: #bf4b4b;
  --code: #ebeff1;
}

html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 88% -10%, rgba(var(--accent-rgb), 0.1), transparent 32%),
    radial-gradient(circle at 5% 0%, rgba(var(--accent-rgb), 0.04), transparent 24%);
  background-attachment: fixed;
}

button, .button { border-radius: 10px; }
.primary, .primary:hover:enabled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(var(--accent-rgb), 0.16);
}
.primary:hover:enabled { background: var(--primary-hover); border-color: var(--primary-hover); }
.quiet:hover:enabled { border-color: var(--border-strong); }

#sidebar {
  background: var(--bg-elev);
  border-right-color: var(--border);
}
.brand-icon {
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--primary-fg);
  box-shadow: 0 7px 18px rgba(var(--accent-rgb), 0.18);
}
#navigation a.active { background: var(--accent-soft); color: var(--accent); }
#navigation a.active::after { background: var(--secondary); }
.online-dot { background: var(--green); }

.studio-header {
  position: sticky;
  top: var(--notice-h);
  z-index: 30;
  height: 62px;
  padding: 0 28px;
  justify-content: space-between;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}
.workspace-label { display: flex; align-items: baseline; gap: 9px; min-width: 150px; }
.workspace-label span { font-size: 11px; color: var(--muted); }
.workspace-label strong { font-size: 13px; font-weight: 600; color: var(--text-sub); }
.primary-navigation {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
}
.primary-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: none;
}
.primary-navigation a svg { width: 13px; height: 13px; }
.primary-navigation a:hover, .primary-navigation a.active { background: var(--accent-soft); color: var(--accent); }
.header-right { gap: 8px; }
.credit-pill, .user-pill { background: var(--panel); }
.credit-pill { color: var(--accent); font-variant-numeric: tabular-nums; }
#theme-toggle, #drawer-theme-toggle { color: var(--muted); }
#theme-toggle:hover, #drawer-theme-toggle:hover { color: var(--accent); border-color: var(--accent-border); }

.theme-picker { position: relative; }
.palette-toggle { position: relative; }
.palette-toggle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--panel);
  border-radius: 50%;
  background: var(--accent);
}
.palette-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: 286px;
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}
.palette-menu-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.palette-menu-heading strong { font-size: 13px; color: var(--text); }
.palette-menu-heading span { font-size: 10px; color: var(--muted); }
.palette-options { display: grid; gap: 6px; }
.palette-option {
  display: grid;
  grid-template-columns: 30px 1fr 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}
.palette-option:hover { background: var(--panel2); border-color: var(--border); }
.palette-option.active, .palette-option[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-border); }
.palette-option > span:nth-child(2) { display: grid; gap: 1px; }
.palette-option strong { font-size: 12px; font-weight: 600; color: var(--text); }
.palette-option small { font-size: 10px; color: var(--muted); }
.palette-swatch { width: 28px; height: 28px; border: 3px solid var(--panel2); border-radius: 9px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.swatch-ember { background: linear-gradient(135deg, #141210 50%, #f08b4a 50%); }
.swatch-ocean { background: linear-gradient(135deg, #10161c 50%, #62aaff 50%); }
.swatch-forest { background: linear-gradient(135deg, #111713 50%, #71c99a 50%); }
.swatch-rose { background: linear-gradient(135deg, #1a1215 50%, #ed91aa 50%); }
.swatch-slate { background: linear-gradient(135deg, #151719 50%, #b3bec9 50%); }
.palette-check { color: var(--accent); font-size: 13px; opacity: 0; }
.palette-option.active .palette-check, .palette-option[aria-pressed="true"] .palette-check { opacity: 1; }
.palette-note { margin: 11px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

main { max-width: 1280px; padding: 0 30px 30px; }
.card { border-radius: 16px; }
.page-title { margin: 24px 0; }
.page-title h1 { font-size: 27px; }
.video-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto;
}
.studio-intro { grid-column: 1; grid-row: 1; padding: 24px 0 20px; }
.studio-intro::before { top: 28px; bottom: 24px; }
.studio-eyebrow { color: var(--accent); letter-spacing: 1.4px; }
.studio-intro h1 { font-size: 32px; line-height: 1.25; margin: 7px 0 8px; }
.studio-intro p { font-size: 13px; }
.mode-pills {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  width: fit-content;
  margin: 0 0 24px;
  padding: 4px;
  gap: 3px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.mode-pill { min-height: 32px; padding: 5px 12px; font-size: 11.5px; border-radius: 999px; }
.mode-pill.active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }

.composer {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.composer:focus-within { border-color: var(--accent-border); box-shadow: var(--shadow), 0 0 0 3px var(--accent-soft); }
#generation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  grid-template-areas:
    "heading heading"
    "prompt settings"
    "selected settings"
    "feedback settings"
    "upload settings"
    "attach settings"
    "links settings"
    "resume settings"
    "submit submit";
  gap: 11px 20px;
  align-items: start;
}
.composer-heading { grid-area: heading; margin: 1px 0 0; }
.composer-heading label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-sub); font-size: 12px; font-weight: 600; }
.composer-step {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 9px/1 ui-monospace, Consolas, monospace;
}
.composer textarea#prompt {
  grid-area: prompt;
  height: 174px;
  min-height: 140px;
  padding: 15px 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.8;
  resize: vertical;
}
.composer textarea#prompt:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#selected-assets { grid-area: selected; margin-top: 0; }
#reference-feedback { grid-area: feedback; margin: 0; }
#composer-upload-list { grid-area: upload; margin: 0; }
.attachment-row { grid-area: attach; padding: 2px 0 0; gap: 6px; }
#reference-details { grid-area: links; margin: 0; }
#resume-order { grid-area: resume; margin: 0; }
.creation-settings {
  grid-area: settings;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  align-self: start;
  padding: 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.creation-settings.has-inline-deck { grid-template-columns: minmax(0, 1fr); gap: 13px; }
.settings-heading { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.settings-heading > div { display: grid; gap: 2px; }
.settings-heading strong { color: var(--text); font-size: 12px; font-weight: 650; }
.settings-heading span:not(.md-step) { color: var(--muted); font-size: 9.5px; }
.creation-settings.has-inline-deck .duration-field { grid-column: auto; }
.creation-settings select, .creation-settings .seconds-input input { background: var(--panel); }
.composer .submit-bar {
  grid-area: submit;
  margin-top: 2px;
  padding: 13px 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 13px;
}
.generate-cta { border-radius: 10px; min-width: 146px; }

.model-deck {
  grid-area: auto;
  align-self: auto;
  margin: 0 0 17px;
  padding: 15px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.md-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.md-header-title { display: flex; align-items: center; gap: 10px; }
.md-header-title > div { display: grid; gap: 2px; }
.md-header-title strong { color: var(--text); font-size: 13px; font-weight: 650; }
.md-header-title span:not(.md-step) { color: var(--muted); font-size: 10.5px; }
.md-step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 10px/1 ui-monospace, Consolas, monospace;
}
.md-current { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.md-current strong { max-width: 170px; overflow: hidden; color: var(--text-sub); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.md-refresh-btn { width: 24px; height: 24px; min-height: 24px; margin-left: 2px; }
.md-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 2px 2px 7px; scrollbar-width: thin; }
.md-tab {
  flex: none;
  min-height: 29px;
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.md-tab:hover { background: var(--panel2); color: var(--text); }
.md-tab.active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); font-weight: 600; }
.md-series-note { display: flex; justify-content: space-between; gap: 10px; margin: 2px 2px 8px; color: var(--muted); font-size: 9.5px; }
.md-series-note a { flex: none; color: var(--accent); text-decoration: none; }
.md-series-note a:hover { text-decoration: underline; }
.md-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.md-card {
  min-height: 78px;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--panel);
}
.md-card:hover { background: var(--panel2); border-color: var(--border-strong); }
.md-card.active, .md-card.md-card-featured.active {
  border: 2px solid var(--accent);
  padding: 10px 11px;
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.08);
}
.md-card.md-card-featured:not(.active) { border: 1px solid var(--border); background: var(--panel); box-shadow: none; }
.md-card.md-card-featured { min-height: 78px; padding: 11px 12px; }
.md-card.md-card-featured .md-card-name { font-size: 11.5px; }
.md-card-title { gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.md-card-name { min-width: 0; flex: 1; font-size: 11.5px; }
.md-card-tag { padding: 0 5px; font-size: 8.5px; line-height: 15px; }
.md-card.active .md-card-tag { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.md-card-meta { align-items: center; flex-direction: row; gap: 8px; }
.md-card-spec { font-size: 9.5px; }
.md-card-state { flex: none; padding: 1px 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 8.5px; }
.md-card.active .md-card-state { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent); }
.md-row-featured .md-family { background: transparent; border: 0; }
.md-row-featured .md-family strong { color: var(--text-sub); }
.md-card-hot-badge, .md-card-refs { display: none; }

.inspiration-strip { grid-column: 1 / -1; align-items: flex-start; margin-top: 16px; }
.prompt-ideas { justify-content: flex-start; }
.idea-chip { background: var(--panel); border-radius: 8px; }
.generation-help { text-align: left; }
.showcase-section { grid-column: 1 / -1; margin-top: 30px; }
.showcase-grid { gap: 16px; }
.showcase-card { border-radius: 15px; }
.showcase-cover { height: 134px; }
.cov-1 { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 32%, var(--bg)), var(--bg) 76%); }
.cov-2 { background: linear-gradient(135deg, color-mix(in srgb, var(--secondary) 24%, var(--bg)), var(--bg) 76%); }
.cov-3 { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--bg)), var(--bg) 76%); }
:root[data-theme="light"] .cov-1 { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, white), var(--bg-elev)); }
:root[data-theme="light"] .cov-2 { background: linear-gradient(135deg, color-mix(in srgb, var(--secondary) 13%, white), var(--bg-elev)); }
:root[data-theme="light"] .cov-3 { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, white), var(--bg-elev)); }
.cover-badge { background: color-mix(in srgb, var(--bg) 78%, transparent); border-color: var(--accent-border); color: var(--accent); }
:root[data-theme="light"] .cover-badge { background: rgba(255, 255, 255, 0.88); color: var(--accent); }
.geo-lens { border-radius: 14px; border-color: var(--accent); box-shadow: 12px 12px 0 rgba(var(--accent-rgb), 0.07); }
.geo-frames span { border-color: var(--accent-border); background: var(--accent-soft); }
.geo-frames span:nth-child(2) { border-color: var(--secondary); }
.art-code, .art-label { color: var(--text-sub); }
.recent { grid-column: 1 / -1; margin-top: 30px; padding: 20px; border-radius: 16px; }
.task-card { background: var(--bg-elev); }

.typetale-guide-card { top: calc(var(--notice-h) + 76px); }
.model-explorer.is-featured-explorer { border-color: var(--border-strong); box-shadow: 0 8px 26px rgba(var(--accent-rgb), 0.08); }
.api-guard-portal-card.has-increase { border-color: var(--border-strong); background: var(--accent-soft); }
.portrait-badge { background: var(--accent-soft); color: var(--accent); }

header:not(.studio-header) { background: color-mix(in srgb, var(--bg) 92%, transparent); }
.docs-page .brand::before {
  content: "云";
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  vertical-align: middle;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.16);
}
nav a span { color: var(--muted); }
p code, li code, td code { color: var(--accent); background: var(--accent-soft); }
pre code { color: var(--text-sub); }
.notice { color: var(--text-sub); }
.model-card { border-radius: 14px; }
.model-card:hover { border-color: var(--border-strong); }
.model-badge { color: var(--accent); }
.base-url button, .base-url button:hover { background: var(--primary); border-color: var(--primary); }
.download-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.language-switch button[aria-pressed="true"] { color: var(--accent); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b958a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }

@media (max-width: 1180px) {
  .primary-navigation { display: none; }
  main { padding-inline: 24px; }
  #generation { grid-template-columns: minmax(0, 1fr) 270px; gap: 11px 16px; }
  .composer { padding: 16px; }
  .md-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-intro h1 { font-size: 29px; }
}

@media (max-width: 980px) {
  .video-columns { grid-template-columns: minmax(0, 1fr); }
  .studio-intro { grid-column: 1; grid-row: 1; }
  .mode-pills { grid-column: 1; grid-row: 2; justify-self: start; margin: 0 0 16px; }
  .composer { grid-column: 1; grid-row: 3; }
  .inspiration-strip { grid-row: 4; }
  .showcase-section { grid-row: 5; }
  .recent { grid-row: 6; }
  #generation {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "prompt"
      "selected"
      "feedback"
      "upload"
      "attach"
      "settings"
      "links"
      "resume"
      "submit";
  }
  .creation-settings, .creation-settings.has-inline-deck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creation-settings.has-inline-deck .duration-field { grid-column: 1 / -1; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-card { display: grid; grid-template-columns: 210px 1fr; }
  .showcase-cover { height: 100%; min-height: 132px; border-bottom: 0; border-right: 1px solid var(--border); }
}

@media (max-width: 700px) {
  .workspace-label { display: none; }
  .studio-header { height: 58px; padding: 0 13px; }
  .header-right { gap: 6px; }
  .user-pill { max-width: 100px; padding-inline: 10px; }
  .credit-pill { padding-inline: 10px; }
  .palette-menu { position: fixed; top: 66px; right: 12px; width: min(286px, calc(100vw - 24px)); }
  main { padding-inline: 14px; }
  .studio-intro { padding: 20px 0 15px 13px; }
  .studio-intro::before { top: 22px; bottom: 19px; }
  .studio-intro h1 { font-size: 26px; }
  .studio-intro p { font-size: 11.5px; line-height: 1.7; }
  .mode-pills { width: 100%; overflow-x: auto; padding: 4px; }
  .mode-pill { flex: none; font-size: 11px; padding-inline: 11px; }
  .composer { padding: 13px; border-radius: 15px; }
  #generation { gap: 10px; }
  .composer textarea#prompt { height: 150px; min-height: 128px; padding: 12px; font-size: 13.5px; }
  .composer-heading-right .dot-sep, #draft-status { display: none; }
  .attachment-row { gap: 5px; }
  .attachment-row #to-canvas { margin-left: 0; }
  .model-deck { padding: 12px; }
  .md-header { align-items: flex-start; }
  .md-header-title > div > span { display: none; }
  .md-current > span { display: none; }
  .md-current strong { max-width: 110px; font-size: 10px; }
  .md-series-note span:last-child { display: none; }
  .md-cards { grid-template-columns: 1fr; }
  .md-card { min-height: 72px; }
  .creation-settings, .creation-settings.has-inline-deck { grid-template-columns: 1fr 1fr; gap: 11px; padding: 13px; }
  .creation-settings.has-inline-deck .duration-field { grid-column: 1 / -1; }
  .composer .submit-bar { align-items: stretch; flex-direction: column; padding: 13px; }
  .submit-right { justify-content: space-between; }
  .generate-cta { flex: 1; }
  .inspiration-strip { margin-top: 14px; }
  .showcase-card { display: flex; }
  .showcase-cover { min-height: 122px; height: 122px; border-right: 0; border-bottom: 1px solid var(--border); }
  .recent { padding: 15px; }
  footer { flex-direction: column; }
  .footer-meta { justify-items: start; text-align: left; }
}

@media (max-width: 420px) {
  .user-pill { display: none; }
  .md-current strong { max-width: 92px; }
  .creation-settings, .creation-settings.has-inline-deck { grid-template-columns: 1fr; }
  .creation-settings.has-inline-deck .duration-field { grid-column: auto; }
  .attachment-row .pill-tool, .spec-popover > summary.pill-tool { padding-inline: 9px; font-size: 11px; }
}

.model-gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.model-gallery-filters button { min-height: 34px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 12px; }
.model-gallery-filters button:hover { border-color: var(--border-strong); color: var(--text); }
.model-gallery-filters button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.model-explorer.selected { border-color: var(--accent); }
.model-explorer-tag { display: inline-block; margin-top: 4px; padding: 2px 7px; border: 1px solid var(--accent-border); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; }
.model-explorer-description { display: -webkit-box; min-height: 4.8em; margin: 13px 0; overflow: hidden; color: var(--text-sub); font-size: 12px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.model-explorer-highlights { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.model-explorer-highlights span { padding: 4px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--panel2); color: var(--muted); font-size: 10px; }
.model-explorer .hint { min-height: 0; margin: 5px 0; }
.model-explorer-rule { line-height: 1.6; }
.model-explorer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.model-explorer-actions button { width: 100%; min-height: 40px; }
.model-detail-dialog { width: min(980px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 24px; overflow-y: auto; background: var(--bg-elev); color: var(--text); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65); }
.model-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.model-detail-head > div { min-width: 0; }
.model-detail-head #model-detail-family { color: var(--accent); font-size: 11px; }
.model-detail-head h2 { margin: 7px 0 0; font-size: 24px; overflow-wrap: anywhere; }
.model-detail-head p { display: inline-block; margin: 8px 0 0; padding: 3px 9px; border: 1px solid var(--accent-border); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.model-detail-head p[hidden] { display: none; }
.model-detail-section { margin-top: 22px; }
.model-detail-section h3 { margin: 0 0 10px; font-size: 15px; }
.model-detail-section p { margin: 0; color: var(--text-sub); font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.model-detail-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.model-detail-highlights li { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel2); color: var(--muted); font-size: 11px; }
.model-detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.model-detail-facts > div { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
.model-detail-facts span { color: var(--muted); font-size: 10px; }
.model-detail-facts strong { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.model-detail-billing { padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); }
.model-detail-billing small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.model-compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.model-compare-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 11px; }
.model-compare-table th, .model-compare-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.6; }
.model-compare-table th { background: var(--panel2); color: var(--muted); font-weight: 500; }
.model-compare-table tr:last-child td { border-bottom: 0; }
.model-compare-table tr.current td { background: var(--accent-soft); }
.model-detail-section > .primary { width: 100%; margin-top: 15px; }
@media (max-width: 640px) {
  .model-detail-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 18px; }
  .model-detail-head h2 { font-size: 20px; }
  .model-detail-facts { grid-template-columns: 1fr; }
  .model-explorer-actions { grid-template-columns: 1fr; }
}

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

/* 光屿Lumen brand */
.brand-icon { padding: 0; overflow: hidden; background: #fff; }
.brand-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* 光屿深海：贴合 Logo 的深海蓝 / 青绿 / 灯塔橙 */
:root[data-palette="lumen"] {
  color-scheme: dark;
  --bg: #06131f;
  --bg-elev: #0a1d2e;
  --panel: #0c2337;
  --panel-solid: #0c2337;
  --panel2: #123049;
  --border: rgba(190, 225, 235, 0.12);
  --line: rgba(190, 225, 235, 0.10);
  --text: #eaf5f8;
  --text-sub: #cfe3ea;
  --muted: #8fa9b8;
  --accent: #2dd4bf;
  --accent-rgb: 45, 212, 191;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-border: rgba(45, 212, 191, 0.36);
  --border-strong: rgba(45, 212, 191, 0.50);
  --line-strong: rgba(45, 212, 191, 0.42);
  --primary: #0e8c8c;
  --primary-hover: #12a6a0;
  --primary-fg: #ffffff;
  --secondary: #f59e0b;
  --green: #4ade80;
  --danger: #f87171;
  --code: #05101a;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

:root[data-palette="lumen"] body {
  background-color: var(--bg);
  background-image:
    url("../assets/bg-waves.svg?v=20261205-3"),
    radial-gradient(circle at 95% -4%, rgba(245, 158, 11, 0.08), transparent 30%),
    radial-gradient(circle at 84% -8%, rgba(45, 212, 191, 0.15), transparent 38%),
    radial-gradient(circle at 6% 4%, rgba(45, 212, 191, 0.05), transparent 30%),
    radial-gradient(rgba(126, 231, 219, 0.05) 1px, transparent 1px);
  background-size: 100% 340px, 100% 100%, 100% 100%, 100% 100%, 26px 26px;
  background-position: bottom center, 95% -4%, 84% -8%, 6% 4%, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-attachment: fixed;
}

:root[data-theme="light"][data-palette="lumen"] {
  color-scheme: light;
  --bg: #f2f7f8;
  --bg-elev: #ffffff;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel2: #e4eff1;
  --border: rgba(11, 37, 58, 0.12);
  --line: rgba(11, 37, 58, 0.10);
  --text: #0b1f2e;
  --text-sub: #29424f;
  --muted: #5c7684;
  --accent: #0e8c8c;
  --accent-rgb: 14, 140, 140;
  --accent-soft: rgba(14, 140, 140, 0.10);
  --accent-border: rgba(14, 140, 140, 0.30);
  --border-strong: rgba(14, 140, 140, 0.45);
  --line-strong: rgba(14, 140, 140, 0.38);
  --primary: #0e8c8c;
  --primary-hover: #0b7a7a;
  --primary-fg: #ffffff;
  --secondary: #d97706;
  --green: #15803d;
  --danger: #dc2626;
  --code: #eef5f6;
}

:root[data-theme="light"][data-palette="lumen"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 88% -8%, rgba(14, 140, 140, 0.08), transparent 36%),
    radial-gradient(circle at 6% 4%, rgba(217, 119, 6, 0.05), transparent 28%),
    radial-gradient(rgba(11, 37, 58, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 26px 26px;
  background-position: 88% -8%, 6% 4%, 0 0;
  background-repeat: no-repeat, no-repeat, repeat;
  background-attachment: fixed;
}
