/* Shared custom controls, API guide and mobile ergonomics. */
.smart-select{display:inline-flex;min-width:0;max-width:100%;position:relative;vertical-align:middle}.select-source{display:none!important}.select-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;max-width:100%;width:100%;padding:10px 12px;border:1px solid #39393e;background:#1b1b1e;border-radius:10px;text-align:left;color:#d7d7dd;font-size:12px}.select-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.select-trigger>svg{width:14px;height:14px;flex:none}.select-trigger:hover,.select-trigger[aria-expanded=true]{background:#303034;border-color:#66666e}.setting-row .smart-select{min-width:150px}.model-config-grid .smart-select,.parameter-editor-grid .smart-select{width:100%}.chat-storage-control .select-trigger{font-size:10px;padding:6px 8px;border-color:transparent;background:transparent;max-width:132px}.model-option .select-trigger{font-size:11px}.select-overlay[open]{display:block;position:fixed;inset:0;max-width:none;max-height:none;width:100%;height:100%;margin:0;padding:0;background:transparent;border:0;border-radius:0;overflow:hidden;box-shadow:none;animation:none}.select-overlay::backdrop{background:transparent}.select-backdrop{position:absolute;inset:0;width:100%;height:100%;background:#0008;backdrop-filter:blur(3px)}.select-panel{position:absolute;max-height:min(520px,80dvh);display:flex;flex-direction:column;min-width:220px;background:#1b1b1d;border:1px solid #424246;border-radius:17px;padding:10px;box-shadow:0 24px 70px #0009;animation:panelIn .18s ease}.select-panel header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:4px 5px 9px;font-size:12px}.select-panel header>button{width:36px;height:36px;display:grid;place-items:center;border-radius:8px}.select-panel header>button:hover{background:#333}.select-search{display:flex;align-items:center;gap:8px;background:#101012;border:1px solid #38383e;border-radius:10px;padding:0 10px;margin:0 4px 8px}.select-search input{border:0;background:transparent;width:100%;outline:none;padding:11px 0}.select-options{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:3px}.select-options button{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px;text-align:left;padding:12px;border:1px solid transparent;border-radius:10px;color:#c9c9cf}.select-options button:hover,.select-options button:focus-visible{background:#2b2b30}.select-options button[aria-selected=true]{background:#36363b;border-color:#505057;color:white}.select-options button>span{overflow-wrap:anywhere;min-width:0}.select-options svg{width:16px}.select-empty{padding:20px;color:#999;text-align:center}.sheet-handle{display:none}.select-sheet-open{overflow:hidden}.rename-key-form{border-top:1px solid #35353b;padding-top:20px;margin-top:16px}.rename-key-form label{display:grid;gap:10px}.rename-key-form>div{display:flex;gap:10px;margin-top:14px}.usage-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.usage-summary article{padding:19px 15px;border:1px solid #34343a;border-radius:12px;background:#18181b;min-width:0}.usage-summary article>span{display:block;font-size:11px;color:#a0a0aa;margin-bottom:14px}.usage-summary strong{font-size:25px;font-weight:500}.usage-summary small{font-size:11px;color:#878792}.usage-limit-list{font-size:12px;line-height:1.8;color:#a6a6af}.limits-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}.limits-grid label{display:grid;gap:9px;font-size:12px;color:#b3b3bf}.limit-actions{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin-top:20px}.limit-actions [role=status]{font-size:12px;color:#aaa}.docs-connection{display:flex;align-items:center;gap:12px;padding:20px;border:1px solid #36363b;background:#17171a;border-radius:15px;margin-bottom:24px;flex-wrap:wrap}.docs-connection>div{flex:1;min-width:0}.docs-connection span{display:block;color:#92929d;font-size:11px;margin-bottom:9px}.docs-connection code{overflow-wrap:anywhere;font-size:13px}.docs-kind-tabs{margin-bottom:23px}.docs-kind-tabs button{display:flex;align-items:center;gap:8px}.docs-kind-tabs svg{width:15px;height:15px}.doc-model-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:36px}.doc-model{border:1px solid #35353c;background:#151518;border-radius:15px;min-width:0;overflow:hidden;transition:border-color .2s,background .2s}.doc-model.active{border-color:#88888f;background:#202024}.doc-model-select{display:flex;align-items:center;gap:12px;text-align:left;width:100%;padding:19px}.doc-model-select>span:nth-child(2){flex:1;min-width:0}.doc-model-select strong{display:block;font-size:14px;overflow-wrap:anywhere}.doc-model-select small{display:block;font-size:10px;color:#92929e;margin-top:7px}.doc-model-select>svg{width:16px}.doc-model-mark{display:grid;place-items:center;flex:none;width:38px;height:38px;border:1px solid #42424b;background:#29292e;border-radius:11px}.doc-model-id{border-top:1px solid #35353d;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 16px;background:#0002}.doc-model-id code{font-size:11px;overflow-wrap:anywhere;min-width:0}.doc-model-id button{display:flex;align-items:center;gap:6px;font-size:10px;flex-shrink:0;padding:8px 0}.doc-model-id svg{width:13px;height:13px}.docs-section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:26px 0 18px;flex-wrap:wrap}.docs-section-heading .eyebrow{margin-bottom:10px}.docs-section-heading h2{margin-bottom:0}.docs-code-card{border:1px solid #3e3e45;border-radius:15px;overflow:hidden;background:#101012}.docs-code-card>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 18px;background:#1c1c20;flex-wrap:wrap}.docs-code-card>header code{font-size:11px;overflow-wrap:anywhere;min-width:0}.docs-code-tabs{display:flex;gap:6px;border-bottom:1px solid #2b2b31;padding:10px 15px 0}.docs-code-tabs button{font-size:11px;color:#93939c;padding:10px 13px;border-bottom:2px solid transparent}.docs-code-tabs button.active{border-color:#eee;color:white}.docs-code-card pre,.docs-response pre{margin:0;padding:22px;overflow-x:auto;font-size:12px;line-height:1.9;tab-size:2}.docs-note{display:flex;align-items:flex-start;gap:12px;padding:20px 6px;color:#93939f;font-size:11px;line-height:1.9}.docs-note svg{width:16px;height:16px;margin-top:4px}.docs-note p{margin:0}.doc-param-list>div{display:grid;grid-template-columns:1fr 1fr 2fr 1fr;gap:15px;padding:16px 0;border-top:1px solid #33333a;font-size:11px;color:#ababba;align-items:start;overflow-wrap:anywhere}.doc-param-list code{color:#eee}.doc-param-list small{line-height:1.8}.docs-status{margin-top:26px;font-size:12px;line-height:1.9}.docs-status p{color:#a4a4af}.docs-status code{color:#e3e3e8}.docs-error-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:21px 0}.docs-error-grid span{display:flex;gap:13px;color:#9c9caa;align-items:center}.docs-error-grid code{flex-shrink:0;font-size:11px}.docs-response summary{cursor:pointer}.docs-response pre{padding:20px 0 0}.brand,.brand-symbol,.model-brand,.provider-mark{flex-shrink:0}.model-selector,#model-picker,#model-picker summary>span:nth-child(2){min-width:0}#model-picker summary strong{display:block;overflow:hidden;text-overflow:ellipsis}#model-picker>summary{min-width:0}.topbar .model-selector{max-width:100%}.table-actions{flex-wrap:wrap}.table-actions button{min-height:38px}.content-page{animation:arrive .25s ease}
@media(max-width:760px){input:not([type=checkbox]),textarea,.model-config-card input:not([type=checkbox]),.model-config-card textarea,.model-search input,.search-input input,.inline-create>input,.select-search input,.chat-input-box>textarea{font-size:16px!important}button,.quiet-button,.primary-button,.icon-button,.login-button{min-height:44px}.brand{width:max-content;max-width:100%;white-space:nowrap}.brand-symbol{width:32px;text-align:center}.sidebar{overflow-y:auto}.sidebar-bottom{padding-top:16px}.topbar{gap:9px;padding-left:12px;padding-right:12px}.mobile-menu{flex-shrink:0}.top-actions{flex:none;margin-left:auto;gap:0}.login-button{max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;padding:6px 11px}#header-context{min-width:0;flex:1}.chat-toolbar{min-width:0}.chat-toolbar-right{display:none}.model-brand{width:30px;height:30px}#model-picker>summary{gap:7px;padding:3px 0;min-height:44px}#model-picker summary strong{font-size:12px;max-width:100%}#model-picker summary>svg{margin-left:0;width:11px}.model-menu{position:fixed;top:auto;bottom:12px;left:12px;right:12px;width:auto;max-height:75dvh;overflow:auto;border-radius:20px;box-shadow:0 0 0 100vmax #000a,0 20px 80px #0009;animation:sheetIn .22s ease}.model-menu-list{max-height:48dvh;overscroll-behavior:contain}.model-menu-list button{min-height:64px}.model-menu-list button>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.select-panel.as-sheet{inset:auto 10px 10px;width:auto;max-height:75dvh;max-height:75svh;border-radius:22px;padding:10px 12px calc(12px + env(safe-area-inset-bottom));animation:sheetIn .22s ease}.as-sheet .sheet-handle{display:block;height:4px;width:34px;flex-shrink:0;background:#595960;border-radius:5px;align-self:center;margin:0 0 9px}.select-panel header{font-size:14px;padding:0 4px 9px}.select-options button{min-height:52px;font-size:14px;padding:14px 12px}.select-trigger{min-height:44px;font-size:12px}.chat-storage-control .select-trigger{min-height:44px;font-size:10px;max-width:140px}.chat-input-bottom{max-width:100%}.composer-bottom{flex-wrap:wrap;gap:7px}.workspace-options{max-width:100%;flex:1 1 100%}.chat-input-bottom{width:100%;justify-content:flex-end}.chat-input-box>textarea{padding:17px 16px 10px;min-height:94px}.control-popover>summary{min-height:44px}.choice-panel{position:fixed;left:10px;right:10px;bottom:10px;width:auto;max-height:75dvh;overflow-y:auto;z-index:80;box-shadow:0 0 0 100vmax #0009;animation:sheetIn .22s ease;padding:17px 13px calc(17px + env(safe-area-inset-bottom))}.ratio-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.ratio-choice{min-height:78px}.value-choice{min-height:52px}#chat-send{width:44px;height:44px;flex:none}.creation-mode-switch button{min-height:40px}.inline-create{flex-wrap:wrap}.inline-create>input{flex:1 1 100%;width:100%}.inline-create>button{flex:1}.account-tabs{display:flex}.account-tabs button{flex:1;padding:9px 6px}.usage-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.usage-summary article{padding:16px 11px}.usage-summary strong{font-size:22px}.usage-summary small{font-size:10px}.limits-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 10px}.limits-grid input{width:100%;min-width:0}.setting-row .smart-select{width:100%}.rename-key-form>div{flex-wrap:wrap}.table-actions button{padding:8px 11px;background:#26262c;border:1px solid #42424b;border-radius:8px;font-size:11px}.responsive-table .table-actions{justify-content:flex-start;gap:8px}.docs-page .page-heading{flex-wrap:wrap;gap:17px}.docs-page .page-heading>a{width:100%}.docs-connection{padding:16px;gap:10px}.docs-connection>div{flex-basis:100%;margin-bottom:4px}.docs-connection>.quiet-button,.docs-connection>.primary-button{flex:1;padding:9px 8px;font-size:11px}.docs-kind-tabs{display:flex;flex-wrap:nowrap;gap:2px}.docs-kind-tabs button{flex:1;justify-content:center;padding:9px 5px;font-size:11px;gap:5px}.doc-model-grid{grid-template-columns:minmax(0,1fr);gap:12px}.doc-model-select{padding:16px}.docs-code-card>header{padding:13px;gap:10px}.docs-code-card>header code{flex-basis:100%;font-size:10px}.docs-code-card>header button{width:100%}.docs-code-card pre,.docs-response pre{font-size:11px;padding:15px;max-width:100%;line-height:1.9}.docs-code-tabs{padding-left:8px}.doc-param-list>div{grid-template-columns:1fr 1fr;gap:8px;font-size:11px}.doc-param-list small{grid-column:1/-1;order:4}.docs-error-grid{grid-template-columns:minmax(0,1fr)}.docs-note{font-size:11px}.model-reference-protocol{flex-wrap:wrap}.model-reference-protocol .smart-select{width:100%}.parameter-template-row>.smart-select{flex:1 1 100%}.admin-sidebar .brand-symbol{width:30px}.admin-sidebar nav a{min-height:44px}.admin-topbar{font-size:10px}.admin-topbar>a{font-size:10px;min-height:44px;display:flex;align-items:center}.admin-body{padding-bottom:40px}.chat-page{padding-bottom:env(safe-area-inset-bottom,12px)}}
@keyframes sheetIn{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.select-panel,.model-menu,.choice-panel,.content-page{animation:none!important}}

@media(max-width:760px){.chat-storage-control{display:flex;margin-right:auto;min-width:0}.model-brand{display:flex}#model-picker summary>span:nth-child(2){flex:1}.chat-storage-control .smart-select{max-width:150px}.model-search input{font-size:16px}.model-menu-list button{min-width:0}}

/* Keep the empty workspace focused on its title and composer. */
.chat-page:not(.has-messages){justify-content:center;padding-top:84px;padding-bottom:64px}
.chat-page:not(.has-messages) .workspace-banner{position:absolute;top:0;left:34px;right:34px}
.chat-page:not(.has-messages) .chat-content{flex:0;min-height:0;padding:0}
.chat-page:not(.has-messages) .chat-welcome{padding:0 0 32px}
.chat-page:not(.has-messages) .chat-welcome h1{margin-bottom:0}
.chat-page:not(.has-messages) .chat-composer-dock{width:100%;max-width:760px;align-self:center;padding:0}
@media(max-width:760px){.chat-page:not(.has-messages){padding-top:80px;padding-bottom:calc(40px + env(safe-area-inset-bottom))}.chat-page:not(.has-messages) .workspace-banner{left:17px;right:17px}.chat-page:not(.has-messages) .chat-welcome{padding-bottom:27px}.chat-page:not(.has-messages) .welcome-symbol{margin-bottom:18px}}

.reference-heading{display:flex;justify-content:space-between;align-items:center;margin:4px 0 10px;font-size:11px;color:#a5a5ae}
.reference-heading>span:last-child{font-variant-numeric:tabular-nums;color:#80808b}
.reference-gallery{display:flex;gap:10px;flex-wrap:wrap;padding-bottom:5px}
.reference-tile{position:relative;margin:0;width:108px;height:108px;border:1px solid #48484f;border-radius:13px;overflow:hidden;background:#111114;flex:none;animation:panelIn .18s ease}
.reference-tile>img{display:block;width:100%;height:100%;object-fit:cover}
.reference-tile>figcaption{position:absolute;inset:auto 0 0;padding:13px 7px 6px;font-size:10px;color:white;background:linear-gradient(transparent,#000b)}
.reference-tile>button{position:absolute;top:4px;right:4px;width:30px;height:30px;min-height:30px;border-radius:50%;background:#111d;border:1px solid #ffffff40;color:white;display:grid;place-items:center}
.reference-tile>button svg{width:14px;height:14px}.reference-tile.loading>img{opacity:.5}.reference-tile.loading:after{content:'';position:absolute;inset:0;pointer-events:none;animation:breathe 1s infinite;background:#ffffff12}
.reference-add-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;width:108px;height:108px;border:1px dashed #565660;border-radius:13px;color:#a4a4af;background:#222225;flex:none;font-size:11px}
.reference-add-tile:hover{background:#303036;border-color:#aaa}.reference-add-tile>svg{width:22px;height:22px}
.model-reference-protocol{flex-wrap:wrap}.model-reference-protocol>span{display:flex;align-items:center;gap:8px}
@media(max-width:760px){.reference-gallery{gap:8px}.reference-tile,.reference-add-tile{width:calc((100% - 16px)/3);height:auto;aspect-ratio:1;min-height:0}.reference-tile>button{width:36px;height:36px;min-height:36px;top:1px;right:1px}.reference-tile>figcaption{font-size:9px;padding:13px 5px 5px}.reference-add-tile{font-size:10px;gap:6px}.reference-add-tile>svg{width:19px;height:19px}}
