.chat-prose{white-space:normal;overflow-wrap:anywhere}.chat-prose>ol,.chat-prose>p,.chat-prose>ul{margin:0 0 1em;line-height:1.7}.chat-prose>h3{font-size:1.04em;font-weight:600;margin:1.3em 0 .55em;line-height:1.45}.chat-prose>:first-child{margin-top:0}.chat-prose>:last-child{margin-bottom:0}.chat-prose li+li{margin-top:.45em}.chat-prose ol,.chat-prose ul{padding-left:1.5em}.chat-prose code{font:inherit;font-size:.94em;background:var(--surface);border:1px solid var(--border);padding:1px 5px;border-radius:4px}.chat-prose strong{font-weight:600}.chat-answer>.chat-prose+.chat-prose{margin-top:1.15em}.chat-creative-choices{margin:18px 0 24px;font-size:15px;line-height:1.55}.chat-direction-intro>span{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--accent);font-weight:600}.chat-creative-choices legend svg,.chat-direction-intro svg{width:16px;height:16px;flex:none}.chat-direction-intro p{margin:9px 0 18px;color:var(--muted)}.chat-creative-choices fieldset{border:0;padding:0;margin:0 0 20px;min-width:0}.chat-creative-choices legend{display:flex;align-items:center;gap:8px;margin:0 0 10px;padding:0;font-size:15px;font-weight:600;line-height:1.55}.chat-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chat-choice-grid button,.chat-choice-row button,.chat-decision-options button{font:inherit;text-align:left;color:inherit;border:1px solid var(--border);background:transparent;border-radius:10px;padding:11px 12px;cursor:pointer;transition:background .15s,border-color .15s;min-width:0}.chat-choice-grid button:hover,.chat-choice-row button:hover,.chat-decision-options button:hover{background:var(--surface)}.chat-choice-grid button.selected,.chat-choice-row button.selected,.chat-decision-options button.selected{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,transparent)}.chat-creative-choices button:focus-visible,.chat-creative-choices summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.chat-choice-grid button>span,.chat-decision-options button>span{display:flex;align-items:center;gap:7px;font-size:14px;font-weight:500}.chat-choice-grid button svg,.chat-choice-row button svg,.chat-decision-options button svg{height:15px;width:15px;flex:none;margin-left:auto;color:var(--accent)}.chat-choice-grid button>small,.chat-decision-options button>small{display:block;font-size:13px;line-height:1.5;color:var(--muted);margin-top:5px}.chat-choice-row{display:flex;gap:8px}.chat-choice-row button{display:flex;align-items:center;gap:8px;flex:1 1;font-size:14px}.chat-creative-choices button:disabled{cursor:default;opacity:.65}.chat-creative-choices fieldset:disabled button.selected{opacity:1}.chat-direction-summary{border:1px solid var(--border);border-radius:10px;overflow:hidden}.chat-direction-summary details+details{border-top:1px solid var(--border)}.chat-direction-summary summary{display:flex;align-items:center;gap:9px;cursor:pointer;padding:11px 12px;list-style:none;font-size:14px}.chat-direction-summary summary::-webkit-details-marker{display:none}.chat-direction-summary summary>svg{height:15px;width:15px;color:var(--muted)}.chat-direction-summary summary>svg:last-child{margin-left:auto}.chat-direction-summary details[open] summary>svg:last-child{transform:rotate(180deg)}.chat-direction-summary p{margin:0 12px 12px;white-space:pre-wrap;color:var(--muted)}.chat-direction-edit{padding:0 12px 12px;display:grid;gap:8px;justify-items:start}.chat-custom-answer textarea,.chat-direction-edit textarea{font:inherit;color:inherit;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:10px;width:100%;min-width:0;box-sizing:border-box}.chat-direction-edit textarea{min-height:90px;resize:vertical;line-height:1.6}.chat-character-notes{margin-top:12px}.chat-character-notes summary{cursor:pointer;font-weight:500}.chat-character-notes summary span{color:var(--muted);font-size:13px}.chat-character-notes>div{margin:12px 0;padding:12px;border:1px solid var(--border);border-radius:9px}.chat-character-notes p{margin:6px 0;color:var(--muted)}.chat-creative-decisions{margin-top:22px}.chat-creative-decisions h3,.chat-storyboard-heading{font-size:16px;font-weight:600;margin:16px 0}.chat-decision-options{display:grid;gap:8px}.chat-decision-options button>span>small{font-size:11px;font-weight:400;color:var(--accent);margin-left:auto}.chat-custom-answer{display:grid;gap:8px;margin-top:9px;justify-items:start}.chat-choice-saved{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-top:8px}.chat-choice-saved svg{width:14px;height:14px}.chat-shot-direction{margin-top:12px;font-size:14px}.chat-shot-direction summary{cursor:pointer;color:var(--muted)}.chat-shot-direction>div{margin:12px 0}.chat-shot-direction>div>strong{display:block;font-size:12px;color:var(--muted);font-weight:500;margin-bottom:4px}.chat-completion-sound{margin-left:auto;flex:none}.chat-workspace-panel header:has(.chat-completion-sound)>button:last-child{margin-left:0}.chat-plan-actions{position:sticky;bottom:0;padding:12px 0 max(8px,env(safe-area-inset-bottom));background:var(--surface)}.chat-plan-actions .button{width:100%;justify-content:center;min-height:42px;font-weight:500;border-radius:9px}@media(max-width:700px){.chat-creative-choices{font-size:15px}.chat-choice-grid button{padding:12px 10px}.chat-custom-answer textarea,.chat-direction-edit textarea{font-size:16px}.chat-choice-grid button>span{font-size:14px}.chat-prose{font-size:17px;line-height:1.7}}@media(prefers-reduced-motion:reduce){.chat-choice-grid button,.chat-choice-row button,.chat-decision-options button{transition:none}}.chat-panel-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.chat-panel-tabs button{min-width:0;gap:6px;padding-inline:8px;font-weight:500}.chat-panel-tabs .chat-review-dot{width:6px;height:6px;min-width:6px;padding:0;border-radius:50%;background:var(--accent)}.chat-plan-shortcut{display:flex;align-items:center;gap:10px;width:100%;padding:12px;margin-bottom:18px;border:1px solid var(--border);border-radius:10px;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}.chat-plan-shortcut>svg{width:17px;height:17px;flex:none;color:var(--muted)}.chat-plan-shortcut>svg:last-child{margin-left:auto}.chat-plan-shortcut>span{min-width:0}.chat-plan-shortcut small,.chat-plan-shortcut strong{display:block;overflow-wrap:anywhere}.chat-plan-shortcut strong{font-size:14px;font-weight:500}.chat-plan-shortcut small{font-size:12px;color:var(--muted);margin-top:3px}.chat-plan-shortcut:hover{background:var(--surface)}.chat-plan-shortcut:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-custom-direction{display:grid;gap:6px;width:100%;font-size:13px;color:var(--muted)}.chat-custom-direction select{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:8px;padding:9px;background:var(--bg);min-width:0;width:100%}@media(max-width:700px){.chat-custom-direction select{font-size:16px}}.chat-scene-media-group{margin:12px 0}.chat-scene-media-group details>div,.chat-scene-media-group>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chat-scene-media{position:relative;display:block;overflow:hidden;aspect-ratio:16/10;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text);padding:0;cursor:pointer;min-width:0}.chat-scene-media img{width:100%;height:100%;object-fit:contain;display:block}.chat-scene-media>span:last-child{position:absolute;left:6px;bottom:6px;border-radius:4px;padding:2px 6px;background:#101218d9;color:#fff;font-size:12px;line-height:1.5}.chat-scene-media .chat-scene-placeholder{position:absolute;inset:0;display:grid;place-items:center;background:var(--bg);color:var(--muted)}.chat-scene-placeholder svg{width:20px;height:20px}.chat-scene-media:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.chat-scene-media-group details{margin-top:8px}.chat-scene-media-group summary{cursor:pointer;font-size:12px;color:var(--muted);padding:4px 0}.chat-scene-media-group details>div{margin-top:6px}.chat-question-detail{font-size:14px;font-weight:400;line-height:1.65;color:var(--muted);margin:0 0 12px;overflow-wrap:anywhere}.chat-custom-answer textarea{min-height:96px;line-height:1.6;resize:vertical;overflow-wrap:anywhere}.chat-decision-review{border:1px solid var(--border);border-radius:10px;margin:0 0 10px;background:transparent;min-width:0}.chat-decision-review>summary{display:flex;align-items:center;gap:10px;padding:12px;min-height:46px;list-style:none;cursor:pointer;border-radius:10px;box-sizing:border-box}.chat-decision-review>summary::-webkit-details-marker{display:none}.chat-decision-review>summary:hover{background:color-mix(in srgb,var(--muted) 6%,transparent)}.chat-decision-review>summary>span{min-width:0;flex:1 1}.chat-decision-review>summary small{-webkit-line-clamp:2;color:var(--muted);font-size:12px;margin-bottom:4px}.chat-decision-review>summary small,.chat-decision-review>summary strong{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.chat-decision-review>summary strong{-webkit-line-clamp:3;font-size:15px;font-weight:500;line-height:1.55}.chat-decision-review>summary>svg{width:15px;height:15px;flex:none;color:var(--muted)}.chat-decision-review>summary>.chat-decision-recorded{color:var(--accent);width:14px;height:14px}.chat-decision-review[open]>summary>svg:last-child{transform:rotate(180deg)}.chat-decision-review[open]>summary strong{-webkit-line-clamp:unset}.chat-creative-choices .chat-decision-review>fieldset{padding:0 12px 14px;margin:0}.chat-decision-review>fieldset>legend{padding-top:6px;overflow-wrap:anywhere}.chat-production-review{border:1px solid var(--border);border-radius:12px;margin:12px;padding:14px;min-width:0;overflow:auto;max-height:65dvh;background:var(--panel,var(--background));scrollbar-gutter:stable}.chat-production-review-heading{display:flex;flex-direction:column;gap:5px}.chat-production-review-heading strong{font-size:17px}.chat-production-review p,.chat-production-review-heading span{font-size:14px;line-height:1.6;color:var(--muted)}.chat-production-review-media{min-width:0}.chat-production-review-media.is-keyframes{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}.chat-production-review figure{margin:0;min-width:0}.chat-production-review img,.chat-production-review video{display:block;width:100%;max-height:300px;object-fit:contain;border-radius:8px;background:#101116}.chat-production-review figcaption{font-size:14px;color:var(--muted);min-width:0;overflow-wrap:anywhere}.chat-production-review-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.chat-production-review-actions svg,.chat-review-scene-change svg{width:15px;height:15px;flex-shrink:0}.chat-production-review-note{display:block;font-size:14px;margin-top:12px}.chat-production-review-note textarea,.chat-review-target select{display:block;width:100%;min-width:0;box-sizing:border-box;resize:vertical;margin-top:7px;border:1px solid var(--border);border-radius:8px;background:var(--panel,var(--background));color:inherit;font:inherit;padding:10px}.chat-production-review-error{color:var(--danger,#eb9d9d)!important}.chat-production-review-media.is-keyframes figure{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start;padding-bottom:18px;border-bottom:1px solid var(--border)}.chat-review-image{position:relative;display:block;min-width:0;border-radius:8px}.chat-review-image:focus-visible,.chat-review-shot summary:focus-visible{outline:2px solid var(--accent,#bb9afa);outline-offset:3px}.chat-review-image img{aspect-ratio:auto;height:clamp(220px,38svh,380px);max-height:none;object-fit:contain}.chat-review-scene-meta{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px;margin-bottom:5px}.chat-production-review figcaption>strong{display:block;color:var(--text);font-size:15px;line-height:1.45}.chat-production-review p.chat-review-visual{margin:6px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}.chat-review-shot{margin-top:7px;font-size:13px;line-height:1.55}.chat-review-shot summary{cursor:pointer;padding:5px 0}.chat-review-shot dl{margin:6px 0}.chat-review-shot dl>div{margin-top:8px}.chat-review-shot dt{font-weight:600;color:var(--text)}.chat-review-shot dd{margin:2px 0 0;white-space:pre-wrap}.chat-review-scene-change{margin-top:8px;max-width:100%;font-size:13px;min-height:36px}.chat-review-target{display:block;margin-bottom:12px}.chat-review-target select{resize:none;min-height:40px}.chat-production-review p.chat-review-scope-hint{font-size:13px;margin:6px 0}@media(max-width:600px){.chat-production-review-actions .button,.chat-review-scene-change{min-height:44px}.chat-production-review-note textarea,.chat-review-target select{font-size:16px}}.chat-character-direction{padding:14px 0;border-top:1px solid var(--border);min-width:0}.chat-character-direction h4{font-size:1rem;margin:0 0 12px}.chat-character-field{margin:12px 0;min-width:0}.chat-character-field>strong{font-size:.875rem}.chat-character-field>p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 10px}.chat-character-field details>summary{cursor:pointer;color:var(--accent);font-size:.875rem}.chat-character-field label{display:block;margin:10px 0;font-size:.875rem}.chat-character-field textarea{display:block;box-sizing:border-box;width:100%;min-width:0;margin-top:7px;resize:vertical;font:inherit;font-size:1rem;line-height:1.5}.chat-character-direction>small{display:block;margin-top:10px;color:var(--muted);line-height:1.5}.chat-character-field textarea{font-weight:400}.chat-character-references{display:grid;gap:10px;min-width:0}.chat-character-references>.button{justify-self:start}.chat-reference-selected{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:0!important;margin:0;list-style:none}.chat-reference-selected li{display:flex;align-items:center;gap:8px;min-width:0;padding:8px;border:1px solid var(--border);border-radius:10px}.chat-reference-selected img,.chat-reference-selected svg{width:44px;height:44px;object-fit:contain;flex:none;border-radius:6px}.chat-reference-selected span{font-size:13px;overflow-wrap:anywhere;line-height:1.4}.chat-reference-picker{display:grid;gap:12px;padding:12px;border:1px solid var(--border);border-radius:12px;min-width:0}.chat-reference-picker footer,.chat-reference-picker header{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.chat-reference-picker footer>span,.chat-reference-picker header strong{flex:1 1;min-width:0}.chat-reference-picker label{display:grid;gap:6px}.chat-reference-picker input{width:100%;min-width:0}.chat-reference-picker p{margin:0}.chat-reference-tokens{display:flex;flex-wrap:wrap;gap:6px;min-width:0}.chat-reference-tokens button{max-width:100%;min-width:0}.chat-reference-tokens span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-reference-tokens svg{width:14px;height:14px;flex:none}.chat-reference-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:340px;overflow:auto}.chat-reference-grid button{position:relative;display:grid;gap:6px;align-content:start;padding:8px;min-width:0;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);text-align:left}.chat-reference-grid button[aria-pressed=true]{border-color:var(--accent)}.chat-reference-grid button>svg:first-child,.chat-reference-grid img{width:100%;height:110px;object-fit:contain;border-radius:6px}.chat-reference-grid span{font-size:13px;line-height:1.4;overflow-wrap:anywhere}.chat-reference-grid button>svg:last-child:not(:first-child){position:absolute;right:8px;top:8px;width:20px;height:20px;padding:2px;background:var(--accent);color:var(--bg);border-radius:50%}.chat-reference-picker [role=status]{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.chat-reference-picker [role=status]>.spin{width:16px;height:16px}@media(max-width:420px){.chat-reference-selected{grid-template-columns:1fr}.chat-reference-grid img{height:90px}}.chat-reference-selected a{display:flex;align-items:center;gap:8px;min-width:0;color:inherit;text-decoration:none}.chat-reference-selected a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.chat-plan-card:has(.chat-reference-picker)>.chat-plan-actions{display:none}.chat-scene-cast{margin:12px 0;padding:10px;border:1px solid var(--border);border-radius:10px;min-width:0}.chat-scene-cast-heading{display:flex;align-items:center;gap:8px;min-width:0}.chat-scene-cast-heading>svg{width:16px;height:16px;flex:none;color:var(--muted)}.chat-scene-cast-heading>span{flex:1 1;display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}.chat-scene-cast-heading>span>span{color:var(--muted);font-size:14px}.chat-scene-cast-editor{display:grid;gap:10px;margin-top:12px}.chat-scene-cast-editor p{margin:0;font-size:14px;line-height:1.5}.chat-scene-cast-editor fieldset{border:0;padding:0;margin:0;display:grid;gap:10px;min-width:0}.chat-scene-cast-editor legend{font-size:14px;font-weight:600;margin-bottom:8px}.chat-scene-cast-editor label{display:flex;flex-direction:row;align-items:flex-start;gap:10px;min-width:0;cursor:pointer}.chat-scene-cast-editor input[type=checkbox]{width:18px;height:18px;margin:3px 0 0;flex:none;accent-color:var(--accent)}.chat-scene-cast-editor label>span{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere}.chat-scene-cast-editor label small{line-height:1.5;color:var(--muted)}.chat-scene-cast-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.chat-scene-cast-actions svg{width:14px;height:14px}.chat-plan-card:has(.chat-scene-cast-editor)>.chat-plan-actions{display:none}.chat-cast-membership{margin-top:12px}.chat-cast-membership>.button svg{width:14px;height:14px}.chat-cast-membership>small{display:block;margin-top:8px;color:var(--muted)}.chat-cast-form{padding:12px;border:1px solid var(--border);border-radius:10px;display:grid;gap:12px;min-width:0}.chat-cast-form footer,.chat-cast-form header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-cast-form header strong{overflow-wrap:anywhere;min-width:0}.chat-cast-form header button{flex:none}.chat-cast-form footer{justify-content:flex-end;flex-wrap:wrap}.chat-cast-form footer svg{width:14px;height:14px}.chat-cast-form label,.chat-character-rename label{display:grid;gap:6px;font-size:14px;min-width:0}.chat-cast-form input,.chat-cast-form textarea,.chat-character-rename input{box-sizing:border-box;width:100%;min-width:0;font-size:16px}.chat-cast-form p{font-size:14px;line-height:1.5;margin:0;color:var(--muted)}.chat-cast-form [role=alert] button,.chat-cast-form [role=status] button{display:block;margin-top:8px}.chat-character-rename{margin:8px 0 14px}.chat-character-rename label{margin:10px 0}.chat-plan-card:has(.chat-cast-form)>.chat-plan-actions{display:none}.chat-character-library{margin-top:8px;min-width:0}.chat-library-picker{min-width:0}.chat-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.chat-library-grid>button{display:flex;align-items:center;gap:8px;min-width:0;text-align:left;padding:8px;border:1px solid var(--border);border-radius:10px;background:var(--bg);color:var(--text)}.chat-library-grid>button.selected{border-color:var(--accent);background:var(--accent-bg)}.chat-library-grid>button>span{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.chat-library-grid img,.chat-library-grid>button>svg{width:48px;height:56px;object-fit:cover;flex:0 0 48px;border-radius:6px}.chat-character-source,.chat-library-grid small{color:var(--muted);font-size:13px}.chat-library-selection{display:grid;gap:10px;min-width:0;overflow-wrap:anywhere;padding:12px 0}.chat-library-images{display:flex;gap:8px;flex-wrap:wrap}.chat-library-images a{display:grid;place-items:center;width:64px;height:72px;border:1px solid var(--border);border-radius:8px;overflow:hidden}.chat-library-images img{width:100%;height:100%;object-fit:cover}.chat-library-images svg{width:20px;height:20px}.chat-library-picker footer{flex-wrap:wrap}@media(max-width:700px){.chat-library-grid{grid-template-columns:minmax(0,1fr)}}.chat-character-publication{margin:10px 0;min-width:0}.chat-publication-reference{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;padding:8px;border:1px solid var(--border);border-radius:9px;min-width:0}.chat-publication-check>input,.chat-publication-reference>input{width:16px!important;height:16px!important;min-height:0!important;flex:0 0 16px;accent-color:var(--accent)}.chat-publication-reference>img,.chat-publication-reference>svg{width:40px;height:44px;object-fit:cover;flex:0 0 40px;border-radius:5px}.chat-publication-reference>span{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.chat-publication-reference small,.chat-publish-character>small{font-size:13px;color:var(--muted)}.chat-publication-references{display:grid;gap:8px}.chat-publication-check{display:flex!important;flex-direction:row!important;gap:8px;align-items:center}.chat-library-receipt{display:flex;align-items:center;gap:6px;overflow-wrap:anywhere;font-size:14px!important;color:var(--success)}.chat-library-receipt svg{width:16px;height:16px;flex-shrink:0}.chat-publish-character footer{flex-wrap:wrap}.chat-voice-selection{display:grid;gap:6px;min-width:0;margin:12px 0;overflow-wrap:anywhere}.chat-voice-selection>p{margin:0;font-size:14px;color:var(--muted)}.chat-voice-selection>.button{justify-self:start}.chat-voice-selection .chat-cast-form{margin:0}.chat-review-inspect{position:absolute;right:8px;bottom:8px;display:flex;align-items:center;gap:6px;padding:6px 9px;border:1px solid #ffffff40;border-radius:7px;background:#14151bd9;color:#fff;font-size:12px;line-height:1.3}.chat-review-inspect svg{width:13px;height:13px}.chat-scene-viewer{box-sizing:border-box;width:min(1120px,calc(100vw - 24px));height:min(960px,calc(100dvh - 24px));max-width:none;max-height:none;padding:0;border:1px solid var(--border);border-radius:14px;color:var(--text);background:var(--surface,#181b23);overflow:hidden}.chat-scene-viewer::backdrop{background:#050609ba;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.chat-scene-viewer-layout{display:flex;flex-direction:column;height:100%;min-width:0;min-height:0}.chat-scene-viewer header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--border)}.chat-scene-viewer header>div{min-width:0}.chat-scene-viewer header span{font-size:12px;color:var(--muted)}.chat-scene-viewer h2{font-size:18px;line-height:1.35;margin:3px 0 0;overflow-wrap:anywhere}.chat-scene-viewer .button{display:inline-flex;justify-content:center;align-items:center;gap:6px;min-width:40px;min-height:40px;padding:8px 10px;line-height:1.3;font-size:13px;white-space:nowrap}.chat-scene-viewer .button svg{width:16px;height:16px;flex-shrink:0}.chat-scene-viewer .button:focus-visible,.chat-scene-viewer-image:focus-visible{outline:2px solid var(--accent,#bb9afa);outline-offset:-3px}.chat-scene-viewer-toolbar{display:flex;align-items:center;gap:8px;padding:10px 18px;flex-wrap:wrap}.chat-scene-viewer-toolbar>div{display:flex;gap:6px;margin-right:auto}.chat-scene-viewer-image{flex:1 1;min-height:0;min-width:0;overflow:auto;background:#101116;overscroll-behavior:contain}.chat-scene-viewer-image>img{display:block;width:100%;height:100%;max-height:none;max-width:none;object-fit:contain;border-radius:0}.chat-scene-viewer-image.is-zoomed>img{width:auto;height:auto;max-width:none;max-height:none;object-fit:fill}.chat-scene-viewer-image>[role=alert]{padding:24px;color:#fff}.chat-scene-viewer footer{display:flex;align-items:center;gap:14px;padding:12px 18px;border-top:1px solid var(--border)}.chat-scene-viewer footer>div{flex:1 1;min-width:0;max-height:100px;overflow:auto}.chat-scene-viewer footer p{margin:0 0 4px;font-size:14px;line-height:1.5;color:var(--text)}.chat-scene-viewer footer small{font-size:12px;color:var(--muted)}@media(max-width:600px){.chat-scene-viewer{width:calc(100vw - 12px);height:calc(100dvh - 12px);border-radius:10px}.chat-scene-viewer footer,.chat-scene-viewer header{padding:10px 12px}.chat-scene-viewer-toolbar{padding:8px 12px;gap:6px}.chat-scene-viewer .button{min-width:44px;min-height:44px;padding:8px}.chat-scene-viewer footer{flex-wrap:wrap}.chat-scene-viewer footer>div{flex-basis:100%;max-height:68px}.chat-scene-viewer footer>.button{margin-left:auto}.chat-scene-viewer h2{font-size:17px}}.chat-scene-dialogue{margin:12px 0;padding:12px 0;border-top:1px solid var(--border,#343947);min-width:0}.chat-scene-dialogue-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.chat-scene-dialogue-heading>svg{width:15px;height:15px;flex:none}.chat-scene-dialogue-heading>strong{font-size:.9rem}.chat-scene-dialogue-heading>button{margin-left:auto;display:inline-flex;align-items:center;gap:5px}.chat-scene-dialogue-heading>button svg{width:13px;height:13px}.chat-dialogue-lines{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:12px}.chat-dialogue-lines>li{display:block!important;padding:0!important;margin:0!important}.chat-dialogue-lines strong{font-size:.82rem;color:var(--muted,#aab0bf)}.chat-dialogue-legacy,.chat-dialogue-lines p,.chat-dialogue-original p{white-space:pre-wrap;overflow-wrap:anywhere;margin:4px 0;font-size:.95rem;line-height:1.5}.chat-dialogue-editor small,.chat-dialogue-lines small{font-size:.8rem;color:var(--muted,#aab0bf);line-height:1.45;display:block}.chat-dialogue-editor{margin-top:12px;min-width:0}.chat-dialogue-editor fieldset{border:0;margin:0;padding:0;min-width:0;display:grid;gap:12px}.chat-dialogue-line-editor{padding:10px;border:1px solid var(--border,#343947);border-radius:10px;min-width:0}.chat-dialogue-line-editor label{display:grid;gap:5px;font-size:.82rem;font-weight:500}.chat-dialogue-line-editor select,.chat-dialogue-line-editor textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font-size:16px;padding:8px 10px;border-radius:7px}.chat-dialogue-line-header{display:flex;align-items:flex-end;gap:6px;margin-bottom:10px}.chat-dialogue-line-header>label{flex:1 1;min-width:0}.chat-dialogue-line-header>div{display:flex;flex:none;gap:2px}.chat-dialogue-line-header .icon-button{width:32px;height:36px;padding:7px}.chat-dialogue-line-header svg{width:15px;height:15px}.chat-dialogue-line-editor details{margin-top:8px}.chat-dialogue-line-editor summary{font-size:.8rem;cursor:pointer;margin-bottom:6px}.chat-dialogue-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-top:12px}.chat-dialogue-original{margin:0 0 12px}.chat-dialogue-original summary{font-size:.85rem}.chat-plan-card.is-editing-dialogue>.chat-plan-actions{position:static}.chat-dialogue-editor legend{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.chat-prose :is(h1,h2,h3,h4,h5,h6){font-size:1.04em;font-weight:600;margin:1.3em 0 .55em;line-height:1.45}.chat-prose :is(ul,ol){list-style-position:outside}.chat-prose ul{list-style-type:disc}.chat-prose ol{list-style-type:decimal}.chat-prose li>p{margin:.3em 0}.chat-prose li :is(ul,ol){margin:.35em 0}.chat-prose blockquote{margin:1em 0;padding:.2em 0 .2em 1em;border-left:2px solid var(--border);color:var(--muted)}.chat-prose pre{max-width:100%;overflow:auto;padding:.85em;border:1px solid var(--border);border-radius:8px;background:var(--surface);font-size:.9em;white-space:pre}.chat-prose pre code{padding:0;border:0;border-radius:0;background:none;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:inherit}.chat-prose hr{border:0;border-top:1px solid var(--border);margin:1.2em 0}.chat-prose .chat-table-scroll{max-width:100%;overflow:auto;margin:1em 0;border:1px solid var(--border);border-radius:8px}.chat-prose table{width:100%;border-collapse:collapse;font-size:.94em;line-height:1.5}.chat-prose :is(th,td){padding:.6em .8em;text-align:left;vertical-align:top;border-bottom:1px solid var(--border);min-width:7em}.chat-prose th{font-weight:600;background:var(--surface)}.chat-prose tr:last-child td{border-bottom:0}.chat-prose .contains-task-list{list-style:none;padding-left:.3em}.chat-prose .task-list-item input{margin-right:.55em;accent-color:var(--accent);pointer-events:none}.chat-prose a{overflow-wrap:anywhere}.chat-table-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-intake-card>h3{font-size:18px;line-height:1.45;margin:10px 0 6px;overflow-wrap:anywhere}.chat-intake-progress{margin:0 0 10px;font-size:14px;line-height:1.5;color:var(--accent)}.chat-intake-card>.chat-plan-edit-hint{margin:0 0 12px;font-size:14px;line-height:1.5}.chat-intake-card .chat-creative-decisions{margin-top:0}.chat-intake-card .chat-intake-context{margin-top:12px}.chat-intake-card .chat-plan-actions{gap:8px}.chat-intake-next{flex-basis:100%;margin:0;font-size:13px;line-height:1.5;color:var(--muted)}@media(max-width:700px){.chat-workspace-dock.has-review,.chat-workspace-dock.is-discovery{position:fixed;z-index:70;inset:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));width:auto}.chat-workspace-dock.has-review>.chat-workspace-handle,.chat-workspace-dock.is-discovery>.chat-workspace-handle{display:none}}.chat-panel-body>.chat-production-review{margin:0 0 16px;max-height:none;overflow:visible;scrollbar-gutter:auto}.chat-workspace-panel>.chat-panel-tabs,.chat-workspace-panel>header{flex-shrink:0}@media(max-width:700px){.chat-workspace-dock>.chat-workspace-panel{height:100%;max-height:100%;box-shadow:0 12px 48px #0005}.chat-workspace-panel>header{padding:14px 14px 10px}.chat-workspace-panel>header>.icon-button{min-width:40px;min-height:40px}.chat-panel-body>.chat-production-review{padding:12px}.chat-review-image img{height:clamp(180px,32dvh,300px)}}.create-chat{--chat-card-border:color-mix(in srgb,var(--text) 13%,var(--surface));--chat-card-surface:color-mix(in srgb,var(--surface) 94%,var(--text));--chat-card-muted:color-mix(in srgb,var(--text) 78%,var(--surface))}.chat-workspace-panel{border-color:var(--chat-card-border)}.chat-plan-card,.chat-plan-ready,.chat-production-review,.chat-quality{border-color:var(--chat-card-border);background:var(--chat-card-surface);box-shadow:none;--muted:var(--chat-card-muted)}.chat-plan-card{border:0;padding:17px;background:transparent}.chat-decision-review{border-color:var(--chat-card-border);background:var(--chat-card-surface)}.chat-choice-grid button,.chat-choice-row button,.chat-decision-options button{border-color:var(--chat-card-border);background:color-mix(in srgb,var(--surface) 97%,var(--text));font-weight:400}.chat-choice-grid button:hover,.chat-choice-row button:hover,.chat-decision-options button:hover{border-color:color-mix(in srgb,var(--accent) 48%,var(--surface));background:color-mix(in srgb,var(--accent) 6%,var(--surface))}.chat-choice-grid button.selected,.chat-choice-row button.selected,.chat-decision-options button.selected{border-color:color-mix(in srgb,var(--accent) 65%,var(--surface));background:color-mix(in srgb,var(--accent) 10%,var(--surface))}.chat-choice-grid button:focus-visible,.chat-choice-row button:focus-visible,.chat-decision-options button:focus-visible,.chat-decision-review>summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.chat-decision-review>summary strong,.chat-plan-card h3,.chat-plan-title{font-weight:550}.chat-plan-card .chat-plan-actions{background:var(--surface)}[data-theme=light] .create-chat{--chat-card-surface:#fff;--chat-card-border:#dfe3e9;--chat-card-muted:#526071}.chats-page{max-width:1500px;margin:0 auto;padding:8px 0 32px}.chats-page .page-title{margin-bottom:28px}.chats-page .page-title h1{font-size:32px;letter-spacing:-.6px}.chats-page .page-title p{font-size:17px}.chats-filters{gap:18px;margin-bottom:24px}.chats-filters,.chats-search{display:flex;align-items:center}.chats-search{flex-direction:row;gap:12px;flex:1 1;max-width:670px;min-width:0;border:1px solid var(--border);border-radius:11px;padding:4px 14px;background:var(--surface);margin:0}.chats-search>svg{width:19px;height:19px;flex-shrink:0;color:var(--muted)}.chats-search input{width:100%;min-width:0;border:0!important;box-shadow:none!important;padding:10px 0!important;background:transparent!important;color:var(--text);font:inherit;font-size:16px;font-weight:400;outline:0}.chats-search:focus-within{outline:2px solid var(--accent);outline-offset:2px}.chats-search .icon-button{flex-shrink:0;width:28px;height:28px}.chats-project-filter{display:flex;flex-direction:row;align-items:center;gap:10px;margin:0;min-width:0;color:var(--muted);font-size:15px}.chats-project-filter select{max-width:280px;min-width:180px;min-height:46px;font-size:15px;background:var(--surface);border:1px solid var(--border);border-radius:10px;color:var(--text);padding:10px 34px 10px 12px}.chats-list{border:1px solid var(--border);border-radius:14px;overflow:hidden;background:var(--surface)}.chats-list-heading,.chats-row{display:grid;grid-template-columns:minmax(200px,1fr) minmax(140px,.5fr) 130px 140px 20px;align-items:center;gap:20px;padding:19px 24px}.chats-list-heading{font-size:13px;color:var(--muted);background:var(--surface2);padding-top:13px;padding-bottom:13px}.chats-list ul{list-style:none;padding:0;margin:0}.chats-list li+li{border-top:1px solid var(--border)}.chats-row{color:var(--text);text-decoration:none;min-height:88px;transition:background .12s}.chats-row:hover{background:var(--surface2)}.chats-row:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.chats-row-title{display:flex;align-items:center;gap:14px;min-width:0}.chats-row-title strong{font-size:17px;line-height:1.5;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chats-row-icon{display:grid;place-items:center;width:39px;height:39px;flex-shrink:0;border-radius:10px;background:var(--accent-bg);color:var(--accent)}.chats-row-icon svg{width:19px;height:19px}.chats-row-project{display:flex;gap:7px;align-items:center;min-width:0;overflow:hidden;font-size:14px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}.chats-row-project svg{width:15px;height:15px;flex-shrink:0}.chats-row-status{font-size:13px;color:var(--muted);line-height:1.5}.chats-row-status.queued,.chats-row-status.working{color:var(--accent)}.chats-row-status.attention{color:var(--danger)}.chats-row time{font-size:14px;line-height:1.5;color:var(--muted)}.chats-row-open{width:18px;height:18px;color:var(--muted)}.chats-list-footer{justify-content:space-between;gap:15px;margin-top:18px;font-size:14px}.chats-list-footer,.chats-loading{display:flex;align-items:center;color:var(--muted)}.chats-loading{justify-content:center;gap:10px;padding:36px;font-size:16px}.chats-loading svg{width:20px;height:20px}.chats-empty{display:flex;align-items:center;flex-direction:column;text-align:center;gap:13px;padding:65px 24px}.chats-empty>svg{width:34px;height:34px;color:var(--muted)}.chats-empty h2{font-size:21px;margin:0}.chats-empty p{font-size:16px;color:var(--muted);margin:0 0 8px}.chats-error{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 18px;border:1px solid var(--border);border-radius:11px;margin-bottom:18px;font-size:16px}@media(max-width:1199px){.chats-list-heading,.chats-row{grid-template-columns:minmax(160px,1fr) minmax(120px,.6fr) 105px 110px;gap:14px;padding-left:18px;padding-right:18px}.chats-list-heading>span:last-child,.chats-project-filter>span,.chats-row-open{display:none}}@media(max-width:800px){.chats-page .page-title{gap:14px}.chats-page .page-title h1{font-size:28px}.chats-page .page-title p{font-size:15px}.chats-filters{flex-wrap:wrap;gap:12px;margin-bottom:18px}.chats-search{flex-basis:100%;max-width:none}.chats-project-filter{width:100%}.chats-project-filter select{width:100%;max-width:none}.chats-list-heading{display:none}.chats-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title title" "project status" "date date";gap:8px 10px;padding:19px 16px}.chats-row-title{grid-area:title;gap:10px}.chats-row-title strong{white-space:normal;overflow-wrap:anywhere;font-size:16px}.chats-row-icon{width:32px;height:32px}.chats-row-project{grid-area:project;padding-left:42px;font-size:13px}.chats-row-status{grid-area:status;font-size:12px}.chats-row time{grid-area:date;padding-left:42px;font-size:12px}.chats-error,.chats-list-footer{align-items:flex-start;flex-direction:column}.chats-empty{padding:45px 20px}}@media(prefers-reduced-motion:reduce){.chats-row{transition:none}}.chats-list li{position:relative}.chats-list li.can-rename .chats-row-open{visibility:hidden}.chats-rename{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--muted);background:transparent}.chats-rename svg{width:17px;height:17px}@media(min-width:801px) and (max-width:1199px){.chats-list li.can-rename .chats-row{padding-right:56px}}@media(max-width:800px){.chats-rename{top:12px;right:8px;transform:none}.chats-list li.can-rename .chats-row-title{padding-right:34px}}:root{--control-border:color-mix(in srgb,var(--text) 17%,transparent);--control-hover-border:color-mix(in srgb,var(--text) 28%,transparent);--control-face:color-mix(in srgb,var(--surface) 94%,var(--text));--control-hover:color-mix(in srgb,var(--surface) 88%,var(--text));--control-accent-border:color-mix(in srgb,var(--accent) 38%,transparent);--control-accent-face:color-mix(in srgb,var(--accent) 12%,var(--surface));--control-accent-hover:color-mix(in srgb,var(--accent) 19%,var(--surface));--control-icon-size:16px}:root[data-theme=light]{--control-border:#dcdde5;--control-hover-border:#b9bccb;--control-face:#fff;--control-hover:#f7f7fa;--control-accent-border:#c9b9e5;--control-accent-face:#f5f0fc;--control-accent-hover:#ede5f8}:root :is(.app-shell,.modal,.auth-page) .button{min-height:40px;padding:8px 13px;gap:7px;border:1px solid var(--control-border);border-radius:7px;background:var(--control-face);color:var(--text);font-size:15px;font-weight:500;line-height:1.35;letter-spacing:0;box-shadow:none;text-decoration:none}:root :is(.app-shell,.modal,.auth-page) .button.small{min-height:36px;padding:6px 10px;font-size:14px}:root :is(.app-shell,.modal,.auth-page) .button.wide{min-height:44px}:root :is(.app-shell,.modal,.auth-page) .button:not(:disabled):not([aria-disabled=true]):hover{border-color:var(--control-hover-border);background:var(--control-hover);box-shadow:none;filter:none}:root :is(.app-shell,.modal,.auth-page) .button:is(.primary,.active,.selected,[aria-pressed=true]){border-color:var(--control-accent-border);background:var(--control-accent-face);color:var(--accent)}:root :is(.app-shell,.modal,.auth-page) .button:is(.primary,.active,.selected,[aria-pressed=true]):not(:disabled):hover{border-color:color-mix(in srgb,var(--accent) 65%,transparent);background:var(--control-accent-hover);color:var(--accent);filter:none}:root :is(.app-shell,.modal,.auth-page) .button:is(:disabled,[aria-disabled=true]){border-color:var(--control-border);background:var(--control-face);color:var(--muted);opacity:.48;box-shadow:none;filter:none}:root :is(.app-shell,.modal,.auth-page) .button.danger:not(:disabled):not([aria-disabled=true]){color:var(--danger)}:root :is(.app-shell,.modal,.auth-page) .text-button{font-size:15px;font-weight:500;line-height:1.4;gap:6px}:root :is(.app-shell,.modal,.auth-page) .icon-button{width:36px;height:36px;min-height:36px;padding:0;border:1px solid transparent;border-radius:7px;background:transparent;align-items:center;justify-content:center;box-shadow:none}:root :is(.app-shell,.modal,.auth-page) .icon-button:not(:disabled):hover{border-color:var(--control-border);background:var(--control-hover);box-shadow:none}:root :is(.app-shell,.modal,.auth-page) :is(button:not(.project-cover):not(.picker-item),a.button,a.text-button,a.nav-link)>svg.lucide{width:var(--control-icon-size)!important;height:var(--control-icon-size)!important;min-width:var(--control-icon-size);flex-shrink:0;stroke-width:1.65;vertical-align:middle;display:block}:root .app-shell .nav-link{font-size:15px;font-weight:500;padding:10px 12px;gap:10px;border-radius:7px;min-height:42px}:root .app-shell .nav-link.active{background:var(--control-accent-face);box-shadow:inset 0 0 0 1px var(--control-accent-border)}:root .app-shell .flow-steps{border-color:var(--control-border);border-radius:8px}:root .app-shell .flow-steps a{font-size:15px;font-weight:500;gap:7px;min-height:44px;padding:9px 12px;border-color:var(--control-border)}:root .app-shell .flow-steps a.active{background:var(--control-accent-face);color:var(--accent)}:root .app-shell .flow-steps a>svg{width:15px;height:15px;flex-shrink:0;stroke-width:1.65}:root .app-shell .flow-steps a>span{width:22px;height:22px;font-size:13px;font-weight:500;border-color:var(--control-border)}:root .app-shell .flow-steps .flow-step-label{font:inherit}:root .app-shell :is(.chat-mode-buttons,.chat-panel-tabs,.api-tabs,.api-segmented) button{font-weight:500;line-height:1.4}:root .app-shell .chat-mode-buttons button{--control-icon-size:14px;min-height:36px;gap:5px;padding:6px 8px;border:1px solid transparent;border-radius:6px;font-size:14px}:root .app-shell .chat-mode-buttons button.selected{border-color:var(--control-accent-border);background:var(--control-accent-face);color:var(--accent)}:root .app-shell .chat-send{--control-icon-size:18px;flex-shrink:0}:root .app-shell .chat-expand{--control-icon-size:14px;width:30px;height:30px;min-height:30px}:root .app-shell .chat-context button{font-weight:400;line-height:1.4}:root .app-shell .chat-context svg{width:14px;height:14px;flex-shrink:0;stroke-width:1.65}:root .app-shell .chat-add-menu>button{font-size:15px;font-weight:400;gap:10px;border-radius:6px}:root .app-shell .chat-add-menu>button>svg{width:16px;height:16px;stroke-width:1.65}:root .app-shell .chat-add-menu small{font-size:13px;font-weight:400}:root :is(.app-shell,.modal,.auth-page) :is(button,a.button,a.text-button):focus-visible{outline:2px solid var(--accent);outline-offset:3px;box-shadow:none}@media(max-width:700px),(pointer:coarse){:root :is(.app-shell,.modal,.auth-page) .button{min-height:44px;padding:9px 12px;font-size:15px}:root :is(.app-shell,.modal,.auth-page) .button.small{min-height:40px;padding:8px 10px;font-size:14px}:root :is(.app-shell,.modal,.auth-page) .icon-button{width:40px;height:40px;min-height:40px}:root .app-shell .nav-link{min-height:44px}:root .app-shell .chat-mode-buttons button{min-height:40px;padding:6px 4px;gap:4px;font-size:14px}:root .app-shell .chat-composer-left{gap:2px;min-width:0}:root .app-shell .chat-expand{width:32px;height:32px;min-height:32px}:root .app-shell .chat-send{width:36px;height:36px;min-height:36px}:root .app-shell .chat-add-media>.icon-button{width:36px;height:40px;min-height:40px}}@media(max-width:850px){:root .app-shell .flow-steps{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);width:100%;overflow:hidden;gap:0}:root .app-shell .flow-steps a{min-width:0;min-height:44px;padding:10px 0;gap:0;justify-content:center;align-items:center}:root .app-shell .flow-steps .flow-step-label,:root .app-shell .flow-steps a>span{display:none}:root .app-shell .flow-steps a>svg{display:block;width:17px;height:17px;stroke-width:1.65}:root .app-shell .flow-steps a.active{box-shadow:inset 0 -2px 0 var(--accent)}:root .app-shell .flow-steps a:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}}:root .app-shell .impersonation-banner .button{min-height:26px;padding:3px 8px;font-size:12px;border-radius:5px}:root .app-shell .toast .icon-button{width:28px;height:28px;min-height:28px}:root .page-content:has(.m9-native){padding:0;max-width:none}:root .page-content:has(.m9-native) .project-context{padding:6px 10px;margin:0}:root .page-content:has(.m9-native) .flow-steps{grid-template-columns:repeat(7,minmax(0,1fr))}:root .m9-native-frame{border:0;border-radius:0;overflow:visible;height:auto;background:#111217}.m9-editor-viewport{--editor-top:128px;background:#111217;height:max(360px,calc(100dvh - var(--editor-top) - 40px));display:flex;flex-direction:column;min-width:0;position:relative}.m9-editor-scroll{flex:1 1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;position:relative}.m9-editor-surface{position:relative;overflow:hidden;flex:none;margin-inline:auto}:root .m9-editor-surface iframe{position:absolute;inset:0;border:0;border-radius:0;max-width:none;display:block;background:#111217}.m9-editor-pan-layer{position:absolute;inset:0;touch-action:none;cursor:grab;-webkit-user-select:none;user-select:none}.m9-editor-pan-layer:active{cursor:grabbing}.m9-editor-view-tools{display:none;align-items:center;gap:2px;min-height:44px;padding:0 6px;background:var(--surface);color:var(--text);flex-shrink:0}:root .app-shell .m9-editor-view-tools button{border:0;border-radius:5px;background:transparent;color:var(--muted);min-width:40px;height:40px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:13px;font-weight:500;line-height:1;flex-shrink:0}:root .app-shell .m9-editor-view-tools button:hover,:root .app-shell .m9-editor-view-tools button[aria-pressed=true]{background:var(--accent-bg);color:var(--accent)}:root .app-shell .m9-editor-view-tools button:disabled{opacity:.4;cursor:default;background:transparent}.m9-editor-view-tools output{min-width:40px;text-align:center;font-size:12px;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;color:var(--muted)}.m9-editor-view-tools .m9-view-expand{margin-left:auto}.m9-editor-view-hint{padding:5px 10px;font-size:11px;line-height:1.4;color:var(--muted);background:var(--surface);flex-shrink:0}.m9-editor-viewport[data-mobile-desktop=true]{height:max(220px,calc(100dvh - var(--editor-top)));padding-bottom:env(safe-area-inset-bottom)}.m9-editor-viewport[data-expanded=true] .m9-editor-view-tools,.m9-editor-viewport[data-mobile-desktop=true] .m9-editor-view-tools{display:flex}:root .m9-editor-viewport:fullscreen,:root .m9-editor-viewport[data-expanded=true]{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;z-index:65;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}:root .app-shell .m9-native-actions .button,:root .app-shell:has(.m9-native) .topbar-actions>.button{min-height:32px;padding:5px 8px;font-size:12px}:root .app-shell:has(.m9-native) .topbar .icon-button{height:32px;width:32px;min-height:32px}.m9-native-guide{padding-left:10px;padding-right:10px}@media(max-width:1024px),(pointer:coarse){.m9-native-guide{display:none}:root .app-shell .m9-native-actions .button{width:36px;min-width:36px;padding:0;min-height:36px}.m9-native-actions .button span,.m9-native-status{display:none}:root .app-shell:has(.m9-native) .topbar{height:44px;min-height:44px;padding:0 8px;border:0}:root .app-shell:has(.m9-native) .topbar-actions>.button{min-height:36px;width:36px;padding:0;font-size:0}:root .page-content:has(.m9-native) .project-context{padding:4px 8px 6px}:root .page-content:has(.m9-native) .flow-steps{border:0;border-radius:0}:root .page-content:has(.m9-native) .flow-steps a{border:0}}.template-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:16px;margin-bottom:24px}.template-filters label{min-width:0}.template-search{position:relative;display:flex;align-items:center}.template-search>svg{position:absolute;left:12px;width:16px;height:16px;pointer-events:none;color:var(--muted)}.template-search input{padding-left:38px;padding-right:40px;min-width:0}.template-search button{position:absolute;right:4px}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:16px}.template-card{display:flex;flex-direction:column;gap:12px;min-width:0}.template-card h2{font-size:20px;line-height:1.35;margin:0;overflow-wrap:anywhere}.template-card p{margin:0}.template-card>.button{margin-top:auto;align-self:flex-start}.template-card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.template-mark{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--border);border-radius:10px}.template-mark svg{width:18px;height:18px}.template-tags{display:flex;flex-wrap:wrap;gap:6px}.template-tags span{border:1px solid var(--border);border-radius:6px;padding:3px 8px;font-size:13px}.template-status{display:flex;align-items:center;justify-content:center;gap:10px;margin:24px}.template-status svg{width:18px;height:18px}.template-detail{display:grid;gap:16px;min-width:0}.template-detail h3,.template-detail p{margin:0}.template-detail ul{margin:0;padding:0;list-style:none}.template-detail li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--border);flex-wrap:wrap}.template-detail code{overflow-wrap:anywhere}.template-detail dl{margin:0}.template-detail dl>div{display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,2fr);gap:12px;padding:8px 0}.template-detail dd{margin:0;overflow-wrap:anywhere}.template-detail dd small{display:block;color:var(--muted);margin-top:4px}@media(max-width:700px){.template-filters{grid-template-columns:1fr 1fr;gap:12px}.template-filters>label:first-child{grid-column:1/-1}.template-card h2{font-size:20px}.template-detail>.button{width:100%}}.template-card-video{height:180px;overflow:hidden;border-radius:10px;background:#08090c}.template-card-video .typed-media,.template-card-video video{height:100%;max-height:180px}.template-card-video video{object-fit:contain}.template-examples{display:grid;gap:12px}.template-example-video{max-height:360px;border-radius:10px;overflow:hidden;background:#08090c}.template-example-video .typed-media,.template-example-video video{max-height:360px;object-fit:contain}.template-examples .spin{width:16px;height:16px;margin-right:8px}.template-video-error{padding:20px;display:grid;place-items:center;gap:10px;background:var(--surface2);color:var(--text)}.template-card-video>div{height:100%}.modal.template-dialog{padding:0;overflow:hidden;display:flex;flex-direction:column}.template-dialog>header{flex-shrink:0;margin:0;padding:20px;border-bottom:1px solid var(--border);background:var(--surface)}.template-dialog>.template-detail{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:20px}.template-dialog>header h2{overflow-wrap:anywhere;min-width:0}.character-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:16px;margin-bottom:24px}.character-filters label{min-width:0}.character-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:20px}.character-card.panel{padding:0;overflow:hidden;display:flex;flex-direction:column;min-width:0}.character-cover{border:0;border-bottom:1px solid var(--border);border-radius:0;background:var(--surface2);width:100%;height:240px;flex-shrink:0;overflow:hidden;padding:0;display:grid;grid-template-rows:minmax(0,1fr);place-items:center;cursor:pointer;color:var(--muted)}.character-cover>svg{width:40px;height:40px}.character-cover img{width:100%;height:100%;object-fit:contain}.character-cover:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.character-card-body{padding:20px;display:flex;flex:1 1;flex-direction:column;gap:12px;min-width:0}.character-card h2{font-size:20px;line-height:1.35}.character-card h2,.character-card p{margin:0;overflow-wrap:anywhere}.character-meta{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:var(--muted)}.character-description{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.character-card-body>.button{margin-top:auto;align-self:flex-start}.character-image-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--muted);font-size:14px;height:100%;padding:16px}.character-image-fallback svg{width:24px;height:24px}.modal.character-dialog{padding:0;overflow:hidden;display:flex;flex-direction:column}.character-dialog>header{flex-shrink:0;margin:0;padding:20px;border-bottom:1px solid var(--border);background:var(--surface)}.character-dialog>header h2{overflow-wrap:anywhere;min-width:0}.character-detail{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:20px;display:grid;gap:16px}.character-detail p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.character-references{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.character-references a{display:block;height:180px;overflow:hidden;border:1px solid var(--border);border-radius:10px;background:var(--surface2)}.character-references img{height:100%;width:100%;object-fit:contain}@media(max-width:700px){.character-filters{grid-template-columns:1fr;gap:12px}.character-cover{height:260px}.character-detail>.button{width:100%}.character-library .page-title>.button{align-self:flex-start}}.model-catalog{max-width:1400px;margin:0 auto}.model-admin-note,.model-price-note{color:var(--muted);line-height:1.6;max-width:85ch;font-size:14px}.model-filters{display:flex;gap:16px;align-items:end;margin:24px 0 18px}.model-filters label{display:grid;gap:8px;font-size:14px}.model-search{flex:1 1}.model-search>div{position:relative}.model-search svg{position:absolute;left:12px;top:13px;width:16px;height:16px;color:var(--muted)}.model-search input{padding-left:38px;width:100%}.model-filters select{min-width:160px}.model-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.model-card.panel{padding:22px;display:flex;flex-direction:column;min-width:0;border:1px solid var(--border);box-shadow:none}.model-card-heading{display:flex;gap:12px;align-items:center}.model-kind-icon{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--border);border-radius:10px;flex-shrink:0}.model-kind-icon svg{width:18px;height:18px}.model-card-heading h2{font-size:18px;line-height:1.4;margin:0 0 3px}.model-card-heading .muted{font-size:13px}.model-status{margin-left:auto;font-size:12px;border:1px solid var(--border);border-radius:20px;padding:4px 9px;color:var(--muted);white-space:nowrap}.model-status.is-enabled{color:#88d9b0;border-color:#49856866}.model-description{font-size:15px;line-height:1.65;min-height:50px;margin:18px 0;color:var(--text)}.model-rates{margin-top:auto}.model-rates h3{font-size:14px;margin:0 0 10px}.model-rates table{width:100%;border-collapse:collapse;font-size:13px}.model-rates th{text-align:left;font-weight:500;color:var(--muted);font-size:12px;padding:7px 0}.model-rates td{padding:10px 0;border-top:1px solid var(--border);line-height:1.5}.model-rates td:last-child,.model-rates th:last-child{text-align:right;padding-left:12px}.model-rates td span{color:var(--muted);white-space:nowrap}.model-rates strong{font-weight:600;white-space:nowrap}.model-detail{font-size:12px;color:var(--muted);line-height:1.6}.model-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:15px;margin-top:15px;border-top:1px solid var(--border);font-size:13px;color:var(--muted)}.model-toggle{width:42px;height:25px;border-radius:20px;border:1px solid var(--border);background:var(--bg);padding:3px;display:flex;align-items:center;flex-shrink:0;cursor:pointer}.model-toggle>span{height:17px;width:17px;border-radius:50%;background:var(--muted);transition:transform .15s}.model-toggle[aria-checked=true]{background:#a886dd33;border-color:#a886dd99}.model-toggle[aria-checked=true]>span{transform:translateX(15px);background:#bf9af3}.model-toggle svg{width:17px;height:17px;margin:auto}.model-toggle:focus-visible{outline:2px solid #b895f5;outline-offset:3px}.model-toggle:disabled{cursor:wait;opacity:.65}.model-feedback{font-size:14px;color:#88d9b0}.model-empty{padding:30px;text-align:center}html[data-theme=light] .model-feedback,html[data-theme=light] .model-status.is-enabled{color:#24734b}@media(min-width:1650px){.model-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.model-grid{grid-template-columns:minmax(0,1fr)}.model-card.panel{padding:16px}.model-filters{flex-direction:column;align-items:stretch;gap:12px}.model-description{min-height:0}.model-card-heading h2{font-size:17px}.model-rates td:first-child{overflow-wrap:anywhere}.model-admin-note,.model-price-note{font-size:13px}}.model-form-intro{padding:14px 0 4px}.model-form-intro strong{font-size:17px;line-height:1.4}.model-form-intro p,.model-prompt-help{margin:6px 0 12px;color:var(--muted);font-size:14px;line-height:1.55}.model-form-fields{min-width:0;margin:20px 0 0;padding:16px 0 0;border:0;border-top:1px solid var(--line,var(--border,#343540))}.model-form-fields legend{padding:0 10px 0 0;font-size:14px;font-weight:600}.model-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px}.model-form-field{min-width:0;display:flex;flex-direction:column;gap:7px}.model-form-field label{display:flex;flex-direction:row;justify-content:flex-start;gap:8px;align-items:center;font-size:14px;font-weight:500;margin:0}.model-form-field input:not([type=checkbox]),.model-form-field select{width:100%;min-width:0;box-sizing:border-box;min-height:42px;font-size:14px;border-radius:8px;padding:9px 11px}.model-field-help{font-size:13px;line-height:1.5;color:var(--muted);margin:0}.model-required{font-size:11px;font-weight:400;color:var(--muted)}.model-toggle-field{position:relative;padding-right:48px;justify-content:flex-start}.model-toggle-field input[type=checkbox]{position:absolute;right:0;top:0;width:30px;height:18px;accent-color:var(--accent,#b28cf5);cursor:pointer}.model-source-fields{margin:12px 0 20px;border:0;padding:0}.model-source-fields .model-field-grid{grid-template-columns:minmax(0,1fr)}.model-source-fields legend{margin-bottom:10px}.model-form-validation{border:1px solid var(--line,var(--border,#343540));border-radius:10px;padding:12px 14px;margin:16px 0;font-size:13px;line-height:1.5}.model-form-validation strong{font-size:13px;font-weight:600}.model-form-validation ul{margin:6px 0 0;padding-left:18px}.model-form-validation li+li{margin-top:4px}.model-reference-spec{font-size:13px;line-height:1.55;color:var(--muted);margin:8px 0}.reference-type-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:16px 0 8px}.reference-type-heading strong{font-size:14px}.reference-type-heading span{font-size:12px;color:var(--muted)}@media(max-width:600px){.model-field-grid{grid-template-columns:minmax(0,1fr);gap:16px}.model-form-field input:not([type=checkbox]),.model-form-field select{font-size:16px;min-height:44px}.model-form-intro strong{font-size:17px}.model-form-fields{margin-top:18px}.model-toggle-field input[type=checkbox]{width:34px;height:22px}.model-form-field label{font-size:14px}}.model-field-audio_profile,.model-field-characterOrientation,.model-field-negative_tags,.model-field-title,.model-field-voice{grid-column:1/-1}.page-content .flow-steps,.page-content:has(.m9-native) .flow-steps{grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible}.page-content .flow-steps a{min-width:0;padding:12px 8px}.media-workspace-tabs{display:flex;gap:4px;margin:0 0 24px;padding:4px;width:fit-content;background:var(--surface);border:1px solid var(--border);border-radius:10px}.media-workspace-tabs .button{min-width:100px;border-color:transparent;border-radius:7px}.playground-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding:0 0 18px;margin-bottom:22px}.playground-panel-heading h2{margin:0;font-size:20px}.playground-panel-heading>span{color:var(--muted);font-size:14px;text-align:right}.audio-layout,.creator-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.audio-layout>*,.creator-grid>*{min-width:0}.audio-composer,.creator-grid .composer{padding:24px;border-radius:12px}.audio-results,.creator-preview{padding:24px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}.creator-preview .preview-canvas{height:auto;min-height:320px;aspect-ratio:4/3;border-radius:10px;margin-bottom:20px}.creator-preview .preview-canvas .typed-media{height:100%;min-height:0}.creator-preview .preview-details{padding:0;border:0;box-shadow:none;background:transparent}.creator-preview .version-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.creator-preview .version-thumb{height:130px}.creator-preview .version-tile{min-width:0;overflow-wrap:anywhere}.composer .generation-prompt{min-height:180px;font-size:16px}.audio-results .audio-result{box-shadow:none}@media(max-width:1100px){.audio-layout,.creator-grid{grid-template-columns:minmax(0,1fr)}}@media(max-width:850px){:root .app-shell .page-content .flow-steps{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-flow:row}:root .app-shell .page-content .flow-steps a{padding:10px 2px;gap:5px;flex-direction:column;min-height:58px}:root .app-shell .page-content .flow-steps .flow-step-label{display:block;font-size:clamp(10px,2.8vw,12px)}}@media(max-width:560px){.page-content .flow-steps a,.page-content:has(.m9-native) .flow-steps a{padding:10px 3px;gap:5px;flex-direction:column;font-size:12px;min-height:58px}.page-content .flow-steps .flow-step-label{display:block;font-size:12px}.page-content .flow-steps svg{display:block;width:17px;height:17px}.audio-composer,.audio-results,.creator-grid .composer,.creator-preview{padding:16px}.creator-preview .preview-canvas{min-height:220px}.playground-panel-heading>span{font-size:12px}.creator-preview .version-strip{grid-template-columns:minmax(0,1fr)}.media-workspace-tabs{width:100%}.media-workspace-tabs .button{flex:1 1}}