:root {
  color-scheme: light;
  --canvas: #fbfaf8;
  --surface: #ffffff;
  --sidebar: #f4f2ee;
  --ink: #302b27;
  --muted: #756d64;
  --line: #e6e1da;
  --control-line: #928476;
  --accent: #825038;
  --accent-hover: #683e2a;
  --accent-ink: #fffaf4;
  --tint: #f2e8dc;
  --tint-deep: #e2c8ad;
  --positive: #386345;
  --positive-bg: #ebf3ed;
  --warning: #8a5f18;
  --warning-bg: #fbf0d8;
  --danger: #a83d38;
  --danger-bg: #fbecea;
  --info: #395d88;
  --info-bg: #edf2f8;
  --glow-a: #d9a681;
  --glow-b: #b4a6e9;
  --glow-c: #8cb9d9;
  --logo-face: #825038;
  --rail-width: 208px;
  --pet-body: #c7d9ba;
  --pet-wing: #9cb592;
}
:root[data-theme="sage"] { --accent: #32624b; --accent-hover: #254b38; --tint: #e8efe4; --tint-deep: #c5dabe; --glow-a: #8ac6a1; --glow-b: #b9cfa2; --logo-face: #32624b; }
:root[data-theme="ocean"] { --accent: #365e7e; --accent-hover: #294763; --tint: #e6eef3; --tint-deep: #c0d8e6; --glow-a: #91b8de; --glow-b: #a8b5e6; --logo-face: #365e7e; }
:root[data-theme="lavender"] { --accent: #6e5286; --accent-hover: #503b65; --tint: #eee8f3; --tint-deep: #d8c9e5; --glow-a: #c0a8e1; --glow-b: #d7abbf; --logo-face: #6e5286; }
:root[data-resolved="dark"] {
  color-scheme: dark;
  --canvas: #1a1918; --surface: #23211f; --sidebar: #1f1d1b;
  --ink: #eee9e2; --muted: #b6aca2; --line: #3c3731; --control-line: #8c8175;
  --accent: #e3b18b; --accent-hover: #f1c6a5; --accent-ink: #2a1c13;
  --tint: #3b2e24; --tint-deep: #5b4331; --logo-face: #e3b18b;
  --positive: #b5d7bc; --positive-bg: #293b2d; --warning: #e1c689; --warning-bg: #3e3320;
  --danger: #f0aaa0; --danger-bg: #442b28; --info: #aec9e7; --info-bg: #293647;
  --glow-a: #9d634a; --glow-b: #6864a7; --glow-c: #407c9a;
}
:root[data-resolved="dark"][data-theme="sage"] { --accent: #a9cfb4; --accent-hover: #c7e2cd; --tint: #29382f; --tint-deep: #3c5744; --glow-a: #497f61; --logo-face: #a9cfb4; }
:root[data-resolved="dark"][data-theme="ocean"] { --accent: #a5c8e1; --accent-hover: #c4ddef; --tint: #293642; --tint-deep: #3a5266; --glow-a: #4a739a; --logo-face: #a5c8e1; }
:root[data-resolved="dark"][data-theme="lavender"] { --accent: #cdb5e5; --accent-hover: #e0ceef; --tint: #372c42; --tint-deep: #524160; --glow-a: #856398; --logo-face: #cdb5e5; }
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { border: 0; background: none; cursor: pointer; min-height: 44px; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { text-decoration: none; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--tint-deep); color: var(--ink); }
svg, img { display: block; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; font-weight: 600; }
h1 { font-size: 30px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { color: var(--muted); }
small { font-size: 11px; }
.icon { width: 19px; height: 19px; }
.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; }
.skip-link { position: fixed; top: -80px; left: 12px; z-index: 100; padding: 13px 18px; border-radius: 8px; color: var(--accent-ink); background: var(--accent); }
.skip-link:focus { top: 12px; }
.loading-state, .noscript-message { max-width: 650px; padding: 35px; margin: 90px auto; text-align: center; }
.app-shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); display: flex; flex-direction: column; padding: 26px 15px 17px; border-right: 1px solid var(--line); background: var(--sidebar); z-index: 10; }
.brand { display: flex; align-items: center; gap: 9px; min-height: 44px; }
.brand-symbol { width: 34px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink); flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; }
.wordmark { font-size: 18px; font-weight: 750; letter-spacing: -.05em; }
.primary-nav { display: grid; gap: 7px; margin-top: 39px; }
.nav-item { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 12px 15px; border-radius: 11px; color: var(--muted); font-weight: 500; font-size: 13px; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--accent); font-weight: 650; box-shadow: 0 2px 8px #33251004; }
.nav-count { margin-left: auto; background: var(--tint); padding: 1px 7px; border-radius: 6px; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.model-status { display: flex; align-items: center; gap: 7px; width: 100%; font-size: 10px; color: var(--muted); padding: 12px 8px; }
.model-status .icon { width: 13px; margin-left: auto; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.account-button { display: flex; align-items: center; gap: 10px; width: 100%; border-top: 1px solid var(--line); padding: 16px 7px 0; text-align: left; }
.account-button strong { font-size: 12px; font-weight: 600; display: block; max-width: 95px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-button small { color: var(--muted); display: block; font-size: 10px; margin-top: 3px; }
.account-button > .icon { margin-left: auto; width: 16px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--tint-deep); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; font-weight: 600; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 66px; height: 66px; font-size: 23px; }
.main-shell { margin-left: var(--rail-width); min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 35px; height: 66px; }
.page-label { color: var(--muted); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.preview-label { padding: 0 12px; font-size: 10px; color: var(--muted); }
.preview-label::before { content: ''; display: inline-block; margin: 0 7px 1px 0; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.icon-button { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border-radius: 10px; padding: 10px; }
.icon-button:hover { background: var(--tint); }
.mobile-brand, .mobile-nav, .mobile-profile { display: none; }
.content { max-width: 1210px; margin: 0 auto; padding: 24px 36px 42px; min-width: 0; }
.chat-content { max-width: none; padding-top: 0; padding-bottom: 0; }
.page { animation: enter .22s ease-out both; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 8px 0 24px; }
.button-row, .inline-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 600; transition: background .16s, transform .16s; }
.button .icon { width: 16px; height: 16px; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary, .send-button { background: var(--accent); color: var(--accent-ink); }
.button.primary:hover, .send-button:hover { background: var(--accent-hover); }
.button.secondary { border-color: var(--control-line); background: var(--surface); }
.button.secondary:hover:not(:disabled) { background: var(--tint); }
.button.ghost { color: var(--muted); }
.button.ghost:hover { background: var(--tint); color: var(--ink); }
.button.full { width: 100%; }
.button.compact { font-size: 11px; padding: 9px 12px; }
.button.danger { color: var(--danger); border-color: var(--danger); }
.danger-text { color: var(--danger) !important; }
.text-button { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; min-height: 44px; font-size: 12px; color: var(--accent); font-weight: 550; padding: 8px 2px; }
.text-button .icon { width: 16px; height: 16px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.centered { margin: 8px auto 0; display: flex; justify-content: center; }
.help-wrap { display: inline-flex; position: relative; flex-shrink: 0; align-items: center; vertical-align: middle; }
.info-button { color: var(--muted); padding: 12px; }
.info-button .icon { width: 15px; height: 15px; }
.tooltip { position: absolute; z-index: 60; right: 0; top: calc(100% + 4px); display: none; width: 270px; padding: 13px 15px; background: var(--ink); color: var(--surface); border-radius: 10px; box-shadow: 0 5px 25px #0002; font-size: 11px; line-height: 1.7; font-weight: 400; text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; pointer-events: none; }
.help-wrap:hover .tooltip, .help-wrap:focus-within .tooltip { display: block; }
.chat-page { min-height: calc(100dvh - 66px); display: flex; flex-direction: column; }
.chat-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; }
.chat-tools > .text-button { color: var(--muted); }
.chat-tools-right { display: flex; align-items: center; gap: 11px; }
.chat-tools-right .text-button { font-size: 11px; }
.chat-tools-right .icon-button { color: var(--muted); }
.chat-center { width: 100%; max-width: 820px; margin: clamp(42px, 7.5vh, 100px) auto 35px; }
.chat-intro { margin-bottom: 30px; text-align: center; }
.chat-companion { width: 90px; height: 82px; margin: 0 auto 6px; display: block; padding: 0; }
.companion-art { width: 100%; height: auto; overflow: visible; }
.greeting { color: var(--muted); font-size: 14px; margin: 0 0 9px; }
.chat-intro h1 { font-size: clamp(32px, 3.1vw, 44px); font-weight: 500; letter-spacing: -.05em; }
.composer-window { position: relative; isolation: isolate; border-radius: 23px; padding: 1px; background: var(--control-line); }
.composer-aura { pointer-events: none; position: absolute; z-index: -1; inset: -20px 15px -15px; background: radial-gradient(ellipse at 10% 80%, var(--glow-a), transparent 60%), radial-gradient(ellipse at 70% 30%, var(--glow-b), transparent 65%), radial-gradient(ellipse at 100% 60%, var(--glow-c), transparent 60%); filter: blur(34px); opacity: .18; transition: opacity .5s; }
.composer { position: relative; border-radius: 22px; background: var(--surface); padding: 20px 20px 14px; }
.composer textarea { display: block; width: 100%; resize: none; min-height: 89px; max-height: 40vh; overflow-y: auto; border: 0; background: none; padding: 3px 0; color: var(--ink); font-size: 15px; line-height: 1.7; }
#chat-input:focus, #chat-input:focus-visible { outline: none; box-shadow: none; border: 0; }
.composer textarea::placeholder { color: var(--muted); opacity: .9; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.composer-actions { display: flex; align-items: center; gap: 9px; }
.composer-actions > .icon-button { border: 1px solid var(--line); border-radius: 50%; }
.context-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 9px 12px; font-size: 11px; color: var(--muted); border-radius: 10px; }
.context-chip:hover { background: var(--tint); }
.context-chip .icon { width: 16px; }
.context-chip strong { color: var(--ink); font-weight: 600; }
.send-button { border-radius: 12px; min-width: 95px; }
.composer-caption { display: flex; align-items: center; justify-content: center; gap: 0; margin: 3px 0 12px; color: var(--muted); font-size: 10px; min-height: 40px; }
.composer-caption > span { display: inline-flex; align-items: center; gap: 7px; }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.suggestion { display: flex; align-items: center; gap: 10px; min-height: 75px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: left; transition: border-color .18s, transform .18s; }
.suggestion:hover { border-color: var(--control-line); transform: translateY(-2px); }
.suggestion > .icon:first-child { color: var(--accent); }
.suggestion > .icon:last-child { width: 14px; height: 14px; margin-left: auto; color: var(--muted); }
.suggestion span { font-size: 12px; font-weight: 500; line-height: 1.65; }
.suggestion .service-mark { width: 21px; height: 21px; }
.quiet-footer { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 0; padding: 10px 0 15px; color: var(--muted); font-size: 10px; }
.quiet-footer > span { display: flex; align-items: center; gap: 6px; }
.quiet-footer .icon { width: 13px; height: 13px; }
.brewing { background: linear-gradient(100deg, var(--glow-a), var(--glow-b), var(--glow-c), var(--glow-a)); background-size: 300% 300%; animation: brew-window 4s ease infinite; }
.brewing .composer-aura { opacity: .6; animation: aura-drift 4s ease-in-out infinite alternate; }
.brewing-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 1.8s ease-in-out infinite; }
.has-messages .chat-center { margin-top: 28px; }
.messages { display: grid; gap: 16px; margin-bottom: 28px; }
.message.user { max-width: 82%; justify-self: end; padding: 16px 20px; background: var(--tint); border-radius: 16px 16px 3px 16px; overflow-wrap: anywhere; }
.message.assistant { max-width: 82%; justify-self: start; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 3px; overflow-wrap: anywhere; }
.message-caption { font-size: 9px; color: var(--muted); display: block; margin-bottom: 5px; }
.message p { color: var(--ink); font-size: 14px; white-space: pre-wrap; }
.message.thinking p { color: var(--muted); }
.thinking-dots { display: inline-flex; gap: 4px; margin-left: 7px; vertical-align: middle; }
.thinking-dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); opacity: .45; animation: thinking 1.2s ease-in-out infinite; }
.thinking-dots span:nth-child(2) { animation-delay: .2s; }
.thinking-dots span:nth-child(3) { animation-delay: .4s; }
.chat-error { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; padding: 13px 16px; border: 1px solid var(--danger); border-radius: 12px; background: var(--danger-bg); color: var(--danger); font-size: 12px; }
.chat-error > .icon { width: 16px; height: 16px; }
.chat-error > span { flex: 1; min-width: 150px; line-height: 1.6; }
.chat-error .button { margin-left: auto; }
.save-idea { justify-self: start; font-size: 11px; }
.provider-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.provider-label > .service-mark { width: 19px; height: 19px; margin: 0 7px; }
.state-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; line-height: 1.4; font-weight: 550; white-space: nowrap; padding: 6px 9px; border-radius: 7px; background: var(--sidebar); color: var(--muted); }
.state-pill .icon { width: 12px; height: 12px; }
.state-pill.success { color: var(--positive); background: var(--positive-bg); }
.state-pill.warning { color: var(--warning); background: var(--warning-bg); }
.state-pill.danger { color: var(--danger); background: var(--danger-bg); }
.state-pill.info { color: var(--info); background: var(--info-bg); }
.section-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.section-tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 1px 14px; font-size: 12px; color: var(--muted); border-bottom: 2px solid transparent; border-radius: 0; }
.section-tab .icon { width: 17px; height: 17px; }
.section-tab.selected { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.count-label { min-width: 22px; padding: 1px 6px; border-radius: 6px; background: var(--tint); color: var(--accent); font-size: 10px; font-weight: 550; text-align: center; }
.sample-toggle { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); cursor: pointer; min-height: 44px; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.empty-registry { display: flex; align-items: center; gap: 14px; padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; color: var(--muted); font-size: 13px; }
.empty-registry > .icon { color: var(--accent); }
.empty-registry .button { margin-left: auto; }
.registry-section { margin-bottom: 34px; }
.key-list { display: flex; flex-direction: column; gap: 8px; }
.mcp-section { display: flex; flex-direction: column; }
.mcp-endpoint { margin: 8px 0 26px; }
.mcp-endpoint label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.mcp-copy-row { display: flex; gap: 10px; }
.mcp-copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 10px 12px; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.mcp-endpoint .field-hint { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mcp-subheading { font-size: 14px; margin: 8px 0 14px; }
.mcp-snippet { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
.mcp-snippet pre { flex: 1; min-width: 0; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.mcp-snippet .button { margin-top: 0; }
.key-row { display: flex; align-items: center; gap: 14px; padding: 14px 17px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; margin: 12px 0; }
.key-list .key-row { margin: 0; }
.key-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.key-meta small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
#key-form .field-hint, .modal-content > .field-hint { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sample-notice { color: var(--warning); background: var(--warning-bg); border: 1px solid var(--line); border-radius: 10px 10px 0 0; padding: 10px 15px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.sample-notice .icon { width: 15px; height: 15px; }
.registry-table-wrap { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface); }
.registry-table { width: 100%; border-collapse: collapse; text-align: left; }
.registry-table th { font-size: 10px; font-weight: 500; color: var(--muted); padding: 8px 10px; }
.registry-table th > span { display: flex; align-items: center; }
.registry-table th:first-child { padding-left: 18px; }
.registry-table td { border-top: 1px solid var(--line); padding: 17px 10px; font-size: 11px; }
.registry-table .registry-app { display: flex; align-items: center; gap: 11px; border-top: 0; padding-left: 18px; }
.registry-table tr { border-top: 1px solid var(--line); }
.registry-table thead tr { border-top: 0; }
.registry-table td { border-top: 0; }
.registry-app strong { display: block; font-size: 12px; font-weight: 600; }
.registry-app small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.registry-more { width: 52px; padding-right: 8px !important; }
.date-cell { white-space: nowrap; color: var(--muted); }
.service-box { display: inline-grid; place-items: center; width: 42px; height: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; flex-shrink: 0; }
.service-mark { width: 25px; height: 25px; object-fit: contain; border-radius: 3px; }
.monochrome-light { filter: invert(1); }
.search-field { display: flex; gap: 9px; align-items: center; border: 1px solid var(--control-line); border-radius: 10px; padding: 0 12px; background: var(--surface); }
.search-field .icon { width: 16px; color: var(--muted); }
.search-field input { width: 150px; min-width: 0; background: none; border: 0; padding: 12px 0; font-size: 12px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0 18px; }
.filter-tab { font-size: 11px; color: var(--muted); padding: 8px 13px; border-radius: 8px; }
.filter-tab.selected { background: var(--tint); color: var(--accent); font-weight: 600; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.connector-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; transition: border-color .2s; min-width: 0; }
.connector-card:hover { border-color: var(--control-line); }
.connector-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.small-label { display: inline-flex; align-items: center; font-size: 9px; color: var(--muted); background: var(--sidebar); border: 1px solid var(--line); border-radius: 5px; padding: 4px 7px; white-space: nowrap; font-weight: 400; }
.connector-card h3 { font-size: 13px; margin: 17px 0 12px; min-height: 18px; letter-spacing: -.01em; }
.connector-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.connector-card-bottom .text-button { font-size: 10px; color: var(--muted); }
.stack-heading { margin-bottom: 22px; }
.stack-stats { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 14px; margin-bottom: 22px; }
.metric-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.metric-card > span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; min-height: 35px; }
.metric-card > span > .icon { width: 16px; }
.metric-card > strong { display: block; margin-top: 7px; font-size: 27px; letter-spacing: -.04em; font-weight: 550; }
.metric-card .spend { font-size: 24px; overflow-wrap: anywhere; }
.spend span { font-weight: 400; color: var(--muted); font-size: 15px; }
.metric-card > small { color: var(--muted); font-size: 10px; }
.stack-list { display: grid; gap: 10px; }
.stack-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stack-name { min-width: 120px; flex: 1; }
.stack-name strong { font-size: 13px; font-weight: 600; display: block; overflow-wrap: anywhere; }
.stack-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.stack-version { flex: 1; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.stack-cost { text-align: right; font-size: 13px; font-weight: 600; min-width: 95px; }
.stack-cost small { font-weight: 400; }
.empty-card { text-align: center; display: grid; justify-items: center; padding: 42px 24px; gap: 18px; border: 1px solid var(--line); background: var(--surface); border-radius: 13px; }
.empty-card > .icon { width: 32px; height: 32px; color: var(--accent); }
.overlap-row { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.tag { background: var(--tint); color: var(--accent); padding: 5px 9px; border-radius: 6px; font-size: 10px; }
.quiet-caption { display: flex; align-items: center; gap: 8px; margin-top: 28px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.quiet-caption > .icon { width: 15px; height: 15px; }
.memory-overview { border: 1px solid var(--line); border-radius: 17px; padding: 23px 26px; background: var(--surface); margin-bottom: 20px; }
.memory-overview-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.overline { text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-size: 10px; }
.memory-quantity { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.memory-quantity > strong { font-size: 34px; line-height: 1; font-weight: 550; letter-spacing: -.055em; }
.memory-quantity > span { color: var(--muted); font-size: 13px; }
.memory-quantity .memory-size { padding-left: 10px; border-left: 1px solid var(--line); font-size: 11px; }
.local-badge { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--positive); }
.local-badge > .icon { width: 15px; height: 15px; }
.coverage-label { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 6px; color: var(--muted); font-size: 11px; }
.coverage-label > span:last-child { display: flex; align-items: center; }
progress { width: 100%; height: 6px; appearance: none; border: none; border-radius: 10px; overflow: hidden; background: var(--sidebar); color: var(--accent); }
progress::-webkit-progress-bar { background: var(--sidebar); border-radius: 10px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 10px; transition: width .5s ease-out; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 10px; }
.context-progress { height: 9px; overflow: hidden; border-radius: 10px; background: var(--sidebar); }
.coverage-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--glow-a)); transform-origin: left; animation: coverage-fill .65s ease-out both; }
.coverage-0 { width: 0; }
.coverage-1 { width: 25%; }
.coverage-2 { width: 50%; }
.coverage-3 { width: 75%; }
.coverage-4 { width: 100%; }
@keyframes coverage-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.coverage-dots { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; }
.coverage-dots > span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.coverage-dots > span > span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.coverage-dots .filled { color: var(--accent); }
.coverage-dots .filled > span { background: var(--accent); }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 32px; }
.memory-tile { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.memory-tile.has-source { border-color: var(--control-line); }
.memory-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.memory-tile h2 { font-size: 15px; margin: 17px 0 5px; }
.empty-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.source-date { font-size: 10px; color: var(--muted); margin-bottom: 20px; }
.memory-tile > .button { margin-top: auto; }
.memory-tile .guide-link { font-size: 10px; margin: 5px 0 -10px; justify-content: center; }
.review-hint { display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--warning); margin: -10px 0 8px; }
.review-hint > .icon { width: 12px; height: 12px; }
.review-hint .info-button { padding: 8px; }
.saved-section { margin-bottom: 26px; }
.empty-inline { padding: 23px; border: 1px dashed var(--control-line); border-radius: 12px; color: var(--muted); font-size: 12px; text-align: center; }
.source-list { display: grid; gap: 8px; }
.source-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.source-type-icon { width: 34px; display: grid; place-items: center; color: var(--accent); flex-shrink: 0; }
.source-title { flex: 1; min-width: 0; text-align: left; padding: 5px 0; }
.source-title strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.source-title small { display: block; color: var(--muted); margin-top: 4px; font-size: 10px; }
.connected-memory { display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.app-cluster { display: flex; }
.app-cluster .service-mark { width: 30px; height: 30px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; margin-left: -4px; }
.connected-memory strong { display: block; font-size: 12px; font-weight: 550; }
.connected-memory small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.connected-memory .text-button { margin-left: auto; }
.milestone-inline { display: flex; align-items: center; gap: 8px; margin-top: 19px; font-size: 11px; color: var(--positive); }
.milestone-inline .icon { width: 17px; height: 17px; }
.milestone-inline span { color: var(--muted); font-size: 10px; margin-left: auto; }
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 25px 100px #0003; overflow: auto; }
dialog::backdrop { background: #1e17116b; backdrop-filter: blur(4px); }
.modal-open { overflow: hidden; }
.modal-content { padding: 28px; position: relative; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal-heading { padding-right: 40px; margin-bottom: 24px; }
.modal-heading h2 { font-size: 25px; overflow-wrap: anywhere; }
.modal-heading p { margin-top: 9px; font-size: 12px; line-height: 1.7; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 23px; }
.modal-footer > .button:empty { visibility: hidden; }
.help-copy { font-size: 13px; line-height: 1.9; }
.settings-tabs { gap: 20px; }
.settings-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 10px; }
.settings-links .text-button { color: var(--muted); font-size: 10px; }
.field { margin: 19px 0; min-width: 0; }
.field > label, .field-label, legend { font-size: 12px; font-weight: 600; display: block; margin-bottom: 9px; }
.field > label > span { font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 5px; }
.field input:not([type="range"]):not([type="checkbox"]), .field textarea, .field select { width: 100%; border: 1px solid var(--control-line); border-radius: 9px; padding: 11px 12px; background: var(--surface); color: var(--ink); min-height: 44px; font-size: 13px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field textarea { min-height: 125px; resize: vertical; line-height: 1.7; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row.three { grid-template-columns: 1.1fr 1fr 1fr; }
.field-row .field { margin: 10px 0; }
fieldset { margin: 22px 0; padding: 0; border: 0; min-width: 0; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--control-line); border-radius: 9px; font-size: 11px; background: var(--surface); }
.chip.selected { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.profile-avatar-row { display: flex; align-items: center; gap: 18px; margin: 18px 0 25px; }
.profile-avatar-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.profile-avatar-row .text-button { padding: 0 10px; }
.advanced-options { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0; padding: 2px 0; }
.advanced-options summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-size: 12px; font-weight: 550; color: var(--muted); }
.advanced-options > p { font-size: 12px; line-height: 1.8; margin: 6px 0 18px; }
.range-control { display: flex; align-items: center; gap: 10px; }
input[type="range"] { width: 100%; min-height: 44px; accent-color: var(--accent); }
.range-labels { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); }
.range-labels strong { color: var(--accent); font-weight: 600; }
.appearance-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0 26px; }
.appearance-option { display: grid; justify-items: center; gap: 9px; padding: 17px 8px; border: 1px solid var(--control-line); border-radius: 12px; font-size: 12px; }
.appearance-option.selected { border-color: var(--accent); color: var(--accent); background: var(--tint); }
.theme-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 15px 0; }
.theme-option { padding: 15px 8px; border: 1px solid var(--control-line); border-radius: 11px; display: grid; justify-items: center; gap: 11px; font-size: 11px; }
.theme-option.selected { border-color: var(--accent); background: var(--tint); }
.swatch { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.swatch .icon { width: 15px; height: 15px; }
.swatch.coffee { background: #a67453; }
.swatch.sage { background: #6b9776; }
.swatch.ocean { background: #6593b1; }
.swatch.lavender { background: #a08abb; }
.companion-stage { width: 124px; margin: -12px auto 14px; text-align: center; }
.companion-stage > span { display: block; margin-top: -9px; color: var(--muted); font-size: 11px; }
.companion-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.companion-option { padding: 7px 5px 10px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; font-size: 10px; background: var(--canvas); }
.companion-option .companion-art { height: 69px; }
.companion-option.selected { border-color: var(--accent); background: var(--tint); color: var(--accent); }
.companion-option:hover .companion-art { transform: translateY(-3px); transition: transform .2s; }
.no-companion-art { height: 69px; display: grid; place-items: center; color: var(--muted); }
.no-companion-art .icon { width: 28px; height: 28px; }
.accessory-options { display: flex; gap: 7px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.onboard-progress { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; margin-bottom: 22px; padding-right: 30px; }
.onboard-progress progress { width: 100px; height: 4px; }
.provider-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin: 18px 0; }
.provider-option { display: grid; justify-items: center; gap: 9px; padding: 14px 7px; background: var(--surface); border: 1px solid var(--control-line); border-radius: 11px; font-size: 11px; }
.provider-option.selected { background: var(--tint); border-color: var(--accent); color: var(--accent); }
.guide-callout { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; color: var(--accent); background: var(--tint); padding: 13px 15px; border-radius: 10px; font-size: 12px; }
.guide-callout > .icon:last-child { margin-left: auto; width: 15px; }
.dropzone { display: grid; justify-items: center; gap: 12px; border: 1.5px dashed var(--control-line); border-radius: 13px; padding: 27px 18px; text-align: center; background: var(--canvas); margin: 18px 0; }
.dropzone > .icon { color: var(--accent); width: 27px; height: 27px; }
.dropzone strong { font-size: 13px; font-weight: 550; }
.dropzone small { color: var(--muted); font-size: 10px; }
.dropzone.dragover { background: var(--tint); border-color: var(--accent); }
.import-methods { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.import-methods .text-button { font-size: 11px; }
.source-meta { display: flex; gap: 13px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 10px; margin: 10px 0 17px; }
.source-meta > span { display: flex; gap: 7px; align-items: center; overflow-wrap: anywhere; }
.source-meta .icon { width: 15px; }
.source-preview { white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 280px; padding: 17px; margin: 0 0 17px; border: 1px solid var(--line); border-radius: 11px; background: var(--canvas); color: var(--ink); font: 11px/1.8 var(--font-mono); }
.local-notice { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin: 12px 0 0; min-height: 36px; }
.local-notice > .icon { color: var(--positive); width: 14px; height: 14px; }
.local-notice .help-wrap { margin-left: auto; }
.checkbox-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 12px; margin: 16px 0 4px; cursor: pointer; }
.field-hint { font-size: 10px; color: var(--muted); line-height: 1.7; }
.form-error { color: var(--danger); font-size: 12px; line-height: 1.7; margin-top: 10px; }
.form-error:empty { display: none; }
.guide-steps { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 22px; }
.guide-steps li { display: flex; gap: 14px; align-items: flex-start; }
.guide-steps li > span { flex-shrink: 0; width: 27px; height: 27px; display: grid; place-items: center; background: var(--tint); color: var(--accent); border-radius: 50%; font-size: 11px; font-weight: 600; }
.guide-steps strong { display: block; font-size: 13px; margin: 2px 0 6px; }
.guide-steps p { font-size: 12px; line-height: 1.8; }
.copy-prompt { background: var(--canvas); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.copy-prompt p { font-size: 11px; line-height: 1.8; }
.copy-prompt .button { margin-top: 13px; }
.connector-detail-logo { display: flex; align-items: center; gap: 15px; margin: 15px 0 24px; }
.connector-detail-logo > .service-mark { width: 40px; height: 40px; }
.detail-block { margin: 22px 0; }
.detail-block h3 { font-size: 13px; margin-bottom: 8px; }
.detail-block p { font-size: 12px; line-height: 1.85; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; font-size: 12px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; }
.brand-options { display: grid; gap: 12px; }
.brand-options article { display: flex; align-items: center; gap: 14px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.brand-options article > div { flex: 1; min-width: 0; }
.brand-options strong { font-size: 14px; }
.brand-options p { font-size: 11px; margin-top: 5px; line-height: 1.7; }
.toast { position: fixed; left: calc(50% + var(--rail-width) / 2); bottom: 25px; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; max-width: min(500px, calc(100vw - 30px)); padding: 14px 18px; border-radius: 12px; background: var(--ink); color: var(--surface); box-shadow: 0 5px 35px #0002; font-size: 12px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { width: 18px; height: 18px; }
.celebrating .companion-art { animation: pet-hop .65s ease-out; }
.bean-steam { animation: steam 4s ease-in-out infinite; }
.bean-steam.second { animation-delay: 1.2s; }
.chat-companion .pet-cloud, .companion-stage .pet-cloud, .chat-companion .pet-orbit, .companion-stage .pet-orbit { animation: float 5s ease-in-out infinite; }
.chat-companion .pet-pebble, .companion-stage .pet-pebble { animation: rock 6s ease-in-out infinite; transform-origin: 50% 85%; }
.chat-companion .pet-leaves, .companion-stage .pet-leaves { animation: rock 5s ease-in-out infinite; transform-origin: 120px 105px; }
.chat-companion .bot-light, .companion-stage .bot-light, .chat-companion .moon-stars, .companion-stage .moon-stars { animation: pulse 4s ease-in-out infinite; }
.chat-companion .pet-fox, .companion-stage .pet-fox { animation: float 7s ease-in-out infinite; }
@keyframes enter { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes brew-window { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes aura-drift { from { transform: translateX(-10px) scale(.95); } to { transform: translateX(10px) scale(1.04); } }
@keyframes steam { 0%, 100% { opacity: .45; transform: translateY(2px); } 50% { opacity: .9; transform: translateY(-3px); } }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-4px); } }
@keyframes rock { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes pet-hop { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-10px) rotate(-5deg); } 65% { transform: translateY(-2px) rotate(4deg); } }
@keyframes thinking { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
@media (max-width: 1150px) {
  :root { --rail-width: 188px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .wordmark { font-size: 16px; }
  .brand { gap: 7px; }
  .content { padding-left: 25px; padding-right: 25px; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .registry-table th, .registry-table td { padding-left: 7px; padding-right: 7px; }
  .registry-table .registry-app { padding-left: 13px; gap: 8px; }
  .registry-app .service-box { width: 32px; height: 32px; }
  .registry-app .service-mark { width: 21px; height: 21px; }
  .registry-app strong { font-size: 11px; }
  .state-pill { font-size: 9px; padding: 6px 7px; }
  .memory-tile { padding: 15px; }
  .stack-row { gap: 10px; padding: 14px; }
  .stack-name { min-width: 95px; }
}
@media (max-width: 900px) and (min-width: 721px) {
  :root { --rail-width: 76px; }
  .sidebar { padding: 23px 12px 18px; }
  .sidebar .wordmark, .nav-item > span, .account-button > span:not(.avatar), .account-button > .icon, .model-status { display: none; }
  .nav-item { justify-content: center; padding: 13px; }
  .account-button { justify-content: center; padding-left: 0; padding-right: 0; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --rail-width: 0px; }
  html { scrollbar-gutter: auto; }
  .sidebar { display: none; }
  .main-shell { margin-left: 0; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .topbar { height: 63px; padding: 0 17px; position: sticky; top: 0; z-index: 12; background: var(--canvas); border-bottom: 1px solid var(--line); }
  .mobile-brand { display: flex; }
  .mobile-brand .wordmark { font-size: 18px; }
  .mobile-brand .brand-symbol { width: 31px; height: 33px; border-radius: 10px; }
  .mobile-profile { display: inline-grid; padding: 4px; }
  .top-actions { gap: 2px; }
  .top-actions .preview-label { display: none; }
  .page-label { display: none; }
  .content { padding: 25px 18px 30px; }
  .chat-content { padding-top: 9px; padding-bottom: 0; }
  .page-heading { align-items: flex-start; margin: 4px 0 23px; gap: 12px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading .button-row { gap: 7px; }
  .page-heading .button { padding: 10px 12px; font-size: 11px; }
  .chat-page { min-height: calc(100dvh - 150px); }
  .chat-tools { padding: 0; }
  .chat-tools-right { gap: 2px; }
  .chat-tools > .text-button { font-size: 11px; }
  .chat-center { margin-top: 24px; margin-bottom: 15px; }
  .chat-intro { margin-bottom: 25px; }
  .chat-companion { width: 79px; height: 69px; }
  .greeting { font-size: 12px; margin-bottom: 9px; }
  .chat-intro h1 { font-size: clamp(27px, 7.7vw, 34px); }
  .composer { padding: 16px 14px 12px; border-radius: 20px; }
  .composer-window { border-radius: 21px; }
  .composer textarea { font-size: 16px; min-height: 89px; }
  .composer-aura { inset: -10px 20px; filter: blur(24px); }
  .composer-actions { gap: 4px; }
  .context-chip { padding: 8px; font-size: 10px; gap: 5px; }
  .send-button { min-width: 77px; padding: 10px 12px; }
  .suggestions { grid-template-columns: 1fr; gap: 8px; }
  .suggestion { min-height: 56px; padding: 13px 15px; }
  .suggestion span { font-size: 12px; }
  .suggestion > .icon:last-child { width: 14px; }
  .composer-caption { margin-bottom: 8px; font-size: 9px; }
  .quiet-footer { padding-bottom: 0; }
  .chat-error { padding: 12px; font-size: 11px; }
  .message.user, .message.assistant { max-width: 92%; }
  .message p { font-size: 13px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 15; padding: 8px 18px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .mobile-nav a { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 53px; color: var(--muted); font-size: 11px; border-radius: 11px; }
  .mobile-nav a.active { background: var(--tint); color: var(--accent); font-weight: 600; }
  .mobile-nav .icon { width: 19px; height: 19px; }
  .tooltip { display: none !important; }
  .provider-label { gap: 4px; font-size: 10px; justify-content: flex-end; }
  .provider-label > .service-mark { width: 15px; height: 15px; margin: 0 3px; }
  .provider-label > .state-pill { display: none; }
  .section-tabs { gap: 23px; margin-bottom: 23px; }
  .section-tab { font-size: 12px; }
  .section-heading { gap: 9px; margin-bottom: 13px; }
  .section-heading h2 { font-size: 15px; }
  .section-heading .inline-group { gap: 2px; }
  .sample-toggle { font-size: 10px; gap: 5px; }
  .empty-registry { flex-wrap: wrap; padding: 19px; gap: 12px; font-size: 12px; }
  .key-row { flex-wrap: wrap; }
  .mcp-copy-row { flex-direction: column; }
  .mcp-snippet { flex-direction: column; }
  .empty-registry .button { width: 100%; margin-left: 0; }
  .registry-table-wrap { border: none; border-radius: 0; background: none; }
  .registry-table, .registry-table tbody { display: block; width: 100%; }
  .registry-table thead { display: none; }
  .registry-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 10px; position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 17px; margin: 10px 0; }
  .registry-table td, .registry-table .registry-app { padding: 0; border: 0; font-size: 11px; }
  .registry-table .registry-app { grid-column: 1 / 3; gap: 11px; }
  .registry-app strong { font-size: 13px; }
  .registry-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 6px; font-size: 9px; color: var(--muted); }
  .registry-more { position: absolute; top: 12px; right: 8px; }
  .sample-notice { border-radius: 9px; font-size: 10px; padding: 10px 12px; }
  .state-pill { font-size: 10px; }
  .catalog-section > .section-heading { flex-wrap: wrap; gap: 13px; }
  .search-field { width: 100%; }
  .search-field input { width: 100%; flex: 1; }
  .filter-tabs { gap: 2px; }
  .filter-tab { padding: 8px 10px; font-size: 10px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .connector-card { padding: 15px; }
  .connector-card-top { gap: 8px; }
  .connector-card h3 { font-size: 13px; margin-top: 15px; }
  .connector-card-top .small-label { font-size: 8px; padding: 3px 5px; }
  .connector-card .service-box { width: 35px; height: 35px; border-radius: 9px; }
  .connector-card .service-mark { width: 23px; height: 23px; }
  .connector-card-bottom { gap: 5px; }
  .connector-card .button.compact { font-size: 10px; padding: 9px 10px; }
  .stack-heading { align-items: flex-start; }
  .stack-heading .inline-group { gap: 5px; }
  .stack-heading .button { flex-shrink: 0; }
  .stack-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stack-stats .metric-card:nth-child(2) { grid-column: 2; grid-row: 1 / 3; }
  .metric-card { padding: 15px; }
  .metric-card > span { font-size: 9px; gap: 6px; }
  .metric-card > span > .icon { width: 14px; }
  .metric-card > strong { font-size: 25px; }
  .metric-card .spend { font-size: 23px; line-height: 1.6; }
  .stack-row { display: grid; grid-template-columns: 38px 1fr 44px; gap: 9px 11px; padding: 15px; }
  .stack-row .service-box { width: 36px; height: 36px; grid-row: 1 / 3; align-self: start; }
  .stack-name { min-width: 0; grid-column: 2; }
  .stack-version { grid-column: 2; }
  .stack-cost { grid-column: 2; grid-row: 3; text-align: left; font-size: 12px; }
  .stack-row > .icon-button { grid-column: 3; grid-row: 1; }
  .stack-cost small { display: inline; margin-left: 5px; }
  .quiet-caption { font-size: 10px; }
  .memory-overview { padding: 20px; }
  .memory-overview-top { gap: 6px; }
  .memory-quantity { gap: 7px; }
  .memory-quantity > strong { font-size: 30px; }
  .memory-quantity > span { font-size: 11px; }
  .memory-quantity .memory-size { padding-left: 7px; font-size: 9px; }
  .local-badge { gap: 3px; font-size: 10px; }
  .local-badge .info-button { padding: 10px; }
  .coverage-label { margin-top: 14px; font-size: 10px; }
  .memory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-bottom: 24px; }
  .memory-tile { padding: 17px; }
  .memory-tile h2 { font-size: 14px; }
  .memory-tile .source-date { margin-bottom: 16px; font-size: 9px; }
  .memory-tile .button { font-size: 11px; }
  .memory-tile .guide-link { font-size: 9px; }
  .review-hint { flex-wrap: wrap; }
  .source-row { padding: 12px; gap: 8px; }
  .source-row > .small-label { display: none; }
  .source-title strong { font-size: 11px; }
  .source-title small { font-size: 9px; }
  .connected-memory { padding: 14px; gap: 10px; flex-wrap: wrap; }
  .connected-memory > .help-wrap { margin-left: auto; }
  .connected-memory .text-button { margin-left: 0; }
  .connected-memory strong { font-size: 11px; }
  .app-cluster .service-mark { width: 26px; height: 26px; }
  .milestone-inline { font-size: 10px; }
  .milestone-inline span { font-size: 9px; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 17px; }
  .modal-content { padding: 24px 19px; }
  .modal-heading h2 { font-size: 23px; }
  .modal-heading { margin-bottom: 22px; }
  .modal-close { top: 9px; right: 9px; }
  .modal-footer { gap: 8px; }
  .modal-footer .button { font-size: 11px; padding: 10px 12px; }
  .modal-footer .text-button { font-size: 10px; }
  .settings-tabs { gap: 20px; }
  .settings-links { gap: 13px; }
  .settings-links .text-button { font-size: 9px; }
  .field input:not([type="range"]):not([type="checkbox"]), .field textarea, .field select { font-size: 16px; }
  .field-row { gap: 10px; }
  .field-row.three { grid-template-columns: 1fr 1fr; }
  .field-row.three .field:first-child { grid-column: 1 / 3; }
  .companion-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .companion-option .companion-art { height: 70px; }
  .companion-stage { width: 105px; margin-top: -10px; }
  .theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-options { gap: 7px; }
  .provider-option { padding: 14px 5px; font-size: 10px; }
  .provider-option .service-mark { width: 23px; height: 23px; }
  .import-methods { gap: 5px; }
  .import-methods .text-button { font-size: 10px; }
  .source-meta { font-size: 9px; gap: 9px; }
  .source-preview { padding: 14px; font-size: 10px; }
  .checkbox-row { font-size: 11px; align-items: flex-start; padding-top: 10px; }
  .local-notice { font-size: 9px; }
  .guide-steps { gap: 19px; }
  .guide-steps p { font-size: 11px; }
  .guide-steps strong { font-size: 12px; }
  .brand-options article { padding: 14px; gap: 10px; flex-wrap: wrap; }
  .brand-options .button { margin-left: auto; }
  .brand-options article > div { min-width: 150px; }
  .toast { left: 50%; bottom: calc(85px + env(safe-area-inset-bottom)); font-size: 11px; }
}
@media (max-width: 370px) {
  .topbar { padding: 0 13px; }
  .mobile-brand .wordmark { font-size: 17px; }
  .content { padding-left: 14px; padding-right: 14px; }
  .chat-center { margin-top: 18px; }
  .chat-intro h1 { font-size: 27px; }
  .context-chip { padding: 8px 4px; }
  .composer-actions { gap: 2px; }
  .send-button { min-width: 72px; }
  .catalog-grid { gap: 9px; }
  .connector-card { padding: 13px; }
  .connector-card-bottom .button { padding: 9px; }
  .memory-tile { padding: 14px; }
  .memory-overview { padding: 17px; }
  .local-badge > .icon { display: none; }
  .memory-quantity .memory-size { display: none; }
  .provider-label { max-width: 135px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .brewing .composer-aura { opacity: .2; }
}

/* Site-wide legal footer (all app pages). */
.site-legal { padding: 14px 24px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.site-legal nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-legal a { color: var(--muted); text-decoration: none; }
.site-legal a:hover { color: var(--ink); text-decoration: underline; }
.site-legal p { margin: 0; flex: 1 1 260px; min-width: 0; }
@media (max-width: 720px) {
  .site-legal { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
}
