*, *::before, *::after { box-sizing: border-box; }
html { background: #072033; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
html, body { margin: 0; min-height: 100%; min-height: 100dvh; background: #072033; }
body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 16px; line-height: 1.6;
  color: #f3f8fc; overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, select, textarea, input { font: inherit; color: inherit; background: none; border: 0; }
select { cursor: pointer; }
h1, h2, h3, h4, p, dl { margin: 0; }
:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 60; padding: 12px 16px; border-radius: 12px; background: rgba(224, 242, 254, 0.16); }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Google Translate host: keeps the widget out of the layout */
.gt-host { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skiptranslate,
.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
iframe.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame { display: none !important; visibility: hidden !important; height: 0 !important; }
body { top: 0 !important; position: static !important; }
font { font: inherit !important; color: inherit !important; vertical-align: baseline !important; line-height: inherit !important; }

.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(56, 189, 248, 0.24), transparent 60%),
    radial-gradient(720px 480px at 92% 8%, rgba(14, 165, 233, 0.20), transparent 58%),
    linear-gradient(180deg, #072033 0%, #0b3a58 48%, #072033 100%);
}
[data-theme="light"] .bg {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(56, 189, 248, 0.30), transparent 60%),
    radial-gradient(720px 480px at 92% 8%, rgba(125, 211, 252, 0.38), transparent 58%),
    linear-gradient(180deg, #eaf5fd 0%, #d7ecfb 48%, #eaf5fd 100%);
}

.shell { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.site-header, main, footer { position: relative; z-index: 1; }

.site-header {
  position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 1000;
  padding: 0.5rem 0;
}

main { padding-top: 100px; }

.glass {
  background: linear-gradient(165deg, rgba(224, 242, 254, 0.16), rgba(186, 230, 253, 0.10));
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(186, 230, 253, 0.28);
  box-shadow: 0 20px 40px -20px rgba(2, 40, 72, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* Header */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 64px; padding: 0.5rem 0.85rem; border-radius: 14px;
  background: rgba(15, 34, 50, 0.85); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
[data-theme="light"] .nav { background: rgba(255, 255, 255, 0.88); border-color: rgba(0, 0, 0, 0.12); }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-family: "Outfit", sans-serif; font-size: 1rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.mark { width: 32px; height: 32px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #38bdf8, #0369a1); }
.mark svg { display: block; width: 32px; height: 32px; padding: 7px; }
.links { display: flex; align-items: center; gap: 1.5rem; }
.links a, .drawer-card a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; color: #9ec4dc; white-space: nowrap; transition: color 0.2s ease; }
.links a:hover, .drawer-card a:not(.btn):hover { color: #f3f8fc; background: rgba(56, 189, 248, 0.14); }
.links a.active, .links a[aria-current="page"] { color: #f3f8fc; font-weight: 600; background: transparent; }
.tools { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.lang { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; flex-shrink: 0; }
.lang:hover { background: rgba(56, 189, 248, 0.14); }
.lang select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  width: 5rem; min-width: 52px; min-height: 44px;
  background-color: rgba(255, 255, 255, 0.08); color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px;
  padding: 0.4rem 1.6rem 0.4rem 0.6rem;
  font-family: "JetBrains Mono", monospace; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; outline: none; box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.5rem center;
}
.lang select:hover { background-color: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.35); }
.lang select:focus-visible { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25); }
.lang select option { background-color: #0f2232; color: #f1f5f9; padding: 8px 12px; font-family: "JetBrains Mono", monospace; font-size: 0.85rem; }
[data-theme="light"] .lang select {
  background-color: rgba(0, 0, 0, 0.05); color: #0f172a; border-color: rgba(0, 0, 0, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
[data-theme="light"] .lang select:hover { background-color: rgba(0, 0, 0, 0.1); border-color: rgba(0, 0, 0, 0.32); }
[data-theme="light"] .lang select:focus-visible { border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2); }
[data-theme="light"] .lang select option { background-color: #ffffff; color: #0f172a; }

.drawer {
  position: fixed; inset: 0; z-index: 40; padding: 88px 16px 16px;
  background: rgba(4, 20, 40, 0.6);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.drawer-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 24px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 999px; background: rgba(186, 230, 253, 0.10); color: #f3f8fc;
  border: 1px solid rgba(186, 230, 253, 0.28); cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn:hover { background: rgba(56, 189, 248, 0.14); border-color: #38bdf8; transform: translateY(-1px); }
.icon-btn:active, .btn:active, .filter-btn:active { transform: scale(0.97); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon, .icon-close, .menu-btn { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.menu-btn[aria-expanded="true"] .icon-menu { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: none;
  cursor: pointer; border: 0; white-space: nowrap;
  background: #38bdf8; color: #072033;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25); }
.btn.ghost { background: transparent; color: #f3f8fc; border: 1px solid rgba(186, 230, 253, 0.28); filter: none; }
.btn.ghost:hover { background: rgba(56, 189, 248, 0.14); border-color: #38bdf8; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.small { font-size: 0.85rem; min-height: 38px; padding: 0 14px; }
.btn:focus-visible, .icon-btn:focus-visible, .filter-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35); }

/* Search + filters */
.search-bar { position: relative; display: flex; align-items: center; width: 100%; }
.search-bar .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; stroke: #9ec4dc; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.search-bar input[type="search"], .search-bar input[type="text"] {
  width: 100%; min-height: 42px; padding: 8px 40px 8px 42px;
  border-radius: 999px; font-size: 0.9rem; color: #f3f8fc;
  background: rgba(186, 230, 253, 0.10); border: 1px solid rgba(186, 230, 253, 0.28);
  outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.search-bar input:hover { border-color: rgba(56, 189, 248, 0.4); }
.search-bar input:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25); background: rgba(224, 242, 254, 0.16); }
.search-bar input::placeholder { color: #9ec4dc; opacity: 0.8; }
.search-bar .clear-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; color: #9ec4dc; cursor: pointer;
  display: none; align-items: center; justify-content: center; padding: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.search-bar .clear-btn:hover { color: #f3f8fc; background: rgba(56, 189, 248, 0.14); }
.search-bar.has-val .clear-btn { display: flex; }

.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.filter-pills.compact { justify-content: flex-start; gap: 6px; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; font-family: inherit; font-size: 0.88rem; font-weight: 600;
  color: #9ec4dc; background: rgba(186, 230, 253, 0.10); border: 1px solid rgba(186, 230, 253, 0.28);
  cursor: pointer; user-select: none;
  transition: transform 0.15s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.filter-pills.compact .filter-btn { min-height: 32px; padding: 0 12px; font-size: 0.78rem; gap: 6px; }
.filter-btn:hover { color: #f3f8fc; border-color: #38bdf8; background: rgba(56, 189, 248, 0.14); transform: translateY(-1px); }
.filter-btn.active { color: #072033; background: #38bdf8; border-color: #38bdf8; box-shadow: 0 2px 14px rgba(56, 189, 248, 0.35); font-weight: 700; }
.filter-btn .count {
  font-family: "JetBrains Mono", monospace; font-size: 0.7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); color: inherit;
}
.filter-btn.active .count { background: rgba(0, 0, 0, 0.16); }

/* Page head */
.page-head { margin-bottom: 1.25rem; }
.page-head h2 { font-family: "Outfit", sans-serif; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; font-size: 2rem; line-height: 1.18; }
.page-head em { font-style: normal; color: #38bdf8; }
.page-head .lede { max-width: 80ch; color: #9ec4dc; font-size: 1.02rem; line-height: 1.7; text-wrap: pretty; }
.kicker { margin-bottom: 8px; font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7dd3fc; }

/* Layout */
.chat-layout {
  display: grid; gap: 1rem;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) minmax(210px, 250px);
  align-items: start; margin-top: 1.5rem;
}
.panel { border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-head h3 { font-family: "Outfit", sans-serif; font-size: 1.05rem; font-weight: 700; }
.panel-head .count {
  font-family: "JetBrains Mono", monospace; font-size: 0.72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; background: rgba(186, 230, 253, 0.14); color: #9ec4dc;
}
.panel-note { font-size: 0.78rem; line-height: 1.5; color: #9ec4dc; }
.panel-note.ok { color: #7dd3fc; }
.panel-note.warn { color: #fbbf24; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Models */
.model-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 46vh; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin;
}
.model-item {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 16px; position: relative;
  background: rgba(186, 230, 253, 0.06); border: 1px solid rgba(186, 230, 253, 0.18);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.model-item:hover { border-color: #38bdf8; background: rgba(56, 189, 248, 0.12); transform: translateY(-1px); }
.model-item.selected { border-color: #38bdf8; background: rgba(56, 189, 248, 0.16); }
.model-item.loaded::after {
  content: ""; position: absolute; right: 10px; top: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
}
.model-name { font-weight: 700; font-size: 0.9rem; }
.model-note { font-size: 0.74rem; color: #9ec4dc; }
.model-meta { font-family: "JetBrains Mono", monospace; font-size: 0.68rem; color: #7dd3fc; }
.model-flag {
  position: absolute; right: 10px; bottom: 8px;
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: #072033; background: #4ade80; padding: 1px 6px; border-radius: 999px; font-weight: 700;
}
.empty { font-size: 0.8rem; color: #9ec4dc; }

.load-box { display: flex; flex-direction: column; gap: 6px; }
.load-box .bar { height: 6px; border-radius: 999px; background: rgba(186, 230, 253, 0.16); overflow: hidden; }
.load-box .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #38bdf8, #7dd3fc); transition: width 0.25s ease; }
.load-text { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; color: #9ec4dc; }

/* Chat */
.panel.chat { min-height: 60vh; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chat-id { display: flex; flex-direction: column; }
.chat-id strong { font-family: "Outfit", sans-serif; font-size: 1.05rem; }
.chat-meta { font-size: 0.76rem; color: #9ec4dc; }
.chat-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.messages {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 34vh; max-height: 56vh; overflow-y: auto; padding: 4px 6px 4px 0;
  scrollbar-width: thin;
}
.message { display: flex; flex-direction: column; max-width: 88%; }
.message.user { align-self: flex-end; align-items: flex-end; }
.message.assistant, .message.system { align-self: flex-start; }
.bubble {
  padding: 12px 14px; border-radius: 18px; font-size: 0.94rem; line-height: 1.65;
  background: rgba(186, 230, 253, 0.10); border: 1px solid rgba(186, 230, 253, 0.22);
  overflow-wrap: anywhere;
}
.message.user .bubble { background: rgba(56, 189, 248, 0.22); border-color: rgba(56, 189, 248, 0.45); }
.message.system .bubble { color: #9ec4dc; font-size: 0.85rem; font-style: italic; }
.bubble b { font-weight: 700; }
.bubble code {
  font-family: "JetBrains Mono", monospace; font-size: 0.82em;
  background: rgba(4, 20, 40, 0.5); padding: 1px 5px; border-radius: 6px;
}
.bubble pre {
  margin: 8px 0; padding: 12px; border-radius: 12px; overflow-x: auto;
  background: rgba(4, 20, 40, 0.55); border: 1px solid rgba(186, 230, 253, 0.18);
  font-family: "JetBrains Mono", monospace; font-size: 0.78rem; line-height: 1.55;
}
.msg-meta { font-family: "JetBrains Mono", monospace; font-size: 0.66rem; color: #9ec4dc; margin-top: 4px; }
.typing { display: inline-block; width: 34px; height: 12px; position: relative; }
.typing::before, .typing::after, .typing {
  background-image: radial-gradient(currentColor 1.5px, transparent 1.6px);
  background-size: 8px 8px; background-repeat: repeat-x; color: #7dd3fc;
  animation: blink 1s steps(3, end) infinite;
}
@keyframes blink { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  cursor: pointer; font-size: 0.8rem; font-weight: 600; padding: 7px 12px; border-radius: 999px;
  color: #9ec4dc; background: rgba(186, 230, 253, 0.10); border: 1px solid rgba(186, 230, 253, 0.28);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.chip:hover { color: #f3f8fc; border-color: #38bdf8; background: rgba(56, 189, 248, 0.16); }

.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea {
  flex: 1; min-height: 52px; max-height: 180px; resize: vertical;
  padding: 12px 14px; border-radius: 18px; font-size: 0.95rem; color: #f3f8fc;
  background: rgba(186, 230, 253, 0.10); border: 1px solid rgba(186, 230, 253, 0.28);
  outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.composer textarea:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22); }
.composer textarea::placeholder { color: #9ec4dc; opacity: 0.85; }

.chat-settings { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 0.78rem; color: #9ec4dc; }
.chat-settings label { display: inline-flex; align-items: center; gap: 6px; }
.chat-settings label.wide { flex: 1 1 220px; }
.chat-settings input[type="range"] { width: 110px; accent-color: #38bdf8; }
.chat-settings input[type="number"], .chat-settings input[type="text"] {
  min-height: 34px; padding: 4px 10px; border-radius: 10px; color: #f3f8fc;
  background: rgba(186, 230, 253, 0.10); border: 1px solid rgba(186, 230, 253, 0.28); outline: none;
}
.chat-settings input[type="number"] { width: 84px; }
.chat-settings label.wide input[type="text"] { width: 100%; }
.chat-settings .mono { font-family: "JetBrains Mono", monospace; color: #7dd3fc; }

/* History */
.conv-list { display: flex; flex-direction: column; gap: 6px; max-height: 42vh; overflow-y: auto; scrollbar-width: thin; }
.conv-item {
  display: flex; align-items: center; gap: 4px; padding: 4px;
  border-radius: 14px; background: rgba(186, 230, 253, 0.06); border: 1px solid rgba(186, 230, 253, 0.16);
}
.conv-item.active { border-color: #38bdf8; background: rgba(56, 189, 248, 0.14); }
.conv-open { flex: 1; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.conv-open:hover { background: rgba(56, 189, 248, 0.12); }
.conv-title { font-size: 0.84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-meta { font-family: "JetBrains Mono", monospace; font-size: 0.64rem; color: #9ec4dc; }
.conv-del {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; color: #9ec4dc;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1;
}
.conv-del:hover { color: #f3f8fc; background: rgba(248, 113, 113, 0.22); }

.text-sm { display: block; margin-top: 1.5rem; font-size: 0.8rem; line-height: 1.7; color: #9ec4dc; }

/* Footer */
footer { padding: 32px 0 48px; }
.foot { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; padding: 32px; border-radius: 24px; }
.foot-brand p { max-width: 400px; margin-top: 16px; color: #9ec4dc; }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(186, 230, 253, 0.28); font-size: 14px; font-weight: 700; color: #9ec4dc; }
.social a:hover { color: #f3f8fc; background: rgba(56, 189, 248, 0.14); }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.foot-cols h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #38bdf8; }
.foot-cols a { display: flex; align-items: center; min-height: 36px; color: #9ec4dc; }
.foot-cols a:hover { color: #f3f8fc; }
.foot-cols a.active { color: #f3f8fc; }
.foot-end {
  display: flex; justify-content: space-between; gap: 16px; grid-column: 1 / -1;
  padding-top: 16px; border-top: 1px solid rgba(186, 230, 253, 0.28); color: #9ec4dc; font-size: 14px;
}

/* Light theme */
html[data-theme="light"], html[data-theme="light"] body { background: #eaf5fd; }
[data-theme="light"] body { color: #0b3a58; }
[data-theme="light"] .glass {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.88), rgba(224, 242, 254, 0.72));
  border-color: rgba(3, 105, 161, 0.22);
  box-shadow: 0 20px 40px -24px rgba(2, 40, 72, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
[data-theme="light"] .links a, [data-theme="light"] .drawer-card a:not(.btn) { color: #215a7d; }
[data-theme="light"] .links a:hover, [data-theme="light"] .drawer-card a:not(.btn):hover { color: #072033; background: rgba(56, 189, 248, 0.18); }
[data-theme="light"] .links a.active, [data-theme="light"] .links a[aria-current="page"] { color: #072033; background: rgba(56, 189, 248, 0.22); }
[data-theme="light"] .lang:hover { background: rgba(56, 189, 248, 0.18); }
[data-theme="light"] .icon-btn { background: rgba(255, 255, 255, 0.8); color: #072033; border-color: rgba(3, 105, 161, 0.25); }
[data-theme="light"] .btn.ghost { color: #0b3a58; border-color: rgba(3, 105, 161, 0.3); }
[data-theme="light"] .drawer { background: rgba(234, 245, 253, 0.78); }
[data-theme="light"] .search-bar input, [data-theme="light"] .composer textarea,
[data-theme="light"] .chat-settings input { background: rgba(255, 255, 255, 0.8); color: #072033; border-color: rgba(3, 105, 161, 0.25); }
[data-theme="light"] .search-bar input::placeholder, [data-theme="light"] .composer textarea::placeholder { color: #215a7d; }
[data-theme="light"] .search-bar .search-ico { stroke: #215a7d; }
[data-theme="light"] .filter-btn, [data-theme="light"] .chip { color: #215a7d; background: rgba(255, 255, 255, 0.7); border-color: rgba(3, 105, 161, 0.22); }
[data-theme="light"] .filter-btn:hover, [data-theme="light"] .chip:hover { color: #072033; background: rgba(56, 189, 248, 0.2); border-color: #0284c7; }
[data-theme="light"] .filter-btn.active { color: #072033; background: #38bdf8; border-color: #38bdf8; }
[data-theme="light"] .page-head .lede, [data-theme="light"] .panel-note, [data-theme="light"] .model-note,
[data-theme="light"] .model-meta, [data-theme="light"] .chat-meta, [data-theme="light"] .conv-meta,
[data-theme="light"] .msg-meta, [data-theme="light"] .empty, [data-theme="light"] .text-sm,
[data-theme="light"] .foot-brand p, [data-theme="light"] .social a, [data-theme="light"] .foot-cols a,
[data-theme="light"] .foot-end, [data-theme="light"] .load-text { color: #215a7d; }
[data-theme="light"] .kicker { color: #0369a1; }
[data-theme="light"] .model-item, [data-theme="light"] .conv-item { background: rgba(255, 255, 255, 0.68); border-color: rgba(3, 105, 161, 0.2); }
[data-theme="light"] .model-item:hover, [data-theme="light"] .model-item.selected { background: rgba(56, 189, 248, 0.18); border-color: #0284c7; }
[data-theme="light"] .bubble { background: rgba(255, 255, 255, 0.8); border-color: rgba(3, 105, 161, 0.22); }
[data-theme="light"] .message.user .bubble { background: rgba(56, 189, 248, 0.28); border-color: rgba(2, 132, 199, 0.5); }
[data-theme="light"] .bubble pre { background: rgba(7, 32, 51, 0.06); border-color: rgba(3, 105, 161, 0.2); }
[data-theme="light"] .chat-settings .mono { color: #0369a1; }
[data-theme="light"] .panel-head .count { background: rgba(3, 105, 161, 0.12); color: #215a7d; }

/* Responsive */
@media (max-width: 1180px) {
  .chat-layout { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); }
  .panel.history { grid-column: 1 / -1; }
  .conv-list { max-height: 26vh; }
}
@media (max-width: 860px) {
  .links { display: none; }
  .menu-btn { display: inline-flex; }
  .chat-layout { grid-template-columns: 1fr; }
  .model-list { max-height: 40vh; }
  .messages { max-height: 60vh; }
  .page-head h2 { font-size: 1.4rem; }
  .foot, .foot-cols { grid-template-columns: 1fr; }
  .foot-end { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
