:root{--bg:#0b0e14;--panel:#121722;--panel-2:#171d29;--panel-3:#202837;--line:#293243;--muted:#8e9aab;--text:#edf2f7;--accent:#ef4d8b;--accent-2:#ff9a61;--cyan:#55c6d9;--green:#6bd6a0;--danger:#ff7777;--shadow:0 18px 45px rgba(0,0,0,.28)}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.55 'Prompt',system-ui,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}.app-shell{min-height:100vh}.topbar{height:76px;border-bottom:1px solid var(--line);background:#0e121a;display:flex;align-items:center;justify-content:space-between;padding:0 26px;gap:24px}.brand-group,.top-actions,.toolbar-actions,.sidebar-heading,.progress-meta,.content-toolbar,.status-line,.stat-list div,.next-suggestion,.step-button,.step-icon,.brand-group>div{display:flex;align-items:center}.brand-group{gap:12px;min-width:270px}.brand-mark{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(140deg,var(--accent),var(--accent-2));font-size:11px;font-weight:700;color:#1a0d16}.eyebrow{margin:0;color:#7e8a9d;font-size:10px;letter-spacing:.14em;font-weight:700}.brand-group h1,.sidebar h2,.content-toolbar h2,.inspector h2{margin:0;font-size:17px;line-height:1.2}.project-title-wrap{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:12px}.project-title-wrap input{width:180px;background:transparent;border:0;border-bottom:1px solid var(--line);color:var(--text);padding:6px 2px;font-weight:600}.save-state{display:flex;align-items:center;gap:6px;color:#7e8a9d;font-size:11px}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent-2)}.status-dot.green{background:var(--green)}.top-actions{gap:8px}.primary-button,.ghost-button,.icon-button,.avatar,.nav-link{border:0}.primary-button,.ghost-button{border-radius:8px;padding:9px 13px;font-weight:600}.primary-button{background:var(--accent);color:white}.primary-button:hover{background:#ff619b}.ghost-button{background:transparent;color:#cbd4df;border:1px solid var(--line)}.ghost-button:hover{border-color:#647188;background:#171d29}.icon-button{width:35px;height:35px;border-radius:8px;background:transparent;color:#cad4df;border:1px solid var(--line);font-size:20px;display:grid;place-items:center}.icon-button:hover{background:var(--panel-3);color:#fff}.icon-button.compact{width:27px;height:27px;font-size:17px}.avatar{width:34px;height:34px;border-radius:50%;background:#293749;color:#fff;font-weight:700}.workspace{display:grid;grid-template-columns:238px minmax(0,1fr) 280px;min-height:calc(100vh - 76px)}.sidebar{border-right:1px solid var(--line);background:#10151e;padding:25px 16px 18px;display:flex;flex-direction:column}.sidebar-heading{justify-content:space-between;padding:0 8px 22px}.progress-block{padding:0 8px 20px}.progress-meta{justify-content:space-between;color:var(--muted);font-size:11px;margin-bottom:7px}.progress-meta strong{color:var(--accent-2);font-size:11px}.progress-track{height:4px;background:#252e3d;border-radius:4px;overflow:hidden}.progress-track span{display:block;height:100%;width:14%;background:linear-gradient(90deg,var(--accent),var(--accent-2));transition:width .25s}.step-list{display:grid;gap:5px}.step-button{width:100%;border:1px solid transparent;background:transparent;border-radius:9px;color:#9aa6b7;text-align:left;padding:10px 9px;gap:10px}.step-button:hover{background:#171d29;color:#eef2f7}.step-button.active{background:#241923;border-color:#7b3155;color:#fff}.step-button.complete{color:#c9d2dc}.step-button.locked{opacity:.48}.step-icon{justify-content:center;width:25px;height:25px;border:1px solid #394557;border-radius:7px;font-size:11px;flex:0 0 auto}.step-button.active .step-icon{background:var(--accent);border-color:var(--accent);color:#fff}.step-button.complete .step-icon{color:var(--green);border-color:#3d8063}.step-copy{display:grid;gap:0}.step-copy small{font-size:9px;color:#6f7b8d;letter-spacing:.1em}.step-copy strong{font-size:12px;font-weight:600}.sidebar-footer{margin-top:auto;display:grid;gap:6px;padding-top:20px}.nav-link{background:transparent;color:#9aa6b7;text-align:left;border-radius:8px;padding:10px 9px;display:flex;gap:10px;align-items:center}.nav-link:hover{background:#171d29;color:#fff}.count-badge{margin-left:auto;background:#2d3848;color:#ccd5df;border-radius:10px;padding:0 6px;font-size:10px}.prototype-note{border:1px solid #34404d;border-radius:9px;padding:10px;margin-top:12px;display:flex;gap:8px;color:#c1cbd7}.prototype-note>span{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:#293748;color:var(--cyan);font-size:11px}.prototype-note div{display:grid;gap:1px}.prototype-note strong{font-size:11px}.prototype-note small{font-size:10px;color:var(--muted)}.main-content{min-width:0;padding:32px 36px 42px;background:radial-gradient(circle at 70% 0%,rgba(58,74,105,.17),transparent 34%)}.content-toolbar{justify-content:space-between;gap:18px;margin-bottom:26px}.content-toolbar h2{font-size:25px;margin-top:3px}.section-description{margin:6px 0 0;color:var(--muted);font-size:12px}.toolbar-actions{gap:8px}.panel-stage{max-width:930px;margin:0 auto}.card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.ui-card{background:rgba(18,23,34,.92);border:1px solid var(--line);border-radius:12px;padding:20px;box-shadow:var(--shadow)}.ui-card.wide{grid-column:1/-1}.card-heading{display:flex;justify-content:space-between;align-items:start;gap:14px;margin-bottom:16px}.card-heading h3{font-size:15px;margin:0}.card-heading p{font-size:11px;color:var(--muted);margin:3px 0 0}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:11px;color:#a9b4c3;font-weight:600}.field input,.field textarea,.field select{width:100%;background:#0c1119;border:1px solid #303b4e;border-radius:8px;color:#e9eef5;padding:10px 11px}.field textarea{min-height:120px;resize:vertical}.field input::placeholder,.field textarea::placeholder{color:#596679}.option-row{display:flex;flex-wrap:wrap;gap:8px}.option{border:1px solid #334052;background:#171f2b;color:#aab5c5;border-radius:8px;padding:9px 12px;text-align:left;display:grid;gap:1px;min-width:105px}.option small{font-size:10px;color:#748196}.option.selected{border-color:var(--accent);background:#2a1925;color:#fff}.option:hover{border-color:#697b95}.chip-row{display:flex;flex-wrap:wrap;gap:7px}.chip{border:1px solid #344154;color:#abb7c7;background:#171f2b;border-radius:20px;padding:6px 10px;font-size:11px}.chip.selected{border-color:var(--cyan);color:#dbfbff;background:#133039}.step-actions{display:flex;justify-content:space-between;gap:12px;margin-top:20px}.step-actions .primary-button{margin-left:auto}.inline-add{color:var(--accent-2);border:1px dashed #986246;background:transparent;border-radius:7px;padding:7px 10px;font-size:11px}.summary-strip{display:flex;flex-wrap:wrap;gap:8px;padding:12px 14px;background:#161d28;border:1px solid var(--line);border-radius:9px;color:#abb7c7;font-size:11px}.summary-strip b{color:#f2f5f8}.asset-list{display:grid;gap:8px}.asset-row{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:11px;background:#171e2a;border:1px solid #2d394b;border-radius:9px;padding:9px}.asset-thumb{width:42px;height:42px;border-radius:7px;display:grid;place-items:center;background:linear-gradient(135deg,#303e55,#202938);color:#d7e1ec}.asset-row strong{font-size:12px}.asset-row small{display:block;color:var(--muted);font-size:10px}.row-actions{display:flex;gap:5px}.tiny-button{border:1px solid #364256;background:transparent;color:#aeb9c9;border-radius:6px;width:27px;height:27px}.tiny-button:hover{border-color:var(--cyan);color:#fff}.story-list,.shot-list{display:grid;gap:9px}.story-row,.shot-row{display:grid;grid-template-columns:34px 1fr auto;gap:11px;align-items:center;border:1px solid #2c384a;background:#151c28;border-radius:9px;padding:11px}.order-number{width:27px;height:27px;border-radius:7px;background:#253044;color:#cbd5e1;display:grid;place-items:center;font-size:11px}.story-row strong,.shot-row strong{font-size:12px}.story-row small,.shot-row small{display:block;color:var(--muted);font-size:10px}.drag-handle{color:#66748a;letter-spacing:2px}.shot-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.shot-card{background:#151c28;border:1px solid #2c384a;border-radius:9px;overflow:hidden}.shot-art{aspect-ratio:16/9;background:linear-gradient(135deg,#263950,#12202c);display:grid;place-items:center;color:#9eb8c8;font-size:11px}.shot-body{padding:10px}.shot-body strong{font-size:11px}.shot-body small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.queue-list{display:grid;gap:9px}.queue-item{display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;border:1px solid #2d394b;border-radius:9px;padding:11px;background:#151c28}.queue-icon{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;background:#29364a;color:var(--cyan)}.queue-item strong{font-size:11px}.queue-item small{display:block;color:var(--muted);font-size:10px}.queue-status{font-size:10px;color:var(--accent-2)}.queue-status.done{color:var(--green)}.timeline-wrap{background:#0d121a;border:1px solid #2d394b;border-radius:10px;overflow:hidden}.preview-stage{height:260px;display:grid;place-items:center;background:radial-gradient(circle at 50% 25%,#394d62,#131b27 60%);color:#c7d4df}.preview-stage strong{display:block;font-size:18px;text-align:center}.preview-stage small{display:block;text-align:center;color:#9dacbb;margin-top:5px}.timeline-ruler{display:flex;height:28px;border-top:1px solid #2d394b;border-bottom:1px solid #2d394b;color:#68768a;font-size:9px}.timeline-ruler span{flex:1;padding:5px 8px;border-right:1px solid #212c3c}.track{display:grid;grid-template-columns:76px 1fr;min-height:48px;border-bottom:1px solid #222c3b}.track:last-child{border-bottom:0}.track-label{padding:13px 9px;color:#7f8ca0;font-size:10px;border-right:1px solid #2d394b}.track-lane{display:flex;gap:5px;padding:7px}.clip{min-width:100px;flex:1;border-radius:6px;padding:6px 8px;color:#eaf1f4;font-size:10px;background:#2e5770;border:1px solid #4d88a1}.clip.audio{background:#56455f;border-color:#8c6b96}.clip.text{background:#6b5731;border-color:#9f7e43}.cover-layout{display:grid;grid-template-columns:1fr 240px;gap:16px}.cover-preview{aspect-ratio:9/12;border-radius:9px;background:linear-gradient(160deg,#7e3e58,#1c2735 62%,#0e141d);display:grid;place-items:center;text-align:center;padding:20px}.cover-preview strong{font-size:22px}.cover-preview small{display:block;color:#d8b5c1;margin-top:6px}.inspector{border-left:1px solid var(--line);background:#10151e;padding:25px 18px}.inspector-header{display:flex;justify-content:space-between;align-items:start;margin-bottom:18px}.inspector-header h2{font-size:15px;margin-top:3px}.mini-preview{padding:8px;border:1px solid var(--line);border-radius:10px;background:#151c27}.film-frame{aspect-ratio:16/9;border-radius:6px;background:linear-gradient(135deg,#3a465b,#151d2a);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.film-frame span{font-size:9px;color:#c1cfdd}.film-frame strong{font-size:13px;margin:4px 0}.film-frame small{font-size:9px;color:#9eacbc}.inspector-section{padding:18px 0;border-bottom:1px solid var(--line)}.inspector-label{color:#768397;font-size:10px;letter-spacing:.1em;margin-bottom:10px;text-transform:uppercase}.status-line{gap:8px;color:#cbd5df;font-size:11px}.stat-list{display:grid;gap:8px}.stat-list div{justify-content:space-between;color:#9eabbc;font-size:11px}.stat-list strong{color:#fff}.next-suggestion{width:100%;border:1px solid #3b4453;background:#171f2b;color:#d6dee8;border-radius:9px;padding:10px;text-align:left;gap:8px}.next-suggestion>span:first-child{color:var(--accent-2);font-size:15px}.next-suggestion span:nth-child(2){display:grid;gap:2px;flex:1}.next-suggestion strong{font-size:11px}.next-suggestion small{font-size:10px;color:var(--muted);line-height:1.4}.next-suggestion>b{color:#9aa8ba}.toast{position:fixed;right:22px;bottom:22px;background:#1b2635;color:#eaf2f7;border:1px solid #425066;border-radius:8px;padding:11px 14px;box-shadow:var(--shadow);opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s;z-index:50;font-size:12px}.toast.show{opacity:1;transform:translateY(0)}.sidebar.collapsed{width:72px}.sidebar.collapsed .sidebar-heading>div,.sidebar.collapsed .progress-block,.sidebar.collapsed .step-copy,.sidebar.collapsed .sidebar-footer{display:none}.sidebar.collapsed .step-button{justify-content:center}.workspace.sidebar-collapsed{grid-template-columns:72px minmax(0,1fr) 280px}
@media(max-width:1100px){.workspace{grid-template-columns:210px minmax(0,1fr)}.inspector{display:none}.main-content{padding:28px 24px}.project-title-wrap{display:none}.card-grid{grid-template-columns:1fr}.shot-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.topbar{height:auto;min-height:68px;padding:12px 14px}.brand-group{min-width:0}.brand-group h1{font-size:14px}.brand-group .eyebrow{font-size:8px}.top-actions .ghost-button{display:none}.workspace{display:block}.sidebar{border-right:0;border-bottom:1px solid var(--line);padding:14px}.sidebar-heading{padding-bottom:12px}.step-list{display:flex;overflow:auto;padding-bottom:3px}.step-button{min-width:120px}.step-button .step-copy strong{font-size:10px}.sidebar-footer{display:none}.main-content{padding:22px 14px 28px}.content-toolbar{align-items:flex-start}.content-toolbar h2{font-size:21px}.toolbar-actions .ghost-button{font-size:0;width:35px;padding:0}.toolbar-actions .ghost-button:first-letter{font-size:16px}.field-grid,.cover-layout{grid-template-columns:1fr}.shot-grid{grid-template-columns:1fr}.step-actions{position:sticky;bottom:0;background:rgba(11,14,20,.94);padding-top:12px}.ui-card{padding:15px}}

/* Prompt & Play shared brand theme */
:root {
  --bg: #0a0d14;
  --panel: #121824;
  --panel-2: #161e2e;
  --panel-3: #202a3b;
  --line: #27344a;
  --muted: #94a3b8;
  --text: #ffffff;
  --accent: #ff4f8b;
  --accent-2: #ff8a1d;
  --cyan: #22cfff;
  --green: #00e676;
  --brand-purple: #8758ff;
  --brand-gradient: linear-gradient(105deg, #ff8a1d 0%, #ff4f8b 34%, #8758ff 68%, #22cfff 100%);
  --brand-gradient-soft: linear-gradient(105deg, rgba(255,138,29,.14), rgba(255,79,139,.18), rgba(135,88,255,.15), rgba(34,207,255,.12));
  --selected-gradient: linear-gradient(105deg, #ec0b93 0%, #c02cf1 54%, #8758ff 100%);
  --selected-gradient-soft: linear-gradient(105deg, rgba(236,11,147,.25), rgba(192,44,241,.22), rgba(135,88,255,.18));
  --selected-border: rgba(255, 79, 139, .82);
  --selected-glow: 0 0 22px rgba(236, 11, 147, .24), 0 0 18px rgba(135, 88, 255, .18);
  --movie-card-bg: rgba(12, 17, 26, .94);
  --movie-card-bg-soft: rgba(16, 22, 33, .76);
  --movie-card-border: rgba(63, 83, 112, .72);
  --movie-heading-accent: #fff200;
  --movie-heading-accent-soft: #fff7a8;
}

body {
  background: #0a0d14;
}

.topbar {
  background: rgba(12, 16, 24, .96);
  border-bottom-color: #1c2637;
  backdrop-filter: blur(14px);
}

.sidebar,
.inspector {
  background: #0d121a;
  border-color: #1c2637;
}

.main-content {
  background: radial-gradient(circle at 72% 0%, rgba(135, 88, 255, .10), transparent 34%), radial-gradient(circle at 20% 100%, rgba(34, 207, 255, .05), transparent 28%), #0a0d14;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff8a1d 0%, #ff4f8b 38%, #8758ff 70%, #22cfff 100%);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255,79,139,.22), 0 0 24px rgba(34,207,255,.22), inset 0 0 0 1px rgba(255,255,255,.28);
}

.brand-mark::after {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255,255,255,.9);
  content: "";
}

.brand-mark .brand-play {
  margin-left: 2px;
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(30,12,74,.38);
}

.brand-group > div:last-child {
  display: grid;
  align-items: center;
  gap: 1px;
}

.brand-eyebrow {
  width: fit-content;
  background: linear-gradient(90deg, #22cfff, #8758ff, #ff4f8b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: 0;
}

.primary-button {
  background: var(--brand-gradient);
  box-shadow: 0 8px 22px rgba(135,88,255,.24), 0 0 14px rgba(34,207,255,.12);
}

.primary-button:hover {
  background: var(--brand-gradient);
  box-shadow: 0 10px 28px rgba(255,79,139,.28), 0 0 18px rgba(34,207,255,.20);
}

.progress-track span {
  background: var(--brand-gradient);
}

.progress-meta strong,
.inline-add,
.queue-status,
.next-suggestion > span:first-child {
  color: #ff8a1d;
}

.step-button.active {
  border-color: rgba(255,79,139,.42);
  background: var(--brand-gradient-soft);
  box-shadow: inset 3px 0 0 #ff4f8b;
}

.step-button.active .step-icon {
  border-color: rgba(255,255,255,.2);
  background: var(--brand-gradient);
}

.ui-card {
  border-color: #27344a;
  background: rgba(18,24,36,.94);
}

.field input,
.field textarea,
.field select {
  border-color: #303e54;
  background: #0b1018;
}

.option.selected {
  border-color: #ff4f8b;
  background: var(--brand-gradient-soft);
  box-shadow: inset 0 0 0 1px rgba(135,88,255,.12);
}

.chip.selected {
  border-color: #22cfff;
  background: rgba(34,207,255,.10);
  color: #e6fbff;
}

.next-suggestion:hover,
.ghost-button:hover,
.icon-button:hover {
  border-color: rgba(135,88,255,.5);
  background: var(--brand-gradient-soft);
}

.avatar {
  background: var(--brand-gradient);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

.toast {
  border-color: rgba(135,88,255,.45);
  background: #151d2b;
  box-shadow: 0 12px 34px rgba(0,0,0,.38), 0 0 16px rgba(34,207,255,.10);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-color: #22cfff;
}

/* Flow-inspired setup screen: visual choices first, project logic second. */
.panel-stage.setup-layout,
.panel-stage.story-layout,
.panel-stage.bible-layout,
.panel-stage.model-layout,
.panel-stage.asset-design-layout,
.panel-stage.storyboard-build-layout,
.panel-stage.edit-export-layout {
  width: 100%;
  max-width: none;
}

.panel-stage.edit-export-layout {
  margin: 0;
}

.setup-flow {
  display: grid;
  gap: 18px;
}

.movie-category-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 0 0 18px;
}

.movie-category-choice {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  border: 1px solid #27344a;
  border-radius: 20px;
  background: rgba(18, 24, 36, 0.88);
  color: #cbd7e8;
  font-weight: 700;
  transition: border-color .18s, background .18s, color .18s, transform .18s;
}

.movie-category-shell {
  height: 58px;
}

.movie-category-shell .movie-category-choice {
  height: 58px;
}

.movie-category-choice span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 207, 255, 0.34);
  border-radius: 14px;
  color: #8cecff;
  font-size: 10px;
}

.movie-category-choice strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-category-choice small {
  color: rgba(203, 215, 232, 0.58);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.movie-category-choice:disabled {
  cursor: not-allowed;
  border-color: rgba(39, 52, 74, 0.82);
  background: rgba(18, 24, 36, 0.46);
  color: rgba(203, 215, 232, 0.42);
  box-shadow: none;
}

.movie-category-choice:disabled:hover {
  border-color: rgba(39, 52, 74, 0.82);
  background: rgba(18, 24, 36, 0.46);
  color: rgba(203, 215, 232, 0.42);
  transform: none;
}

.movie-category-choice:hover,
.movie-category-choice.selected {
  border-color: rgba(255, 79, 139, 0.58);
  background: var(--brand-gradient-soft);
  color: #ffffff;
}

.movie-category-choice.selected {
  box-shadow: inset 3px 0 0 #ff4f8b;
}

.setup-section {
  padding: 22px;
  border: 1px solid #27344a;
  border-radius: 20px;
  background: rgba(18, 24, 36, 0.94);
  box-shadow: var(--shadow);
}

.setup-section.required-section {
  border-color: rgba(255, 79, 139, 0.3);
}

.setup-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 17px;
}

.section-symbol {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 15px;
}

.setup-layout .section-prompt-icon {
  position: relative;
  border: 0;
  background: transparent;
  color: #ffe500;
  box-shadow: none;
}

.setup-layout .section-prompt-icon::before {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  content: "";
}

.setup-layout .section-prompt-icon::after {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  content: "";
}

.section-kicker {
  display: block;
  margin-bottom: 2px;
  color: #728197;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.setup-section-heading h3 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 17px;
}

.setup-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.requirement {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
}

.requirement.required {
  border: 1px solid rgba(255, 79, 139, 0.36);
  background: rgba(255, 79, 139, 0.11);
  color: #ff8ab2;
}

.requirement.optional {
  border: 1px solid #344154;
  background: #171f2b;
  color: #8e9aab;
}

.visual-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.choice-shell {
  min-width: 0;
  position: relative;
}

.choice-shell > [data-setting] {
  width: 100%;
  height: 100%;
}

.prompt-gear {
  position: absolute;
  z-index: 6;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: rgba(10, 13, 20, .78);
  color: #dce8f6;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .26), inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.prompt-gear:hover {
  border-color: rgba(255, 79, 139, .72);
  background: rgba(236, 11, 147, .18);
  color: #ffffff;
}

.choice-shell:has(.selected) .prompt-gear {
  border-color: rgba(255, 255, 255, .24);
  background: var(--selected-gradient);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(236, 11, 147, .26), inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.prompt-style-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.prompt-style-modal.show {
  display: flex;
}

.prompt-style-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 13, .74);
  backdrop-filter: blur(6px);
}

.prompt-style-dialog {
  position: relative;
  width: min(860px, 100%);
  max-height: min(78vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid rgba(255, 242, 0, .42);
  border-radius: 14px;
  background: #0c111a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55), 0 0 26px rgba(255, 242, 0, .16);
  overflow: hidden;
}

.prompt-style-dialog header,
.prompt-style-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(63, 83, 112, .72);
}

.prompt-style-dialog footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(63, 83, 112, .72);
  border-bottom: 0;
}

.prompt-style-dialog small {
  display: block;
  color: #a9bdd4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.prompt-style-dialog h3 {
  margin: 3px 0 0;
  color: var(--movie-heading-accent);
  font-size: 22px;
  line-height: 1.25;
  text-shadow: 0 0 12px rgba(255, 242, 0, .38);
}

.prompt-style-dialog pre {
  margin: 0;
  padding: 20px;
  color: #f4f7fb;
  white-space: pre-wrap;
  overflow: auto;
  font: 14px/1.8 'Prompt', system-ui, sans-serif;
  background: linear-gradient(180deg, rgba(18, 23, 34, .96), rgba(10, 15, 24, .96));
}

.prompt-style-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.prompt-dialog-open {
  overflow: hidden;
}

.choice-check,
.compact-check,
.tone-check,
.visual-choice.selected .choice-check,
.compact-choice.selected .compact-check,
.tone-choice.selected .tone-check {
  display: none;
}

.setup-layout .character-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.visual-choice {
  min-width: 0;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: 0;
  border: 1px solid #334052;
  border-radius: 16px;
  background: #0c1119;
  color: #fff;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.visual-choice::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(4, 7, 12, 0.9) 100%);
  content: "";
}

.visual-choice:hover {
  transform: translateY(-2px);
  border-color: #6f829f;
}

.visual-choice.selected {
  border: 2px solid var(--movie-heading-accent);
  box-shadow: 0 0 0 2px rgba(255, 242, 0, 0.2), 0 0 22px rgba(255, 242, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.25);
}

.visual-choice img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.custom-choice-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #202b3b, #171d2a 55%, #291b31);
  color: #94a3b8;
  font-size: 36px;
}

.visual-choice:hover img {
  transform: scale(1.035);
}

.choice-number,
.choice-check,
.choice-label,
.choice-active-label {
  position: absolute;
  z-index: 1;
}

.choice-number {
  top: 8px;
  left: 8px;
  min-width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(5, 9, 15, 0.7);
  font-size: 9px;
  font-weight: 700;
}

.choice-label {
  right: 10px;
  bottom: 10px;
  left: 10px;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 2px 5px #000;
}

.choice-active-label {
  top: 50%;
  left: 50%;
  display: none;
  padding: 8px 14px;
  border: 1px solid rgba(255, 242, 0, .72);
  border-radius: 999px;
  background: rgba(5, 8, 12, .62);
  color: var(--movie-heading-accent);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .58), 0 0 12px rgba(255, 242, 0, .32);
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.visual-choice.selected img,
.visual-choice.selected .custom-choice-art {
  filter: brightness(.58) saturate(.88);
}

.visual-choice.selected::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, .26), rgba(3, 5, 9, .82) 100%);
}

.visual-choice.selected .choice-active-label {
  display: block;
}

.choice-check {
  top: 42px;
  right: 10px;
  width: 23px;
  height: 23px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-gradient);
  font-size: 11px;
}

.visual-choice.selected .choice-check {
  display: grid;
}

.compact-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-world-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.compact-choice {
  min-width: 0;
  min-height: 72px;
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 46px 11px 11px;
  border: 1px solid #303d51;
  border-radius: 16px;
  background: #111823;
  color: #dce5ef;
  text-align: left;
}

.project-world-choice {
  min-height: 88px;
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 16px 50px 16px 16px;
  border-radius: 12px;
  background: rgba(15, 19, 28, 0.72);
}

.project-world-choice > span:nth-of-type(2) {
  display: grid;
  align-self: stretch;
  align-content: center;
  min-height: 38px;
}

.compact-choice:hover {
  border-color: #667a98;
  background: #161f2d;
}

.compact-choice.selected {
  border-color: var(--cyan);
  background: rgba(34, 207, 255, 0.08);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.compact-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #202b3b;
  color: #a7bdd4;
  font-size: 16px;
}

.project-world-choice .compact-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.compact-choice strong,
.compact-choice small {
  display: block;
}

.compact-choice > span:nth-of-type(2) {
  align-self: center;
}

.compact-choice strong {
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.25;
}

.compact-choice small {
  margin-top: 2px;
  color: #77859a;
  font-size: 9px;
  line-height: 1.4;
}

.project-world-choice strong {
  font-size: 14px;
  line-height: 1.18;
}

.project-world-choice small {
  margin-top: 3px;
  font-size: 10px;
  font-style: italic;
  line-height: 1.25;
}

.compact-gear {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: #8b97a8;
  font-size: 13px;
}

.compact-check {
  width: 20px;
  height: 20px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #07141a;
  font-size: 10px;
  font-weight: 800;
}

.compact-choice.selected .compact-check {
  display: grid;
}

.structure-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tone-section .setup-section-heading {
  align-items: flex-start;
}

.tone-section {
  margin-top: -6px;
}

.tone-section .setup-section-heading > div {
  flex: 1;
}

.tone-selection-count {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid rgba(255, 79, 139, 0.32);
  border-radius: 999px;
  background: rgba(255, 79, 139, 0.16);
  color: #d8b1d0;
  font-size: 11px;
  font-weight: 800;
}

.tone-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.tone-choice {
  position: relative;
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 12px 34px 11px;
  border: 1px solid rgba(67, 76, 92, 0.78);
  border-radius: 13px;
  background: rgba(18, 20, 24, 0.92);
  color: #8d97a9;
  text-align: center;
}

.tone-choice:hover {
  border-color: #667a98;
  background: rgba(24, 28, 35, 0.96);
}

.tone-choice.selected {
  border-color: rgba(34, 207, 255, 0.74);
  background: rgba(34, 207, 255, 0.08);
  color: #f1f7ff;
}

.tone-icon {
  color: #748094;
  font-size: 19px;
  line-height: 1;
}

.tone-choice strong {
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.tone-choice .compact-gear {
  top: 8px;
  right: 8px;
}

.tone-check {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: none;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.tone-choice.selected .tone-check {
  display: block;
}

.story-slider-panel {
  display: grid;
  gap: 22px;
  width: 100%;
  margin: 0;
}

.episode-target-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(10, 10, 12, 0.92);
  color: #d9dde8;
}

.episode-target-row {
  display: grid;
  gap: 12px;
}

.episode-target-heading,
.episode-management-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.episode-target-heading strong,
.episode-management-row strong {
  color: #aeb3c0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.episode-target-heading b,
.episode-management-row b {
  flex: 0 0 auto;
  padding: 4px 13px;
  border: 1px solid rgba(255, 79, 185, 0.36);
  border-radius: 999px;
  background: rgba(255, 79, 185, 0.16);
  color: #e879d7;
  font-size: 11px;
  font-weight: 900;
}

.episode-option-grid {
  display: grid;
  gap: 10px;
}

.episode-limit-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.episode-script-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.episode-option {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
  color: #9ca3b5;
  font-size: 14px;
  font-weight: 900;
}

.episode-option:hover {
  border-color: rgba(255, 79, 185, 0.5);
  color: #f3e7f1;
}

.episode-option.selected {
  border-color: rgba(255, 139, 214, 0.8);
  background: #e90083;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.episode-management-row {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.episode-management-row span {
  color: #ff4fbd;
  font-size: 20px;
}

.episode-management-row strong {
  margin-right: auto;
}

.plot-builder-panel {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(10, 10, 12, 0.94);
  color: #d9dde8;
}

.episode-tab-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: 100%;
}

.episode-tab {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(15, 18, 26, 0.94);
  color: #aeb7c8;
  font-size: 14px;
  font-weight: 900;
}

.episode-tab:hover {
  border-color: rgba(255, 79, 185, 0.52);
  color: #ffffff;
}

.episode-tab.selected {
  border-color: rgba(255, 79, 185, 0.76);
  background: linear-gradient(135deg, rgba(255, 79, 139, 0.72), rgba(104, 99, 255, 0.72));
  color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 79, 185, 0.22);
}

.plot-builder-heading,
.plot-builder-heading > div,
.plot-builder-actions,
.plot-builder-assets,
.plot-builder-asset,
.plot-core-label {
  display: flex;
  align-items: center;
}

.plot-builder-heading {
  justify-content: space-between;
  gap: 18px;
}

.plot-builder-heading > div:first-child {
  gap: 12px;
}

.plot-builder-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #c166ff;
  font-size: 20px;
}

.plot-builder-heading strong {
  color: #b8becb;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.plot-builder-actions {
  gap: 10px;
}

.plot-builder-actions button {
  min-height: 42px;
  padding: 0 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 900;
}

.plot-builder-actions button:first-child {
  border: 1px solid rgba(255, 79, 185, 0.48);
  color: #ff5fbe;
}

.plot-builder-actions button:last-child {
  border: 1px solid rgba(255, 117, 20, 0.56);
  color: #ff9a24;
}

.plot-title-input {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
  font-size: 21px;
  font-style: italic;
  font-weight: 900;
}

.plot-episode-title-input {
  width: 100%;
  height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 79, 185, 0.22);
  border-radius: 14px;
  background: rgba(255, 79, 185, 0.035);
  color: #f9dfff;
  font-size: 15px;
  font-weight: 900;
}

.plot-core-field {
  display: grid;
  gap: 14px;
}

.plot-core-label {
  justify-content: space-between;
  gap: 16px;
  color: #aeb3c0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.plot-core-label span {
  color: #4f8fec;
  font-size: 11px;
  letter-spacing: 0;
}

.plot-core-field textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.022);
  color: #eef3ff;
  font-size: 15px;
  font-weight: 700;
}

.plot-core-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.36);
}

.plot-builder-assets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.plot-builder-asset {
  min-width: 0;
  display: grid;
  gap: 14px;
  color: #b8becb;
  font-size: 13px;
  font-weight: 900;
}

.plot-builder-asset-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}

.plot-builder-asset-head > span {
  color: #c166ff;
  font-size: 24px;
}

.plot-builder-asset-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 79, 185, 0.58);
  border-radius: 9px;
  background: rgba(255, 79, 185, 0.16);
  color: #ff5fbe;
  font-size: 22px;
}

.plot-builder-asset-head small {
  color: #657086;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.plot-builder-asset-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.plot-summary-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.028);
}

.plot-summary-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: rgba(79, 143, 236, 0.16);
  color: #9fc3ff;
  font-size: 13px;
}

.plot-summary-row div {
  min-width: 0;
}

.plot-summary-row strong {
  display: block;
  color: #eef3ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plot-summary-row small {
  display: block;
  margin-top: 2px;
  color: #8492aa;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plot-location-row {
  min-height: 46px;
}

.plot-builder-asset-list p {
  margin: 0;
  color: #657086;
  font-size: 11px;
}

.production-model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  align-items: start;
  gap: 18px;
  width: 100%;
}

.production-side-stack {
  display: grid;
  gap: 18px;
}

.production-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(10, 10, 12, 0.94);
  color: #d9dde8;
}

.production-card-large {
  gap: 14px;
}

.production-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.production-heading span {
  color: #c166ff;
  font-size: 19px;
}

.production-heading h3 {
  margin: 0;
  color: #b8becb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.production-select {
  display: grid;
  gap: 7px;
}

.production-select > span,
.production-choice-block > span {
  color: #aeb3c0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.production-select button,
.production-select select {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
  text-align: left;
}

.production-select select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #9eb0c9 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #9eb0c9 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.035);
  color: #fff000;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.production-select select option {
  background: #111722;
  color: #eef3ff;
}

.production-video-picker {
  position: relative;
}

.production-video-trigger {
  justify-content: space-between;
}

.production-video-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  max-height: 330px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(94, 211, 255, 0.46);
  border-radius: 12px;
  background: #0d1726;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42), 0 0 16px rgba(72, 194, 255, 0.14);
}

.production-video-menu[hidden] {
  display: none;
}

.production-video-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eef3ff;
  cursor: pointer;
  font-weight: 900;
}

.production-video-menu button:hover,
.production-video-menu button:focus-visible,
.production-video-menu button.selected {
  outline: none;
  background: rgba(94, 211, 255, 0.12);
  color: #ffffff;
}

.production-video-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.production-video-menu button:disabled:hover {
  background: transparent;
}

.production-video-menu small {
  color: #fff000;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.production-model-settings {
  display: grid;
  gap: 12px;
}

.production-model-settings > span {
  color: #aeb3c0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.production-reference-mode {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.production-reference-mode button {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 72px;
  padding: 14px 16px;
  text-align: center;
}

.production-reference-mode button small {
  color: #91a0b8;
  font-size: 10px;
  font-weight: 700;
}

.production-reference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.production-reference-grid button,
.production-reference-box {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px dashed rgba(94, 211, 255, 0.32);
  border-radius: 11px;
  background: rgba(94, 211, 255, 0.04);
  color: #dce8f6;
  font-weight: 800;
}

.production-reference-box {
  display: grid;
  gap: 3px;
}

.production-reference-box small {
  color: #91a0b8;
  font-size: 11px;
  line-height: 1.5;
}

.production-duration-slider {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.production-duration-slider output {
  justify-self: end;
  color: #fff000;
  font-size: 13px;
  font-weight: 900;
}

.production-duration-slider input {
  width: 100%;
  height: 12px;
  appearance: none;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #e80d94 0%, #9a52ff var(--production-duration-fill, 50%), rgba(255, 255, 255, 0.09) var(--production-duration-fill, 50%), rgba(255, 255, 255, 0.09) 100%);
}

.production-duration-slider input::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: #fff000;
  box-shadow: 0 0 14px rgba(255, 240, 0, 0.36);
}

.production-duration-slider input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: #fff000;
  box-shadow: 0 0 14px rgba(255, 240, 0, 0.36);
}

.production-select button strong {
  flex: 1;
  font-size: 14px;
}

.production-select button em {
  padding: 3px 10px;
  border-radius: 999px;
  background: #e90083;
  color: #ffffff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.production-select button b {
  color: #858c9c;
}

.production-select small {
  color: #8c92a0;
  font-size: 10px;
  font-style: italic;
}

.production-warning {
  margin: -4px 0 4px;
  padding: 12px;
  border: 1px solid rgba(255, 79, 139, 0.38);
  border-radius: 8px;
  background: rgba(255, 79, 139, 0.16);
  color: #f39ac6;
  font-size: 10px;
  font-weight: 800;
}

.production-choice-block {
  display: grid;
  gap: 10px;
}

.production-segment {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.production-duration {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.production-aspect {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.production-segment button,
.production-language-grid button,
.voice-casting-grid button {
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(85, 198, 217, 0.26);
  border-radius: 12px;
  background: rgba(13, 19, 29, 0.88);
  color: #b8c7dc;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.production-segment button:hover,
.production-language-grid button:hover,
.voice-casting-grid button:hover {
  border-color: rgba(85, 198, 217, 0.62);
  background: rgba(85, 198, 217, 0.09);
  color: #ffffff;
  transform: translateY(-1px);
}

.production-segment button.selected,
.production-language-grid button.selected,
.voice-casting-grid button.selected {
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, #f7058b, #9426ff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(231, 13, 148, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.shot-estimate-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.shot-estimate-panel h4 {
  margin: 0;
  color: #ff5fbe;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.shot-estimate-panel > div {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 79, 185, 0.24);
  border-radius: 8px;
  background: rgba(255, 79, 185, 0.08);
}

.shot-estimate-panel span {
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(255, 79, 185, 0.16);
  color: #ff8bdd;
  font-size: 11px;
  font-weight: 900;
}

.shot-estimate-panel strong {
  color: #d9dde8;
  font-size: 11px;
}

.shot-estimate-panel b,
.shot-estimate-panel em {
  color: #d96cd0;
  font-size: 9px;
  font-style: normal;
  text-align: right;
}

.production-language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.production-language-grid button,
.voice-casting-grid button {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.production-language-grid button:last-child {
  grid-column: span 1;
}

.voice-casting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.voice-casting-grid button {
  display: grid;
  place-items: center;
  gap: 4px;
}

.voice-casting-grid button strong {
  font-size: 11px;
}

.production-custom-prompt {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.production-custom-prompt span {
  color: #dce8f6;
  font-size: 11px;
  font-weight: 900;
}

.production-custom-prompt textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid rgba(85, 198, 217, 0.28);
  border-radius: 12px;
  background: rgba(13, 19, 29, 0.88);
  color: #edf2f7;
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.production-custom-prompt textarea::placeholder {
  color: #66748a;
}

.story-slider-card {
  padding: 20px 18px 18px;
  border: 1px solid rgba(255, 35, 135, 0.36);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 35, 135, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(22, 3, 16, 0.96), rgba(14, 7, 15, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 45px rgba(0, 0, 0, 0.25);
}

.story-slider-heading,
.story-slider-heading > div,
.story-slider-labels,
.story-range-marks {
  display: flex;
  align-items: center;
}

.story-slider-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.story-slider-heading > div {
  position: relative;
  gap: 10px;
}

.story-slider-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 79, 139, 0.5);
  border-radius: 9px;
  background: rgba(255, 79, 139, 0.18);
  color: #ff4f8b;
  font-size: 16px;
}

.story-slider-heading h3 {
  margin: 0;
  color: #fff000;
  font-size: 15px;
  font-weight: 900;
}

.story-slider-heading .compact-gear {
  position: static;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: rgba(255, 255, 255, .04);
  color: #cbd6e6;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 0;
}

.story-slider-heading .compact-gear:hover,
.story-slider-heading .compact-gear:focus-visible {
  outline: none;
  border-color: rgba(255, 242, 0, .5);
  color: var(--movie-heading-accent);
  box-shadow: 0 0 12px rgba(255, 242, 0, .16);
}

.story-slider-heading b {
  min-width: 44px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 231, 0, 0.46);
  border-radius: 999px;
  background: rgba(255, 214, 0, 0.17);
  color: #fff000;
  font-size: 12px;
  text-align: center;
}

.story-slider-labels {
  justify-content: space-between;
  margin-bottom: 9px;
  color: #f7d9ee;
  font-size: 12px;
  font-weight: 800;
}

.story-range-wrap {
  position: relative;
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid rgba(72, 82, 96, 0.72);
  border-radius: 13px;
  background: #1c1f26;
  box-shadow: inset 0 0 13px rgba(0, 0, 0, 0.42);
}

.story-range {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 24px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #0bbcff 0%, #15d5cf 48%, #ffe900 100%) 0 0 / var(--value) 100% no-repeat,
    #272a31;
  cursor: pointer;
}

.story-range::-webkit-slider-thumb {
  width: 48px;
  height: 24px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #ffe900;
  box-shadow: 0 0 12px rgba(255, 233, 0, 0.62);
}

.story-range::-moz-range-thumb {
  width: 48px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #ffe900;
  box-shadow: 0 0 12px rgba(255, 233, 0, 0.62);
}

.story-range-value {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: clamp(24px, var(--marker-left, 50%), calc(100% - 24px));
  min-width: 48px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffe900;
  color: #101010;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255, 233, 0, 0.62);
}

.story-range-marks {
  position: absolute;
  z-index: 1;
  inset: 0 20px;
  justify-content: space-between;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 800;
}

.story-slider-note {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.story-slider-note strong {
  color: #fff7a8;
  font-size: 13px;
}

.story-slider-note small {
  color: #f0d9e7;
  font-size: 11px;
}

.asset-design-panel {
  display: grid;
  gap: 26px;
  width: 100%;
}

.asset-design-hero {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 2fr);
  align-items: center;
  gap: 22px;
  min-height: 80px;
  padding: 14px 20px;
  border: 1px solid rgba(67, 82, 110, 0.58);
  border-radius: 22px;
  background: rgba(12, 17, 26, 0.95);
}

.asset-design-hero > div,
.asset-section-heading,
.asset-section-heading > div,
.asset-section-actions,
.portrait-actions,
.asset-prompt-row {
  display: flex;
  align-items: center;
}

.asset-design-hero > div {
  gap: 12px;
  min-width: 0;
}

.asset-design-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(34, 117, 255, 0.55);
  border-radius: 13px;
  background: rgba(16, 74, 190, 0.28);
  color: #57a6ff;
  font-size: 18px;
}

.asset-design-hero small,
.asset-field span,
.asset-section-heading h3 {
  color: #98a5bb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.asset-design-hero strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.35;
}

.asset-generate-all {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #111318;
  font-weight: 900;
  box-shadow: 0 15px 28px rgba(255, 255, 255, 0.08);
}

.asset-design-section {
  display: grid;
  gap: 16px;
}

.asset-section-heading {
  justify-content: space-between;
  gap: 18px;
}

.asset-section-heading > div:first-child {
  gap: 12px;
}

.asset-section-heading > div:first-child > span {
  color: #1bcfff;
  font-size: 18px;
}

.asset-section-heading h3 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  font-style: italic;
  letter-spacing: 0.02em;
}

.asset-section-heading small {
  display: block;
  margin-top: 2px;
  color: #8ea2bd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.asset-section-actions {
  gap: 10px;
}

.asset-section-actions button,
.asset-prompt-row button {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #ff69c3;
  border: 1px solid rgba(255, 79, 185, 0.46);
  font-size: 12px;
  font-weight: 900;
}

.asset-section-actions button:last-child {
  color: #58a8ff;
  border-color: rgba(62, 145, 255, 0.48);
}

.character-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.asset-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border: 1px dashed rgba(85, 198, 217, 0.32);
  border-radius: 14px;
  background: rgba(85, 198, 217, 0.05);
  color: #9fb2cc;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.character-sheet-card,
.location-sheet-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(10, 10, 12, 0.88);
  color: #d9dde8;
}

.character-sheet-card.is-placeholder,
.location-sheet-card.is-placeholder {
  border-style: dashed;
  border-color: rgba(85, 198, 217, 0.34);
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.055), rgba(135, 88, 255, 0.045)),
    rgba(10, 14, 22, 0.84);
}

.character-sheet-card.is-placeholder textarea,
.location-sheet-card.is-placeholder input,
.location-sheet-card.is-placeholder textarea {
  color: rgba(220, 232, 246, 0.6);
}

.character-sheet-card.is-placeholder button:disabled,
.location-sheet-card.is-placeholder button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.character-sheet-card {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  padding: 20px;
}

.asset-delete-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 79, 79, 0.24);
  border-radius: 9px;
  background: rgba(255, 79, 79, 0.08);
  color: rgba(255, 102, 122, 0.72);
  font-size: 15px;
}

.character-portrait-column {
  display: grid;
  grid-template-rows: minmax(280px, 1fr) auto;
  gap: 12px;
  min-width: 0;
}

.character-portrait-column > strong {
  color: #bfc5d3;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.character-portrait-placeholder {
  position: relative;
  display: grid;
  min-height: 280px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: #07080a;
  color: rgba(255, 255, 255, 0.14);
}

.character-portrait-placeholder img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.character-portrait-placeholder span,
.character-portrait-placeholder small {
  grid-area: 1 / 1;
}

.character-portrait-placeholder small {
  margin-top: 42px;
  color: rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.character-portrait-placeholder.has-preview small,
.character-portrait-placeholder.has-preview > span {
  display: none;
}

.character-portrait-placeholder b {
  grid-area: 1 / 1;
  z-index: 2;
  align-self: end;
  justify-self: center;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(85, 198, 217, 0.38);
  border-radius: 999px;
  background: rgba(10, 17, 27, 0.86);
  color: #dce8f6;
  font-size: 11px;
  font-weight: 900;
}

.portrait-preview-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(85, 198, 217, 0.42);
  border-radius: 10px;
  background: rgba(10, 17, 27, 0.86);
  color: #dce8f6;
  font-size: 11px;
  font-weight: 900;
}

.portrait-preview-button:hover {
  border-color: rgba(85, 198, 217, 0.72);
  background: rgba(85, 198, 217, 0.12);
  color: #ffffff;
}

.portrait-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.portrait-upload {
  min-height: 48px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.portrait-generate {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #f833a2;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.asset-generate-all:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.character-form-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding-right: 8px;
}

.character-identity {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(85, 198, 217, 0.26);
  border-radius: 14px;
  background: rgba(85, 198, 217, 0.055);
}

.character-identity span {
  color: #8ea2bd;
  font-size: 10px;
  font-weight: 900;
}

.character-identity strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
}

.character-identity small {
  color: #dce8f6;
  font-size: 12px;
  line-height: 1.45;
}

.asset-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.asset-field-wide,
.asset-prompt-row {
  grid-column: 1 / -1;
}

.asset-field input,
.asset-field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #f4f6fb;
  padding: 12px 14px;
}

.asset-field textarea {
  min-height: 66px;
  resize: vertical;
}

.asset-field-wide textarea {
  min-height: 92px;
}

.asset-field input::placeholder,
.asset-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.34);
}

.asset-prompt-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.asset-prompt-row button:first-child {
  color: #ff69c3;
  border-color: rgba(255, 79, 185, 0.46);
}

.asset-prompt-row .asset-delete-inline {
  color: #ff8896;
  border-color: rgba(255, 79, 95, 0.42);
  background: rgba(255, 79, 95, 0.08);
}

.asset-prompt-row .asset-delete-inline:hover {
  color: #ffffff;
  border-color: rgba(255, 112, 128, 0.72);
  background: rgba(255, 79, 95, 0.16);
}

.location-design-section {
  padding-top: 4px;
}

.location-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.location-sheet-card {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(0, 1.7fr);
  align-items: stretch;
  gap: 20px;
  padding: 20px 22px;
}

.location-preview {
  position: relative;
  display: grid;
  align-self: stretch;
  aspect-ratio: 16 / 9;
  min-height: 150px;
  width: 100%;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(34, 207, 255, 0.12), rgba(255, 79, 185, 0.08));
  color: rgba(255, 255, 255, 0.36);
}

.location-preview span,
.location-preview small {
  grid-area: 1 / 1;
}

.location-preview img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.location-preview small {
  margin-top: 44px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.location-preview.has-preview small,
.location-preview.has-preview > span {
  display: none;
}

.location-preview b {
  grid-area: 1 / 1;
  z-index: 2;
  align-self: end;
  justify-self: center;
  margin-bottom: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(85, 198, 217, 0.38);
  border-radius: 999px;
  background: rgba(10, 17, 27, 0.86);
  color: #dce8f6;
  font-size: 11px;
  font-weight: 900;
}

.location-upload-button,
.location-preview-button {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, border-color .16s ease, background .16s ease;
}

.location-preview:hover .location-upload-button,
.location-preview:hover .location-preview-button,
.location-preview:focus-within .location-upload-button,
.location-preview:focus-within .location-preview-button {
  opacity: 1;
  pointer-events: auto;
}

.location-upload-button {
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(10, 17, 27, 0.86);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  transform: translate(-50%, -50%) scale(.96);
}

.location-preview:hover .location-upload-button,
.location-preview:focus-within .location-upload-button {
  transform: translate(-50%, -50%) scale(1);
}

.location-preview-button {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(85, 198, 217, 0.42);
  border-radius: 10px;
  background: rgba(10, 17, 27, 0.86);
  color: #dce8f6;
  font-size: 14px;
  font-weight: 900;
}

.location-upload-button:hover,
.location-preview-button:hover {
  border-color: rgba(85, 198, 217, 0.72);
  background: rgba(85, 198, 217, 0.14);
}

.location-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding-right: 2px;
}

.location-copy .asset-field textarea {
  min-height: 68px;
}

.location-copy .asset-prompt-row {
  margin-top: 2px;
}

.storyboard-build-panel {
  display: grid;
  gap: 20px;
  width: 100%;
}

.storyboard-control-card {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(67, 82, 110, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 6% 0%, rgba(255, 79, 139, 0.11), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(34, 207, 255, 0.08), transparent 30%),
    rgba(12, 17, 26, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.storyboard-control-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 2px;
}

.storyboard-control-card header div {
  display: grid;
  gap: 1px;
}

.storyboard-control-card header span {
  color: #8fb7ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.storyboard-control-card header strong {
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
}

.storyboard-control-card header small {
  color: #8fa0b8;
  font-size: 11px;
  font-weight: 800;
}

.storyboard-episode-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
}

.storyboard-episode-status button {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 50px;
  padding: 8px 12px;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 14px;
  background: rgba(19, 26, 37, 0.9);
  color: #aeb9ca;
  text-align: center;
  font-weight: 900;
}

.storyboard-episode-status button strong {
  color: #ffffff;
  font-size: 13px;
}

.storyboard-episode-status button small {
  color: #8ea2bd;
  font-size: 11px;
}

.storyboard-episode-status button.selected {
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, #f7058b, #9426ff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(231, 13, 148, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.storyboard-episode-status button.image-ready small {
  color: #35d5ff;
}

.storyboard-episode-status button.video-ready small {
  color: #fff000;
}

.storyboard-episode-status button.done small {
  color: #6bd6a0;
}

.storyboard-episode-status button.selected strong,
.storyboard-episode-status button.selected small {
  color: #ffffff;
}

.export-episode-status {
  margin-bottom: 22px;
}

.export-episode-status button.preview-ready:not(.selected) {
  border-color: rgba(54, 214, 255, 0.42);
  background: rgba(30, 66, 84, 0.34);
}

.export-episode-status button.preview-ready:not(.selected) small {
  color: #35d5ff;
}

.export-episode-status button.preview-empty {
  cursor: not-allowed;
  opacity: 0.58;
}

.storyboard-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(67, 82, 110, 0.64);
  border-radius: 14px;
  background: rgba(12, 17, 26, 0.94);
}

.storyboard-mode-tabs button {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 10px;
  background: rgba(19, 26, 37, 0.9);
  color: #aeb9ca;
  font-size: 14px;
  font-weight: 900;
}

.storyboard-mode-tabs button:hover {
  border-color: rgba(34, 207, 255, 0.46);
  color: #ffffff;
}

.storyboard-mode-tabs button.selected {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 20px rgba(34, 207, 255, 0.12);
}

.storyboard-mode-tabs button.is-view {
  border-color: rgba(54, 214, 255, 0.74);
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.22), rgba(93, 118, 255, 0.38)),
    rgba(17, 31, 49, 0.96);
  color: #eaf8ff;
  box-shadow: 0 0 18px rgba(34, 207, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.storyboard-mode-tabs button.is-ready-build {
  border-color: rgba(107, 214, 160, 0.62);
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.16), rgba(107, 214, 160, 0.24)),
    rgba(14, 32, 37, 0.96);
  color: #dfffee;
  box-shadow: 0 0 18px rgba(107, 214, 160, 0.1), inset 0 0 0 1px rgba(107, 214, 160, 0.08);
}

.storyboard-mode-tabs button.is-armed {
  border-color: rgba(255, 242, 0, 0.78);
  background:
    linear-gradient(135deg, rgba(255, 242, 0, 0.18), rgba(107, 214, 160, 0.18)),
    rgba(25, 31, 24, 0.96);
  color: var(--movie-heading-accent);
  box-shadow: 0 0 22px rgba(255, 242, 0, 0.18), inset 0 0 0 1px rgba(255, 242, 0, 0.16);
  animation: armedTextPulse 1s ease-in-out infinite;
}

.storyboard-mode-tabs button.is-generating {
  border-color: rgba(255, 138, 29, 0.68);
  background:
    linear-gradient(135deg, rgba(255, 138, 29, 0.28), rgba(255, 79, 139, 0.18)),
    rgba(24, 24, 18, 0.96);
  color: #ffe0c8;
  box-shadow: 0 0 20px rgba(255, 138, 29, 0.14), inset 0 0 0 1px rgba(255, 138, 29, 0.08);
}

.storyboard-mode-tabs button.is-waiting {
  border-color: rgba(61, 75, 100, 0.88);
  background: rgba(13, 19, 29, 0.9);
  color: #8d9ab0;
}

.storyboard-mode-tabs button.selected.is-view,
.storyboard-mode-tabs button.selected.is-ready-build,
.storyboard-mode-tabs button.selected.is-armed,
.storyboard-mode-tabs button.selected.is-generating {
  transform: translateY(-1px);
}

.storyboard-mode-tabs button.selected.is-view {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 0 24px rgba(34, 207, 255, 0.18);
}

.storyboard-mode-tabs button.selected.is-ready-build {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 0 24px rgba(107, 214, 160, 0.18);
}

.storyboard-mode-tabs button.selected.is-armed {
  box-shadow: 0 0 0 1px rgba(255, 242, 0, 0.22) inset, 0 0 26px rgba(255, 242, 0, 0.2);
}

.storyboard-mode-tabs button.selected.is-generating {
  box-shadow: 0 0 0 1px rgba(255, 138, 29, 0.14) inset, 0 0 24px rgba(255, 138, 29, 0.18);
}

@keyframes armedTextPulse {
  0%, 100% {
    color: var(--movie-heading-accent);
    text-shadow: 0 0 6px rgba(255, 242, 0, 0.48);
  }
  50% {
    color: #ffffff;
    text-shadow: 0 0 14px rgba(255, 242, 0, 0.95), 0 0 26px rgba(255, 242, 0, 0.42);
  }
}

.workflow-style-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
}

.workflow-style-panel button {
  display: grid;
  gap: 2px;
  min-height: 54px;
  place-items: center;
  align-content: center;
  padding: 9px 12px;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.05), rgba(255, 79, 139, 0.04)),
    rgba(19, 26, 37, 0.9);
  color: #dce8f6;
  text-align: center;
}

.workflow-style-panel button:nth-child(5n + 1) {
  background:
    linear-gradient(135deg, rgba(255, 79, 139, 0.12), rgba(148, 38, 255, 0.08)),
    rgba(19, 26, 37, 0.9);
}

.workflow-style-panel button:nth-child(5n + 2) {
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.1), rgba(94, 126, 255, 0.08)),
    rgba(19, 26, 37, 0.9);
}

.workflow-style-panel button:nth-child(5n + 3) {
  background:
    linear-gradient(135deg, rgba(255, 240, 0, 0.08), rgba(85, 198, 217, 0.08)),
    rgba(19, 26, 37, 0.9);
}

.workflow-style-panel button:nth-child(5n + 4) {
  background:
    linear-gradient(135deg, rgba(255, 154, 97, 0.11), rgba(255, 79, 139, 0.07)),
    rgba(19, 26, 37, 0.9);
}

.workflow-style-panel button:nth-child(5n + 5) {
  background:
    linear-gradient(135deg, rgba(107, 214, 160, 0.1), rgba(148, 38, 255, 0.08)),
    rgba(19, 26, 37, 0.9);
}

.workflow-style-panel button:hover {
  border-color: rgba(34, 207, 255, 0.48);
  background: rgba(34, 207, 255, 0.08);
  color: #ffffff;
}

.workflow-style-panel button.selected {
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, #f7058b, #9426ff);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(231, 13, 148, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.workflow-style-panel button.selected:nth-child(n) {
  background: linear-gradient(135deg, #f7058b, #9426ff);
}

.workflow-style-panel strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.workflow-style-panel small {
  color: #9fb0c5;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.35;
}

.workflow-style-panel button.selected small {
  color: #ffffff;
}

.workflow-prompt-preview {
  position: fixed;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(72vh, 680px);
  overflow: hidden;
  border: 1px solid rgba(85, 198, 217, 0.35);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 79, 139, 0.18), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(34, 207, 255, 0.13), transparent 30%),
    rgba(8, 13, 22, 0.98);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  color: #f4f8ff;
}

.workflow-prompt-preview header {
  display: grid;
  gap: 2px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.workflow-prompt-preview header span {
  color: #fff000;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.workflow-prompt-preview header strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
}

.workflow-prompt-preview header small {
  color: #9eeeff;
  font-size: 12px;
  font-weight: 800;
}

.workflow-prompt-preview pre {
  max-height: calc(min(72vh, 680px) - 82px);
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: #dce8f6;
  font: 12px/1.7 'Prompt', system-ui, sans-serif;
  white-space: pre-wrap;
  scrollbar-width: thin;
  scrollbar-color: #55c6d9 rgba(21, 29, 42, 0.92);
}

.workflow-prompt-preview pre::-webkit-scrollbar {
  width: 8px;
}

.workflow-prompt-preview pre::-webkit-scrollbar-track {
  background: rgba(21, 29, 42, 0.92);
}

.workflow-prompt-preview pre::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4f8b, #55c6d9);
}

.storyboard-placeholder {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px dashed rgba(85, 198, 217, 0.28);
  border-radius: 18px;
  background: rgba(12, 17, 26, 0.58);
  color: #dce8f6;
  text-align: center;
}

.storyboard-placeholder span {
  color: #55c6d9;
  font-size: 26px;
}

.storyboard-placeholder strong {
  font-size: 18px;
  font-weight: 900;
}

.storyboard-placeholder small {
  color: #8e9aab;
  font-size: 12px;
}

.storyboard-placeholder.is-generating {
  border-color: rgba(34, 207, 255, 0.48);
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 207, 255, 0.16), transparent 40%),
    rgba(12, 17, 26, 0.72);
}

.storyboard-placeholder.is-generating span {
  animation: storyboardPulse 1s ease-in-out infinite alternate;
}

@keyframes storyboardPulse {
  from { opacity: 0.45; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.04); }
}

.storyboard-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.storyboard-scene-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(67, 82, 110, 0.72);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 207, 255, 0.08), transparent 30%),
    rgba(12, 17, 26, 0.94);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.storyboard-scene-card header {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.storyboard-scene-card header span {
  width: max-content;
  padding: 5px 11px;
  border: 1px solid rgba(255, 79, 139, 0.46);
  border-radius: 999px;
  background: rgba(255, 79, 139, 0.14);
  color: #ff8abd;
  font-size: 11px;
  font-weight: 900;
}

.storyboard-scene-card header strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.storyboard-card-section,
.storyboard-dialogue-list {
  display: grid;
  gap: 9px;
}

.storyboard-card-section b,
.storyboard-dialogue-list > b {
  color: #8fb7ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.storyboard-card-section p {
  min-height: 58px;
  margin: 0;
  color: #dce6f3;
  font-size: 13px;
  line-height: 1.7;
}

.storyboard-dialogue-list div {
  display: grid;
  grid-template-columns: minmax(92px, 0.32fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.storyboard-dialogue-list div strong {
  color: #ffdf78;
  font-size: 12px;
  font-weight: 900;
}

.storyboard-dialogue-list div span {
  color: #f0f4fb;
  font-size: 12px;
  line-height: 1.55;
}

.storyboard-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.storyboard-image-grid.portrait-aspect {
  grid-template-columns: repeat(auto-fit, minmax(170px, 220px));
  justify-content: center;
}

.storyboard-image-grid.landscape-aspect {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.storyboard-image-card {
  overflow: hidden;
  border: 1px solid rgba(67, 82, 110, 0.72);
  border-radius: 16px;
  background: rgba(12, 17, 26, 0.94);
}

.storyboard-image-preview {
  display: grid;
  aspect-ratio: 16 / 9;
  min-height: 0;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.13), rgba(255, 79, 139, 0.1)),
    #101722;
  color: rgba(255, 255, 255, 0.42);
}

.storyboard-image-card.portrait-aspect .storyboard-image-preview {
  aspect-ratio: 9 / 16;
}

.storyboard-image-card.landscape-aspect .storyboard-image-preview {
  aspect-ratio: 16 / 9;
}

.storyboard-image-preview span,
.storyboard-image-preview small {
  grid-area: 1 / 1;
}

.storyboard-image-preview span {
  font-size: 26px;
}

.storyboard-image-preview.video-preview {
  background:
    linear-gradient(135deg, rgba(255, 154, 97, 0.16), rgba(93, 118, 255, 0.14)),
    #101722;
}

.storyboard-image-preview.video-preview span {
  font-size: 24px;
}

.storyboard-image-card.is-empty .storyboard-image-preview {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    linear-gradient(135deg, rgba(34, 207, 255, 0.08), rgba(255, 79, 139, 0.06)),
    #101722;
  color: rgba(255, 255, 255, 0.28);
}

.storyboard-image-card.is-generating .storyboard-image-preview span {
  animation: storyboardPulse 1s ease-in-out infinite alternate;
}

.storyboard-image-preview small {
  margin-top: 48px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.video-frame-pair-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 10, 18, 0.34);
}

.video-frame-mini {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 62px;
  align-content: center;
  padding: 9px 10px;
  border: 1px solid rgba(85, 198, 217, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(85, 198, 217, 0.1), rgba(255, 79, 139, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.video-frame-mini span {
  color: #35d5ff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.video-frame-mini strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-frame-mini small {
  color: #91a6bd;
  font-size: 9px;
  font-weight: 800;
}

.video-frame-flow {
  display: grid;
  place-items: center;
  color: #fff000;
  font-size: 16px;
  font-weight: 900;
}

.storyboard-image-card.portrait-aspect .video-frame-pair-preview {
  grid-template-columns: 1fr;
}

.storyboard-image-card.portrait-aspect .video-frame-flow {
  min-height: 18px;
  transform: rotate(90deg);
}

.storyboard-image-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.storyboard-image-actions button {
  min-height: 38px;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #dce8f6;
  font-size: 17px;
  font-weight: 900;
}

.storyboard-image-actions button:hover {
  border-color: rgba(34, 207, 255, 0.56);
  background: rgba(34, 207, 255, 0.08);
  color: #ffffff;
}

.editor-workbench {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 14px;
  width: 100%;
}

.editor-preview-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 14px;
  min-height: 0;
  height: clamp(560px, 70vh, 760px);
  align-items: stretch;
  box-sizing: border-box;
}

.editor-media-panel,
.editor-player,
.editor-export-panel,
.editor-tool-panel,
.editor-timeline-panel {
  border: 1px solid rgba(67, 82, 110, 0.72);
  border-radius: 16px;
  background: rgba(12, 17, 26, 0.94);
}

.editor-media-panel {
  display: grid;
  grid-template-rows: auto 56px minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  padding: 14px;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  margin-bottom: 0;
  align-self: stretch;
  overflow: hidden;
  box-sizing: border-box;
}

.editor-media-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-media-panel h3 {
  margin: 0;
  font-size: 16px;
}

.editor-media-panel p {
  margin: 3px 0 0;
  color: #8e9aab;
  font-size: 11px;
}

.editor-media-panel header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(85, 198, 217, 0.42);
  border-radius: 10px;
  background: rgba(85, 198, 217, 0.08);
  color: #9eeeff;
  font-size: 18px;
  font-weight: 900;
}

.editor-media-upload,
.editor-media-empty {
  display: grid;
  place-items: center;
  text-align: center;
}

.editor-media-upload {
  min-height: 56px;
  height: 56px;
  padding: 5px;
  border: 1px dashed rgba(85, 198, 217, 0.32);
  border-radius: 14px;
  background: rgba(85, 198, 217, 0.055);
}

.editor-media-upload span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(85, 198, 217, 0.13);
  color: #9eeeff;
  font-size: 17px;
}

.editor-media-upload strong,
.editor-media-empty strong {
  color: #ffffff;
  font-size: 11px;
}

.editor-media-upload small,
.editor-media-empty small {
  color: #8e9aab;
  font-size: 10px;
  line-height: 1.55;
}

.editor-media-upload button {
  width: 100%;
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(85, 198, 217, 0.5);
  border-radius: 8px;
  background: rgba(85, 198, 217, 0.12);
  color: #dffaff;
  font-weight: 900;
}

.editor-media-upload button span {
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.editor-media-empty {
  min-height: 150px;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-media-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 4px 8px 0;
  scrollbar-width: thin;
  scrollbar-color: #496277 rgba(21, 29, 42, 0.92);
  overscroll-behavior: contain;
}

.editor-media-list::-webkit-scrollbar {
  width: 8px;
}

.editor-media-list::-webkit-scrollbar-track {
  border: 1px solid rgba(67, 82, 110, 0.42);
  border-radius: 999px;
  background: rgba(21, 29, 42, 0.92);
}

.editor-media-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(21, 29, 42, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, #ff4f8b, #4cc6dc);
}

.editor-media-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff70a3, #74e2f0);
}

.editor-media-divider {
  display: flex;
  align-items: center;
  min-height: 26px;
  color: #fff000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 0 12px rgba(255, 240, 0, 0.22);
}

.editor-media-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 8px;
  border: 1px solid rgba(61, 75, 100, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #dce8f6;
  text-align: left;
}

.editor-media-item:hover {
  border-color: rgba(85, 198, 217, 0.52);
  background: rgba(85, 198, 217, 0.08);
}

.export-episode-media-item {
  border-color: rgba(85, 198, 217, 0.34);
  background: rgba(85, 198, 217, 0.055);
}

.export-episode-media-item:hover {
  border-color: rgba(255, 79, 139, 0.54);
  background: rgba(255, 79, 139, 0.08);
}

.editor-media-add {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.editor-media-add span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: rgba(85, 198, 217, 0.12);
  color: #9eeeff;
}

.editor-media-add strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.editor-media-add small {
  color: #8e9aab;
  font-size: 9px;
  font-weight: 900;
}

.editor-media-delete {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 79, 139, 0.36);
  border-radius: 8px;
  background: rgba(255, 79, 139, 0.08);
  color: #ff9ab9;
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.editor-media-delete:hover,
.editor-media-delete:focus-visible {
  outline: none;
  border-color: rgba(255, 112, 163, 0.76);
  background: rgba(255, 79, 139, 0.2);
  color: #ffffff;
}

.editor-player {
  overflow: hidden;
}

.editor-player-top,
.editor-playbar,
.editor-tool-panel,
.editor-tool-group,
.editor-zoom-tools,
.editor-ruler {
  display: flex;
  align-items: center;
}

.editor-player-top {
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e9aab;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.editor-player-top b {
  color: #55c6d9;
}

.editor-preview-screen {
  position: relative;
  display: grid;
  min-height: clamp(440px, 46vh, 620px);
  place-items: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(85, 198, 217, 0.18), transparent 32%),
    linear-gradient(145deg, #111a27, #070a10);
  color: #ffffff;
  text-align: center;
}

.editor-export-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(5, 9, 15, 0.82);
  backdrop-filter: blur(3px);
  color: #ffffff;
  text-align: center;
}

.editor-export-overlay strong {
  font-size: 22px;
}

.editor-export-overlay small {
  color: #b8c8d8;
}

.editor-export-progress {
  width: min(420px, 78vw);
  height: 10px;
  margin: 8px auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.editor-export-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--cyan));
  box-shadow: 0 0 14px rgba(85, 198, 217, 0.6);
  transition: width 0.18s ease-out;
}

.editor-export-percent {
  color: #ffffff;
  font-size: 16px;
}

.editor-export-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 4px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--cyan);
  border-right-color: var(--accent-2);
  border-radius: 50%;
  animation: editor-export-spin 0.8s linear infinite;
}

@keyframes editor-export-spin {
  to { transform: rotate(360deg); }
}

.editor-preview-screen strong {
  display: block;
  font-size: 32px;
  font-weight: 900;
}

.editor-preview-screen small {
  color: #9eb1c6;
}

.editor-episode-preview {
  display: grid;
  place-items: center;
  gap: 9px;
  width: min(560px, 86%);
  padding: 34px;
  border: 1px solid rgba(85, 198, 217, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 79, 139, 0.18), transparent 38%),
    rgba(7, 12, 20, 0.62);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
}

.editor-episode-preview span {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7058b, #9426ff);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 16px 36px rgba(231, 13, 148, 0.26);
}

.editor-episode-preview p {
  max-width: 46ch;
  margin: 0;
  color: #b8c8d8;
  font-size: 13px;
  line-height: 1.7;
}

.editor-preview-screen video,
.editor-preview-screen img {
  width: 100%;
  height: 100%;
  max-height: clamp(440px, 46vh, 620px);
  object-fit: contain;
  background: #06090f;
}

.editor-preview-screen .editor-preview-audio-bed {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.editor-audio-preview {
  display: grid;
  gap: 14px;
  min-width: min(420px, 90%);
}

.editor-playbar {
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-playbar button,
.editor-tool-panel button,
.editor-zoom-tools button {
  min-height: 36px;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: #dce8f6;
  font-weight: 900;
}

.editor-playbar button {
  min-width: 38px;
}

.editor-playbar span {
  margin-left: auto;
  color: #8e9aab;
  font-size: 12px;
  font-weight: 800;
}

.editor-export-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 13px;
  padding: 14px;
}

.editor-cover-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 79, 139, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 79, 139, 0.16), transparent 40%),
    rgba(255, 255, 255, 0.035);
}

.editor-cover-preview {
  display: grid;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  place-items: center;
  border: 1px dashed rgba(85, 198, 217, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(34, 207, 255, 0.14), rgba(255, 154, 97, 0.12)),
    #0c1119;
  color: rgba(255, 255, 255, 0.42);
}

.editor-cover-preview.portrait-aspect {
  width: min(180px, 100%);
  aspect-ratio: 9 / 16;
  justify-self: center;
}

.editor-cover-preview.landscape-aspect {
  aspect-ratio: 16 / 9;
}

.editor-cover-preview span,
.editor-cover-preview small {
  grid-area: 1 / 1;
}

.editor-cover-preview span {
  font-size: 28px;
}

.editor-cover-preview small {
  margin-top: 48px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.editor-cover-copy h3 {
  margin: 0;
  font-size: 16px;
}

.editor-cover-copy p {
  margin: 3px 0 0;
  color: #9eabbc;
  font-size: 11px;
}

.editor-cover-card button {
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff7a38, #ef4d8b 52%, #22cfff);
  color: #ffffff;
  font-weight: 900;
}

.editor-cover-settings {
  display: grid;
  gap: 10px;
}

.editor-cover-settings button {
  min-height: 40px;
  border: 1px solid rgba(85, 198, 217, 0.42);
  border-radius: 11px;
  background: rgba(85, 198, 217, 0.08);
  color: #dce8f6;
  font-weight: 900;
}

.editor-cover-settings button:hover {
  border-color: rgba(85, 198, 217, 0.68);
  background: rgba(85, 198, 217, 0.14);
  color: #ffffff;
}

.editor-export-panel h3 {
  margin: 0;
  font-size: 16px;
}

.editor-export-panel label {
  display: grid;
  gap: 6px;
}

.editor-export-panel label span {
  color: #9eabbc;
  font-size: 11px;
  font-weight: 800;
}

.editor-export-panel input,
.editor-export-panel select {
  width: 100%;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 10px;
  background: #0c1119;
  color: #ffffff;
  padding: 10px 11px;
}

.editor-export-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-self: stretch;
  gap: 13px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(67, 82, 110, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-export-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #9eabbc;
  font-size: 12px;
}

.editor-export-card .primary-button {
  width: 100%;
  min-height: 42px;
}

.editor-export-summary span {
  display: flex;
  justify-content: space-between;
}

.editor-export-summary b {
  color: #ffffff;
}

.editor-tool-panel {
  grid-column: 1 / -1;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px;
}

.editor-tool-group,
.editor-zoom-tools {
  gap: 8px;
  flex-wrap: wrap;
}

.editor-tool-panel button {
  padding: 0 12px;
  font-size: 12px;
}

.editor-zoom-tools {
  min-width: 170px;
  margin-left: auto;
  padding: 0 8px;
  border: 1px solid rgba(61, 75, 100, 0.88);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: #9eabbc;
  font-size: 12px;
  font-weight: 800;
}

.editor-zoom-tools button {
  width: 28px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}

.editor-zoom-tools input {
  width: 82px;
  accent-color: #dce8f6;
}

.editor-timeline-panel {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: clamp(330px, 34vh, 460px);
  --track-label-width: 132;
  --playhead-x: 132px;
}

.editor-ruler {
  position: relative;
  height: 32px;
  margin-left: 132px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #77869a;
  font-size: 10px;
}

.editor-ruler span {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 7px;
  white-space: nowrap;
}

.editor-ruler span:first-child {
  transform: translateX(0);
}

.editor-ruler span:last-child {
  transform: translateX(-100%);
  padding-left: 0;
  padding-right: 7px;
  border-left: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-playhead {
  position: absolute;
  z-index: 5;
  top: 32px;
  bottom: 0;
  left: var(--playhead-x, 132px);
  width: 2px;
  background: #ff4f8b;
  box-shadow: 0 0 12px rgba(255, 79, 139, 0.72);
  pointer-events: none;
}

.editor-playhead::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff4f8b;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(255, 79, 139, 0.85);
}

.editor-track {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  overflow: visible;
}

.editor-track:last-child {
  border-bottom: 0;
}

.editor-track-label {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.editor-track-label strong {
  color: #dce8f6;
  font-size: 11px;
}

.editor-track-label small {
  color: #758297;
  font-size: 10px;
}

.editor-track-lane {
  position: relative;
  min-width: 0;
  min-height: 68px;
  padding: 9px;
  overflow: visible;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: var(--timeline-grid-size, 14.28%) 100%;
}

.editor-track-lane.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #65758c;
  font-size: 11px;
  font-weight: 800;
}

.editor-track-lane.empty span {
  padding: 7px 12px;
  border: 1px dashed rgba(101, 117, 140, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.editor-clip {
  position: absolute;
  left: var(--clip-left, 0%);
  width: min(100%, var(--clip-width, 12%));
  top: 9px;
  bottom: 9px;
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #ffffff;
  overflow: hidden;
  text-align: left;
}

.editor-timeline-panel.resizing-clip .editor-clip.selected {
  left: var(--resize-left, var(--clip-left, 0%));
  width: min(100%, var(--resize-width, var(--clip-width, 12%)));
}

button.editor-clip {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

button.editor-clip:active {
  cursor: grabbing;
}

.editor-clip-resize {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
}

.editor-clip-resize.left {
  left: 0;
}

.editor-clip-resize.right {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.2), transparent);
}

.editor-clip:hover .editor-clip-resize,
.editor-clip.selected .editor-clip-resize {
  opacity: 1;
}

.editor-timeline-panel.resizing-clip .editor-clip.selected {
  z-index: 42;
  opacity: 0.88;
}

.editor-timeline-panel.dragging-clip .editor-clip.selected {
  z-index: 40;
  left: var(--drag-left, var(--clip-left, 0%));
  opacity: 0.78;
  transform: translate3d(0, var(--drag-dy, 0px), 0) translateY(-2px);
  pointer-events: none;
}

.editor-clip.selected {
  z-index: 20;
  outline: 2px solid #ff4f8b;
  outline-offset: 2px;
  box-shadow: 0 0 18px rgba(255, 79, 139, 0.36);
}

.editor-clip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.editor-clip small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.video-clip {
  border: 1px solid rgba(85, 198, 217, 0.62);
  background: rgba(35, 104, 139, 0.78);
}

.broll-clip {
  border: 1px solid rgba(116, 139, 255, 0.58);
  background: rgba(54, 68, 138, 0.72);
}

.audio-clip {
  border: 1px solid rgba(188, 116, 220, 0.56);
  background: rgba(103, 70, 128, 0.72);
}

.voice-clip {
  border: 1px solid rgba(255, 207, 94, 0.56);
  background: rgba(123, 95, 42, 0.72);
}

.text-clip {
  border: 1px solid rgba(255, 154, 97, 0.58);
  background: rgba(132, 77, 45, 0.72);
}

@media (max-width: 1100px) {
  .movie-category-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visual-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .setup-layout .character-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .compact-choice-grid, .structure-grid, .project-world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tone-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .character-sheet-grid,
  .location-sheet-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .setup-layout .character-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .movie-category-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .movie-category-choice { height: 44px; }
  .setup-section { padding: 15px; }
  .visual-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .compact-choice-grid, .structure-grid, .project-world-grid { grid-template-columns: 1fr; }
  .tone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tone-section .setup-section-heading { display: grid; }
  .tone-selection-count { justify-self: start; }
  .setup-section-heading h3 { font-size: 15px; }
  .choice-label { font-size: 11px; }
  .episode-target-panel { padding: 16px; border-radius: 18px; }
  .episode-limit-grid,
  .episode-script-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .episode-target-heading,
  .episode-management-row { align-items: flex-start; flex-direction: column; }
  .plot-builder-panel { padding: 16px; border-radius: 18px; }
  .plot-builder-heading,
  .plot-builder-actions { align-items: stretch; flex-direction: column; }
  .plot-builder-assets { grid-template-columns: 1fr; }
  .plot-builder-actions button { width: 100%; }
  .plot-builder-asset { width: 100%; }
  .production-model-layout { grid-template-columns: 1fr; }
  .production-language-grid,
  .voice-casting-grid,
  .production-duration,
  .production-aspect { grid-template-columns: 1fr; }
  .shot-estimate-panel > div { grid-template-columns: 1fr; align-items: start; padding: 12px; }
  .asset-design-hero,
  .character-sheet-card,
  .location-sheet-card { grid-template-columns: 1fr; }
  .asset-design-hero { padding: 14px; border-radius: 18px; }
  .asset-section-heading { align-items: stretch; flex-direction: column; }
  .asset-section-actions { flex-wrap: wrap; }
  .asset-section-actions button { flex: 1 1 160px; }
  .character-form-column { grid-template-columns: 1fr; padding-right: 0; }
  .character-portrait-placeholder { min-height: 240px; }
  .location-copy { padding-right: 0; }
  .storyboard-control-card { padding: 12px; }
  .storyboard-control-card header { align-items: flex-start; flex-direction: column; }
  .storyboard-mode-tabs { grid-template-columns: 1fr; }
  .workflow-style-panel { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .storyboard-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storyboard-dialogue-list div { grid-template-columns: 1fr; }
  .storyboard-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storyboard-image-grid.portrait-aspect { grid-template-columns: repeat(2, minmax(150px, 210px)); }
  .editor-workbench { grid-template-columns: 1fr; }
  .editor-preview-panel { grid-template-columns: 1fr; height: auto; }
  .editor-media-panel { height: auto; max-height: none; margin-bottom: 0; }
  .editor-media-list { max-height: 240px; }
  .editor-tool-panel,
  .editor-timeline-panel { grid-column: 1; }
  .editor-tool-panel { align-items: stretch; flex-direction: column; }
  .editor-zoom-tools { margin-left: 0; }
}

@media (max-width: 520px) {
  .storyboard-card-grid { grid-template-columns: 1fr; }
  .workflow-style-panel { grid-template-columns: 1fr; }
  .storyboard-image-grid { grid-template-columns: 1fr; }
  .storyboard-image-grid.portrait-aspect { grid-template-columns: minmax(150px, 220px); justify-content: center; }
  .editor-preview-screen { min-height: 260px; }
  .editor-ruler { margin-left: 96px; }
  .editor-track { grid-template-columns: 96px minmax(0, 1fr); }
  .editor-timeline-panel {
    --track-label-width: 96;
    --playhead-x: 96px;
  }
}
/* Movie Studio workflow is now a compact top status bar. */
.workflow-status{margin:0;padding:12px 24px 14px;background:linear-gradient(180deg,rgba(16,21,30,.98),rgba(12,17,25,.94));border-top:1px solid rgba(95,119,150,.18);border-bottom:1px solid var(--line);box-shadow:0 10px 28px rgba(0,0,0,.16)}
.workflow-status-heading{display:flex;align-items:center;gap:24px;margin-bottom:8px}
.workflow-status-title{display:flex;align-items:baseline;gap:8px;min-width:190px;color:var(--movie-heading-accent)}
.workflow-status-title .eyebrow{color:inherit;font-size:13px;letter-spacing:.04em}
.workflow-status-title strong{color:inherit;font-size:18px;line-height:1.1}
.workflow-progress{display:none}
.workflow-shortcuts{display:flex;align-items:center;gap:5px;margin-left:auto}
.workflow-shortcuts .nav-link{padding:6px 9px;font-size:11px;white-space:nowrap}
.workflow-status>.step-list{display:flex;gap:7px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#3c4b60 transparent;padding:1px 1px 4px}
.workflow-status .step-button{flex:1 0 112px;width:auto;min-width:0;min-height:50px;padding:8px 10px;gap:8px;justify-content:center;border-color:#283344;border-radius:16px;background:rgba(19,26,37,.72)}
.workflow-status .step-button.active{background:linear-gradient(110deg,rgba(255,71,141,.2),rgba(44,61,86,.82));border-color:#e64e8a;box-shadow:inset 3px 0 #ff4d96,0 0 14px rgba(255,77,150,.12)}
.workflow-status .step-button.complete{border-color:rgba(69,190,142,.28);background:rgba(21,43,42,.46)}
.workflow-status .step-button.locked{opacity:.45}
.workflow-status .step-icon{display:grid;width:18px;height:18px;place-items:center;border:0;background:transparent;color:rgba(255,255,255,.86);font-size:16px;line-height:1;box-shadow:none}
.workflow-status .step-copy{gap:2px;white-space:nowrap;justify-items:center;text-align:center;width:auto;line-height:1.2}
.workflow-status .step-copy small{font-size:10px;font-weight:800;letter-spacing:.08em}
.workflow-status .step-copy strong{font-size:13px;font-weight:900;letter-spacing:0}

/* Unified selected state for every Movie Studio step. */
.option.selected,
.chip.selected,
.workflow-status .step-button.active,
.movie-category-choice.selected,
.compact-choice.selected,
.tone-choice.selected,
.episode-option.selected,
.episode-tab.selected,
.production-segment button.selected,
.production-language-grid button.selected,
.voice-casting-grid button.selected,
.storyboard-mode-tabs button.selected {
  border-color: var(--selected-border);
  background: var(--selected-gradient);
  color: #ffffff;
  box-shadow: var(--selected-glow), inset 0 0 0 1px rgba(255, 255, 255, .14);
}

.workflow-status .step-button.active {
  background: var(--selected-gradient-soft);
  box-shadow: inset 3px 0 0 #ff4f8b, var(--selected-glow);
}

.storyboard-control-card .storyboard-mode-tabs button.selected {
  border-color: rgba(54, 214, 255, 0.56);
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.22), rgba(94, 126, 255, 0.34)),
    rgba(18, 27, 42, 0.96);
  box-shadow: 0 10px 24px rgba(34, 207, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.09);
}

.storyboard-control-card .workflow-style-panel button.selected {
  position: relative;
  overflow: hidden;
  border-color: #ff8a1d;
  box-shadow: 0 9px 22px rgba(255, 138, 29, 0.22), 0 0 0 1px rgba(255, 138, 29, 0.26) inset;
}

.storyboard-control-card .workflow-style-panel button.selected::before,
.storyboard-control-card .workflow-style-panel button.selected::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 4px;
  border-radius: 999px;
  background: #ff8a1d;
  box-shadow: 0 0 10px rgba(255, 138, 29, 0.98), 0 0 24px rgba(255, 138, 29, 0.78);
}

.storyboard-control-card .workflow-style-panel button.selected::before {
  left: 0;
}

.storyboard-control-card .workflow-style-panel button.selected::after {
  right: 0;
}

.step-button.active .step-icon,
.workflow-status .step-button.active .step-icon,
.movie-category-choice.selected span,
.compact-choice.selected .compact-icon,
.tone-choice.selected .tone-icon {
  border-color: rgba(255, 255, 255, .24);
  background: var(--selected-gradient);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(236, 11, 147, .24);
}

.workflow-status .step-button.active .step-icon {
  border-color: transparent;
  background: transparent;
  color: #ff4f8b;
  box-shadow: none;
}

.workflow-status .step-button.complete .step-icon {
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, .86);
  box-shadow: none;
}

.visual-choice.selected {
  border-color: var(--selected-border);
  box-shadow: 0 0 0 2px rgba(255, 79, 139, .18), var(--selected-glow);
}

.visual-choice.selected .choice-check,
.compact-choice.selected .compact-check {
  background: var(--selected-gradient);
  color: #ffffff;
}

.editor-clip.selected {
  outline-color: #ff4f8b;
  box-shadow: var(--selected-glow);
}

/* Shared Movie Studio card tone and warm heading accents. */
.setup-section,
.story-slider-card,
.episode-target-panel,
.plot-builder-panel,
.production-card,
.asset-design-hero,
.character-sheet-card,
.location-sheet-card,
.storyboard-mode-tabs,
.storyboard-scene-card,
.storyboard-image-card,
.editor-media-panel,
.editor-player,
.editor-export-panel,
.editor-tool-panel,
.editor-timeline-panel,
.editor-cover-card,
.editor-export-card {
  border-color: var(--movie-card-border);
  background: var(--movie-card-bg);
}

.movie-category-choice:not(.selected),
.compact-choice:not(.selected),
.tone-choice:not(.selected),
.episode-option:not(.selected),
.episode-tab:not(.selected),
.production-select button,
.production-choice-block,
.production-segment,
.production-language-grid button:not(.selected),
.voice-casting-grid button:not(.selected),
.storyboard-card-section,
.storyboard-dialogue-list div,
.storyboard-image-actions button,
.editor-media-item,
.editor-media-upload,
.editor-media-empty,
.editor-export-summary,
.editor-track-label,
.editor-track-lane.empty span {
  background: var(--movie-card-bg-soft);
}

.setup-section-heading h3,
.story-slider-heading h3,
.story-slider-note strong,
.plot-builder-asset strong,
.production-heading h3,
.production-select button strong,
.asset-design-hero strong,
.asset-section-heading h3,
.storyboard-dialogue-list div strong,
.storyboard-image-preview small,
.editor-media-panel h3,
.editor-cover-copy h3,
.editor-export-panel h3,
.editor-track-label strong {
  color: var(--movie-heading-accent);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .46), 0 0 10px rgba(255, 242, 0, .24);
}

.section-kicker,
.plot-core-label label,
.production-select > span,
.editor-player-top b {
  color: var(--movie-heading-accent-soft);
}

.section-kicker,
.setup-section-heading p,
.story-slider-labels,
.episode-target-heading strong,
.episode-management-row strong,
.plot-builder-heading strong,
.plot-core-label label,
.production-select > span,
.production-choice-block > span,
.asset-field span,
.storyboard-scene-card header strong,
.storyboard-card-section b,
.editor-export-panel label span,
.editor-track-label small {
  color: #dce8f6;
  text-shadow: none;
}

.character-portrait-column > strong,
.asset-field span,
.storyboard-card-section b {
  color: #dce8f6;
  text-shadow: none;
}

.story-slider-card {
  background:
    radial-gradient(circle at 16% 0%, rgba(135, 88, 255, .10), transparent 32%),
    var(--movie-card-bg);
}

.story-slider-note,
.production-warning,
.shot-estimate-panel,
.character-portrait-placeholder,
.asset-field input,
.asset-field textarea,
.editor-export-card,
.editor-export-summary {
  border-color: rgba(63, 83, 112, .58);
  background: rgba(255, 255, 255, .035);
}

.choice-check,
.compact-check,
.tone-check {
  display: none !important;
}

.visual-choice.selected {
  border-color: var(--movie-heading-accent) !important;
  box-shadow: 0 0 0 2px rgba(255, 242, 0, .2), 0 0 22px rgba(255, 242, 0, .3), 0 10px 24px rgba(0, 0, 0, .25) !important;
}

.project-world-grid .project-world-choice {
  align-items: center !important;
  grid-template-columns: 1fr !important;
  justify-items: center;
  padding-right: 50px !important;
  padding-left: 50px !important;
  text-align: center;
}

.project-world-grid .project-world-choice > span:not(.compact-icon):not(.compact-check) {
  min-height: 52px;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  justify-self: center;
  width: 100%;
  padding-top: 0;
  padding-bottom: 0;
}

.project-world-grid .project-world-choice .compact-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.project-world-grid .project-world-choice strong {
  display: block;
  margin: 0;
  font-size: 15px;
  line-height: 1.1;
}

.project-world-grid .project-world-choice small {
  display: block;
  margin-top: 4px;
  line-height: 1.2;
}

.model-layout .production-card-large .production-segment {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  border: 0;
  background: transparent;
  overflow: visible;
}

.model-layout .production-card-large .production-reference-mode {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.model-layout .production-card-large .production-segment button {
  min-height: 58px;
  border: 1px solid rgba(85, 198, 217, 0.26);
  border-radius: 12px;
  background: rgba(13, 19, 29, 0.88);
  color: #b8c7dc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.model-layout .production-card-large .production-reference-mode button {
  min-height: 74px;
}

.model-layout .production-card-large .production-segment button:hover {
  border-color: rgba(85, 198, 217, 0.62);
  background: rgba(85, 198, 217, 0.09);
  color: #ffffff;
  transform: translateY(-1px);
}

.model-layout .production-card-large .production-segment button.selected {
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, #f7058b, #9426ff);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(231, 13, 148, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.model-layout .production-card-large .production-aspect,
.model-layout .production-card-large .production-quality {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.workspace,
.workspace.sidebar-collapsed{grid-template-columns:minmax(0,1fr);min-height:calc(100vh - 220px)}
.workspace .main-content{padding:25px 24px 42px}
.main-content:has(.edit-export-layout){padding:25px 24px 42px}
@media(max-width:1100px){.workflow-status{margin-right:0;padding:12px 20px}.workspace{grid-template-columns:minmax(0,1fr);min-height:0}.workflow-status .step-button{flex-basis:120px}}
@media(max-width:720px){.workflow-status{padding:11px 14px 9px}.workflow-status-heading{gap:12px;flex-wrap:wrap;margin-bottom:8px}.workflow-status-title{min-width:90px}.workflow-progress{width:auto;min-width:130px;flex:1}.workflow-shortcuts{width:100%;margin-left:0}.workflow-status .step-button{flex-basis:112px;min-height:43px}.workspace{display:grid;grid-template-columns:minmax(0,1fr);min-height:0}.workspace .main-content{padding:20px 14px 28px}}

.movie-project-toolbar .top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.movie-project-toolbar .top-actions .ghost-button,
.movie-project-toolbar .top-actions .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  white-space: nowrap;
}

@media(max-width:720px) {
  .movie-project-toolbar .top-actions .ghost-button {
    display: inline-flex;
  }
}

.content-toolbar {
  align-items: flex-start;
}

.content-toolbar .toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  max-width: min(760px, 58vw);
}

.project-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-action-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(85, 198, 217, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.08), rgba(135, 88, 255, 0.12)),
    rgba(13, 20, 32, 0.88);
  color: #dceeff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.project-action-button span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(34, 207, 255, 0.12);
  color: #55dfff;
  font-size: 13px;
}

.project-action-button:hover {
  border-color: rgba(85, 198, 217, 0.62);
  background:
    linear-gradient(135deg, rgba(34, 207, 255, 0.14), rgba(135, 88, 255, 0.18)),
    rgba(18, 28, 44, 0.96);
  color: #ffffff;
}

.project-action-primary {
  border-color: rgba(255, 79, 139, 0.7);
  background: linear-gradient(105deg, #ff4f8b 0%, #8758ff 72%, #22cfff 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(236, 11, 147, 0.2);
}

.project-action-primary span {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

@media(max-width:900px) {
  .content-toolbar .toolbar-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .project-action-buttons {
    justify-content: flex-start;
  }
}
