/* A separate text workspace keeps the studio, editors and equalizer available. */
.cinema-ready dialog.studio-text-chats{width:min(1220px,96vw);max-width:96vw;height:min(820px,92dvh);max-height:92dvh;padding:0;overflow:hidden;border:1px solid var(--stroke,#34433f);border-radius:18px;background:var(--panel,#13251f);color:var(--text,#f0f1e9)}
.studio-text-chats::backdrop{background:#020907bf;backdrop-filter:blur(6px)}
.studio-text-chats [hidden]{display:none!important}.studio-text-chats *{box-sizing:border-box}.studio-text-chats button,.studio-text-chats input,.studio-text-chats textarea,.studio-text-chats select{font:inherit}.studio-text-chats input,.studio-text-chats textarea,.studio-text-chats select{width:100%;min-width:0;color:inherit;background:var(--surface,#0d1c17);border:1px solid var(--stroke,#34433f);border-radius:9px;padding:10px;outline:none}.studio-text-chats textarea{resize:vertical;line-height:1.6}.studio-text-chats input:focus-visible,.studio-text-chats textarea:focus-visible,.studio-text-chats select:focus-visible,.studio-text-chats button:focus-visible{outline:2px solid var(--accent,#e6d27f);outline-offset:2px}.studio-text-chats button:disabled,.studio-text-chats input:disabled,.studio-text-chats select:disabled,.studio-text-chats textarea:disabled{opacity:.5;cursor:default}
.tc-shell{height:100%;display:grid;grid-template-columns:250px minmax(0,1fr)}.tc-sidebar{min-width:0;display:flex;flex-direction:column;gap:13px;padding:23px 16px 16px;background:var(--surface,#0d1c17);border-right:1px solid var(--stroke,#34433f)}.tc-side-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.tc-side-heading strong{font-size:17px}.tc-side-close{display:none!important}.tc-button{border:1px solid var(--stroke,#34433f);background:transparent;color:inherit;border-radius:9px;min-height:38px;padding:8px 12px;cursor:pointer;line-height:1.35;text-align:center}.tc-button:not(:disabled):hover{background:var(--hover,#223b30);border-color:var(--accent,#e6d27f)}.tc-button.tc-primary{background:var(--accent,#e6d27f);border-color:var(--accent,#e6d27f);color:var(--accent-ink,#14251d);font-weight:650}.tc-button.tc-primary:not(:disabled):hover{filter:brightness(1.05);background:var(--accent,#e6d27f)}.tc-button.tc-icon{width:38px;min-width:38px;height:38px;padding:0;font-size:25px;border-color:transparent;background:none}.tc-button.tc-new{text-align:left;border-style:dashed;min-height:44px}.tc-checkbox{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--muted,#b0c1b6);line-height:1.5}.studio-text-chats .tc-checkbox input{width:16px;min-width:16px;height:16px;min-height:16px;accent-color:var(--accent,#e6d27f);appearance:auto;padding:0;margin:0}.tc-chat-list{overflow:auto;display:flex!important;align-items:stretch;flex-direction:column;gap:6px;flex:1;min-height:70px;padding:2px;scrollbar-width:thin}.tc-button.tc-chat-row{display:flex;flex-direction:column;gap:6px;text-align:left;min-height:68px;padding:11px 12px;border-color:transparent;flex-shrink:0}.tc-chat-row strong{font-size:13px;font-weight:500;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tc-chat-row small{font-size:10px;color:var(--muted,#b0c1b6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.tc-button.tc-chat-row[aria-current=true]{background:var(--hover,#223b30);border-color:var(--stroke,#34433f);box-shadow:inset 2px 0 var(--accent,#e6d27f)}.tc-list-empty{color:var(--muted,#b0c1b6);font-size:12px;padding:5px;line-height:1.6}.tc-side-footer{border-top:1px solid var(--stroke,#34433f);padding-top:14px;display:grid;grid-template-columns:1fr auto;gap:9px;align-items:center}.tc-side-footer small{grid-column:1/-1;font-size:10px;line-height:1.6;color:var(--muted,#b0c1b6)}.tc-memory-button{text-align:left}.tc-memory-badge{font-size:10px;color:var(--muted,#b0c1b6)}.tc-memory-badge[data-enabled=true]{color:var(--accent,#e6d27f)}
.tc-main{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.tc-header{display:flex;align-items:center;gap:10px;padding:19px 23px 12px;border-bottom:1px solid var(--stroke,#34433f);flex:none}.tc-title-box{flex:1;min-width:0}.tc-title-box>small{font-size:9px;letter-spacing:.12em;color:var(--accent,#e6d27f)}.cinema-ready .tc-title-box h2{margin:6px 0 0;font-size:21px;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tc-button.tc-manage{font-size:11px;min-height:34px;padding:6px 9px}.tc-sidebar-toggle{display:none}.tc-toolbar{display:flex;align-items:end;gap:12px;padding:13px 24px 10px;flex:none}.tc-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px}.tc-field>span{font-size:10px;color:var(--muted,#b0c1b6)}.tc-toolbar>.tc-field:first-child{flex:1.4}.tc-toolbar>.tc-field:nth-child(2){flex:1}.studio-text-chats .tc-toolbar select{font-size:12px;height:40px;padding:8px 10px}.tc-button.tc-memory-shortcut{font-size:10px;white-space:nowrap;color:var(--muted,#b0c1b6);height:40px}.tc-settings{padding:14px 24px;display:flex;align-items:end;gap:10px;background:var(--surface,#0d1c17);border-block:1px solid var(--stroke,#34433f);flex:none}.tc-settings>.tc-field{flex:1}.tc-settings .tc-button{font-size:11px}.tc-memory-panel{background:var(--surface,#0d1c17);border:1px solid var(--stroke,#34433f);border-radius:12px;margin:6px 23px 0;padding:17px;flex:none;max-height:55%;overflow:auto}.cinema-ready .tc-memory-panel h3{font-size:16px;margin:0}.tc-memory-panel>p{margin:9px 0 13px}.tc-memory-panel>.tc-field{margin:14px 0 6px}.tc-memory-panel textarea{min-height:70px;max-height:150px}.tc-memory-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.tc-memory-actions .tc-button{font-size:11px;min-height:34px}.tc-muted{color:var(--muted,#b0c1b6);font-size:11px;line-height:1.6}
.tc-messages{min-height:0;flex:1;overflow:auto;padding:25px 30px 10px;overscroll-behavior:contain;scrollbar-width:thin;scroll-behavior:smooth}.tc-welcome{max-width:520px;margin:28px auto 40px;text-align:center}.tc-welcome-mark{display:inline-grid;place-items:center;width:50px;height:50px;border:1px solid var(--stroke,#34433f);border-radius:16px;font-size:32px;color:var(--accent,#e6d27f);background:var(--surface,#0d1c17)}.cinema-ready .tc-welcome h3{font-size:23px;font-weight:500;line-height:1.4;margin:20px 0 13px}.tc-welcome>p{font-size:13px;line-height:1.8;color:var(--muted,#b0c1b6);margin:0 auto;max-width:430px}.tc-suggestions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px}.tc-suggestions .tc-button{font-size:11px;padding:10px 12px}.tc-message{width:100%;max-width:760px;margin:0 auto 23px;overflow-wrap:anywhere}.tc-message-user{margin-left:auto;width:fit-content;min-width:150px;max-width:85%;background:var(--hover,#223b30);border:1px solid var(--stroke,#34433f);padding:15px 18px;border-radius:16px 16px 4px 16px}.tc-message-assistant{padding:6px 3px 12px}.tc-message-meta{display:flex;align-items:center;gap:10px;margin-bottom:10px}.tc-message-meta strong{font-size:11px;color:var(--accent,#e6d27f);font-weight:550}.tc-message-meta time{font-size:9px;color:var(--muted,#b0c1b6)}.tc-message-text{white-space:pre-wrap;word-break:break-word;font-size:14px;line-height:1.8;user-select:text}.tc-message-actions{display:flex;gap:5px;flex-wrap:wrap;margin:11px 0 0}.tc-message-actions>.tc-button{font-size:10px;min-height:26px;padding:3px 7px;border-color:transparent;color:var(--muted,#b0c1b6)}.tc-message-error{font-size:11px;color:#f3af9b;line-height:1.6;margin:10px 0 0}.tc-message-failed{border-color:#bd7463}.tc-pending{margin:0 24px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--surface,#0d1c17);border:1px solid var(--stroke,#34433f);border-radius:10px;flex:none}.tc-pending p{margin:0;font-size:11px;color:var(--muted,#b0c1b6);line-height:1.6}.tc-pending .tc-button{font-size:10px;min-height:32px;white-space:nowrap}.tc-status{margin:7px 25px 0;min-height:17px;font-size:11px;line-height:1.5;color:var(--muted,#b0c1b6);flex:none}.tc-status.tc-error{color:#f3af9b}.tc-main>.tc-button{margin:10px 25px;align-self:flex-start;flex:none;font-size:12px}.tc-composer{margin:9px 23px 20px;padding:12px;border-radius:15px;background:var(--surface,#0d1c17);border:1px solid var(--stroke,#34433f);flex:none}.studio-text-chats .tc-composer textarea{border:0;padding:2px 4px;min-height:70px;max-height:170px;resize:vertical;background:transparent;font-size:14px;box-shadow:none}.tc-composer-bottom{display:flex;align-items:center;gap:14px;justify-content:space-between;margin-top:8px}.tc-composer-bottom small{font-size:10px;max-width:390px}.tc-composer-bottom .tc-button{font-size:12px;white-space:nowrap;min-height:40px}.cinema-ready .cinema-stage-heading .studio-text-chats-open{border:1px solid var(--stroke,#34433f);border-radius:7px;padding:8px 10px;white-space:nowrap;color:var(--accent,#e6d27f);font-size:11px;background:var(--panel,#13251f)}
@media(max-width:850px){.tc-shell{grid-template-columns:215px minmax(0,1fr)}.tc-sidebar{padding:18px 12px 12px}.tc-header{padding:15px 15px 11px}.tc-toolbar{padding:12px 15px 9px;gap:8px;flex-wrap:wrap}.tc-button.tc-memory-shortcut{height:30px;min-height:30px;font-size:10px;padding:5px 8px}.tc-toolbar>.tc-field:first-child{flex-basis:50%}.tc-toolbar>.tc-field:nth-child(2){flex-basis:40%}.tc-messages{padding:19px 20px 6px}.tc-memory-panel{margin:6px 15px 0;padding:13px}.tc-settings{padding:12px 15px;flex-wrap:wrap}.tc-settings>.tc-field{flex-basis:100%}.tc-composer{margin:9px 15px 15px}.tc-composer-bottom{align-items:stretch;flex-direction:column;gap:8px}.tc-composer-bottom .tc-button{align-self:flex-end}.tc-composer-bottom small{max-width:none}.tc-message-user{max-width:92%}.tc-status{margin:7px 15px 0}.tc-pending{margin:0 15px}.tc-button.tc-manage{max-width:80px}.cinema-ready .tc-title-box h2{font-size:18px}}
@media(max-width:600px){.cinema-ready dialog.studio-text-chats{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0}.tc-shell{display:block;position:relative}.tc-main{height:100%}.tc-sidebar{position:absolute;left:0;top:0;bottom:0;width:min(300px,88vw);z-index:5;box-shadow:15px 0 90px #000b;display:none}.tc-shell[data-sidebar=open] .tc-sidebar{display:flex}.tc-side-close{display:block!important}.tc-sidebar-toggle{display:block}.tc-header{padding:12px 10px 10px;gap:5px}.tc-title-box>small{font-size:8px}.cinema-ready .tc-title-box h2{font-size:17px}.tc-button.tc-manage{font-size:9px;min-height:30px;padding:4px 5px;max-width:67px}.tc-toolbar{padding:10px 12px 7px;gap:8px}.tc-toolbar>.tc-field:first-child{flex:1;min-width:50%}.tc-toolbar>.tc-field:nth-child(2){flex:1;min-width:32%}.tc-toolbar .tc-field>span{font-size:9px}.studio-text-chats .tc-toolbar select{font-size:11px;height:37px}.tc-messages{padding:17px 15px 4px}.tc-welcome{margin:15px auto 25px}.cinema-ready .tc-welcome h3{font-size:21px}.tc-welcome>p{font-size:12px}.tc-suggestions{margin-top:17px}.tc-suggestions .tc-button{min-height:35px;padding:8px;font-size:10px}.tc-message-text{font-size:14px}.tc-message-user{padding:12px 14px;max-width:94%}.tc-message{margin-bottom:18px}.tc-composer{margin:7px 10px max(10px,env(safe-area-inset-bottom));padding:10px}.studio-text-chats .tc-composer textarea{min-height:56px;max-height:120px;font-size:16px}.tc-composer-bottom{gap:7px}.tc-composer-bottom small{font-size:9px}.tc-composer-bottom .tc-button{font-size:12px;min-height:40px;width:100%}.tc-status{margin:6px 12px 0;font-size:10px}.tc-memory-panel{margin:4px 10px 0;max-height:45%;padding:12px}.tc-memory-panel textarea{font-size:16px}.tc-memory-panel .tc-muted{font-size:10px}.tc-pending{margin:0 10px;padding:7px 9px;gap:7px}.tc-pending p{font-size:10px}.tc-pending .tc-button{font-size:9px;white-space:normal}.cinema-ready .cinema-stage-heading .studio-text-chats-open{font-size:10px;padding:7px 8px}}
@media(prefers-reduced-motion:reduce){.tc-messages{scroll-behavior:auto}}
.tc-settings{flex-wrap:wrap}.tc-settings>.tc-field{flex:1 1 200px}.studio-text-chats .tc-checkbox input::after{display:none}
/* Memory settings share the viewport with the composer instead of pushing it out. */
.tc-memory-panel{flex:0 1 240px;min-height:0;max-height:32dvh;overscroll-behavior:contain}.tc-memory-actions{position:sticky;bottom:-17px;padding:10px 0;background:var(--surface,#0d1c17);z-index:1}
@media(max-width:600px){.tc-memory-panel{flex:0 1 210px;max-height:30dvh}.tc-memory-actions{bottom:-12px;padding-block:8px}}
@media(max-height:520px){.tc-memory-panel{flex:0 1 120px;max-height:25dvh}.studio-text-chats .tc-composer textarea{min-height:44px;max-height:70px}.tc-composer{margin-bottom:8px}.tc-toolbar{padding-block:7px}.tc-header{padding-block:8px}}
/* Landscape: scroll the whole conversation workspace rather than clipping tools. */
@media(max-height:540px){.studio-text-chats .tc-main{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.tc-main>*{flex-shrink:0}.tc-header{position:sticky;top:0;background:var(--panel,#13251f);z-index:4}.tc-messages{flex:none;min-height:160px;max-height:250px;overflow-y:auto}.tc-memory-panel{flex:none;min-height:80px;max-height:135px}.tc-composer{flex:none;margin-bottom:12px}}
@media(max-height:540px){.tc-sidebar{overflow-y:auto;overscroll-behavior:contain}.tc-sidebar>*{flex-shrink:0}.tc-chat-list{flex:none;min-height:80px;max-height:180px}}
/* Give memory its own editing view; keep the unsent message in the DOM. */
.tc-main:has(>.tc-memory-panel:not([hidden]))>.tc-messages,.tc-main:has(>.tc-memory-panel:not([hidden]))>.tc-composer,.tc-main:has(>.tc-memory-panel:not([hidden]))>.tc-pending{display:none}
.tc-main:has(>.tc-memory-panel:not([hidden]))>.tc-memory-panel{flex:1 1 auto;min-height:0;max-height:none;margin-bottom:12px}
.tc-main:has(>.tc-memory-panel:not([hidden])) .tc-memory-actions{bottom:0}
.tc-main:has(>.tc-memory-panel:not([hidden])) .tc-memory-panel textarea{min-height:100px;max-height:35dvh}
@media(max-height:540px){.tc-main:has(>.tc-memory-panel:not([hidden]))>.tc-memory-panel{flex:none;min-height:270px;max-height:none}}

/* The same conversation workspace is used by the site, Android and Windows. */
.cinema-ready dialog.studio-text-chats{inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;--tc-chat-width:820px;background:var(--panel,#17191a)}
.studio-text-chats .tc-shell{grid-template-columns:272px minmax(0,1fr);grid-template-rows:minmax(0,1fr);min-height:0;max-height:100%;overflow:hidden}
.studio-text-chats .tc-main{height:100%;max-height:100%;min-height:0;overflow:hidden}
.studio-text-chats .tc-sidebar{min-height:0;overflow:hidden}.studio-text-chats .tc-sidebar>:not(.tc-chat-list){flex-shrink:0}
.studio-text-chats .tc-chat-list{flex:1 1 0;min-height:0;max-height:none;overflow:auto}
.studio-text-chats .tc-messages{flex:1 1 0;min-height:0;max-height:none;overflow:auto}
.studio-text-chats .tc-sidebar{padding:24px 14px 18px;gap:16px;background:var(--surface,#1c1e20)}
.studio-text-chats .tc-button.tc-new{border:0;font-size:15px;padding:12px;text-align:left}
.studio-text-chats .tc-button.tc-chat-row{min-height:55px;border-radius:10px;padding:10px 12px;gap:5px}
.studio-text-chats .tc-chat-row strong{font-size:14px;-webkit-line-clamp:1}
.studio-text-chats .tc-header{min-height:76px;padding:18px 28px;border-bottom:1px solid var(--stroke,#343638)}
.studio-text-chats .tc-title-box h2{font-size:20px;font-weight:550;margin-top:5px}
.studio-text-chats .tc-messages{padding:32px max(28px,calc((100% - var(--tc-chat-width))/2)) 22px}
.studio-text-chats .tc-message{max-width:var(--tc-chat-width);margin-bottom:32px}
.studio-text-chats .tc-message-user{margin-right:0;margin-left:auto;max-width:min(85%,680px);min-width:0;padding:13px 18px;background:var(--hover,#233c56);border:0;border-radius:20px 20px 5px 20px}
.studio-text-chats .tc-message-assistant{padding:8px 0 14px}
.studio-text-chats .tc-message-text{font-size:16px;line-height:1.75}
.studio-text-chats .tc-message-meta strong{font-size:12px}.studio-text-chats .tc-message-meta time{font-size:11px}
.studio-text-chats .tc-welcome{margin:clamp(30px,12vh,150px) auto 30px;max-width:620px}
.studio-text-chats .tc-welcome h3{font-size:30px;font-weight:500}.studio-text-chats .tc-welcome>p{font-size:14px;max-width:540px}
.studio-text-chats .tc-composer{width:calc(100% - 56px);max-width:var(--tc-chat-width);margin:8px auto 20px;padding:14px 16px;border-radius:22px;box-shadow:0 5px 22px #0001}
.studio-text-chats .tc-composer textarea{font-size:16px;min-height:60px;max-height:160px;resize:vertical}
.studio-text-chats .tc-toolbar{padding:8px 0 4px;align-items:center;gap:10px;flex-wrap:nowrap}
.studio-text-chats .tc-toolbar>.tc-field:first-child{flex:0 1 290px;min-width:0}.studio-text-chats .tc-toolbar .tc-field>span{display:none}
.studio-text-chats .tc-toolbar select{height:36px;max-width:100%;font-size:12px;border-radius:12px;background:transparent;padding:6px 10px}
.studio-text-chats .tc-memory-shortcut{height:34px;min-height:34px;font-size:11px;border:0;padding:6px 8px}
.studio-text-chats .tc-composer-bottom{margin-top:8px;flex-direction:row;align-items:center}.studio-text-chats .tc-composer-bottom small{font-size:11px;max-width:480px;line-height:1.5}
.studio-text-chats .tc-composer-bottom .tc-button{width:auto;min-height:40px;border-radius:13px;padding:9px 15px}
.studio-text-chats .tc-status,.studio-text-chats .tc-pending{width:calc(100% - 56px);max-width:var(--tc-chat-width);margin-left:auto;margin-right:auto}
.studio-text-chats .tc-status:empty{display:none}.studio-text-chats .tc-pending{border-radius:14px;padding:12px 14px}.studio-text-chats .tc-pending p{font-size:12px}
.studio-text-chats .tc-settings{padding:15px 28px}.studio-text-chats .tc-settings>.tc-field{flex-basis:190px}
.cinema-ready .commercial-result:has(.has-text-conversation){min-height:0;height:auto;max-height:none}
.commercial-text-conversation{display:block!important;padding:18px 12px!important}
.commercial-text-messages{max-width:820px;margin:0 auto 20px;max-height:65dvh;overflow:auto;padding:8px 16px;scrollbar-width:thin}
.commercial-text-messages .tc-message-user{margin-right:0}.commercial-text-messages .tc-message-text{font:inherit;font-size:16px;white-space:pre-wrap;line-height:1.7}
.commercial-text-conversation>.small-button{margin:4px;font-size:12px}
@media(max-width:850px){.studio-text-chats .tc-shell{grid-template-columns:225px minmax(0,1fr)}.studio-text-chats .tc-header{padding:14px 20px}.studio-text-chats .tc-messages{padding:24px}.studio-text-chats .tc-composer,.studio-text-chats .tc-status,.studio-text-chats .tc-pending{width:calc(100% - 36px)}.studio-text-chats .tc-composer-bottom{flex-direction:column;align-items:stretch}.studio-text-chats .tc-composer-bottom .tc-button{align-self:flex-end}.studio-text-chats .tc-message-text{font-size:15px}}
@media(max-width:600px){.studio-text-chats .tc-shell{display:block}.studio-text-chats .tc-sidebar{width:min(300px,88vw)}.studio-text-chats .tc-header{padding:10px 10px;min-height:64px}.studio-text-chats .tc-title-box h2{font-size:17px}.studio-text-chats .tc-messages{padding:20px 16px 10px}.studio-text-chats .tc-message{margin-bottom:24px}.studio-text-chats .tc-message-user{max-width:94%;padding:11px 14px}.studio-text-chats .tc-welcome{margin:35px auto 20px}.studio-text-chats .tc-welcome h3{font-size:25px}.studio-text-chats .tc-composer{width:calc(100% - 20px);margin:6px auto max(10px,env(safe-area-inset-bottom));padding:11px 12px;border-radius:18px}.studio-text-chats .tc-composer textarea{min-height:52px;max-height:120px;font-size:16px}.studio-text-chats .tc-toolbar{padding-top:5px}.studio-text-chats .tc-toolbar>.tc-field:first-child{flex:1;min-width:0}.studio-text-chats .tc-toolbar select{font-size:12px}.studio-text-chats .tc-memory-shortcut{font-size:10px;padding:5px}.studio-text-chats .tc-composer-bottom small{font-size:10px}.studio-text-chats .tc-composer-bottom .tc-button{width:auto;max-width:100%}.studio-text-chats .tc-status,.studio-text-chats .tc-pending{width:calc(100% - 20px)}.studio-text-chats .tc-settings{padding:12px}.studio-text-chats .tc-message-text{font-size:15px;line-height:1.65}}
@media(max-height:540px){.studio-text-chats .tc-main{overflow:hidden}.studio-text-chats .tc-messages{flex:1 1 0;min-height:0;max-height:none;overflow:auto}.studio-text-chats .tc-welcome{margin:12px auto}.studio-text-chats .tc-header{min-height:54px;padding-block:8px}.studio-text-chats .tc-composer{margin-block:4px 8px;padding-block:8px}.studio-text-chats .tc-composer textarea{min-height:44px;max-height:75px}.studio-text-chats .tc-main:has(>.tc-memory-panel:not([hidden]))>.tc-memory-panel{flex:1 1 0;min-height:0;max-height:none}}
