:root{--bg: #050505;--bg-deep: #000;--bg-panel: rgba(5, 5, 5, .8);--bg-card: rgba(255, 255, 255, .055);--bg-input: rgba(0, 0, 0, .72);--accent: #ff7a1a;--accent-2: #ff4f35;--accent-dim: rgba(255, 122, 26, .14);--accent-glow: rgba(255, 122, 26, .34);--text: #f7f7f4;--text-dim: #d7d7d2;--text-muted: #8c8c86;--border: rgba(255, 255, 255, .12);--border-strong: rgba(255, 122, 26, .36);--radius: 18px;--radius-sm: 12px;--radius-full: 999px;--font: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;color:var(--text);background:var(--bg);font-family:var(--font);font-synthesis:none;text-rendering:optimizeLegibility}:root[data-theme=light]{--bg: #f7f7f4;--bg-deep: #fff;--bg-panel: rgba(255, 255, 255, .86);--bg-card: rgba(0, 0, 0, .04);--bg-input: rgba(255, 255, 255, .78);--text: #070707;--text-dim: #2c2c29;--text-muted: #6c6c65;--border: rgba(0, 0, 0, .12);--border-strong: rgba(255, 122, 26, .42);color:var(--text);background:var(--bg)}*{box-sizing:border-box}*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.36) transparent}*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-thumb{border-radius:999px;background:#94a3b847}*::-webkit-scrollbar-track{background:transparent}body{margin:0;min-width:320px;min-height:100vh;background:radial-gradient(circle at 18% 8%,rgba(255,122,26,.14),transparent 32%),radial-gradient(circle at 80% 20%,rgba(255,255,255,.08),transparent 30%),linear-gradient(145deg,var(--bg-deep),var(--bg))}:root[data-theme=light] body{background:radial-gradient(circle at 18% 8%,rgba(255,122,26,.11),transparent 32%),linear-gradient(145deg,#fff,#f7f7f4)}button,select,textarea,input{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin:0}body:after{content:"";position:fixed;inset:0;z-index:-1;opacity:.035;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:256px 256px}.app-shell{min-height:100vh;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;padding:18px;isolation:isolate}.chat-panel,.tools-panel,.settings-modal{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-panel);box-shadow:0 24px 80px #0000005c;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.chat-panel{min-height:calc(100vh - 36px);display:grid;grid-template-rows:auto auto auto minmax(260px,1fr) auto;gap:14px;padding:22px;overflow:hidden}.tools-panel{align-self:start;display:flex;flex-direction:column;gap:12px;padding:12px;position:sticky;top:18px}.brand-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center}.brand-mark,.icon-button{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:var(--radius-sm);border:1px solid var(--border);background:#ffffff0b;color:var(--accent);box-shadow:inset 0 1px #ffffff0a}.eyebrow{margin:0 0 4px;color:var(--text-dim);font-size:12px;letter-spacing:.04em}h1{font-size:clamp(30px,4vw,48px);line-height:1;font-weight:720;letter-spacing:0}.top-left-actions,.top-actions,.connection-row,.action-row,.action-left,.example-row,.composer-footer,.modal-actions,.history-actions,.section-title,.setting-heading,.history-bar{display:flex;align-items:center;gap:10px}.top-actions{justify-content:flex-end}.top-left-actions,.action-row{justify-content:flex-start}.action-left{flex-wrap:wrap}.composer-actions-right{display:flex;align-items:center;gap:8px;margin-left:auto}.voice-toggle,.ghost-button,.primary-button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:var(--radius-sm);padding:0 14px;transition:transform .2s,background .2s,border-color .2s,color .2s}.voice-toggle:hover,.ghost-button:hover,.primary-button:hover{transform:translateY(-1px)}.voice-toggle{border:1px solid var(--border-strong);color:var(--accent);background:#ff7a1a14}.voice-toggle.enabled{color:var(--text);background:linear-gradient(135deg,#ff7a1a3d,#ff4f3529);border-color:#ff7a1a6b;box-shadow:0 0 28px #ff7a1a29}.primary-button{border:0;color:#050505;background:linear-gradient(135deg,#ff9a35,#ff7a1a 52%,#ff4f35);font-weight:600;box-shadow:0 12px 34px #ff7a1a3d}.primary-button:disabled{cursor:wait;opacity:.5}.ghost-button{border:1px solid var(--border);color:var(--text-dim);background:#ffffff09}.ghost-button:hover{border-color:var(--border-strong);color:var(--text)}.ghost-button.small{min-height:34px;padding:0 10px;font-size:13px}.ghost-button.danger{color:#fb7185;border-color:#fb718538}.connection-row,.example-row,.history-list{flex-wrap:wrap}.status{display:inline-flex;align-items:center;gap:7px;min-width:auto;padding:6px 10px;border:1px solid var(--border);border-radius:var(--radius-full);color:var(--text-dim);background:#ffffff07;text-align:center;font-size:13px}.status i{width:7px;height:7px;border-radius:50%;background:#64748b;box-shadow:0 0 0 3px #64748b1f}.status.ready{color:var(--text);border-color:#ff7a1a47}.status.ready i{background:var(--accent);box-shadow:0 0 0 4px #ff7a1a1f,0 0 18px #ff7a1aa3}.history-bar{align-items:flex-start;flex-direction:column;gap:8px;border:1px solid var(--border);border-radius:var(--radius);padding:12px;background:#ffffff07}.section-title.compact h2,.section-title h2{font-size:16px;color:var(--text)}.history-actions{flex-wrap:wrap}.history-list{display:flex;gap:8px;width:100%}.history-item{max-width:190px;border:1px solid var(--border);border-radius:var(--radius-full);padding:7px 10px;overflow:hidden;color:var(--text-dim);background:transparent;text-overflow:ellipsis;white-space:nowrap;transition:background .2s,color .2s}.history-item.active{color:var(--text);background:#ff7a1a29;border-color:#ff7a1a61}.message-list{overflow:auto;display:flex;flex-direction:column;gap:16px;padding:26px 18px 34px;border:1px solid var(--border);border-radius:var(--radius);background:linear-gradient(180deg,#ffffff06,#ffffff03),#0000001f;scroll-behavior:smooth}.chat-message{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:center}.chat-message.user{grid-template-columns:minmax(0,1fr) 42px}.chat-message.user .message-icon{order:2;grid-column:2;grid-row:1}.chat-message:not(.user) .message-icon{grid-column:1;grid-row:1}.message-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:999px;border:1px solid var(--border);background:#ffffff0a;color:var(--text-dim);overflow:hidden}.message-icon.avatar img,.avatar-preview img{width:100%;height:100%;display:block;object-fit:cover}.message-bubble{grid-row:1;max-width:88%;border-radius:var(--radius);padding:14px 18px;background:#070a10c7;border:1px solid rgba(148,163,184,.22);line-height:1.9;font-size:15px;color:var(--text);box-shadow:0 14px 32px #00000047}.chat-message.user .message-bubble{grid-column:1;justify-self:end;color:var(--text);background:#070a10c7;border-color:#94a3b838}.message-actions{grid-column:2;grid-row:2;display:flex;gap:6px;margin-top:-6px}.chat-message.user .message-actions{grid-column:1;grid-row:2;justify-self:end}.message-actions button{width:26px;height:26px;display:grid;place-items:center;border:0;border-radius:8px;color:var(--text-muted);background:transparent}.message-actions button:hover{color:var(--text);background:#ffffff0f}.message-bubble.muted{color:var(--text-muted)}.inline-audio,.compact-audio{margin-top:10px}.composer,.tool-section,.setting-group{display:flex;flex-direction:column;gap:10px}.composer{margin:-22px 18px 0;padding:12px;border:1px solid var(--border-strong);border-radius:22px;background:#080a0fd1;box-shadow:0 22px 70px #00000057,0 0 44px #ff7a1a17;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);z-index:2}.tool-section{border:1px solid var(--border);border-radius:var(--radius);padding:14px;background:#ffffff08}.avatar-row,.avatar-setting-row{display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;align-items:center}.conversation-visual-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,300px);gap:16px;align-items:stretch}.modal-voice-picker{position:relative;display:flex;flex-direction:column;gap:8px;justify-content:center;min-height:74px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px;background:#ffffff07}.modal-voice-picker span{color:var(--text-dim);font-size:13px}.voice-preview-button{position:absolute;right:10px;top:8px;min-height:24px;border:0;border-radius:8px;padding:0 8px;color:var(--accent);background:#ff7a1a1a;font-size:12px}.voice-preview-button:disabled{opacity:.5}.avatar-preview{width:52px;height:52px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--border);border-radius:50%;color:var(--accent);background:#ffffff0a;box-shadow:none}.voice-avatar-button{width:82px;height:82px;display:grid;place-items:center;margin:0 auto 18px;overflow:hidden;border:1px solid var(--border);border-radius:50%;color:var(--accent);background:#ffffff0a;box-shadow:none}.voice-avatar-button img{width:100%;height:100%;object-fit:cover}.conversation-manage-button{width:100%;min-height:52px;display:grid;grid-template-columns:38px minmax(0,1fr) 20px;align-items:center;gap:10px;border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;color:var(--text);background:#ffffff09;text-align:left}.mini-avatar{width:36px;height:36px;display:grid;place-items:center;overflow:hidden;border-radius:50%}.mini-avatar img{width:100%;height:100%;object-fit:cover}.avatar-actions{display:flex;flex-wrap:wrap;gap:8px}.avatar-action-column{display:flex;flex-direction:column;gap:8px}.section-subtitle,.setting-note,.message{color:var(--text-dim);font-size:13px}textarea,select,input{width:100%;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--text);outline:none;transition:border-color .2s,background .2s,box-shadow .2s}textarea:focus,select:focus,input:focus,input:focus-visible,button:focus-visible,a:focus-visible{outline:none;border-color:#ff7a1a7a;box-shadow:0 0 0 3px #ff7a1a1a}textarea{min-height:104px;resize:vertical;padding:14px;line-height:1.7;font-size:16px;border-radius:16px}textarea::placeholder{color:var(--text-muted)}.custom-textarea{min-height:110px}select,input{height:42px;padding:0 12px}.field-label{display:block;color:var(--text-dim);font-size:14px}.toggle-label{display:flex;align-items:center;gap:8px;cursor:pointer}.toggle-label input[type=checkbox]{width:auto;height:auto;accent-color:var(--accent)}.composer-footer{justify-content:space-between;color:var(--text-muted);font-size:13px}.composer-meta{display:flex;justify-items:end;justify-content:flex-end;gap:5px}.clear-chat-button{min-width:42px;height:42px;display:inline-grid;place-items:center;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text-muted);background:#ffffff09;transition:transform .2s,background .2s,border-color .2s,color .2s}.clear-chat-button:hover{transform:translateY(-1px);color:#fb7185;border-color:#fb718547;background:#fb718517}.example-row button{border:1px solid rgba(217,160,126,.06);border-radius:var(--radius-full);background:transparent;color:var(--text-muted);padding:4px 8px;font-size:12px;transition:color .2s}.example-row button:hover{color:var(--text-dim)}.range-control{border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px;background:#0a0c117a}.range-control span{display:flex;justify-content:space-between;gap:12px;margin-bottom:10px;color:var(--text-dim);font-size:14px}.range-control strong{color:var(--accent)}input[type=range]{width:100%;accent-color:var(--accent)}.full-width{width:100%}.message.ok{color:#6dbe98}.message:not(.ok){color:#c47a6a}.modal-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:18px;background:#030509b8;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.settings-modal{width:min(720px,100%);max-height:min(96vh,1120px);overflow:auto;display:flex;flex-direction:column;gap:16px;padding:20px}.settings-tools-mobile,.settings-api-title,.settings-tabs,.mobile-settings-pane{display:none}.desktop-settings-api{display:flex;flex-direction:column;gap:16px}.modal-title-row,.setting-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.modal-title-row h2{font-size:26px}.setting-heading a{display:inline-flex;align-items:center;gap:5px;color:var(--accent);text-decoration:none;font-size:13px}.setting-group{border:1px solid var(--border);border-radius:var(--radius);padding:14px;background:var(--bg-card)}.user-profile-setting{display:grid;grid-template-columns:54px auto minmax(180px,360px) minmax(0,1fr);align-items:center;gap:12px}.user-profile-setting h3{grid-column:1 / -1;margin:0;color:var(--text);font-size:15px;font-weight:600}.user-avatar-button{width:54px;height:54px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--border);border-radius:50%;color:var(--accent);background:#ffffff0a;box-shadow:none}.user-avatar-button img{width:100%;height:100%;display:block;object-fit:cover}.user-nickname-field{margin:0;max-width:360px}.modal-actions{justify-content:flex-end}.spin{animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.prompt-modal-backdrop{position:fixed;inset:0;z-index:25;display:grid;place-items:center;padding:18px;background:#0a080899}.prompt-modal{width:min(600px,100%);max-height:min(70vh,600px);display:flex;flex-direction:column;gap:14px;padding:20px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg-panel);box-shadow:0 8px 40px #0000004d}.prompt-modal h2{font-size:20px}.prompt-modal textarea{min-height:160px;resize:vertical;padding:14px;line-height:1.7;font-size:15px}.prompt-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}@media(max-width:980px){.app-shell{grid-template-columns:1fr;padding:12px}.chat-panel{min-height:auto;padding:18px}.tools-panel{position:static}.brand-row{grid-template-columns:auto minmax(0,1fr)}.top-actions{grid-column:1 / -1;justify-content:flex-start}.message-list{max-height:48vh}}@media(max-width:560px){.composer-footer,.action-row,.modal-actions,.history-actions{align-items:stretch;flex-direction:column}.primary-button,.ghost-button,.voice-toggle{width:100%}.message-bubble,.history-item{max-width:100%}}.app-shell{grid-template-columns:220px minmax(0,1fr) 300px;gap:0;padding:16px;height:100vh;min-height:100vh;align-items:start;overflow:hidden}.conversation-sidebar,.chat-panel,.tools-panel{height:calc(100vh - 32px);min-height:0;border:1px solid var(--border);background:#090c11c2;box-shadow:none;-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px)}.conversation-sidebar{display:flex;flex-direction:column;gap:18px;padding:18px 0;border-radius:8px 0 0 8px;border-right:0;overflow:hidden}.sidebar-brand{display:flex;align-items:center;gap:18px;padding:0 20px 12px;border-bottom:1px solid var(--border);color:var(--text);font-size:14px}.sidebar-close{display:none;margin-left:auto;width:34px;height:34px;place-items:center;border:0;border-radius:10px;color:var(--text-dim);background:transparent}.wordmark{color:var(--text);font-size:28px;font-weight:800;line-height:1;letter-spacing:0;text-shadow:0 0 22px rgba(255,122,26,.26)}.brand-logo{width:30px;height:30px;border-radius:50%;object-fit:cover;flex-shrink:0}.sidebar-new{min-height:42px;display:flex;align-items:center;gap:10px;margin:0 16px;border:0;color:var(--text);background:transparent;text-align:left}.sidebar-history{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:4px;overflow-y:auto;overscroll-behavior:contain}.sidebar-history>span{padding:8px 20px;color:var(--text-muted);font-size:13px}.sidebar-history-item{width:100%;display:grid;grid-template-columns:minmax(0,1fr) 28px 28px;gap:4px;min-height:40px;align-items:center;border:0;border-left:2px solid transparent;padding:0 8px 0 18px;color:var(--text-dim);background:transparent;text-align:left;position:relative;overflow:hidden}.sidebar-history-item:before{content:"";position:absolute;inset:0;z-index:0;background:var(--conversation-thumb) center / cover no-repeat;opacity:0}.sidebar-history-item.has-background:before{opacity:.28}.sidebar-history-item>*{position:relative;z-index:1}.history-select{min-width:0;height:40px;display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:10px;border:0;color:inherit;background:transparent;text-align:left}.history-select span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-rename,.history-delete{width:26px;height:26px;display:grid;place-items:center;border:0;border-radius:8px;color:var(--text-muted);background:transparent;opacity:.58}.history-rename{opacity:.58}.sidebar-history-item:hover .history-delete,.sidebar-history-item:hover .history-rename,.sidebar-history-item.active .history-rename,.sidebar-history-item.active .history-delete{opacity:1}.history-rename:hover,.history-delete:hover{color:#fb7185;background:#fb71851a}.history-rename:hover{color:var(--text);background:#ffffff0f}.sidebar-history-item.active{border-left-color:var(--accent);color:var(--text);background:#ff7a1a1a}.chat-panel{grid-template-rows:56px minmax(260px,1fr) auto;gap:0;padding:0;border-radius:0;overflow:hidden;position:relative}.composer-zone{display:flex;flex-direction:column;gap:10px;min-height:0;padding:0 18px 14px;background:#07080b8a;border-top:1px solid rgba(148,163,184,.12)}.chat-panel>*:not(.chat-background){position:relative;z-index:1}.chat-background{position:absolute;inset:0;z-index:0;overflow:hidden;opacity:1}.chat-background:before{content:"";position:absolute;inset:-34px;z-index:0;background:var(--chat-bg) center / cover no-repeat;filter:blur(28px) saturate(.95);transform:scale(1.04)}.chat-background-image{position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;object-fit:cover;object-position:center top;filter:saturate(.95)}.chat-background:after{content:"";position:absolute;inset:0;z-index:2;background:#07080b47}.chat-topbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:0 18px;border-bottom:1px solid var(--border);background:#080b1080}.chat-topbar h1{justify-self:center;font-size:15px;font-weight:560;color:var(--text)}.mobile-menu-button,.top-icon-button{width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:10px;color:var(--text-dim);background:transparent}.voice-status-icon{position:relative;display:grid;place-items:center}.voice-status-icon.off:after{content:"";position:absolute;width:22px;height:2px;border-radius:999px;background:currentColor;transform:rotate(-38deg)}.mobile-menu-button{display:none}.top-icon-button:hover{color:var(--text);background:#ffffff0f}.top-icon-button.enabled{color:var(--accent);background:transparent}.theme-toggle-button{color:var(--accent)}.chat-panel .connection-row,.history-bar{display:none}.message-list{min-height:0;border:0;border-radius:0;padding:18px 28px 26px;background:transparent}.date-divider{display:flex;align-items:center;justify-content:center;margin:0 0 10px;color:var(--text-muted);font-size:12px}.date-divider:before,.date-divider:after{content:"";width:min(28%,220px);height:1px;margin:0 14px;background:linear-gradient(90deg,transparent,rgba(148,163,184,.22),transparent)}.message-bubble{max-width:min(72%,620px);width:fit-content;border-radius:18px;background:#070a10cc;border-color:#94a3b838;box-shadow:0 14px 32px #0000003d}.chat-message.user .message-bubble{background:#070a10cc;border:1px solid rgba(148,163,184,.22)}.composer{margin:0;border-radius:12px;border-color:#94a3b82e;background:#0d1117eb;box-shadow:0 -14px 50px #0003}.composer textarea{min-height:58px;border:0;background:transparent;resize:none;border-radius:0}.composer textarea:focus{box-shadow:none}.suggestion-row{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding-top:10px}.suggestion-row button{min-height:30px;border:1px solid rgba(255,122,26,.2);border-radius:999px;padding:0 10px;color:var(--text-dim);background:#ff7a1a12}.suggestion-row button:hover{color:var(--text);border-color:#ff7a1a5c}.voice-mode-button{color:var(--text-dim);border-color:var(--border);background:#ffffff09;box-shadow:none}.voice-mode-button:hover{color:var(--text);border-color:var(--border-strong);background:#ffffff0e}.tool-toggle-button{display:none;min-height:38px;align-items:center;gap:6px;border:0;color:var(--text-dim);background:transparent}.tools-panel{position:sticky;top:16px;max-height:calc(100vh - 32px);border-left:0;border-radius:0 8px 8px 0;padding:22px 20px;overflow:auto}.tool-section{border:0;border-radius:0;padding:12px 0 18px;background:transparent;border-bottom:1px solid var(--border)}.tool-section:last-child{border-bottom:0}.section-title h2{font-size:14px;font-weight:560}.meta-field{display:grid;gap:6px;padding:10px 0;border-bottom:1px solid rgba(148,163,184,.12)}.meta-field>span:first-child{color:var(--text-dim);font-size:13px}.meta-input-row{display:grid;grid-template-columns:minmax(0,1fr) 22px;align-items:center;gap:8px}.meta-input-row input{height:30px;padding:0;border:0;border-radius:0;background:transparent}.meta-input-row input:focus{box-shadow:none}.meta-edit-icon{display:grid;place-items:center;color:var(--text-muted)}.mobile-only{display:none}.default-avatar{width:100%;height:100%;display:block}:root[data-theme=light] .chat-panel,:root[data-theme=light] .tools-panel,:root[data-theme=light] .conversation-sidebar{background:#ffffffc7;border-color:#0000001f}:root[data-theme=light] .sidebar-brand,:root[data-theme=light] .tool-section,:root[data-theme=light] .meta-field,:root[data-theme=light] .composer-zone{border-color:#0000001a}:root[data-theme=light] .chat-background:after{background:#ffffff2e}:root[data-theme=light] .chat-topbar{background:#ffffff94;border-bottom-color:#0000001a}:root[data-theme=light] .top-icon-button:hover,:root[data-theme=light] .history-rename:hover{color:var(--text);background:#0000000f}:root[data-theme=light] .top-icon-button.enabled{color:var(--accent);background:transparent}:root[data-theme=light] .composer-zone{background:#ffffff70}:root[data-theme=light] .composer,:root[data-theme=light] .settings-modal,:root[data-theme=light] .prompt-modal,:root[data-theme=light] .preset-modal{background:#ffffffe6;box-shadow:0 18px 60px #00000024}:root[data-theme=light] textarea,:root[data-theme=light] select,:root[data-theme=light] input,:root[data-theme=light] .modal-voice-picker,:root[data-theme=light] .setting-group,:root[data-theme=light] .range-control,:root[data-theme=light] .conversation-manage-button,:root[data-theme=light] .preset-card{background:#ffffffc2;border-color:#0000001f}:root[data-theme=light] .ghost-button,:root[data-theme=light] .voice-mode-button,:root[data-theme=light] .clear-chat-button,:root[data-theme=light] .settings-tabs button{background:#ffffffb8;border-color:#00000024;color:var(--text-dim)}:root[data-theme=light] .ghost-button:hover,:root[data-theme=light] .voice-mode-button:hover,:root[data-theme=light] .clear-chat-button:hover{color:var(--text);background:#0000000d;border-color:var(--border-strong)}:root[data-theme=light] .message-bubble{background:#ffffffdb;border-color:#0000001a;box-shadow:0 14px 34px #0000001f}:root[data-theme=light] .chat-message.user .message-bubble{background:#ffffffdb;border-color:#0000001a}:root[data-theme=light] .message-icon,:root[data-theme=light] .brand-mark,:root[data-theme=light] .icon-button{background:#ffffffb3;border-color:#0000001f}:root[data-theme=light] .sidebar-history-item.active{background:#ff7a1a24}:root[data-theme=light] .sidebar-history-item.has-background:before{opacity:.2}:root[data-theme=light] .date-divider:before,:root[data-theme=light] .date-divider:after{background:linear-gradient(90deg,transparent,rgba(0,0,0,.18),transparent)}@media(max-width:980px){.app-shell{display:block;height:auto;padding:14px;overflow:visible}.conversation-sidebar{display:none}.conversation-sidebar.history-open{position:fixed;z-index:22;inset:14px auto 14px 14px;width:min(78vw,320px);display:flex;height:auto;min-height:auto;max-height:calc(100vh - 28px);border:1px solid var(--border);border-radius:14px;background:#090c11fa;box-shadow:28px 0 70px #00000057}.conversation-sidebar.history-open .sidebar-close{display:grid}.chat-panel{height:calc(100vh - 28px);min-height:calc(100vh - 28px);border-radius:8px}.chat-topbar{grid-template-columns:36px minmax(0,1fr) auto}.top-actions{grid-column:auto;justify-content:flex-end}.chat-topbar h1{font-size:14px}.mobile-menu-button{display:grid}.top-actions .top-icon-button:first-child{display:none}.message-list{max-height:none;min-height:0;padding:18px 14px 22px}.composer-zone{padding:0 12px 12px;max-height:42vh;overflow:auto}.composer{margin:0}.tool-toggle-button,.tools-panel{display:none}.settings-modal{width:min(720px,calc(100vw - 20px));max-height:calc(100vh - 20px);padding:16px}.settings-tools-mobile{display:flex;flex-direction:column;gap:12px}.settings-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.settings-tabs button{min-height:44px;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text-dim);background:#ffffff09;font-weight:600}.settings-tabs button.active{color:var(--accent);border-color:#ff7a1a6b;background:#ff7a1a1a}.mobile-settings-pane.active{display:flex;flex-direction:column;gap:14px;min-height:min(56vh,520px)}.desktop-settings-api{display:none}.settings-api-title{display:block;color:var(--text);font-size:15px;font-weight:600}.mobile-only{display:inline-flex}}@media(max-width:560px){.app-shell{padding:10px}.chat-panel{height:calc(100vh - 20px);min-height:calc(100vh - 20px)}.action-row{align-items:center;flex-direction:row;flex-wrap:wrap}.action-left{flex:1 1 auto;flex-wrap:nowrap}.primary-button,.ghost-button,.voice-toggle{width:auto;flex:1 1 0;min-width:0;padding-inline:10px}.clear-chat-button{flex:0 0 42px}.composer-actions-right{margin-left:auto}.message-bubble{max-width:86%}.conversation-visual-row{grid-template-columns:1fr}.user-profile-setting{grid-template-columns:54px minmax(0,1fr)}.user-profile-setting h3,.user-nickname-field{grid-column:1 / -1;max-width:none}.user-avatar-upload{justify-self:start}}.voice-mode-backdrop{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;overflow:hidden;background:linear-gradient(160deg,#000,#090706 54%,#050505)}.voice-mode-backdrop:before{content:"";position:absolute;inset:0;z-index:-2;background:var(--voice-mode-bg, none) center / contain no-repeat;opacity:0;filter:saturate(.95)}.voice-mode-backdrop.has-background:before{opacity:1}.voice-mode-backdrop:after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#07080b00,#07080b80 88%,#07080bb3)}.voice-mode-panel{flex:1;min-height:0;height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:24px 24px 96px;max-width:600px;margin:0 auto;width:100%;position:relative}.voice-mode-subtitles{flex:1;min-height:0;width:100%;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column;gap:16px;padding:20px 0}.voice-subtitle{padding:12px 18px;border-radius:22px;font-size:17px;line-height:2;max-width:85%;animation:fadeIn .4s ease;transition:opacity 1s ease}.voice-subtitle:nth-last-child(n+4){opacity:.4}.voice-subtitle.user{align-self:flex-end;background:#ff7a1a33;color:var(--text)}.voice-subtitle.assistant{align-self:flex-start;background:#ffffff12;color:var(--text)}.voice-subtitle-role{display:inline-block;margin-right:10px;font-size:12px;opacity:.5;font-weight:600;letter-spacing:.5px}.voice-mode-indicator{display:flex;flex-direction:column;align-items:center;gap:16px;padding:32px 0}.voice-mode-circle{width:120px;height:120px;border:0;border-radius:50%;display:grid;place-items:center;transition:transform .15s ease,box-shadow .4s;color:#fff;position:relative;cursor:pointer}.voice-mode-circle.idle{background:radial-gradient(circle at 50% 50%,rgba(255,122,26,.34) 0%,rgba(255,255,255,.1) 52%,transparent 70%),#110b07b8;box-shadow:0 0 60px #ff7a1a33,0 0 120px #ffffff0f;animation:emberBreathe 3s ease-in-out infinite}.voice-mode-circle.listening{background:radial-gradient(circle at 50% 50%,rgba(255,122,26,.54) 0%,rgba(255,79,53,.28) 42%,rgba(255,122,26,.1) 70%,transparent 85%),#140a06a3;box-shadow:0 0 80px #ff7a1a5c,0 0 160px #ff4f3524,inset 0 0 40px #ff7a1a1f}.voice-mode-circle.transcribing,.voice-mode-circle.thinking{background:radial-gradient(circle at 50% 50%,rgba(255,122,26,.38) 0%,rgba(255,255,255,.12) 50%,transparent 75%),#120c08ad;box-shadow:0 0 70px #ff7a1a42,0 0 140px #ffffff12;animation:softPulse 1.4s ease-in-out infinite}.voice-mode-circle.speaking{background:radial-gradient(circle at 50% 50%,rgba(255,154,53,.54) 0%,rgba(255,79,53,.32) 35%,rgba(255,122,26,.12) 65%,transparent 85%),#140a06a3;box-shadow:0 0 100px #ff7a1a6b,0 0 200px #ff4f3529;animation:fireFlicker .6s ease-in-out infinite}.voice-mode-circle.error{background:radial-gradient(circle at 50% 50%,rgba(120,100,100,.15) 0%,transparent 70%),#28232399;box-shadow:0 0 30px #7864641a}.voice-mode-status{color:var(--text-dim);font-size:14px}.voice-mode-error{color:#c47a6a;font-size:13px;text-align:center}.voice-mode-input{width:100%;display:flex;gap:8px;align-items:center}.voice-mode-input input{flex:1;height:42px;padding:0 14px;border:1px solid rgba(255,255,255,.1);border-radius:999px;background:#ffffff0f;color:var(--text);font-size:14px;outline:none}.voice-mode-input input::placeholder{color:#ffffff40}.voice-mode-input input:focus{border-color:var(--accent-dim);outline:none}.voice-mode-input button{width:42px;height:42px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(255,255,255,.1);background:var(--accent-dim);color:var(--accent);cursor:pointer}.voice-mode-input .voice-mode-hangup{background:#ef444429;border-color:#f8717152;color:#f87171}.voice-mode-input .voice-mode-hangup:hover{background:#ef44443d}.voice-mode-input button:disabled{opacity:.3;cursor:default}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes softPulse{0%,to{transform:scale(1)}50%{transform:scale(1.06)}}@keyframes emberBreathe{0%,to{box-shadow:0 0 50px #d9a07e1f,0 0 100px #c864320f}50%{box-shadow:0 0 70px #d9a07e33,0 0 130px #c864321a}}@keyframes fireFlicker{0%{transform:scale(1);box-shadow:0 0 100px #f0a05066,0 0 200px #d9a07e26}25%{transform:scale(1.03);box-shadow:0 0 110px #f0aa5a73,0 0 210px #d9a07e2e}50%{transform:scale(1);box-shadow:0 0 95px #f0964661,0 0 190px #d9a07e21}75%{transform:scale(1.04);box-shadow:0 0 115px #f0a5556b,0 0 215px #d9a07e2b}to{transform:scale(1.01);box-shadow:0 0 100px #f0a05066,0 0 200px #d9a07e26}}.preset-modal{border:1px solid var(--border);background:#050505f5;color:var(--text);border-radius:16px;padding:24px;width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 64px);display:flex;flex-direction:column;box-shadow:0 20px 60px #00000080}.preset-modal-tip{margin:-4px 0 14px;color:var(--text-muted);font-size:13px}.preset-modal-body{overflow-y:auto;padding-right:4px;display:flex;flex-direction:column;gap:18px}.preset-modal-group-title{margin:0 0 8px;color:var(--text-muted);font-size:13px;font-weight:500}.preset-modal-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px}.preset-card{position:relative;border-radius:12px;background:#ffffff08;border:1px solid rgba(255,255,255,.06);transition:background .15s ease,border-color .15s ease,transform .15s ease}.preset-card:hover{background:#ffffff0f;border-color:#ffffff24;transform:translateY(-1px)}.preset-card-main{width:100%;display:flex;flex-direction:row;align-items:center;gap:12px;padding:10px 12px;border:0;background:transparent;color:var(--text);cursor:pointer;text-align:left}.preset-card-avatar{width:48px;height:48px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:#ffffff0d;flex-shrink:0}.preset-card-avatar img{width:100%;height:100%;object-fit:cover}.preset-card-avatar .default-avatar{width:100%;height:100%}.preset-card-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.preset-card-name{font-size:14px;font-weight:500}.preset-card-snippet{font-size:11px;color:var(--text-muted);line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.preset-card-delete{position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;border:0;background:#00000059;color:var(--text-muted);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .15s ease,background .15s ease}.preset-card:hover .preset-card-delete{opacity:1}.preset-card-delete:hover{background:#ff505033;color:#ff7878}.prompt-modal-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.prompt-modal-actions-right{display:flex;gap:10px}.save-preset-toggle{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-muted);cursor:pointer;-webkit-user-select:none;user-select:none}.save-preset-toggle input[type=checkbox]{width:14px;height:14px;cursor:pointer}.save-preset-toggle span{white-space:nowrap}
