:root {
  color-scheme: light;
  --bg: #F7F3EC;
  --sidebar: #EFE9DD;
  --surface: #FCFAF6;
  --raised: #F1ECE1;
  --overlay: #FCFAF6;
  --border: #958A77;
  --border-strong: #7E7463;
  --text: #1F1B16;
  --text-2: #3F392F;
  --muted: #655D52;
  --faint: #A39A8B;
  --accent: #1E6B53;
  --accent-hover: #247E63;
  --accent-press: #175543;
  --accent-soft: rgba(30, 107, 83, 0.10);
  --on-accent: #FFFFFF;
  --danger: #B4392D;
  --danger-soft: rgba(180, 57, 45, 0.10);
  --success: #1E6B53;
  --scrim: rgba(31, 27, 22, 0.4);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --dur-micro: 120ms;
  --dur-base: 240ms;
  --dur-enter: 480ms;
  --ease-enter: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --panel: var(--surface);
  --panel2: var(--raised);
  --line: var(--border);
  --soft: var(--text-2);
  --accent2: var(--accent);
  --shadow: none;
  --control-border: var(--border-strong);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0F1311;
    --sidebar: #0B0F0D;
    --surface: #161C19;
    --raised: #1D2521;
    --overlay: #1D2521;
    --border: #5D6A62;
    --border-strong: #6C7970;
    --text: #ECF1EC;
    --text-2: #C3CEC7;
    --muted: #9AA8A0;
    --faint: #6F7D75;
    --accent: #E8B04B;
    --accent-hover: #F0BE63;
    --accent-press: #D49E3C;
    --accent-soft: rgba(232, 176, 75, 0.12);
    --on-accent: #1A1405;
    --danger: #E5675A;
    --danger-soft: rgba(229, 103, 90, 0.12);
    --success: #5DBB8A;
    --scrim: rgba(5, 8, 6, 0.6);
    --control-border: var(--border-strong);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0F1311;
  --sidebar: #0B0F0D;
  --surface: #161C19;
  --raised: #1D2521;
  --overlay: #1D2521;
  --border: #5D6A62;
  --border-strong: #6C7970;
  --text: #ECF1EC;
  --text-2: #C3CEC7;
  --muted: #9AA8A0;
  --faint: #6F7D75;
  --accent: #E8B04B;
  --accent-hover: #F0BE63;
  --accent-press: #D49E3C;
  --accent-soft: rgba(232, 176, 75, 0.12);
  --on-accent: #1A1405;
  --danger: #E5675A;
  --danger-soft: rgba(229, 103, 90, 0.12);
  --success: #5DBB8A;
  --scrim: rgba(5, 8, 6, 0.6);
  --control-border: var(--border-strong);
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 14px; }
body { line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--text); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
[hidden], .hidden { display: none !important; }
.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; }
.app-shell { display: flex; width: 100%; height: 100dvh; min-height: 0; overflow: hidden; }
.sidebar { display: flex; flex: 0 0 264px; flex-direction: column; width: 264px; height: 100%; min-height: 0; padding: 12px; background: var(--sidebar); border-right: 1px solid var(--border); overflow: hidden; z-index: 5; }
.brand-row { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px 12px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--raised); color: var(--text); font: 600 22px/1 var(--font-display); }
.brand-mark > span { display: block; }
.brand-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 1px; }
.brand-copy strong, .auth-brand b { color: var(--text); font: 600 19px/1.2 var(--font-display); letter-spacing: -0.5px; }
.brand-copy strong span, .auth-brand b span { color: var(--text-2); }
.brand-copy small { display: none; }
.icon-btn, .tiny-icon, .modal-close { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted); }
.icon-btn:hover, .tiny-icon:hover, .modal-close:hover { background: var(--raised); border-color: var(--border); color: var(--text); }
.icon-btn i, .modal-close i { font-size: 20px; line-height: 1; }\n.tiny-icon i { font-size: 16px; line-height: 1; }
.desktop-collapse { width: 32px; height: 32px; margin-left: auto; }
.mobile-only { display: none; }
.new-chat { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); text-align: left; font-weight: 600; transition: background var(--dur-micro), border-color var(--dur-micro); }
.new-chat:hover { background: var(--raised); border-color: var(--border-strong); }
.plus { display: inline-grid; place-items: center; color: var(--text-2); font-size: 18px; }
kbd { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; padding: 2px 5px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font: 400 12px/1.3 var(--font-mono); white-space: nowrap; }
.side-section { margin-top: 20px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 28px; padding: 0 4px 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.tiny-icon { width: 28px; height: 28px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; margin: 1px 0; padding: 0 10px 0 12px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-2); text-align: left; font-size: 14px; font-weight: 500; }
.nav-item:hover { background: color-mix(in srgb, var(--raised) 60%, transparent); color: var(--text); }
.nav-item.active { background: var(--raised); color: var(--text); }
.nav-item.active::before { position: absolute; left: 6px; top: 50%; width: 2px; height: 16px; border-radius: 2px; background: var(--accent); content: ""; transform: translateY(-50%); }
.nav-icon { display: inline-grid; place-items: center; width: 18px; color: var(--muted); font-size: 18px; }
.nav-item.active .nav-icon, .nav-item:hover .nav-icon { color: var(--text); }
.nav-end { margin-left: auto; color: var(--muted); font: 400 12px var(--font-mono); }
.history-wrap { display: flex; flex: 1; flex-direction: column; min-height: 0; margin-top: 20px; overflow: hidden; }
.chat-list { display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: auto; }
.history-item { display: flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 6px 0 10px; border-radius: var(--r-sm); color: var(--text-2); }
.history-item:hover, .history-item.selected { background: var(--raised); color: var(--text); }
.history-title { flex: 1; min-width: 0; overflow: hidden; border: 0; background: transparent; color: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.history-delete { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); opacity: 0; }
.history-item:hover .history-delete, .history-item:focus-within .history-delete { opacity: 1; }
.history-delete:hover { background: var(--surface); color: var(--text); }
.empty-history { margin: 8px 4px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.sidebar-bottom { flex: 0 0 auto; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.account-cta { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--text); text-align: left; }
.account-cta:hover { background: var(--raised); border-color: var(--border); }
.account-icon, .avatar { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 50%; background: var(--raised); color: var(--text); font-weight: 600; }
.account-row-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.account-row-copy b { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-row-copy small { color: var(--muted); font-size: 12.5px; }
.account-row-end { color: var(--muted); }
.main-area { display: flex; flex: 1; flex-direction: column; width: 0; min-width: 0; height: 100%; min-height: 0; background: var(--bg); }
.topbar { display: flex; flex: 0 0 56px; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--bg); }
.top-left, .top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.breadcrumb { overflow: hidden; color: var(--muted); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb span { padding: 0 8px; color: var(--faint); }
.breadcrumb b { color: var(--text); font-weight: 600; }
.model-picker-label { position: relative; display: flex; align-items: center; }
.model-picker-label > i { position: absolute; right: 10px; color: var(--muted); font-size: 14px; pointer-events: none; }
.model-picker { max-width: 180px; min-height: 36px; padding: 0 28px 0 10px; appearance: none; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; }
.model-picker:hover { border-color: var(--border-strong); }
.provider-pill { padding: 0 4px; color: var(--danger); font-size: 13px; }
.provider-pill i { display: none; }
.panel { display: none; flex: 1; min-height: 0; }
.panel.active-panel { display: flex; flex-direction: column; }
.panel.active-panel:not(#chatPanel) { overflow-y: auto; }
.conversation-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.welcome { width: min(720px, calc(100% - 48px)); margin: auto; padding: clamp(32px, 7vh, 64px) 0 24px; text-align: center; }
.welcome h1 { margin: 0 0 24px; color: var(--text); font: 600 clamp(32px, 4.5vw, 48px)/1.1 var(--font-display); letter-spacing: -0.02em; text-wrap: balance; }
.welcome h1 em { color: inherit; font-style: normal; }
.welcome-sub, .eyebrow, .welcome-orb { display: none !important; }
.suggestion-grid { display: none; }
.suggestion-list { display: flex; flex-direction: column; margin-top: 20px; border-top: 1px solid var(--border); text-align: left; }
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 44px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--border); border-radius: var(--r-sm); background: transparent; color: var(--text-2); text-align: left; font-size: 15px; }
.suggestion:hover, .suggestion:focus-visible { background: var(--raised); color: var(--text); }
.suggestion-arrow { color: var(--muted); opacity: 0; }
.suggestion:hover .suggestion-arrow, .suggestion:focus-visible .suggestion-arrow { opacity: 1; }
.messages { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 16px 0 28px; }
.message { display: flex; align-items: flex-start; gap: 12px; margin: 24px 0; }
.message.user { justify-content: flex-end; }
.message-avatar { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; background: var(--raised); color: var(--text); }
.message-content { max-width: calc(100% - 40px); min-width: 0; overflow-wrap: anywhere; color: var(--text); font-size: 16px; line-height: 1.65; }
.message.user .message-content { max-width: 80%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--raised); white-space: pre-wrap; }
.message.assistant .message-content { padding: 0; }
.message-content p { margin: 0 0 1em; }
.message-content p:last-child { margin-bottom: 0; }
.message-content h1, .message-content h2, .message-content h3, .message-content h4, .message-content h5, .message-content h6 { margin: 1.4em 0 .5em; color: var(--text); font-family: var(--font-display); line-height: 1.3; font-weight: 600; }
.message-content h1 { font-size: 22px; }
.message-content h2 { font-size: 18px; }
.message-content h3 { font-size: 16px; }
.message-content strong { font-weight: 600; }
.message-content em { color: var(--text-2); }
.message-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.message-content a:hover { color: var(--accent-hover); }
.message-content ul, .message-content ol { margin: 8px 0 15px; padding-left: 1.4em; }
.message-content li { margin: 6px 0; }
.message-content li::marker { color: var(--muted); }
.message-content blockquote { margin: 12px 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--border-strong); color: var(--text-2); }
.message-content hr { height: 1px; margin: 18px 0; border: 0; background: var(--border); }
.message-content pre { overflow: auto; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--sidebar); color: var(--text); font: 400 13.5px/1.6 var(--font-mono); white-space: pre; }
.message-content code { border-radius: 6px; background: var(--raised); padding: 2px 6px; font: 400 14px/1.5 var(--font-mono); }
.message-content pre code { padding: 0; background: transparent; }
.message-actions { display: flex; gap: 6px; margin-top: 8px; }
.message-actions button { min-width: 28px; min-height: 28px; padding: 4px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.message-actions button:hover { background: var(--raised); color: var(--text); }
.typing { display: flex; align-items: center; gap: 8px; width: min(720px, calc(100% - 32px)); margin: 0 auto 16px; padding: 8px 0; color: var(--muted); font-size: 14px; }
.typing span { display: none; }
.composer-zone { flex: 0 0 auto; width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 10px 0 max(12px, env(safe-area-inset-bottom)); background: var(--bg); }
.composer { width: 100%; margin: 0 auto; padding: 12px 12px 10px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); transition: border-color var(--dur-micro), outline-color var(--dur-micro); }
.composer:focus-within { border-color: var(--accent); outline: 3px solid var(--accent-soft); outline-offset: 0; }
.composer textarea { display: block; width: 100%; min-height: 52px; max-height: 192px; padding: 4px 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; line-height: 1.6; }
.composer textarea:focus-visible { outline: 0; }
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 0; border: 0; }
.composer-tools, .send-area { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted); font-size: 13px; }
.tool-btn i { font-size: 16px; }
.tool-btn:hover { background: var(--raised); color: var(--text); }
.tool-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.tool-btn span:first-child { color: inherit; }
.tool-separator { display: none; }
.input-hint { display: none; color: var(--muted); font-size: 12px; white-space: nowrap; }
.composer:focus-within .input-hint:not(.hidden) { display: inline; }
.send-btn { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: var(--accent); color: var(--on-accent); transition: background var(--dur-micro), color var(--dur-micro); }
.send-btn i { font-size: 18px; }
.send-btn:hover:not(:disabled) { background: var(--accent-hover); }
.send-btn:active:not(:disabled) { background: var(--accent-press); }
.send-btn:disabled { border-color: transparent; background: var(--raised); color: var(--faint); opacity: 1; }
.disclaimer { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.5; }
.content-panel { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 780px; margin: 0 auto; padding: 48px 28px; }
.content-heading { margin-bottom: 5px; }
.content-heading h1 { margin: 0 0 12px; color: var(--text); font: 600 clamp(30px, 4vw, 42px)/1.12 var(--font-display); letter-spacing: -0.02em; }
.content-heading h1 em { color: inherit; font-style: normal; }
.content-heading p { max-width: 500px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.eyebrow, .content-heading .eyebrow, .modal-eyebrow { display: none !important; }
.memory-card, .library-card, .notice, .library-row { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.memory-card, .library-card { padding: 20px; }
.card-title, .memory-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title > div { display: flex; align-items: center; gap: 10px; }
.card-symbol, .library-symbol { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--raised); color: var(--text-2); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.memory-text, .auth-form input, .image-form textarea, .search-chats { width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text); }
.memory-text { min-height: 150px; margin: 12px 0; padding: 12px; resize: vertical; }
.memory-text::placeholder, .auth-form input::placeholder, .image-form textarea::placeholder, .search-chats::placeholder { color: var(--muted); opacity: 1; }
.memory-footer { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.primary-btn, .secondary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 88px; min-height: 40px; padding: 0 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; }
.primary-btn { border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); }
.primary-btn:hover { background: var(--accent-hover); }
.primary-btn:active { background: var(--accent-press); }
.secondary-btn { border: 1px solid var(--border-strong); background: transparent; color: var(--text); }
.secondary-btn:hover { background: var(--raised); }
.full-btn { width: 100%; margin-top: 9px; }
.toggle { position: relative; display: inline-block; width: 40px; height: 24px; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; }
.toggle span::before { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); content: ""; }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::before { left: 20px; background: var(--on-accent); }
.notice { display: flex; gap: 12px; padding: 14px; color: var(--text-2); }
.notice > span { color: var(--muted); }
.notice p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.notice b { color: var(--text); }
.library-card { display: flex; align-items: center; gap: 12px; }
.library-card > div:nth-child(2) { flex: 1; min-width: 0; }
.library-card b { font-size: 14px; }
.library-card p { margin: 4px 0 0; }
.library-list { display: flex; flex-direction: column; gap: 8px; }
.library-row { display: flex; align-items: center; gap: 10px; padding: 12px; }
.library-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-row small { color: var(--muted); }
.modal { width: min(520px, calc(100% - 32px)); max-height: 86dvh; overflow: auto; padding: 24px; border: 1px solid var(--border-strong); border-radius: var(--r-lg); background: var(--overlay); color: var(--text); }
.modal::backdrop { background: var(--scrim); }
.modal-close { float: right; }
.modal h2 { margin: 8px 0 12px; color: var(--text); font: 600 20px/1.25 var(--font-display); }
.modal > p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.modal-footnote, .auth-legal { color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-brand .brand-mark { flex: 0 0 32px; }
.auth-brand small { display: none; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label, .image-form label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.auth-form input { min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 400; }
.auth-form input:focus, .image-form textarea:focus, .memory-text:focus, .search-chats:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); outline-offset: 0; }
.auth-error { padding: 10px 12px; border: 1px solid var(--danger); border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.google-auth-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 40px; margin-top: 10px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: transparent; color: var(--text); }
.auth-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.auth-foot button { padding: 0; border: 0; background: transparent; color: var(--accent); }
.auth-legal a, .legal-link { color: var(--accent); }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.price-card { padding: 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--raised); }
.price-card.featured { border-color: var(--border-strong); }
.price-card > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.price-card h3 { margin: 12px 0 6px; color: var(--text); font: 600 21px var(--font-display); }
.price-card h3 small, .price-card p { color: var(--muted); }
.price-card ul { min-height: 100px; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.8; }
.price-card button { width: 100%; }
.subscription-status { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); }
.billing-message { color: var(--danger); }
.image-form { display: flex; flex-direction: column; gap: 10px; }
.image-form textarea { min-height: 96px; padding: 12px; resize: vertical; font-size: 15px; }
.image-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.image-form-footer small { color: var(--muted); font-size: 12px; }
.generated-image-wrap { margin-top: 16px; }
.generated-image-wrap img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.generated-image-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.auth-modal .auth-brand { margin-bottom: 16px; }
.mobile-scrim { display: none; }
.plan-card, .upgrade-link, .upgrade-top { display: none !important; }
#chatForm.drag-over { outline: 1px dashed var(--border-strong); outline-offset: 4px; }
input, textarea, select { accent-color: var(--accent); }
:where(button, input, textarea, select, a) { transition-property: color, background-color, border-color; transition-duration: var(--dur-micro); }
@media (max-width: 1023px) {
  .sidebar { flex-basis: 56px; width: 56px; padding-right: 8px; padding-left: 8px; }
  .sidebar .brand-row { justify-content: center; padding-right: 0; padding-left: 0; }
  .sidebar .brand-copy, .sidebar .section-heading, .sidebar .new-chat kbd, .sidebar .new-chat:not(:focus-visible), .sidebar .nav-item:not(.active) .nav-end, .sidebar .history-wrap, .sidebar .account-row-copy, .sidebar .account-row-end { display: none; }
  .sidebar .new-chat { justify-content: center; padding: 0; font-size: 0; }
  .sidebar .side-section { margin-top: 14px; }
  .sidebar .nav-item { justify-content: center; padding: 0; font-size: 0; }
  .sidebar .nav-item .nav-icon { font-size: 18px; }
  .sidebar .account-cta { justify-content: center; padding: 8px 0; }
  .sidebar.collapsed { flex-basis: 56px; width: 56px; }
  .sidebar:not(.collapsed) { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 264px; flex-basis: 264px; transform: translateX(0); }
}
@media (max-width: 767px) {
  .sidebar, .sidebar.collapsed, .sidebar:not(.open) { position: fixed; top: 0; bottom: 0; left: 0; width: min(85vw, 320px); height: 100dvh; flex-basis: min(85vw, 320px); padding: 12px; transform: translateX(-105%); transition: transform var(--dur-base) var(--ease-enter); }
  .sidebar.open { z-index: 20; transform: translateX(0); }
  .sidebar .brand-copy, .sidebar .section-heading, .sidebar .new-chat kbd, .sidebar .history-wrap, .sidebar .account-row-copy, .sidebar .account-row-end { display: initial; }
  .sidebar .brand-row { justify-content: flex-start; }
  .sidebar .new-chat { justify-content: flex-start; padding: 0 10px; font-size: 14px; }
  .sidebar .nav-item { justify-content: flex-start; padding: 0 10px 0 12px; font-size: 14px; }
  .sidebar .account-cta { justify-content: flex-start; padding: 8px; }
  .desktop-collapse { display: none; }
  .mobile-only { display: inline-grid; }
  .mobile-scrim.show { display: block; position: fixed; inset: 0; z-index: 19; background: var(--scrim); }
  .topbar { flex-basis: 52px; padding: 0 10px; }
  .breadcrumb { max-width: 42vw; font-size: 13px; }
  .top-actions { gap: 4px; }
  .top-actions #themeBtn { display: none; }
  .model-picker { max-width: 120px; min-height: 34px; padding-left: 8px; font-size: 12px; }
  .welcome { width: calc(100% - 32px); padding: 28px 0 20px; }
  .welcome h1 { font-size: 32px; letter-spacing: -0.02em; }
  .suggestion-list { margin-top: 16px; }
  .suggestion { min-height: 48px; font-size: 14px; }
  .suggestion:nth-child(n+5) { display: none; }
  .composer-zone { width: calc(100% - 20px); padding-top: 8px; }
  .composer { padding: 10px; }
  .composer-tools { gap: 2px; }
  .tool-btn { min-height: 44px; padding: 0 8px; }
  .send-btn { flex-basis: 44px; width: 44px; height: 44px; }
  .input-hint { display: none !important; }
  .disclaimer { font-size: 12px; }
  .messages { width: calc(100% - 32px); }
  .message-content { font-size: 16px; }
  .content-panel { padding: 28px 16px; }
  .library-card { flex-wrap: wrap; }
  .library-card .secondary-btn { margin-left: 48px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .modal { width: 100%; max-width: none; max-height: 90dvh; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  dialog.modal[open] { align-self: end; }
}
@media (max-width: 399px) {
  .tool-btn span:not(:first-child) { display: none; }
  .tool-btn { width: 36px; padding: 0; }
  .composer-tools { gap: 2px; }
  .model-picker { max-width: 104px; }
  .send-area { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (forced-colors: active) {
  button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid Highlight; }
  .nav-item.active::before { background: Highlight; }
}


/* Production recovery: make primary actions legible in all themes. */
.send-btn {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border: 1px solid var(--accent-press) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.send-btn i, .send-btn svg {
  display: block;
  color: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.send-btn:disabled {
  background: var(--raised) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-2) !important;
  box-shadow: none;
}
.send-btn:disabled i, .send-btn:disabled svg { color: var(--text-2) !important; }
.brand-mark {
  background: var(--accent);
  border-color: var(--accent-press);
  color: var(--on-accent);
  font-weight: 700;
}


/* Visible UI repair: ensure the regular Phosphor icon that is actually loaded renders. */
#sendBtn {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent-press);
}
#sendBtn > i {
  display: inline-block;
  font-family: "Phosphor";
  font-style: normal;
  font-weight: normal;
  font-size: 20px;
  line-height: 1;
  color: currentColor;
  opacity: 1;
  visibility: visible;
}
#sendBtn:disabled {
  background: var(--raised);
  color: var(--text-2);
  border-color: var(--border-strong);
}
#sendBtn:disabled > i { color: var(--text-2); }

/* Give the brand a deliberate wordmark rather than the old slogan lockup. */
.brand-copy small { display: none !important; }
.brand-copy strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.035em; color: var(--text); }
.brand-copy strong span { color: var(--text-2); margin-left: 2px; font-size: .82em; letter-spacing: -.01em; }
.brand-mark { border-color: var(--border-strong); background: var(--raised); color: var(--text); }
