#shortfilmPage {
    height: 100%;
    overflow: hidden;
    padding: 18px 22px;
}

body[data-active-page="shortfilm"] .task-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 320;
    width: min(320px, calc(100vw - 56px));
    height: 100dvh;
    box-shadow: -22px 0 54px rgba(0, 0, 0, .48);
}

.shortfilm-page {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0;
    grid-template-columns: clamp(184px, 14vw, 218px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
}

.shortfilm-project-bar {
    grid-column: 1 / -1;
    grid-row: 1;
}

.shortfilm-stepper {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: 8px;
    padding: 10px;
    overflow: hidden;
}

.shortfilm-step {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    justify-content: flex-start;
    padding: 0 14px;
    text-align: left;
}

.shortfilm-panel {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
}

.shortfilm-panel.active {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.shortfilm-step[aria-disabled="true"] {
    opacity: 0.48;
    cursor: not-allowed;
}

.shortfilm-step.locked.has-blockers { opacity: .78; cursor: pointer; }
.shortfilm-step-gate-badge {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 4px 7px;
    border: 1px solid rgba(214,180,99,.3);
    border-radius: 999px;
    color: var(--gold-light);
    background: rgba(214,180,99,.09);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.shortfilm-step-gate-badge[hidden] { display: none; }

.shortfilm-step.locked span {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}

.shortfilm-analysis-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.shortfilm-analysis-status.current { color: var(--success); }
.shortfilm-analysis-status.outdated { color: var(--gold-light); }

.shortfilm-settings-mode {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.shortfilm-mode-card {
    display: grid;
    gap: 6px;
    min-height: 98px;
    padding: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 13px;
    color: var(--text-main);
    background: rgba(255,255,255,0.025);
    text-align: left;
    cursor: pointer;
}

.shortfilm-mode-card strong { font: 700 14px 'Outfit', sans-serif; }
.shortfilm-mode-card span { color: var(--text-muted); font-size: 12px; line-height: 1.55; }
.shortfilm-mode-card.active {
    border-color: var(--gold);
    background: rgba(214, 180, 99, 0.09);
    box-shadow: inset 0 0 0 1px rgba(214, 180, 99, 0.18);
}

.shortfilm-settings-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shortfilm-settings-line + .shortfilm-settings-line { margin-top: 8px; }
.shortfilm-settings-line strong { color: var(--text-main); }
.shortfilm-settings-chip,
.shortfilm-override-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.035);
    font-size: 11px;
}

.shortfilm-override-badge { color: var(--gold-light); border-color: rgba(214, 180, 99, 0.35); }
.shortfilm-settings-impact { color: var(--gold-light); }
.shortfilm-settings-clean { color: var(--success); }
.shortfilm-shot-stale { color: var(--gold-light); font-size: 11px; }

.shortfilm-storyboard-readiness {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(214,180,99,.34);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(214,180,99,.1), rgba(214,180,99,.025));
    outline: none;
}
.shortfilm-storyboard-readiness[hidden] { display: none; }
.shortfilm-storyboard-readiness.is-emphasized { animation: shortfilmIssueEmphasis .75s ease; }
.shortfilm-storyboard-readiness-head { display: flex; align-items: center; gap: 10px; }
.shortfilm-storyboard-readiness-icon,
.shortfilm-shot-issue-title > span { display: grid; flex: 0 0 auto; place-items: center; width: 25px; height: 25px; border-radius: 999px; color: #141008; background: var(--gold-light); font-weight: 950; }
.shortfilm-storyboard-readiness-head > div { display: grid; gap: 2px; min-width: 0; }
.shortfilm-storyboard-readiness-head strong { color: var(--text-primary); font-size: 14px; }
.shortfilm-storyboard-readiness-head small { color: var(--text-muted); font-size: 11px; }
.shortfilm-storyboard-issue-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 7px; max-height: 154px; overflow-y: auto; }
.shortfilm-storyboard-issue-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; color: var(--text-secondary); background: rgba(7,8,14,.34); text-align: left; cursor: pointer; }
.shortfilm-storyboard-issue-card:hover,
.shortfilm-storyboard-issue-card:focus-visible { border-color: rgba(214,180,99,.5); background: rgba(214,180,99,.08); outline: none; }
.shortfilm-storyboard-issue-card > span { color: var(--gold-light); font: 800 10px 'Outfit', sans-serif; white-space: nowrap; }
.shortfilm-storyboard-issue-card > div { display: grid; gap: 2px; min-width: 0; }
.shortfilm-storyboard-issue-card strong { color: var(--text-primary); font-size: 11px; }
.shortfilm-storyboard-issue-card small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-storyboard-issue-card > b { color: var(--gold-light); font-size: 10px; white-space: nowrap; }
@keyframes shortfilmIssueEmphasis { 0%,100% { box-shadow: none; } 35% { box-shadow: 0 0 0 4px rgba(214,180,99,.14), 0 0 28px rgba(214,180,99,.18); } }

.shortfilm-storyboard-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; min-height: 26px; color: var(--text-muted); font-size: 12px; }
.shortfilm-storyboard-summary span { white-space: nowrap; }
.shortfilm-storyboard-summary strong { color: var(--text-primary); font: 800 14px 'Outfit', sans-serif; }
.shortfilm-storyboard-summary .attention,
.shortfilm-storyboard-summary .attention strong { color: var(--gold-light); }
.shortfilm-storyboard-state { margin-left: auto; padding: 5px 9px; border-radius: 999px; font-weight: 700; }
.shortfilm-storyboard-state.ready { color: var(--success); background: rgba(73,218,130,.09); }
.shortfilm-storyboard-state.blocked { color: var(--gold-light); background: rgba(214,180,99,.08); }
.shortfilm-storyboard-issues { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 7px; border-top: 1px solid var(--border-subtle); }
.shortfilm-storyboard-issue { border: 1px solid rgba(214,180,99,.35); border-radius: 999px; padding: 5px 9px; color: var(--gold-light); background: rgba(214,180,99,.07); font-size: 11px; cursor: pointer; }

.shortfilm-shot-card.dragging { opacity: .5; }
.shortfilm-shot-card.drag-target { outline: 2px solid var(--gold); outline-offset: 3px; }
[data-shortfilm-step="storyboard"].active { display: flex; flex-direction: column; overflow: hidden; }
[data-shortfilm-step="storyboard"] .shortfilm-shot-list { display: block; flex: 1; min-height: 0; }
.shortfilm-storyboard-empty-action { justify-self: start; margin-top: 12px; }
.shortfilm-storyboard-workspace {
    --shortfilm-role-color: #e7b75b;
    --shortfilm-scene-color: #58aef7;
    --shortfilm-prop-color: #49da82;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    background: rgba(6,7,15,.38);
}
.shortfilm-storyboard-overview {
    --shortfilm-role-color: #e7b75b;
    --shortfilm-scene-color: #58aef7;
    --shortfilm-prop-color: #49da82;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.shortfilm-storyboard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 8px 4px 14px; }
.shortfilm-storyboard-metrics { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px; min-width: 0; color: var(--text-muted); font-size: 12px; }
.shortfilm-storyboard-metrics strong { color: var(--text-primary); font-size: 15px; }
.shortfilm-storyboard-metrics .attention { color: var(--gold-light); }
.shortfilm-storyboard-pending-link { padding: 5px 9px; border: 1px solid rgba(214,180,99,.28); border-radius: 999px; color: var(--gold-light); background: rgba(214,180,99,.08); font: 800 11px 'Noto Sans SC', sans-serif; cursor: pointer; }
.shortfilm-storyboard-pending-link:hover,
.shortfilm-storyboard-pending-link:focus-visible { border-color: rgba(214,180,99,.55); outline: none; background: rgba(214,180,99,.14); }
.shortfilm-storyboard-toolbar-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.shortfilm-shot-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); align-content: start; gap: 14px; min-height: 0; padding: 2px 4px 12px; overflow-y: auto; scrollbar-width: thin; }
.shortfilm-shot-overview-card { position: relative; min-width: 0; overflow: visible; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(255,255,255,.022); transition: transform .18s ease, border-color .18s ease, background .18s ease, opacity .18s ease; }
.shortfilm-shot-overview-card:hover { transform: translateY(-2px); border-color: rgba(214,180,99,.34); background: rgba(255,255,255,.035); }
.shortfilm-shot-overview-card.menu-open { z-index: 30; }
.shortfilm-shot-card-grid.is-sorting .shortfilm-shot-overview-card { transform: none; }
.shortfilm-shot-overview-card.dragging { opacity: .34; border-style: dashed; }
.shortfilm-shot-overview-card.drag-target { border-color: rgba(214,180,99,.48); background: rgba(214,180,99,.055); }
.shortfilm-shot-overview-card.drop-before::before,
.shortfilm-shot-overview-card.drop-after::before { content: ''; position: absolute; z-index: 9; top: 8px; bottom: 8px; width: 4px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 0 4px rgba(214,180,99,.12), 0 0 18px rgba(214,180,99,.55); pointer-events: none; }
.shortfilm-shot-overview-card.drop-before::before { left: -9px; }
.shortfilm-shot-overview-card.drop-after::before { right: -9px; }
.shortfilm-shot-overview-card.drop-axis-vertical.drop-before::before,
.shortfilm-shot-overview-card.drop-axis-vertical.drop-after::before { left: 10px; right: 10px; width: auto; height: 4px; }
.shortfilm-shot-overview-card.drop-axis-vertical.drop-before::before { top: -9px; bottom: auto; }
.shortfilm-shot-overview-card.drop-axis-vertical.drop-after::before { top: auto; bottom: -9px; }
.shortfilm-shot-overview-card.orphaned { opacity: .58; }
.shortfilm-shot-drag-handle { position: absolute; top: 9px; left: 9px; z-index: 5; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; color: var(--text-secondary); background: rgba(7,8,14,.78); box-shadow: 0 8px 22px rgba(0,0,0,.2); backdrop-filter: blur(10px); cursor: grab; user-select: none; }
.shortfilm-shot-drag-handle:hover,
.shortfilm-shot-drag-handle:focus-visible { color: var(--gold-light); border-color: rgba(214,180,99,.48); outline: none; background: rgba(35,29,19,.9); }
.shortfilm-shot-drag-handle:active { cursor: grabbing; }
.shortfilm-shot-drag-handle > span { font-size: 18px; line-height: 1; }
.shortfilm-shot-drag-handle small { font-size: 10px; font-weight: 700; }
.shortfilm-shot-overview-open { display: grid; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 0; border-radius: inherit; color: var(--text-primary); background: transparent; text-align: left; cursor: pointer; }
.shortfilm-shot-overview-preview { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border-subtle); border-radius: 13px 13px 0 0; background: radial-gradient(circle at 50% 35%, rgba(214,180,99,.09), transparent 45%), var(--bg-surface); }
.shortfilm-shot-overview-preview img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-surface); }
.shortfilm-shot-overview-placeholder { display: grid; place-items: center; gap: 5px; color: var(--text-muted); }
.shortfilm-shot-overview-placeholder b { color: rgba(214,180,99,.72); font: 800 28px 'Outfit', sans-serif; letter-spacing: .08em; }
.shortfilm-shot-overview-placeholder small { font-size: 10px; }
.shortfilm-shot-overview-copy { display: grid; gap: 8px; min-width: 0; padding: 12px 14px 13px; }
.shortfilm-shot-overview-number { color: var(--gold-light); font: 800 11px 'Outfit', sans-serif; letter-spacing: .06em; }
.shortfilm-shot-overview-copy > strong { min-height: 38px; overflow: hidden; color: var(--text-primary); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.shortfilm-shot-overview-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-muted); }
.shortfilm-shot-overview-meta em { padding: 3px 7px; border-radius: 999px; color: var(--success); background: rgba(73,218,130,.08); font-size: 10px; font-style: normal; }
.shortfilm-shot-overview-meta em.attention { color: var(--gold-light); background: rgba(214,180,99,.09); }
.shortfilm-shot-overview-meta em.orphaned { color: #ff8888; background: rgba(255,136,136,.08); }
.shortfilm-shot-overview-meta small { font-size: 11px; }
.shortfilm-shot-overview-card > .shortfilm-shot-more-menu { position: absolute; top: 9px; right: 9px; z-index: 31; }
.shortfilm-shot-overview-card > .shortfilm-shot-more-menu > summary { border-color: rgba(255,255,255,.11); color: var(--text-primary); background: rgba(7,8,14,.76); backdrop-filter: blur(10px); }
.shortfilm-shot-overview-card > .shortfilm-shot-more-menu > .shortfilm-shot-more-popover { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: min(226px, calc(100vw - 48px)); max-height: min(210px, calc(100dvh - 96px)); overflow-y: auto; }
.shortfilm-shot-overview-card > .shortfilm-shot-more-menu > .shortfilm-shot-more-popover button { min-height: 34px; padding: 6px 9px; white-space: nowrap; }
.shortfilm-shot-overview-card > .shortfilm-shot-more-menu > .shortfilm-shot-more-popover button.danger { grid-column: 1 / -1; margin-top: 2px; border-top: 1px solid var(--border-subtle); border-radius: 0 0 7px 7px; }
.shortfilm-storyboard-back { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--text-secondary); background: rgba(255,255,255,.025); cursor: pointer; white-space: nowrap; }
.shortfilm-storyboard-back:hover { color: var(--gold-light); border-color: rgba(214,180,99,.38); background: rgba(214,180,99,.06); }
.shortfilm-storyboard-back span { font-size: 22px; line-height: 1; }
.shortfilm-shot-head-divider { width: 1px; height: 26px; background: var(--border-subtle); }
.shortfilm-shot-more-menu { position: relative; flex: 0 0 auto; }
.shortfilm-shot-more-menu > summary { display: grid; place-items: center; width: 38px; height: 34px; border: 1px solid var(--border-subtle); border-radius: 9px; color: var(--text-muted); background: rgba(255,255,255,.025); cursor: pointer; list-style: none; letter-spacing: 2px; }
.shortfilm-shot-more-menu > summary::-webkit-details-marker { display: none; }
.shortfilm-shot-more-menu[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.4); }
.shortfilm-shot-more-popover { position: absolute; top: calc(100% + 7px); right: 0; z-index: 20; display: grid; width: 174px; padding: 6px; border: 1px solid var(--border-subtle); border-radius: 11px; background: var(--bg-elevated); box-shadow: 0 18px 45px rgba(0,0,0,.38); }
.shortfilm-shot-more-popover button { min-height: 36px; padding: 7px 10px; border: 0; border-radius: 7px; color: var(--text-secondary); background: transparent; text-align: left; cursor: pointer; }
.shortfilm-shot-more-popover button:hover { color: var(--text-primary); background: rgba(255,255,255,.05); }
.shortfilm-shot-more-popover button.danger { color: #ff8888; }
.shortfilm-shot-more-popover button:disabled { opacity: .35; cursor: not-allowed; }
.shortfilm-shot-prompt-editor { display: flex; height: 100%; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.shortfilm-shot-prompt-head { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 60px; padding: 12px 18px; border-bottom: 1px solid var(--border-subtle); }
.shortfilm-shot-prompt-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.shortfilm-shot-prompt-title > strong { overflow: hidden; color: var(--text-primary); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-shot-prompt-surface { display: flex; flex: 1; flex-direction: column; min-height: 0; padding: 18px; background: rgba(255,255,255,.012); }
.shortfilm-shot-issue-panel { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin-bottom: 12px; padding: 9px 10px; border: 1px solid rgba(214,180,99,.3); border-radius: 11px; background: rgba(214,180,99,.07); }
.shortfilm-shot-issue-panel.ready { border-color: rgba(73,218,130,.18); color: var(--success); background: rgba(73,218,130,.05); }
.shortfilm-shot-issue-panel.ready > span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 999px; color: #07120c; background: var(--success); font-weight: 900; }
.shortfilm-shot-issue-panel.ready strong { font-size: 11px; }
.shortfilm-shot-issue-panel.ready small { margin-left: auto; color: var(--text-muted); font-size: 10px; }
.shortfilm-shot-issue-title { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; color: var(--gold-light); font-size: 11px; white-space: nowrap; }
.shortfilm-shot-issue-title > span { width: 22px; height: 22px; font-size: 11px; }
.shortfilm-shot-issue-actions { display: flex; min-width: 0; gap: 6px; overflow-x: auto; }
.shortfilm-shot-issue-actions button { display: grid; gap: 1px; min-width: 170px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: var(--text-secondary); background: rgba(7,8,14,.3); text-align: left; cursor: pointer; }
.shortfilm-shot-issue-actions button:hover,
.shortfilm-shot-issue-actions button:focus-visible { border-color: rgba(214,180,99,.46); outline: none; background: rgba(214,180,99,.08); }
.shortfilm-shot-issue-actions strong { color: var(--text-primary); font-size: 10px; }
.shortfilm-shot-issue-actions small { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-shot-prompt-textarea.needs-attention { animation: shortfilmPromptAttention .85s ease; }
@keyframes shortfilmPromptAttention { 0%,100% { box-shadow: none; } 35% { box-shadow: inset 0 0 0 2px rgba(214,180,99,.32); } }
.shortfilm-shot-prompt-hint { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 12px; color: var(--text-muted); font-size: 11px; }
.shortfilm-shot-prompt-hint kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin: 0 2px; padding: 0 5px; border: 1px solid rgba(214,180,99,.3); border-radius: 6px; color: var(--gold-light); background: rgba(214,180,99,.08); font: 800 12px 'Outfit', sans-serif; box-shadow: none; }
.shortfilm-shot-composer { position: relative; display: flex; flex: 1; min-height: 0; }
.shortfilm-shot-prompt-highlight { position: absolute; z-index: 0; inset: 0; min-height: 0; padding: 4px 4px 18px; overflow: auto; color: var(--text-primary); background: transparent; font: 500 16px/1.85 'Noto Sans SC', sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; scrollbar-width: none; }
.shortfilm-shot-prompt-highlight::-webkit-scrollbar { display: none; }
.shortfilm-prompt-mention { padding: 0; border: 0; border-radius: 3px; background: transparent; font: inherit; font-weight: 750; }
.shortfilm-prompt-mention.roles { color: var(--shortfilm-role-color); }
.shortfilm-prompt-mention.scenes { color: var(--shortfilm-scene-color); }
.shortfilm-prompt-mention.props { color: var(--shortfilm-prop-color); }
.shortfilm-shot-prompt-textarea { position: relative; z-index: 1; width: 100%; min-height: 0; padding: 4px 4px 18px; overflow-y: auto; border: 0; outline: 0; resize: none; color: transparent; background: transparent; font: 500 16px/1.85 'Noto Sans SC', sans-serif; caret-color: var(--gold-light); -webkit-text-fill-color: transparent; overflow-wrap: anywhere; }
.shortfilm-shot-prompt-textarea::selection { background: rgba(88,174,247,.24); }
.shortfilm-shot-prompt-textarea::placeholder { color: var(--text-muted); opacity: .62; -webkit-text-fill-color: var(--text-muted); }
.shortfilm-shot-prompt-textarea:focus::placeholder { opacity: .36; }
.shortfilm-mention-menu { position: absolute; z-index: 30; top: 42px; left: 0; display: none; width: min(420px, calc(100% - 12px)); max-height: 312px; overflow-y: auto; padding: 7px; border: 1px solid rgba(214,180,99,.34); border-radius: 12px; background: var(--bg-elevated); box-shadow: 0 22px 60px rgba(0,0,0,.48); }
.shortfilm-mention-menu.active { display: grid; gap: 3px; }
.shortfilm-mention-menu-head { padding: 5px 8px 7px; color: var(--text-muted); font-size: 10px; letter-spacing: .08em; }
.shortfilm-mention-option { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 5px 7px; border: 0; border-radius: 8px; color: var(--text-secondary); background: transparent; text-align: left; cursor: pointer; }
.shortfilm-mention-option:hover,
.shortfilm-mention-option.active { color: var(--text-primary); background: rgba(214,180,99,.1); }
.shortfilm-mention-option img,
.shortfilm-mention-placeholder { display: grid; place-items: center; width: 38px; height: 38px; object-fit: contain; border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--gold-light); background: var(--bg-surface); font-weight: 800; }
.shortfilm-mention-option span:last-child { display: grid; gap: 3px; min-width: 0; }
.shortfilm-mention-option strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-mention-option small { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-mention-option.roles small { color: var(--shortfilm-role-color); }
.shortfilm-mention-option.scenes small { color: var(--shortfilm-scene-color); }
.shortfilm-mention-option.props small { color: var(--shortfilm-prop-color); }
.shortfilm-shot-filmstrip-shell { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 9px; min-height: 98px; padding: 9px 12px; border-top: 1px solid var(--border-subtle); background: rgba(255,255,255,.018); }
.shortfilm-shot-filmstrip { display: flex; gap: 8px; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 1px; overscroll-behavior-inline: contain; touch-action: pan-x; cursor: grab; scrollbar-width: none; }
.shortfilm-shot-filmstrip::-webkit-scrollbar { display: none; }
.shortfilm-shot-filmstrip-item { display: grid; grid-template-columns: 56px minmax(0,1fr); align-items: center; gap: 9px; flex: 0 0 174px; min-width: 0; height: 70px; padding: 7px; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 11px; color: var(--text-secondary); background: rgba(255,255,255,.018); text-align: left; cursor: pointer; }
.shortfilm-shot-filmstrip-item:hover { color: var(--text-primary); background: rgba(255,255,255,.035); }
.shortfilm-shot-filmstrip-item.active { color: var(--text-primary); border-color: rgba(214,180,99,.58); background: rgba(214,180,99,.075); box-shadow: inset 0 0 0 1px rgba(214,180,99,.08); }
.shortfilm-shot-filmstrip-item > span { display: grid; place-items: center; width: 56px; height: 54px; overflow: hidden; border-radius: 8px; color: var(--gold-light); background: var(--bg-surface); font: 800 12px 'Outfit', sans-serif; }
.shortfilm-shot-filmstrip-item img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-surface); }
.shortfilm-shot-filmstrip-item strong { overflow: hidden; font-size: 11px; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.shortfilm-shot-filmstrip-nav { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border-subtle); border-radius: 50%; color: var(--text-secondary); background: rgba(255,255,255,.025); font-size: 24px; cursor: pointer; }
.shortfilm-shot-filmstrip-nav:hover:not(:disabled) { color: var(--gold-light); border-color: rgba(214,180,99,.4); }
.shortfilm-shot-filmstrip-nav:disabled { opacity: .25; cursor: not-allowed; }
.shortfilm-shot-editor-main { display: grid; gap: 18px; padding: 18px; }
.shortfilm-shot-section { min-width: 0; }
.shortfilm-shot-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.shortfilm-shot-section-head h4 { margin: 0; font-size: 12px; }
.shortfilm-shot-reference-strip { display: flex; gap: 5px; min-width: 0; color: var(--text-muted); font-size: 10px; }
.shortfilm-shot-reference-strip img { width: 34px; height: 34px; object-fit: contain; border: 1px solid var(--border-subtle); border-radius: 7px; background: var(--bg-surface); }
.shortfilm-shot-core-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.shortfilm-shot-core-field { display: grid; gap: 7px; min-width: 0; color: var(--text-muted); font-size: 11px; }
.shortfilm-shot-core-field span { display: flex; align-items: center; gap: 6px; }
.shortfilm-shot-core-field em { color: var(--text-muted); font-size: 10px; font-style: normal; }
.shortfilm-shot-core-field textarea { min-height: 118px; resize: vertical; }
.shortfilm-shot-language-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; padding-top: 16px; border-top: 1px solid var(--border-subtle); }
.shortfilm-shot-language-row label { display: grid; gap: 6px; min-width: 0; color: var(--text-muted); font-size: 11px; }
.shortfilm-shot-advanced { border: 1px solid var(--border-subtle); border-radius: 11px; background: rgba(255,255,255,.018); }
.shortfilm-shot-advanced > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 13px; color: var(--text-secondary); cursor: pointer; }
.shortfilm-shot-advanced > summary small { color: var(--text-muted); font-size: 10px; }
.shortfilm-shot-advanced[open] > summary { border-bottom: 1px solid var(--border-subtle); color: var(--gold-light); }
.shortfilm-shot-advanced-body { display: grid; gap: 13px; padding: 13px; }
.shortfilm-shot-advanced-body .shortfilm-shot-core-field textarea { min-height: 76px; }
.shortfilm-shot-advanced-body .shortfilm-shot-prompt { min-height: 118px; }
.shortfilm-shot-script-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.shortfilm-shot-script-field { display: grid; gap: 5px; min-width: 0; }
.shortfilm-shot-script-field.wide { grid-column: 1 / -1; }
.shortfilm-shot-script-field.two { grid-column: span 2; }
.shortfilm-shot-script-field label { color: var(--text-muted); font-size: 11px; }
.shortfilm-shot-dependency { display: grid; gap: 8px; min-width: 0; }
.shortfilm-shot-dependency .shortfilm-shot-assets { min-height: 74px; }

.shortfilm-shot-settings {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 9px;
}
.shortfilm-shot-overrides { margin-top: 12px; border-top: 1px solid var(--border-subtle); padding-top: 10px; }
.shortfilm-shot-overrides summary { color: var(--text-muted); font-size: 12px; cursor: pointer; user-select: none; }
.shortfilm-shot-overrides[open] summary { margin-bottom: 9px; color: var(--gold-light); }
.shortfilm-shot-overrides .shortfilm-shot-settings { margin-bottom: 0; }
.shortfilm-shot-overrides label { display: grid; gap: 5px; min-width: 0; color: var(--text-muted); font-size: 11px; }

.shortfilm-shot-setting { display: grid; gap: 5px; min-width: 0; }
.shortfilm-shot-setting label { color: var(--text-muted); font-size: 11px; }

.shortfilm-analysis-preview,
.shortfilm-version-panel,
.shortfilm-settings-summary {
    display: none;
    margin-top: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: rgba(0,0,0,0.2);
    padding: 14px;
}

.shortfilm-analysis-preview.active,
.shortfilm-version-panel.active,
.shortfilm-settings-summary.active { display: block; }

.shortfilm-analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.shortfilm-analysis-group {
    min-width: 0;
    border: 1px solid var(--border-subtle);
    border-radius: 11px;
    padding: 10px;
    background: rgba(255,255,255,0.025);
}

.shortfilm-analysis-group h4 {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 13px;
}

.shortfilm-analysis-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 7px 0;
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
}

.shortfilm-analysis-item:first-of-type { border-top: 0; }
.shortfilm-analysis-item strong { display: block; line-height: 1.4; }
.shortfilm-analysis-item small { display: block; margin-top: 3px; color: var(--text-muted); line-height: 1.4; }

.shortfilm-version-create {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin: 12px 0;
}

.shortfilm-version-list { display: grid; gap: 8px; }
.shortfilm-version-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 9px 10px;
    background: rgba(255,255,255,0.025);
}

.shortfilm-version-row small { display: block; color: var(--text-muted); margin-top: 3px; }

.shortfilm-asset-readiness {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.025);
    font-size: 12px;
}

.shortfilm-asset-readiness.ready { color: var(--success); border-color: rgba(74,222,128,0.25); }
.shortfilm-asset-readiness.attention { color: var(--gold-light); border-color: rgba(214,180,99,0.35); }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.shortfilm-lane-title b { font: inherit; }

.shortfilm-assets {
    grid-template-columns: 1fr;
}
.shortfilm-asset-lane { min-height: 0; }
.shortfilm-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.shortfilm-asset-grid > .shortfilm-empty { grid-column: 1 / -1; min-height: 96px; }
.shortfilm-asset-tile {
    position: relative;
    min-width: 0;
    min-height: 132px;
    overflow: visible;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.shortfilm-asset-tile:hover,
.shortfilm-asset-tile:focus-within {
    border-color: rgba(214,180,99,.42);
    background: rgba(214,180,99,.07);
}
.shortfilm-asset-tile:has(.shortfilm-asset-open:active) { transform: translateY(1px); }
.shortfilm-asset-tile.locked { border-color: rgba(74,222,128,.34); }
.shortfilm-asset-tile.orphaned { border-color: rgba(214,180,99,.35); }
.shortfilm-asset-tile.active { border-color: var(--gold); background: rgba(214,180,99,.09); }
.shortfilm-asset-open {
    position: absolute;
    inset: 0;
    width: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: inherit;
    color: inherit;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.shortfilm-asset-open:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.shortfilm-asset-tile-media {
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 11px 11px 0 0;
    background:
        radial-gradient(circle at 50% 38%, rgba(214,180,99,.1), transparent 52%),
        rgba(5,7,12,.72);
}
.shortfilm-asset-tile-media img {
    width: 100%;
    height: 100%;
    min-height: 86px;
    display: block;
    object-fit: contain;
    background: rgba(5,7,12,.78);
}
.shortfilm-asset-tile-placeholder {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(214,180,99,.24);
    border-radius: 12px;
    color: rgba(214,180,99,.58);
    background: rgba(214,180,99,.06);
    font-size: 12px;
    font-weight: 900;
}
.shortfilm-asset-tile-caption {
    min-width: 0;
    display: block;
    padding: 11px 44px 12px 14px;
    border-top: 1px solid rgba(255,255,255,.045);
    background: rgba(12,14,22,.94);
}
.shortfilm-asset-tile strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.shortfilm-asset-menu-wrap { position: absolute; top: 8px; right: 8px; z-index: 3; }
.shortfilm-asset-menu-trigger {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    background: transparent;
    font: 900 20px/1 'Outfit', sans-serif;
    cursor: pointer;
}
.shortfilm-asset-menu-trigger:hover,
.shortfilm-asset-menu-trigger:focus-visible,
.shortfilm-asset-menu-trigger[aria-expanded="true"] {
    border-color: var(--border-subtle);
    color: var(--gold-light);
    background: var(--bg-elevated);
    outline: none;
}
.shortfilm-asset-menu {
    position: absolute;
    top: 34px;
    right: 0;
    z-index: 8;
    min-width: 112px;
    padding: 5px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-elevated);
    box-shadow: 0 16px 38px rgba(0,0,0,.32);
}
.shortfilm-asset-menu[hidden] { display: none; }
.shortfilm-asset-menu button {
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 7px;
    color: var(--text-secondary);
    background: transparent;
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}
.shortfilm-asset-menu button:hover,
.shortfilm-asset-menu button:focus-visible { color: var(--text-primary); background: rgba(255,255,255,.06); outline: none; }
.shortfilm-asset-menu button.danger { color: var(--error); }
body.shortfilm-asset-editor-open { overflow: hidden; }
.shortfilm-asset-editor {
    position: fixed;
    inset: 0;
    z-index: 1400;
    padding: 4px;
    background: #070a10;
}
.shortfilm-asset-editor:empty { display: none; }
.shortfilm-asset-editor-card {
    height: calc(100vh - 8px);
    height: calc(100dvh - 8px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 26px 28px 14px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: #090d15;
    box-shadow: 0 24px 70px rgba(0,0,0,.34);
}
.shortfilm-asset-editor-head {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.shortfilm-asset-editor-identity { min-width: 0; display: flex; align-items: center; gap: 14px; }
.shortfilm-asset-editor-back,
.shortfilm-asset-editor-lock,
.shortfilm-asset-history-action,
.shortfilm-asset-set-primary {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    background: rgba(16,21,31,.78);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.shortfilm-asset-editor-back { min-width: 112px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.shortfilm-asset-editor-back span:first-child { color: var(--gold-light); font-size: 18px; }
.shortfilm-asset-editor-back:hover,
.shortfilm-asset-editor-lock:hover,
.shortfilm-asset-history-action:hover,
.shortfilm-asset-set-primary:hover { border-color: rgba(214,180,99,.48); background: rgba(214,180,99,.07); }
.shortfilm-asset-editor-divider { width: 1px; height: 32px; flex: 0 0 1px; background: var(--border-subtle); }
.shortfilm-asset-editor-name { display: grid; gap: 3px; }
.shortfilm-asset-editor-name > span { color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.shortfilm-asset-editor-name h4 { margin: 0; color: var(--text-primary); font-size: 22px; line-height: 1; }
.shortfilm-asset-editor-identity .shortfilm-asset-meta { flex-wrap: nowrap; }
.shortfilm-asset-editor-lock.active { color: var(--gold-light); border-color: rgba(214,180,99,.38); }
.shortfilm-asset-editor-lock[disabled],
.shortfilm-asset-history-action[disabled],
.shortfilm-asset-set-primary[disabled],
.shortfilm-asset-generate[disabled] { opacity: .48; cursor: not-allowed; }
.shortfilm-asset-editor-workspace {
    min-height: 0;
    display: grid;
    grid-template-columns: clamp(450px, 31.5vw, 610px) minmax(0, 1fr);
    gap: 14px;
}
.shortfilm-asset-control,
.shortfilm-asset-stage {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(18,23,34,.78), rgba(10,13,21,.82));
}
.shortfilm-asset-control { display: flex; flex-direction: column; }
.shortfilm-asset-slot-tabs {
    display: grid;
    grid-template-columns: repeat(var(--asset-slot-count, 2), minmax(0, 1fr));
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255,255,255,.018);
}
.shortfilm-asset-slot-tabs button {
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-right: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    background: transparent;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}
.shortfilm-asset-slot-tabs button:last-child { border-right: 0; }
.shortfilm-asset-slot-tabs button[aria-selected="true"] {
    color: var(--gold-light);
    background: linear-gradient(90deg, rgba(214,180,99,.15), rgba(214,180,99,.06));
    box-shadow: inset 0 0 0 1px rgba(214,180,99,.38);
}
.shortfilm-asset-slot-tabs button span { margin-left: 6px; color: inherit; }
.shortfilm-asset-prompt-panel {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}
.shortfilm-asset-prompt-panel h5,
.shortfilm-asset-history h5 { margin: 0; color: var(--gold-light); font-size: 15px; }
.shortfilm-asset-editor-prompt { min-height: 150px; flex: 1 1 auto; resize: none; padding: 16px; line-height: 1.7; }
.shortfilm-asset-prompt-panel > p { margin: 0 4px; color: var(--text-muted); font-size: 10px; line-height: 1.5; }
.shortfilm-asset-generate {
    min-height: 58px;
    border: 0;
    border-radius: 10px;
    color: #1c170d;
    background: linear-gradient(100deg, #ddb052, #f0c361);
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}
.shortfilm-asset-generate.active { display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.shortfilm-asset-generate-spinner,
.shortfilm-asset-preview-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: shortfilmAssetSpin .85s linear infinite;
}
.shortfilm-asset-preview-spinner { width: 26px; height: 26px; margin: 0 auto 5px; color: var(--gold-light); }
@keyframes shortfilmAssetSpin { to { transform: rotate(360deg); } }
.shortfilm-asset-stage { display: grid; grid-template-columns: minmax(0, 1fr) 190px; }
.shortfilm-asset-preview { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #1a1e23; }
.shortfilm-asset-preview > img { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--bg-surface); }
.shortfilm-asset-preview-empty { height: 100%; display: grid; place-content: center; gap: 7px; color: var(--text-muted); text-align: center; }
.shortfilm-asset-preview-empty strong { color: var(--text-secondary); font-size: 14px; }
.shortfilm-asset-preview-empty span { font-size: 10px; }
.shortfilm-asset-preview-empty.processing strong { color: var(--gold-light); }
.shortfilm-asset-preview-empty.failed strong { color: var(--danger); }
.shortfilm-failure-log {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 100%;
    margin: 6px auto 0;
    padding: 7px 9px;
    border: 1px solid rgba(214, 180, 99, .28);
    border-radius: 8px;
    color: var(--text-secondary);
    background: rgba(214, 180, 99, .065);
    font-size: 9px;
    cursor: pointer;
}
.shortfilm-failure-log:hover { border-color: rgba(214, 180, 99, .56); background: rgba(214, 180, 99, .11); }
.shortfilm-failure-log span { color: var(--text-muted); font-size: inherit; }
.shortfilm-failure-log strong { overflow: hidden; color: var(--gold-light) !important; font: 600 9px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace !important; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-failure-log b { color: var(--gold-light); font-size: 9px; font-weight: 600; }
.shortfilm-asset-primary-mark {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 11px;
    border-radius: 999px;
    color: #0b5b30;
    background: #8ce2ac;
    font-size: 11px;
    font-weight: 900;
}
.shortfilm-asset-history {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 18px 14px 12px;
    border-left: 1px solid var(--border-subtle);
    background: rgba(4,7,12,.22);
}
.shortfilm-asset-history-action { width: 100%; min-height: 40px; padding: 0 8px; }
.shortfilm-asset-history-action.compact { min-height: 34px; color: var(--text-muted); font-size: 10px; }
.shortfilm-asset-history-list {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 112px;
    align-content: start;
    gap: 9px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}
.shortfilm-asset-history-item {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    color: var(--text-muted);
    background: rgba(255,255,255,.03);
    cursor: pointer;
}
.shortfilm-asset-history-item img { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--bg-surface); }
.shortfilm-asset-history-item > span { display: grid; place-items: center; height: 100%; padding: 8px; font-size: 10px; }
.shortfilm-asset-history-item.in-use { border-color: var(--success); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 42%, transparent); }
.shortfilm-asset-history-item.in-use::before {
    content: '✓ 分镜使用中';
    position: absolute;
    left: 7px;
    bottom: 7px;
    z-index: 1;
    padding: 4px 7px;
    border-radius: 999px;
    color: #062a15;
    background: var(--success);
    box-shadow: 0 4px 12px rgba(0,0,0,.28);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}
.shortfilm-asset-history-item.primary::after {
    content: '主';
    position: absolute;
    top: 7px;
    right: 7px;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #0b5b30;
    background: #8ce2ac;
    font-size: 10px;
    font-weight: 900;
}
.shortfilm-asset-history-empty { padding: 20px 8px; color: var(--text-muted); font-size: 10px; text-align: center; }
.shortfilm-asset-set-primary { width: 100%; color: var(--gold-light); }
.shortfilm-asset-editor-save { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--text-muted); font-size: 10px; }
.shortfilm-asset-editor-save span:first-child { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--success); border-radius: 50%; color: var(--success); }
.shortfilm-asset-editor-save.processing { color: var(--gold-light); }
.shortfilm-asset-editor-save.processing span:first-child { border-color: var(--gold); color: var(--gold-light); }
.shortfilm-asset-metadata-overlay { z-index: 1500; padding: 18px; }
.shortfilm-asset-library-overlay { z-index: 1550; padding: 18px; }
.shortfilm-asset-library-modal {
    width: min(1000px, 100%);
    height: min(82dvh, 760px);
    max-height: min(82dvh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
}
.shortfilm-asset-library-modal .modal-header {
    margin-bottom: 18px;
    padding-right: 36px;
    text-align: left;
}
.shortfilm-asset-library-modal .asset-library-grid {
    min-height: 0;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
}
.shortfilm-asset-library-modal .asset-library-card {
    display: grid;
    grid-template-rows: auto auto;
    width: 100%;
    min-width: 0;
    padding: 0;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}
.shortfilm-asset-library-modal .asset-library-preview {
    min-height: 0;
    aspect-ratio: 4 / 3;
    background: var(--bg-surface);
}
.shortfilm-asset-library-modal .asset-library-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.shortfilm-asset-library-modal .asset-library-title {
    display: block;
    padding: 10px 12px 11px;
    color: var(--text-primary);
}
.shortfilm-asset-metadata-modal { width: min(680px, 100%); display: grid; gap: 18px; }
.shortfilm-asset-metadata-head { display: grid; gap: 5px; padding-right: 32px; }
.shortfilm-asset-metadata-head > span { color: var(--gold-light); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.shortfilm-asset-metadata-head h3 { margin: 0; color: var(--text-primary); font-size: 20px; }
.shortfilm-asset-metadata-head p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.55; }
.shortfilm-asset-metadata-fields { display: grid; gap: 12px; }
.shortfilm-asset-metadata-fields label { display: grid; gap: 7px; }
.shortfilm-asset-metadata-fields label > span { color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.shortfilm-asset-metadata-voice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shortfilm-asset-metadata-actions { display: flex; justify-content: flex-end; }
.shortfilm-asset-head {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.shortfilm-asset-primary {
    width: 72px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(0,0,0,0.24);
}

.shortfilm-asset-primary img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shortfilm-asset-primary span { display: grid; place-items: center; height: 100%; color: var(--text-muted); font-size: 11px; text-align: center; }
.shortfilm-asset-title { display: grid; gap: 7px; min-width: 0; }
.shortfilm-asset-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-muted); font-size: 11px; }
.shortfilm-asset-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
}
.shortfilm-asset-badge.primary { color: var(--success); border-color: rgba(74,222,128,0.3); }
.shortfilm-asset-badge.warning { color: var(--gold-light); border-color: rgba(214,180,99,0.35); }
.shortfilm-asset-actions { display: grid; gap: 6px; justify-items: end; }
.shortfilm-asset-description { min-height: 72px; }
.shortfilm-asset-voice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.shortfilm-asset-slots { display: grid; gap: 10px; }
.shortfilm-asset-slot {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 11px;
    background: rgba(0,0,0,0.16);
}
.shortfilm-asset-slot-head { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.shortfilm-asset-slot-head strong { font-size: 12px; }
.shortfilm-asset-slot-head span { color: var(--text-muted); font-size: 11px; }
.shortfilm-asset-variant-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.shortfilm-asset-variant {
    position: relative;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    cursor: pointer;
}
.shortfilm-asset-variant img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shortfilm-asset-variant.selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(214,180,99,0.3); }
.shortfilm-asset-variant.primary::after {
    content: '主';
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--success);
    color: #07150b;
    font-size: 10px;
    font-weight: 900;
}
.shortfilm-asset-variant span { display: grid; place-items: center; height: 100%; padding: 6px; font-size: 10px; }
.shortfilm-asset-slot-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.shortfilm-asset-slot-actions .studio-mini-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.shortfilm-asset-reference-list { color: var(--text-muted); font-size: 11px; line-height: 1.55; }
.shortfilm-shot-bindings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.shortfilm-shot-binding-row { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 6px; align-items: start; min-width: 0; }
.shortfilm-shot-binding-row > span { padding-top: 5px; color: var(--text-muted); font-size: 11px; }
.shortfilm-shot-binding-options { display: flex; flex-wrap: wrap; gap: 6px; }
.shortfilm-shot-binding-options .shortfilm-empty {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
}
.shortfilm-binding-chip {
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.025);
    font-size: 11px;
    cursor: pointer;
}
.shortfilm-binding-chip.active { color: var(--gold-light); border-color: rgba(214,180,99,0.42); background: rgba(214,180,99,0.09); }

@media (max-width: 1180px) {
    .shortfilm-page { grid-template-columns: 164px minmax(0, 1fr); }
    .shortfilm-step { padding: 0 10px; font-size: 12px; }
    .shortfilm-analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-shot-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-shot-script-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-shot-bindings { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    #shortfilmPage { padding: 10px; }
    .shortfilm-page,
    .shortfilm-panel.active,
    .shortfilm-panel-head,
    .shortfilm-shot-list,
    .shortfilm-storyboard-workspace,
    .shortfilm-storyboard-overview,
    .shortfilm-shot-editor,
    .shortfilm-shot-prompt-editor { width: 100%; min-width: 0; max-width: 100%; }
    .shortfilm-page {
        grid-template-columns: 64px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
    }
    .shortfilm-panel.active { overflow-x: hidden; overflow-y: auto; }
    [data-shortfilm-step="storyboard"].active { overflow: hidden; padding: 10px; }
    .shortfilm-panel-head > div { min-width: 0; }
    .shortfilm-stepper {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 6px;
        overflow: hidden;
    }
    .shortfilm-step {
        min-width: 0;
        min-height: 42px;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }
    .shortfilm-step span { width: 28px; height: 28px; font-size: 11px; }
    .shortfilm-analysis-grid { grid-template-columns: 1fr; }
    .shortfilm-settings-mode,
    .shortfilm-shot-settings { grid-template-columns: 1fr; }
    .shortfilm-storyboard-readiness,
    .shortfilm-shot-script-grid { grid-template-columns: 1fr; }
    .shortfilm-shot-script-field.two,
    .shortfilm-shot-script-field.wide { grid-column: auto; }
    .shortfilm-storyboard-issues { grid-column: auto; }
    .shortfilm-shot-top { align-items: stretch; flex-direction: column; }
    .shortfilm-shot-top .studio-card-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .shortfilm-shot-top .studio-card-actions .studio-mini-btn { width: 100%; }
    .shortfilm-storyboard-summary { gap: 7px 12px; }
    .shortfilm-storyboard-state { width: 100%; margin-left: 0; text-align: center; }
    .shortfilm-storyboard-workspace { height: 100%; min-height: 0; }
    .shortfilm-storyboard-toolbar { align-items: stretch; flex-direction: column; min-height: 0; padding: 0 0 10px; }
    .shortfilm-storyboard-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .shortfilm-shot-card-grid { grid-template-columns: 1fr; gap: 10px; padding: 1px 1px 10px; }
    .shortfilm-shot-overview-card { display: grid; grid-template-columns: minmax(0, 1fr); }
    .shortfilm-shot-overview-open { grid-template-columns: 112px minmax(0,1fr); }
    .shortfilm-shot-overview-preview { height: 100%; min-height: 96px; aspect-ratio: auto; border-right: 1px solid var(--border-subtle); border-bottom: 0; border-radius: 13px 0 0 13px; }
    .shortfilm-shot-overview-copy { padding: 11px 40px 11px 12px; }
    .shortfilm-shot-overview-copy > strong { min-height: 34px; font-size: 12px; }
    .shortfilm-shot-prompt-head { align-items: flex-start; min-height: 58px; padding: 11px 12px; }
    .shortfilm-storyboard-back { min-height: 34px; padding: 0 9px; font-size: 11px; }
    .shortfilm-storyboard-back span { font-size: 19px; }
    .shortfilm-shot-head-divider { display: none; }
    .shortfilm-shot-prompt-title { align-items: flex-start; flex-wrap: wrap; }
    .shortfilm-shot-prompt-title > strong { flex-basis: calc(100% - 52px); font-size: 12px; }
    .shortfilm-shot-prompt-surface { padding: 13px; }
    .shortfilm-shot-prompt-textarea { font-size: 15px; line-height: 1.7; }
    .shortfilm-shot-filmstrip-shell { grid-template-columns: 32px minmax(0,1fr) 32px; gap: 6px; min-height: 78px; padding: 7px; }
    .shortfilm-shot-filmstrip-nav { width: 32px; height: 32px; }
    .shortfilm-shot-filmstrip-item { grid-template-columns: 45px minmax(0,1fr); flex-basis: 142px; height: 60px; padding: 6px; }
    .shortfilm-shot-filmstrip-item > span { width: 45px; height: 46px; }
    .shortfilm-shot-editor-head { align-items: flex-start; padding: 13px; }
    .shortfilm-shot-editor-title { align-items: flex-start; flex-wrap: wrap; }
    .shortfilm-shot-title-input { flex-basis: calc(100% - 80px); }
    .shortfilm-shot-editor-main { gap: 14px; padding: 13px; }
    .shortfilm-shot-section-head { align-items: flex-start; }
    .shortfilm-shot-core-grid { grid-template-columns: 1fr; }
    .shortfilm-shot-language-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .shortfilm-shot-bindings { grid-template-columns: 1fr; }
    .shortfilm-shot-more-popover { position: fixed; top: auto; right: 14px; left: 14px; bottom: 14px; width: auto; }
    .shortfilm-panel .shortfilm-panel-head { align-items: stretch; flex-direction: column; }
    .shortfilm-panel .shortfilm-panel-head > .btn { width: 100%; white-space: nowrap; }
    .shortfilm-asset-lane { min-height: 0; }
    .shortfilm-asset-head { grid-template-columns: 64px minmax(0, 1fr); }
    .shortfilm-asset-actions { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .shortfilm-asset-actions .studio-mini-btn { width: 100%; }
    .shortfilm-asset-voice { grid-template-columns: 1fr; }
}

/* Phase 5 · shot production */
.shortfilm-production-shell { display: grid; gap: 12px; margin-bottom: 16px; }
.shortfilm-production-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.shortfilm-production-tabs button,
.shortfilm-task-filters button {
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.025);
    cursor: pointer;
}
.shortfilm-production-tabs button.active,
.shortfilm-task-filters button.active { color: var(--gold-light); border-color: rgba(214,180,99,0.52); background: rgba(214,180,99,0.12); }
.shortfilm-production-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.shortfilm-production-summary > div,
.shortfilm-budget-grid > div { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(255,255,255,0.025); }
.shortfilm-production-summary strong,
.shortfilm-budget-grid strong { font-size: 20px; color: var(--text-primary); }
.shortfilm-production-summary span,
.shortfilm-budget-grid span { color: var(--text-muted); font-size: 11px; }
.shortfilm-production-summary .active strong { color: var(--gold-light); }
.shortfilm-production-summary .failed strong { color: var(--danger); }
.shortfilm-production-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 12px; background: rgba(255,255,255,0.018); }
.shortfilm-production-toolbar label { display: flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 12px; }
.shortfilm-production-toolbar .shortfilm-select { min-width: 92px; }
.shortfilm-production-shot { overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(255,255,255,0.018); }
.shortfilm-production-shot + .shortfilm-production-shot { margin-top: 12px; }
.shortfilm-production-shot-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; border-bottom: 1px solid var(--border-subtle); background: rgba(255,255,255,0.02); }
.shortfilm-production-shot-head > div { display: grid; gap: 3px; }
.shortfilm-production-shot-head span { color: var(--text-muted); font-size: 11px; }
.shortfilm-production-check { display: flex; align-items: center; gap: 7px; color: var(--gold-light); font-size: 12px; font-weight: 800; }
.shortfilm-production-shot-status .ready { color: var(--success); }
.shortfilm-production-input,
.shortfilm-production-video { display: grid; gap: 12px; padding: 14px; border-bottom: 1px solid var(--border-subtle); }
.shortfilm-production-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shortfilm-production-section-head > div:first-child { display: grid; gap: 3px; }
.shortfilm-production-section-head span { color: var(--text-muted); font-size: 11px; }
.shortfilm-reference-assets { display: flex; flex-wrap: wrap; gap: 9px; }
.shortfilm-reference-assets figure { width: 92px; margin: 0; display: grid; gap: 5px; }
.shortfilm-reference-assets img,
.shortfilm-reference-assets figure > span { width: 92px; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; border: 1px solid var(--border-subtle); border-radius: 10px; background: #070709; }
.shortfilm-reference-assets figcaption { overflow: hidden; color: var(--text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-video-main { display: grid; grid-template-columns: minmax(260px, 0.9fr) minmax(0, 2fr); gap: 12px; align-items: start; }
.shortfilm-production-preview { display: grid; gap: 6px; }
.shortfilm-production-preview small { color: var(--text-muted); }
.shortfilm-production-preview .shortfilm-video-preview { min-height: 210px; display: grid; place-items: center; }
.shortfilm-candidate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.shortfilm-candidate-card { overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 11px; background: rgba(255,255,255,0.025); }
.shortfilm-candidate-card.previewed { border-color: rgba(214,180,99,0.65); }
.shortfilm-candidate-card.final { box-shadow: inset 0 0 0 1px var(--success); }
.shortfilm-candidate-preview { width: 100%; padding: 0; border: 0; color: inherit; background: #070709; cursor: pointer; text-align: left; }
.shortfilm-candidate-preview video,
.shortfilm-candidate-placeholder { width: 100%; aspect-ratio: 16 / 10; display: grid; place-items: center; object-fit: contain; color: var(--text-muted); background: var(--bg-surface); }
.shortfilm-candidate-preview .shortfilm-candidate-title { padding: 7px 9px 0; }
.shortfilm-candidate-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 4px 9px 8px; color: var(--text-muted); font-size: 10px; }
.shortfilm-candidate-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 0 8px 8px; }
.shortfilm-candidate-actions button { min-height: 28px; padding: 3px 6px; border: 1px solid var(--border-subtle); border-radius: 7px; color: var(--text-muted); background: rgba(255,255,255,0.025); font-size: 10px; cursor: pointer; }
.shortfilm-candidate-actions button.active { color: var(--gold-light); border-color: rgba(214,180,99,0.48); background: rgba(214,180,99,0.11); }
.shortfilm-candidate-actions button:disabled { opacity: .42; cursor: not-allowed; }
.shortfilm-production-shot-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.shortfilm-production-shot-foot > span { color: var(--text-muted); font-size: 11px; line-height: 1.55; }

/* Phase 5 · single-shot production workspace */
[data-shortfilm-step="production"].active {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
}
[data-shortfilm-step="production"] [hidden] { display: none !important; }
.shortfilm-production-shell { display: contents; margin: 0; }
.shortfilm-production-workspace-head {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(7, 8, 14, .72);
}
.shortfilm-production-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shortfilm-production-number { display: grid; place-items: center; flex: 0 0 auto; min-width: 38px; height: 36px; border-radius: 10px; color: #17130d; background: var(--gold); font: 900 14px 'Outfit', sans-serif; }
.shortfilm-production-title { display: grid; gap: 2px; min-width: 0; }
.shortfilm-production-title strong,
.shortfilm-production-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-title strong { color: var(--text-primary); font-size: 13px; }
.shortfilm-production-title small { color: var(--text-muted); font-size: 10px; }
.shortfilm-production-tabs { justify-self: center; display: flex; flex-wrap: nowrap; gap: 3px; padding: 4px; border: 1px solid var(--border-subtle); border-radius: 11px; background: rgba(255,255,255,.025); }
.shortfilm-production-tabs button { min-height: 32px; padding: 5px 12px; border: 0; border-radius: 8px; }
.shortfilm-production-tabs button.active { border-color: transparent; background: var(--bg-elevated); box-shadow: 0 5px 16px rgba(0,0,0,.28); }
.shortfilm-production-head-actions { justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.shortfilm-production-head-actions > .btn { min-height: 36px; padding: 7px 12px; }
.shortfilm-production-batch { position: relative; }
.shortfilm-production-batch > summary { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--text-secondary); background: rgba(255,255,255,.025); cursor: pointer; list-style: none; }
.shortfilm-production-batch > summary::-webkit-details-marker { display: none; }
.shortfilm-production-batch[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.42); }
.shortfilm-production-batch .shortfilm-production-toolbar { position: absolute; top: calc(100% + 8px); right: 0; z-index: 35; display: grid; width: 340px; padding: 12px; border-color: rgba(214,180,99,.28); background: var(--bg-elevated); box-shadow: 0 20px 52px rgba(0,0,0,.46); }
.shortfilm-production-batch .shortfilm-production-toolbar[hidden] { display: none; }
.shortfilm-production-batch .shortfilm-production-toolbar label { justify-content: space-between; }
.shortfilm-production-batch .shortfilm-production-toolbar .btn { width: 100%; }
.shortfilm-production-tasks { flex: 1; min-height: 0; padding: 14px; overflow-y: auto; }
.shortfilm-video-table { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }
.shortfilm-production-workspace {
    --shortfilm-role-color: #e7b75b;
    --shortfilm-scene-color: #58aef7;
    --shortfilm-prop-color: #49da82;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: rgba(4, 6, 12, .2);
}
.shortfilm-production-notice { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 7px 14px; border-bottom: 1px solid rgba(214,180,99,.2); color: var(--gold-light); background: rgba(214,180,99,.055); font-size: 11px; }
.shortfilm-production-notice span { margin-right: auto; }
.shortfilm-production-notice button { min-height: 28px; padding: 3px 8px; border: 1px solid rgba(214,180,99,.3); border-radius: 7px; color: var(--gold-light); background: transparent; cursor: pointer; }
.shortfilm-production-stage { display: grid; flex: 1 1 0; grid-template-columns: minmax(290px, 34%) minmax(0, 1fr); gap: 12px; min-height: 0; padding: 12px; overflow: hidden; background: rgba(255,255,255,.01); }
.shortfilm-production-composer,
.shortfilm-production-results { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(255,255,255,.018); }
.shortfilm-production-composer { position: relative; z-index: 4; display: grid; grid-template-rows: auto auto minmax(0,1fr) auto auto; padding: 14px; overflow: visible; border-color: transparent; background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box, linear-gradient(135deg, rgba(88,174,247,.7), rgba(159,105,223,.68), rgba(214,180,99,.78)) border-box; container-type: inline-size; }
.shortfilm-production-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-primary); }
.shortfilm-production-composer-head small { color: var(--text-muted); font-size: 10px; }
.shortfilm-production-prompt-hint { padding: 8px 0 10px; color: var(--text-muted); font-size: 10px; }
.shortfilm-production-prompt-hint kbd { display: inline-grid; place-items: center; min-width: 21px; height: 20px; margin: 0 2px; border: 1px solid rgba(214,180,99,.3); border-radius: 6px; color: var(--gold-light); background: rgba(214,180,99,.08); }
.shortfilm-production-prompt-composer { min-height: 150px; }
.shortfilm-production-prompt-composer .shortfilm-shot-prompt-highlight,
.shortfilm-production-prompt-composer .shortfilm-shot-prompt-textarea { padding: 6px 4px 14px; font-size: 14px; line-height: 1.75; }
.shortfilm-production-config-row { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.shortfilm-production-config-row.keyframes { grid-template-columns: minmax(0,1fr) minmax(104px,.72fr) minmax(118px,.78fr); }
.shortfilm-production-config-row.videos { grid-template-columns: minmax(0,.85fr) minmax(154px,1.15fr); }
.shortfilm-production-model-picker { position: relative; align-self: center; min-width: 0; }
.shortfilm-production-model-picker > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.025);
    cursor: pointer;
    list-style: none;
    box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.shortfilm-production-model-picker > summary::-webkit-details-marker { display: none; }
.shortfilm-production-model-picker > summary:hover { border-color: rgba(214,180,99,.32); background: rgba(214,180,99,.045); }
.shortfilm-production-model-picker[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.56); background: rgba(214,180,99,.075); box-shadow: 0 0 0 3px rgba(214,180,99,.055); }
.shortfilm-production-model-picker > summary strong { min-width: 0; overflow: hidden; color: inherit; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-model-picker > summary b { color: var(--text-muted); font-size: 13px; transition: transform .16s ease; }
.shortfilm-production-model-picker[open] > summary b { transform: rotate(180deg); }
.shortfilm-production-model-icon { flex: 0 0 auto; width: 16px; height: 16px; color: currentColor; }
.shortfilm-production-model-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    z-index: 46;
    display: grid;
    gap: 6px;
    width: min(320px, calc(300% + 14px));
    max-height: min(440px, 66vh);
    padding: 9px;
    overflow-y: auto;
    border: 1px solid rgba(214,180,99,.34);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(27,27,39,.99), rgba(12,13,22,.995));
    box-shadow: 0 22px 60px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035);
    backdrop-filter: blur(18px);
    scrollbar-width: thin;
}
.shortfilm-production-model-menu > header { display: grid; gap: 3px; padding: 2px 3px 7px; }
.shortfilm-production-model-menu > header strong { color: var(--text-primary); font-size: 12px; }
.shortfilm-production-model-menu > header small { color: var(--text-muted); font-size: 9px; }
.shortfilm-production-model-options { display: grid; gap: 5px; }
.shortfilm-production-model-menu button {
    display: grid;
    grid-template-columns: 20px minmax(0,1fr) 18px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-secondary);
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.shortfilm-production-model-menu button:hover { border-color: var(--border-subtle); background: rgba(255,255,255,.035); }
.shortfilm-production-model-menu button.active { color: var(--gold-light); border-color: rgba(214,180,99,.5); background: rgba(214,180,99,.085); }
.shortfilm-production-model-menu button > span { display: grid; gap: 2px; min-width: 0; }
.shortfilm-production-model-menu button strong,
.shortfilm-production-model-menu button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-model-menu button strong { color: inherit; font-size: 10px; }
.shortfilm-production-model-menu button small { color: var(--text-muted); font-size: 8px; }
.shortfilm-production-model-menu button i { width: max-content; padding: 2px 5px; border-radius: 999px; color: var(--text-muted); background: rgba(255,255,255,.045); font-size: 8px; font-style: normal; }
.shortfilm-production-model-menu button i.supports-frames { color: var(--success); background: rgba(74,222,128,.08); }
.shortfilm-production-model-menu button em { color: var(--gold-light); font-size: 12px; font-style: normal; text-align: center; }
.shortfilm-production-aspect-picker { position: relative; min-width: 0; }
.shortfilm-production-aspect-picker > summary {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 48px;
    padding: 5px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.025);
    cursor: pointer;
    list-style: none;
}
.shortfilm-production-aspect-picker > summary::-webkit-details-marker { display: none; }
.shortfilm-production-aspect-picker[open] > summary { border-color: rgba(214,180,99,.56); background: rgba(214,180,99,.075); }
.shortfilm-production-aspect-picker > summary > span:nth-child(2) { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 1px 6px; min-width: 0; }
.shortfilm-production-aspect-picker > summary small { color: var(--text-muted); font-size: 8px; font-style: normal; }
.shortfilm-production-aspect-picker > summary strong { color: var(--text-primary); font-size: 11px; }
.shortfilm-production-aspect-picker > summary em { grid-column: 1 / -1; overflow: hidden; color: var(--gold-light); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-aspect-picker > summary b { color: var(--text-muted); font-size: 13px; transition: transform .16s ease; }
.shortfilm-production-aspect-picker[open] > summary b { transform: rotate(180deg); }
.shortfilm-production-aspect-glyph { display: grid; place-items: center; width: 34px; height: 32px; border: 1px solid rgba(214,180,99,.18); border-radius: 7px; background: rgba(0,0,0,.2); }
.shortfilm-production-aspect-glyph i { display: block; box-sizing: border-box; border: 1.5px solid var(--gold-light); border-radius: 2px; background: rgba(214,180,99,.08); box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.shortfilm-production-aspect-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: auto;
    left: 50%;
    z-index: 45;
    width: min(326px, calc(300% + 14px));
    padding: 12px;
    border: 1px solid rgba(214,180,99,.34);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(27,27,39,.985), rgba(12,13,22,.99));
    box-shadow: 0 22px 60px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}
.shortfilm-production-aspect-menu-head { display: grid; gap: 3px; padding: 1px 2px 10px; }
.shortfilm-production-aspect-menu-head strong { color: var(--text-primary); font-size: 12px; }
.shortfilm-production-aspect-menu-head small { color: var(--text-muted); font-size: 9px; }
.shortfilm-production-aspect-inherit { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: 9px; width: 100%; margin-bottom: 9px; padding: 7px 9px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--text-secondary); background: rgba(255,255,255,.025); text-align: left; cursor: pointer; }
.shortfilm-production-aspect-inherit > span { display: grid; gap: 2px; }
.shortfilm-production-aspect-inherit strong { font-size: 10px; }
.shortfilm-production-aspect-inherit small { color: var(--text-muted); font-size: 8px; }
.shortfilm-production-aspect-inherit.active { border-color: rgba(214,180,99,.56); background: rgba(214,180,99,.09); }
.shortfilm-production-aspect-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 7px; }
.shortfilm-production-aspect-option { display: grid; justify-items: center; gap: 4px; min-height: 70px; padding: 6px 4px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--text-secondary); background: rgba(255,255,255,.018); cursor: pointer; }
.shortfilm-production-aspect-option .shortfilm-production-aspect-glyph { width: 40px; height: 38px; border-color: transparent; background: rgba(0,0,0,.18); }
.shortfilm-production-aspect-option strong { font-size: 10px; }
.shortfilm-production-aspect-option:hover { border-color: rgba(214,180,99,.34); background: rgba(214,180,99,.05); }
.shortfilm-production-aspect-option.active { color: var(--gold-light); border-color: rgba(214,180,99,.68); background: rgba(214,180,99,.1); box-shadow: inset 0 0 0 1px rgba(214,180,99,.08); }
.shortfilm-production-image-resolution-picker { position: relative; min-width: 0; }
.shortfilm-production-image-resolution-picker > summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 48px; padding: 5px 9px; border: 1px solid var(--border-subtle); border-radius: 9px; color: var(--text-secondary); background: rgba(255,255,255,.025); cursor: pointer; list-style: none; }
.shortfilm-production-image-resolution-picker > summary::-webkit-details-marker { display: none; }
.shortfilm-production-image-resolution-picker[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.56); background: rgba(214,180,99,.075); }
.shortfilm-production-image-resolution-picker > summary span { display: grid; gap: 2px; min-width: 0; }
.shortfilm-production-image-resolution-picker > summary small { color: var(--text-muted); font-size: 8px; }
.shortfilm-production-image-resolution-picker > summary strong { overflow: hidden; color: var(--text-primary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-image-resolution-picker > summary b { color: var(--text-muted); font-size: 13px; transition: transform .16s ease; }
.shortfilm-production-image-resolution-picker[open] > summary b { transform: rotate(180deg); }
.shortfilm-production-image-resolution-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 46; display: grid; gap: 6px; width: 230px; padding: 10px; border: 1px solid rgba(214,180,99,.34); border-radius: 14px; background: linear-gradient(145deg, rgba(27,27,39,.99), rgba(12,13,22,.995)); box-shadow: 0 22px 60px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035); backdrop-filter: blur(18px); }
.shortfilm-production-image-resolution-menu header { display: grid; gap: 3px; padding: 1px 2px 7px; }
.shortfilm-production-image-resolution-menu header strong { color: var(--text-primary); font-size: 12px; }
.shortfilm-production-image-resolution-menu header small { color: var(--text-muted); font-size: 9px; line-height: 1.45; }
.shortfilm-production-image-resolution-menu button { display: grid; grid-template-columns: minmax(0,1fr) 18px; align-items: center; gap: 8px; min-height: 45px; padding: 7px 9px; border: 1px solid var(--border-subtle); border-radius: 9px; color: var(--text-secondary); background: rgba(255,255,255,.018); text-align: left; cursor: pointer; }
.shortfilm-production-image-resolution-menu button > span { display: grid; gap: 2px; }
.shortfilm-production-image-resolution-menu button strong { font-size: 10px; }
.shortfilm-production-image-resolution-menu button small { color: var(--text-muted); font-size: 8px; }
.shortfilm-production-image-resolution-menu button em { color: var(--gold-light); font-size: 12px; font-style: normal; text-align: center; }
.shortfilm-production-image-resolution-menu button:hover { border-color: rgba(214,180,99,.34); background: rgba(214,180,99,.05); }
.shortfilm-production-image-resolution-menu button.active { color: var(--gold-light); border-color: rgba(214,180,99,.68); background: rgba(214,180,99,.1); }
.shortfilm-production-video-settings-picker { position: relative; min-width: 0; }
.shortfilm-production-video-settings-picker > summary {
    display: grid;
    grid-template-columns: 28px minmax(0,1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 48px;
    padding: 5px 8px;
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.025);
    cursor: pointer;
    list-style: none;
}
.shortfilm-production-video-settings-picker > summary::-webkit-details-marker { display: none; }
.shortfilm-production-video-settings-picker[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.56); background: rgba(214,180,99,.075); }
.shortfilm-production-video-settings-picker > summary > span { display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 1px 5px; min-width: 0; }
.shortfilm-production-video-settings-picker > summary small { color: var(--text-muted); font-size: 8px; font-style: normal; }
.shortfilm-production-video-settings-picker > summary strong { overflow: hidden; color: var(--text-primary); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-video-settings-picker > summary em { grid-column: 1 / -1; overflow: hidden; color: var(--gold-light); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-video-settings-picker > summary b { color: var(--text-muted); font-size: 13px; transition: transform .16s ease; }
.shortfilm-production-video-settings-picker[open] > summary b { transform: rotate(180deg); }
.shortfilm-production-video-settings-icon { width: 18px; height: 18px; color: currentColor; }
.shortfilm-production-video-settings-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 46;
    display: grid;
    gap: 12px;
    width: min(430px, calc(100vw - 44px));
    max-height: min(520px, 70vh);
    padding: 13px;
    overflow-y: auto;
    border: 1px solid rgba(214,180,99,.34);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(27,27,39,.99), rgba(12,13,22,.995));
    box-shadow: 0 22px 60px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035);
    backdrop-filter: blur(18px);
    scrollbar-width: thin;
}
.shortfilm-production-video-settings-menu > header { display: grid; gap: 3px; padding: 1px 2px 2px; }
.shortfilm-production-video-settings-menu > header strong { color: var(--text-primary); font-size: 13px; }
.shortfilm-production-video-settings-menu > header small { color: var(--text-muted); font-size: 9px; }
.shortfilm-production-video-settings-capability { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--border-subtle); border-radius: 9px; background: rgba(255,255,255,.02); }
.shortfilm-production-video-settings-capability strong { font-size: 9px; white-space: nowrap; }
.shortfilm-production-video-settings-capability span { color: var(--text-muted); font-size: 8px; line-height: 1.45; }
.shortfilm-production-video-settings-capability.supports-frames { border-color: rgba(74,222,128,.18); background: rgba(74,222,128,.045); }
.shortfilm-production-video-settings-capability.supports-frames strong { color: var(--success); }
.shortfilm-production-video-settings-capability.no-frames strong { color: var(--warning); }
.shortfilm-production-video-settings-menu > section { display: grid; gap: 7px; }
.shortfilm-production-video-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 22px; }
.shortfilm-production-video-settings-head > strong { color: var(--text-secondary); font-size: 10px; }
.shortfilm-production-video-settings-reset { padding: 3px 6px; border: 0; border-radius: 6px; color: var(--gold-light); background: rgba(214,180,99,.08); font-size: 8px; cursor: pointer; }
.shortfilm-production-video-settings-inherited { color: var(--text-muted); font-size: 8px; }
.shortfilm-production-video-settings-aspects,
.shortfilm-production-video-settings-seconds,
.shortfilm-production-video-settings-resolutions { display: grid; gap: 6px; }
.shortfilm-production-video-settings-aspects { grid-template-columns: repeat(4, minmax(0,1fr)); }
.shortfilm-production-video-settings-seconds { grid-template-columns: repeat(6, minmax(0,1fr)); }
.shortfilm-production-video-settings-resolutions { grid-template-columns: repeat(auto-fit, minmax(100px,1fr)); }
.shortfilm-production-video-settings-option { display: grid; place-items: center; gap: 3px; min-height: 48px; padding: 6px; border: 1px solid var(--border-subtle); border-radius: 9px; color: var(--text-secondary); background: rgba(255,255,255,.018); cursor: pointer; }
.shortfilm-production-video-settings-option .shortfilm-production-aspect-glyph { width: 34px; height: 30px; border-color: transparent; background: rgba(0,0,0,.18); }
.shortfilm-production-video-settings-option strong { font-size: 10px; }
.shortfilm-production-video-settings-option small { color: var(--gold-light); font-size: 8px; }
.shortfilm-production-video-settings-option:hover { border-color: rgba(214,180,99,.34); background: rgba(214,180,99,.05); }
.shortfilm-production-video-settings-option.active { color: var(--gold-light); border-color: rgba(214,180,99,.68); background: rgba(214,180,99,.1); box-shadow: inset 0 0 0 1px rgba(214,180,99,.08); }
.shortfilm-production-generate-row { display: flex; align-items: center; gap: 8px; padding-top: 9px; }
.shortfilm-production-input-actions { display: flex; gap: 5px; }
.shortfilm-production-input-actions button,
.shortfilm-production-video-results > header button { min-height: 34px; padding: 5px 9px; border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-muted); background: rgba(255,255,255,.025); cursor: pointer; }
.shortfilm-production-generate { flex: 1; min-height: 42px; border: 0; border-radius: 9px; color: #17130d; background: var(--gold); font-weight: 900; cursor: pointer; }
.shortfilm-production-generate:disabled { opacity: .58; cursor: progress; }
.shortfilm-production-mode-note { flex: 1; color: var(--text-muted); font-size: 10px; line-height: 1.45; }

@container (max-width: 440px) {
    .shortfilm-production-config-row { gap: 5px; }
    .shortfilm-production-config-row.keyframes { grid-template-columns: minmax(0,1fr) minmax(74px,.7fr) minmax(94px,.8fr); }
    .shortfilm-production-config-row.videos { grid-template-columns: minmax(0,.9fr) minmax(118px,1.1fr); }
    .shortfilm-production-model-picker > summary { width: 100%; gap: 5px; min-height: 38px; padding: 0 7px; }
    .shortfilm-production-model-picker > summary strong { font-size: 9px; }
    .shortfilm-production-model-icon { width: 14px; height: 14px; }
    .shortfilm-production-aspect-picker > summary { grid-template-columns: 27px minmax(0,1fr) auto; gap: 4px; min-height: 38px; padding: 3px 5px; }
    .shortfilm-production-aspect-picker > summary > span:nth-child(2) { display: block; }
    .shortfilm-production-aspect-picker > summary small,
    .shortfilm-production-aspect-picker > summary em { display: none; }
    .shortfilm-production-aspect-picker > summary strong { font-size: 9px; }
    .shortfilm-production-aspect-glyph { width: 27px; height: 27px; }
    .shortfilm-production-video-settings-picker > summary { grid-template-columns: 22px minmax(0,1fr) auto; gap: 4px; min-height: 38px; padding: 3px 5px; }
    .shortfilm-production-video-settings-picker > summary > span { display: block; }
    .shortfilm-production-video-settings-picker > summary small,
    .shortfilm-production-video-settings-picker > summary em { display: none; }
    .shortfilm-production-video-settings-picker > summary strong { font-size: 9px; }
    .shortfilm-production-video-settings-icon { width: 15px; height: 15px; }
    .shortfilm-production-video-settings-menu { width: min(390px, calc(100vw - 34px)); }
    .shortfilm-production-video-settings-seconds { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
.shortfilm-production-results { display: grid; grid-template-rows: auto minmax(0,1fr); }
.shortfilm-production-slots { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; padding: 9px; border-bottom: 1px solid var(--border-subtle); }
.shortfilm-production-slot { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 8px; min-width: 0; min-height: 54px; padding: 6px; border: 1px solid var(--border-subtle); border-radius: 9px; color: var(--text-secondary); background: rgba(0,0,0,.14); text-align: left; cursor: pointer; }
.shortfilm-production-slot.active { border-color: rgba(214,180,99,.68); background: rgba(214,180,99,.07); }
.shortfilm-production-slot-thumb { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 7px; color: var(--text-muted); background: var(--bg-elevated); }
.shortfilm-production-slot-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-surface); }
.shortfilm-production-slot > span:last-child { display: grid; gap: 3px; min-width: 0; }
.shortfilm-production-slot strong,
.shortfilm-production-slot small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-slot strong { font-size: 11px; }
.shortfilm-production-slot small { color: var(--text-muted); font-size: 9px; }
.shortfilm-production-gallery { display: grid; grid-template-columns: minmax(0,1fr) 116px; gap: 9px; min-height: 0; padding: 9px; }
.shortfilm-production-image-preview { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 11px; background: radial-gradient(circle at 50% 42%, rgba(214,180,99,.055), transparent 42%), var(--bg-surface); }
.shortfilm-production-image-preview > img { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: var(--bg-surface); }
.shortfilm-production-image-empty { display: grid; gap: 6px; place-items: center; max-width: 320px; padding: 20px; color: var(--text-muted); text-align: center; }
.shortfilm-production-image-empty strong { color: var(--text-secondary); }
.shortfilm-production-image-empty span { font-size: 10px; line-height: 1.55; }
.shortfilm-production-image-empty .shortfilm-failure-log { margin-top: 5px; }
.shortfilm-production-preview-status { position: absolute; top: 9px; left: 9px; padding: 5px 8px; border-radius: 7px; color: var(--success); background: rgba(7,8,14,.82); font-size: 10px; backdrop-filter: blur(10px); }
.shortfilm-production-preview-menu { position: absolute; top: 9px; right: 9px; z-index: 6; }
.shortfilm-production-preview-menu > summary { display: grid; place-items: center; width: 34px; height: 30px; border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-secondary); background: rgba(7,8,14,.82); cursor: pointer; list-style: none; letter-spacing: 2px; backdrop-filter: blur(10px); }
.shortfilm-production-preview-menu > summary::-webkit-details-marker { display: none; }
.shortfilm-production-preview-menu[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.48); background: var(--bg-elevated); }
.shortfilm-production-preview-menu > div { position: absolute; top: calc(100% + 7px); right: 0; display: grid; gap: 6px; width: 190px; padding: 10px; border: 1px solid rgba(214,180,99,.3); border-radius: 11px; color: var(--text-secondary); background: rgba(19,20,31,.98); box-shadow: 0 18px 42px rgba(0,0,0,.48); backdrop-filter: blur(16px); }
.shortfilm-production-preview-menu > div > strong { font-size: 11px; }
.shortfilm-production-preview-menu > div > small { padding-bottom: 3px; color: var(--text-muted); font-size: 9px; }
.shortfilm-production-preview-menu button { min-height: 34px; padding: 6px 9px; border: 1px solid var(--border-subtle); border-radius: 8px; color: var(--text-secondary); background: rgba(255,255,255,.025); font-size: 10px; text-align: left; cursor: pointer; }
.shortfilm-production-preview-menu button:hover { border-color: rgba(214,180,99,.38); background: rgba(214,180,99,.065); }
.shortfilm-production-preview-menu button.active { color: var(--success); }
.shortfilm-production-preview-menu button:disabled { opacity: .72; cursor: default; }
.shortfilm-production-versions { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.shortfilm-production-versions > strong { flex: 0 0 auto; padding: 2px 0 8px; color: var(--text-secondary); font-size: 10px; }
.shortfilm-production-versions > div { display: grid; align-content: start; gap: 7px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.shortfilm-production-version { display: grid; gap: 4px; min-width: 0; padding: 5px; border: 1px solid var(--border-subtle); border-radius: 9px; color: var(--text-muted); background: rgba(0,0,0,.14); text-align: left; cursor: pointer; }
.shortfilm-production-version.active { border-color: rgba(214,180,99,.68); }
.shortfilm-production-version.selected { box-shadow: inset 0 0 0 1px rgba(73,218,130,.46); }
.shortfilm-production-version.selected small { color: var(--success); }
.shortfilm-production-version > span { display: grid; place-items: center; height: 68px; overflow: hidden; border-radius: 6px; background: var(--bg-surface); }
.shortfilm-production-version img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-surface); }
.shortfilm-production-version small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-production-version-empty { display: grid; place-items: center; min-height: 70px; color: var(--text-muted); font-size: 10px; }
.shortfilm-production-video-results > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.shortfilm-production-video-results > header > div { display: grid; gap: 3px; }
.shortfilm-production-video-results > header span { color: var(--text-muted); font-size: 9px; }
.shortfilm-production-video-stage { display: grid; grid-template-columns: minmax(0,1fr) clamp(150px,22%,188px); gap: 9px; min-height: 0; padding: 9px; }
.shortfilm-production-video-preview { display: grid; grid-template-rows: minmax(0,1fr) auto; place-items: stretch center; min-height: 0; overflow: hidden; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-surface); }
.shortfilm-production-video-media { display: grid; place-items: center; width: 100%; min-width: 0; min-height: 0; overflow: hidden; }
.shortfilm-production-video-media video { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; background: var(--bg-surface); }
.shortfilm-production-video-empty { grid-row: 1 / -1; display: grid; gap: 6px; place-items: center; align-content: center; color: var(--text-muted); font-size: 10px; text-align: center; }
.shortfilm-production-video-preview small { width: 100%; padding: 6px 9px; color: var(--text-muted); background: rgba(0,0,0,.18); font-size: 9px; text-align: center; }
.shortfilm-production-video-versions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-height: 0; padding-right: 4px; overflow-y: scroll; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(214,180,99,.58) rgba(255,255,255,.035); }
.shortfilm-production-video-versions::-webkit-scrollbar { width: 8px; }
.shortfilm-production-video-versions::-webkit-scrollbar-track { border-radius: 999px; background: rgba(255,255,255,.035); }
.shortfilm-production-video-versions::-webkit-scrollbar-thumb { min-height: 42px; border: 2px solid transparent; border-radius: 999px; background: rgba(214,180,99,.58); background-clip: padding-box; }
.shortfilm-production-video-versions::-webkit-scrollbar-thumb:hover { background: rgba(232,199,125,.78); background-clip: padding-box; }
.shortfilm-production-video-versions .shortfilm-candidate-grid { grid-template-columns: 1fr; }
.shortfilm-production-video-versions .shortfilm-candidate-card { flex: 0 0 auto; width: 100%; min-height: 0; }
.shortfilm-production-video-versions .shortfilm-candidate-meta { display: flex; }
.shortfilm-production-video-versions .shortfilm-candidate-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.shortfilm-production-transition { flex: 0 0 auto; margin: 0 12px 7px; border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(255,255,255,.018); }
.shortfilm-production-transition > summary { padding: 8px 11px; color: var(--text-muted); font-size: 10px; cursor: pointer; }
.shortfilm-production-transition .shortfilm-transition-row { margin: 0; border: 0; border-top: 1px solid var(--border-subtle); border-radius: 0; }
.shortfilm-production-filmstrip-shell { position: relative; z-index: 8; display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; align-items: center; gap: 8px; height: 80px; min-height: 80px; padding: 6px 11px; overflow: hidden; border-top: 1px solid var(--border-subtle); background: rgba(5,6,12,.94); box-shadow: 0 -10px 28px rgba(0,0,0,.16); }
.shortfilm-production-filmstrip { display: flex; gap: 7px; min-width: 0; overflow-x: auto; overscroll-behavior-inline: contain; touch-action: pan-x; cursor: grab; scrollbar-width: none; }
.shortfilm-production-filmstrip::-webkit-scrollbar { display: none; }
.shortfilm-production-filmstrip-item { display: grid; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 8px; flex: 0 0 176px; min-width: 0; height: 66px; padding: 5px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--text-secondary); background: rgba(255,255,255,.018); text-align: left; cursor: pointer; }
.shortfilm-shot-filmstrip.is-dragging,
.shortfilm-production-filmstrip.is-dragging { cursor: grabbing; user-select: none; }
.shortfilm-shot-filmstrip.is-dragging .shortfilm-shot-filmstrip-item,
.shortfilm-production-filmstrip.is-dragging .shortfilm-production-filmstrip-item { pointer-events: none; cursor: grabbing; }
.shortfilm-shot-filmstrip-item:focus-visible,
.shortfilm-production-filmstrip-item:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.shortfilm-production-filmstrip-item.active { border-color: rgba(214,180,99,.62); background: rgba(214,180,99,.07); }
.shortfilm-production-filmstrip-item > span:first-child { display: grid; place-items: center; width: 46px; height: 54px; overflow: hidden; border-radius: 7px; color: var(--gold-light); background: var(--bg-surface); font: 800 11px 'Outfit', sans-serif; }
.shortfilm-production-filmstrip-item img { width: 100%; height: 100%; object-fit: contain; background: var(--bg-surface); }
.shortfilm-production-filmstrip-item > span:last-child { display: grid; gap: 5px; min-width: 0; }
.shortfilm-production-filmstrip-item strong { overflow: hidden; font-size: 10px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.shortfilm-production-filmstrip-item small { color: var(--text-muted); font-size: 9px; }
.shortfilm-task-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.shortfilm-task-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.shortfilm-task-list { display: grid; gap: 8px; }
.shortfilm-task-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--border-subtle); border-radius: 11px; background: rgba(255,255,255,0.02); }
.shortfilm-task-row.failed { border-color: rgba(231,98,98,.35); }
.shortfilm-task-state,
.shortfilm-task-copy { display: grid; gap: 4px; }
.shortfilm-task-state span,
.shortfilm-task-copy span,
.shortfilm-task-copy small { color: var(--text-muted); font-size: 10px; }
.shortfilm-task-progress { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.shortfilm-task-progress i { display: block; height: 100%; background: var(--gold); }
.shortfilm-task-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 330px; }
.shortfilm-budget-modal { max-width: 680px; }
.shortfilm-budget-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.shortfilm-budget-list { max-height: 240px; overflow: auto; display: grid; gap: 5px; margin-top: 12px; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 10px; color: var(--text-muted); font-size: 11px; }
.shortfilm-compare-modal { max-width: 1180px; }
.shortfilm-compare-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shortfilm-compare-grid article { display: grid; gap: 8px; }
.shortfilm-compare-grid video { width: 100%; border-radius: 10px; background: #050507; }
.shortfilm-compare-grid span { color: var(--text-muted); font-size: 11px; }

.shortfilm-assembly-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.shortfilm-assembly-summary span { padding: 5px 9px; border: 1px solid var(--border-subtle); border-radius: 999px; color: var(--text-muted); background: rgba(255,255,255,.025); font-size: 11px; }
.shortfilm-assembly-summary span.ready { color: var(--success); border-color: rgba(74,222,128,.28); }
.shortfilm-assembly-summary span.warning { color: var(--warning); border-color: rgba(251,191,36,.32); }
.shortfilm-assembly-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.shortfilm-assembly-tabs button { display: grid; gap: 3px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: 11px; color: var(--text-muted); background: rgba(255,255,255,.02); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; text-align: left; }
.shortfilm-assembly-tabs button span { font-size: 10px; font-weight: 500; }
.shortfilm-assembly-tabs button.active { color: var(--gold-light); border-color: rgba(214,180,99,.52); background: rgba(214,180,99,.1); }
.shortfilm-assembly-workspace { display: grid; gap: 14px; min-width: 0; }
.shortfilm-assembly-section { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--border-subtle); border-radius: 14px; background: rgba(255,255,255,.018); }
.shortfilm-assembly-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.shortfilm-assembly-section-head > div { display: grid; gap: 4px; }
.shortfilm-assembly-section-head p { max-width: 720px; color: var(--text-muted); font-size: 11px; line-height: 1.55; }
.shortfilm-takes-list,
.shortfilm-mix-shot-list { display: grid; gap: 9px; }
.shortfilm-take-row { display: grid; grid-template-columns: 44px minmax(180px, .8fr) minmax(260px, 1.4fr) auto; gap: 11px; align-items: center; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 11px; background: rgba(255,255,255,.02); }
.shortfilm-take-index { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--gold-light); background: rgba(214,180,99,.11); font-size: 12px; font-weight: 900; }
.shortfilm-take-copy { min-width: 0; display: grid; gap: 3px; }
.shortfilm-take-copy strong,
.shortfilm-take-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-take-copy span { color: var(--text-muted); font-size: 10px; }
.shortfilm-take-row video { width: 100%; max-height: 126px; border-radius: 8px; background: #050507; }
.shortfilm-transition-chip { justify-self: center; padding: 6px 10px; border: 1px dashed rgba(214,180,99,.32); border-radius: 999px; color: var(--text-muted); font-size: 10px; }
.shortfilm-mix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shortfilm-mix-card { display: grid; gap: 10px; padding: 13px; border: 1px solid var(--border-subtle); border-radius: 12px; background: rgba(255,255,255,.02); }
.shortfilm-mix-card.full { grid-column: 1 / -1; }
.shortfilm-mix-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shortfilm-mix-card-head > div { display: grid; gap: 3px; }
.shortfilm-mix-card-head small { color: var(--text-muted); line-height: 1.45; }
.shortfilm-range-row { display: grid; grid-template-columns: 92px minmax(120px, 1fr) 48px; align-items: center; gap: 9px; color: var(--text-muted); font-size: 11px; }
.shortfilm-range-row input[type="range"] { width: 100%; accent-color: var(--gold); }
.shortfilm-audio-url { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; }
.shortfilm-mix-shot { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(240px, 1fr) minmax(220px, 1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--border-subtle); border-radius: 11px; background: rgba(255,255,255,.018); }
.shortfilm-mix-shot-title { display: grid; gap: 4px; }
.shortfilm-mix-shot-title span { color: var(--text-muted); font-size: 10px; }
.shortfilm-mix-shot-audio,
.shortfilm-mix-shot-subtitle { display: grid; gap: 7px; }
.shortfilm-mix-shot textarea { min-height: 76px; resize: vertical; }
.shortfilm-export-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(280px, 1.25fr); gap: 12px; }
.shortfilm-export-card { display: grid; gap: 11px; padding: 14px; border: 1px solid var(--border-subtle); border-radius: 12px; background: rgba(255,255,255,.02); }
.shortfilm-export-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shortfilm-export-status { padding: 9px 11px; border-radius: 9px; color: var(--text-muted); background: rgba(255,255,255,.025); font-size: 11px; line-height: 1.5; }
.shortfilm-export-status.failed { color: var(--error); background: rgba(248,113,113,.08); }

@media (max-width: 980px) {
    .shortfilm-asset-editor-card { padding: 18px; }
    .shortfilm-asset-editor-workspace { grid-template-columns: 360px minmax(0, 1fr); }
    .shortfilm-asset-stage { grid-template-columns: minmax(0, 1fr) 164px; }
    .shortfilm-production-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .shortfilm-production-video-main { grid-template-columns: 1fr; }
    .shortfilm-candidate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-task-row { grid-template-columns: 74px minmax(0, 1fr); }
    .shortfilm-task-actions { grid-column: 1 / -1; justify-content: flex-start; max-width: none; }
    .shortfilm-take-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .shortfilm-take-row video { grid-column: 2 / -1; }
    .shortfilm-mix-shot { grid-template-columns: 1fr 1fr; }
    .shortfilm-mix-shot-title { grid-column: 1 / -1; }
    .shortfilm-export-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .shortfilm-asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-asset-editor { padding: 0; }
    .shortfilm-asset-editor-card {
        height: 100vh;
        height: 100dvh;
        padding: 10px 12px 8px;
        gap: 8px;
        border-radius: 0;
    }
    .shortfilm-asset-editor-head { gap: 8px; }
    .shortfilm-asset-editor-identity { gap: 8px; }
    .shortfilm-asset-editor-back { min-width: 38px; width: 38px; height: 38px; padding: 0; }
    .shortfilm-asset-editor-back span:last-child,
    .shortfilm-asset-editor-divider,
    .shortfilm-asset-editor-name > span { display: none; }
    .shortfilm-asset-editor-name h4 { font-size: 21px; }
    .shortfilm-asset-editor-identity .shortfilm-asset-meta .shortfilm-asset-badge:last-child { display: none; }
    .shortfilm-asset-editor-lock { min-height: 38px; padding: 0 9px; font-size: 10px; }
    .shortfilm-asset-editor-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(190px, .82fr) minmax(300px, 1.35fr);
        gap: 10px;
    }
    .shortfilm-asset-slot-tabs button { min-height: 46px; font-size: 11px; }
    .shortfilm-asset-prompt-panel { gap: 8px; padding: 10px 12px; }
    .shortfilm-asset-prompt-panel h5 { font-size: 13px; }
    .shortfilm-asset-editor-prompt { min-height: 0; padding: 12px; }
    .shortfilm-asset-prompt-panel > p { display: none; }
    .shortfilm-asset-generate { min-height: 48px; }
    .shortfilm-asset-stage { grid-template-columns: minmax(0, 1fr) 104px; }
    .shortfilm-asset-history { gap: 7px; padding: 10px 7px 8px; }
    .shortfilm-asset-history h5 { font-size: 12px; }
    .shortfilm-asset-history-action { min-height: 38px; padding: 0 5px; font-size: 9px; }
    .shortfilm-asset-history-list { grid-auto-rows: 92px; gap: 7px; }
    .shortfilm-asset-primary-mark { top: 10px; right: 10px; }
    .shortfilm-asset-metadata-overlay { padding: 10px; }
    .shortfilm-asset-library-overlay { padding: 10px; }
    .shortfilm-asset-library-modal {
        height: calc(100dvh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 22px 18px;
    }
    .shortfilm-asset-library-modal .asset-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-asset-metadata-modal { max-height: calc(100dvh - 20px); padding: 22px 18px; }
    .shortfilm-asset-metadata-voice { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .shortfilm-asset-grid { grid-template-columns: 1fr; }
    .shortfilm-asset-library-modal .asset-library-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .shortfilm-production-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shortfilm-production-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
    .shortfilm-production-toolbar > label:first-child { grid-column: 1 / -1; }
    .shortfilm-production-shot-head { grid-template-columns: 1fr; align-items: stretch; }
    .shortfilm-production-shot-status { justify-items: start; }
    .shortfilm-production-section-head,
    .shortfilm-production-shot-foot { align-items: stretch; flex-direction: column; }
    .shortfilm-candidate-grid,
    .shortfilm-compare-grid { grid-template-columns: 1fr; }
    .shortfilm-task-head { align-items: stretch; flex-direction: column; }
    .shortfilm-task-row { grid-template-columns: 1fr; }
    .shortfilm-task-actions { grid-column: auto; }
    .shortfilm-budget-grid { grid-template-columns: 1fr; }
    .shortfilm-assembly-summary { justify-content: flex-start; }
    .shortfilm-assembly-tabs { grid-template-columns: 1fr; }
    .shortfilm-mix-grid { grid-template-columns: 1fr; }
    .shortfilm-mix-card.full { grid-column: auto; }
    .shortfilm-mix-shot { grid-template-columns: 1fr; }
    .shortfilm-mix-shot-title { grid-column: auto; }
    .shortfilm-take-row { grid-template-columns: 36px minmax(0, 1fr); }
    .shortfilm-take-row video,
    .shortfilm-transition-chip { grid-column: 1 / -1; }
    .shortfilm-audio-url { grid-template-columns: 1fr 1fr; }
    .shortfilm-audio-url .shortfilm-input { grid-column: 1 / -1; }
    .shortfilm-range-row { grid-template-columns: 80px minmax(0, 1fr) 42px; }
}

/* Step 1 stays intentionally quiet: write first, structure the production later. */
.shortfilm-script-panel.active {
    overflow: hidden;
    scrollbar-gutter: auto;
}

.shortfilm-script-workspace {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.shortfilm-script-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.shortfilm-script-title-field {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.shortfilm-script-title-field > span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.shortfilm-script-title-field .shortfilm-input,
.shortfilm-script-import {
    min-height: 42px;
}

.shortfilm-script-import { white-space: nowrap; }

.shortfilm-script-editor {
    width: 100%;
    height: 100%;
    min-height: 0;
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 22px;
    border-radius: 14px;
    background: rgba(3, 5, 10, 0.46);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.85;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    scrollbar-gutter: stable;
}

.shortfilm-script-editor:hover,
.shortfilm-script-editor:focus {
    scrollbar-color: rgba(214, 180, 99, 0.42) transparent;
}

.shortfilm-script-editor::-webkit-scrollbar { width: 6px; }
.shortfilm-script-editor::-webkit-scrollbar-track { background: transparent; }
.shortfilm-script-editor::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}
.shortfilm-script-editor:hover::-webkit-scrollbar-thumb,
.shortfilm-script-editor:focus::-webkit-scrollbar-thumb { background: rgba(214, 180, 99, 0.42); }

.shortfilm-script-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.shortfilm-script-count {
    color: var(--text-muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.shortfilm-script-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.shortfilm-script-actions .btn { min-width: 118px; }

.shortfilm-script-workspace > .shortfilm-version-panel {
    position: absolute;
    inset: 0;
    z-index: 20;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 16px;
    overflow: hidden;
    border-color: rgba(214, 180, 99, 0.3);
    background: var(--bg-surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.shortfilm-script-workspace > .shortfilm-version-panel.active {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
}

.shortfilm-version-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.shortfilm-version-list {
    min-height: 0;
    overflow-y: auto;
}

@media (max-width: 720px) {
    .shortfilm-script-panel.active { padding: 12px; }
    .shortfilm-script-title-row { grid-template-columns: minmax(0, 1fr) auto; }
    .shortfilm-script-title-field > span { display: none; }
    .shortfilm-script-editor { padding: 15px; font-size: 14px; line-height: 1.75; }
    .shortfilm-script-footer { align-items: flex-end; }
    .shortfilm-script-actions { flex: 1; }
    .shortfilm-script-actions .btn { min-width: 0; flex: 1; padding-inline: 10px; }
}

@media (max-width: 420px) {
    .shortfilm-script-workspace { gap: 8px; }
    .shortfilm-script-title-row { grid-template-columns: minmax(0, 1fr) 84px; gap: 6px; }
    .shortfilm-script-import { padding-inline: 8px; }
    .shortfilm-script-count { display: none; }
    .shortfilm-script-actions { width: 100%; }
}

/* Step 2 borrows the canvas composer pattern: compact controls, one focused editor. */
.shortfilm-settings-panel.active {
    overflow: hidden;
    scrollbar-gutter: auto;
}

.shortfilm-settings-workspace {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
}

.shortfilm-settings-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.shortfilm-settings-style-editor > span,
.shortfilm-settings-advanced-body label > span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

.shortfilm-settings-choice-picker { position: relative; min-width: 0; }
.shortfilm-settings-choice-picker > summary {
    display: grid;
    grid-template-columns: 32px minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 6px 11px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.025);
    cursor: pointer;
    list-style: none;
    box-shadow: inset 0 1px rgba(255,255,255,.025);
}
.shortfilm-settings-choice-picker > summary::-webkit-details-marker { display: none; }
.shortfilm-settings-choice-picker > summary:hover { border-color: rgba(214,180,99,.32); background: rgba(214,180,99,.045); }
.shortfilm-settings-choice-picker[open] { z-index: 42; }
.shortfilm-settings-choice-picker[open] > summary { color: var(--gold-light); border-color: rgba(214,180,99,.56); background: rgba(214,180,99,.075); box-shadow: 0 0 0 3px rgba(214,180,99,.055); }
.shortfilm-settings-choice-picker > summary > span { display: grid; gap: 2px; min-width: 0; }
.shortfilm-settings-choice-picker > summary small { color: var(--text-muted); font-size: 9px; }
.shortfilm-settings-choice-picker > summary strong { overflow: hidden; color: var(--text-primary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-settings-choice-picker > summary b { color: var(--text-muted); font-size: 13px; transition: transform .16s ease; }
.shortfilm-settings-choice-picker[open] > summary b { transform: rotate(180deg); }
.shortfilm-settings-picker-icon { width: 20px; height: 20px; color: currentColor; }
.shortfilm-settings-choice-picker > summary .shortfilm-production-aspect-glyph { width: 32px; height: 32px; }
.shortfilm-settings-choice-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 43;
    display: grid;
    gap: 5px;
    width: max(100%, min(300px, calc(100vw - 42px)));
    max-height: min(390px, 60vh);
    padding: 9px;
    overflow-y: auto;
    border: 1px solid rgba(214,180,99,.34);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(27,27,39,.99), rgba(12,13,22,.995));
    box-shadow: 0 22px 60px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035);
    backdrop-filter: blur(18px);
    scrollbar-width: thin;
}
.shortfilm-settings-choice-picker:last-child .shortfilm-settings-choice-menu { right: 0; left: auto; }
.shortfilm-settings-choice-menu > header { display: grid; gap: 3px; padding: 2px 3px 7px; }
.shortfilm-settings-choice-menu > header strong { color: var(--text-primary); font-size: 12px; }
.shortfilm-settings-choice-menu > header small { color: var(--text-muted); font-size: 9px; }
.shortfilm-settings-choice-option { display: grid; grid-template-columns: 30px minmax(0,1fr) 18px; align-items: center; gap: 8px; width: 100%; min-height: 45px; padding: 6px 9px; border: 1px solid transparent; border-radius: 10px; color: var(--text-secondary); background: transparent; text-align: left; cursor: pointer; }
.shortfilm-settings-choice-option:hover { border-color: var(--border-subtle); background: rgba(255,255,255,.035); }
.shortfilm-settings-choice-option.active { color: var(--gold-light); border-color: rgba(214,180,99,.5); background: rgba(214,180,99,.085); }
.shortfilm-settings-choice-option > span { display: grid; gap: 2px; min-width: 0; }
.shortfilm-settings-choice-option strong { color: inherit; font-size: 11px; }
.shortfilm-settings-choice-option small { overflow: hidden; color: var(--text-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.shortfilm-settings-choice-option em { color: var(--gold-light); font-size: 12px; font-style: normal; text-align: center; }
.shortfilm-settings-choice-option .shortfilm-production-aspect-glyph { width: 30px; height: 30px; }
.shortfilm-settings-option-dot { width: 8px; height: 8px; margin-left: 10px; border: 1px solid currentColor; border-radius: 50%; background: transparent; }
.shortfilm-settings-choice-option.active .shortfilm-settings-option-dot { background: currentColor; box-shadow: 0 0 0 4px rgba(214,180,99,.1); }

.shortfilm-settings-style-editor {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    gap: 7px;
}

.shortfilm-settings-style-editor .shortfilm-textarea {
    width: 100%;
    height: 100%;
    min-height: 0;
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 22px;
    border-radius: 14px;
    background: rgba(3, 5, 10, 0.46);
    font-size: 15px;
    line-height: 1.85;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.shortfilm-settings-style-editor .shortfilm-textarea:hover,
.shortfilm-settings-style-editor .shortfilm-textarea:focus { scrollbar-color: rgba(214, 180, 99, 0.42) transparent; }
.shortfilm-settings-style-editor .shortfilm-textarea::-webkit-scrollbar { width: 6px; }
.shortfilm-settings-style-editor .shortfilm-textarea::-webkit-scrollbar-thumb { border-radius: 999px; background: transparent; }
.shortfilm-settings-style-editor .shortfilm-textarea:hover::-webkit-scrollbar-thumb,
.shortfilm-settings-style-editor .shortfilm-textarea:focus::-webkit-scrollbar-thumb { background: rgba(214, 180, 99, 0.42); }

.shortfilm-settings-footer {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.shortfilm-settings-advanced { min-width: 0; }
.shortfilm-settings-advanced > summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    background: rgba(255,255,255,.025);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.shortfilm-settings-advanced > summary::-webkit-details-marker { display: none; }
.shortfilm-settings-advanced > summary::after { content: '⌃'; margin-left: 8px; color: var(--text-muted); font-size: 10px; }
.shortfilm-settings-advanced[open] > summary { border-color: rgba(214,180,99,.36); color: var(--gold-light); }
.shortfilm-settings-advanced[open] > summary::after { content: '⌄'; }

.shortfilm-settings-advanced-body {
    position: absolute;
    right: 0;
    bottom: 50px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(620px, 100%);
    padding: 14px;
    border: 1px solid rgba(214,180,99,.28);
    border-radius: 14px;
    background: var(--bg-surface);
    box-shadow: 0 24px 70px rgba(0,0,0,.52);
}

.shortfilm-settings-advanced-body label { display: grid; gap: 6px; min-width: 0; }
.shortfilm-settings-advanced-body .shortfilm-textarea { min-height: 132px; resize: none; }

.shortfilm-settings-footer .shortfilm-settings-summary.active {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 0 4px;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}
.shortfilm-settings-footer .shortfilm-settings-summary > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.shortfilm-settings-status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.shortfilm-settings-footer .shortfilm-settings-impact { color: var(--gold-light); }
.shortfilm-settings-footer .shortfilm-settings-clean { color: var(--success); }

.shortfilm-settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.shortfilm-settings-actions .btn { min-width: 104px; }

@media (max-width: 1180px) {
    .shortfilm-settings-controls {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
    }
}

@media (max-width: 720px) {
    .shortfilm-settings-panel.active { padding: 12px; }
    .shortfilm-settings-workspace { gap: 8px; }
    .shortfilm-settings-choice-picker > summary { min-height: 42px; padding: 4px 8px; }
    .shortfilm-settings-choice-picker > summary small { display: none; }
    .shortfilm-settings-choice-menu { width: min(280px, calc(100vw - 32px)); }
    .shortfilm-settings-style-editor .shortfilm-textarea { padding: 15px; font-size: 14px; line-height: 1.75; }
    .shortfilm-settings-footer { grid-template-columns: auto minmax(0, 1fr); gap: 7px; }
    .shortfilm-settings-footer .shortfilm-settings-summary.active { grid-column: 1 / -1; grid-row: 1; min-height: 22px; padding: 0; }
    .shortfilm-settings-advanced { grid-column: 1; grid-row: 2; }
    .shortfilm-settings-actions { grid-column: 2; grid-row: 2; }
    .shortfilm-settings-actions .btn { min-width: 0; padding-inline: 10px; }
    .shortfilm-settings-advanced-body { bottom: 48px; grid-template-columns: 1fr; }
    .shortfilm-settings-advanced-body .shortfilm-textarea { min-height: 100px; }
}

@media (max-width: 1080px) {
    .shortfilm-production-workspace-head { grid-template-columns: minmax(0,1fr) auto; }
    .shortfilm-production-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
    .shortfilm-production-tabs button { flex: 1; }
    .shortfilm-production-stage { grid-template-columns: minmax(260px, 38%) minmax(0,1fr); }
    .shortfilm-production-config-row.keyframes { grid-template-columns: minmax(0,1fr) minmax(104px,.72fr) minmax(118px,.78fr); }
    .shortfilm-production-video-stage { grid-template-columns: minmax(0,1fr) 172px; }
}

@media (max-width: 720px) {
    [data-shortfilm-step="production"].active { overflow-y: auto; }
    .shortfilm-production-workspace-head { position: sticky; top: 0; grid-template-columns: minmax(0,1fr) auto; min-height: 0; padding: 8px; }
    .shortfilm-production-heading .shortfilm-production-title { display: none; }
    .shortfilm-production-heading .shortfilm-storyboard-back { padding-inline: 8px; }
    .shortfilm-production-number { min-width: 34px; height: 34px; }
    .shortfilm-production-head-actions > .btn { display: none; }
    .shortfilm-production-tabs { grid-column: 1 / -1; }
    .shortfilm-video-table { flex: none; overflow: visible; }
    .shortfilm-production-workspace { display: block; height: auto; overflow: visible; }
    .shortfilm-production-stage { grid-template-columns: 1fr; padding: 8px; }
    .shortfilm-production-config-row.keyframes,
    .shortfilm-production-config-row.videos { grid-template-columns: 1fr; }
    .shortfilm-production-aspect-menu { right: auto; left: 0; }
    .shortfilm-production-composer { min-height: 430px; }
    .shortfilm-production-results { min-height: 520px; }
    .shortfilm-production-gallery { grid-template-columns: 1fr; }
    .shortfilm-production-image-preview { min-height: 350px; }
    .shortfilm-production-versions { min-height: 104px; }
    .shortfilm-production-versions > div { display: flex; overflow-x: auto; overflow-y: hidden; }
    .shortfilm-production-version { flex: 0 0 92px; }
    .shortfilm-production-version > span { height: 64px; }
    .shortfilm-production-video-stage { grid-template-columns: 1fr; }
    .shortfilm-production-video-preview { min-height: 320px; }
    .shortfilm-production-video-versions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); overflow: visible; }
    .shortfilm-production-filmstrip-shell { position: sticky; bottom: 0; z-index: 10; }
    .shortfilm-production-filmstrip-item { flex-basis: 150px; }
}

/* Responsive workspace contract: preserve creation space before controls become cramped. */
.shortfilm-production-workspace { container-type: inline-size; }
.shortfilm-project-actions .btn,
.shortfilm-production-head-actions .btn,
.shortfilm-production-input-actions button,
.shortfilm-production-generate { max-width: 100%; justify-content: center; white-space: nowrap; }

@media (max-width: 1600px) and (min-width: 1281px) {
    body[data-active-page="shortfilm"] .sidebar { width: 72px; }
    body[data-active-page="shortfilm"] .sidebar-logo { justify-content: center; padding: 20px 12px; }
    body[data-active-page="shortfilm"] .logo-text,
    body[data-active-page="shortfilm"] .sidebar-recharge,
    body[data-active-page="shortfilm"] .nav-label,
    body[data-active-page="shortfilm"] .nav-item span:not(.nav-badge),
    body[data-active-page="shortfilm"] .nav-badge,
    body[data-active-page="shortfilm"] .user-info,
    body[data-active-page="shortfilm"] .credits-indicator { display: none; }
    body[data-active-page="shortfilm"] .nav-item { justify-content: center; padding: 12px; }
    body[data-active-page="shortfilm"] .main { margin-left: 72px; }
}

@media (max-width: 1600px) and (min-width: 1101px) {
    #shortfilmPage { padding: 14px 16px; }
    .shortfilm-page { grid-template-columns: 148px minmax(0, 1fr); gap: 10px; }
    .shortfilm-stepper { gap: 6px; padding: 7px; }
    .shortfilm-step { min-height: 48px; padding-inline: 9px; font-size: 11px; }
    .shortfilm-step-gate-badge { padding-inline: 5px; font-size: 8px; }
    .shortfilm-project-bar { flex-wrap: wrap; padding: 10px 12px; }
    .shortfilm-project-actions { min-width: 0; }
    .shortfilm-project-status { flex: 1 1 220px; min-width: 0; }
}

@media (max-width: 1100px) and (min-width: 721px) {
    #shortfilmPage { padding: 12px; }
    .shortfilm-page { grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
    .shortfilm-stepper { gap: 6px; padding: 6px; }
    .shortfilm-step { position: relative; min-height: 42px; justify-content: center; padding: 0; font-size: 0; }
    .shortfilm-step > span { width: 28px; height: 28px; font-size: 11px; }
    .shortfilm-step-gate-badge { position: absolute; right: 2px; bottom: 2px; width: 7px; height: 7px; padding: 0; overflow: hidden; border: 0; font-size: 0; background: var(--gold); }
    .shortfilm-project-bar { flex-wrap: wrap; padding: 9px 10px; }
    .shortfilm-project-actions { flex: 1 1 100%; display: grid; grid-template-columns: auto minmax(150px, 1fr) auto auto; }
    .shortfilm-project-actions .lumina-select-shell:has(.studio-project-select) { width: 100%; min-width: 0; }
    .shortfilm-project-status { flex: 1 1 100%; text-align: left; }
}

@container (max-width: 1040px) {
    .shortfilm-production-workspace-head { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; min-height: 0; }
    .shortfilm-production-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
    .shortfilm-production-tabs button { flex: 1; min-width: 0; padding-inline: 8px; }
    .shortfilm-production-stage { grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); gap: 9px; padding: 9px; }
    .shortfilm-production-head-actions > .btn { min-height: 34px; padding-inline: 9px; }
}

@container (max-width: 520px) {
    .shortfilm-production-composer { padding: 11px; }
    .shortfilm-production-generate-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
    .shortfilm-production-input-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .shortfilm-production-input-actions button { min-width: 0; padding-inline: 5px; }
    .shortfilm-production-generate { width: 100%; min-height: 40px; }
    .shortfilm-production-mode-note { width: 100%; }
}

@container (max-width: 360px) {
    .shortfilm-production-config-row.keyframes,
    .shortfilm-production-config-row.videos { grid-template-columns: minmax(0, 1fr); }
    .shortfilm-production-model-picker > summary,
    .shortfilm-production-aspect-picker > summary,
    .shortfilm-production-image-resolution-picker > summary,
    .shortfilm-production-video-settings-picker > summary { width: 100%; }
}
