/* Shared controls across stage tools, export tools, and popup windows. */
.production-main input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),
.production-main select, dialog input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), dialog select {
  box-sizing:border-box;min-height:38px;padding:9px 12px;border:1px solid var(--line);border-radius:7px;background:#0d1220;color:var(--ink);font:inherit;font-size:13px;
}
.production-main input::placeholder,dialog input::placeholder{color:var(--faint)}
.production-main select:focus-visible,.production-main input:focus-visible,dialog select:focus-visible,dialog input:focus-visible{outline:2px solid #8b9eff;outline-offset:2px}
dialog{max-height:calc(100dvh - 48px);overflow:auto}
dialog:has(.popup-close){padding-top:52px}
dialog .popup-close{position:absolute;top:12px;right:12px;z-index:10;display:grid;place-items:center;width:32px;height:32px;min-width:32px;padding:0;margin:0;border:1px solid var(--line);border-radius:8px;background:#171e30;color:var(--muted);font:inherit;font-size:17px;line-height:1;cursor:pointer}
dialog .popup-close:hover{background:#26314a;color:var(--ink)}
dialog .popup-close:focus-visible{outline:2px solid #8b9eff;outline-offset:3px}
dialog:has(.popup-close) .settings-close{visibility:hidden}
.workflow-style{display:block;margin:14px 0 18px;font-size:12px;color:var(--muted)}
.workflow-style select{display:block;width:100%;margin-top:8px;padding:9px 8px;background:#0d1220;border:1px solid var(--line);border-radius:7px;color:var(--ink);font:inherit}
.workflow-style small{display:block;font-size:11px;line-height:1.7;margin-top:7px;color:var(--faint)}
.stage-guide{margin:0 0 24px;padding:18px 20px;border:1px solid var(--line);border-radius:10px;background:#101725}
.stage-guide p{margin:0;color:var(--muted);font-size:13px;line-height:1.8}
.stage-guide strong{display:block;color:var(--ink);margin-bottom:5px;font-size:14px}
.stage-guide-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.stage-guide-actions button{padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:#171e30;color:var(--ink);cursor:pointer}
.production-nav button small{display:block;margin:5px 0 0 26px;font-size:10px;line-height:1.6;color:var(--faint)}
.cut-overview-controls{flex-wrap:wrap;gap:8px}.cut-overview-controls input{min-width:140px}
.stage-coach{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.stage-coach h3,.stage-workbench h3{font-size:16px;margin:0 0 8px}
.stage-coach textarea{display:block;width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:8px;background:#0b1120;color:var(--ink);font:inherit;font-size:13px;line-height:1.8;margin:10px 0;resize:vertical}
.stage-coach textarea[hidden]{display:none}
.stage-coach button,.stage-workbench button{padding:9px 13px;background:#19243b;color:var(--ink);border:1px solid var(--line);border-radius:7px;font:inherit;font-size:12px;cursor:pointer;margin:0 8px 8px 0}
.stage-coach button:disabled{opacity:.45;cursor:default}
.coach-transcript{max-height:300px;overflow:auto}
.stage-guide .coach-question{color:#c3b8ff;margin:14px 0 6px}
.stage-guide .coach-answer{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.stage-workbench{margin:0 0 24px;padding:20px;border:1px solid var(--line);border-radius:10px;background:#101725}
.stage-workbench>p{font-size:13px;line-height:1.8;color:var(--muted)}
.stage-source-images{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-top:12px}
.stage-source-images article{min-width:0}.stage-source-images img{width:100%;height:120px;object-fit:contain;background:#070910;border-radius:7px;display:block;margin-bottom:8px}
#kindSwitch [hidden]{display:none!important}
.production-main .composer .bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px;padding:16px 0;border-top:1px solid var(--line)}
.production-main .composer .bar .go,.production-main .composer .bar .preview-generate{position:static;inset:auto;z-index:auto;flex:0 0 auto;box-shadow:none;margin:0;padding:13px 22px;font-size:14px;letter-spacing:.04em}
.production-main .composer .bar .go-cost{flex:0 0 auto;font-size:14px;font-weight:700;color:#f0e6c8}
.production-main .composer .bar .generation-destination{flex:1 0 100%;margin:0}
.production-main .composer .bar .path-note{flex:1 1 200px;margin:0}
.production-main .composer .form-error{position:static;inset:auto;max-width:none;margin:0 0 16px;box-shadow:none}
.production-main .side{height:auto;max-height:none;align-self:start}
.production-main .side .history{height:auto;max-height:560px;min-height:160px;flex:0 1 auto;box-sizing:border-box}
.production-main .history .strip{max-height:440px;max-height:min(440px,55dvh);min-height:90px;flex:0 1 auto;padding-bottom:4px!important;-webkit-mask-image:none;mask-image:none}
.production-main .history-head{flex-wrap:wrap}
.stage-coach>summary{font-size:14px;color:#d4caff;cursor:pointer;font-weight:650;line-height:1.8}
.stage-coach:not([open]){padding:14px 0;margin-top:12px}
.stage-start{padding:20px;margin-bottom:20px;border:1px solid var(--line);border-radius:10px;background:#101725}
.stage-start h3{margin:0 0 8px;font-size:17px}.stage-start p{font-size:13px;color:var(--muted);line-height:1.8}
.stage-start-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.stage-start-controls select{flex:1 1 220px;min-width:0}
.stage-start button{margin:0}.stage-start .start-primary{padding:12px 20px;background:var(--grad);border-color:transparent;color:white}
.stage-advanced{margin-top:20px;border-top:1px solid var(--line);padding:16px 0}
.stage-advanced>summary{cursor:pointer;color:var(--muted);font-size:13px;line-height:1.8}
@container production (max-width:1100px){.production-main .side .history{height:auto;max-height:560px;grid-row:auto}}
@media(max-width:650px){.production-main .side{position:static}.production-main .composer .bar .go,.production-main .composer .bar .preview-generate{width:100%}.stage-start-controls{align-items:stretch;flex-direction:column}.stage-start-controls select{flex:auto;width:100%}}
dialog button.popup-close{display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;max-width:32px!important;max-height:32px!important;padding:0!important;margin:0!important;text-align:center!important;line-height:1!important;font-family:Arial,sans-serif!important;font-size:19px!important;letter-spacing:0!important;transform:none!important;flex:none!important}dialog button[hidden]{display:none!important}
