:root {
  color-scheme: light;
  --paper: #ffffff; --ground: #f4f5f1; --sidebar: #edf0ea; --ink: #26352f;
  --muted: #626c66; --line: #d8ded7; --control-border: #7c8a80; --accent: #264f46; --accent-hover: #183e35;
  --private: #e5eee5; --shared: #f2eee5; --warning: #f5edda; --error: #913b37;
  --danger-bg: #f9eae6; --focus: #287862; --nav-height: 0px; --top-height: 80px; --strip-height: 34px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--ground);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
html { scroll-padding-block: 16px calc(var(--nav-height) + 16px + env(safe-area-inset-bottom)); }
button, input, textarea, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button { color: inherit; }
button:disabled { opacity: .55; cursor: not-allowed; }
button, a, input, textarea, select, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, p, dt, dd, .field { overflow-wrap: anywhere; }
h1, h2, h3 { scroll-margin-block-start: 20px; }
h1 { font-size: 2rem; line-height: 1.2; font-weight: 650; letter-spacing: -.03em; text-wrap: balance; }
h2 { font-size: 1.25rem; line-height: 1.35; font-weight: 620; letter-spacing: -.015em; }
h3 { font-size: 1rem; line-height: 1.4; font-weight: 650; }
p { max-width: 72ch; }
ul, ol { padding: 0; margin: 0; list-style: none; }
small { font-size: .8125rem; }
svg { flex-shrink: 0; }
.icon { width: 22px; height: 22px; vertical-align: middle; }
.muted, .quiet { color: var(--muted); }
.quiet { font-size: .8125rem; }
.wordmark { color: var(--accent); font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.04em; text-decoration: none; }
.wordmark:hover { text-decoration: none; }
.wordmark span { color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 20; padding: 12px 20px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.button { min-height: 46px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; background: var(--paper); color: var(--accent); font-weight: 600; text-decoration: none; transition: background 160ms ease, border-color 160ms ease; }
.button:hover:enabled, a.button:hover { background: var(--sidebar); border-color: var(--muted); text-decoration: none; }
.button:active:enabled { background: var(--private); }
.button-primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.button-primary:hover:enabled, a.button-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button-primary:active:enabled { background: var(--accent-hover); }
.button-danger { background: var(--error); color: var(--paper); border-color: var(--error); }
.text-button { min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: var(--accent); border-radius: 6px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover:enabled { background: var(--private); }
.text-button:active:enabled { background: var(--sidebar); }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.icon-button { width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center; border-radius: 8px; }
.icon-button:hover { background: var(--sidebar); }
.wide { width: 100%; }
.button-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: fixed; width: 236px; height: 100dvh; padding: 40px 24px 28px; display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar > .wordmark { padding-left: 16px; }
.primary-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 60px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 16px; border-radius: 8px; font-weight: 580; color: var(--muted); text-decoration: none; }
.nav-item:hover { color: var(--ink); background: var(--private); text-decoration: none; }
.nav-item.selected { background: var(--accent); color: var(--paper); }
.sidebar-bottom { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding: 32px 12px 0; }
.sidebar-bottom > a { min-height: 44px; display: flex; align-items: center; font-size: .875rem; text-decoration: none; }
.settings-link { gap: 10px; }
.workspace { grid-column: 2; min-width: 0; background: var(--paper); }
.workspace:has(.chat-main) { display: flex; flex-direction: column; height: var(--viewport-height, 100dvh); min-height: 0; }
.workspace:has(.chat-main) > .topbar, .workspace:has(.chat-main) > .environment-strip { flex-shrink: 0; width: 100%; }
.workspace:not(:has(.environment-strip)) { --strip-height: 0px; }
.topbar { max-width: 1200px; height: var(--top-height); margin: auto; padding: 16px 48px; display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
.topbar .wordmark, .topbar .icon-button { display: none; }
.identity-name { font-size: .875rem; color: var(--muted); max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.environment-strip { min-height: var(--strip-height); background: var(--ground); color: var(--muted); padding: 6px 48px; display: flex; justify-content: space-between; gap: 16px; font-size: .75rem; }
.environment-strip a { color: var(--muted); }
.pilot-gate { padding: 12px 48px; background: var(--warning); font-size: .875rem; display: flex; gap: 8px 16px; flex-wrap: wrap; }
.main-content { max-width: 1200px; margin: 0 auto; padding: 44px 48px 64px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-heading p { margin-top: 12px; }
.page-heading > div, .chat-header > div, .continue-panel > div, .together-start > div { min-width: 0; }
.page-heading > .button { flex-shrink: 0; margin-top: 2px; }
.section { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; }
.section-label { display: block; font-size: .8125rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.continue-panel { padding: 28px 32px; border-radius: 14px; background: var(--private); display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 36px; }
.continue-panel h2 { margin-bottom: 14px; font-size: 1.5rem; }
.space-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.space-choice { padding: 12px 32px 12px 0; display: flex; flex-direction: column; align-items: flex-start; }
.space-choice + .space-choice { padding-left: 32px; border-left: 1px solid var(--line); }
.space-choice > .icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 20px; }
.space-choice h2 { font-size: 1.5rem; margin-bottom: 12px; }
.space-choice p { color: var(--muted); margin-bottom: 20px; }
.space-choice .text-link { margin-top: 12px; }
.privacy-mark { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: .8125rem; font-weight: 600; }
.privacy-mark .icon { width: 16px; height: 16px; }
.privacy-shared { color: #685b3f; }
.scope-note { padding: 18px 22px; background: var(--ground); border-radius: 12px; margin-bottom: 28px; }
.scope-note p { font-size: .875rem; color: var(--muted); margin-top: 6px; }
.scope-note-shared { background: var(--shared); }
.session-list { border-top: 1px solid var(--line); }
.session-list > li { border-bottom: 1px solid var(--line); }
.session-row { min-height: 94px; padding: 20px 4px; display: flex; align-items: center; gap: 18px; color: var(--ink); text-decoration: none; transition: background 160ms ease; }
.session-row:hover { background: var(--ground); text-decoration: none; }
.session-symbol { color: var(--muted); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.session-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.session-info strong { overflow-wrap: anywhere; font-weight: 600; }
.session-caption { color: var(--muted); font-size: .8125rem; }
.session-row > .icon { color: var(--muted); }
.empty { min-height: 250px; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty > .icon { color: var(--accent); width: 32px; height: 32px; margin-bottom: 20px; }
.empty h2 { margin-bottom: 12px; }
.empty p { color: var(--muted); max-width: 48ch; }
.empty .button { margin-top: 24px; }
.together-start { padding: 12px 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.together-start p { margin-top: 8px; }
.disclaimer { margin-top: 48px; color: var(--muted); font-size: .8125rem; max-width: 80ch; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; font-weight: 550; }
.field small { font-weight: 400; color: var(--muted); }
input:not([type=checkbox]), textarea, select { min-height: 48px; width: 100%; border: 1px solid var(--control-border); border-radius: 8px; padding: 10px 12px; background: var(--paper); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #687069; opacity: 1; }
input:read-only { background: var(--ground); }
input[type=checkbox] { width: 20px; height: 20px; flex: 0 0 20px; margin: 2px 0 0; accent-color: var(--accent); }
textarea { resize: vertical; line-height: 1.55; }
.narrow-form { max-width: 480px; }
.narrow-form > p { margin-bottom: 24px; }
.narrow-form h2 { margin-bottom: 12px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; min-height: 44px; cursor: pointer; }
.checkbox-field span { line-height: 1.5; }
.consent-section { padding: 28px 0; border-top: 1px solid var(--line); }
.consent-section h2 { margin-bottom: 12px; }
.consent-accepted { color: var(--accent); }
.policy-text { margin: 20px 0; }
summary { min-height: 44px; display: list-item; padding: 10px 0; color: var(--accent); font-weight: 550; }
.policy-text > div { padding: 16px 20px; background: var(--ground); border-radius: 8px; white-space: pre-wrap; max-width: 72ch; font-size: .9375rem; }
.consent-form { max-width: 620px; margin-top: 16px; }
.consent-form .button { margin-top: 12px; }
.privacy-explanation h3 { margin: 24px 0 8px; }
.privacy-explanation p { color: var(--muted); }
.gate-detail { padding: 24px; border-radius: 12px; background: var(--warning); margin-bottom: 24px; }
.gate-detail > p { margin-top: 10px; }
.key-values { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; font-size: .875rem; margin: 24px 0 0; }
.key-values dd { margin: 0; font-weight: 600; }
.settings-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.settings-links a { min-height: 44px; display: inline-flex; align-items: center; }
.access-sessions { margin: 16px 0 20px; }
.access-sessions li { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; font-size: .875rem; }
.inline-confirm { padding: 20px; background: var(--warning); border-radius: 8px; margin-top: 12px; }
.inline-confirm .button { margin-top: 16px; }
.invitation-output { max-width: 600px; margin-top: 24px; }
.invitation-output input { font-size: .875rem; }
.content-list > li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.content-list h3 { margin: 8px 0; }
.content-list p + p { margin-top: 8px; }
.alert { padding: 14px 20px; border-radius: 8px; margin-bottom: 20px; font-size: .9375rem; }
.alert-error { color: var(--error); background: var(--danger-bg); }
.notice { position: fixed; z-index: 30; bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); padding: 14px 20px; background: var(--ink); color: var(--paper); font-size: .875rem; border-radius: 10px; box-shadow: 0 6px 24px #26352f26; }
.boot { min-height: 100dvh; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 24px; }
.loading { padding: 40px 0; color: var(--muted); }
.access-page { max-width: 1120px; margin: auto; min-height: 100dvh; padding: 48px 64px 32px; }
.access-brand { display: flex; align-items: center; gap: 24px; }
.access-brand .muted { font-size: .875rem; }
.access-panel { width: 100%; max-width: 440px; margin: 80px auto 48px; }
.access-panel h1 { font-size: 2.25rem; margin-bottom: 20px; max-width: 13ch; }
.access-intro { color: var(--muted); margin-bottom: 28px; }
.access-environment { margin-bottom: 24px; padding: 12px 16px; border-radius: 8px; background: var(--private); color: var(--accent); font-size: .8125rem; }
.access-recovery { display: inline-flex; min-height: 44px; align-items: center; margin-top: 14px; font-size: .875rem; }
.invite-only { font-size: .8125rem; margin-top: 28px; color: var(--muted); }
.access-disclaimer { max-width: 62ch; margin: 56px auto 0; text-align: center; color: var(--muted); font-size: .75rem; }
.noscript { padding: 24px; }
.chat-main { display: flex; flex: 1; flex-direction: column; width: 100%; min-height: 0; padding-top: 24px; padding-bottom: 0; overflow-x: hidden; overflow-y: auto; }
#generation-issue { flex-shrink: 0; }
.chat-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 20px; flex-shrink: 0; }
.chat-header h1 { font-size: 1.5rem; margin: 4px 0 10px; overflow-wrap: anywhere; }
.back-link { font-size: .8125rem; min-height: 44px; }
.back-link .icon { width: 16px; height: 16px; }
.chat-controls { text-align: right; }
.chat-actions { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.chat-actions .text-button { font-size: .8125rem; padding: 8px; }
.status-label { color: var(--muted); font-size: .8125rem; }
.conversation-bar { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 10px 0; flex-shrink: 0; max-height: 30%; overflow-y: auto; overscroll-behavior: contain; font-size: .75rem; color: var(--muted); }
.conversation-state { min-height: 20px; min-width: 0; }
.connection-state { flex-shrink: 0; }
.safety-state { color: var(--error); font-weight: 600; white-space: pre-wrap; }
.clinical-panel { padding: 12px 16px; margin-bottom: 8px; background: var(--ground); border-radius: 8px; min-height: 0; flex-shrink: 1; max-height: 30vh; overflow-y: auto; overscroll-behavior: contain; }
.clinical-step-region:not(:empty), .clinical-resource-region:not(:empty) { margin-top: 16px; }
.clinical-notice { white-space: pre-wrap; font-size: .875rem; }
.clinical-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.clinical-actions:not(:empty) { margin-top: 12px; }
.clinical-actions .button { font-size: .8125rem; min-height: 44px; }
.generating::before { content: ''; width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }
.timeline { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; padding: 20px 4px; scroll-padding: 20px; }
.messages { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; max-width: 780px; margin: auto; }
.message { max-width: 85%; min-width: 150px; padding: 16px 20px; background: var(--shared); border-radius: 14px; }
.message-own { align-self: flex-end; background: var(--private); }
.message-psi { background: transparent; padding: 4px 0; max-width: 68ch; }
.message-meta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 8px; color: var(--muted); font-size: .75rem; }
.message-meta strong { font-weight: 650; color: var(--ink); }
.message-meta time { font-variant-numeric: tabular-nums; }
.message-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9375rem; line-height: 1.7; }
.feedback { display: flex; gap: 12px; margin-top: 8px; font-size: .75rem; color: var(--muted); }
.feedback .text-button { color: var(--muted); font-size: .75rem; padding: 8px 0; }
.chat-empty { align-self: center; max-width: 48ch; text-align: center; padding: 36px 16px; color: var(--muted); }
.chat-empty h2 { color: var(--ink); margin-bottom: 12px; }
.composer { margin-top: 8px; padding: 14px 0 8px; flex-shrink: 0; border-top: 1px solid var(--line); background: var(--paper); }
.composer-row { display: flex; align-items: flex-end; gap: 12px; }
.composer textarea { min-width: 0; flex: 1; min-height: 72px; max-height: 176px; resize: none; background: var(--ground); font-size: 1rem; }
.composer textarea:disabled { background: var(--ground); }
.send-button { min-height: 48px; flex-shrink: 0; align-self: flex-end; margin-bottom: 1px; }
.send-button .icon { width: 20px; height: 20px; }
.composer-hint { color: var(--muted); font-size: .6875rem; margin-top: 7px; }
.composer > .button { margin-top: 12px; }
.new-messages { min-height: 44px; padding: 8px 16px; margin: 0 auto 8px; border: 1px solid var(--line); background: var(--paper); color: var(--accent); border-radius: 20px; font-size: .8125rem; }
.memory-details { flex-shrink: 0; border-top: 1px solid var(--line); font-size: .8125rem; padding-bottom: 4px; }
.memory-details summary { min-height: 44px; font-size: .75rem; color: var(--muted); }
.memory-content { max-height: 180px; overflow: auto; padding: 8px 0 16px; }
.memory-content > p + p { margin-top: 12px; }
.memory-item { padding-top: 16px; }
.memory-kind { display: block; color: var(--muted); font-size: .75rem; margin-bottom: 4px; }
.memory-item form { max-width: 600px; }
.memory-item .text-button { font-size: .75rem; padding-left: 0; }
.recovery-result { margin-bottom: 24px; }
.recovery-codes { margin: 20px 0; padding: 16px; background: var(--ground); border-radius: 8px; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.recovery-codes li + li { margin-top: 8px; }
.session-list > li, .content-list > li { content-visibility: auto; contain-intrinsic-size: auto 94px; }
@media (min-width: 1500px) { .main-content { padding-top: 56px; } .chat-main { padding-top: 28px; } }
@media (max-width: 1100px) {
  .sidebar { width: 208px; padding-left: 16px; padding-right: 16px; }
  .app-shell { grid-template-columns: 208px minmax(0, 1fr); }
  .main-content, .topbar { padding-left: 32px; padding-right: 32px; }
  .environment-strip, .pilot-gate { padding-left: 32px; padding-right: 32px; }
  .continue-panel { flex-direction: column; align-items: flex-start; }
  .page-heading { flex-wrap: wrap; }
  .together-start { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  :root { --nav-height: 72px; --top-height: 64px; --strip-height: 32px; }
  .app-shell { display: block; padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  .sidebar { position: static; width: 0; height: 0; padding: 0; border: 0; }
  .sidebar > .wordmark, .sidebar-bottom { display: none; }
  .primary-nav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); z-index: 10; flex-direction: row; justify-content: space-around; gap: 4px; }
  .nav-item { width: 100%; flex-direction: column; justify-content: center; gap: 4px; padding: 5px 8px; min-height: 56px; font-size: .6875rem; border-radius: 8px; }
  .nav-item .icon { width: 21px; height: 21px; }
  .nav-item.selected { background: var(--private); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
  .workspace { min-height: calc(100dvh - var(--nav-height)); }
  .workspace:has(.chat-main) { height: calc(var(--viewport-height, 100dvh) - var(--nav-height) - env(safe-area-inset-bottom)); min-height: 0; }
  .topbar { padding: 12px 20px; gap: 10px; justify-content: space-between; }
  .topbar .wordmark { display: inline; font-size: 2rem; }
  .topbar .icon-button { display: inline-flex; }
  .topbar .identity-name { margin-left: auto; font-size: .8125rem; max-width: 20ch; }
  .environment-strip { font-size: .75rem; padding: 7px 20px; gap: 8px; }
  .environment-strip a { white-space: nowrap; }
  .pilot-gate { padding: 12px 20px; font-size: .8125rem; }
  .main-content { padding: 28px 20px 40px; }
  h1 { font-size: 1.75rem; }
  .page-heading { gap: 18px; margin-bottom: 24px; }
  .page-heading p { font-size: .9375rem; margin-top: 10px; }
  .continue-panel { padding: 24px; gap: 20px; margin-bottom: 28px; }
  .continue-panel h2 { font-size: 1.375rem; }
  .space-choices { grid-template-columns: 1fr; }
  .space-choice { padding: 20px 4px 28px; }
  .space-choice + .space-choice { padding: 28px 4px 8px; border-left: 0; border-top: 1px solid var(--line); }
  .space-choice > .icon { margin-bottom: 14px; }
  .space-choice h2 { font-size: 1.375rem; }
  .space-choice p { margin-bottom: 14px; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section { margin-top: 28px; padding-top: 24px; }
  .scope-note { padding: 16px; margin-bottom: 24px; }
  .session-row { gap: 12px; min-height: 86px; }
  .session-symbol { width: 30px; }
  .session-info strong { font-size: .9375rem; }
  .empty { padding: 36px 8px; min-height: 230px; }
  .empty p { font-size: .9375rem; }
  .gate-detail { padding: 20px; }
  .key-values { grid-template-columns: 1fr; gap: 4px; }
  .key-values dd { margin-bottom: 12px; }
  .access-page { padding: 32px 24px 28px; }
  .access-brand .muted { display: none; }
  .access-brand .wordmark { font-size: 2.5rem; }
  .access-panel { margin: 56px auto 32px; }
  .access-panel h1 { font-size: 2rem; }
  .access-disclaimer { margin-top: 40px; text-align: left; }
  .chat-main { padding: 12px 16px 0; min-height: 0; }
  .chat-header { padding-bottom: 12px; align-items: flex-start; gap: 10px; }
  .chat-header h1 { font-size: 1.125rem; margin: 4px 0 8px; }
  .chat-header .privacy-mark { font-size: .75rem; }
  .chat-controls { flex-shrink: 0; max-width: 116px; }
  .chat-actions { gap: 0; }
  .chat-actions .text-button { min-height: 44px; font-size: .75rem; padding: 6px; }
  .status-label { font-size: .75rem; }
  .conversation-bar { gap: 10px; font-size: .75rem; }
  .timeline { padding: 12px 0 20px; }
  .messages { gap: 24px; }
  .message { padding: 12px 14px; max-width: 92%; min-width: 130px; }
  .message-psi { padding: 0 2px; max-width: 100%; }
  .message-content { font-size: .9375rem; }
  .message-meta { gap: 14px; }
  .composer-row { gap: 8px; }
  .composer textarea { min-height: 64px; max-height: 140px; }
  .send-button { width: 48px; padding: 12px; }
  .send-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .composer-hint { font-size: .75rem; }
  .memory-details summary { min-height: 44px; font-size: .75rem; }
  .keyboard-open { --nav-height: 0px; }
  .keyboard-open .primary-nav { display: none; }
  .keyboard-open .chat-header .chat-controls { display: none; }
  .keyboard-open .memory-details { display: none; }
  .keyboard-open .chat-header { padding-bottom: 8px; }
  .keyboard-open .chat-header h1 { display: none; }
  .keyboard-open .chat-header .back-link { min-height: 44px; }
  .keyboard-open .composer textarea { min-height: 44px; max-height: 96px; }
  .keyboard-open .composer { padding-top: 8px; }
  .keyboard-open .timeline { padding-block: 4px; }
  .keyboard-open .chat-main { min-height: 0; }
}
@media (max-width: 360px) {
  .environment-strip a { display: none; }
  .main-content { padding-left: 16px; padding-right: 16px; }
  .chat-main { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
