/* Quasar — personal assistant. Dark "deep space" by default, light "day" theme available. */
:root {
  --bg: #030a06; --bg-2: #07130c;
  --glass: rgba(14, 34, 22, .55); --glass-2: rgba(20, 46, 30, .72); --glass-line: rgba(130, 230, 170, .14);
  --ink: #e6f6ec; --ink-2: #b8dcc6; --muted: #7fa58e; --faint: #4d6d5a;
  --accent: #2fd273; --accent-2: #22b35e; --accent-deep: #0e6b38; --accent-ink: #032312;
  --warn: #f4b34a; --danger: #ff6b5e;
  --surface: #0b1a11; --line: rgba(130, 230, 170, .12); --line-2: rgba(130, 230, 170, .22); --seg: rgba(130, 230, 170, .08);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --r-lg: 22px; --r-md: 16px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef5f0; --bg-2: #e3efe7;
  --glass: rgba(255, 255, 255, .66); --glass-2: rgba(255, 255, 255, .86); --glass-line: rgba(11, 46, 28, .10);
  --ink: #0b2e1c; --ink-2: #1e4d33; --muted: #4f6f5d; --faint: #9ab5a5;
  --accent: #1fa957; --accent-2: #22b35e; --accent-deep: #0e6b38; --accent-ink: #ffffff;
  --warn: #b45309; --danger: #c2410c;
  --surface: #ffffff; --line: rgba(11, 46, 28, .09); --line-2: rgba(11, 46, 28, .16); --seg: rgba(11, 46, 28, .06);
  --shadow: 0 18px 50px rgba(11, 46, 28, .14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 800px at 50% 40%, var(--bg-2), var(--bg) 70%) fixed, var(--bg);
  color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ Layout */
.app {
  height: 100dvh; display: grid; gap: 0 20px;
  grid-template: "top top top" auto "brief stage convo" 1fr "brief dock convo" auto / 300px 1fr 420px;
  padding: 0 24px 18px; padding-top: env(safe-area-inset-top);
}
.top { grid-area: top; display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.brief { grid-area: brief; overflow: auto; padding: 8px 0 12px; scrollbar-width: none; }
.stage { grid-area: stage; position: relative; min-height: 0; }
.convo { grid-area: convo; min-height: 0; display: flex; flex-direction: column; }
.dock { grid-area: dock; padding-top: 10px; }

/* ------------------------------------------------------------------ Top bar */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; font-size: 18px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%; display: inline-block; position: relative;
  background: radial-gradient(circle at 50% 50%, #020604 0 42%, transparent 43%),
              conic-gradient(from 210deg, #b8f7cc, var(--accent-2), #0b5a2f, transparent 55%, #b8f7cc 70%, var(--accent-2));
  box-shadow: 0 0 16px rgba(47, 210, 115, .55);
  animation: spin 9s linear infinite;
}
.brand-mark.big { width: 56px; height: 56px; margin: 4px auto 6px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); }
.seg button { position: relative; z-index: 1; border: 0; background: none; padding: 7px 18px; font-weight: 700; font-size: 13.5px; color: var(--muted); transition: color .25s; }
.seg button[aria-pressed="true"] { color: var(--accent-ink); }
.seg-thumb { position: absolute; inset: 4px auto 4px 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--accent); box-shadow: 0 4px 18px rgba(47, 210, 115, .35); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.app[data-area="company"] .seg-thumb { transform: translateX(100%); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent; background: none; color: var(--ink-2); transition: background .2s, border-color .2s; }
.icon-btn:hover { background: var(--seg); border-color: var(--glass-line); }
.pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(14px); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.pill.mock .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); animation: blink 1.6s ease-in-out infinite; }

/* ------------------------------------------------------------------ Brief */
.greet h1 { margin: 6px 0 2px; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800;
  background: linear-gradient(120deg, var(--ink) 30%, var(--accent) 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.greet-sub { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.area-note { margin: 2px 0 18px; color: var(--faint); font-size: 12px; }
.tiles { display: flex; flex-direction: column; gap: 10px; }
.tile {
  position: relative; text-align: left; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(16px) saturate(140%);
  transition: transform .25s, border-color .25s, background .25s; animation: rise .5s both;
}
.tile:nth-child(2) { animation-delay: .05s; } .tile:nth-child(3) { animation-delay: .1s; } .tile:nth-child(4) { animation-delay: .15s; } .tile:nth-child(5) { animation-delay: .2s; }
.tile:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--glass-2); }
.t-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.t-value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.t-value.small-v { font-size: 16px; }
.t-sub { font-size: 12.5px; color: var(--muted); }
.t-cta { margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--accent); }
.tile-model.mock { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.tile-model.mock .t-value { color: var(--warn); }
.tile-budget { padding-right: 70px; }
.ring { position: absolute; right: 14px; top: 50%; translate: 0 -50%; width: 48px; height: 48px; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 4.5; }
.ring-bg { stroke: var(--seg); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 4px var(--accent)); }
.tile-sources { opacity: .75; }
.badge { position: absolute; right: 12px; top: 12px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* ------------------------------------------------------------------ Stage */
#field { position: absolute; inset: 0; width: 100%; height: 100%; }
.sats { position: absolute; inset: 0; pointer-events: none; }
.sat {
  position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0; color: var(--ink); will-change: transform;
}
.sat svg { box-sizing: content-box; width: 22px; height: 22px; padding: 15px; border-radius: 50%;
  background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06); transition: background .2s, box-shadow .2s, color .2s; }
.sat span { font-size: 11.5px; font-weight: 700; color: var(--muted); opacity: .8; transition: opacity .2s, color .2s; white-space: nowrap; text-shadow: 0 1px 8px var(--bg); }
.sat:hover svg, .sat:focus-visible svg { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 28px rgba(47, 210, 115, .55); }
.sat:hover span, .sat:focus-visible span { opacity: 1; color: var(--ink); }
.sat-add svg { border-style: dashed; background: transparent; }
.core { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: var(--core, 110px); height: var(--core, 110px); border-radius: 50%; border: 0; background: transparent; z-index: 2; }
.core:focus-visible { outline-offset: 6px; border-radius: 50%; }
.caption { position: absolute; left: 0; right: 0; bottom: 4%; margin: 0; text-align: center; font-weight: 700; font-size: 14px; color: var(--ink-2); letter-spacing: .01em; pointer-events: none; }
.app:not([data-state="idle"]) .caption { color: var(--accent); }

/* ------------------------------------------------------------------ Conversation */
.convo-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px 8px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 800; font-size: 13px; }
.app[data-thread="empty"] .link-btn { visibility: hidden; }
.thread { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: 6px 4px 20px; scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.app[data-thread="empty"] .thread { display: none; }
.app:not([data-thread="empty"]) .suggest { display: none; }
.suggest { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px; }
.suggest-h { margin: 0 0 4px; color: var(--muted); font-size: 13px; }
.sug { text-align: left; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(12px); font-weight: 600; color: var(--ink-2); transition: border-color .2s, color .2s, transform .2s; }
.sug:hover { border-color: var(--accent); color: var(--ink); transform: translateX(3px); }
.turn { display: flex; flex-direction: column; gap: 10px; animation: rise .35s both; }
.q { align-self: flex-end; max-width: 88%; padding: 10px 15px; border-radius: 18px 18px 6px 18px; background: var(--accent-deep); color: #eafff2; font-weight: 600; white-space: pre-wrap; }
:root[data-theme="light"] .q { background: var(--ink); }
.a { display: flex; gap: 12px; align-items: flex-start; }
.a-mark { flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: radial-gradient(circle, #020604 0 40%, transparent 42%), conic-gradient(var(--accent), #0b5a2f, var(--accent)); box-shadow: 0 0 12px rgba(47, 210, 115, .5); }
.turn.live .a-mark { animation: spin 1.2s linear infinite; }
.a-body { min-width: 0; flex: 1; }
.a-text { line-height: 1.6; color: var(--ink); word-wrap: break-word; }
.a-text.streaming { white-space: pre-wrap; }
.a-text.streaming::after { content: ""; display: inline-block; width: 8px; height: 16px; margin-left: 2px; vertical-align: -2px; border-radius: 2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.a-text p { margin: 0 0 .7em; } .a-text p:last-child { margin-bottom: 0; }
.a-text ul, .a-text ol { margin: .2em 0 .8em; padding-left: 1.3em; } .a-text li { margin: .2em 0; }
.a-text h3, .a-text h4 { margin: .8em 0 .3em; font-size: 15.5px; }
.a-text code { font-family: var(--mono); font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--seg); }
.a-text pre { margin: .6em 0; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); overflow: auto; }
:root[data-theme="light"] .a-text pre { background: #0b2e1c; color: #e6f6ec; }
.a-text pre code { padding: 0; background: none; }
.a-text a { color: var(--accent); }
.a-text .note { color: var(--warn); }
.a-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.a-meta { font-size: 11px; color: var(--faint); }
.a-actions { display: flex; gap: 2px; align-items: center; }
.rate { display: inline-flex; gap: 2px; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--line); }
.mini { min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; border: 0; background: none; color: var(--muted); font-weight: 800; display: grid; place-items: center; transition: background .15s, color .15s; }
.mini svg { width: 17px; height: 17px; }
.mini:hover { background: var(--seg); color: var(--ink); }
.mini.on { background: var(--accent); color: var(--accent-ink); }
.memory-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mem { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 13.5px; }
.mem .grow { flex: 1; }
.chip { min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: none; font-weight: 700; font-size: 13px; }
.chip:hover, .chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ------------------------------------------------------------------ Command bar */
.bar {
  position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 8px; max-width: 760px; margin: 0 auto;
  border-radius: 28px; background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow); transition: border-color .25s, box-shadow .25s;
}
.bar:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: var(--shadow), 0 0 0 4px rgba(47, 210, 115, .12); }
.bar textarea { flex: 1; min-height: 44px; max-height: 180px; resize: none; border: 0; outline: 0; background: none; padding: 11px 4px; line-height: 1.45; }
.bar textarea::placeholder { color: var(--muted); }
.bar-tools { display: flex; align-items: center; gap: 6px; }
.bar-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--seg); color: var(--ink-2); transition: background .2s, color .2s; }
.bar-btn:hover { background: var(--accent); color: var(--accent-ink); }
.app[data-state="listening"] .mic { background: var(--accent); color: var(--accent-ink); animation: glowpulse 1.2s ease-in-out infinite; }
.bar-chip { height: 36px; display: flex; align-items: center; gap: 4px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: none; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.bar-chip svg { width: 16px; height: 16px; }
.bar-chip.icon { width: 36px; padding: 0; justify-content: center; }
.bar-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); border-color: var(--accent); color: var(--accent); }
.send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px rgba(47, 210, 115, .4); transition: transform .15s; }
.send svg { stroke-width: 2.3; }
.send:active { transform: scale(.94); }
.send.stop { background: var(--ink); box-shadow: 0 0 0 0 rgba(47, 210, 115, .5); animation: ring 1.4s ease-out infinite; }
.send.stop i { width: 14px; height: 14px; border-radius: 3px; background: var(--bg); }
.mode-wrap { position: relative; }
.mode-menu { position: absolute; bottom: calc(100% + 12px); right: -40px; width: 270px; padding: 6px; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(22px); box-shadow: var(--shadow); animation: rise .2s both; z-index: 10; }
.mode { width: 100%; text-align: left; display: grid; padding: 10px 12px; border-radius: 12px; border: 0; background: none; }
.mode b { font-size: 14px; } .mode span { font-size: 12px; color: var(--muted); }
.mode:hover { background: var(--seg); }
.mode[aria-checked="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.mode[aria-checked="true"] b { color: var(--accent); }
.dock-hint { margin: 8px 0 0; text-align: center; font-size: 11.5px; color: var(--faint); }
kbd { font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); }

/* ------------------------------------------------------------------ Sheets */
.sheet {
  width: min(680px, 100vw); max-height: min(88dvh, 920px); margin: auto auto 0; padding: 0; border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -10px 60px rgba(0, 0, 0, .5);
}
@media (min-width: 760px) { .sheet { margin: auto; border-radius: 26px; border-bottom: 1px solid var(--line-2); } }
.sheet::backdrop { background: rgba(1, 6, 3, .55); backdrop-filter: blur(6px); }
.sheet[open] { animation: rise .28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 6px 24px; }
.sheet-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.sheet-body { padding: 8px 24px 28px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.sheet-body h3 { margin: 10px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.login { max-width: 420px; }
.login .sheet-body { padding: 28px; text-align: center; }
.login h2 { margin: 0; }
.login input, .sheet input:not([type="checkbox"]), .sheet select { min-height: 46px; border-radius: 14px; border: 1px solid var(--line-2); padding: 0 14px; background: var(--bg); color: var(--ink); }
.btn { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2); background: none; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--seg); }
.list li .row { justify-content: space-between; }
.menu-list { display: flex; flex-direction: column; }
.menu-list button { width: 100%; text-align: left; min-height: 56px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.menu-list button span { color: var(--muted); }
.menu-list button:hover { color: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--seg); }
.kpi .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .l { font-size: 12px; color: var(--muted); }
.meter { height: 8px; border-radius: 4px; background: var(--seg); overflow: hidden; }
.meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); border-radius: 4px; transition: width .6s; }
.meter.hot > i { background: var(--warn); }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; }
td.n, th.n { text-align: right; }
.table-wrap { overflow-x: auto; }
.status { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 800; background: var(--seg); }
.status.succeeded { color: var(--accent); } .status.failed, .status.blocked { color: var(--danger); } .status.stopped { color: var(--warn); }
.callout { border-radius: 16px; padding: 12px 14px; background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 14px; }
.key-box { padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 20px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.key-box h3 { margin: 0 0 6px; font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--ink); }
.key-box input { flex: 1; min-width: 200px; }
details summary { cursor: pointer; color: var(--muted); }

/* ------------------------------------------------------------------ Motion */
@keyframes spin { to { rotate: 360deg; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes glowpulse { 50% { box-shadow: 0 0 0 8px rgba(47, 210, 115, .18), 0 0 30px rgba(47, 210, 115, .6); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(47, 210, 115, .45); } 100% { box-shadow: 0 0 0 14px rgba(47, 210, 115, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1280px) { .app { grid-template-columns: 260px 1fr 360px; } }
@media (max-width: 1020px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px calc(120px + env(safe-area-inset-bottom)); gap: 0; }
  .top { height: 60px; }
  .brand-name { display: none; }
  .pill span { display: none; } .pill { padding: 0 12px; }
  .stage { order: 1; height: min(62vh, 520px); margin: 0 -16px; transition: height .5s cubic-bezier(.2, .8, .2, 1); }
  .app:not([data-thread="empty"]) .stage { height: 240px; }
  .app:not([data-thread="empty"]) .sats { opacity: 0; pointer-events: none; }
  .brief { order: 2; overflow: visible; padding: 0; }
  .greet { display: none; }
  .tiles { flex-direction: row; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .tile { flex: none; width: 200px; scroll-snap-align: start; }
  .convo { order: 3; }
  .thread { overflow: visible; mask-image: none; }
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--bg) 60%, transparent); }
  .dock-hint { display: none; }
  .bar-chip span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .mode-menu { right: -60px; }
  .sat svg { padding: 12px; width: 20px; height: 20px; }
}
.bar textarea { min-width: 0; }
@media (max-width: 1020px) {
  .bar textarea { font-size: 16px; } /* no iOS zoom on focus */
  .tile { width: 216px; }
  .t-value { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tile-budget { padding-right: 62px; }
  .ring { width: 40px; height: 40px; right: 12px; }
}
