:root{color-scheme:light;--font-scale:1;--link:var(--accent);--bg:#f8f7f4;--sidebar:#eeede8;--surface:#fffefa;--text:#292e29;--muted:#83857b;--line:#dfdfd6;--accent:#285e49;--accent-soft:#e3e9dc;--hover:#e5e5dc;--danger:#ac4540;--shadow:0 6px 28px #242d2710;--serif:Georgia,'Times New Roman',serif;--sans:'Segoe UI',Arial,sans-serif}
*{box-sizing:border-box}body{margin:0;font-family:var(--sans);font-size:calc(14px * var(--font-scale, 1));background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer}button{border:0;background:none}button:disabled{cursor:default;opacity:.45}a{color:inherit}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}input:focus,textarea:focus{outline:none}input:focus-visible{box-shadow:0 0 0 2px var(--accent-soft);border-color:var(--accent)}svg{width:20px;height:20px;flex-shrink:0}button svg{pointer-events:none}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.app-shell{display:flex;height:100dvh;overflow:hidden}.sidebar{width:274px;flex-shrink:0;display:flex;flex-direction:column;padding:28px 18px 0;border-right:1px solid var(--line);background:var(--sidebar);z-index:30}.brand-row{display:flex;align-items:center;justify-content:space-between;margin:0 7px 31px}.brand{font-size:calc(29px * var(--font-scale, 1));font-weight:650;letter-spacing:-1.8px;text-decoration:none;display:inline-flex;align-items:center;gap:9px}.brand img{border-radius:9px}.brand-dot{color:var(--accent);margin-left:-9px}.icon-button{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;color:var(--muted);flex-shrink:0}.icon-button:hover{background:var(--hover);color:var(--text)}.new-chat{height:44px;display:flex;align-items:center;gap:10px;padding:0 13px;background:var(--accent);color:var(--bg);border-radius:8px;font-weight:550;transition:filter .15s}.new-chat:hover{filter:brightness(1.1)}.new-chat span{margin-left:auto;font-size:calc(11px * var(--font-scale, 1));font-weight:400;opacity:.65;border:1px solid #ffffff40;border-radius:4px;padding:2px 5px}.search-field{display:flex;align-items:center;gap:10px;margin:20px 6px 26px;color:var(--muted)}.search-field svg{width:17px;height:17px}.search-field input{width:100%;min-width:0;border:0;color:var(--text);background:transparent;font-size:calc(12px * var(--font-scale, 1));padding:5px 0}.search-field input::placeholder{color:var(--muted)}.history-heading{padding:0 11px;display:flex;justify-content:space-between;font-size:calc(10px * var(--font-scale, 1));letter-spacing:1.5px;color:var(--muted);font-weight:600;margin-bottom:12px}.history-heading span{letter-spacing:0}.chat-list{overflow-y:auto;flex:1;min-height:50px}.history-empty{padding:23px 15px;color:var(--muted);font-size:calc(12px * var(--font-scale, 1));line-height:1.8;text-align:center}.history-empty svg{display:block;margin:0 auto 10px;width:24px;height:24px;opacity:.65}.chat-group-label{font-size:calc(10px * var(--font-scale, 1));color:var(--muted);padding:17px 11px 8px}.chat-item{display:flex;align-items:center;border-radius:7px;margin:3px 0;padding-right:4px}.chat-item:hover,.chat-item.active{background:var(--hover)}.chat-item.active{color:var(--accent)}.chat-select{display:flex;gap:10px;align-items:center;text-align:left;padding:11px 9px;width:100%;min-width:0;font-size:calc(12px * var(--font-scale, 1))}.chat-select svg{width:16px;height:16px;opacity:.65}.chat-select span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-item .icon-button{width:26px;height:28px;opacity:0}.chat-item:hover .icon-button,.chat-item:focus-within .icon-button,.chat-item.active .icon-button{opacity:1}.sidebar-bottom{padding-top:15px}.workspace-note{display:flex;gap:9px;border:1px solid var(--line);border-radius:9px;padding:13px 11px;margin-bottom:14px;font-size:calc(11px * var(--font-scale, 1));align-items:flex-start}.connection-dot{display:inline-block;width:6px;height:6px;flex-shrink:0;background:#789d66;border-radius:50%;margin-top:5px;box-shadow:0 0 0 3px #789d6615}.workspace-note small{display:block;color:var(--muted);font-size:calc(9px * var(--font-scale, 1));margin-top:6px}.sidebar-action{display:flex;gap:11px;align-items:center;width:100%;padding:10px 9px;font-size:calc(12px * var(--font-scale, 1));border-radius:6px;text-align:left;color:var(--muted)}.sidebar-action:hover{background:var(--hover);color:var(--text)}.sidebar-action svg{width:17px;height:17px}.sidebar-action .small-icon{margin-left:auto;width:13px;height:13px}.account{display:flex;gap:10px;align-items:center;border-top:1px solid var(--line);margin-top:12px;padding:18px 3px 22px;font-size:calc(12px * var(--font-scale, 1))}.avatar{width:32px;height:32px;border:1px solid #b5bdaa;background:#e1e4d7;color:#536047;display:grid;place-items:center;border-radius:50%;font-family:var(--serif);font-size:calc(15px * var(--font-scale, 1))}.account small{display:block;font-size:calc(10px * var(--font-scale, 1));color:var(--muted);margin-top:4px}.account .icon-button{margin-left:auto}.main-panel{flex:1;display:flex;flex-direction:column;min-width:0;position:relative}.topbar{height:83px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 35px;border-bottom:1px solid var(--line);gap:14px}.topbar-left,.topbar-right{display:flex;align-items:center;gap:15px;min-width:0}.model-button{display:flex;align-items:center;gap:9px;font-weight:600;font-size:calc(14px * var(--font-scale, 1));padding:7px 5px;border-radius:7px;white-space:nowrap}.model-button:hover{background:var(--hover)}.model-button>svg{width:15px;height:15px;color:var(--muted);margin-left:4px}.model-symbol{display:inline-grid;place-items:center;width:27px;height:27px;border-radius:50%;font-size:calc(25px * var(--font-scale, 1));font-weight:400}.green{color:#428368}.orange{color:#b67757}.blue{color:#6680bd}.purple{color:#927eb3}.mode-badge{font-size:calc(9px * var(--font-scale, 1));letter-spacing:.5px;border:1px solid var(--line);border-radius:4px;padding:4px 6px;color:var(--muted);white-space:nowrap}.private-label{display:flex;align-items:center;gap:6px;font-size:calc(11px * var(--font-scale, 1));color:var(--muted)}.private-label svg{width:14px;height:14px}.topbar-right>.icon-button{margin-left:12px}#openSidebar{display:none}.conversation{flex:1;min-height:0;overflow-y:auto;scroll-behavior:auto;overflow-anchor:none;padding:20px 32px}.welcome{max-width:730px;margin:auto;padding:clamp(30px,7vh,83px) 0 32px;text-align:center}.welcome-mark{width:66px;height:66px;margin:0 auto 25px;color:var(--accent);transform:rotate(8deg)}.welcome-mark svg{width:100%;height:100%;stroke:currentColor;stroke-width:3.6;stroke-linecap:round}.eyebrow{font-size:calc(9px * var(--font-scale, 1));letter-spacing:2px;font-weight:600;color:var(--muted)}.welcome h1{font-family:var(--serif);font-size:calc(51px * var(--font-scale, 1));font-weight:400;letter-spacing:-1.7px;margin:18px 0 14px}.welcome>p{font-size:calc(14px * var(--font-scale, 1));color:var(--muted);line-height:1.8;margin:0}.suggestions{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin-top:37px}.suggestion{text-align:left;position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:17px 15px 24px;transition:transform .15s,box-shadow .15s;min-height:147px}.suggestion:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:var(--accent)}.suggestion-icon{width:29px;height:29px;display:grid;place-items:center;border-radius:7px;margin-bottom:16px}.suggestion-icon svg{width:17px;height:17px}.terracotta{background:#f5e9e0;color:#b07856}.sage{background:#e7eddf;color:#6d8761}.gold{background:#f4eedb;color:#ae9552}.lavender{background:#ede8f0;color:#9680a2}.suggestion strong{font-size:calc(11px * var(--font-scale, 1));font-weight:600;white-space:nowrap}.suggestion>span:not(.suggestion-icon):not(.card-arrow){font-size:calc(10px * var(--font-scale, 1));color:var(--muted);line-height:1.6;margin-top:7px;max-width:125px}.suggestion .card-arrow{position:absolute;bottom:10px;right:12px;color:var(--muted);font-size:calc(15px * var(--font-scale, 1))}.models-note{display:flex;align-items:center;justify-content:center;margin-top:25px;font-size:calc(10px * var(--font-scale, 1));color:var(--muted);gap:0}.mini-model{width:23px;height:23px;border-radius:50%;border:2px solid var(--bg);background:var(--sidebar);font-size:calc(17px * var(--font-scale, 1));margin-left:-5px;display:grid;place-items:center}.models-note>span:nth-last-child(2){margin-left:9px}.models-note button{font-size:calc(10px * var(--font-scale, 1));color:var(--accent);margin-left:14px}.models-note button span{margin-left:4px}.composer-area{width:100%;max-width:816px;align-self:center;padding:12px 32px 24px}.composer{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:17px 16px 10px;box-shadow:var(--shadow);transition:border-color .15s}.composer:focus-within{border-color:var(--accent)}.composer.drag-over{border:2px dashed var(--accent);background:var(--accent-soft)}.composer textarea{width:100%;resize:none;min-height:42px;max-height:180px;background:transparent;border:0;color:var(--text);line-height:1.6;padding:1px 5px 10px;font-size:calc(14px * var(--font-scale, 1))}.composer textarea::placeholder{color:var(--muted)}.composer-toolbar{display:flex;justify-content:space-between;align-items:center}.composer-tools,.send-group{display:flex;gap:9px;align-items:center}.composer-tools .icon-button{width:30px;height:30px}.composer-hint{font-size:calc(10px * var(--font-scale, 1));color:var(--muted)}.keyboard-hint{font-size:calc(9px * var(--font-scale, 1));color:var(--muted);margin-right:5px}.send-button{background:var(--accent);color:var(--bg);width:34px;height:34px;border-radius:9px;display:grid;place-items:center}.send-button:hover:not(:disabled){filter:brightness(1.15)}.send-button:disabled{opacity:1;background:var(--accent-soft);color:var(--muted)}.send-button svg{width:20px;height:20px}.composer-footer{display:flex;justify-content:space-between;gap:12px;font-size:calc(9px * var(--font-scale, 1));color:var(--muted);padding:12px 4px 0}.composer-error,.notice{border:1px solid var(--danger);background:color-mix(in srgb,var(--danger) 12%,var(--bg));color:var(--danger);border-radius:8px;padding:10px 13px;font-size:calc(12px * var(--font-scale, 1));margin-bottom:10px}.notice{margin:8px 25px 0}.attachments{display:flex;gap:9px;flex-wrap:wrap}.attachment{width:66px;height:66px;position:relative;margin-bottom:14px}.attachment img{width:100%;height:100%;object-fit:cover;border-radius:8px;border:1px solid var(--line)}.attachment button{position:absolute;right:-6px;top:-6px;width:20px;height:20px;border-radius:50%;background:var(--text);color:var(--bg);display:grid;place-items:center}.attachment svg{width:13px;height:13px}.messages{max-width:730px;margin:0 auto;padding:20px 0}.message{margin-bottom:32px;animation:appear .2s ease}.message-header{display:flex;align-items:center;gap:9px;margin-bottom:13px;font-size:calc(12px * var(--font-scale, 1));font-weight:600}.message-header>img{width:25px;height:25px;border-radius:7px}.message-header .avatar{width:25px;height:25px;font-size:calc(12px * var(--font-scale, 1))}.message-time{font-size:calc(9px * var(--font-scale, 1));color:var(--muted);font-weight:400;margin-left:4px}.message-body{line-height:1.85;font-size:calc(14px * var(--font-scale, 1));overflow-wrap:anywhere}.message.user{display:flex;flex-direction:column;align-items:flex-end}.message.user .message-body{white-space:pre-wrap;background:var(--hover);padding:13px 19px;border-radius:14px 3px 14px 14px;max-width:85%}.message.user .message-header{display:none}.message-body p{margin:0 0 14px}.message-body p:last-child{margin-bottom:0}.message-body h1,.message-body h2,.message-body h3{line-height:1.4;margin:24px 0 12px;font-weight:600}.message-body h1{font-size:calc(23px * var(--font-scale, 1))}.message-body h2{font-size:calc(20px * var(--font-scale, 1))}.message-body h3{font-size:calc(17px * var(--font-scale, 1))}.message-body pre{background:var(--sidebar);border:1px solid var(--line);border-radius:8px;padding:15px;overflow:auto;white-space:pre;font-size:calc(12px * var(--font-scale, 1));max-width:100%}.message-body code{font-family:Consolas,monospace;font-size:.9em;background:var(--sidebar);padding:2px 4px;border-radius:4px}.message-body pre code{padding:0}.message-body blockquote{border-left:3px solid var(--accent);margin-left:0;padding-left:16px;color:var(--muted)}.message-body table{display:block;overflow:auto;border-collapse:collapse;max-width:100%}.message-body th,.message-body td{border:1px solid var(--line);padding:8px 12px;text-align:left}.message-body a{color:var(--link);text-underline-offset:3px}.message-body img{max-width:100%;border-radius:8px}.message-images{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.message-images img{max-width:220px;max-height:200px;border-radius:10px;object-fit:contain;border:1px solid var(--line)}.message-actions{display:flex;align-items:center;gap:3px;margin-top:12px}.message-actions .icon-button{width:28px;height:28px}.message-actions svg{width:15px;height:15px}.message-status{color:var(--muted);font-size:calc(11px * var(--font-scale, 1));line-height:1.5;margin-top:10px}.thinking{display:inline-flex;align-items:center;gap:6px;font-size:calc(12px * var(--font-scale, 1));color:var(--muted)}.thinking:before{content:'';width:7px;height:7px;border-radius:50%;background:var(--accent);animation:pulse 1s infinite}.dialog{width:460px;max-width:calc(100vw - 32px);border:1px solid var(--line);border-radius:17px;padding:28px;background:var(--bg);color:var(--text);box-shadow:0 20px 100px #0003;max-height:85dvh;overflow:auto}.dialog::backdrop{background:#17201955;backdrop-filter:blur(4px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px}.dialog h2{font-family:var(--serif);font-weight:400;font-size:calc(26px * var(--font-scale, 1));margin:7px 0}.muted{color:var(--muted);font-size:calc(12px * var(--font-scale, 1));line-height:1.7}.model-list{display:flex;flex-direction:column;gap:8px;margin-top:22px}.model-option{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid var(--line);border-radius:9px;padding:14px}.model-option:hover{background:var(--hover)}.model-option.selected{border-color:var(--accent);background:var(--accent-soft)}.model-option .model-symbol{width:35px;height:35px;font-size:calc(30px * var(--font-scale, 1))}.model-option strong{display:block;font-size:calc(13px * var(--font-scale, 1))}.model-option small{display:block;font-size:calc(11px * var(--font-scale, 1));color:var(--muted);margin-top:5px;line-height:1.5}.model-option .vision-label{margin-left:auto;font-size:calc(9px * var(--font-scale, 1));color:var(--muted);white-space:nowrap;display:flex;align-items:center;gap:4px}.vision-label svg{width:14px;height:14px}.dialog-footnote{font-size:calc(11px * var(--font-scale, 1));color:var(--muted);line-height:1.7;margin:20px 0 0}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 0;border-bottom:1px solid var(--line)}.setting-row strong{font-size:calc(12px * var(--font-scale, 1));font-weight:600}.setting-row small{display:block;font-size:calc(11px * var(--font-scale, 1));color:var(--muted);line-height:1.7;margin-top:5px}.info-box{background:var(--accent-soft);border-radius:8px;padding:13px;font-size:calc(12px * var(--font-scale, 1));line-height:1.8;overflow-wrap:anywhere}.secondary-button{border:1px solid var(--line);border-radius:7px;padding:8px 10px;font-size:calc(11px * var(--font-scale, 1));white-space:nowrap}.primary-button{display:flex;justify-content:center;align-items:center;gap:20px;background:var(--accent);color:var(--bg);padding:13px 18px;border-radius:8px;width:100%;font-weight:550;font-size:calc(13px * var(--font-scale, 1))}.primary-button:hover{filter:brightness(1.1)}.text-input{width:100%;background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:13px;color:var(--text);margin:8px 0 16px}.dialog label{font-size:calc(12px * var(--font-scale, 1))}.danger-zone{border-top:1px solid var(--line);margin-top:24px;padding-top:15px}.danger-zone p{color:var(--muted);font-size:calc(11px * var(--font-scale, 1));line-height:1.7}.danger-button{color:var(--danger);border:1px solid var(--danger);border-radius:6px;padding:9px 12px;font-size:calc(12px * var(--font-scale, 1))}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--bg);border-radius:9px;padding:13px 20px;box-shadow:var(--shadow);font-size:calc(12px * var(--font-scale, 1));max-width:90vw;z-index:100;text-align:center}.login-page{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px;background:radial-gradient(ellipse at 50% 45%,#e7eadb66,transparent 65%),var(--bg)}.login-brand{position:absolute;top:32px;left:38px}.login-card{width:100%;max-width:395px;text-align:center;padding:40px 0}.login-icon{width:60px;height:60px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);border-radius:18px;margin:0 auto 26px}.login-icon svg{width:30px;height:30px}.login-card h1{font-family:var(--serif);font-size:calc(37px * var(--font-scale, 1));letter-spacing:-1px;font-weight:400;margin:17px 0}.login-card>p{font-size:calc(13px * var(--font-scale, 1));color:var(--muted);line-height:1.8;margin-bottom:33px}.login-card form{text-align:left}.login-card label{font-size:calc(11px * var(--font-scale, 1));font-weight:600}.login-card .primary-button{margin-top:4px;justify-content:space-between;padding:15px 18px}.login-note{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:24px;font-size:calc(10px * var(--font-scale, 1));color:var(--muted)}.login-note svg{width:13px;height:13px}.login-footer{position:absolute;bottom:30px;color:var(--muted);font-size:calc(10px * var(--font-scale, 1))}.login-error{color:var(--danger);font-size:calc(12px * var(--font-scale, 1));line-height:1.6;margin:0 0 12px}.sidebar-collapsed .sidebar{display:none}.sidebar-collapsed #openSidebar{display:flex}.sidebar-backdrop{position:fixed;inset:0;background:#18221c55;z-index:25}.standalone-icon{color:var(--muted)}
svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.multi-button{display:flex;align-items:center;gap:5px;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:8px;font-size:calc(11px * var(--font-scale, 1));color:var(--accent);background:var(--accent-soft);white-space:nowrap}.multi-button svg{width:15px;height:15px}.multi-button:hover:not(:disabled){border-color:var(--accent)}.multi-model-names{padding:0;list-style:none;font-size:calc(13px * var(--font-scale, 1));color:var(--text)}.multi-model-option{display:flex;align-items:center;gap:12px;padding:12px;margin:6px 0;border:1px solid var(--line);border-radius:8px;cursor:pointer}.multi-model-option:hover{background:var(--hover)}.multi-model-option:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}.multi-model-option input{width:18px;height:18px;margin:0;flex-shrink:0;accent-color:var(--accent)}.multi-model-option input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.dialog-actions .primary-button{width:auto}.multi-progress{border:1px solid var(--line);border-radius:11px;padding:11px;background:var(--surface);margin-bottom:10px}.multi-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:calc(11px * var(--font-scale, 1));margin-bottom:9px}.multi-progress-heading span{font-size:calc(10px * var(--font-scale, 1));color:var(--muted)}.multi-jobs{display:flex;gap:6px;flex-wrap:wrap}.multi-job{display:flex;flex:1 1 130px;align-items:center;justify-content:space-between;gap:7px;padding:8px;border:1px solid var(--line);border-radius:7px;text-align:left;font-size:calc(10px * var(--font-scale, 1))}.multi-job.selected{border-color:var(--accent);background:var(--accent-soft)}.multi-job span{font-size:calc(9px * var(--font-scale, 1));color:var(--muted)}.multi-job[data-status=error] span{color:var(--danger)}
@media(max-width:430px){.composer-hint{display:none}.multi-job{flex-basis:42%}.dialog-actions{flex-wrap:wrap}.dialog-actions button{min-height:40px}}
@keyframes appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}@keyframes pulse{50%{opacity:.35}}
@media(min-width:1500px){.welcome{max-width:780px}.welcome h1{font-size:calc(58px * var(--font-scale, 1))}.suggestion{min-height:160px;padding:20px 18px}.suggestion strong{font-size:calc(12px * var(--font-scale, 1))}.suggestion>span:not(.suggestion-icon):not(.card-arrow){font-size:calc(11px * var(--font-scale, 1))}.composer-area{max-width:866px}}
@media(max-height:800px) and (min-width:901px){.welcome{padding-top:25px}.welcome-mark{width:48px;height:48px;margin-bottom:15px}.welcome h1{font-size:calc(44px * var(--font-scale, 1));margin:12px 0}.suggestions{margin-top:25px}.suggestion{min-height:136px}.models-note{margin-top:20px}.topbar{height:70px}.composer-area{padding-bottom:16px}}
@media(max-width:1100px){.sidebar{width:245px;padding-inline:14px}.topbar{padding-inline:23px}.topbar-left{gap:7px}.private-label{display:none}.suggestions{grid-template-columns:repeat(2,1fr);gap:10px}.suggestion{min-height:116px;padding:14px 15px}.suggestion-icon{margin-bottom:10px}.suggestion>span:not(.suggestion-icon):not(.card-arrow){max-width:none}.welcome{max-width:540px;padding-top:24px}.welcome h1{font-size:calc(43px * var(--font-scale, 1))}.welcome-mark{width:45px;height:45px;margin-bottom:19px}.models-note>span:nth-last-child(2){font-size:calc(9px * var(--font-scale, 1))}.models-note button{margin-left:6px}.keyboard-hint{display:none}.composer-area{padding-inline:24px}.composer-footer{font-size:calc(8px * var(--font-scale, 1))}}
@media(max-width:760px){.sidebar{position:fixed;inset:0 auto 0 0;width:280px;transform:translateX(-100%);transition:transform .2s}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-collapsed .sidebar{display:flex}#openSidebar{display:flex}.topbar{height:66px;padding:0 15px}.topbar-left{gap:8px}.topbar-right>.icon-button{margin:0}.mode-badge{font-size:calc(8px * var(--font-scale, 1));padding:3px 4px}.model-button{font-size:calc(12px * var(--font-scale, 1));gap:5px}.model-button .model-symbol{width:21px;font-size:calc(21px * var(--font-scale, 1))}.conversation{padding:10px 20px}.welcome{padding:25px 0 22px;max-width:460px}.welcome .eyebrow{font-size:calc(8px * var(--font-scale, 1));letter-spacing:1.4px}.welcome h1{font-size:calc(40px * var(--font-scale, 1));margin-top:17px}.welcome>p{font-size:calc(12px * var(--font-scale, 1))}.welcome-mark{width:43px;height:43px;margin-bottom:23px}.suggestions{margin-top:28px}.suggestion{min-height:124px}.suggestion strong{font-size:calc(11px * var(--font-scale, 1))}.models-note{flex-wrap:wrap;row-gap:12px;font-size:calc(9px * var(--font-scale, 1));margin-top:22px}.models-note button{font-size:calc(9px * var(--font-scale, 1))}.composer-area{padding:10px 14px max(14px,env(safe-area-inset-bottom))}.composer{border-radius:13px;padding:13px 11px 9px}.composer textarea{font-size:calc(16px * var(--font-scale, 1))}.composer-footer{justify-content:center;font-size:calc(8px * var(--font-scale, 1))}.composer-footer>span:first-child{display:none}.messages{padding-top:18px}.message-body{font-size:calc(14px * var(--font-scale, 1))}.message.user .message-body{max-width:94%}.message-images img{max-width:180px}.chat-item .icon-button{opacity:1}.dialog{padding:23px}.login-brand{top:24px;left:24px}.login-card{max-width:350px}.chat-list{min-height:80px}.composer-hint{font-size:calc(9px * var(--font-scale, 1))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Paint the viewport itself, including the areas outside the app content. */
html { background: #f8f7f4; color-scheme: light; }
html[data-theme=dark] { background: var(--bg); color-scheme: dark; }
html[data-theme=dark] body.login-page { background: var(--bg); }
.app-shell { padding-top: env(safe-area-inset-top, 0px); }

/* Neutral dark workspace, with the surface hierarchy and spacing of ChatGPT. */
html[data-theme=dark] {
  --bg: #212121;
  --sidebar: #171717;
  --surface: #303030;
  --text: #ececec;
  --muted: #b4b4b4;
  --line: #424242;
  --accent: #f3f3f3;
  --accent-soft: #383838;
  --hover: #2f2f2f;
  --danger: #ff9696;
  --shadow: none;
  --serif: var(--sans);
}
html[data-theme=dark] body { font-size: calc(15px * var(--font-scale, 1)); }
html[data-theme=dark] body .sidebar { width: 260px; padding: 20px 12px 0; border-right: 0; }
html[data-theme=dark] body .brand-row { margin: 0 8px 24px; }
html[data-theme=dark] body .brand { font-size: calc(27px * var(--font-scale, 1)); letter-spacing: -1px; }
html[data-theme=dark] body :is(.brand img, .message-header>img) { filter: grayscale(1) brightness(1.7); }
html[data-theme=dark] body .new-chat { background: transparent; color: var(--text); font-size: calc(14px * var(--font-scale, 1)); border-radius: 10px; }
html[data-theme=dark] body .new-chat:hover { background: var(--hover); filter: none; }
html[data-theme=dark] body .new-chat span { color: var(--muted); border-color: var(--line); opacity: 1; }
html[data-theme=dark] body .search-field { margin: 15px 12px 25px; }
html[data-theme=dark] body .search-field input { font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .history-heading { font-size: calc(10px * var(--font-scale, 1)); letter-spacing: .7px; }
html[data-theme=dark] body .history-empty { font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .chat-group-label { font-size: calc(12px * var(--font-scale, 1)); padding-top: 18px; }
html[data-theme=dark] body .chat-item { border-radius: 10px; margin-block: 2px; }
html[data-theme=dark] body .chat-select { font-size: calc(14px * var(--font-scale, 1)); padding: 11px 10px; }
html[data-theme=dark] body .chat-item.active { background: var(--surface); color: var(--text); }
html[data-theme=dark] body .workspace-note { border: 0; background: var(--sidebar); font-size: calc(11px * var(--font-scale, 1)); padding: 13px 10px; }
html[data-theme=dark] body .workspace-note small { font-size: calc(10px * var(--font-scale, 1)); line-height: 1.5; }
html[data-theme=dark] body .connection-dot { background: var(--muted); box-shadow: none; }
html[data-theme=dark] body .sidebar-action { font-size: calc(13px * var(--font-scale, 1)); color: var(--text); border-radius: 10px; }
html[data-theme=dark] body .account { border-color: var(--surface); font-size: calc(13px * var(--font-scale, 1)); padding-bottom: 18px; }
html[data-theme=dark] body .account small { font-size: calc(11px * var(--font-scale, 1)); }
html[data-theme=dark] body .avatar { background: var(--line); border-color: var(--line); color: var(--text); font-family: var(--sans); }
html[data-theme=dark] body .icon-button { color: var(--muted); border-radius: 50%; }
html[data-theme=dark] body .icon-button:hover { color: var(--text); background: var(--hover); }
html[data-theme=dark] body .topbar { height: 68px; padding-inline: 26px; border-bottom: 0; }
html[data-theme=dark] body .model-button { font-size: calc(18px * var(--font-scale, 1)); font-weight: 600; padding: 8px; border-radius: 10px; }
html[data-theme=dark] body .model-symbol { color: var(--muted); }
html[data-theme=dark] body .mode-badge { font-size: calc(10px * var(--font-scale, 1)); border-color: var(--line); border-radius: 6px; }
html[data-theme=dark] body .private-label { font-size: calc(12px * var(--font-scale, 1)); }
html[data-theme=dark] body .welcome { padding-top: clamp(38px, 13vh, 130px); max-width: 760px; }
html[data-theme=dark] body :is(.welcome-mark, .welcome>.eyebrow) { display: none; }
html[data-theme=dark] body .welcome h1 { font-family: var(--sans); font-size: calc(34px * var(--font-scale, 1)); font-weight: 600; letter-spacing: -.8px; margin: 0 0 16px; }
html[data-theme=dark] body .welcome>p { font-size: calc(15px * var(--font-scale, 1)); line-height: 1.65; }
html[data-theme=dark] body .suggestions { gap: 12px; margin-top: 32px; }
html[data-theme=dark] body .suggestion { background: transparent; border-color: var(--line); border-radius: 16px; padding: 18px 15px; min-height: 144px; }
html[data-theme=dark] body .suggestion:hover { transform: none; background: var(--hover); border-color: var(--line); box-shadow: none; }
html[data-theme=dark] body .suggestion-icon { background: transparent; color: var(--muted); width: 24px; height: 24px; margin-bottom: 17px; }
html[data-theme=dark] body .suggestion-icon svg { width: 20px; height: 20px; }
html[data-theme=dark] body .suggestion strong { font-size: calc(13px * var(--font-scale, 1)); font-weight: 500; white-space: normal; }
html[data-theme=dark] body .suggestion>span:not(.suggestion-icon):not(.card-arrow) { font-size: calc(11px * var(--font-scale, 1)); max-width: none; line-height: 1.6; }
html[data-theme=dark] body .models-note { font-size: calc(12px * var(--font-scale, 1)); margin-top: 24px; }
html[data-theme=dark] body .mini-model { background: var(--surface); color: var(--muted); width: 26px; height: 26px; }
html[data-theme=dark] body .models-note button { font-size: calc(12px * var(--font-scale, 1)); }
html[data-theme=dark] body .composer-area { max-width: 856px; padding-bottom: 18px; }
html[data-theme=dark] body .composer { background: var(--surface); border: 1px solid var(--surface); border-radius: 28px; padding: 18px 18px 13px; box-shadow: none; }
html[data-theme=dark] body .composer:focus-within { border-color: var(--line); }
html[data-theme=dark] body .composer.drag-over { border: 1px dashed var(--muted); background: var(--accent-soft); }
html[data-theme=dark] body .composer textarea { font-size: calc(16px * var(--font-scale, 1)); min-height: 48px; padding: 1px 4px 12px; line-height: 1.65; }
html[data-theme=dark] body .composer textarea::placeholder { color: var(--muted); }
html[data-theme=dark] body .composer-tools .icon-button { width: 34px; height: 34px; color: var(--text); }
html[data-theme=dark] body .composer-hint { font-size: calc(11px * var(--font-scale, 1)); }
html[data-theme=dark] body .keyboard-hint { display: none; }
html[data-theme=dark] body .send-button { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--sidebar); }
html[data-theme=dark] body .send-button:hover:not(:disabled) { background: var(--accent); filter: none; }
html[data-theme=dark] body .send-button:disabled { background: var(--muted); color: var(--surface); }
html[data-theme=dark] body .multi-button { background: transparent; color: var(--text); border-color: var(--line); border-radius: 20px; height: 34px; padding-inline: 12px; font-size: calc(12px * var(--font-scale, 1)); }
html[data-theme=dark] body .multi-button:hover:not(:disabled) { background: var(--hover); border-color: var(--muted); }
html[data-theme=dark] body .composer-footer { justify-content: center; font-size: calc(11px * var(--font-scale, 1)); padding-top: 12px; }
html[data-theme=dark] body .composer-footer>span:first-child { display: none; }
html[data-theme=dark] body .messages { max-width: 760px; padding-block: 26px; }
html[data-theme=dark] body .message { margin-bottom: 36px; }
html[data-theme=dark] body .message-header { font-size: calc(13px * var(--font-scale, 1)); gap: 10px; margin-bottom: 15px; }
html[data-theme=dark] body .message-time { font-size: calc(11px * var(--font-scale, 1)); }
html[data-theme=dark] body .message-body { font-size: calc(16px * var(--font-scale, 1)); line-height: 1.8; }
html[data-theme=dark] body .message.user .message-body { background: var(--surface); padding: 12px 20px; border-radius: 24px; max-width: 85%; }
html[data-theme=dark] body .message-body pre { background: var(--sidebar); border-color: var(--accent-soft); border-radius: 14px; padding: 18px; font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .message-body code { background: var(--sidebar); }
html[data-theme=dark] body .message-body pre code { background: transparent; }
html[data-theme=dark] body .message-body blockquote { border-color: var(--accent); color: var(--muted); }
html[data-theme=dark] body .message-body a { color: var(--link); }
html[data-theme=dark] body .message-status { font-size: calc(12px * var(--font-scale, 1)); }
html[data-theme=dark] body .message-actions .icon-button { width: 32px; height: 32px; }
html[data-theme=dark] body .message-actions svg { width: 17px; height: 17px; }
html[data-theme=dark] body .dialog { background: var(--hover); border-color: var(--line); border-radius: 20px; box-shadow: 0 20px 70px #0006; }
html[data-theme=dark] body .dialog::backdrop { background: #0009; backdrop-filter: blur(3px); }
html[data-theme=dark] body .dialog h2 { font-family: var(--sans); font-size: calc(23px * var(--font-scale, 1)); font-weight: 600; letter-spacing: -.4px; }
html[data-theme=dark] body .dialog .eyebrow { color: var(--muted); letter-spacing: 1px; }
html[data-theme=dark] body :is(.muted, .dialog-footnote) { font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .model-option { border-color: var(--line); border-radius: 12px; padding: 16px 12px; }
html[data-theme=dark] body .model-option:hover { background: var(--hover); }
html[data-theme=dark] body .model-option.selected { border-color: var(--accent); background: var(--accent-soft); }
html[data-theme=dark] body .model-option strong { font-size: calc(14px * var(--font-scale, 1)); }
html[data-theme=dark] body .model-option small { font-size: calc(12px * var(--font-scale, 1)); }
html[data-theme=dark] body .setting-row strong { font-size: calc(14px * var(--font-scale, 1)); }
html[data-theme=dark] body .setting-row small { font-size: calc(12px * var(--font-scale, 1)); }
html[data-theme=dark] body .info-box { background: var(--sidebar); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .text-input { background: var(--surface); border-color: var(--line); border-radius: 10px; }
html[data-theme=dark] body :is(.primary-button, .secondary-button, .danger-button) { border-radius: 22px; font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .primary-button { background: var(--accent); color: var(--sidebar); }
html[data-theme=dark] body .primary-button:hover { background: var(--muted); filter: none; }
html[data-theme=dark] body .secondary-button { border-color: var(--line); color: var(--text); }
html[data-theme=dark] body .secondary-button:hover { background: var(--hover); }
.chat-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chat-dialog-actions .primary-button, .chat-pin-button { flex: 1 1 180px; width: auto; min-height: 44px; }
.chat-pin-button { padding: 12px 18px; text-align: center; white-space: normal; }
.chat-pin-button:hover { background: var(--accent-soft); }
html[data-theme=dark] body :is(.composer-error, .notice) { background: color-mix(in srgb, var(--danger) 12%, var(--bg)); border-color: var(--danger); color: var(--danger); }
html[data-theme=dark] body .multi-progress { background: var(--surface); border-color: var(--hover); border-radius: 16px; padding: 12px; }
html[data-theme=dark] body .multi-progress-heading { font-size: calc(13px * var(--font-scale, 1)); }
html[data-theme=dark] body .multi-progress-heading span { font-size: calc(11px * var(--font-scale, 1)); }
html[data-theme=dark] body .multi-job { background: transparent; font-size: calc(11px * var(--font-scale, 1)); border-radius: 10px; }
html[data-theme=dark] body .multi-job span { font-size: calc(10px * var(--font-scale, 1)); }
html[data-theme=dark] body .multi-job.selected { background: var(--accent-soft); border-color: var(--accent); }
html[data-theme=dark] body .toast { background: var(--accent-soft); color: var(--text); border: 1px solid var(--line); box-shadow: 0 6px 24px #0004; }
html[data-theme=dark] body .sidebar-backdrop { background: #0009; }
html[data-theme=dark] body :is(.conversation, .chat-list, .dialog, textarea, pre) { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }

@media (max-width: 1100px) {
  html[data-theme=dark] body .suggestions { grid-template-columns: repeat(2, 1fr); }
  html[data-theme=dark] body .suggestion { min-height: 124px; }
  html[data-theme=dark] body .welcome { padding-top: 45px; }
}
@media (max-width: 760px) {
  .sidebar { padding-top: calc(28px + env(safe-area-inset-top, 0px)); }
  html[data-theme=dark] body .sidebar { width: 280px; padding-top: calc(22px + env(safe-area-inset-top, 0px)); }
  html[data-theme=dark] body .topbar { height: 62px; padding-inline: 12px; }
  html[data-theme=dark] body .model-button { font-size: calc(15px * var(--font-scale, 1)); gap: 6px; padding-inline: 3px; }
  html[data-theme=dark] body .mode-badge { font-size: calc(8px * var(--font-scale, 1)); }
  html[data-theme=dark] body .conversation { padding-inline: 18px; }
  html[data-theme=dark] body .welcome { padding: 44px 0 20px; }
  html[data-theme=dark] body .welcome h1 { font-size: calc(29px * var(--font-scale, 1)); letter-spacing: -.6px; }
  html[data-theme=dark] body .welcome>p { font-size: calc(14px * var(--font-scale, 1)); }
  html[data-theme=dark] body .suggestions { gap: 10px; margin-top: 26px; }
  html[data-theme=dark] body .suggestion { padding: 15px 12px; min-height: 135px; }
  html[data-theme=dark] body .models-note { font-size: calc(10px * var(--font-scale, 1)); }
  html[data-theme=dark] body .models-note button { font-size: calc(11px * var(--font-scale, 1)); }
  html[data-theme=dark] body .composer-area { padding: 10px 12px max(12px, env(safe-area-inset-bottom)); }
  html[data-theme=dark] body .composer { border-radius: 25px; padding: 15px 14px 12px; }
  html[data-theme=dark] body .composer-footer { font-size: calc(10px * var(--font-scale, 1)); }
  html[data-theme=dark] body .message-body { font-size: calc(16px * var(--font-scale, 1)); line-height: 1.75; }
  html[data-theme=dark] body .message.user .message-body { max-width: 94%; padding: 11px 16px; }
  html[data-theme=dark] body .dialog { padding: 22px 18px; }
  html[data-theme=dark] body .dialog h2 { font-size: calc(21px * var(--font-scale, 1)); }
  html[data-theme=dark] body .dialog-actions .primary-button { font-size: calc(12px * var(--font-scale, 1)); padding-inline: 14px; }
}
.web-search-option { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 32px; margin: 0 0 8px; font-size: calc(12px * var(--font-scale, 1)); color: var(--muted); cursor: pointer; }
.web-search-option input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.web-search-option input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.web-search-option:has(input:checked) { color: var(--text); }
.web-search-option:has(input:disabled) { cursor: default; opacity: .6; }
.sidebar-resize { display: none; }
@media (min-width: 761px) {
  html body #sidebar { position: relative; width: var(--sidebar-width, 274px); min-width: 220px; max-width: min(480px, calc(100vw - 420px)); }
  html[data-theme=dark] body #sidebar { width: var(--sidebar-width, 260px); }
  .sidebar-resize { display: block; position: absolute; inset: 0 -5px 0 auto; width: 10px; z-index: 1; cursor: col-resize; touch-action: none; }
  .sidebar-resize::after { content: ''; position: absolute; inset: 0 4px; background: var(--accent); opacity: 0; transition: opacity .15s; }
  .sidebar-resize:hover::after, .sidebar-resize:focus-visible::after, .sidebar-resizing .sidebar-resize::after { opacity: .65; }
  .sidebar-resize:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .sidebar-resizing, .sidebar-resizing * { cursor: col-resize !important; user-select: none !important; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  html:not([data-theme=dark]) body #sidebar { width: var(--sidebar-width, 245px); }
}
#sidebarExportButton { display: none; }
.fullscreen-button { display: inline-flex; width: 40px; height: 40px; padding: 0; }
.exit-fullscreen-button { position: absolute; z-index: 5; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--muted); }
.exit-fullscreen-button:hover { background: var(--hover); color: var(--text); }
@media (max-width: 760px) {
  #exportButton { display: none; }
  #sidebarExportButton { display: flex; }
  #modeBadge { display: none; }
  .topbar-left { min-width: 0; flex: 1; }
  #modelButton { min-width: 0; }
  #selectedModel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #modelButton > :is(.model-symbol, svg), #openSidebar { flex-shrink: 0; }
}
html body.response-fullscreen :is(.sidebar, .sidebar-backdrop, .topbar, #offlineBanner, .composer-area, #welcome) { display: none; }
.chat-select { text-decoration: none; }
.message-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; }
.message-footer .message-actions { margin-top: 0; }
.message-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: calc(11px * var(--font-scale, 1)); line-height: 1.5; font-variant-numeric: tabular-nums; }
.message-stat { white-space: nowrap; }
html body.response-fullscreen .message-footer { display: none; }
html body.response-fullscreen .conversation { padding: calc(64px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
html body.response-fullscreen .messages { padding: 0; }
html body.response-fullscreen .message { animation: none; }
.catalog-entry { width: 100%; margin-top: 18px; }
.catalog-dialog { width: 960px; }
.catalog-toolbar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; margin: 20px 0 12px; }
.catalog-toolbar label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.catalog-toolbar .text-input { margin: 0; height: 42px; padding: 9px 10px; }
.catalog-toolbar select { width: 100%; height: 42px; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--text); background: var(--surface); }
.catalog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.catalog-selected-filter { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.catalog-dialog input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.catalog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.catalog-card { padding: 15px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.catalog-card.chosen { border-color: var(--accent); background: var(--accent-soft); }
.catalog-model-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.catalog-model-heading { min-width: 0; overflow-wrap: anywhere; }
.catalog-model-heading strong { display: block; font-size: calc(14px * var(--font-scale, 1)); line-height: 1.5; }
.catalog-model-heading small { display: block; font-size: calc(11px * var(--font-scale, 1)); margin-top: 3px; color: var(--muted); }
.catalog-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.catalog-badges span { font-size: calc(10px * var(--font-scale, 1)); padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; }
.catalog-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.catalog-stats dt { font-size: calc(10px * var(--font-scale, 1)); color: var(--muted); }
.catalog-stats dd { margin: 5px 0 0; font-size: calc(13px * var(--font-scale, 1)); font-variant-numeric: tabular-nums; }
.catalog-details { font-size: calc(11px * var(--font-scale, 1)); line-height: 1.6; overflow-wrap: anywhere; }
.catalog-details summary { cursor: pointer; color: var(--muted); }
.catalog-details p { white-space: pre-wrap; }
.catalog-note { font-size: calc(11px * var(--font-scale, 1)); line-height: 1.6; color: var(--muted); }
.catalog-footer { position: sticky; bottom: -28px; background: var(--bg); padding: 14px 0; margin-top: 12px; border-top: 1px solid var(--line); }
.catalog-footer .primary-button { width: auto; }
.catalog-footer > span { margin-right: auto; }
@media (max-width: 760px) {
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-search { grid-column: 1 / -1; }
  .catalog-list { grid-template-columns: minmax(0, 1fr); }
  .catalog-footer { flex-wrap: wrap; bottom: -22px; }
  .catalog-footer > span { flex: 1 0 100%; }
}

/* Appearance controls share the same palette and text scale as the workspace. */
.theme-settings-dialog { width: 580px; }
.theme-mode-switch { display: flex; gap: 4px; padding: 4px; margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--sidebar); }
.theme-mode-switch button { flex: 1; min-height: 40px; padding: 8px; border-radius: 8px; }
.theme-mode-switch button[aria-pressed=true] { background: var(--accent); color: var(--bg); }
.theme-font-setting { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 24px; }
.theme-font-setting output { font-size: .9em; color: var(--muted); font-variant-numeric: tabular-nums; }
.theme-font-setting input { grid-column: 1 / -1; width: 100%; margin: 4px 0; accent-color: var(--accent); cursor: pointer; }
.theme-font-setting small { grid-column: 1 / -1; }
.theme-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin: 18px 0; }
.theme-color-field { min-width: 0; }
.theme-color-field label { display: block; margin-bottom: 8px; }
.theme-color-controls { display: flex; align-items: center; gap: 9px; }
.theme-color-controls input[type=color] { width: 40px; height: 36px; padding: 3px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer; }
.theme-color-hex { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); font-family: Consolas, monospace; font-size: .85em; }
.theme-color-hex[aria-invalid=true] { border-color: var(--danger); }
.theme-color-error { display: block; color: var(--danger); font-size: .8em; margin-top: 6px; }
.theme-advanced { margin: 22px 0; }
.theme-advanced summary { cursor: pointer; font-size: .9em; color: var(--muted); }
.theme-advanced summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.theme-presets { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.theme-presets h3 { font-size: 1em; margin: 0; }
.theme-preset-actions, .theme-preset-save { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.theme-preset-actions select { flex: 1 1 170px; min-width: 0; width: 100%; padding: 9px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .85em; }
.theme-preset-save .text-input { flex: 1 1 190px; min-width: 0; width: 100%; margin: 0; padding: 10px; }
.theme-preset-save button { min-height: 40px; }
html body #themeSettingsStatus.theme-save-error { color: var(--danger); }
#themeSettingsStatus:empty { display: none; }
@media (max-width: 480px) {
  .theme-color-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .theme-preset-actions select, .theme-preset-save .text-input { flex-basis: 100%; }
  .theme-color-hex { flex: 1; }
}
