.model-chat-root{--chat-bg:var(--bg,#101916);--chat-panel:var(--surface,#18231e);--chat-line:var(--line,#314039);--chat-text:var(--text,#eef3ec);--chat-muted:var(--muted,#9eafa4);--chat-accent:var(--accent,#c2e4a7);color:var(--chat-text);font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;line-height:1.6;min-width:0}
.model-chat-desktop{margin:0;background:#101916;color:#eef3ec}.chat-site-header{height:65px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #314039;padding:0 28px;font:13px system-ui}.chat-site-header a{color:#c2e4a7;text-decoration:none}.chat-site-header span{color:#9eafa4}.model-chat-desktop>main{max-width:1500px;margin:auto;padding:24px}
.model-chat-root *{box-sizing:border-box}.model-chat-root [hidden]{display:none!important}.model-chat-root button,.model-chat-root select,.model-chat-root textarea,.model-chat-root input{font:inherit;color:var(--chat-text);background:var(--chat-panel);border:1px solid var(--chat-line);border-radius:10px;padding:10px 12px;min-height:44px;max-width:100%}.model-chat-root button{cursor:pointer}.model-chat-root button:disabled{opacity:.5;cursor:default}.model-chat-root button:focus-visible,.model-chat-root select:focus-visible,.model-chat-root textarea:focus-visible,.model-chat-root input:focus-visible{outline:2px solid var(--chat-accent);outline-offset:2px}.model-chat-root label{display:block;color:var(--chat-muted);font-size:12px;margin:0 0 6px}.model-chat-root select,.model-chat-root textarea{width:100%}.model-chat-root p{margin:0}.mc-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px}.mc-heading h1{font-size:26px;line-height:1.3;margin:0}.mc-eyebrow{font-size:10px;letter-spacing:2px;color:var(--chat-accent);margin-bottom:6px!important}.mc-heading small{color:var(--chat-muted);font-size:12px}.mc-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px}.mc-sidebar{min-width:0}.mc-sidebar select{height:calc(100dvh - 275px);min-height:250px;padding:6px;font-size:13px}.mc-sidebar option{padding:10px;border-radius:7px;overflow:hidden;text-overflow:ellipsis}.mc-sidebar option:checked{background:#344b35;color:#e6f2df}.mc-history-actions{display:flex;gap:8px;margin-top:10px}.mc-history-actions>*{flex:1;font-size:12px!important}.mc-chat{border:1px solid var(--chat-line);background:var(--chat-panel);border-radius:18px;overflow:hidden;min-width:0;display:flex;flex-direction:column}.mc-model-bar{padding:16px 18px;border-bottom:1px solid var(--chat-line);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.mc-options{padding:0 18px;border-bottom:1px solid var(--chat-line)}.mc-options summary{cursor:pointer;color:var(--chat-muted);font-size:12px;padding:10px 0}.mc-options-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:6px 0 14px}.mc-system{grid-column:1/-1}.mc-system textarea{font-size:13px;min-height:75px;resize:vertical}.mc-options input{width:100%}.mc-messages{overflow:auto;overscroll-behavior:contain;height:calc(100dvh - 420px);min-height:300px;padding:22px;scrollbar-width:thin}.mc-empty{display:grid;place-content:center;text-align:center;min-height:250px;color:var(--chat-muted);font-size:14px;gap:10px}.mc-empty b{font-size:20px;color:var(--chat-text);font-weight:500}.mc-message{margin:0 0 24px;max-width:92%}.mc-message.mc-user{margin-left:auto;background:#2b3c2c;padding:13px 16px;border-radius:15px}.mc-role{font-size:11px;color:var(--chat-accent);display:flex;gap:8px;align-items:center;margin-bottom:7px}.mc-copy{font-size:10px!important;min-height:25px!important;padding:1px 7px!important;margin-left:auto}.mc-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.85}.mc-reasoning{color:var(--chat-muted);font-size:12px;border-left:2px solid var(--chat-line);padding-left:12px;margin-bottom:12px}.mc-reasoning summary{cursor:pointer}.mc-reasoning pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;max-height:230px;overflow:auto}.mc-meta{color:var(--chat-muted);font-size:10px;margin-top:9px!important;font-variant-numeric:tabular-nums}.mc-status{padding:9px 18px;color:var(--chat-muted);font-size:12px;min-height:38px;border-top:1px solid var(--chat-line);white-space:pre-wrap;overflow-wrap:anywhere}.mc-error{color:#ffb5a5}.mc-compose{border-top:1px solid var(--chat-line);padding:14px 18px}.mc-compose textarea{resize:vertical;min-height:82px;max-height:220px;font-size:14px;background:var(--chat-bg)}.mc-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.mc-compose-actions small{color:var(--chat-muted);font-size:10px}.mc-compose-actions>div{display:flex;gap:8px}.mc-send{background:var(--chat-accent)!important;color:#20331a!important;border-color:var(--chat-accent)!important;min-width:90px}.mc-stop{color:#ffb5a5!important}.mc-model-note{font-size:10px;color:var(--chat-muted);margin-top:7px!important}
@media(max-width:700px){.model-chat-desktop>main{padding:18px 12px}.chat-site-header{padding:0 16px;height:55px}.chat-site-header span{display:none}.mc-heading{margin-bottom:15px}.mc-heading h1{font-size:23px}.mc-layout{grid-template-columns:1fr;gap:12px}.mc-sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:end}.mc-sidebar>label{grid-column:1/-1;margin:0}.mc-sidebar select{height:44px;min-height:44px;appearance:auto}.mc-history-actions{margin:0}.mc-history-actions button{padding:8px;min-width:46px}.mc-chat{border-radius:14px}.mc-model-bar{padding:12px;gap:7px}.mc-model-bar select{font-size:12px}.mc-model-bar>button{font-size:12px;padding:9px}.mc-options{padding:0 12px}.mc-options-grid{gap:8px}.mc-options-grid select,.mc-options-grid input{font-size:12px;padding:8px}.mc-messages{height:49dvh;min-height:280px;padding:17px 13px}.mc-message{max-width:97%}.mc-content{font-size:14px}.mc-compose{padding:12px}.mc-compose textarea{font-size:16px}.mc-compose-actions small{max-width:130px;line-height:1.5}.mc-heading small{font-size:10px}.mc-status{padding:9px 12px}.mc-meta{font-size:10px}.mc-empty{font-size:12px}.mc-empty b{font-size:18px}}
@media(prefers-reduced-motion:reduce){.model-chat-root *{scroll-behavior:auto!important}}
.model-chat-desktop>main{height:calc(100dvh - 65px);display:flex;flex-direction:column}.model-chat-desktop .mc-layout{flex:1;min-height:0}.model-chat-desktop .mc-chat{min-height:0}.model-chat-desktop .mc-messages{height:auto;min-height:130px;flex:1}.model-chat-desktop .mc-sidebar{display:flex;flex-direction:column;min-height:0}.model-chat-desktop .mc-sidebar>label{display:flex;flex-direction:column;flex:1;min-height:0}.model-chat-desktop .mc-sidebar select{flex:1;height:auto;min-height:100px}.mc-model-bar,.mc-options,.mc-status,.mc-compose{flex-shrink:0}.mc-options{max-height:32dvh;overflow:auto}.model-chat-root select{color-scheme:dark}.model-chat-root select option{background:#18231e;color:#eef3ec}
@media(max-width:700px){.model-chat-desktop>main{height:calc(100dvh - 55px)}.model-chat-desktop .mc-layout{grid-template-rows:auto minmax(0,1fr)}.model-chat-desktop .mc-sidebar{display:grid}.model-chat-desktop .mc-sidebar>label{display:block;grid-column:auto}.model-chat-desktop .mc-sidebar select{height:44px;min-height:44px}.mc-options{max-height:26dvh}#page-chat{position:fixed;z-index:12;top:0;left:0;right:0;bottom:calc(76px + env(safe-area-inset-bottom,0px));padding:12px;background:var(--bg,#101916);overflow:auto}#page-chat .model-chat-root{height:100%;display:flex;flex-direction:column}#page-chat .mc-heading{flex-shrink:0;margin-bottom:12px}#page-chat .mc-layout{flex:1;min-height:0;grid-template-rows:auto minmax(0,1fr)}#page-chat .mc-sidebar>label{grid-column:auto}#page-chat .mc-messages{height:auto;min-height:90px;flex:1}#page-chat .mc-compose textarea{min-height:65px;max-height:120px}#page-chat .mc-compose-actions small{font-size:9px}#page-chat .mc-model-note{display:none}#page-chat .mc-status{font-size:11px;min-height:30px;padding:5px 12px}}

.model-chat-root,.chat-site-header{box-sizing:border-box}

/* Output follows only while the reader stays at the bottom. */
.mc-messages{overflow-anchor:none;scroll-behavior:auto!important;min-height:0}
.mc-jump{align-self:center;flex-shrink:0;margin:6px 12px;font-size:12px!important;min-height:36px!important;border-color:var(--chat-accent)!important;color:var(--chat-accent)!important}
.mc-compact-compose{display:flex;gap:8px;flex-shrink:0;border-top:1px solid var(--chat-line);padding:9px 12px;background:var(--chat-panel)}
.mc-compose-toggle{flex:1;text-align:left;color:var(--chat-muted)!important}.mc-reply-stop{flex:none}
.mc-hide-input{display:none}
/* The remote chat owns its viewport at every width, including landscape. */
#page-chat{position:fixed;z-index:12;top:0;left:0;right:0;bottom:calc(76px + env(safe-area-inset-bottom,0px));padding:12px;background:var(--bg,#101916);overflow:hidden;box-sizing:border-box}
#page-chat .model-chat-root{height:100%;min-height:0;display:flex;flex-direction:column}
#page-chat .mc-heading{flex-shrink:0;margin-bottom:10px}
#page-chat .mc-layout{display:flex;flex-direction:column;flex:1;min-height:0;gap:10px}
#page-chat .mc-sidebar{display:flex;align-items:flex-end;gap:8px;flex-shrink:0}
#page-chat .mc-sidebar>label{flex:1;min-width:0;margin:0}
#page-chat .mc-sidebar select{height:44px;min-height:44px}
#page-chat .mc-history-actions{flex:none;margin:0}
#page-chat .mc-chat{flex:1;min-height:0;overflow:hidden}
#page-chat .mc-messages{height:0;flex:1;min-height:0}
#page-chat .mc-empty{min-height:110px}
#page-chat .mc-status{max-height:72px;overflow:auto;min-height:28px;padding:5px 12px;font-size:11px}
#page-chat .mc-compose-actions small{display:none}
#page-chat .mc-hide-input{display:inline-block}
#page-chat .mc-compose-actions{justify-content:flex-end}
#page-chat .mc-compose textarea{min-height:58px;max-height:105px;resize:none}
#page-chat .mc-compose{padding:9px 12px}
@media(max-width:700px){
  .model-chat-desktop .mc-chat{min-height:0}.model-chat-desktop .mc-messages{min-height:0}
  .mc-hide-input{display:inline-block}.mc-compose-actions small{display:none}.mc-compose-actions{justify-content:flex-end}
  #page-chat .mc-heading h1{font-size:20px}#page-chat .mc-heading small{display:none}
  #page-chat .mc-eyebrow{display:none}#page-chat .mc-model-bar{padding:8px 10px}
  #page-chat .mc-options{max-height:22dvh}
}

/* Reading view: only a slim header, the conversation, and a one-line status. */
.mc-toolbar{display:none;align-items:center;gap:6px}
.model-chat-root .mc-toolbar button{padding:7px 10px;min-height:40px;font-size:12px;white-space:nowrap}
.model-chat-root .mc-top-stop{color:var(--error,#ffb5a5)}
.model-chat-root.mc-reading-mode :is(.mc-sidebar,.mc-model-bar,.mc-options,.mc-compact-compose){display:none!important}
#page-chat .mc-toolbar{display:flex}
#page-chat .mc-heading{min-height:44px;margin:0 0 6px;gap:8px}
#page-chat .mc-heading h1{font-size:18px}
#page-chat .mc-heading :is(.mc-eyebrow,small){display:none}
#page-chat .mc-layout{gap:6px}
body.remote-chat-reading .bottom-nav{display:none!important}
body.remote-chat-reading #page-chat{bottom:0;padding:8px 8px max(6px,env(safe-area-inset-bottom,0px))}
#page-chat .mc-reading-mode .mc-chat{border-radius:12px;position:relative}
#page-chat .mc-reading-mode .mc-status{min-height:22px;max-height:26px;padding:2px 10px;font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#page-chat .mc-reading-mode .mc-status.mc-error{max-height:78px;white-space:pre-wrap;overflow:auto}
#page-chat .mc-reading-mode .mc-messages{padding:16px 13px 32px}
#page-chat .mc-reading-mode .mc-jump{position:absolute;bottom:31px;right:10px;margin:0;background:var(--chat-panel);box-shadow:0 3px 12px #0002;z-index:2}
@media(max-width:700px){
  .model-chat-root .mc-toolbar{display:flex}
  .model-chat-root.mc-reading-mode .mc-heading{min-height:44px;margin-bottom:6px}
  .model-chat-root.mc-reading-mode .mc-heading small{display:none}
}

/* Readable chat type, adjustable without opening the larger model menu. */
.model-chat-root{position:relative;--chat-font-size:18px}
.model-chat-root .mc-content{font-size:var(--chat-font-size,18px);line-height:1.8}
.model-chat-root .mc-reasoning{font-size:calc(var(--chat-font-size,18px) - 2px)}
.model-chat-root .mc-meta{font-size:11px}
.model-chat-root .mc-toolbar{display:flex;flex-shrink:0}
.model-chat-root:not(.mc-phone) .mc-toolbar :is(.mc-write,.mc-top-stop,.mc-menu){display:none!important}
.model-chat-root .mc-font-panel{position:absolute;right:0;top:52px;z-index:40;width:256px;max-width:calc(100% - 8px);padding:15px;border:1px solid var(--chat-line);border-radius:16px;background:var(--chat-panel);color:var(--chat-text);box-shadow:0 10px 40px #0003}
.mc-font-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:14px}
.model-chat-root .mc-font-close{font-size:22px;padding:0 10px;min-height:36px}
.mc-font-controls{display:flex;align-items:center;justify-content:space-between;gap:10px}
.model-chat-root .mc-font-controls button{font-size:18px;min-width:54px;min-height:44px}
.mc-font-value{font-size:16px;font-variant-numeric:tabular-nums}
.model-chat-root .mc-font-reset{width:100%;margin-top:12px;font-size:12px;color:var(--chat-muted)}
@media(max-width:380px){#page-chat .mc-heading h1{font-size:15px}#page-chat .mc-toolbar{gap:4px}#page-chat .mc-toolbar button{padding:6px 7px;font-size:11px}}
.model-chat-root .mc-font-preview{font-size:var(--chat-font-size,18px);line-height:1.8;margin-top:14px;padding-top:12px;border-top:1px solid var(--chat-line);overflow-wrap:anywhere}
