:root {
  --ink: #222229;
  --muted: #737681;
  --line: #e8e8eb;
  --paper: #ffffff;
  --teal: #aa4c51;
  --mint: #f9eeed;
  --blue: #aa4c51;
  --blue-dark: #903e44;
  --blue-pale: #f9eeed;
  --accent: #aa4c51;
}
html { font-family: "Nunito", "Avenir Next", Avenir, sans-serif; }
button, input, select, textarea { font-family: inherit; }
body, .app-main { color: var(--ink); background: #fff; }
h1, h2, h3, .section-card h2, .side-card h2, .form-card h2, .production-composer h2, .aside-tip p { font-family: inherit; color: var(--ink); font-weight: 700; }
.brand, .brand-wordmark strong, .art-frame-back span, .art-frame-front small, .art-caption, .collection-heading h2 span, .style-top { font-family: inherit; }
h1 { letter-spacing: -.045em; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.app-frame { grid-template-columns: 226px minmax(0, 1fr); }
.app-sidebar { background: #fbfbfb; border: 0; padding: 32px 16px 24px; }
.sidebar-brand { gap: 10px; padding: 0 10px; color: var(--ink); }
.brand-logo { display: block; width: 178px; height: auto; }
.sidebar-nav { margin-top: 48px; font-weight: 560; }
.sidebar-link { color: #626574; border-radius: 9px; min-height: 43px; }
.sidebar-link:hover { background: #faf7f7; color: #8f383e; }
.sidebar-link.is-active { background: #f8eded; color: #a5444a; font-weight: 700; box-shadow: none; }
.nav-icon { display: block; flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-link .nav-icon { color: currentColor; }
.app-topbar { border-color: #f0f0f1; color: #7c7e86; }
.app-topbar strong { color: var(--ink); }
.page-content { padding-top: 34px; }
.eyebrow, .section-kicker { color: #a7494d; letter-spacing: .08em; }
.lede, .muted, .field-hint { color: var(--muted); }
.button { border-radius: 8px; box-shadow: none; }
.button-primary { background: #ae5156; border-color: #ae5156; color: #fff; }
.button-primary:hover { background: #984046; border-color: #984046; color: #fff; box-shadow: 0 5px 14px rgba(145, 64, 69, .13); }
.button-secondary, .button-light { background: #faf1f0; border-color: #f0dddd; color: #904349; }
.button-secondary:hover, .button-light:hover { background: #f6e7e5; color: #904349; }
.button-quiet { border-color: var(--line); color: #565961; }
.card, .stat-card, .production-dashboard { border-color: var(--line); box-shadow: none; }
.pill-green { background: #f4e9e8; color: #8d454a; }
.pill-neutral { background: #f4f4f5; color: #64666e; }
.flash-success { background: #f8eeed; border-color: #ead2d1; color: #7c3b3f; }
.field input, .field textarea, .field select { background: #fff; border-color: #dfe1e6; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #b6686d; box-shadow: 0 0 0 3px #f8ebea; }
.form-card, .section-card, .side-card, .studio-card { border-radius: 12px; }
.idea-card, .style-card, .scene-card, .mini-empty, .action-card, .advanced-panel { background: #fdfcfc; border-color: var(--line); }
.idea-card:hover, .style-card:hover, .persona-card:hover { border-color: #d7b0b0; }
.persona-card, .marketing-summary > div, .marketing-mini-grid article { background: #fdfcfc; border-color: var(--line); }
.marketing-summary h3, .marketing-mini-grid strong, .activity-copy strong { color: var(--ink); }
.keyword-list span, .section-count, .asset-type, .card-icon, .empty-icon { background: #f9eeee; color: #99474c; }
.production-preview { background: #fdfcfc; border-color: var(--line); }
.production-preview video { background: #202024; }
.production-composer .composer-row, .preview-empty { border-color: #e3dede; background: #fff; }
.activity-marker, .scene-card:before, .generation-progress-track span { background: #ae5156; }
.activity-marker { border-color: #f4e5e4; }
.activity-row:before { background: #e7dede; }
.activity-status, .text-button, .style-action, .advanced-panel > summary, .cost-call-details summary { color: #99474c; }
.cost-summary > div, .video-cost-inline, .preview-empty { background: #fcf8f8; }
.video-cost-inline { border-color: #eedfdf; }
.video-cost-inline span, .video-cost-inline strong, .preview-brief dd { color: var(--ink); }
.creative-choice:has(input:checked) { border-color: #bc7377; box-shadow: 0 0 0 2px #f8e9e8; background: #fffafa; }
.creative-choice input[type=radio], .logo-choice input { accent-color: #aa4c51; }
.video-style-choice { display: flex; align-items: flex-start; gap: 10px; }
.video-style-choice label { flex: 1; }
.video-style-choice.is-unavailable { background: #f5f5f6; border-color: var(--line); }
.video-style-choice.is-unavailable label { cursor: not-allowed; }
.video-style-choice.is-unavailable strong, .video-style-choice.is-unavailable small { color: #777a83; }
.video-style-choice .video-style-availability { margin-top: 10px; font-weight: 700; }
.context-select { position: relative; }
.context-select > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 10px 14px; border: 1px solid #dfe1e6; border-radius: 8px; cursor: pointer; list-style: none; }
.context-select > summary::-webkit-details-marker { display: none; }
.context-select[open] > summary { border-color: #b6686d; }
.context-select-chevron { color: var(--muted); font-size: 1.2rem; }
.context-select-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; padding: 10px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #22222914; }
.context-select-search { width: 100%; padding: 10px 12px; margin-bottom: 8px; border: 1px solid #dfe1e6; border-radius: 6px; font-size: .9rem; }
.context-select-options { max-height: 260px; overflow-y: auto; }
.context-select-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: white; color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.context-select-option[hidden] { display: none; }
.context-select-option:hover, .context-select-option:focus-within { background: #faf1f0; }
.context-select-option[aria-selected=true] { background: #f9eeed; }
.context-select-option input { accent-color: var(--accent); }
.context-select-option strong, .context-select-option small { display: block; }
.context-select-option small { margin-top: 3px; font-size: .8rem; color: var(--muted); }
.context-select-empty { margin: 8px; font-size: .9rem; color: var(--muted); }
.context-selected-resources { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.context-selected-resources:empty { margin: 0; }
.context-selected-resources li { display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 7px 10px; background: #f9eeed; border-radius: 7px; font-size: .85rem; }
.context-selected-resources li span { overflow-wrap: anywhere; }
.context-selected-resources button { flex-shrink: 0; border: 0; padding: 0 5px; background: transparent; color: #904349; font-size: 1.2rem; cursor: pointer; }
.context-persona-selection { display: flex; align-items: center; gap: 10px; }
.context-persona-thumbnail, .context-persona-placeholder { flex-shrink: 0; width: 42px; height: 48px; border-radius: 6px; object-fit: cover; }
.context-persona-placeholder { display: grid; place-items: center; background: #f5f5f6; color: var(--muted); }
.portrait-character-list { display: grid; gap: 12px; margin: 14px 0 24px; }
.portrait-character-choice { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.portrait-character-choice label { display: flex; align-items: center; gap: 12px; flex: 1; cursor: pointer; }
.portrait-character-choice img { width: 56px; height: 90px; object-fit: cover; border-radius: 8px; }
.portrait-character-choice small { display: block; color: var(--muted); }
.persona-portrait { display: block; width: min(100%, 360px); aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; margin: 20px auto; }
.portrait-gallery-heading { margin-top: 32px; }
.persona-portrait-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.portrait-version { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.portrait-version-selected { border-color: var(--accent); }
.portrait-version-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.portrait-version-heading h3 { margin: 0; }
.portrait-direction { white-space: pre-wrap; overflow-wrap: anywhere; }
.portrait-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 14px; margin: 16px 0; }
.portrait-photo-choice, .portrait-library-card { max-width: 250px; min-width: 0; }
.board-persona-card.portrait-photo-choice img, .portrait-library-card img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; }
.portrait-library-options { margin-bottom: 24px; }
.portrait-library-options summary { cursor: pointer; font-weight: 700; }
.concept-selected-photo { display: flex; align-items: flex-start; gap: 20px; margin: 20px 0; }
.concept-selected-photo img { width: 110px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; }
.concept-selected-photo > div { min-width: 0; }
[data-style-panel][hidden] { display: none !important; }
.video-board-shell { width: min(100%, 1320px); margin: 0 auto; }
.video-board-shell .page-heading { margin-bottom: 22px; }
.board-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 22px; }
.board-steps span { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #7a7c85; font-size: .82rem; font-weight: 650; }
.board-steps b { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: #f2f2f3; font-size: .75rem; }
.board-steps .is-done { color: #864247; background: #fdf8f7; border-color: #ead3d2; }
.board-steps .is-done b, .board-steps .is-current b { background: #a94e53; color: #fff; }
.board-steps .is-current { border-color: #b96e73; color: var(--ink); }
.board-card { padding: clamp(22px, 3vw, 36px); margin-bottom: 18px; }
.board-card .creative-fieldset { margin: 22px 0; }
.board-section-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.board-section-heading h2 { margin: 1px 0 5px; font-size: 1.35rem; }
.board-section-heading p { margin: 0; color: var(--muted); line-height: 1.5; }
.board-step-number { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; background: #f8e9e8; color: #97474d; font-weight: 750; }
.board-brief { padding: 17px 20px; margin-bottom: 16px; border-left: 3px solid #bc7277; background: #fcf8f8; border-radius: 4px 9px 9px 4px; line-height: 1.65; }
.board-brief p:last-child { margin-bottom: 0; }
.portrait-board-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; align-items: start; }
.portrait-board-main { min-width: 0; }
.portrait-board-side { position: sticky; top: 20px; }
.portrait-plan-form .field { margin-bottom: 24px; }
.board-persona-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 14px 0 22px; }
.board-persona-card { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.board-persona-card:has(input:checked) { border-color: #ba7075; box-shadow: 0 0 0 2px #f8e9e8; }
.board-persona-card input { align-self: flex-end; accent-color: #aa4c51; }
.board-persona-card img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 7px; background: #eee; }
.board-persona-card strong, .board-persona-card small { display: block; }
.board-persona-card small { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.board-image-review { display: grid; grid-template-columns: minmax(180px, 310px) minmax(0, 1fr); align-items: start; gap: 22px; margin-bottom: 22px; }
.board-image-review img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 11px; background: #eee; }
.board-image-review strong { font-size: 1.1rem; }
.board-image-review p { color: var(--muted); line-height: 1.55; }
.board-pending, .board-approved { padding: 20px; margin-bottom: 18px; border: 1px solid #e8d3d2; border-radius: 11px; background: #fcf7f6; }
.board-pending p, .board-approved p { margin-bottom: 0; }
.voice-availability { margin-top: 20px; }
.board-refine-form { margin-top: 18px; }
.board-history { margin-top: 25px; padding-top: 16px; border-top: 1px solid var(--line); }
.board-history summary { cursor: pointer; font-weight: 700; color: #91464b; }
.board-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; margin-top: 16px; }
.board-history-grid article { padding: 9px; border: 1px solid var(--line); border-radius: 9px; }
.board-history-grid img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; }
.board-history-grid strong, .board-history-grid small { display: block; margin-top: 7px; }
.board-history-grid small { color: var(--muted); line-height: 1.35; }
.board-history-grid .button { margin-top: 9px; padding: 7px 8px; font-size: .75rem; }
.board-summary { padding: 17px 20px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; background: #fcf9f9; }
.board-summary p { margin: 0 0 10px; line-height: 1.5; }
.board-summary p:last-child { margin-bottom: 0; }
.board-summary strong { margin-right: 8px; }
.cinematic-scene-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; margin: 20px 0; }
.cinematic-scene-card { border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: #fff; min-width: 0; }
.cinematic-scene-head { display: flex; justify-content: space-between; color: #94464b; margin-bottom: 10px; }
.cinematic-sketch-frame { display: grid; place-items: center; background: #f5f0ec; border-radius: 8px; aspect-ratio: 4 / 3; overflow: hidden; color: #777; text-align: center; padding: 10px; }
.cinematic-sketch-frame img { width: 100%; height: 100%; object-fit: contain; }
.cinematic-scene-fields { padding-top: 14px; }
.cinematic-inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cinematic-check { display: inline-flex; align-items: center; gap: 5px; margin: 5px 13px 5px 0; }
.cinematic-scene-actions { display: grid; gap: 10px; margin: 20px 0; }
.cinematic-scene-actions > div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cinematic-scene-actions form { display: inline-flex; }
.cinematic-recommendations { margin: 22px 0; }
.cinematic-recommendations article { padding: 13px 0; border-top: 1px solid var(--line); }
.cinematic-recommendations p { margin: 5px 0; color: var(--muted); }
.cinematic-setting-row { display: grid; grid-template-columns: 1fr minmax(180px, 270px); align-items: center; gap: 20px; border-top: 1px solid var(--line); padding: 14px 0; }
.cinematic-setting-row p { margin: 4px 0 0; color: var(--muted); }
.cinematic-setting-preview { display: flex; gap: 14px; align-items: flex-start; margin: 15px 0; }
.cinematic-setting-preview img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.cinematic-setting-preview p { margin: 4px 0; color: var(--muted); }
@media (max-width: 700px) { .cinematic-setting-row { grid-template-columns: 1fr; } }
@media (max-width: 980px) { .portrait-board-grid { grid-template-columns: 1fr; } .portrait-board-side { position: static; } }
@media (max-width: 700px) { .board-steps { display: flex; overflow-x: auto; } .board-steps span { min-width: 135px; } .board-image-review { grid-template-columns: 1fr; } .board-image-review img { max-width: 360px; } }
.caption-demo-editorial span { border-color: #d4a0a0; }
.caption-demo-statement span { background: #f8e7e7; color: #70383d; }
.business-card { border-top: 1px solid var(--line); }
.business-card:hover { border-color: #d5b3b3; box-shadow: 0 8px 20px rgba(68, 33, 34, .04); }
.collection-heading h2 span { background: #f8eded; color: #99474c; }
.caption-demo { background: linear-gradient(150deg, #77777d, #222229 78%); }
.production-meta span { border-color: var(--line); color: #686b74; }
.activity-time { color: #777984; }
.activity-row { border-color: var(--line); }
.empty-state { background: #fff; border-color: #dedfe2; }
.video-library-icon { background: #f8eeee; color: #99474c; }
.request-row:hover, .video-library-row:hover { background: #fcf9f9; }

/* Onboarding follows the approved airy, single-column concept. */
.is-onboarding .page-content { padding-top: clamp(42px, 5vw, 65px); }
.onboarding-layout { width: min(100%, 835px); margin: 0 auto; }
.onboarding-layout .page-heading { margin-bottom: 30px; }
.onboarding-layout h1 { font-size: clamp(2.2rem, 3.1vw, 3.25rem); margin-bottom: 9px; }
.onboarding-layout .lede { max-width: 790px; font-size: 1.02rem; line-height: 1.55; }
.onboarding-form .field { margin-bottom: 28px; gap: 9px; }
.onboarding-form .field > label, .onboarding-form .field-title, .link-fieldset legend { font-size: .91rem; font-weight: 680; color: #2a2b31; }
.onboarding-form .field input:not([type=file]), .onboarding-form .field textarea, .source-link-row input { border: 1px solid #dfe1e6; border-radius: 7px; min-height: 46px; padding: 11px 14px; font-size: .95rem; }
.onboarding-form .field input::placeholder, .onboarding-form .field textarea::placeholder, .source-link-row input::placeholder { color: #9195a0; }
.onboarding-form .field textarea { min-height: 94px; }
.link-fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.link-fieldset legend { padding: 0; margin-bottom: 4px; }
.link-fieldset legend span { font-weight: 430; color: var(--muted); }
.link-fieldset .field-hint { margin-bottom: 12px; }
.source-link-rows { display: grid; gap: 9px; }
.source-link-row { display: flex; align-items: center; gap: 8px; border: 1px solid #dfe1e6; border-radius: 7px; padding: 0 10px 0 15px; background: #fff; }
.source-link-row:focus-within { border-color: #b6686d; box-shadow: 0 0 0 3px #f8ebea; }
.source-link-row input { flex: 1; min-width: 0; border: 0 !important; outline: none; box-shadow: none !important; }
.source-link-glyph { color: #8b8e9a; font-size: 1.1rem; }
.link-remove { border: 0; background: none; color: #8d919c; font-size: 1.35rem; line-height: 1; padding: 6px; }
.link-remove:hover { color: #a1484e; }
.add-link { margin-top: 10px; border: 0; background: none; color: #a34b50; font-weight: 650; padding: 4px 0; }
.add-link:hover { text-decoration: underline; }
.upload-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 136px; border: 1px dashed #cfd3da; border-radius: 8px; background: #fff; cursor: pointer; font-weight: 470 !important; text-align: center; }
.upload-dropzone:hover, .upload-dropzone.is-dragging { border-color: #ba7478; background: #fffbfb; }
.upload-dropzone strong { color: #a34b50; font-weight: 650; }
.upload-dropzone small { color: var(--muted); font-size: .79rem; }
.upload-icon { display: block; margin-bottom: 5px; color: #777d8a; font-size: 2rem; font-weight: 350; line-height: 1; }
.upload-dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; padding: 0; }
.selected-files { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.selected-files li { display: flex; align-items: center; gap: 12px; border: 1px solid #e3e4e8; border-radius: 7px; padding: 9px 12px; font-size: .86rem; }
.selected-files li span { flex: 1; overflow-wrap: anywhere; }
.selected-files li small { color: var(--muted); }
.selected-files li button { border: 0; background: none; color: #7a7d88; font-size: 1.25rem; }
.onboarding-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 27px; }
.onboarding-actions .button { min-width: 140px; }
.back-link { color: #727681; font-size: .91rem; }
@media (max-width: 760px) {
  .app-frame { display: block; }
  .app-sidebar { padding: 12px 18px 8px; }
  .sidebar-brand { width: fit-content; }
  .brand-logo { width: 156px; }
  .sidebar-nav { margin-top: 15px; }
  .sidebar-nav .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .is-onboarding .page-content { padding-top: 28px; }
  .onboarding-layout h1 { font-size: 2.15rem; }
}
.markdown-content { line-height: 1.7; overflow-wrap: anywhere; }
.markdown-content > :first-child { margin-top: 0; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content h1, .markdown-content h2 { font-size: 1.35rem; margin: 1.6rem 0 .75rem; line-height: 1.35; }
.markdown-content h3 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
.markdown-content h4, .markdown-content h5, .markdown-content h6 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
.markdown-content p, .markdown-content ul, .markdown-content ol { margin-bottom: 1rem; }
.markdown-content ul, .markdown-content ol { padding-left: 1.5rem; }
.markdown-content li { margin-bottom: .35rem; }
.markdown-content li > p { margin-bottom: .35rem; }
.markdown-content strong { color: var(--ink); }
.markdown-content a { text-decoration: underline; }
.markdown-content blockquote { margin: 1rem 0; padding: .6rem 1rem; border-left: 3px solid var(--line); background: var(--paper); }
.markdown-content pre { max-width: 100%; overflow-x: auto; padding: 1rem; border-radius: 8px; background: var(--paper); }
.markdown-content code { font-size: .9em; }
.markdown-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 1rem; }
.markdown-content th, .markdown-content td { padding: .6rem .8rem; border: 1px solid var(--line); text-align: left; }
.markdown-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.context-resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.context-resource { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.context-resource input { margin-top: 5px; flex: 0 0 auto; }
.context-resource span { min-width: 0; overflow-wrap: anywhere; }
.context-resource strong, .context-resource small { display: block; }
.context-resource small { margin-top: 4px; color: var(--muted); }
.context-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.context-link { white-space: normal; overflow-wrap: anywhere; }
.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; margin-bottom: 24px; }
.concept-card { margin-bottom: 0; display: flex; flex-direction: column; min-width: 0; }
.concept-card h2 { font-size: 1.4rem; }
.concept-card h3 { margin-top: 1rem; }
.concept-script { margin: 0 0 1rem; padding: 14px 16px; border-left: 3px solid var(--teal); background: var(--mint); line-height: 1.7; }
.concept-sources { margin-bottom: 18px; font-size: .86rem; color: var(--muted); }
.concept-sources summary { cursor: pointer; }
.concept-card > form { margin-top: auto; }

/* Account access uses the existing dashboard palette and controls. */
.sidebar-account { margin-top: auto; padding: 20px 12px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: .8rem; }
.sidebar-account span { overflow-wrap: anywhere; color: var(--muted); }
.sidebar-account .button { width: 100%; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: #f6f6f7; }
.auth-card { width: min(100%, 460px); padding: clamp(24px, 5vw, 42px); background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.auth-logo { width: 150px; height: auto; display: block; margin: 0 0 28px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 10px; }
.auth-card .field { margin-top: 18px; }
.auth-card .field small { display: block; margin-top: 6px; color: var(--muted); }
.auth-card input[type=submit] { width: 100%; margin-top: 24px; }
.auth-remember { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.auth-remember input { width: auto; }
.auth-links { margin: 22px 0 0; font-size: .9rem; }

/* The enterprise selector and its sections share the existing sidebar. */
.business-switcher { position: relative; margin: 28px 0 0; flex-shrink: 0; }
.business-switcher > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.business-switcher > summary::-webkit-details-marker { display: none; }
.business-switcher-copy { min-width: 0; }
.business-switcher-copy small { display: block; color: var(--muted); font-size: .68rem; }
.business-switcher-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .91rem; font-weight: 750; color: var(--ink); }
.switcher-chevron { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.business-switcher[open] > summary { border-color: #d7b0b0; }
.business-switcher[open] .switcher-chevron { transform: rotate(180deg); }
.business-switcher-dropdown { position: absolute; z-index: 30; top: calc(100% + 7px); left: 0; width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(34, 34, 41, .1); }
.business-switcher-list { display: block; margin: 0; padding: 0; max-height: 250px; overflow-y: auto; }
.business-switcher-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border-radius: 7px; color: var(--ink); font-size: .86rem; overflow-wrap: anywhere; }
.business-switcher-option:hover, .business-switcher-option.is-selected { background: var(--mint); color: #904349; text-decoration: none; }
.business-switcher-create { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 12px 10px 8px; border-top: 1px solid var(--line); font-size: .84rem; font-weight: 700; }
.business-section-nav { margin-top: 20px; font-size: .86rem; }
.business-section-nav .sidebar-link { padding: 8px 10px; gap: 10px; line-height: 1.35; }
.business-section-nav .nav-icon { width: 18px; height: 18px; flex-basis: 18px; }
.business-section-page { margin-top: 24px; }
.business-section-page { margin-top: 0; }
.business-profile-section { min-width: 0; }
.provided-resource-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.provided-resource-actions h1 { margin: 0; }
.business-section-heading, .generated-resource-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.business-section-heading h1, .generated-resource-heading h1 { margin: 0; }
.generated-resource-table { min-width: 740px; table-layout: fixed; }
.generated-resource-table th, .generated-resource-table td { padding: 16px 12px; vertical-align: middle; }
.generated-resource-table th:first-child, .generated-resource-table td:first-child { width: 84px; padding-left: 0; }
.generated-resource-table th:nth-child(3), .generated-resource-table td:nth-child(3) { width: 110px; }
.generated-resource-table th:last-child, .generated-resource-table td:last-child { width: 190px; padding-right: 0; }
.generated-resource-table tbody th { color: var(--ink); font-size: .9rem; font-weight: 700; text-transform: none; letter-spacing: normal; overflow-wrap: anywhere; }
.generated-resource-table img { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.generated-resource-table tbody tr:hover { background: #fcf9f9; }
.resource-table-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.resource-table-actions form { margin: 0; }
.resource-table-actions .button { min-height: 36px; padding: 7px 14px; }
.resource-table-error { margin: 6px 0 0; color: #a5444a; font-size: .78rem; }
.provided-resource-list { list-style: none; padding: 0; margin: 0; }
.provided-resource-item { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.provided-resource-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.provided-resource-copy small { display: block; margin-top: 5px; color: var(--muted); }
.provided-resource-copy p { margin: 8px 0 0; color: var(--muted); }
.provided-resource-item .button { flex-shrink: 0; min-height: 36px; padding: 7px 14px; }
[data-resource-fields][hidden] { display: none; }
.voice-table { min-width: 600px; table-layout: fixed; }
.voice-table th, .voice-table td { padding: 16px 12px; vertical-align: middle; }
.voice-table th:first-child { padding-left: 0; }
.voice-table th:nth-child(2), .voice-table td:nth-child(2) { width: 320px; }
.voice-table th:last-child, .voice-table td:last-child { width: 84px; padding-right: 0; text-align: right; }
.voice-table tbody th { color: var(--ink); font-size: .9rem; font-weight: 700; text-transform: none; letter-spacing: normal; overflow-wrap: anywhere; }
.voice-table tbody tr:hover { background: #fcf9f9; }
.voice-table audio { display: block; width: 280px; max-width: 100%; height: 38px; }
.voice-table .button { min-height: 36px; padding: 7px 14px; }
@media (min-width: 761px) {
  .app-sidebar { overflow-y: auto; }
}
@media (max-width: 760px) {
  .app-frame { display: block; }
  .business-switcher { margin-top: 18px; }
  .business-switcher-dropdown { width: 100%; }
  .business-section-nav { justify-content: flex-start; gap: 4px; overflow-x: auto; margin: 14px 0 10px; padding-bottom: 4px; }
  .business-section-nav .sidebar-link { padding: 8px 10px; }
  .sidebar-account { margin-top: 12px; padding: 12px 0 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
  .sidebar-account .button { width: auto; min-height: 32px; padding: 5px 10px; font-size: .75rem; }
  .sidebar-account span { flex-basis: 100%; }
}

/* One editable proposal alongside its revision conversation. */
.concept-workspace { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.concept-editor, .concept-chat { padding: 28px; min-width: 0; }
.concept-editor h2, .concept-chat h2 { margin: 0 0 24px; }
.concept-editor textarea { line-height: 1.65; resize: vertical; }
.concept-direction { margin-top: 20px; }
.concept-direction summary { cursor: pointer; font-weight: 700; margin-bottom: 16px; }
.concept-chat-history { display: flex; flex-direction: column; gap: 16px; max-height: 450px; overflow-y: auto; padding-right: 4px; margin-bottom: 24px; }
.concept-message { padding: 16px; border-radius: 12px; background: #f6f6f8; }
.concept-message.is-user { background: #f8edef; margin-left: 20px; }
.concept-message.is-assistant { margin-right: 20px; }
.concept-message span { font-size: 12px; font-weight: 800; color: #6a6c7c; }
.concept-message p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.concept-pending { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #696b7a; padding: 12px 0; }
.concept-pending-dot { width: 8px; height: 8px; border-radius: 50%; background: #ae4f58; }
.concept-placeholder { min-height: 280px; display: grid; place-items: center; color: #696b7a; }
.concept-editor [readonly] { background: #f7f7f9; }
@media (max-width: 1000px) { .concept-workspace { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .concept-editor, .concept-chat { padding: 20px; } }

.video-flow-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.video-flow-steps .video-flow-step { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: #864247; font-size: .82rem; font-weight: 650; background: #fdf8f7; }
.video-flow-steps .video-flow-step:hover { border-color: #b96e73; }
.portrait-composition { display: block; width: 100%; max-height: 640px; object-fit: contain; border-radius: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .video-flow-steps .video-flow-step { min-width: 135px; } }

/* Unified creation studio and restricted operations area. */
.studio-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.studio-canvas { min-width: 0; }
.studio-chat { border-left: 1px solid var(--line, #e4e4eb); padding-left: 28px; position: sticky; top: 24px; }
.studio-chat h2 { font-size: 22px; margin: 0 0 20px; }
.studio-welcome p { color: var(--muted, #737584); line-height: 1.7; }
.studio-layout [hidden] { display: none !important; }
.studio-canvas textarea, .studio-settings textarea { width: 100%; line-height: 1.65; }
.studio-canvas textarea#studio_script, .studio-settings textarea#studio_script { border-color: transparent; background: #fafafa; font-size: 17px; padding: 20px; }
.studio-details { margin: 20px 0; }
.studio-details summary { cursor: pointer; font-weight: 700; margin-bottom: 16px; color: #737584; }
.studio-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; align-items: center; }
.studio-character { display: flex; align-items: center; gap: 12px; }
.studio-character span { display: grid; }
.studio-character small { color: #737584; }
.studio-character img { width: 44px; height: 52px; object-fit: cover; border-radius: 6px; }
.studio-image, .studio-video { display: block; max-width: 100%; width: auto; max-height: 480px; margin: 0 auto 20px; border-radius: 12px; }
.studio-video { background: #161616; }
.studio-empty { padding: 64px 20px; text-align: center; color: #737584; }
.studio-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid #e4e4eb; margin-top: 24px; }
.studio-footer .form-actions { margin: 0; }
.studio-status { font-size: 13px; color: #737584; max-width: 270px; }
.studio-formats { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 32px; font-size: 12px; }
.studio-formats [aria-disabled=true] { color: #9698a1; }
.studio-text-modes { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.studio-text-modes .creative-choice { flex: 1 1 180px; }
.studio-text-modes .creative-choice:has(input:checked) { border-color: var(--primary, #b14f56); background: #fcf5f6; }
.admin-navigation { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.admin-detail { margin: 24px 0; }
.admin-detail summary { cursor: pointer; font-weight: 800; }
.admin-detail pre { max-height: 600px; overflow: auto; padding: 20px; background: #f7f7f9; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.table-scroll td small { display: block; color: #737584; }
@media(max-width: 1050px) { .studio-layout { grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 24px; } .studio-chat { padding-left: 20px; } }
@media(max-width: 760px) { .studio-layout { grid-template-columns: 1fr; } .studio-chat { border-left: 0; border-top: 1px solid #e4e4eb; padding: 24px 0 0; position: static; } .studio-choices { grid-template-columns: 1fr; } .studio-image, .studio-video { max-height: 420px; } }

/* Stacked settings with a dedicated video preview. */
.studio-editor-layout { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 40px; }
.studio-draft-form { display: none; }
.studio-settings, .studio-preview { min-width: 0; }
.studio-section + .studio-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.studio-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.studio-section-heading h2, .studio-section-heading label { font-size: 18px; font-weight: 700; margin: 0; }
.studio-refine-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.studio-refine-button:hover, .studio-refine-button[aria-expanded=true] { background: var(--mint); color: var(--accent); }
.studio-context-chat { margin-top: 16px; padding: 18px; background: #faf8f8; border-radius: 10px; }
.studio-context-chat .field { margin-bottom: 12px; }
.studio-context-chat form > button { padding: 9px 16px; }
.studio-settings .studio-image { max-height: 400px; margin: 0; }
.studio-image-placeholder { padding: 32px 20px; text-align: center; background: #fafafa; border-radius: 10px; color: var(--muted); }
.studio-image-placeholder p { margin: 0 0 18px; }
.studio-preview { position: sticky; top: 24px; }
.studio-preview .studio-choices { grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0 0 20px; }
.studio-preview .studio-choices .field { min-width: 0; width: 100%; margin: 0; }
.studio-preview .studio-choices label { margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.studio-preview .studio-choices select { width: 100%; }
.studio-preview .studio-video { width: 100%; max-height: 480px; margin: 0; }
.studio-video-placeholder { aspect-ratio: 9 / 16; max-height: 440px; width: 100%; border-radius: 12px; background: #f7f7f8; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: 24px; color: var(--muted); box-sizing: border-box; }
.studio-video-placeholder .nav-icon { width: 32px; height: 32px; }
.studio-video-placeholder p { margin: 0; text-align: center; font-size: 14px; }
.studio-download { display: block; width: fit-content; margin: 12px auto 0; font-size: 13px; }
.studio-preview .studio-footer { margin: 18px 0 0; padding: 0; border: 0; gap: 14px; }
.studio-preview .studio-status { max-width: none; width: 100%; }
.studio-preview .form-actions { display: flex; width: 100%; flex-wrap: wrap; gap: 10px; }
.studio-preview .form-actions .button-primary { flex: 1; }
@media(max-width: 1050px) { .studio-editor-layout { gap: 24px; grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr); } }
@media(max-width: 760px) { .studio-editor-layout { grid-template-columns: 1fr; } .studio-preview { position: static; padding-top: 24px; border-top: 1px solid var(--line); } .studio-preview .studio-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } .studio-video-placeholder { max-width: 320px; margin: auto; } }
@media(max-width: 420px) { .studio-preview .studio-choices { grid-template-columns: 1fr; } }

/* Only one editing section is expanded; the video preview stays visible. */
.studio-section-heading h2 { flex: 1; min-width: 0; }
.studio-section-heading { margin-bottom: 0; }
[data-studio-section-panel]:not([hidden]) { padding-top: 14px; }
[data-studio-section-panel][hidden] { display: none; }
.studio-sound-player { display: block; width: 100%; margin: 20px 0 16px; }
.studio-sound-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.studio-sound-settings input[type=range] { padding: 0; accent-color: var(--accent); }
@media(max-width: 420px) { .studio-sound-settings { grid-template-columns: 1fr; } }

.studio-refine-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.reading-source { white-space: pre-wrap; max-height: 320px; overflow: auto; line-height: 1.6; }
.reading-ending { width: 100%; max-height: 360px; }
.reading-format { text-decoration: none; }

.studio-footer button:disabled { opacity: .5; cursor: not-allowed; }

.context-product-preview { display: block; max-width: 220px; max-height: 240px; object-fit: contain; margin-bottom: 1rem; border-radius: 12px; }

/* Optional resource shortcuts before the first video. */
.video-library-empty { max-width: 1000px; margin: 64px auto 40px; }
.video-library-empty-intro { text-align: center; margin-bottom: 48px; }
.video-library-empty-intro h2 { margin: 0 0 12px; font-size: clamp(24px, 2.2vw, 32px); }
.video-library-empty-intro p { color: var(--muted); line-height: 1.6; margin: 0 auto 28px; max-width: 500px; }
.video-library-setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.video-library-setup-card { display: block; padding: 28px; border: 1px solid #e5e5e8; border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.video-library-setup-card:hover { border-color: var(--accent); background: #fdf8f8; }
.video-library-setup-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.video-library-setup-icon { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 10px; color: var(--accent); background: #f9eeee; margin-bottom: 20px; }
.video-library-setup-icon .nav-icon { width: 24px; height: 24px; flex-basis: 24px; }
.video-library-setup-card h3 { font-size: 18px; line-height: 1.4; margin: 0 0 8px; }
.video-library-setup-card p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }
@media (max-width: 600px) {
  .video-library-empty { margin-top: 32px; }
  .video-library-empty-intro { margin-bottom: 32px; }
  .video-library-setup { grid-template-columns: 1fr; gap: 16px; }
  .video-library-setup-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { .video-library-setup-card { transition: none; } }
