@font-face {font-family:Poppins;font-style:normal;font-weight:700;font-display:swap;src:url('/static/vendor/poppins-bold.woff2') format('woff2')}
@font-face {font-family:Poppins;font-style:normal;font-weight:400;font-display:swap;src:url('/static/vendor/poppins-regular.ttf') format('truetype')}
@font-face {font-family:Poppins;font-style:normal;font-weight:500;font-display:swap;src:url('/static/vendor/poppins-medium.ttf') format('truetype')}
@font-face {font-family:Poppins;font-style:normal;font-weight:600;font-display:swap;src:url('/static/vendor/poppins-semibold.ttf') format('truetype')}
:root {
  --bg:var(--toba-surface); --surface:var(--toba-card); --sidebar:var(--toba-lake-900); --input:var(--toba-input);
  --ink:var(--toba-ink); --muted:var(--toba-ink-muted); --border:var(--toba-line); --stroke:var(--toba-lake-500);
  --primary:var(--toba-orange-500); --primary-soft:var(--toba-lake-100); --selected-ink:var(--toba-ink); --token:var(--toba-ink-muted);
  --primary-hover:var(--toba-orange-300); --primary-text:var(--toba-ink); --on-primary:var(--toba-on-orange);
  --success:var(--toba-lake-500); --warning:var(--toba-ink-muted);
  --shadow:color-mix(in srgb,var(--toba-ink) 12%,transparent); --scrim:color-mix(in srgb,var(--toba-ink) 35%,transparent);
  --accent:var(--toba-lake-500); --soft:var(--primary-soft); --danger:var(--toba-ink);
  --font:var(--toba-font); --mono:"Cascadia Mono",Consolas,monospace;
  color-scheme:light;
}
.sidebar {
  --bg:var(--toba-lake-900); --surface:var(--toba-lake-800); --ink:var(--toba-on-dark); --muted:var(--toba-on-dark-muted);
  --border:var(--toba-lake-700); --stroke:var(--toba-on-dark-soft); --primary-soft:var(--toba-lake-700);
  --selected-ink:var(--toba-on-dark); --primary-text:var(--toba-on-dark); --soft:var(--toba-lake-700);
  --success:var(--toba-on-dark-muted); --warning:var(--toba-on-dark-soft); --danger:var(--toba-on-dark-muted);
  color:var(--ink);color-scheme:dark;
}
.model-menu-panel {
  --bg:var(--toba-surface); --surface:var(--toba-card); --ink:var(--toba-ink); --muted:var(--toba-ink-muted);
  --border:var(--toba-line); --stroke:var(--toba-lake-500); --soft:var(--toba-lake-100); --primary-text:var(--toba-ink);
  color:var(--ink);color-scheme:light;
}
* {box-sizing:border-box}
html {scrollbar-gutter:auto}
html,body {width:100%;margin:0}
body {color:var(--ink);background:var(--bg);font:16px/1.65 var(--font);overflow:hidden}
button,select,input,textarea {font:inherit;color:inherit}
button,select {cursor:pointer}
button {border:1px solid var(--stroke);border-radius:10px;background:var(--surface);padding:9px 12px;transition:border-color .16s,background .16s}
button:where(:not(:disabled)):hover {border-color:var(--stroke);background:var(--primary-soft)}
button:disabled {cursor:not-allowed;opacity:1;color:var(--muted)}
:focus-visible {outline:3px solid var(--toba-orange-700);outline-offset:3px}
a {color:var(--toba-orange-700);text-decoration:underline;text-underline-offset:3px}
a:hover {color:var(--ink)}
svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.app-shell {display:grid;grid-template-columns:224px minmax(0,1fr);width:100%;height:100dvh;min-height:0}
.sidebar {background:var(--sidebar);padding:20px 16px 16px;display:flex;flex-direction:column;gap:20px;min-width:0;overflow:auto}
.brand {display:flex;gap:10px;align-items:center;color:var(--ink);text-decoration:none;font:600 24px/1.2 var(--font);letter-spacing:-.6px}
.brand small {display:block;font:13px/1.5 var(--font);letter-spacing:0;color:var(--muted);margin-top:3px}
.new-chat {background:transparent;color:var(--ink);border-color:var(--muted);font-size:14px;min-height:44px;padding:9px 10px}
.new-chat:hover {background:var(--surface);border-color:var(--toba-lake-500)}
.new-chat span {font-size:20px;line-height:1;vertical-align:-1px;margin-right:5px;font-weight:400}
.controls {display:flex;flex-direction:column;gap:8px}
.section-title {font:500 13px/1.5 var(--font);color:var(--muted);margin:0}
.parameter-button {display:flex;align-items:center;gap:8px;text-align:left;font-size:13px;background:transparent;padding:8px 0;border:0;min-height:44px}
.parameter-button svg {width:18px;height:18px;color:var(--muted)}
.quota-card {margin-top:auto;border:1px solid var(--stroke);border-radius:10px;padding:11px;background:var(--surface)}
.quota-card>div {display:flex;align-items:center;gap:6px}
.quota-card strong {font-size:13px;font-weight:500}
.quota-card>span,.quota-card small {display:block;color:var(--muted);font-size:13px;line-height:1.5;margin-top:3px}
.status-dot {width:6px;height:6px;background:var(--muted);border-radius:50%;flex:none}
main {background:var(--bg);border-left:1px solid var(--stroke);padding:18px 24px 12px;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
header {display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;min-height:38px}
.model-chip {display:flex;align-items:center;gap:10px;border:1px solid var(--stroke);padding:8px 10px;border-radius:9px;font-size:14px;font-weight:500;line-height:1.4;min-width:0;min-height:44px;cursor:pointer;list-style:none}
.model-chip::-webkit-details-marker {display:none}
.model-chip .chevron {width:16px;height:16px}
.model-menu {position:relative;min-width:0}
.model-menu[open] .chevron {transform:rotate(180deg)}
.model-menu-panel {position:absolute;z-index:5;top:calc(100% + 8px);left:0;width:240px;max-width:calc(100vw - 32px);padding:6px;border:1px solid var(--border);border-radius:12px;background:var(--surface);box-shadow:0 8px 24px var(--shadow)}
.model-menu-panel button {display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;text-align:left;border:0;background:transparent;font-size:14px}
.model-menu-panel button:hover {background:var(--bg)}
.header-right {display:flex;align-items:center;gap:12px;flex:none}
.model-label,.badge {font:13px/1.4 var(--mono);color:var(--muted);white-space:nowrap}
.service-status {display:flex;align-items:center;gap:7px;flex:none;font-size:13px;color:var(--ink);white-space:nowrap}
#readiness {border:0;padding:6px 0;background:transparent}
.service-dot {width:8px;height:8px;border-radius:50%;background:var(--warning);flex:none}
#readiness[data-state="ready"] .service-dot {background:var(--success)}
#readiness[data-state="offline"] .service-dot {background:var(--danger)}
.service-state {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface);flex:none}
.service-copy strong {font-size:14px;font-weight:500}
.service-copy p {font-size:13px;color:var(--muted);margin:5px 0 0}
.service-skeleton {display:flex;flex-direction:column;gap:8px;width:110px}
.service-skeleton span {height:7px;background:var(--stroke);border-radius:4px;animation:none}
.service-skeleton span:last-child {width:70%}
.service-unavailable .welcome,.service-unavailable .examples {display:none}
.service-unavailable .workspace-content {justify-content:flex-end}
.toast {position:fixed;z-index:8;bottom:22px;right:22px;max-width:min(460px,calc(100vw - 28px));padding:12px 16px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:0 5px 24px var(--shadow);font-size:14px;color:var(--ink);pointer-events:none}
.web-status {font-size:13px;color:var(--muted);padding:5px 0}
.web-status[data-available="false"] {color:var(--primary-text)}
.dev-only {display:none!important}
.developer-mode .dev-only {display:block!important}
.developer-mode .developer-setting.dev-only {display:flex!important}
.developer-mode .composer-caption {display:flex!important}
.developer-setting {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;font-size:14px;padding-bottom:14px;margin-bottom:18px;border-bottom:1px solid var(--border)}
.developer-setting input {width:20px;height:20px}
.developer-setting small {display:block;color:var(--muted);font-size:14px;line-height:1.65;max-width:40ch;margin-top:3px}
.developer-trace {margin:8px 0 12px;padding:9px 12px;border:1px solid var(--stroke);border-radius:8px;color:var(--ink);background:var(--surface);min-width:0}
.developer-trace summary {cursor:pointer;font:500 13px/1.5 var(--font)}
.developer-trace ol {margin:8px 0 0;padding:0 6px 0 24px;max-height:min(40vh,22rem);overflow:auto;scrollbar-width:thin;overscroll-behavior:contain}
.developer-trace li {margin:0 0 8px;padding-left:2px;font:13px/1.5 var(--font);overflow-wrap:anywhere}
.developer-trace li::marker {color:var(--muted)}
.developer-trace li strong {font-weight:500}
.developer-trace li div {color:var(--muted);white-space:pre-wrap}
.developer-trace li:last-child {margin-bottom:0}
#modelInfo {width:420px;max-width:calc(100vw - 28px);max-height:80dvh;padding:0;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--ink)}
#modelInfo::backdrop {background:var(--scrim)}
#modelInfo h3 {font-size:16px;font-weight:500;margin:0 0 16px}
#modelInfo p {font-size:16px;color:var(--muted)}
#closeModelInfo {border:0;min-width:44px;min-height:44px;font-size:24px}
#promptGuide {width:640px;max-width:calc(100vw - 28px);max-height:80dvh;padding:0;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--ink)}
#promptGuide[open] {display:grid;grid-template-rows:auto minmax(0,1fr)}
#promptGuide::backdrop {background:var(--scrim)}
#closeGuide {border:0;min-width:44px;min-height:44px;font-size:24px;color:var(--muted)}
.guide-body {padding:20px;overflow-y:auto;overscroll-behavior:contain;min-height:0;overflow-wrap:anywhere}
.guide-body h3 {font-size:15px;font-weight:500;margin:0 0 8px}
.guide-capabilities ul {margin:10px 0 0;padding-left:20px;color:var(--muted);font-size:16px;line-height:1.65}
.guide-capabilities li+li {margin-top:4px}
.guide-card {margin-top:20px;padding-top:20px;border-top:1px solid var(--border)}
.guide-card>p {font-size:16px;color:var(--muted);margin:0 0 12px;line-height:1.65}
.guide-card summary {cursor:pointer;font-size:14px;color:var(--primary-text);min-height:44px;display:flex;align-items:center;gap:8px}
.guide-card summary::before {content:'+';font-size:18px;width:16px;flex:none}
.guide-card details[open]>summary::before {content:'−'}
.guide-card summary::-webkit-details-marker {display:none}
.guide-card pre {font:16px/1.65 var(--font);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--input);padding:12px;border:1px solid var(--border);border-radius:8px;margin:4px 0 12px}
.guide-actions {display:flex;flex-wrap:wrap;gap:8px;margin:4px 0}
.guide-actions button {min-height:44px;font-size:14px;color:var(--primary-text);background:var(--primary-soft);border-color:var(--border)}
.guide-caption,.guide-answer-label {font-size:13px;color:var(--muted);margin:10px 0 5px}
.guide-result img {display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:8px;margin:12px 0}
.guide-result img:not([src]) {display:none}
.candidate-badge {display:inline-block;padding:3px 7px;margin-top:7px;border:1px solid var(--border);border-radius:6px;color:var(--primary-text);font-size:13px;background:var(--primary-soft)}
.model-details {font-size:14px;margin:0}
.model-details>div,.developer-mode .model-details>div.dev-only {display:flex!important;gap:16px;justify-content:space-between;padding:9px 0;border-top:1px solid var(--border)}
.model-details>div.dev-only {display:none!important}
.model-details dt {color:var(--muted)}
.model-details dd {margin:0;text-align:right}
.motif-strip {display:block;width:100%;height:6px;flex:none;margin-top:8px;color:var(--toba-lake-500)}
.motif-strip .wave-accent {stroke:var(--toba-lake-500)}
.notice {font-size:13px;line-height:1.4;color:var(--muted);margin-top:10px;padding:6px 9px;background:var(--input);border-radius:7px;align-self:flex-start;flex:none;max-width:100%;overflow-wrap:anywhere}
.notice.ready {color:var(--muted);background:var(--soft)}
.notice:empty {display:none}
.workspace-content {flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:14px clamp(0px,3vw,40px) 10px;gap:16px}
.welcome {text-align:center;width:100%;max-width:800px;margin:0;flex:none}
#orb {width:clamp(96px,14vw,160px);aspect-ratio:16/13;margin:0 auto 6px;flex:none}
h1 {font:500 clamp(26px,2.3vw,34px)/1.25 var(--font);letter-spacing:-.8px;margin:0}
.hello {display:block;font-size:.76em;color:var(--primary);margin-bottom:4px;font-weight:500}
.welcome-question {display:block}
.conversation {display:none;width:100%;max-width:720px;min-height:0;overflow-wrap:anywhere;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:8px}
.has-messages .welcome,.has-messages .examples {display:none}
.has-messages .conversation {display:block;flex:1}
.has-messages .workspace-content {justify-content:flex-start;padding-top:12px}
#composer {background:var(--surface);border:1px solid var(--toba-line);border-radius:18px;padding:6px;width:100%;max-width:820px;margin:0 auto;flex:none}
.composer-surface {background:var(--input);border-radius:13px;padding:12px 13px 8px}
textarea {border:0;resize:vertical;background:transparent;width:100%;min-height:68px;height:68px;max-height:200px;outline:0;font-size:16px;line-height:1.65;padding:0;display:block}
textarea::placeholder,input::placeholder {color:var(--muted);opacity:1}
.composer-tools {display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:6px}
.composer-tools-left {display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.route-chip {background:var(--soft);border:1px solid var(--border);color:var(--primary-text);border-radius:8px;padding:6px 9px;font-size:13px;white-space:nowrap}
.icon-button {display:grid;place-items:center;border:0;background:transparent;padding:7px;color:var(--muted);border-radius:8px;min-width:36px;min-height:36px}
.icon-button svg {width:19px;height:19px}
.memory-toggle {display:flex;align-items:center;gap:5px;border:1px solid var(--stroke);border-radius:8px;padding:6px 8px;font-size:13px;background:transparent;color:var(--muted);white-space:nowrap;min-height:34px}
.memory-toggle svg {width:16px;height:16px}
.memory-toggle small {font-size:13px;color:var(--muted)}
.memory-toggle[aria-pressed="true"] {background:var(--soft);border-color:var(--primary);color:var(--primary-text)}
#send {display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%;color:var(--on-primary);border:1px solid var(--primary);background:var(--primary);flex:none}
#send:hover {background:var(--primary-hover);border-color:var(--primary-hover)}
.composer-caption {display:flex;justify-content:space-between;padding:6px 10px 1px;gap:10px;font-size:13px;color:var(--muted)}
.examples {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%;max-width:820px;margin:0;flex:none}
.examples button {text-align:left;padding:12px;border-radius:12px;min-width:0;min-height:76px}
.examples svg {display:block;margin-bottom:8px;color:var(--muted);width:18px;height:18px}
.examples strong {display:block;font-size:13px;font-weight:500;line-height:1.4}
.examples span {display:block;font-size:13px;color:var(--muted);margin-top:2px;line-height:1.4}
.message {margin:10px auto 18px}
.message.user {background:var(--primary-soft);border:1px solid var(--border);border-radius:14px 14px 4px 14px;padding:12px 14px;margin-left:14%}
.message.assistant {background:var(--surface);border:1px solid var(--border);border-radius:14px 14px 14px 4px;padding:14px}
.answer-path {font-size:13px;color:var(--muted);margin-top:10px}
.answer-path.quota-fallback {color:var(--primary-text);background:var(--primary-soft);padding:8px 10px;border-radius:7px}
.request-retry,.request-repair {display:inline-flex;margin-top:12px;min-height:44px;font-size:14px;background:transparent}
.who {font:600 14px/1.5 var(--font);color:var(--primary-text);margin-bottom:7px}
.message.assistant .who {display:flex;align-items:center;justify-content:space-between;gap:12px}
.copy-answer {min-height:36px;padding:6px 10px;font:13px/1.4 var(--font);color:var(--muted);background:transparent}
.clipboard-copy-buffer {position:fixed;left:-10000px;top:0;width:1px;height:1px}
.answer {white-space:pre-wrap;font-size:17px;line-height:1.75;max-width:68ch}
.inference-progress {padding:5px 0 9px;font:14px/1.6 var(--font);color:var(--muted)}
.progress-head {display:flex;align-items:center;gap:9px;color:var(--ink)}
.progress-ring {width:15px;height:15px;border:2px solid var(--stroke);border-top-color:var(--accent);border-radius:50%;flex:none;animation:progress-turn 1s linear 4}
.progress-query,.progress-hint {margin:7px 0 0 24px;font:13px/1.6 var(--font);overflow-wrap:anywhere}
.progress-query:empty,.progress-hint:empty,.progress-domains:empty {display:none}
.progress-domains {display:flex;flex-wrap:wrap;gap:6px;margin:9px 0 0 24px}
.progress-domains a {font:13px/1.5 var(--font);padding:3px 7px;border:1px solid var(--stroke);border-radius:6px;background:var(--soft);text-decoration:none;overflow-wrap:anywhere;max-width:100%}
@keyframes progress-turn {to{transform:rotate(360deg)}}
.metadata {font:13px/1.6 var(--mono);color:var(--muted);margin:9px 0;overflow-wrap:anywhere}
.evidence {border:1px solid var(--stroke);border-radius:10px;background:var(--surface);padding:10px 12px;font-size:13px;margin-top:12px}
.evidence summary {cursor:pointer;color:var(--primary-text);font-weight:500}
.source {border-top:1px solid var(--stroke);padding:11px 0;margin-top:7px}
.source a {font-weight:500}
.source p {white-space:pre-wrap;font-size:16px;max-height:260px;overflow:auto}
.source small {color:var(--muted);font-size:13px}
.failure {color:var(--danger)}
.disclaimer {color:var(--muted);font-size:13px;line-height:1.4;text-align:center;margin:8px 0 0;flex:none}
.sr-only {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0)}
[hidden] {display:none!important}
.eyebrow {font:13px var(--mono);letter-spacing:.5px;color:var(--muted)}
input[type=checkbox] {accent-color:var(--toba-lake-500)}
#parameterDialog {position:fixed;margin:0 0 0 auto;inset:0;width:390px;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-left:1px solid var(--stroke);background:var(--surface);color:var(--ink);padding:0;box-shadow:-10px 0 45px var(--shadow)}
#parameterDialog[open] {display:grid;grid-template-rows:auto minmax(0,1fr) auto}
#parameterDialog::backdrop {background:var(--scrim)}
.parameter-head {padding:18px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--stroke)}
.parameter-head h2 {font:500 24px/1.3 var(--font);margin:3px 0 0;letter-spacing:-.5px}
#closeParameters {border:0;font-size:24px;color:var(--muted);padding:3px 8px;min-width:44px;min-height:44px}
.parameter-body {padding:20px;overflow:auto;min-height:0}
.setting-label,.field-grid label {display:block;font-size:13px;color:var(--muted);margin-bottom:9px}
.setting-label output {float:right;font:13px var(--mono);color:var(--ink)}
.presets {display:flex;gap:8px;margin-bottom:20px}
.presets button {flex:1;font-size:13px;padding:9px 4px;background:transparent;min-height:44px}
.presets .active {color:var(--primary-text);border-color:var(--primary);background:var(--soft)}
#temperature {width:100%;accent-color:var(--toba-lake-500);margin:0 0 20px}
.field-grid {display:grid;grid-template-columns:1fr 1fr;gap:18px 12px}
.field-grid input {width:100%;min-height:44px;padding:8px 10px;border:1px solid var(--stroke);border-radius:8px;background:var(--input);font-size:16px}
.field-grid label {margin-bottom:6px;overflow-wrap:anywhere}
.sampling-row {display:flex;align-items:center;justify-content:space-between;margin-top:22px;padding-top:18px;border-top:1px solid var(--stroke);font-size:14px;min-height:44px}
.sampling-row input {width:20px;height:20px}
.settings-note {font-size:13px;color:var(--muted);margin-top:18px}
.parameter-foot {padding:16px 20px;display:flex;justify-content:space-between;border-top:1px solid var(--stroke);background:var(--surface);gap:12px}
.parameter-foot button {font-size:14px;min-height:44px}
.primary {background:var(--soft);color:var(--ink);border:1px solid var(--toba-lake-500);font-weight:600}
.primary:hover {background:var(--soft)}
.search-query-used {overflow-wrap:anywhere}
@media(min-width:731px) and (max-height:700px) {
  main {padding:12px 20px 8px}
  .workspace-content {gap:12px;padding-top:10px;padding-bottom:6px}
  #orb {max-width:126px;margin-bottom:3px}
  h1 {font-size:28px}
  textarea {height:56px;min-height:56px}
  .examples button {padding:10px;min-height:66px}
  .examples svg {margin-bottom:4px}
}
@media(max-width:1050px) and (min-width:731px) {
  .app-shell {grid-template-columns:200px minmax(0,1fr)}
  main {padding-left:18px;padding-right:18px}
  .workspace-content {padding-left:0;padding-right:0}
  .model-label {display:none}
}
@media(max-width:730px) {
  #promptGuide {position:fixed;inset:0;margin:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}
  .guide-body {padding:16px}
  .toast {position:static;bottom:auto;right:auto;max-width:none;padding:8px 10px;margin-top:8px;flex:none;font-size:13px;box-shadow:none}
  body {overflow:hidden}
  .app-shell {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);height:100dvh;min-height:0}
  .sidebar {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:10px 14px;border-bottom:1px solid var(--stroke);overflow:visible}
  .brand {font-size:22px;gap:8px;min-height:44px}
  .brand small,.section-title {display:none}
  .new-chat {font-size:13px;padding:7px 10px;white-space:nowrap}
  .controls {justify-content:center;gap:0;min-width:0}
  .parameter-button {font-size:13px;gap:6px;padding:5px 0}
  .quota-card {margin:0;padding:0;border:0;background:transparent;align-self:center;max-width:180px;text-align:right}
  .quota-card>div {justify-content:flex-end}
  .quota-card strong {font-size:13px}
  .quota-card>span {font-size:13px;line-height:1.4;margin-top:1px}
  .quota-card small,.status-dot {display:none}
  main {border:0;padding:12px 14px 10px;min-height:0;overflow:auto}
  .header-right {gap:6px}
  .model-label {display:none}
  .model-chip {font-size:13px;padding:6px 8px}
  .badge {font-size:13px}
  #readiness {padding:6px 0}
  .notice {font-size:13px;margin-top:8px;padding:5px 7px}
  .workspace-content {padding:12px 0 6px;gap:12px;min-height:0;justify-content:safe center}
  #orb {margin-bottom:4px}
  h1 {font-size:26px;letter-spacing:-.6px}
  .composer-surface {padding:10px}
  textarea {height:68px;min-height:68px;font-size:16px;max-height:180px}
  .composer-tools {gap:10px;align-items:flex-end}
  .web-status {width:100%;padding:0}
  .memory-toggle {min-height:44px;font-size:13px}
  .memory-toggle small {font-size:13px}
  .icon-button,#send {min-width:44px;min-height:44px}
  #send {width:44px;height:44px}
  .composer-caption {font-size:13px;padding:5px 7px 1px}
  .examples {grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .examples button {padding:10px 8px;min-height:58px;border-radius:10px}
  .examples svg {display:none}
  .examples strong {font-size:13px;line-height:1.4}
  .examples span {display:none}
  .disclaimer {font-size:13px;margin-top:6px}
  .has-messages .workspace-content {padding-top:12px}
  .has-messages .conversation {overflow-y:auto;scrollbar-gutter:auto;padding-right:0}
  .message.user {margin-left:0}
  .message {margin-bottom:14px}
  .answer {font-size:17px}
  .copy-answer {min-height:44px}
  .metadata {font-size:13px}
  .parameter-head,.parameter-body {padding:16px}
  .parameter-foot {padding:12px 16px}
}
@media(max-width:730px) and (max-height:720px) {
  .sidebar {padding-top:6px;padding-bottom:6px;gap:2px 10px}
  main {padding-top:8px;min-height:0}
  .workspace-content {gap:10px;padding-top:8px}
  h1 {font-size:24px}
  textarea {height:56px;min-height:56px}
  .examples button {min-height:48px;padding:7px 5px}
}
@media(max-width:360px) {
  .memory-toggle {font-size:13px;gap:4px;padding-left:7px;padding-right:7px}
  .memory-toggle small {font-size:13px}
  #composerParameters {display:none}
}
@media(max-width:730px) and (max-height:720px) {
  .developer-mode .welcome {display:none}
  main:has(.toast:not([hidden])) .welcome {display:none}
}
@media(min-width:731px) and (max-height:560px) {
  .examples {display:none}
  #orb {width:66px;margin-bottom:0}
  h1 {font-size:22px}
  .hello,.welcome-question {display:inline}
  .workspace-content {gap:10px;padding:8px 0}
  .sidebar {gap:12px;padding:12px}
  .icon-button,.memory-toggle,#send {min-height:44px;min-width:44px}
}
@media(max-width:730px) and (max-height:620px) {
  .workspace-content {gap:8px}
  .examples {display:none}
}
@media(max-width:730px) and (max-height:420px) {
  .welcome,.examples {display:none}
  .workspace-content {padding-top:6px;padding-bottom:2px}
}
@media(prefers-reduced-motion:reduce) {
  * {scroll-behavior:auto!important;transition:none!important}
  .progress-ring {animation:none}
  .service-skeleton span {animation:none}
  .disclaimer {animation:none}
}

/* TOBA layout and shared brand roles. */
.app-shell {position:relative}
.brand {font-weight:700;letter-spacing:-.085em;gap:.55rem;min-height:44px}
.new-chat {display:flex;align-items:center;justify-content:center;gap:7px}
.new-chat .control-label {font-size:14px}
.main-site-link {font-size:14px;line-height:1.6;text-underline-offset:3px}
.model-menu-panel a {display:block;padding:9px 6px;min-height:44px;font-size:14px}
.model-name-short {display:none}
#readiness {position:absolute;right:24px;top:20px}
main {padding-top:62px}
h1 {letter-spacing:-.02em}
.workspace-content {overflow-y:auto;justify-content:safe center}
.has-messages .workspace-content {overflow:hidden}
.has-draft .welcome {display:none}
#prompt {resize:none;max-height:40dvh;overflow-y:hidden}
.web-status {display:inline-flex;align-items:center;gap:5px;cursor:default}
.web-status svg {width:15px;height:15px}
.memory-toggle[aria-pressed="true"],.presets .active {background:var(--primary-soft);color:var(--selected-ink);border-color:var(--toba-lake-500)}
.example-feedback {display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin:8px 0;font-size:14px;color:var(--ink)}
.example-feedback button {min-height:44px;padding:7px 10px;color:var(--primary-text);background:var(--primary-soft)}
.message.user .answer.message-collapsed {max-height:10.5em;overflow:hidden}
.expand-message {margin-top:10px;min-height:44px;font-size:14px;color:var(--primary-text);background:transparent}
.advanced-settings {margin-top:14px;border-top:1px solid var(--border);padding-top:8px}
.advanced-settings>summary {min-height:44px;cursor:pointer;display:flex;align-items:center;color:var(--primary-text);font-size:14px}
.advanced-settings[open]>summary {margin-bottom:12px}
.guide-settings {margin-top:20px;padding-top:18px;border-top:1px solid var(--border)}
.guide-settings h3 {font-size:16px}
.guide-settings dt {font-size:14px;font-weight:500;margin-top:14px}
.guide-settings dd {font-size:16px;line-height:1.65;color:var(--muted);margin:4px 0 0}
.guide-settings p {font-size:16px}
.disclaimer {position:static;flex:none}
@media(min-width:731px) {
  .sidebar {background:var(--sidebar)}
  .sidebar .controls {display:flex;flex-direction:column}
}
@media(max-width:730px) {
  .app-shell {grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
  .sidebar {display:grid;grid-template-columns:auto 44px 44px minmax(60px,92px) 44px minmax(38px,1fr);grid-template-rows:44px;gap:3px;padding:8px 10px;align-items:center;overflow:visible}
  .sidebar .brand {grid-row:1;grid-column:1;font-size:22px;gap:6px;white-space:nowrap}
  .controls {display:contents}
  .section-title,.control-label,.sidebar>.main-site-link {display:none}
  #openParameters {grid-column:2;grid-row:1}
  #openGuide {grid-column:3;grid-row:1}
  #openParameters,#openGuide {justify-content:center;padding:0;min-height:44px;min-width:44px}
  #openParameters svg,#openGuide svg {width:20px;height:20px}
  #modelMenu {grid-column:4;grid-row:1}
  .model-name-full {display:none}
  .model-name-short {display:inline}
  .model-chip {justify-content:center;gap:3px;padding:8px 3px;font-size:13px;white-space:nowrap}
  .model-chip .chevron {width:12px;height:12px}
  .model-menu-panel {right:0;left:auto}
  #newChat {grid-column:5;grid-row:1;min-height:44px;min-width:44px;padding:0;border:0}
  #newChat svg {width:20px;height:20px}
  #readiness {position:static;grid-column:6;grid-row:1;justify-self:end;gap:4px;padding:0;font-size:12px}
  .quota-card {grid-column:1/-1;grid-row:2;max-width:none;text-align:left;padding-top:5px}
  .quota-card>div {justify-content:flex-start}
  .developer-mode .quota-card {display:flex!important;align-items:center;gap:8px;flex-wrap:wrap}
  main {padding:8px 12px}
  #orb {width:72px;margin-bottom:2px}
  .workspace-content {padding:8px 0 6px;gap:10px}
  .examples {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .examples button {min-height:84px;padding:10px}
  .examples svg {display:block;width:18px;height:18px;margin-bottom:5px}
  .examples span {display:block;font-size:13px}
  .examples strong {font-size:14px}
  .composer-tools {gap:6px}
  .composer-tools-left {gap:6px}
  .memory-toggle {font-size:13px}
  .parameter-foot {flex-wrap:wrap}
}
@media(max-height:700px) {
  .disclaimer {display:none}
}
@media(max-width:360px) {
  .sidebar {grid-template-columns:auto 44px 44px minmax(58px,1fr) 44px 12px;padding-left:8px;padding-right:8px;gap:2px}
  .sidebar .brand {font-size:20px;gap:5px}
  #readinessText {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
}
@media(max-width:730px) and (max-height:420px) {
  .welcome,.examples {display:none}
}

/* TOBA welcome uses the supplied fish artwork. */
.hero-lake {display:grid;grid-template-columns:132px minmax(0,1fr);align-items:center;gap:16px;width:100%;max-width:820px;padding:22px 26px;text-align:left;border:1px solid transparent;border-radius:0;background:transparent;color:var(--ink);overflow:hidden}
.lake-stage {position:relative;width:132px;height:132px;justify-self:center}
.lake-fish {position:relative;display:block;width:112px;height:112px;margin:0 auto;filter:drop-shadow(0 7px 16px color-mix(in srgb,var(--toba-lake-500) 10%,transparent));animation:lake-arrive .75s cubic-bezier(.2,.8,.2,1) both}
.lake-ripple {position:absolute;left:50%;bottom:5px;width:118px;height:24px;border:1px solid var(--toba-lake-500);border-radius:50%;transform:translateX(-50%);opacity:1;animation:lake-settle 1.2s ease-out both}
.ripple-two {bottom:1px;width:130px;height:29px;border-color:var(--toba-lake-500);animation-delay:.25s}
.lake-greeting {margin:0 0 5px;color:var(--muted);font-size:14px;line-height:1.5}
.hero-lake h1 {color:var(--ink);font-size:48px;font-weight:700;line-height:1.05;letter-spacing:-.02em}
.lake-lead {margin:9px 0 0;font-size:16px;line-height:1.65;color:var(--muted)}
.lake-actions {display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.lake-actions button {min-height:44px;padding:8px 14px;font-size:14px;font-weight:500;border-radius:9px}
.lake-actions button:focus-visible {outline-color:var(--toba-orange-700)}
.disclaimer {animation:none}
@keyframes lake-arrive {from {opacity:1;transform:translateY(12px) scale(.94)}to {opacity:1;transform:none}}
@keyframes lake-settle {from {opacity:1;transform:translateX(-50%) scale(.65)}to {opacity:1;transform:translateX(-50%) scale(1)}}
@media(max-width:730px) {
  .hero-lake {grid-template-columns:86px minmax(0,1fr);gap:10px;padding:12px 16px}
  .lake-stage {width:86px;height:102px}
  .lake-fish {width:82px;height:82px}
  .lake-ripple {width:76px;height:17px}
  .ripple-two {width:84px;height:22px}
  .lake-greeting {font-size:13px}
  .hero-lake h1 {font-size:38px}
  .lake-lead {font-size:16px;line-height:1.65}
  .lake-actions {gap:6px;margin-top:12px}
  .lake-actions button {padding:8px 10px;font-size:14px}
}
@media(max-width:400px) {
  .hero-lake {grid-template-columns:68px minmax(0,1fr);padding:6px 12px;gap:9px}
  .lake-stage {width:68px;height:88px}
  .lake-fish {width:68px;height:68px}
  .lake-ripple {width:62px;height:15px}
  .ripple-two {width:68px;height:19px}
  .lake-actions {grid-column:1/-1}
  .lake-actions button {font-size:14px;padding:8px;min-height:44px}
}
@media(prefers-reduced-motion:reduce) {
  .lake-fish,.lake-ripple {animation:none!important;opacity:1}
  .lake-ripple {opacity:1}
}

/* TOBA controls use the reading palette. */
.brand-logo {display:block;width:36px;height:36px;object-fit:contain;flex:none}
#composer:focus-within {border-color:var(--toba-lake-500);box-shadow:0 0 0 1px var(--toba-lake-500)}
#prompt:focus-visible {outline:none}
#send:disabled {background:transparent;border-color:var(--toba-line);color:var(--muted)}
.model-menu-panel [aria-current="true"] {background:var(--soft);color:var(--ink)}
.guide-result img {background:var(--bg)}
@media(max-width:730px) {
  .brand-logo {width:32px;height:32px}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

@media(max-width:400px) {
  #readiness:not([data-state="ready"]) #readinessText {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}

/* TOBA gives one primary action to the focused reading surface. */
.sidebar a {color:var(--toba-on-dark-muted)}
.sidebar .brand {color:var(--toba-on-dark)}
.sidebar .model-menu-panel a {color:var(--toba-orange-700);text-decoration:underline}
.sidebar :focus-visible {outline-color:var(--toba-orange-500)}
.sidebar .model-menu-panel :focus-visible {outline-color:var(--toba-orange-700)}
#send {border-color:var(--toba-orange-700)}
#send:hover {border-color:var(--toba-orange-700)}
body:has(dialog[open]) #send:not(:disabled) {background:var(--surface);color:var(--ink);border:1px solid var(--stroke)}
.guide-actions button,#enableExampleMemory {background:var(--surface);color:var(--ink);border-color:var(--stroke)}
.guide-actions button:hover,#enableExampleMemory:hover {background:var(--soft);color:var(--ink);border-color:var(--stroke)}
.who,.candidate-badge {color:var(--muted)}
#welcome[data-intro-played="true"] .lake-fish,
#welcome[data-intro-played="true"] .lake-ripple {animation:none;opacity:1}

@media(max-width:730px) and (max-height:560px) {
  .welcome {display:none}
}

@media(min-width:731px) {
  .sidebar #readiness {color:var(--toba-ink);--success:var(--toba-lake-500);--warning:var(--toba-ink-muted);--danger:var(--toba-ink-muted)}
}

/* TOBA separates the visible question from its supporting reading. */
.structured-message {white-space:normal}
.message-section-label {font:600 14px/1.65 var(--font);color:var(--muted);margin-bottom:5px}
.reading-text,.question-text {white-space:pre-wrap;overflow-wrap:anywhere}
.reading-text.reading-collapsed {max-height:5.25em;overflow:hidden}
.user-question {margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}
.expand-reading {display:block;min-height:44px;padding:6px 0;border:0;background:transparent;color:var(--muted);font:14px/1.65 var(--font);text-decoration:underline;text-underline-offset:3px}
.expand-reading:hover {background:transparent;color:var(--ink)}
#enableExampleMemory {background:var(--toba-lake-100);border:1px solid var(--toba-lake-500);color:var(--ink);font-weight:600}
#undoExample {background:transparent;border:0;padding:6px 4px;min-height:44px;color:var(--muted);font-weight:400;text-decoration:underline;text-underline-offset:3px}
#undoExample:hover {background:transparent;color:var(--ink)}
.hero-lake {grid-template-columns:minmax(0,1fr);justify-items:center;text-align:center;gap:8px;padding:16px 24px}
.lake-stage {width:112px;height:104px}
.lake-fish {width:88px;height:88px}
.lake-ripple {width:98px;height:18px;bottom:0}
.ripple-two {width:110px;height:22px;bottom:-2px}
.hero-lake h1 {font-size:32px;line-height:1.3;font-weight:600}
.lake-lead {margin:6px 0 0}
.lake-actions {justify-content:center;margin-top:6px}
.lake-actions .text-link {background:transparent;border:0;border-radius:0;padding:0;min-height:44px;color:var(--toba-orange-700);text-decoration:underline;text-underline-offset:3px}
.lake-actions .text-link:hover {background:transparent;color:var(--ink)}
@media(max-width:730px) {
  .hero-lake {padding:6px 12px;gap:4px}
  .lake-stage {width:68px;height:60px}
  .lake-fish {width:48px;height:48px}
  .lake-ripple {width:50px;height:10px}
  .ripple-two {width:60px;height:14px}
  .hero-lake h1 {font-size:22px}
  .lake-actions {margin-top:4px}
}
