/* Luma — mobile-first design system.
   Layout: one phone-sized app surface. Full screen on a phone; on wide screens it sits
   in a device frame between a screen map (left) and Luma's live reasoning log (right). */
:root {
  --bg: #f3f4ec;          /* sage-tinted ivory */
  --surface: #fbfbf6;
  --surface-2: #eceee3;
  --ink: #1d271f;         /* moss ink */
  --ink-2: #4d5a4f;
  --ink-3: #7d887c;
  --line: #dfe2d4;
  --moss: #34503b;        /* primary action */
  --moss-ink: #f5f7ee;
  --sage: #a7bd8f;
  --sage-soft: #e1e9d3;
  --clay: #b8744c;        /* warmth: food, money */
  --clay-soft: #f3e3d6;
  --lilac: #7e6aa8;       /* people & moments */
  --lilac-soft: #ebe5f4;
  --sky: #4a7896;         /* calendar & time */
  --sky-soft: #dfeaf0;
  --rose: #b0564f;        /* health, alerts */
  --rose-soft: #f4e0dc;
  --good: #3f7a4e;
  --shadow: 0 1px 2px rgba(29,39,31,.06), 0 8px 24px rgba(29,39,31,.07);
  --shadow-lg: 0 20px 60px rgba(20,30,22,.22);
  --orb-a: #f4f8dc; --orb-b: #c3d69c; --orb-c: #7f9c68; --orb-glow: rgba(167,189,143,.55);
  --backdrop: rgba(22,30,24,.38);
  --stage: #e7e9dd;
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1510; --surface: #172019; --surface-2: #1f2a21; --ink: #e9eee1; --ink-2: #b4bfae; --ink-3: #85917f;
    --line: #2a372c; --moss: #b9d39b; --moss-ink: #142015; --sage: #8fae74; --sage-soft: #223324;
    --clay: #e0a27a; --clay-soft: #3a2a20; --lilac: #b9a6e6; --lilac-soft: #2b2538; --sky: #8dbbd8; --sky-soft: #1d2d38;
    --rose: #e79089; --rose-soft: #3a2220; --good: #8fcf9c;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 20px 60px rgba(0,0,0,.55);
    --orb-a: #f1f7cf; --orb-b: #a9c77e; --orb-c: #4e6e41; --orb-glow: rgba(169,199,126,.35);
    --backdrop: rgba(0,0,0,.55); --stage: #0a0e0a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1510; --surface: #172019; --surface-2: #1f2a21; --ink: #e9eee1; --ink-2: #b4bfae; --ink-3: #85917f;
  --line: #2a372c; --moss: #b9d39b; --moss-ink: #142015; --sage: #8fae74; --sage-soft: #223324;
  --clay: #e0a27a; --clay-soft: #3a2a20; --lilac: #b9a6e6; --lilac-soft: #2b2538; --sky: #8dbbd8; --sky-soft: #1d2d38;
  --rose: #e79089; --rose-soft: #3a2220; --good: #8fcf9c;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); --shadow-lg: 0 20px 60px rgba(0,0,0,.55);
  --orb-a: #f1f7cf; --orb-b: #a9c77e; --orb-c: #4e6e41; --orb-glow: rgba(169,199,126,.35);
  --backdrop: rgba(0,0,0,.55); --stage: #0a0e0a; color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; margin: 0; text-wrap: balance; line-height: 1.12; }
p { margin: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- stage: phone vs desktop presentation ---------- */
.stage { height: 100%; display: flex; justify-content: center; }
.side { display: none; }
.device { position: relative; width: 100%; height: 100%; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.statusbar { display: none; }
@media (min-width: 980px) {
  body { background: var(--stage); }
  .stage { align-items: center; gap: 40px; padding: 24px; }
  .device { width: 400px; height: min(860px, calc(100% - 8px)); border-radius: 50px; box-shadow: 0 0 0 10px #151a15, 0 0 0 11px #3a423a, var(--shadow-lg); }
  .statusbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 30px 4px; font: 600 13px var(--f-body); font-variant-numeric: tabular-nums; flex: none; }
  .statusbar .notch { width: 110px; height: 30px; border-radius: 20px; background: #0b0e0b; }
  .side { display: flex; flex-direction: column; width: 280px; max-height: min(860px, 100%); overflow: auto; gap: 18px; }
}
@media (min-width: 980px) and (max-width: 1260px) { .side.right { display: none; } }

.side .brand { font: 700 30px var(--f-display); letter-spacing: -.04em; display: flex; align-items: center; gap: 8px; }
.side .brand i { color: var(--sage); font-style: normal; }
.side .tag { color: var(--ink-3); font-size: 13px; }
.side h4 { font: 600 11px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.map-list { display: grid; gap: 2px; }
.map-list button { display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; }
.map-list button:hover, .map-list button.on { background: var(--surface); color: var(--ink); }
.map-list b { font: 500 11px var(--f-mono); color: var(--ink-3); width: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; }
.brainlog { display: grid; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.brainlog div { display: grid; grid-template-columns: 44px 1fr; gap: 8px; animation: fadeUp .4s var(--ease); }
.panel .chip { white-space: normal; text-align: left; }
.brainlog time { font: 500 11px var(--f-mono); color: var(--ink-3); padding-top: 1px; }

/* ---------- app chrome ---------- */
.screens { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 8px 18px 120px; background: var(--bg); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.push { z-index: 5; animation: pushIn .38s var(--ease); box-shadow: -10px 0 40px rgba(0,0,0,.08); }
.screen.push.out { animation: pushOut .3s var(--ease) forwards; }
.screen.fade { animation: fadeIn .3s var(--ease); }
@keyframes pushIn { from { transform: translateX(100%); } }
@keyframes pushOut { to { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }

.topbar { display: flex; align-items: center; gap: 10px; min-height: 52px; position: sticky; top: -8px; z-index: 3; margin: 0 -18px; padding: 6px 18px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar h2 { font-size: 17px; flex: 1; }
.logo { font: 700 22px var(--f-display); letter-spacing: -.04em; display: flex; align-items: center; gap: 6px; flex: 1; }
.logo .dot { color: var(--sage); }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); position: relative; }
.iconbtn:active { background: var(--surface-2); }
.iconbtn .badge { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 2px var(--bg); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font: 600 14px var(--f-display); background: var(--sage-soft); color: var(--moss); flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; }

.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.tabbar button { display: grid; justify-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--ink-3); padding: 4px 0; }
.tabbar button.on { color: var(--ink); }
.tabbar button.on .icon { stroke-width: 2.1; }
.tabbar .talk { position: relative; top: -14px; }
.tabbar .talk .mini-orb { width: 58px; height: 58px; box-shadow: 0 8px 24px var(--orb-glow), 0 0 0 5px var(--bg); }
.device.hide-tabs .tabbar { transform: translateY(110%); }
.tabbar { transition: transform .35s var(--ease); }

/* ---------- orb ---------- */
.mini-orb, .orb { border-radius: 50%; background: radial-gradient(circle at 34% 30%, var(--orb-a) 0 12%, var(--orb-b) 45%, var(--orb-c) 100%); }
.mini-orb { width: 36px; height: 36px; display: block; animation: breathe 5s ease-in-out infinite; }
.orb-wrap { position: relative; width: 170px; height: 170px; margin: 0 auto; display: grid; place-items: center; --lv: 0; }
.orb { width: 100%; height: 100%; box-shadow: 0 24px 60px var(--orb-glow), inset -12px -18px 40px rgba(40,60,30,.25); animation: breathe 6s ease-in-out infinite; transform: scale(calc(1 + var(--lv) * .12)); transition: transform .12s linear; }
.orb-wrap::before, .orb-wrap::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid var(--sage); opacity: .35; animation: ring 3.2s ease-out infinite; }
.orb-wrap::after { animation-delay: 1.6s; }
.orb-wrap.idle::before, .orb-wrap.idle::after { animation: none; opacity: .18; }
.orb-wrap.think .orb { animation: think 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes ring { from { transform: scale(.92); opacity: .5; } to { transform: scale(1.35); opacity: 0; } }
@keyframes think { 0%, 100% { filter: hue-rotate(0deg) brightness(1); } 50% { filter: hue-rotate(-25deg) brightness(1.08); transform: scale(.96); } }

/* ---------- type & bits ---------- */
.eyebrow { font: 600 11px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); font-size: 13px; }
.hello { padding: 10px 0 18px; display: grid; gap: 6px; }
.hello h1 { font-size: 34px; letter-spacing: -.035em; }
.hello h1 em { font-style: normal; color: var(--sage); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip .icon { width: 14px; height: 14px; }
.chip.clay { background: var(--clay-soft); color: var(--clay); }
.chip.lilac { background: var(--lilac-soft); color: var(--lilac); }
.chip.sky { background: var(--sky-soft); color: var(--sky); }
.chip.rose { background: var(--rose-soft); color: var(--rose); }
.chip.sage { background: var(--sage-soft); color: var(--moss); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.scroller { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.filter { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; white-space: nowrap; color: var(--ink-2); }
.filter.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.section { margin-top: 26px; display: grid; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-head h3 { font-size: 19px; }
.link { color: var(--moss); font-weight: 600; font-size: 13.5px; display: inline-flex; gap: 4px; align-items: center; }
.link .icon { width: 16px; height: 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.card.tap { transition: transform .15s var(--ease); cursor: pointer; text-align: left; width: 100%; display: block; }
.card.tap:active { transform: scale(.985); }
.ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.ico.clay { background: var(--clay-soft); color: var(--clay); }
.ico.lilac { background: var(--lilac-soft); color: var(--lilac); }
.ico.sky { background: var(--sky-soft); color: var(--sky); }
.ico.rose { background: var(--rose-soft); color: var(--rose); }
.ico.sage { background: var(--sage-soft); color: var(--moss); }
.ico.sm { width: 32px; height: 32px; border-radius: 10px; }
.ico.sm .icon { width: 17px; height: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px; background: var(--moss); color: var(--moss-ink); transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.line { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.row { display: flex; align-items: center; gap: 12px; }
.row > .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- today ---------- */
.brief { position: relative; overflow: hidden; border-radius: 28px; padding: 22px; background: linear-gradient(145deg, var(--sage-soft), var(--surface) 70%); border: 1px solid var(--line); display: grid; gap: 14px; }
.brief .mini-orb { position: absolute; right: -44px; top: -56px; width: 150px; height: 150px; opacity: .9; }
.brief .eyebrow { position: relative; max-width: 62%; }
.brief h2 { font-size: 26px; max-width: 12ch; position: relative; }
.brief p { max-width: 30ch; color: var(--ink-2); position: relative; }
.brief .row { position: relative; }
.bars { display: flex; gap: 4px; }
.bars i { flex: 1; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 15%, transparent); overflow: hidden; }
.bars i b { display: block; height: 100%; width: 0; background: var(--ink); }

.live { border-radius: 22px; padding: 14px 16px; background: var(--ink); color: var(--bg); display: flex; gap: 14px; align-items: center; cursor: pointer; text-align: left; width: 100%; }
.live .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 0 var(--sage); animation: pulse 1.6s infinite; flex: none; }
.live small { color: color-mix(in srgb, var(--bg) 65%, transparent); display: block; font-size: 12.5px; }
.live strong { font-weight: 600; }
.live .eta { font: 600 20px var(--f-display); margin-left: auto; font-variant-numeric: tabular-nums; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.proposal { display: grid; gap: 12px; }
.proposal .top { display: flex; gap: 12px; align-items: flex-start; }
.proposal h4 { font-size: 16.5px; line-height: 1.25; }
.proposal .because { font-size: 13.5px; color: var(--ink-2); }
.proposal .foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.when { font: 500 12px var(--f-mono); color: var(--ink-3); }
.state { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; }
.state.ask { background: var(--surface-2); color: var(--ink-2); }
.state.auto { background: var(--sage-soft); color: var(--moss); }
.state.done { background: var(--sage-soft); color: var(--good); }
.state.run { background: var(--sky-soft); color: var(--sky); }
.countdown { font: 500 12px var(--f-mono); color: var(--moss); }

.timeline { position: relative; display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 58px 16px 1fr; gap: 10px; padding: 8px 0; align-items: start; }
.tl time { font: 500 12.5px var(--f-mono); color: var(--ink-3); padding-top: 1px; text-align: right; }
.tl .dotcol { position: relative; height: 100%; display: flex; justify-content: center; }
.tl .dotcol::before { content: ""; position: absolute; top: 0; bottom: -18px; width: 1px; background: var(--line); }
.tl:last-child .dotcol::before { display: none; }
.tl .dotcol i { position: relative; margin-top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--sage); }
.tl.luma .dotcol i { background: var(--sage); }
.tl.now .dotcol i { background: var(--clay); border-color: var(--clay); box-shadow: 0 0 0 4px var(--clay-soft); }
.tl.past { opacity: .5; }
.tl strong { font-weight: 600; display: block; font-size: 14.5px; }
.tl small { color: var(--ink-3); font-size: 12.5px; }

.askbar { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.askbar input { flex: 1; border: 0; background: transparent; outline: 0; min-width: 0; padding: 10px 0; font-size: 15px; }
.askbar .send { width: 40px; height: 40px; border-radius: 50%; background: var(--moss); color: var(--moss-ink); display: grid; place-items: center; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px; }
.stat b { display: block; font: 600 22px var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--ink-3); }

/* ---------- sheets & overlays ---------- */
.layer { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.layer .scrim { position: absolute; inset: 0; background: var(--backdrop); animation: fadeIn .25s; }
.sheet { position: relative; background: var(--bg); border-radius: 28px 28px 0 0; max-height: 92%; display: flex; flex-direction: column; animation: sheetUp .38s var(--ease); box-shadow: var(--shadow-lg); }
.sheet.full { max-height: 100%; height: 100%; border-radius: 0; }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet .body { overflow-y: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; scrollbar-width: none; }
.sheet .head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 0 20px; }
.layer.closing .sheet { animation: sheetDown .28s var(--ease) forwards; }
.layer.closing .scrim { opacity: 0; transition: opacity .28s; }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes sheetDown { to { transform: translateY(100%); } }

.why { display: grid; gap: 10px; }
.why li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 14px; color: var(--ink-2); }
.why ul { margin: 0; padding: 0; display: grid; gap: 10px; }
.src { font: 500 11px var(--f-mono); color: var(--ink-3); display: block; margin-top: 2px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-m); border: 1.5px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.opt.on { border-color: var(--moss); box-shadow: 0 0 0 3px var(--sage-soft); }
.opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt.on .radio { border-color: var(--moss); }
.opt.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--moss); }
.opt .price { font: 600 15px var(--f-display); font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.field input, .field textarea, .field select { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; outline: 0; width: 100%; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: var(--moss); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }

/* slide to approve */
.slider { position: relative; height: 60px; border-radius: 999px; background: var(--moss); color: var(--moss-ink); overflow: hidden; user-select: none; touch-action: none; }
.slider .label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; padding-left: 40px; transition: opacity .2s; }
.slider .fill { position: absolute; inset: 0 auto 0 0; width: 60px; background: color-mix(in srgb, var(--moss-ink) 16%, transparent); border-radius: 999px; }
.slider .knob { position: absolute; top: 5px; left: 5px; width: 50px; height: 50px; border-radius: 50%; background: var(--moss-ink); color: var(--moss); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.slider.done .knob { transition: left .25s var(--ease); }
.slider .shine { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%); animation: shine 2.6s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* agent theatre */
.agent { display: grid; gap: 16px; }
.agent-head { text-align: center; display: grid; gap: 8px; justify-items: center; padding-top: 6px; }
.agent-head .orb-wrap { width: 88px; height: 88px; }
.agent-head h2 { font-size: 22px; }
.steps { display: grid; gap: 2px; }
.step { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; opacity: .38; transition: opacity .3s; }
.step.on, .step.ok { opacity: 1; }
.step .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; margin-top: 1px; }
.step.on .tick { border-color: var(--sky); border-top-color: transparent; animation: spin .8s linear infinite; }
.step.ok .tick { background: var(--moss); border-color: var(--moss); color: var(--moss-ink); }
.step.ok .tick .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.step strong { display: block; font-weight: 600; font-size: 14.5px; }
.step small { color: var(--ink-3); font-size: 12.5px; }
.step .t { font: 500 11px var(--f-mono); color: var(--ink-3); padding-top: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.miniapp { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow); min-height: 180px; }
.miniapp .bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.miniapp .bar .ico { width: 24px; height: 24px; border-radius: 7px; }
.miniapp .bar .ico .icon { width: 14px; height: 14px; }
.miniapp .bar .tap { margin-left: auto; font: 500 11px var(--f-mono); color: var(--ink-3); }
.miniapp .in { padding: 12px 14px; display: grid; gap: 8px; animation: fadeUp .35s var(--ease); }
.mrow { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; background: var(--bg); transition: background .3s, box-shadow .3s; }
.mrow.hl { background: var(--sage-soft); box-shadow: inset 0 0 0 1.5px var(--sage); }
.mrow.x { text-decoration: line-through; opacity: .5; }
.mrow b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cursor { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--sky) 35%, transparent); border: 2px solid var(--sky); pointer-events: none; transition: all .6s var(--ease); z-index: 2; }
.grid-av { display: grid; grid-template-columns: 54px repeat(5, 1fr); gap: 3px; font: 500 10.5px var(--f-mono); color: var(--ink-3); }
.grid-av i { height: 16px; border-radius: 4px; background: var(--surface-2); transition: background .3s; }
.grid-av i.busy { background: var(--rose-soft); }
.grid-av i.free { background: var(--sage-soft); }
.grid-av i.pick { background: var(--moss); }

/* map */
.map { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface-2); aspect-ratio: 4/3; max-width: 100%; border: 1px solid var(--line); }
.map svg { width: 100%; height: 100%; display: block; }
.map .street { stroke: var(--surface); stroke-width: 9; fill: none; stroke-linecap: round; }
.map .street.s { stroke-width: 5; }
.map .block { fill: var(--line); opacity: .55; }
.map .park { fill: var(--sage-soft); }
.map .route { stroke: var(--moss); stroke-width: 4; fill: none; stroke-linecap: round; stroke-dasharray: 2 8; }
.map .pin-home { fill: var(--clay); }
.map .rider { fill: var(--ink); }
.map .label { font: 600 10px var(--f-body); fill: var(--ink-2); }
.map-eta { position: absolute; left: 12px; top: 12px; background: var(--surface); border-radius: 14px; padding: 8px 12px; box-shadow: var(--shadow); font-size: 12.5px; }
.map-eta b { display: block; font: 600 20px var(--f-display); font-variant-numeric: tabular-nums; }

.receipt { border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); padding: 20px; display: grid; gap: 14px; position: relative; }
.receipt::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 10px; background: radial-gradient(circle at 6px 10px, var(--bg) 5px, transparent 5.5px) 0 0 / 12px 10px repeat-x; }
.stamp { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 600; font-size: 13px; }

/* rhythm */
.dial { position: relative; width: min(100%, 330px); aspect-ratio: 1; margin: 6px auto 0; }
.dial svg { width: 100%; height: 100%; overflow: visible; }
.dial .center { position: absolute; inset: 30%; display: grid; place-items: center; text-align: center; align-content: center; gap: 2px; }
.dial .center b { font: 600 30px var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.dial .center span { font-size: 12px; color: var(--ink-3); }
.dial .arc { fill: none; stroke-width: 16; stroke-linecap: round; cursor: pointer; transition: stroke-width .2s, opacity .2s; }
.dial .arc:hover, .dial .arc.on { stroke-width: 22; }
.dial .tick { stroke: var(--ink-3); stroke-width: 1; opacity: .5; }
.dial .hr { font: 500 9.5px var(--f-mono); fill: var(--ink-3); text-anchor: middle; dominant-baseline: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.confidence { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.confidence b { display: block; height: 100%; background: var(--sage); border-radius: 6px; }

/* people */
.moment { display: grid; gap: 12px; }
.moment .who { display: flex; gap: 12px; align-items: center; }
.moment .face { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 600 16px var(--f-display); color: var(--ink); flex: none; }
.moment.gentle { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.moment blockquote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--line); font-size: 14px; color: var(--ink-2); }
.thread { display: grid; gap: 10px; }
.thread .sum { font-size: 14px; color: var(--ink-2); }
.pill-list { display: grid; gap: 8px; }
.pill-list div { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; animation: fadeUp .3s var(--ease); }
.bubble.me { background: var(--moss); color: var(--moss-ink); margin-left: auto; border-bottom-right-radius: 6px; }
.bubble.luma { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bubble.draft { background: var(--sage-soft); border: 1px dashed var(--sage); }

/* voice */
.voice { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; background: radial-gradient(120% 70% at 50% 18%, var(--sage-soft), var(--bg) 70%); animation: fadeIn .3s; padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.voice .convo { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 0 12px; scrollbar-width: none; }
.voice .heard { text-align: center; font: 500 22px/1.3 var(--f-display); letter-spacing: -.02em; min-height: 58px; color: var(--ink); text-wrap: balance; }
.voice .heard.interim { color: var(--ink-3); }
.voice .ctrls { display: flex; justify-content: center; align-items: center; gap: 22px; }
.mic { width: 72px; height: 72px; border-radius: 50%; background: var(--moss); color: var(--moss-ink); display: grid; place-items: center; box-shadow: 0 10px 30px var(--orb-glow); }
.mic .icon { width: 28px; height: 28px; }
.mic.on { background: var(--rose); animation: pulse 1.4s infinite; }
.wave { display: flex; gap: 4px; height: 36px; align-items: center; justify-content: center; }
.wave i { width: 4px; border-radius: 4px; background: var(--moss); height: 6px; transition: height .12s; }
.suggest { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.suggest button { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.actioncard { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 12px; display: flex; gap: 12px; align-items: center; animation: fadeUp .35s var(--ease); text-align: left; width: 100%; }

/* banners */
.banners { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 80; display: grid; gap: 8px; pointer-events: none; }
@media (min-width: 980px) { .banners { top: 46px; } }
.banner { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: bannerIn .45s var(--ease); text-align: left; width: 100%; }
.banner .mini-orb { width: 30px; height: 30px; }
.banner small { font-size: 11.5px; color: var(--ink-3); display: block; }
.banner b { font-weight: 600; font-size: 14px; }
.banner p { font-size: 13.5px; color: var(--ink-2); }
.banner .acts { display: flex; gap: 6px; margin-top: 8px; }
.banner.out { animation: bannerOut .35s var(--ease) forwards; }
@keyframes bannerIn { from { transform: translateY(-120%); opacity: 0; } }
@keyframes bannerOut { to { transform: translateY(-120%); opacity: 0; } }

.toast { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); animation: fadeUp .3s var(--ease); white-space: nowrap; max-width: 90%; overflow: hidden; text-overflow: ellipsis; }

/* onboarding */
.onb { position: absolute; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding: 16px 22px calc(22px + env(safe-area-inset-bottom, 0px)); animation: fadeIn .4s; }
.onb .prog { display: flex; gap: 5px; padding-top: 4px; }
.onb .prog i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); }
.onb .prog i.on { background: var(--moss); }
.onb .content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 22px 0 12px; scrollbar-width: none; animation: fadeUp .45s var(--ease); }
.onb h1 { font-size: 32px; letter-spacing: -.035em; }
.onb .lead { color: var(--ink-2); font-size: 16px; max-width: 34ch; }
.onb .nav { display: flex; gap: 10px; }
.onb .nav .btn { flex: 1; }
.splash { justify-content: center; align-items: center; text-align: center; gap: 22px; }
.splash .word { font: 700 56px var(--f-display); letter-spacing: -.05em; }
.splash .word i { font-style: normal; color: var(--sage); }
.appgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.appt { border-radius: 18px; padding: 12px 8px; border: 1.5px solid var(--line); background: var(--surface); display: grid; justify-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; position: relative; }
.appt.on { border-color: var(--moss); background: var(--sage-soft); }
.appt .ok { position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--moss); color: var(--moss-ink); display: none; place-items: center; }
.appt.on .ok { display: grid; }
.appt .ok .icon { width: 11px; height: 11px; stroke-width: 3; }
.scan { display: grid; gap: 10px; }
.scan div { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; animation: fadeUp .5s var(--ease) both; font-size: 14.5px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { padding: 8px 4px; border-radius: 9px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
input[type=range] { width: 100%; accent-color: var(--moss); }

/* settings */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; width: 100%; text-align: left; }
.li + .li { border-top: 1px solid var(--line); }
.li .grow { flex: 1; min-width: 0; }
.li small { display: block; color: var(--ink-3); font-size: 12.5px; }
.li > .icon:last-child { color: var(--ink-3); width: 16px; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch.on { background: var(--moss); }
.switch.on::after { transform: translateX(18px); }

/* lock screen */
.lock { position: absolute; inset: 0; z-index: 65; color: #f4f6ee; background: radial-gradient(90% 60% at 30% 20%, #6f8a5c, transparent 60%), radial-gradient(80% 60% at 90% 90%, #6b5a8e, transparent 60%), #1b241c; display: flex; flex-direction: column; padding: 30px 14px 20px; animation: fadeIn .4s; }
.lock .clock { text-align: center; font: 600 76px/1 var(--f-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.lock .date { text-align: center; font-weight: 500; opacity: .85; margin-bottom: 22px; }
.lock .note { background: rgba(255,255,255,.14); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 22px; padding: 12px 14px; display: grid; gap: 4px; animation: fadeUp .5s var(--ease) both; }
.lock .note small { opacity: .7; font-size: 11.5px; }
.lock .note .acts { display: flex; gap: 6px; margin-top: 6px; }
.lock .note .acts button { background: rgba(255,255,255,.2); color: inherit; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; }
.lock .widget { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,.35); border-radius: 24px; padding: 14px; }

/* simulator pill */
.simpill { position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%); z-index: 85; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); padding: 6px 8px 6px 14px; border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 13px; white-space: nowrap; }
.simpill b { font: 600 15px var(--f-mono); }
.simpill button { background: color-mix(in srgb, var(--bg) 18%, transparent); color: inherit; border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
