:root {
  color-scheme: dark;
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  font-synthesis: none;
  color: #efeff3;
  background: #09090b;
  --canvas: #09090b;
  --surface: #141418;
  --line: #27272e;
  --sidebar: 264px;
  --rgb: linear-gradient(100deg, #ff3264, #9d45ff 23%, #4578ff 43%, #00d8f0 65%, #38f2a2 83%, #ff3264);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, textarea, input { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; background: none; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
button:focus-visible, a:focus-visible { outline: 2px solid #a7b7ff; outline-offset: 3px; }
textarea:focus { outline: none; }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.app { height: 100vh; height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); overflow: hidden; transition: grid-template-columns .22s ease; }
.sidebar { display: flex; flex-direction: column; width: var(--sidebar); min-height: 0; padding: 0 16px 16px; background: #111114; border-right: 1px solid var(--line); overflow: hidden; transition: transform .22s ease; }
.sidebar-head { display: flex; flex: 0 0 76px; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 6px; width: max-content; padding: 0 4px; font-size: 23px; font-weight: 800; letter-spacing: -.9px; }
.pearl-mark { display: inline-block; width: 32px; height: 32px; flex-shrink: 0; }
.pearl-mark svg { display: block; width: 100%; height: 100%; stroke: none; }
.new-chat { display: grid; place-items: center; flex-shrink: 0; width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #33333d; border-radius: 8px; background: #202027; font-size: 15px; font-weight: 550; color: #ececf4; transition: background .15s; }
.new-chat-label { position: relative; display: inline-flex; align-items: center; line-height: 20px; white-space: nowrap; }
.new-chat svg { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #b7b7c8; }
.new-chat:hover { background: #2a2a33; }
.history-search-dialog { position: fixed; inset: clamp(24px, 12vh, 132px) 0 auto; width: min(660px, calc(100% - 32px)); max-width: none; max-height: 77dvh; margin: 0 auto; padding: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #393842; border-radius: 12px; color: #efeff3; background: #17171d; }
.history-search-dialog[open] { animation: message-in .16s ease-out; }
.history-search-dialog::backdrop { background: #09090bd4; backdrop-filter: blur(2px); }
.history-search { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 11px 0 17px; color: #b0afc0; }
.history-search > svg { width: 20px; height: 20px; }
.history-search input { flex: 1; min-width: 0; min-height: 58px; padding: 0; border: 0; outline: 0; color: #efeff3; background: transparent; font: inherit; font-size: 17px; appearance: none; }
.history-search input::placeholder { color: #a3a3b2; opacity: 1; }
.history-search input::-webkit-search-cancel-button { display: none; }
.history-search button svg { width: 17px; height: 17px; }
.history-results { max-height: min(52dvh, 450px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.history-results .history-empty { margin: 14px 12px; }
.history-result { display: block; width: 100%; padding: 11px 12px; border-radius: 6px; text-align: left; font-size: 15px; line-height: 21px; }
.history-result:hover, .history-result:focus-visible { background: #25252e; }
.history-result:focus-visible { outline-offset: -2px; }
.history { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; margin-top: 25px; padding: 2px 0 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #37373f transparent; }
.history-group { flex-shrink: 0; margin: 23px 10px 6px; color: #a9a9b5; font-size: 13px; line-height: 20px; font-weight: 500; }
.history-group:first-child { margin-top: 0; }
.history-empty { margin: 6px 11px; font-size: 14px; font-weight: 650; color: #a0a0af; line-height: 1.6; }
.history-item { display: flex; align-items: center; min-height: 44px; flex-shrink: 0; border-radius: 6px; transition: background .12s; }
.history-item:hover { background: #19191f; }
.history-item.active { background: #212129; }
.history-open { flex: 1; min-width: 0; text-align: left; padding: 11px 6px 11px 10px; font-size: 15px; font-weight: 500; line-height: 22px; color: #dfdfe7; border-radius: 6px; }
.history-open:focus-visible, .history-delete:focus-visible { outline-offset: -2px; }
.history-label { display: grid; grid-template-columns: minmax(0,1fr); gap: 2px; }
.history-title, .history-excerpt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-excerpt { color: #ababba; font-size: 13px; line-height: 18px; font-weight: 550; }
.active .history-open { color: #f5f5fa; }
.history-delete { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; opacity: 0; margin-right: 3px; border-radius: 4px; color: #9797a8; transition: opacity .12s, color .12s; }
.history-delete svg { width: 15px; height: 15px; }
.history-item:hover .history-delete, .history-item:focus-within .history-delete { opacity: 1; }
.history-delete:hover { background: #352329; color: #ff9aab; }
.clear-chats { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-top: 10px; padding: 13px 10px 5px; border-top: 1px solid var(--line); color: #a3a3b1; font-size: 14px; font-weight: 650; text-align: left; }
.clear-chats svg { width: 16px; height: 16px; }
.clear-chats:hover:not(:disabled) { color: #ff9aab; }
.clear-chats:disabled { opacity: .35; }

.main { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: 76px minmax(0,1fr) auto; min-width: 0; min-height: 0; background: var(--canvas); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-new-chat { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 11px; border: 1px solid #303038; border-radius: 6px; color: #dedee8; font-size: 13px; font-weight: 700; white-space: nowrap; }
.topbar-new-chat svg { width: 16px; height: 16px; }
.topbar-new-chat:hover { background: #1c1c22; border-color: #464652; }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 6px; color: #a0a0ae; flex-shrink: 0; }
.icon-button:hover { background: #202027; color: #f3f3f7; }
.sidebar-quickbar { display: flex; align-items: center; flex-shrink: 0; }
.sidebar-quickbar.compact-actions { gap: 2px; padding: 3px; border: 1px solid #32323b; border-radius: 12px; background: #17171d; }
.sidebar-quickbar.compact-actions .icon-button { width: 34px; height: 34px; border-radius: 8px; color: #d3d3de; }
.sidebar-quickbar.compact-actions .icon-button:hover { background: #2a2a34; color: #fff; }
.sidebar-quickbar.compact-actions .icon-button svg { width: 18px; height: 18px; }
#open-history-search svg { width: 25px; height: 25px; }
.sidebar-quickbar.compact-actions #quick-history-search svg { width: 21px; height: 21px; }
.model-name { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 16px; font-weight: 750; letter-spacing: -.35px; }
#model-display-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.model-size { font-size: 12px; color: #8d8d9a; font-weight: 600; letter-spacing: .02em; }
.conversation-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; outline: none; scrollbar-width: thin; scrollbar-color: #37373f transparent; }
.conversation-scroll:focus-visible { outline: 1px solid #484856; outline-offset: -1px; }
.welcome { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px 100px; text-align: center; }
.hero-mark { width: 72px; height: 72px; margin-bottom: 24px; animation: lens-breathe 4s ease-in-out infinite alternate; }
.hero-mark svg { filter: drop-shadow(0 0 4px rgb(112 83 255 / 25%)); }
.welcome h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 750; line-height: 1.3; letter-spacing: -1.3px; margin: 0; }
.messages { display: flex; flex-direction: column; gap: 32px; width: min(100%, 824px); min-height: 100%; padding: 30px 28px 36px; margin: 0 auto; }
.message { min-width: 0; max-width: 100%; flex-shrink: 0; animation: message-in .2s ease both; }
.message.user { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; max-width: min(82%, 640px); color: #ebebf2; }
.user-content { max-width: 100%; padding: 12px 16px; border-radius: 6px; background: #16161b; font-size: 16px; font-weight: 500; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.assistant { width: 100%; padding: 2px 0 10px; }
.assistant-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 14px; font-weight: 750; }
.assistant-heading .pearl-mark { width: 24px; height: 24px; }
.assistant-content { padding-left: 41px; font-size: 16px; font-weight: 500; line-height: 1.85; color: #d3d3dc; overflow-wrap: anywhere; }
.assistant-content p { margin: 0 0 16px; }
.assistant-content p:last-child { margin-bottom: 0; }
.assistant-content strong { color: #f3f3f7; font-weight: 750; }
.assistant-content h1, .assistant-content h2, .assistant-content h3, .assistant-content h4, .assistant-content h5, .assistant-content h6 { color: #f3f3f7; font-weight: 750; line-height: 1.4; margin: 24px 0 12px; }
.assistant-content h1 { font-size: 1.6em; }
.assistant-content h2 { font-size: 1.35em; }
.assistant-content h3 { font-size: 1.15em; }
.assistant-content h4, .assistant-content h5, .assistant-content h6 { font-size: 1em; }
.assistant-content > :first-child { margin-top: 0; }
.assistant-content ul, .assistant-content ol { padding-left: 22px; }
.assistant-content pre { margin: 16px 0; padding: 14px 16px; border: 1px solid #29292f; border-radius: 6px; background: #101013; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-content pre code { font-family: Consolas, monospace; font-size: .88em; }
.assistant-content li { margin: 7px 0; }
.message-actions { display: flex; gap: 4px; margin: 10px 0 0 34px; }
.message-actions .icon-button { width: 30px; height: 30px; opacity: 0; }
.message-actions svg { width: 16px; height: 16px; }
.message:hover .message-actions .icon-button, .message-actions:focus-within .icon-button { opacity: 1; }
.message .message-actions .icon-button:disabled { opacity: .3; cursor: default; background: transparent; }
.message.user .message-actions { justify-content: flex-end; margin: 5px 0 0; }
.message.user .message-actions .icon-button { opacity: .7; width: 27px; height: 27px; }
.message.user .message-actions .icon-button:hover, .message.user .message-actions .icon-button:focus-visible { opacity: 1; }
.message.user .message-actions svg { width: 14px; height: 14px; }
.typing-caret:after { content: ''; display: inline-block; width: 5px; height: 14px; background: #b2bfff; margin-left: 5px; vertical-align: -2px; animation: blink 1s steps(2,start) infinite; }

.composer-region { padding: 12px 32px 22px; background: var(--canvas); }
.composer-width { width: min(100%, 768px); margin: 0 auto; position: relative; }
.composer-metrics { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 7px -3px 0; min-height: 36px; }
.context-usage { position: relative; color: #92929f; }
.context-toggle { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #bdb8d1; font-size: 13px; font-weight: 700; border-radius: 50%; }
.context-toggle:hover, .context-toggle:focus-visible { color: #e3dff4; }
.context-ring { width: 40px; height: 40px; transform: rotate(-90deg); fill: none; }
.context-percent { position: absolute; inset: 0; display: grid; place-items: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.context-ring-track { stroke: #292933; stroke-width: 2.5; }
.context-fill { stroke: #9a8bfa; stroke-width: 2.5; stroke-linecap: round; transition: stroke-dashoffset .2s ease, stroke .2s; }
.context-details { position: absolute; left: 0; bottom: calc(100% + 9px); z-index: 12; width: min(340px,calc(100vw - 44px)); max-height: calc(100dvh - 180px); overflow-y: auto; padding: 16px; background: #17171d; border: 1px solid #36353f; border-radius: 10px; color: #aaa9b9; font-size: 13px; line-height: 1.5; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .12s; }
.context-usage:hover .context-details, .context-usage:focus-within .context-details, .context-usage.is-open .context-details { visibility: visible; opacity: 1; pointer-events: auto; }
.context-usage::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 10px; }
.context-details strong, #context-count { display: block; }
.context-details strong { color: #e6e3f1; font-size: 14px; margin-bottom: 4px; }
.context-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.context-heading > span { color: #a399c6; font-size: 10px; font-weight: 650; letter-spacing: .06em; }
.context-stats { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px 16px; margin: 12px 0 0; }
.context-stats dt { color: #92909f; }
.context-stats dd { margin: 0; color: #dedbe8; text-align: right; font-variant-numeric: tabular-nums; }
.context-section { margin-top: 13px; padding-top: 11px; border-top: 1px solid #303039; color: #b5b0c7; font-size: 13px; }
.context-section + .context-stats { margin-top: 8px; }
#context-count { color: #cbc6e0; font-variant-numeric: tabular-nums; }
.context-details p { margin: 7px 0 0; }
.context-note { color: #d6b979; }
.context-usage[data-state="warning"] .context-fill { stroke: #d5a653; }
.context-usage[data-state="critical"] .context-fill { stroke: #e27788; }
.context-usage[data-state="critical"] .context-note { color: #dc929f; }
.context-usage[data-state="unavailable"] .context-fill { opacity: .3; }
.generation-speed { display: flex; align-items: baseline; gap: 9px; font-size: 13px; color: #858393; }
#speed-value { color: #b4b1c3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.generation-speed[data-preview="true"] #speed-value { color: #858393; }
.thought-indicator { display: inline-flex; height: 18px; align-items: center; margin-right: 9px; }
.thought-indicator i { width: 5px; height: 5px; border-radius: 50%; background: #aaa6b6; animation: thought-breathe 2s ease-in-out infinite; }
.reasoning-title { vertical-align: middle; }
.preview-label { color: #8e899f; font-size: 12px; font-weight: 500; }
@keyframes thought-breathe { 0%,100% { opacity: .35; } 50% { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .thought-indicator i { animation: none; opacity: .65; } .context-fill { transition: none; } }
.composer { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px 14px; min-height: 64px; padding: 14px 14px 14px 20px; border-radius: 12px; background: #35353f; box-shadow: 0 0 16px rgb(103 72 255 / 10%), -7px 0 18px -7px rgb(255 50 100 / 15%), 7px 0 18px -7px rgb(0 216 240 / 15%); }
/* Opaque inset surface: the RGB layer can never fill the input, even without mask support. */
.composer:after { content: ''; position: absolute; z-index: 1; inset: 1.5px; border-radius: 10.5px; background: #131316; pointer-events: none; }
.composer-edge { position: absolute; z-index: 0; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; opacity: .9; transition: opacity .2s; }
.composer-edge:before { content: ''; position: absolute; inset: 0 -100%; background: var(--rgb); transform: translateX(-18%); animation: rgb-drift 5s ease-in-out infinite alternate; }
.composer:focus-within, .composer:has(.streaming) { box-shadow: 0 0 19px rgb(103 72 255 / 16%), -7px 0 20px -7px rgb(255 50 100 / 22%), 7px 0 20px -7px rgb(0 216 240 / 22%); }
.composer:focus-within .composer-edge, .composer:has(.streaming) .composer-edge { opacity: 1; }
.composer:focus-within .composer-edge:before, .composer:has(.streaming) .composer-edge:before { animation-play-state: running; }
.composer textarea { position: relative; z-index: 2; grid-column: 1 / -1; width: 100%; min-width: 0; max-height: 160px; border: 0; padding: 2px 0; resize: none; background: transparent; color: #f0f0f6; font-size: 16px; font-weight: 550; line-height: 24px; caret-color: #c5cfff; scrollbar-width: thin; scrollbar-color: #474752 transparent; }
.search-mode { position: relative; z-index: 2; justify-self: start; display: flex; align-items: center; gap: 7px; min-height: 32px; padding: 6px 10px; margin-left: -5px; border: 1px solid transparent; border-radius: 7px; color: #868693; font-size: 13px; font-weight: 650; transition: color .18s, background .18s, border-color .18s; }
.search-mode svg { width: 16px; height: 16px; stroke-width: 1.7; }
.search-mode:hover { color: #c8c8d4; background: #202027; }
.search-mode[aria-pressed="true"] { color: #d5e8ff; background: #182742; }
.search-mode[aria-pressed="true"] svg { color: #7abaff; }
.search-mode[aria-pressed="true"]:hover { background: #203557; }
.composer-modes { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.composer-modes .search-mode { margin-left: 0; font-size: 14px; }
.reasoning-mode[aria-pressed="true"] { color: #e3d9ff; background: #292039; }
.reasoning-mode[aria-pressed="true"] svg { color: #bd9cff; }
.reasoning-mode[aria-pressed="true"]:hover { background: #352748; }
.reasoning-mode:disabled { opacity: .45; cursor: not-allowed; }
.reasoning-hint { margin: 7px 0 0; color: #9996aa; font-size: 12px; line-height: 1.5; text-align: center; }
.reasoning-block { margin: 0 0 16px; padding: 0 0 0 14px; border-left: 2px solid #514166; color: #a6a0b5; font-size: 14px; line-height: 1.7; }
.reasoning-block summary { display: flex; align-items: center; list-style: none; width: fit-content; cursor: pointer; color: #c8bbdf; font-weight: 650; min-height: 30px; padding: 3px 0; }
.reasoning-block summary::marker { content: ''; }
.reasoning-block summary::-webkit-details-marker { display: none; }
.reasoning-block summary:after { content: ''; width: 6px; height: 6px; margin: 0 3px 0 11px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); opacity: .65; transition: transform .15s ease; }
.reasoning-block[open] > summary:after { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .reasoning-block summary:after { transition: none; } }
.reasoning-block summary:hover { color: #e3d7f6; }
.reasoning-block summary:focus-visible { outline: 1px solid #a68beb; outline-offset: 4px; border-radius: 3px; }
.assistant-content.typing-caret:has(.reasoning-block[data-state="thinking"]):after { display: none; }
.answer-content > :first-child { margin-top: 0; }
.reasoning-body { padding-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reasoning-body:empty { display: none; }
.composer textarea::placeholder { color: #898995; opacity: 1; }
.send-button { position: relative; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; padding: 0; border-radius: 7px; background: #eeeeF5; color: #15151b; transition: background .15s; }
.send-button:disabled { background: #292930; color: #757580; }
.send-button:hover:not(:disabled) { background: #fff; }
.send-button.streaming { background: #343441; color: #f1f1f8; }
.stop-symbol { width: 10px; height: 10px; background: currentColor; border-radius: 1px; }
.composer-caption { text-align: center; font-size: 11px; font-weight: 550; line-height: 1.6; color: #82828e; margin: 12px 0 0; }
.jump-bottom { position: absolute; top: -48px; left: calc(50% - 18px); border: 1px solid #3c3c46; background: #19191f; border-radius: 8px; }
.scrim { display: none; }
.sidebar-collapsed { grid-template-columns: 0 minmax(0,1fr); }
.sidebar-collapsed .sidebar { transform: translateX(-100%); pointer-events: none; }
.motion-paused .hero-mark, .motion-paused .composer-edge:before { animation-play-state: paused !important; }

.dialog { width: min(400px, calc(100% - 32px)); padding: 28px; border: 1px solid #373741; border-radius: 12px; color: #f0f0f5; background: #16161b; }
.dialog::backdrop { background: #000a; }
.dialog h2 { font-size: 21px; font-weight: 750; letter-spacing: -.5px; margin: 0 0 12px; }
.dialog p { font-size: 14px; line-height: 1.8; color: #aaaab6; margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.dialog-actions button { padding: 10px 16px; border: 1px solid #40404b; border-radius: 6px; font-size: 14px; font-weight: 650; }
.dialog-actions button:hover { background: #282830; }
.dialog-actions .delete-confirm { color: #ff9baa; border-color: #72444f; }
.toast { position: fixed; right: 20px; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 8; transform: translateY(6px); opacity: 0; pointer-events: none; padding: 7px 12px; max-width: min(320px, calc(100% - 32px)); border: 1px solid #41414c; border-radius: 6px; background: #222229; font-size: 13px; font-weight: 600; line-height: 1.6; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.model-dialog { width: min(470px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; }
.model-dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.model-dialog-heading h2 { margin: 0; }
.model-field { display: grid; gap: 9px; margin-top: 18px; font-size: 13px; font-weight: 600; color: #d2d2dc; }
.model-field select, .model-field input { min-width: 0; width: 100%; height: 42px; border: 1px solid #3b3b46; border-radius: 6px; background: #101014; color: #ededf5; padding: 0 12px; font: inherit; font-size: 13px; }
.model-field select:focus, .model-field input:focus { outline: 1px solid #a1a9d2; outline-offset: 1px; }
.model-dialog .model-help { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: #9494a3; }
.model-dialog .model-status { margin-top: 22px; padding: 14px 0; border-block: 1px solid #303039; font-size: 13px; line-height: 1.8; color: #c5c5d1; white-space: pre-line; overflow-wrap: anywhere; }
.model-status.error { color: #ff9aab; }
.generation-settings { margin-top: 22px; }
.generation-settings summary { cursor: pointer; color: #a5a5b5; font-size: 13px; font-weight: 600; }
.generation-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.model-dialog-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.model-dialog-actions button { min-height: 40px; padding: 10px 18px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.model-load { color: #17171b; background: #eeeef5; }
.model-unload { border: 1px solid #41414c; color: #c1c1cd; }
.model-dialog-actions button:disabled { opacity: .4; }
.empty-answer { color: #8c8c9b; font-size: 14px; }
.attention-link { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding: 13px 0; border-block: 1px solid #303039; color: #d2d4e6; font-size: 13px; font-weight: 650; }
.attention-link span { color: #98afff; }
.attention-link:hover { color: #fff; }
.token-inspection-setting { display: flex; align-items: flex-start; gap: 11px; margin-top: 22px; cursor: pointer; font-size: 13px; font-weight: 650; color: #dedee7; }
.token-inspection-setting input { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; accent-color: #929fff; }
.token-inspection-setting small { display: block; margin-top: 7px; color: #9494a3; line-height: 1.7; font-size: 12px; font-weight: 500; }
.token-word { border-bottom: 1px dotted #555d78; cursor: help; border-radius: 2px; }
.token-word:hover, .token-word:focus-visible { color: #f5f5ff; background: #283047; outline: none; border-bottom-color: #a1b5ff; }
.token-inspector { position: fixed; z-index: 30; width: min(350px, calc(100vw - 24px)); max-height: min(440px, calc(100dvh - 24px)); overflow-y: auto; overscroll-behavior: contain; padding: 15px; border: 1px solid #454553; border-radius: 9px; background: #17171e; color: #dedee9; font-size: 13px; line-height: 1.5; scrollbar-width: thin; scrollbar-color: #51515f transparent; }
.token-inspector-heading { font-size: 14px; font-weight: 750; overflow-wrap: anywhere; margin-bottom: 4px; }
.token-inspector-note { color: #9696aa; font-size: 11px; }
.token-decision { border-top: 1px solid #32323e; margin-top: 12px; padding-top: 10px; }
.token-decision-title { color: #a5a8ba; margin-bottom: 7px; font-size: 13px; overflow-wrap: anywhere; }
.token-candidate { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 7px; border-radius: 4px; }
.token-candidate code { font-family: Consolas, monospace; overflow-wrap: anywhere; white-space: pre-wrap; }
.token-candidate.selected { color: #c8dcff; background: #242e43; }
.token-candidate-prob { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.token-choice-outside { margin: 7px 0 0; color: #c6d8ff; font-size: 11px; overflow-wrap: anywhere; }
.message.error .assistant-content { color: #ff9aab; }
@keyframes lens-breathe { from { opacity: .94; } to { opacity: 1; } }
@keyframes rgb-drift { from { transform: translateX(-18%); } to { transform: translateX(18%); } }
@keyframes message-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { to { visibility: hidden; } }
@media (hover: none) { .history-delete, .message-actions .icon-button { opacity: 1; } }
@media (min-width: 1500px) { .composer-width { width: min(100%, 820px); } .messages { width: min(100%, 876px); } }
@media (max-width: 760px) {
  :root { --sidebar: min(272px, 90vw); }
  .app, .sidebar-collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; transform: translateX(-100%); pointer-events: none; }
  .sidebar-open .sidebar { transform: translateX(0); pointer-events: auto; }
  .sidebar-head { flex-basis: 64px; }
  .history-search-dialog { top: 24px; }
  .sidebar-open .scrim { display: block; position: fixed; inset: 0; background: #0009; z-index: 4; }
  .main { grid-template-rows: 64px minmax(0, 1fr) auto; }
  .topbar { padding: 0 16px; }
  .topbar-left { gap: 12px; }
  .topbar-right { gap: 6px; }
  .topbar-new-chat { gap: 6px; padding: 7px 9px; font-size: 13px; }
  .welcome { padding: 24px 20px 72px; }
  .hero-mark { width: 64px; height: 64px; margin-bottom: 20px; }
  .welcome h1 { font-size: 28px; letter-spacing: -1px; }
  .composer-region { padding: 10px 16px max(14px, env(safe-area-inset-bottom)); }
  .composer { padding: 12px 12px 12px 16px; gap: 10px; min-height: 60px; }
  .composer-caption { font-size: 10px; margin-top: 10px; min-height: 32px; display: flex; align-items: center; justify-content: center; }
  .has-toast .composer-caption { visibility: hidden; }
  .toast { right: 16px; }
  .messages { padding: 24px 20px 28px; gap: 28px; }
  .message.user { max-width: 92%; }
  .user-content { padding: 11px 14px; font-size: 15px; }
  .assistant-content { padding-left: 0; }
  .message-actions { margin-left: -6px; }
  .history-delete { opacity: 1; }
}
@media (max-width: 420px) { .topbar-new-chat span { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
