/* Final layout rules: content scrolls independently from header and composer. */
.mobile-sidebar-backdrop{display:none}.accent-swatch[aria-pressed=true]{border-color:var(--zy-text)!important}.settings-content h3+h3{display:none}.settings-layout nav{scrollbar-width:thin}
@media(max-width:899px){.mobile-sidebar-backdrop{display:block;position:fixed;inset:0;z-index:65;border:0;background:#0006;cursor:pointer}.chat-sidebar[data-open=true]{box-shadow:0 18px 60px #0005!important}}
.chat-shell,.chat-shell>main{min-width:0!important;min-height:0!important}.chat-shell>main{flex:1!important;width:0!important;display:flex!important;flex-direction:column!important}.chat-scroll{flex:1 1 0!important;min-height:0!important;overflow:auto!important}.chat-content{box-sizing:border-box!important;width:100%!important}.chat-header{gap:12px!important}.chat-header>div{min-width:0}.chat-header>div:last-child{flex-shrink:0}.chat-header button,.composer-shell button{min-height:44px!important;min-width:44px!important}.chat-header svg,.composer-shell button svg{width:20px;height:20px;stroke-width:1.65!important;stroke-linecap:round;stroke-linejoin:round}.focused-model-trigger{min-width:0!important}.focused-model-trigger .model-trigger-emblem{display:none!important}
.chat-welcome{min-height:0!important;max-width:720px!important;margin-inline:auto!important;padding:clamp(20px,5vh,56px) 0 24px!important}.chat-welcome .welcome-brand,.chat-welcome .welcome-brand img{width:80px!important;height:80px!important;min-height:80px!important;max-width:80px!important;max-height:80px!important}.welcome-questions{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))!important}.welcome-questions>button{min-width:0!important;min-height:68px!important;white-space:normal!important}.composer-shell{box-sizing:border-box!important;width:100%!important;max-width:900px!important;margin-inline:auto!important;flex:none!important;padding:8px 20px max(12px,env(safe-area-inset-bottom))!important}.chat-composer{width:100%!important;box-sizing:border-box!important}.chat-composer textarea{max-height:min(180px,25dvh)!important;min-height:48px!important;font-size:16px!important;line-height:1.7!important}
.focused-model-menu{width:360px!important;max-width:calc(100vw - 32px)!important;border-radius:16px!important;padding:10px!important;box-sizing:border-box!important}.focused-model-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px!important}.focused-model-heading strong{font-size:15px!important}.focused-model-heading span{display:block;margin-top:5px;font-size:11px!important}.focused-model-option{min-height:76px!important;padding:14px!important;align-items:center!important;border-radius:12px!important}.focused-model-option[aria-checked=true]{background:var(--zy-tint)!important;border-color:var(--brand)!important}.focused-model-status{color:var(--brand-soft)!important}.focused-model-description{font-size:12px!important;line-height:1.6!important}.focused-model-title strong{font-size:14px!important}.model-subscribe{background:var(--zy-tint)!important;border-color:var(--brand)!important;flex-direction:row!important;min-height:72px!important;padding:14px!important}.model-subscribe strong{font-size:13px}.model-subscribe small{font-size:11px}.sheet-handle{display:none!important}
.accent-swatch{position:relative;flex:none}.accent-swatch[aria-pressed=true]:after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:22px;text-shadow:0 1px 3px #0008}.accent-swatch:focus-visible{outline:2px solid var(--zy-text)!important;outline-offset:3px!important}.welcome-questions button>span:first-child{background:var(--zy-tint)!important;color:var(--brand-soft)!important}.settings-primary,.settings-seg.active{background:var(--brand)!important}.chat-composer:focus-within{border-color:rgba(var(--zy-veil),.24)!important}
@media(max-width:1024px){.chat-header{min-height:60px!important;padding:8px 16px!important;height:auto!important;flex-wrap:wrap!important}.chat-header>div:last-child{display:flex!important;visibility:visible!important;gap:2px!important;width:auto!important;border:0!important;padding:0!important}.chat-header>div:last-child>button{display:grid!important;opacity:1!important;visibility:visible!important}.chat-content{padding-inline:20px!important}.settings-dialog{width:100%!important}.focused-model-menu{max-height:calc(100dvh - 100px)!important;overflow-y:auto!important}}
@media(max-width:899px){.chat-sidebar[data-open=true]{position:fixed!important;inset-block:0!important;inset-inline-start:0!important;width:min(300px,85vw)!important;z-index:70!important;height:100dvh!important;box-shadow:0 18px 60px #0005!important}.chat-sidebar[data-open=false]{position:fixed!important;width:0!important;visibility:hidden!important}.chat-shell>main{width:100%!important}.settings-overlay{padding:12px!important}.settings-dialog{max-height:calc(100dvh - 24px)!important}}
@media(max-width:600px){.chat-header{padding:6px 12px!important;gap:2px!important}.chat-header>div:first-child{flex:1 1 100%!important;justify-content:space-between}.chat-header>div:last-child{width:100%!important;justify-content:flex-end;gap:4px!important;min-height:44px}.chat-header .language-switch{margin-inline-end:auto;font-size:12px!important}.focused-model-trigger>span:nth-child(2){max-width:230px!important}.focused-model-menu{position:fixed!important;inset:112px 12px auto!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 136px)!important}.chat-content{padding:12px 16px!important}.welcome-title{font-size:26px!important}.welcome-subtitle{font-size:14px!important;margin-bottom:20px!important}.chat-welcome .welcome-brand,.chat-welcome .welcome-brand img{width:68px!important;height:68px!important;min-height:68px!important;max-width:68px!important;max-height:68px!important}.welcome-questions{gap:8px!important}.welcome-questions>button{padding:12px!important;font-size:12px!important;min-height:80px!important;line-height:1.6!important}.composer-shell{padding:6px 10px max(8px,env(safe-area-inset-bottom))!important}.settings-content{padding:20px 16px!important}.settings-layout nav button{min-height:44px!important}}
@media(max-width:360px){.welcome-questions{grid-template-columns:1fr!important}.focused-model-trigger>span:nth-child(2){max-width:190px!important}}
@media(max-height:550px) and (max-width:1024px){.chat-welcome{padding-top:12px!important}.chat-welcome .welcome-brand{display:none!important}.focused-model-menu{top:64px!important;max-height:calc(100dvh - 80px)!important}.chat-header>div:first-child{flex:1!important}.chat-header>div:last-child{width:auto!important}.chat-composer textarea{max-height:90px!important}}

.chat-sidebar[data-open=false]{display:none!important}

/* Account actions: quiet desktop rows, generous touch tiles. */
.account-actions{bottom:64px!important;inset-inline:0!important;padding:8px!important;border-radius:18px!important;background:rgb(var(--zy-solid))!important;max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.account-actions .account-action{min-height:48px;gap:12px!important;padding:12px!important;font-size:13px!important;line-height:1.5;white-space:normal;text-align:start}
.account-action>svg,.account-action>span>svg{width:20px;height:20px;flex-shrink:0;stroke-linecap:round;stroke-linejoin:round}
.account-actions .account-action:hover{background:rgba(var(--zy-veil),.07)!important}
.account-action:focus-visible,.account-trigger:focus-visible{outline:2px solid var(--brand)!important;outline-offset:-2px}
.account-actions .account-action--logout{color:#ef5555!important}
.account-actions .account-action--logout:hover{background:rgba(220,38,38,.1)!important}
.account-trigger{min-height:52px}
.account-trigger[aria-expanded=true]{background:rgba(var(--zy-veil),.07)!important}
@media(max-width:1024px),(pointer:coarse){
 .account-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px!important}
 .account-actions .account-action{flex-direction:column;justify-content:center!important;gap:10px!important;min-height:92px;text-align:center;padding:12px 8px!important;border:1px solid rgba(var(--zy-veil),.09)!important;background:rgba(var(--zy-veil),.035)!important;border-radius:12px!important;font-size:12px!important}
 .account-action>svg,.account-action>span>svg{width:22px;height:22px}
 .account-actions .account-action--admin>span:first-child{flex-direction:column}
 .account-action-divider{display:none}
 .account-actions .account-action--logout{grid-column:1/-1;flex-direction:row;min-height:48px;background:rgba(220,38,38,.06)!important;border-color:rgba(220,38,38,.13)!important}
 .account-actions .account-action:active{transform:scale(.97)}
}
@media(prefers-reduced-motion:reduce){.account-actions,.account-action{animation:none!important;transition:none!important;transform:none!important}}

/* Settings adapt to the available screen instead of a fixed-width sheet. */
.settings-overlay{padding:24px!important}
.settings-dialog{width:min(100%,1040px)!important;height:min(780px,90dvh)!important;max-height:calc(100dvh - 48px)!important;border-radius:22px!important}
.settings-dialog>header{flex-shrink:0;gap:16px;padding:20px 24px!important}
.settings-header-user{min-width:0;max-width:48%}.settings-header-user>div{min-width:0}.settings-header-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.settings-close{width:44px!important;height:44px!important;flex-shrink:0;border-radius:12px!important}
.settings-layout{min-height:0!important;overflow:hidden}
.settings-layout nav{flex:0 0 180px!important;overflow-y:auto;overscroll-behavior:contain}
.settings-content{min-width:0!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin;padding:26px!important;overflow-wrap:anywhere}
.settings-plans-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
.settings-plan-tile{min-width:0;display:flex!important;flex-direction:column;gap:10px;border-radius:16px!important;padding:20px!important}
.settings-plan-tile>button{margin-top:auto;align-self:stretch;min-height:44px!important}
.settings-plan-tile h3{margin:0!important;font-size:20px!important}
.settings-payee{padding:16px!important;border:1px solid rgba(var(--zy-veil),.1);border-radius:14px;background:rgba(var(--zy-veil),.025);margin-bottom:18px}
.settings-payee-opts{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px}
.settings-payee-opt{min-height:44px!important;flex:1;min-width:110px;border-radius:10px!important}
.settings-payee-opt[aria-pressed=true]{border-color:var(--brand)!important;background:var(--zy-tint)!important;color:var(--zy-text)!important;box-shadow:0 0 0 1px var(--brand) inset}
.settings-payee-opt[aria-pressed=true]:before{content:'✓ ';color:var(--brand-soft)}
.settings-dialog button:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
@media(max-width:850px){
 .settings-overlay{padding:12px!important}.settings-dialog{height:calc(100dvh - 24px)!important;max-height:calc(100dvh - 24px)!important}
 .settings-layout{flex-direction:column!important}.settings-layout nav{flex:0 0 auto!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px!important;padding:10px!important;overflow:auto;max-height:180px;border-inline-end:0!important;border-bottom:1px solid rgba(var(--zy-veil),.08)}
 .settings-nav-group{display:none!important}.settings-layout nav button{min-width:0;min-height:44px!important;text-align:center!important;white-space:normal!important;padding:8px 4px!important;font-size:12px!important;border:1px solid rgba(var(--zy-veil),.06)!important}
 .settings-layout nav button.active{background:var(--zy-tint)!important;color:var(--zy-text)!important;border-color:var(--brand)!important}
 .settings-content{padding:20px!important}.settings-header-user{max-width:44%}
}
@media(max-width:540px){
 .settings-overlay{padding:6px!important}.settings-dialog{height:calc(100dvh - 12px)!important;max-height:calc(100dvh - 12px)!important;border-radius:16px!important}
 .settings-dialog>header{padding:12px!important;gap:8px!important}.settings-head-brand small{font-size:10px}.settings-header-user{display:none!important}.settings-close{margin-inline-start:auto}
 .settings-content{padding:16px!important}.settings-plans-grid{grid-template-columns:1fr!important}.settings-plan-tile{padding:18px!important}
 .settings-section-title{margin-bottom:18px!important}.settings-membership-body{gap:12px!important}.settings-layout nav button{font-size:11px!important}
}
@media(max-height:500px){.settings-dialog>header{padding:6px 12px!important}.settings-layout nav{max-height:100px!important}.settings-head-brand small{display:none}}
/* Balanced light surfaces and predictable model text layout. */
html[data-theme=light] body{background:var(--zy-bg)!important;color:var(--zy-text)!important}
html[data-theme=light] .chat-shell,html[data-theme=light] .chat-shell>main,html[data-theme=light] .chat-header{background:#f3f1ec!important}
html[data-theme=light] .chat-sidebar{background:#e9e6df!important;border-color:#d7d2c9!important}
html[data-theme=light] .chat-composer,html[data-theme=light] .settings-dialog,html[data-theme=light] .focused-model-menu,html[data-theme=light] .account-actions{background:#faf8f3!important;color:#292722!important;box-shadow:0 12px 36px #3b342214!important}
html[data-theme=light] .welcome-questions>button,html[data-theme=light] .settings-plan-tile{background:#f5f2ec!important;color:#292722!important;border-color:#d8d3c9!important}
html[data-theme=light] .chat-composer textarea{color:#292722!important}
html[data-theme=light] .chat-composer textarea::placeholder{color:#746f65!important}
html[data-theme=light] .settings-layout nav{background:#efebe4!important}
html[data-theme=light] .settings-overlay{background:#3b34224d!important}
html[data-theme=light] .settings-note,html[data-theme=light] .settings-bar-sub,html[data-theme=light] .focused-model-description,html[data-theme=light] .model-subscribe small{color:#625e56!important}
.focused-model-copy{display:flex!important;flex-direction:column;flex:1;min-width:0;gap:5px;text-align:start}
.focused-model-title{display:flex!important;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-start!important}
.focused-model-title strong{line-height:1.5;overflow-wrap:anywhere}
.focused-model-title small{margin-inline-start:auto;flex:none;line-height:1.5}
.focused-model-description{display:block!important;margin:0!important;line-height:1.7!important;white-space:normal!important;text-align:start;overflow-wrap:anywhere}
.focused-model-status{flex:0 0 20px;align-self:center}
.focused-model-heading>div>span{color:var(--zy-text2)!important;line-height:1.6}
.model-subscribe{display:flex!important;flex-direction:row!important;align-items:center!important;text-align:start!important;gap:12px!important;min-height:68px!important}
.model-subscribe>span:first-child{flex:1!important;min-width:0}.model-subscribe>span:last-child{flex:0 0 20px!important;text-align:center}
.model-subscribe strong{line-height:1.6!important}.model-subscribe small{line-height:1.8!important;white-space:normal;overflow-wrap:anywhere}
.settings-plan-jump{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.settings-plan-jump button{flex:1;min-height:44px}
.settings-plan-tile[data-plan=max],.settings-plan-tile[data-plan=max20]{border-color:var(--brand)!important;scroll-margin-top:12px}
.profile-photo{display:block;object-fit:cover;border-radius:50%;flex-shrink:0;border:1px solid rgba(var(--zy-veil),.15)}
.profile-photo-editor{display:flex;gap:18px;align-items:center;padding:18px;border:1px solid rgba(var(--zy-veil),.12);border-radius:16px;margin-bottom:20px}.profile-photo-editor>div{min-width:0;flex:1}.profile-photo-editor h3{margin-bottom:8px!important}.profile-photo-editor .settings-button{display:inline-flex;position:relative;align-items:center;margin:4px;min-height:44px;overflow:hidden}.profile-photo-editor input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.profile-photo-editor label:focus-within{outline:2px solid var(--brand);outline-offset:2px}@media(max-width:540px){.profile-photo-editor{flex-direction:column;text-align:center}}
.inline-message-editor{width:100%;padding:18px;border:1px solid var(--brand);border-radius:16px;background:rgb(var(--zy-solid));text-align:start}.inline-message-editor>p{font-size:12px;color:var(--zy-text2);line-height:1.7}.inline-message-editor textarea{box-sizing:border-box;width:100%;min-height:140px;max-height:50dvh;resize:vertical;background:var(--zy-bg);color:var(--zy-text);border:1px solid rgba(var(--zy-veil),.16);border-radius:10px;padding:12px;font:inherit;line-height:1.8}.inline-message-editor>div{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}.inline-message-editor button,.quota-notice button{min-height:44px;padding:10px 16px;border-radius:10px;border:1px solid rgba(var(--zy-veil),.18);background:transparent;color:var(--zy-text);cursor:pointer}.inline-message-editor button:first-child,.quota-notice button:first-child{background:var(--brand);color:white}.quota-notice{margin:8px auto;padding:16px;width:min(880px,calc(100% - 32px));box-sizing:border-box;border:1px solid rgba(var(--zy-veil),.18);border-radius:14px;background:rgb(var(--zy-solid));font-size:14px}.quota-notice p{font-size:12px;line-height:1.8;color:var(--zy-text2)}.quota-notice>div{display:flex;flex-wrap:wrap;gap:8px}
.code-preview iframe{width:100%!important;height:65dvh!important;min-height:360px!important;display:block;border:0!important;background:white}.preview-toolbar{flex-wrap:wrap!important}.preview-toolbar strong{overflow-wrap:anywhere;min-width:0}.code-card:fullscreen{background:rgb(var(--zy-solid));width:100vw;height:100dvh;overflow:auto;padding:12px;box-sizing:border-box}.code-card:fullscreen .code-workspace-layout{display:flex!important;flex-direction:column!important}.code-card:fullscreen .code-preview iframe{height:calc(100dvh - 180px)!important}.code-card:fullscreen .code-source{display:none!important}@media(max-width:850px){.code-workspace-layout{display:flex!important;flex-direction:column!important}.code-preview{width:100%!important;min-width:0!important}.code-preview iframe{min-height:320px!important}.inline-message-editor{padding:12px}.inline-message-editor>div{flex-wrap:wrap}}
