/* Screens and layout. Sizes from the Foundations board: rail 56, sidebar 264, context panel 340, header 52,
   chat column 760, page padding 40 desktop / 16 phone. */

#root { zoom: var(--zoom, 1); height: calc(100dvh / var(--zoom, 1)); }
.skip { position: absolute; left: 8px; top: -40px; z-index: 70; padding: 8px 12px; border-radius: 8px; background: var(--bg-elev); box-shadow: var(--shadow); color: var(--tx); text-decoration: none; font-size: 13px; }
.skip:focus { top: 8px; }
.phone-only { display: none !important; }

/* shell */
.shell { display: flex; height: 100%; width: 100%; overflow: hidden; background: var(--bg); }
.side-slot { display: flex; flex: none; }
.rail-slot { display: none; flex: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); position: relative; }

/* sidebar */
.side { width: 264px; flex: none; display: flex; flex-direction: column; background: var(--bg-side); border-right: 1px solid var(--line); padding: 10px 8px; height: 100%; }
.side.drawer { position: fixed; left: 0; top: 0; bottom: 0; width: min(340px, 86vw); z-index: 45; box-shadow: var(--shadow); animation: drawer-in 180ms cubic-bezier(.2,0,0,1); padding: 12px 10px; }
@keyframes drawer-in { from { transform: translateX(-24px); opacity: 0; } }
.drawer-scrim { z-index: 44; }
.side-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 8px; }
.side-head .brand { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; flex: 1; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side .count { font-size: 12px; color: var(--tx-3); }
.side-list { flex: 1; min-height: 0; overflow-y: auto; margin-top: 6px; }
.side-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 48px 16px; color: var(--tx-3); font-size: 13px; }
.row-wrap { position: relative; }
.row-wrap .nav { padding-right: 30px; }
.row-more { position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 6px; border: 0; display: grid; place-items: center; background: var(--bg-active); color: var(--tx-2); cursor: pointer; opacity: 0; padding: 0; }
.row-wrap:hover .row-more, .row-more:focus-visible, .row-wrap.menu-open .row-more { opacity: 1; }
.row-wrap:hover .nav { background: var(--bg-hover); color: var(--tx); }
.row-wrap:hover .nav.on { background: var(--bg-active); }
.row-wrap .nav .dot { margin-right: 2px; }
.rename { display: flex; align-items: center; height: 32px; padding: 0 4px 0 10px; border-radius: 8px; border: 1px solid var(--ac); background: var(--bg-input); }
.rename input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 13.5px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.account { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--tx); font: inherit; cursor: pointer; text-align: left; }
.account:hover { background: var(--bg-hover); }
.account .avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #6e56cf, #3a2a85); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: #fff; flex: none; }
.account .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.account .n { font-size: 13.5px; font-weight: 500; }
.account .r { font-size: 12px; color: var(--tx-3); }
.rail { width: 56px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; background: var(--bg-side); border-right: 1px solid var(--line); height: 100%; }

/* home */
.home { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.home-header { height: 52px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 12px; }
.home-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 72px 24px 40px; }
.home-inner { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 28px; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.hero h1 { margin: 0; font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
.hero p { margin: 0; font-size: 15px; color: var(--tx-3); }
.starters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip.big { gap: 7px; height: 34px; padding: 0 14px; font-size: 13px; }
.recent { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--tx-2); }
.recent-head a { font-size: 12.5px; font-weight: 400; color: var(--tx-2); text-decoration: none; }
.recent-head a:hover { color: var(--tx); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--tx); text-decoration: none; min-width: 0; }
.tile:hover { border-color: var(--line-2); background: var(--bg-elev); }
.tile-kind { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--tx-3); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-sub { font-size: 12.5px; color: var(--tx-3); }
.no-models { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 24px; border: 1px dashed var(--line-2); border-radius: 20px; }

/* composer */
.composer { border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg-raised); box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.18); position: relative; }
.app.light .composer, .app.paper .composer { box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06); }
.composer.big { border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.composer:focus-within { border-color: color-mix(in srgb, var(--ac) 55%, var(--line-2)); }
.composer textarea { display: block; width: 100%; resize: none; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 15px; line-height: 1.5; padding: 14px 16px 4px; max-height: 220px; }
.composer.big textarea { font-size: 16px; padding: 18px 18px 4px; }
.composer textarea::placeholder { color: var(--tx-3); }
.composer-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px; }
.composer.big .composer-bar { padding: 8px 10px 10px 12px; }
.composer .attach { border: 1px solid var(--line-2); border-radius: 999px; width: 30px; height: 30px; }
.composer.big .attach { width: 32px; height: 32px; }
.composer.big .chip { height: 32px; font-size: 12.5px; padding: 0 12px; }
.target-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--tx-2); font: inherit; font-size: 13px; cursor: pointer; min-width: 0; max-width: 260px; }
.target-btn:hover { background: var(--bg-hover); color: var(--tx); }
.target-btn .tdot { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.target-btn .tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-bar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 7px; border: 0; background: transparent; color: var(--tx-2); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; max-width: 260px; }
.ab:hover:not([disabled]), .ab.on { background: var(--bg-active); color: var(--tx); }
.ab[disabled] { cursor: default; color: var(--tx-2); }
.ab .mono-ish { overflow: hidden; text-overflow: ellipsis; }
.vsep { width: 1px; height: 16px; background: var(--line-2); margin: 0 4px; flex: none; }
.agent-status { font-size: 12px; color: var(--tx-3); display: flex; align-items: center; gap: 6px; padding-right: 4px; white-space: nowrap; }
.agent-status .sdot { width: 6px; height: 6px; border-radius: 50%; }

/* chat */
.chat-screen { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-header { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.crumb-root { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 7px; color: var(--tx-3); text-decoration: none; font-size: 13px; white-space: nowrap; flex: none; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
a.crumb-root:hover { background: var(--bg-hover); color: var(--tx); }
.crumb-dot { width: 8px; height: 8px; border-radius: 3px; background: #6e56cf; flex: none; }
.crumb-sep { color: var(--tx-3); }
.crumb-title { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 7px; border: 0; background: transparent; color: var(--tx); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; min-width: 0; }
.crumb-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-title:hover { background: var(--bg-hover); }
.header-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.hsep { width: 1px; height: 20px; background: var(--line-2); margin: 0 6px; }
.chat-body { flex: 1; min-height: 0; display: flex; position: relative; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 24px 12px; }
.column { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.composer-wrap { flex: none; padding: 8px 24px 16px; }
.composer-wrap .column { gap: 0; }
.disclaimer { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--tx-3); }
.skeleton { display: flex; flex-direction: column; gap: 10px; }
.skeleton span { display: block; height: 12px; width: 90%; border-radius: 6px; background: var(--bg-active); animation: sk 1.4s ease-in-out infinite; }
@keyframes sk { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.boot { height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; }

.msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.msg-user .bubble { max-width: 80%; padding: 10px 16px; border-radius: 18px; background: var(--bg-active); font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-user-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 120ms; }
.msg-user:hover .msg-user-actions, .msg-user-actions:focus-within { opacity: 1; }
.msg-ai { display: flex; gap: 14px; }
.msg-ai.agent { gap: 0; }
.avatar-ai { width: 28px; height: 28px; border-radius: 8px; flex: none; display: grid; place-items: center; color: #fff; margin-top: 1px; }
.msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.agent-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.prose .md > :last-child { margin-bottom: 0; }
.prose .md + .md, .prose .codeblock + .md { margin-top: 12px; }
.prose.streaming > .md:last-child > :is(p, h2, h3, h4, blockquote):last-child::after,
.prose.streaming > .md:last-child > :is(ol, ul):last-child > li:last-child::after { content: ''; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--ac-tx); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.prose code.math { font-style: italic; }
.typing { display: flex; gap: 5px; padding: 8px 2px; }
.stopped { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stopped-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--bg-active); font-size: 12px; color: var(--tx-2); }
.stopped-pill span { width: 8px; height: 8px; border-radius: 2px; background: var(--tx-2); }
.failure { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.perm-notes { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--tx-3); flex-wrap: wrap; }
.perm-notes span { display: flex; align-items: center; gap: 5px; }
.msg-actions { display: flex; align-items: center; gap: 2px; margin-top: 2px; color: var(--tx-3); flex-wrap: wrap; }
.msg-actions .ib { width: 30px; height: 30px; }
.msg-actions .regen { height: 30px; border: 0; padding: 0 6px 0 8px; color: var(--tx-3); gap: 2px; }
.msg-meta { margin-left: auto; font-size: 12px; color: var(--tx-3); }
.status-line .bh { min-height: 44px; }

/* context panel */
.inspector { width: 340px; flex: none; border-left: 1px solid var(--line); background: var(--bg-side); display: flex; flex-direction: column; min-height: 0; }
.insp-head { height: 48px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); }
.insp-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.ctx-bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-active); }
.ctx-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 12.5px; color: var(--tx-2); }
.ctx-legend > span { display: flex; align-items: center; gap: 6px; }
.ctx-legend > span > span { width: 8px; height: 8px; border-radius: 2px; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg-raised); border: 1px solid var(--line); font-size: 13px; }
.ctx-item > span:nth-child(2) { flex: 1; min-width: 0; }
.ctx-item .n { font-size: 12px; color: var(--tx-3); }
.kv-list { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.kv-list > div { display: flex; justify-content: space-between; gap: 12px; }
.kv-list > div > span:first-child { color: var(--tx-3); flex: none; }
.kv-list > div > span:last-child { text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.range { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--tx-2); }
.range > span { display: flex; justify-content: space-between; }
.range .mono { color: var(--tx); }
.range input { accent-color: var(--ac); width: 100%; }
.pr { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }

/* model picker */
.picker { display: flex; height: min(560px, calc(100dvh - 120px)); }
.picker-list { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.picker-search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.picker-search input, .pal-search input { flex: 1; min-width: 0; height: 36px; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 14.5px; }
.picker-tabs { display: flex; gap: 2px; padding: 8px 10px 4px; flex: none; flex-wrap: wrap; }
.tab { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--tx-3); font: inherit; font-size: 12.5px; cursor: pointer; }
.tab:hover { color: var(--tx); }
.picker-rows { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 6px 8px; }
.picker-group { display: flex; align-items: center; gap: 8px; padding: 12px 10px 6px; font-size: 11.5px; font-weight: 500; color: var(--tx-3); }
.picker-group .gsub { margin-left: auto; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--tx); font: inherit; text-align: left; cursor: pointer; }
.row .logo { width: 22px; height: 22px; border-radius: 6px; flex: none; }
.logo-tile { display: inline-grid; place-items: center; flex: none; background: var(--bg-raised); border: 1px solid var(--line); color: var(--tx); overflow: hidden; }
.logo-tile.plain { border: 0; color: #fff; }
.logo-glyph { display: block; flex: none; object-fit: contain; }
.row-mark { display: inline-flex; flex: none; color: var(--tx-3); }
.row-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.row-name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-check { width: 18px; display: grid; place-items: center; color: var(--ac-tx); }
.picker-empty { padding: 48px 20px; text-align: center; color: var(--tx-3); font-size: 13.5px; }
.picker-foot { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx-3); flex: none; }
.picker-foot > span { display: flex; align-items: center; gap: 6px; }
.picker-foot a { margin-left: auto; color: var(--tx-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.picker-foot a:hover { color: var(--tx); }
.picker-detail { flex: 0 0 280px; display: flex; flex-direction: column; gap: 18px; padding: 20px; background: var(--bg-raised); }

/* command palette */
.pal-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pal-search input { font-size: 16px; height: 40px; }
.pal-list { max-height: min(440px, calc(100dvh - 260px)); overflow-y: auto; padding: 6px 8px 8px; }
.pal-title { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 500; color: var(--tx-3); }
.pal-row { gap: 12px; padding: 0 12px; font-size: 13.5px; }
.pal-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--bg-active); color: var(--tx-2); flex: none; }
.pal-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-empty { padding: 40px 16px; text-align: center; color: var(--tx-3); font-size: 13.5px; }
.pal-foot { display: flex; align-items: center; gap: 16px; height: 42px; padding: 0 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--tx-3); }
.pal-foot > span { display: flex; align-items: center; gap: 6px; }

/* app states */
.state-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 40px 32px; height: 100%; }
.state-center .big { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.state-center .sub { font-size: 13.5px; color: var(--tx-3); max-width: 340px; }
.banner { flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 6px 16px; font-size: 13px; border-bottom: 1px solid var(--line); }
.banner.warn { background: var(--warn-soft); }
.banner.warn .i { color: var(--warn); }

/* sign in */
.signin { display: flex; min-height: 100%; height: 100%; overflow-y: auto; }
.signin-main { flex: 1 1 560px; display: flex; flex-direction: column; padding: 32px 40px; }
.signin-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.signin-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.signin-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 24px; }
.signin-form h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.signin-form p { margin: 6px 0 0; color: var(--tx-3); }
.signin-foot { display: flex; gap: 16px; font-size: 12px; color: var(--tx-3); }
.brandside { flex: 1 1 560px; margin: 12px; border-radius: 20px; background: var(--bg-side); border: 1px solid var(--line); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; }
.brandside .preview { position: absolute; top: 72px; left: 64px; right: -80px; height: 420px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg); box-shadow: 0 30px 80px rgba(0,0,0,.35); display: flex; overflow: hidden; }
.pv-side { width: 150px; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-side); }
.pv-main { flex: 1; padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; }
.ln { display: block; height: 7px; border-radius: 4px; background: var(--line-2); }
.ln.faint { background: var(--line); }
.pv-comp { margin-top: auto; height: 54px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-raised); display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; }
.pv-comp span { width: 28px; height: 28px; border-radius: 50%; background: var(--ac); }
.brand-points { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--tx-2); }
.brand-points span { display: flex; align-items: center; gap: 10px; }

/* settings */
.settings { display: flex; width: 100%; height: 100%; overflow: hidden; }
.snav { width: 264px; flex: none; display: flex; flex-direction: column; background: var(--bg-side); border-right: 1px solid var(--line); padding: 10px 8px; }
.snav nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.sn { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: 7px; color: var(--tx-2); text-decoration: none; font-size: 13.5px; }
.sn:hover { background: var(--bg-hover); color: var(--tx); }
.sn.on { background: var(--bg-active); color: var(--tx); font-weight: 500; }
.sn.back { height: 36px; }
.sg { font-size: 11.5px; font-weight: 500; color: var(--tx-3); padding: 16px 10px 4px; }
.settings-main { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); }
.settings-phone-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.settings-page { max-width: 860px; margin: 0 auto; padding: 40px 32px 72px; display: flex; flex-direction: column; gap: 32px; }
.settings-page h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.settings-page .lead { margin: 6px 0 0; color: var(--tx-3); font-size: 14px; }
.ssec { display: flex; flex-direction: column; gap: 14px; }
.h2 { margin: 0; font-size: 15px; font-weight: 600; }
.h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--tx-2); }
.sub { margin: 2px 0 0; font-size: 13px; color: var(--tx-3); }
.theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.th { display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--tx); font: inherit; text-align: left; cursor: pointer; }
.th:hover { border-color: var(--line-2); }
.th-prev { display: flex; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(128,128,140,.2); }
.th-lines { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 9px 9px 0; }
.th-lines > span { height: 6px; border-radius: 3px; }
.th-lines .th-bubble { margin-top: auto; margin-bottom: 9px; height: 14px; width: 50%; border-radius: 5px; }
.th-text { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.th-name { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 500; }
.th-check { width: 18px; height: 18px; border-radius: 50%; background: var(--tx); color: var(--bg); display: grid; place-items: center; }
.th-desc { font-size: 12px; line-height: 1.4; color: var(--tx-3); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.srow .lab { flex: 1; min-width: 200px; }
.srow .lab .t { font-size: 15px; font-weight: 600; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; flex: none; }
.custom-card { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.custom-grid { display: grid; grid-template-columns: 140px 1fr; gap: 16px 20px; align-items: center; }
.custom-grid .seg { justify-self: start; }
.cl { font-size: 13px; font-weight: 500; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.check.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.font-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.code-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ft { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--tx); font: inherit; text-align: left; cursor: pointer; }
.ft:hover { border-color: var(--line-2); }
.preview-box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pv-head { padding: 8px 14px; font-size: 12px; color: var(--tx-3); border-bottom: 1px solid var(--line); background: var(--bg-side); }
.empty-card { padding: 18px; font-size: 13.5px; color: var(--tx-3); border-style: dashed; }
.prov-row { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; flex-wrap: wrap; }
.prov-logo { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.prov-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; font-weight: 600; }
.prov-sub { font-size: 12.5px; color: var(--tx-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prov-sub .mono { font-size: 12px; }
.prov-note { margin: 0 16px 16px 72px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); font-size: 13px; color: var(--tx-2); }
.prov-note code { font-size: 12px; color: var(--tx); }
.prov-models { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 16px 16px 72px; }
.add-card { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.opt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.opt-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opt { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--tx); font: inherit; text-align: left; cursor: pointer; }
.opt:hover { border-color: var(--line-2); }
.opt.on { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.env-snippet { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 10px; background: var(--code); border: 1px solid var(--line); }
.env-snippet pre { flex: 1; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--tx-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* attachments (ChatMore board: the + menu, dropping files, chips) */
.atts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.composer .atts { justify-content: flex-start; }
.att { display: flex; align-items: center; gap: 8px; max-width: 260px; height: 44px; padding: 4px 4px 4px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-raised); }
.att img, .att-ico { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--bg-active); color: var(--tx-2); }
.att-t { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; font-size: 13px; }
.att-t > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .ib { width: 26px; height: 26px; }
.composer.dragging { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.drop-hint { position: absolute; inset: 0; z-index: 2; border-radius: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: color-mix(in srgb, var(--bg-raised) 92%, transparent); color: var(--tx-2); font-size: 12.5px; pointer-events: none; }
.drop-hint b { color: var(--tx); font-size: 14px; font-weight: 600; }
.interim { padding: 0 16px; font-size: 14px; color: var(--tx-3); font-style: italic; }
.ib.rec { color: var(--bad); background: var(--bad-soft); animation: pulse 1.2s infinite; }
.round-send.voice-btn { background: var(--bg-active); color: var(--tx); }
.slash { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); max-height: 260px; overflow-y: auto; padding: 4px; border-radius: 10px; background: var(--bg-elev); box-shadow: var(--shadow); z-index: 5; }
.slash .mi { gap: 12px; }
.menu-find { display: flex; align-items: center; gap: 8px; margin: 2px 4px 6px; padding: 0 8px; height: 30px; border-radius: 7px; background: var(--bg-input); border: 1px solid var(--line-2); color: var(--tx-3); }
.menu-find input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 13px; }
.model-menu { max-height: min(520px, calc(100dvh - 120px)); overflow-y: auto; }
.btn.on { background: var(--ac-soft); border-color: transparent; color: var(--ac-tx); }

/* messages: versions, editing, notes, files the reply carries */
.versions { display: inline-flex; align-items: center; gap: 0; }
.versions .ib { width: 24px; height: 24px; }
.edit-box { width: min(100%, 620px); border: 1px solid var(--ac); border-radius: 16px; background: var(--bg-raised); box-shadow: 0 0 0 3px var(--ac-soft); }
.edit-box textarea { display: block; width: 100%; resize: vertical; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 15px; line-height: 1.5; padding: 12px 14px 4px; }
.edit-foot { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px 14px; flex-wrap: wrap; }
.note-line { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--tx-3); }
.note-line > span { flex: 1; height: 1px; background: var(--line); }
.filecard { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-raised); max-width: 520px; }
.fc-image { display: block; padding: 0; border: 0; background: var(--bg-active); border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.fc-image img { display: block; max-width: 100%; max-height: 420px; margin: 0 auto; }
.fc-image.small { width: 120px; height: 90px; flex: none; }
.fc-image.small img { width: 100%; height: 100%; object-fit: cover; }
.fc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fc-t { flex: 1; min-width: 140px; display: flex; flex-direction: column; line-height: 1.3; font-size: 13.5px; font-weight: 500; }
.fc-t > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.out-images { display: flex; gap: 8px; padding: 0 12px 10px; overflow-x: auto; }
.out-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-top: 1px solid var(--line); font-size: 12.5px; }
.out-row .g { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose img[data-zoom] { cursor: zoom-in; }
.code-preview { display: block; width: 100%; height: 360px; border: 0; background: #fff; }
.read-aloud { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 4px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); }
.read-aloud .stop-sq { width: 10px; height: 10px; border-radius: 2px; background: var(--tx-2); }
.ra-track { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-active); overflow: hidden; }
.ra-track span { display: block; height: 100%; background: var(--ac); transition: width 200ms linear; }
.banner.temp { background: var(--bg-raised); color: var(--tx-2); }
.home.temporary .composer { border-style: dashed; }

/* the question card (AgentAsk and AskTypes boards) */
.ask { border: 1px solid var(--ac-line); border-radius: 14px; background: var(--bg-raised); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.ask-top { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.ask-tag { font-weight: 600; color: var(--ac-tx); }
.ask-type { color: var(--tx-3); }
.ask-count { margin-left: auto; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.ask-progress { height: 3px; border-radius: 2px; background: var(--bg-active); overflow: hidden; margin-top: -6px; }
.ask-progress span { display: block; height: 100%; background: var(--ac); transition: width 180ms cubic-bezier(.2,0,0,1); }
.ask-q { font-size: 15px; font-weight: 600; line-height: 1.4; }
.ask-opts { display: flex; flex-direction: column; gap: 6px; }
.ask-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: transparent;
  color: var(--tx); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.ask-opt:hover:not(:disabled) { background: var(--bg-hover); }
.ask-opt.on { border-color: var(--ac); background: var(--ac-soft); }
.ask-opt.primary { border-color: var(--ac); }
.ask-opt.danger { border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); }
.ask-opt:disabled { cursor: default; opacity: .6; }
.ask-n { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: none; font-family: var(--font-mono); font-size: 11.5px; color: var(--tx-3); border: 1px solid var(--line-2); }
.ask-opt.on .ask-n { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }
.ask-l { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.ask-d { font-size: 12.5px; color: var(--tx-3); }
.ask-confirm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ask-own { display: flex; align-items: center; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--line-2); }
.ask-own input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 13.5px; }
.ask-text { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.ask-scale-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ask-num { min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--tx); font: inherit; font-size: 14px; cursor: pointer; }
.ask-num.on { background: var(--ac); border-color: var(--ac); color: var(--on-ac); }
.ask-scale-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--tx-3); }
.ask-number { display: flex; align-items: center; gap: 12px; }
.ask-number input[type=range] { flex: 1; accent-color: var(--ac); }
.ask-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ask-select { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.ask-find { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--tx-3); }
.ask-find input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 13.5px; }
.ask-list { max-height: 220px; overflow-y: auto; padding: 4px; }
.ask-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ask-rank li { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 4px 0 10px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 14px; }
.ask-review { display: flex; flex-direction: column; }
.ask-review > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ask-review .k { color: var(--tx-3); }
.ask-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* voice mode (Voice mode board) */
.voice { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; align-items: center; padding: 20px 32px 32px; background: var(--bg); animation: fade-in 180ms cubic-bezier(.2,0,0,1); }
.voice-top { width: 100%; display: flex; align-items: center; gap: 10px; }
.voice-note { font-size: 12.5px; color: var(--tx-3); }
.voice-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.orb { width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--ac) 55%, #fff) 0%, var(--ac) 45%, color-mix(in srgb, var(--ac) 40%, #000) 100%);
  box-shadow: 0 0 80px color-mix(in srgb, var(--ac) 40%, transparent); animation: breathe 2.4s ease-in-out infinite; transition: opacity 240ms, transform 240ms; }
.orb.dim { opacity: .5; animation-duration: 4s; }
.orb.talk { animation-duration: .9s; }
.orb.off { opacity: .25; animation: none; }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.06); opacity: 1; } }
.voice-state { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.voice-state > span:first-child { font-size: 15px; font-weight: 500; }
.voice-state .sub { font-size: 13px; color: var(--tx-3); max-width: 420px; }
.voice-captions { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.voice-captions .said { font-size: 14px; color: var(--tx-3); line-height: 1.6; }
.voice-captions .heard { font-size: 17px; line-height: 1.55; }
.voice-captions b { font-weight: 500; color: var(--tx-2); font-size: 14px; }
.voice-controls { display: flex; align-items: center; gap: 16px; }
.vb { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--bg-active); color: var(--tx); cursor: pointer; }
.vb:hover { background: var(--bg-press); }
.vb.inv { background: var(--tx); color: var(--bg); }
.vb.on { background: var(--bad-soft); color: var(--bad); }
.vb.end { background: var(--bad-fill); color: #fff; }

/* files and Git (Workspace and Workspace panels boards) */
.files { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.fm-bar { display: flex; align-items: center; gap: 6px; height: 48px; flex: none; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line); }
.fm-crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.fm-crumbs .crumb-root.here { color: var(--tx); font-weight: 500; }
.fm-body { flex: 1; min-height: 0; display: flex; position: relative; }
.fm-list { width: 100%; max-width: 100%; overflow-y: auto; padding: 6px 8px 24px; }
.fm-list.has-file { width: 300px; flex: none; border-right: 1px solid var(--line); }
.fm-list.has-file .meta { display: none; }
.fm-row { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--tx-2);
  font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.fm-row:hover { background: var(--bg-hover); color: var(--tx); }
.fm-row.on { background: var(--bg-active); color: var(--tx); }
.fm-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-row:disabled { opacity: .5; cursor: default; }
.row-wrap .fm-row { padding-right: 34px; }
.git-st { width: 18px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; flex: none; }
.git-st.modified, .git-st.renamed { color: var(--warn); }
.git-st.added, .git-st.untracked { color: var(--ok); }
.git-st.deleted, .git-st.conflict { color: var(--bad); }
.fm-view { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fm-view-head { display: flex; align-items: center; gap: 8px; height: 44px; flex: none; padding: 0 8px 0 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.fm-view-head .g { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-scroll { flex: 1; min-height: 0; overflow: auto; }
.fm-center { display: flex; align-items: center; justify-content: center; padding: 24px; }
.fm-pdf { flex: 1; border: 0; width: 100%; }
.fm-edit { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fm-tabs { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.fm-code { flex: 1; min-height: 0; display: flex; background: var(--code); }
.fm-gutter { flex: none; padding: 12px 10px 12px 14px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: var(--tx-3); text-align: right; white-space: pre;
  overflow: hidden; user-select: none; border-right: 1px solid var(--line); }
.fm-code textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--tx); font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.65; padding: 12px 14px; white-space: pre; overflow: auto; tab-size: 2; }
.fm-status { display: flex; gap: 16px; height: 28px; align-items: center; flex: none; padding: 0 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--tx-3); }
.fm-panel { width: 320px; }
.fm-search { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 10px; border-radius: 8px; border: 1px solid var(--ac); background: var(--bg-input); }
.fm-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--tx); font: inherit; font-size: 13px; }
.fm-search .btn { height: 24px; padding: 0 6px; border: 0; font-family: var(--font-mono); font-size: 11.5px; }
.fm-hit { display: flex; gap: 10px; width: 100%; padding: 3px 10px 3px 30px; border: 0; background: transparent; color: var(--tx-2); font-family: var(--font-mono); font-size: 12px;
  text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; }
.fm-hit:hover { background: var(--bg-hover); }
.fm-hit .n { width: 28px; flex: none; text-align: right; color: var(--tx-3); }
.fm-hit > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.git-log { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.git-log .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-files { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.side-nest { padding-left: 14px; }
.lightbox { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.lb-head { display: flex; align-items: center; gap: 6px; height: 48px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.lb-head .g { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-body { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 16px; background: var(--bg-side); }
.lb-body img { max-width: 100%; max-height: calc(100dvh - 140px); border-radius: 8px; }

/* settings › notifications */
.notify-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg-hover); }
.notify-banner .t { font-size: 13.5px; font-weight: 500; }
.notify-table { display: flex; flex-direction: column; }
.nrow { display: grid; grid-template-columns: 1fr 72px 72px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.nrow > span:not(:first-child) { display: grid; place-items: center; }
.nrow.head { border-top: 0; padding: 6px 0; font-size: 12px; color: var(--tx-3); }
.files .settings-page { overflow-y: auto; }

/* density */
.app.compact .nav { height: 28px; }
.app.compact .column { gap: 20px; }
.app.compact .messages { padding-top: 20px; }

/* narrow desktop: the context panel slides over the chat */
@media (max-width: 1180px) {
  .fm-list.has-file { width: 240px; }
  .inspector { position: absolute; right: 0; top: 0; bottom: 0; z-index: 30; box-shadow: var(--shadow); animation: panel-in 180ms cubic-bezier(.2,0,0,1); }
  @keyframes panel-in { from { transform: translateX(16px); opacity: 0; } }
}
/* tablet: the sidebar becomes the rail, and the full list opens as a drawer */
@media (max-width: 1024px) {
  .side-slot { display: none; }
  .rail-slot { display: flex; }
  .column { max-width: 680px; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .snav { width: 220px; }
}
/* phone */
@media (max-width: 760px) {
  .rail-slot { display: none; }
  .phone-only { display: inline-grid !important; }
  .hide-sm { display: none !important; }
  .chat-header { height: auto; min-height: 56px; padding: 6px; gap: 4px; }
  .chat-header .crumbs { display: none; }
  .chat-header .ib { width: 44px; height: 44px; border-radius: 12px; }
  .phone-title { flex: 1; min-width: 0; display: flex !important; flex-direction: column; align-items: center; line-height: 1.25; cursor: pointer; }
  .phone-title .pt { font-size: 15px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .phone-title .ps { font-size: 12px; color: var(--tx-3); display: flex; align-items: center; gap: 4px; }
  .messages { padding: 18px 16px 8px; }
  .column { gap: 20px; }
  .msg-user .bubble { max-width: 85%; font-size: 15.5px; }
  .prose { font-size: 15.5px; }
  .msg-ai { gap: 10px; }
  .avatar-ai { display: none; }
  .composer-wrap { padding: 8px 10px 14px; }
  .composer { border-radius: 24px; }
  .composer textarea { font-size: 16px; }
  .round-send, .composer .attach { width: 40px; height: 40px; }
  .disclaimer { display: none; }
  .home-header { padding: 6px; }
  .home-header .ib, .home-header .btn { height: 44px; }
  .home-scroll { padding: 32px 16px 24px; }
  .hero h1 { font-size: 28px; }
  .tiles { grid-template-columns: 1fr; }
  .fm-list.has-file { display: none; }
  .fm-panel { width: 100%; }
  .voice { padding: 16px; }
  .orb { width: 160px; height: 160px; }
  .ask-confirm { grid-template-columns: 1fr; }
  .ask-review > div { grid-template-columns: 1fr auto; }
  .ask-review .k { grid-column: 1 / -1; }
  .att { max-width: 100%; }
  .inspector { width: 100%; }
  .picker { flex-direction: column; height: calc(100dvh - 32px); }
  .picker-detail { display: none; }
  .picker-list { border-right: 0; }
  .row { height: 44px; }
  .dlg[aria-label="Choose a model"], .dlg[aria-label="Command palette"] { top: 16px !important; }
  .snav { display: none; }
  .settings-phone-head { display: flex !important; }
  .settings-phone-head .sel { flex: 1; }
  .settings-page { padding: 24px 16px 56px; gap: 24px; }
  .font-grid, .code-grid, .opt-grid, .opt-grid.three, .two-col { grid-template-columns: 1fr 1fr; }
  .custom-grid { grid-template-columns: 1fr; gap: 8px; }
  .prov-note, .prov-models { margin-left: 16px; }
  .brandside { display: none; }
  .signin-main { padding: 24px 16px; }
  .side.drawer .nav { height: 40px; }
}
@media (max-width: 900px) { .brandside { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .side.drawer, .inspector, .voice { animation: fade-in 120ms linear; }
  .orb, .ib.rec { animation: none; }
  .prose.streaming .md::after, .prose.streaming li::after, .prose.streaming p::after { animation: none !important; }
  .skeleton span { animation: none; }
}
