@import url('./assets/fonts.css');
:root {
  color-scheme: dark;
  --bg: #111114;
  --sidebar: #151518;
  --surface: #1a1a1f;
  --surface-raised: #222228;
  --line: #303036;
  --text: #f3f2f6;
  --muted: #aaa8b4;
  --purple: #b5a0ff;
  --purple-hover: #c7b7ff;
  --purple-ink: #201538;
  --purple-subtle: #2b243d;
  --error: #ffa9a7;
  --font: 'Manrope', sans-serif;
  --display: 'Space Grotesk', sans-serif;
  --radius: 14px;
  --ease: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, input, select { color: inherit; }
button { border: 0; background: none; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .42; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--purple); outline-offset: 4px; }
::selection { color: var(--purple-ink); background: var(--purple); }
input { caret-color: var(--purple); }
input::placeholder { color: var(--muted); opacity: .8; }
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-thumb { background: #45414e; border-radius: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
.icon svg { width: 100%; height: 100%; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 18px; background: var(--purple); color: var(--purple-ink); border-radius: 6px; }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: 214px; background: var(--sidebar); border-right: 1px solid #27272c; padding: 31px 17px 20px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 9px; margin: 0 15px 45px; width: fit-content; }
.brand > span { font: 600 39px/1 var(--display); letter-spacing: -.035em; }
.brand-period { color: var(--purple); }
.workspace-label { color: #898691; font-size: 11px; margin: 0 16px 14px; }
#main-nav { display: flex; flex-direction: column; gap: 7px; }
#main-nav a { padding: 12px 14px; display: flex; align-items: center; gap: 12px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; transition: background .2s, color .2s; }
#main-nav a:hover { color: var(--text); background: #202025; }
#main-nav a.active { color: #c6b5ff; background: #2a243a; }
.nav-dot { width: 5px; height: 5px; border-radius: 100%; background: var(--purple); margin-left: auto; display: none; }
.active .nav-dot { display: inline-block; }
.nav-count { margin-left: auto; color: #aba6bc; font-size: 11px; background: #28272d; padding: 0 5px; border-radius: 4px; }
.sidebar-bottom { margin-top: auto; }
.studio-note { display: flex; align-items: center; gap: 8px; margin: 20px 14px; font-size: 11px; color: #9b97a5; }
.status-dot { width: 5px; height: 5px; background: var(--purple); border-radius: 50%; }
.help-link { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; padding: 12px 13px; margin-bottom: 14px; }
.help-link .icon:last-child { margin-left: auto; width: 14px; }
.profile { display: flex; align-items: center; width: 100%; border-top: 1px solid var(--line); padding: 19px 6px 0; gap: 10px; text-align: left; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #34294c; color: #d4c5ff; font-size: 12px; font-weight: 700; }
.profile > span:nth-child(2) { font-size: 11px; font-weight: 600; }
.profile small { display: block; color: #8e899c; font-size: 11px; font-weight: 400; }
.profile > .icon { margin-left: auto; color: #8e899c; width: 15px; height: 15px; }
.app-shell { margin-left: 214px; }
.topbar { height: 75px; border-bottom: 1px solid #242429; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.breadcrumb { display: flex; align-items: center; gap: 13px; font-size: 11px; color: var(--muted); }
.breadcrumb .icon { width: 12px; height: 12px; flex-basis: 12px; }
.breadcrumb span:last-child { color: #d9d6e2; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.demo-badge { font-size: 11px; padding: 4px 9px; border: 1px solid #383142; border-radius: 5px; color: #bdb0d3; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; border-radius: 8px; min-height: 42px; padding: 10px 17px; font-size: 11px; font-weight: 700; line-height: 1.3; transition: background .2s, color .2s; white-space: nowrap; }
.button-primary { background: var(--purple); color: var(--purple-ink); }
.button-primary:hover:not(:disabled) { background: var(--purple-hover); }
.button-secondary { background: #27262e; color: #d4cddd; }
.button-secondary:hover:not(:disabled) { background: #36333f; }
.button-quiet { color: var(--muted); padding: 8px 10px; }
.button-quiet:hover { color: var(--text); background: #212126; }
.button-mini { font-size: 11px; color: #cbbaf6; background: var(--purple-subtle); min-height: 30px; padding: 7px 10px; }
.button-mini .icon { width: 13px; height: 13px; flex-basis: 13px; }
.icon-right { flex-direction: row-reverse; }
.full-width { width: 100%; }
.round-button { width: 32px; height: 32px; border-radius: 7px; display: inline-grid; place-items: center; color: var(--muted); background: #29272f; flex-shrink: 0; }
.round-button:hover { color: var(--purple); background: #363040; }
.round-button .icon { width: 16px; height: 16px; }
main { max-width: 1440px; margin: 0 auto; padding: 35px 36px 28px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
h1 { font: 500 clamp(27px,2.45vw,38px)/1.2 var(--display); letter-spacing: -.035em; }
.page-heading p { font-size: 12px; color: var(--muted); margin-top: 9px; }
.heading-note { color: #8a8496; font-size: 11px; line-height: 1.9; padding-right: 4px; }
.heading-note strong { color: #c8bdde; font-weight: 500; }
.stepper { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 9px; padding: 0 18px 17px 0; color: #99949f; font-size: 11px; font-weight: 600; position: relative; }
.step + .step { padding-left: 25px; }
.step.current { color: #d5c8fd; }
.step.current::after { position: absolute; content: ''; height: 2px; background: var(--purple); bottom: -1px; left: 0; right: 28px; }
.step-number { border: 1px solid #45414e; border-radius: 50%; height: 23px; width: 23px; display: grid; place-items: center; font-size: 11px; }
.current .step-number { color: var(--purple-ink); background: var(--purple); border-color: var(--purple); }
.complete .step-number { color: var(--purple); border-color: #6a577d; }
.step-number .icon { width: 12px; height: 12px; }
.step-chevron { margin-left: 27px; width: 12px; height: 12px; color: #5f5a69; }
.editor { display: grid; grid-template-columns: minmax(340px,.95fr) minmax(300px,1.05fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.configuration { display: flex; flex-direction: column; padding: 25px 26px 17px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 24px; }
h2 { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.tabs { display: flex; gap: 23px; border-bottom: 1px solid #363239; }
.tabs button { padding: 0 0 12px; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: #d1bfff; border-bottom-color: var(--purple); }
.config-fields { padding-top: 23px; flex: 1; min-height: 350px; }
.field { display: block; margin: 0 0 18px; padding: 0; border: 0; font-size: 11px; color: #c8c3d1; font-weight: 600; }
.field legend { padding: 0; display: flex; justify-content: space-between; width: 100%; margin-bottom: 8px; }
.selected-value { font-weight: 400; color: #a39aa9; }
.field input, .field select { display: block; margin-top: 8px; width: 100%; height: 38px; border: 1px solid #3a363f; border-radius: 6px; background: #232227; padding: 8px 12px; font-size: 11px; font-weight: 500; }
.field input:hover, .field select:hover { border-color: #625471; }
.segmented { display: flex; gap: 4px; padding: 4px; background: #242329; border-radius: 6px; }
.segmented button { flex: 1; min-height: 31px; padding: 5px; color: #a7a0b0; font-size: 11px; border-radius: 4px; }
.segmented button.selected { background: #40344f; color: #e1d4ff; }
.segmented button:hover { color: #e1d4ff; }
.swatches { display: flex; gap: 11px; padding: 2px 0 4px; flex-wrap: wrap; }
.swatch { width: 29px; height: 29px; border-radius: 50%; background: var(--swatch); border: 3px solid var(--surface); outline: 1px solid transparent; display: grid; place-items: center; color: #fff; }
.swatch.selected { outline-color: var(--purple); }
.swatch .icon { width: 13px; height: 13px; color: #fff; filter: drop-shadow(0 1px 2px #000); }
.select-wrap { position: relative; display: block; }
.select-wrap select { appearance: none; padding-right: 36px; }
.select-wrap .icon { position: absolute; right: 12px; top: 11px; height: 15px; width: 15px; pointer-events: none; color: #9a8faa; }
.config-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #302d37; padding-top: 16px; font-size: 11px; color: #948b9f; }
.config-bottom > span { display: flex; align-items: center; gap: 5px; }
.config-bottom .icon { width: 12px; height: 12px; flex-basis: 12px; }
.config-bottom strong { font-weight: 600; color: #bfb0d8; font-variant-numeric: tabular-nums; }
.text-button { color: #c3afd8; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; padding: 5px 0; }
.text-button:hover { color: var(--purple-hover); }
.text-button .icon { width: 12px; height: 12px; flex-basis: 12px; }
.editor-tip { margin-top: 25px; padding-top: 15px; border-top: 1px solid #343039; font-size: 11px; color: #b2a1c3; display: flex; gap: 9px; max-width: 38ch; }
.portrait { position: relative; overflow: hidden; aspect-ratio: 3/4; background-color: #77736d; }
.portrait::before { content: ''; display: block; width: 100%; aspect-ratio: 3/4; background-image: var(--atlas,url('./assets/previews/portraits-weird.webp')); background-size: var(--atlas-size,400% 200%); background-position: var(--px) var(--py); background-repeat: no-repeat; }
.catalog-portrait { width: 100%; overflow: hidden; aspect-ratio: var(--portrait-ratio, .75); }
.catalog-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.owned-preview-media { display: block; width: 100%; }
.owned-preview-media > img, .owned-preview-media > video { display: block; width: 100%; height: auto; object-fit: contain; }
.owned-preview-placeholder { display: flex; width: 100%; aspect-ratio: 3/4; align-items: center; justify-content: center; background: var(--surface); color: var(--muted); }
.cast-row .owned-preview-media { flex: 0 0 40px; width: 40px; }
.preview { padding: 13px 13px 0 0; display: flex; flex-direction: column; min-width: 0; }
.preview-image { position: relative; height: 446px; overflow: hidden; border-radius: 9px; background: #a19b96; }
.hero-portrait { width: 100%; height: 100%; aspect-ratio: auto; background-size: 400% 200%; }
.preview-image::after { content: ''; position: absolute; inset: 60% 0 0; background: linear-gradient(transparent,rgba(16,14,18,.75)); pointer-events: none; }
.preview-top { position: absolute; z-index: 1; left: 20px; right: 18px; top: 17px; display: flex; align-items: center; justify-content: space-between; }
.photo-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; color: #f7f5fb; padding: 5px 8px; border: 1px solid #a49b97; border-radius: 4px; background: #46403b90; }
.preview-top .round-button { background: #36312c91; color: white; }
.preview-bottom { position: absolute; z-index: 1; inset: auto 25px 22px; display: flex; align-items: center; justify-content: space-between; color: white; }
.preview-bottom h2 { font: 500 31px/1.15 var(--display); letter-spacing: -.03em; margin-bottom: 6px; }
.preview-bottom span { font-size: 11px; color: #e7dfea; }
.preview-bubble { width: 32px; height: 32px; border: 1px solid #a494a5; border-radius: 50%; display: grid; place-items: center; }
.preview-caption { display: flex; align-items: center; justify-content: space-between; padding: 10px 2px; color: #9991a2; font-size: 11px; gap: 8px; }
.preview-caption > span { display: flex; align-items: center; gap: 6px; }
.preview-caption .icon { height: 11px; width: 11px; flex-basis: 11px; }
.editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 17px 0 32px; }
.editor-actions > span { font-size: 11px; color: #918a9a; display: flex; align-items: center; gap: 6px; }
.editor-actions > span .icon { width: 12px; height: 12px; flex-basis: 12px; color: #a18eb6; }
.editor-actions > div { display: flex; gap: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; gap: 10px; }
.section-heading h2 { font-size: 14px; }
.section-heading p { color: #938b9c; font-size: 11px; margin-top: 3px; }
.section-heading > a { color: #b7a3cd; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.section-heading > a .icon { width: 13px; height: 13px; flex-basis: 13px; }
.preset-strip { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 12px; }
.preset-card { text-align: left; position: relative; padding: 0; min-width: 0; border-radius: 9px; }
.preset-card .portrait { border-radius: 8px; width: 100%; transition: filter .25s; }
.preset-card:hover .portrait { filter: brightness(1.1); }
.preset-card.selected .portrait { outline: 2px solid var(--purple); outline-offset: 2px; }
.preset-card > div:nth-child(2) { display: flex; justify-content: space-between; margin-top: 9px; gap: 3px; }
.preset-card strong { font-size: 11px; font-weight: 600; }
.preset-card small { color: #978b9d; font-size: 11px; }
.preset-check { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--purple); color: var(--purple-ink); }
.preset-check .icon { width: 11px; height: 11px; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; min-width: 0; padding: 15px 36px 22px; font-size: 11px; color: #7e7587; max-width: 1440px; margin: 0 auto; }
.app-footer > span, .app-footer nav, .app-footer nav > * { min-width: 0; }
.app-footer nav { flex-wrap: wrap; max-width: 100%; }
.footer-dot { margin: 0 7px; }
.muted { color: var(--muted); font-size: 11px; }
.tag { color: #c5b2e6; background: #31283e; border-radius: 5px; font-size: 11px; font-weight: 500; padding: 4px 7px; white-space: nowrap; }
.video-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 28px; }
.upload-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 27px 15px; border: 1px dashed #554561; border-radius: 12px; background: #211c2a; min-height: 190px; cursor: pointer; position: relative; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--purple); background: #2b2336; }
.upload-zone input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.upload-zone:focus-within { outline: 2px solid var(--purple); outline-offset: 4px; }
.upload-icon { display: grid; place-items: center; width: 43px; height: 43px; background: #332740; color: #d4bbff; border-radius: 12px; margin-bottom: 5px; }
.upload-zone strong { font-size: 13px; }
.upload-zone > span:not(.upload-icon) { font-size: 11px; color: #b6a8c4; }
.upload-zone u { text-underline-offset: 3px; }
.upload-zone small { font-size: 11px; color: #a595b3; margin-top: 4px; }
.template-heading { margin-top: 30px; }
.filter-row { display: flex; gap: 7px; margin-bottom: 18px; flex-wrap: wrap; }
.filter { padding: 6px 12px; border-radius: 5px; font-size: 11px; color: var(--muted); background: #202026; }
.filter.active { color: #d4c0f7; background: #352b43; }
.template-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 15px; }
.template-card { padding: 0; text-align: left; }
.template-photo { height: 190px; position: relative; overflow: hidden; border-radius: 9px; }
.template-photo .portrait { width: 100%; height: 100%; aspect-ratio: auto; }
.template-card.selected .template-photo { outline: 2px solid var(--purple); outline-offset: 3px; }
.play-bubble { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; border-radius: 50%; background: #28232ac4; color: white; display: grid; place-items: center; }
.duration { position: absolute; bottom: 10px; right: 10px; border-radius: 4px; background: #17151dd1; color: white; padding: 2px 6px; font-size: 11px; }
.template-card > strong { display: block; font-size: 11px; margin-top: 9px; }
.template-card > span { font-size: 11px; color: #a494b0; }
.video-detail { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; align-self: start; }
.cast-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 22px; }
.cast-photo { width: 43px; height: 53px; border-radius: 6px; flex-shrink: 0; }
.cast-row > div:not(.portrait) { min-width: 0; flex: 1; }
.cast-row strong { font-size: 12px; }
.cast-row small { display: block; font-size: 11px; color: #aa9cb9; }
.empty-video { min-height: 230px; background: #222128; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.empty-video > .icon { height: 32px; width: 32px; color: #776583; }
.empty-video strong { font-size: 12px; }
.empty-video > span { font-size: 11px; color: #aa9cba; max-width: 20ch; }
.selected-video video, .composition-video video { width: 100%; max-height: 320px; border-radius: 8px; background: #0a0a0c; display: block; }
.video-meta { display: flex; flex-direction: column; margin: 12px 0 4px; gap: 4px; overflow-wrap: anywhere; }
.video-meta strong { font-size: 11px; }
.video-meta > span { font-size: 11px; color: #a491b3; }
.privacy-note { font-size: 11px; color: #a99ab7; display: flex; gap: 7px; margin-top: 19px; border-top: 1px solid #38303f; padding-top: 14px; }
.privacy-note .icon { width: 13px; height: 13px; flex-basis: 13px; margin-top: 2px; }
.error-message { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--error); font-size: 11px; }
.demo-video { aspect-ratio: 3/4; position: relative; overflow: hidden; border-radius: 8px; }
.demo-video .portrait { width: 100%; height: 100%; }
.demo-video.playing .portrait { animation: demo-pan 5s ease-in-out infinite alternate; }
.demo-video-badge { position: absolute; bottom: 9px; left: 9px; padding: 3px 7px; background: #1b1721c9; color: #e5d5f1; font-size: 11px; border-radius: 4px; }
.demo-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #27202bcc; color: white; }
@keyframes demo-pan { from { transform: scale(1); } to { transform: scale(1.12) translateY(5px); } }
.review-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 25px; }
.review-canvas { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.composition { display: grid; grid-template-columns: minmax(0,1fr) 30px minmax(0,1fr); gap: 10px; align-items: center; margin-top: 28px; }
.composition > div { min-width: 0; }
.composition-label { display: block; margin-bottom: 12px; font-size: 11px; color: #b3a4c1; }
.composition-person, .composition-video { height: 265px; border-radius: 9px; width: 100%; overflow: hidden; aspect-ratio: auto; }
.composition-video .demo-video { height: 100%; aspect-ratio: auto; }
.composition-video video { height: 100%; object-fit: contain; }
.composition > div > strong { display: block; margin-top: 12px; font-size: 11px; overflow-wrap: anywhere; }
.composition-plus { color: #ad8acd; justify-self: center; }
.canvas-note { margin-top: 21px; font-size: 11px; color: #a899b6; display: flex; gap: 7px; }
.canvas-note .icon { width: 13px; height: 13px; flex-basis: 13px; margin-top: 1px; }
.sheet-promo { border-top: 1px solid #3a3242; padding-top: 22px; margin-top: 27px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.sheet-promo > div { display: flex; gap: 10px; align-items: center; }
.sheet-promo > div > .icon { color: var(--purple); width: 25px; height: 25px; }
.sheet-promo strong { font-size: 11px; }
.sheet-promo span { display: block; font-size: 11px; color: #a795b6; margin-top: 3px; }
.review-options { padding: 6px 0; }
.summary { margin: 18px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.summary > div { display: flex; justify-content: space-between; gap: 9px; margin-bottom: 11px; font-size: 11px; }
.summary dt { color: #a491b3; }
.summary dd { margin: 0; text-align: right; color: #d5c7e3; }
.subject-picker { border: 0; margin: 0 0 20px; padding: 0; }
.subject-picker legend { font-size: 11px; font-weight: 600; margin-bottom: 9px; }
.subject-picker p { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.subject-single { display: flex; align-items: center; gap: 7px; color: #c5a5e0; font-size: 11px; padding: 10px 0; }
.subject-frame { position: relative; background: #1b1920; cursor: crosshair; border: 1px solid #5c4b6b; border-radius: 8px; overflow: hidden; height: 150px; }
.subject-frame video { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.subject-frame > span:not(.subject-marker) { position: absolute; bottom: 8px; left: 8px; padding: 4px 6px; background: #251c2ce8; font-size: 11px; display: flex; gap: 7px; align-items: center; }
.subject-marker { position: absolute; width: 30px; height: 30px; border: 2px solid white; border-radius: 50%; background: var(--purple); color: var(--purple-ink); display: grid; place-items: center; transform: translate(-50%,-50%); }
.subject-picker > small { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; padding: 11px 0; cursor: pointer; }
.toggle-row > span:first-child { display: flex; align-items: center; gap: 8px; }
.toggle-row .icon { width: 15px; height: 15px; flex-basis: 15px; color: #ac9abb; }
.toggle-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 30px; height: 17px; border-radius: 15px; background: #48404f; display: block; position: relative; }
.switch::after { content: ''; width: 11px; height: 11px; border-radius: 50%; background: #c5b5d0; position: absolute; top: 3px; left: 3px; transition: left .2s; }
.toggle-row input:checked + .switch { background: var(--purple); }
.toggle-row input:checked + .switch::after { left: 16px; background: #332547; }
.toggle-row input:focus-visible + .switch { outline: 2px solid var(--purple); outline-offset: 3px; }
.demo-explanation { padding: 15px; background: #26202e; border-radius: 8px; margin: 17px 0; }
.demo-explanation strong { color: #d0b8e8; font-size: 11px; }
.demo-explanation p { font-size: 11px; color: #b4a0c2; margin-top: 5px; }
.generation-detail { display: block; margin-top: 9px; text-align: center; font-size: 11px; color: #a492b4; }
.generation-view { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: .8fr 1.2fr; overflow: hidden; }
.generation-art { position: relative; min-height: 540px; }
.generation-art .portrait { height: 100%; width: 100%; aspect-ratio: auto; }
.generation-stamp { position: absolute; bottom: 20px; left: 20px; background: #211729d9; font-size: 11px; color: #ddc1ee; padding: 7px 10px; border-radius: 5px; letter-spacing: .08em; }
.generation-copy { padding: 34px 38px; }
.completion-icon { display: grid; place-items: center; width: 43px; height: 43px; background: #362843; color: var(--purple); border-radius: 12px; margin-bottom: 20px; }
.completion-icon .icon { width: 24px; height: 24px; }
.generation-copy h2 { font: 500 28px/1.25 var(--display); letter-spacing: -.025em; }
.generation-copy > p { font-size: 11px; color: #b4a4c0; margin: 14px 0 26px; max-width: 48ch; }
.progress-label { display: flex; justify-content: space-between; color: #c7b1db; font-size: 11px; margin-bottom: 9px; }
.progress-label strong { font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 5px; border: 0; appearance: none; background: #352b40; border-radius: 6px; overflow: hidden; }
progress::-webkit-progress-bar { background: #352b40; }
progress::-webkit-progress-value { background: var(--purple);  }
progress::-moz-progress-bar { background: var(--purple); }
.generation-stages { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 11px; }
.generation-stages li { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #aa94b9; }
.generation-stages li > span { width: 17px; height: 17px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid #5e496b; font-size: 11px; }
.generation-stages li.done { color: #d4b8e7; }
.generation-stages .icon { width: 17px; height: 17px; border: 0; }
.generation-buttons { display: flex; gap: 8px; margin: 26px 0 13px; }
.library-grid, .explore-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.library-card { overflow: hidden; border-radius: 12px; background: var(--surface); }
.library-card > .portrait { width: 100%; height: 280px; aspect-ratio: auto; }
.library-card-body { padding: 17px; }
.library-card-body h2 { font: 500 21px var(--display); }
.library-card-body p { font-size: 11px; color: #b39bc1; margin: 5px 0 18px; }
.library-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.library-actions .button { flex: 1; padding: 10px; }
.empty-state { min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > .icon { width: 45px; height: 45px; color: var(--purple); margin-bottom: 21px; }
.empty-state h2 { font: 500 25px var(--display); }
.empty-state p { max-width: 44ch; font-size: 12px; color: #b5a1c2; margin: 13px 0 25px; }
.search-box { display: flex; align-items: center; gap: 12px; border: 1px solid #43384d; border-radius: 8px; padding: 11px 15px; max-width: 460px; margin: 0 0 28px; color: #b9a7c6; }
.search-box input { border: 0; background: transparent; outline-offset: 8px; width: 100%; font-size: 11px; }
.explore-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px 16px; }
.explore-card { text-align: left; padding: 0; }
.explore-card > .portrait { width: 100%; border-radius: 9px; }
.explore-card > div:not(.portrait) { margin-top: 13px; }
.explore-card h2 { font: 500 24px var(--display); margin: 8px 0 3px; }
.explore-card p { color: #ad92bc; font-size: 11px; }
.explore-cta { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px solid #3b2f45; color: #cbb0df; font-size: 11px; }
.explore-cta .icon { width: 14px; height: 14px; }
.gallery-note { font-size: 11px; color: #a58cae; border-top: 1px solid #372b40; margin-top: 32px; padding-top: 20px; }
.no-results { color: #bda3ce; padding: 50px 0; }
.project-list { display: grid; gap: 14px; }
.project-row { display: flex; align-items: center; gap: 20px; padding: 18px; background: var(--surface); border-radius: 12px; }
.project-row > .portrait { width: 60px; height: 76px; flex-shrink: 0; border-radius: 7px; }
.project-info { flex: 1; min-width: 0; }
.project-info h2 { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.project-info p { font-size: 11px; margin-top: 7px; color: #ac93bb; overflow-wrap: anywhere; }
.project-controls { display: flex; gap: 8px; align-items: center; }
dialog { width: min(920px,calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 27px; border: 1px solid #4d3e59; border-radius: 14px; background: #1b1721; color: var(--text); }
dialog::backdrop { background: #09070bcb; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.dialog-heading h2 { font: 500 25px var(--display); }
.dialog-description { color: #c1accb; font-size: 11px; max-width: 72ch; margin-bottom: 21px; }
.style-sheet { display: block; width: 100%; border-radius: 7px; height: auto; }
.sheet-labels { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 11px 0 21px; text-align: center; font-size: 11px; color: #bca0cf; }
.sheet-config { background: #2b2134; border-radius: 7px; padding: 14px; }
.sheet-config strong { font-size: 11px; color: #e1c8f0; }
.sheet-config p { color: #bfa2d0; font-size: 11px; margin-top: 6px; }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; }
.dialog-actions .muted { max-width: 50ch; }
.help-steps { list-style: none; padding: 0; margin: 25px 0; display: grid; gap: 24px; }
.help-steps > li { display: flex; gap: 15px; }
.help-steps > li > span { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #3c294b; color: #d9bafa; }
.help-steps h3 { font-size: 13px; margin-bottom: 5px; }
.help-steps p { font-size: 11px; color: #b9a3c6; max-width: 65ch; }
.settings-stats { display: flex; gap: 40px; border-block: 1px solid #403148; padding: 22px 0; margin: 20px 0; }
.settings-stats strong { display: block; color: #dab8f1; font: 500 32px var(--display); }
.settings-stats span { color: #baa0ca; font-size: 11px; }
#toast { position: fixed; bottom: 25px; left: calc(50% + 100px); transform: translate(-50%,14px); max-width: min(480px,calc(100% - 32px)); opacity: 0; pointer-events: none; z-index: 100; background: #3d2c4b; border: 1px solid #8b63a1; color: #f2dafa; padding: 12px 18px; border-radius: 9px; font-size: 11px; transition: opacity .25s, transform .25s var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 1600px) { .preview-image { height: 485px; } .config-fields { min-height: 390px; } }
@media (max-width: 1180px) {
  .sidebar { width: 185px; padding-inline: 12px; }
  .app-shell { margin-left: 185px; }
  .topbar { padding-inline: 25px; }
  main { padding: 30px 25px; }
  .editor { grid-template-columns: minmax(300px,1fr) minmax(230px,1fr); }
  .configuration { padding: 23px 20px 17px; }
  .panel-heading h2 { font-size: 12px; }
  .button-mini { font-size: 11px; padding: 7px; gap: 5px; }
  .tabs { gap: 18px; }
  .preview-image { height: 446px; }
  .preview-caption { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 8px; }
  .preset-strip { gap: 10px; }
  .preset-card > div:nth-child(2) { flex-direction: column; }
  .video-layout { grid-template-columns: minmax(0,1fr) 240px; gap: 20px; }
  .review-layout { grid-template-columns: minmax(0,1fr) 265px; gap: 20px; }
  .review-canvas { padding: 18px; }
  .composition { gap: 7px; grid-template-columns: minmax(0,1fr) 20px minmax(0,1fr); }
  .sheet-promo { align-items: flex-start; flex-direction: column; }
  .generation-copy { padding: 29px; }
  .generation-copy h2 { font-size: 25px; }
}
@media (max-width: 950px) {
  .sidebar { width: 75px; padding-inline: 12px; }
  .brand { margin: 0 auto 35px; }
  .brand > span, .workspace-label, #main-nav a > span:not(.icon), .studio-note, .profile > span:nth-child(2), .profile > .icon, .help-link { display: none; }
  #main-nav a { justify-content: center; padding: 13px; }
  .profile { justify-content: center; }
  .app-shell { margin-left: 75px; }
  .editor-actions > span { max-width: 26ch; }
  .review-layout { grid-template-columns: 1fr; }
  .review-options { padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .composition-person, .composition-video { height: 350px; }
  .sheet-promo { flex-direction: row; align-items: center; }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .explore-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 67px; border: 0; border-top: 1px solid #40364a; padding: 0; background: #19151f; }
  .sidebar .brand, .sidebar-bottom { display: none; }
  #main-nav { height: 100%; display: grid; grid-template-columns: repeat(4,1fr); gap: 0; }
  #main-nav a { flex-direction: column; gap: 4px; border-radius: 0; padding: 9px 3px 8px; font-size: 11px; font-weight: 500; color: #b59bc5; }
  #main-nav a > span:not(.icon) { display: inline; }
  #main-nav a .nav-count, #main-nav a .nav-dot { display: none !important; }
  #main-nav a.active { background: #302039; color: #dbc0f3; }
  #main-nav .icon { width: 20px; height: 20px; }
  .app-shell { margin: 0; padding-bottom: 70px; }
  .topbar { height: 64px; padding-inline: 18px; gap: 8px; }
  .breadcrumb { font-size: 11px; gap: 7px; }
  .breadcrumb span:first-child { font: 600 19px var(--display); letter-spacing: -.03em; color: var(--text); white-space: nowrap; }
  .breadcrumb span:last-child, .breadcrumb > .icon { display: none; }
  .breadcrumb span:first-child::before { content: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { font-size: 0; width: 32px; min-height: 32px; padding: 6px; background: #2a2035; color: #d4b5e8; }
  .demo-badge { font-size: 11px; padding: 3px 6px; white-space: nowrap; }
  main { padding: 25px 18px 20px; }
  h1 { font-size: 28px; }
  .page-heading { margin-bottom: 25px; }
  .page-heading p { font-size: 11px; max-width: 40ch; }
  .heading-note { display: none; }
  .page-heading > .button { font-size: 0; width: 36px; padding: 7px; }
  .stepper { justify-content: space-between; margin-bottom: 20px; }
  .step, .step + .step { padding: 0 3px 13px 0; gap: 5px; font-size: 11px; }
  .step-chevron { display: none; }
  .step-number { height: 19px; width: 19px; font-size: 11px; }
  .step.current::after { right: 0; }
  .editor { display: flex; flex-direction: column-reverse; }
  .preview { padding: 10px 10px 0; }
  .preview-image { height: 340px; }
  .hero-portrait { background-size: 400% 200%; }
  .preview-caption { flex-direction: row; align-items: center; padding: 10px 2px 13px; }
  .preview-bottom h2 { font-size: 29px; }
  .configuration { padding: 18px 18px 17px; border-top: 1px solid #37303e; }
  .panel-heading { margin-bottom: 20px; }
  .panel-heading h2 { font-size: 13px; }
  .button-mini { font-size: 11px; padding: 8px 10px; }
  .tabs { justify-content: space-between; gap: 10px; }
  .tabs button { font-size: 11px; }
  .config-fields { min-height: 0; }
  .field { margin-bottom: 19px; font-size: 11px; }
  .field input, .field select { height: 43px; font-size: 12px; }
  .segmented button { min-height: 35px; font-size: 11px; }
  .select-wrap .icon { top: 14px; }
  .swatch { width: 32px; height: 32px; }
  .config-bottom { margin-top: 4px; font-size: 11px; }
  .editor-actions { align-items: stretch; flex-direction: column; margin: 16px 0 27px; gap: 12px; }
  .editor-actions > span { max-width: none; font-size: 11px; }
  .editor-actions > div { width: 100%; }
  .editor-actions > div .button { flex: 1; }
  .button { min-height: 44px; font-size: 11px; }
  .section-heading h2 { font-size: 13px; }
  .section-heading > a { font-size: 11px; white-space: nowrap; }
  .preset-strip { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px 12px; }
  .preset-card > div:nth-child(2) { flex-direction: column; gap: 1px; }
  .preset-card strong { font-size: 11px; }
  .preset-card small { font-size: 11px; }
  .app-footer { padding: 12px 18px 25px; gap: 10px; font-size: 11px; }
  .video-layout { grid-template-columns: 1fr; }
  .upload-zone { padding: 29px 10px; }
  .upload-zone strong { font-size: 15px; }
  .template-photo { height: 215px; }
  .template-card > strong { font-size: 11px; }
  .video-detail { margin-top: 10px; }
  .selected-video { max-width: 280px; margin: 0 auto; }
  .cast-row { margin-bottom: 18px; }
  .composition-person, .composition-video { height: 240px; }
  .review-canvas { padding: 18px 14px; }
  .review-canvas .section-heading .tag { font-size: 11px; }
  .review-canvas .section-heading h2 { font-size: 12px; }
  .composition-label { font-size: 11px; }
  .composition > div > strong { font-size: 11px; }
  .composition { gap: 5px; grid-template-columns: minmax(0,1fr) 14px minmax(0,1fr); }
  .composition-plus .icon { width: 13px; height: 13px; }
  .demo-video-badge { font-size: 6px; left: 5px; bottom: 5px; }
  .sheet-promo { flex-direction: column; align-items: stretch; }
  .sheet-promo strong { font-size: 11px; }
  .review-options { padding: 20px; }
  .summary > div { font-size: 11px; }
  .subject-picker legend { font-size: 12px; }
  .toggle-row { padding: 14px 0; font-size: 11px; }
  .generation-view { grid-template-columns: 1fr; }
  .generation-art { height: 320px; min-height: 0; }
  .generation-copy { padding: 26px; }
  .generation-copy h2 { font-size: 27px; }
  .generation-buttons { flex-direction: column; }
  .library-grid { grid-template-columns: 1fr; }
  .library-card > .portrait { height: 390px; }
  .explore-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px 15px; }
  .explore-card p { font-size: 11px; }
  .search-box input { font-size: 11px; }
  .project-row { gap: 12px; flex-wrap: wrap; padding: 16px; }
  .project-row > .portrait { width: 45px; height: 60px; }
  .project-info h2 { font-size: 14px; }
  .project-info p { font-size: 11px; }
  .project-controls { width: 100%; }
  .project-controls > .button { flex: 1; }
  dialog { padding: 19px; }
  .dialog-heading h2 { font-size: 20px; }
  .dialog-description { font-size: 11px; }
  .sheet-labels { font-size: 11px; }
  .dialog-actions { flex-direction: column; align-items: stretch; }
  #toast { left: 50%; bottom: 82px; width: max-content; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; }
}
