/* Mandat — iOS 27 design language on the web.
   Glass is reserved for floating controls (top bar, composer, sheet); content cards are solid materials.
   Type follows Dynamic Type defaults; corners are concentric; motion respects reduce-motion. */
:root {
  --bg: #f4f1ec;
  --ink: #111216;
  --ink-2: rgba(17, 18, 22, 0.62);
  --ink-3: rgba(17, 18, 22, 0.38);
  --card: rgba(255, 255, 255, 0.86);
  --card-line: rgba(17, 18, 22, 0.06);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-line: rgba(255, 255, 255, 0.7);
  --accent: #0a6cff;
  --pp-blue: #003087;
  --pp-sky: #0070e0;
  --held: #f2a33a;
  --spent: #0a6cff;
  --ok: #19a463;
  --warn: #e5484d;
  --shadow: 0 12px 40px rgba(25, 20, 10, 0.10), 0 2px 8px rgba(25, 20, 10, 0.06);
  --r-xl: 30px;
  --r-l: 22px;
  --r-m: 16px;
  --spring: cubic-bezier(0.2, 0.9, 0.25, 1.15);
  --smooth: cubic-bezier(0.25, 0.8, 0.25, 1);
  font: 17px/22px -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c10;
    --ink: #f5f5f7;
    --ink-2: rgba(245, 245, 247, 0.66);
    --ink-3: rgba(245, 245, 247, 0.4);
    --card: rgba(28, 29, 34, 0.9);
    --card-line: rgba(255, 255, 255, 0.07);
    --glass: rgba(40, 42, 50, 0.5);
    --glass-line: rgba(255, 255, 255, 0.14);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; color: var(--ink); -webkit-font-smoothing: antialiased; }
body { background: transparent; min-height: 100vh; }
/* An app, not a page: a long press never selects text or opens the Copy menu (it broke "Hold to approve").
   Fields stay selectable; replies are copied with their Copy button. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
/* The top bar floats (fixed), so its height changes never move the page; --top-h reserves its full height. */
body { padding: calc(env(safe-area-inset-top) + var(--top-h, 60px)) 0 env(safe-area-inset-bottom); overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* Living backdrop: soft colour fields that drift under the glass. */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.backdrop i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: 0.55; animation: drift 26s var(--smooth) infinite alternate; }
.backdrop i:nth-child(1) { background: #ffd9a8; left: -25vmax; top: -30vmax; }
.backdrop i:nth-child(2) { background: #b9d4ff; right: -30vmax; top: 10vmax; animation-duration: 31s; }
.backdrop i:nth-child(3) { background: #ffc4d6; left: 10vmax; bottom: -40vmax; animation-duration: 37s; }
@media (prefers-color-scheme: dark) { .backdrop i { opacity: 0.16; } .backdrop i:nth-child(1) { background: #3b2a8f; } .backdrop i:nth-child(2) { background: #0b4fa8; } .backdrop i:nth-child(3) { background: #8f2a5a; } }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.08); } }

/* Glass: blur + saturation + inner highlight + specular rim (Safari-safe recipe). */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), var(--shadow);
  position: relative;
  isolation: isolate; /* the highlight below stays under the text, never over it */
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  /* a plain highlight: no blend mode, which made iPhone render the bar's text as a soft image */
  background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, 0.16), transparent 55%);
}
.topbar.has-budget::before { display: none; }
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.topbar {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 16px; right: 16px; z-index: 10;
  margin: 0 auto; height: 52px; border-radius: 26px; padding: 0 8px 0 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: conic-gradient(from 210deg, var(--pp-sky), #7b61ff, #ff7aa8, #ffb547, var(--pp-sky)); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.6); }

.view { max-width: 620px; margin: 0 auto; padding: 28px 20px 24px; }
.large-title { font: 700 34px/41px -apple-system, "SF Pro Display", system-ui, sans-serif; letter-spacing: -0.025em; margin: 18px 0 12px; }
.lede { color: var(--ink-2); margin: 0 0 24px; }

.field-card, .mandate-card, .card, .glass-card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-l); box-shadow: var(--shadow); }
.field-card { position: relative; padding: 14px 56px 14px 16px; margin-bottom: 14px; }
.field-card textarea { width: 100%; border: 0; outline: 0; resize: none; background: none; font-size: 17px; line-height: 23px; }
.mic-mini { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 18px; background: var(--accent); display: grid; place-items: center; }
.mic-mini svg { width: 18px; fill: #fff; }
.mic-mini.listening { animation: pulse 1.2s ease-in-out infinite; }

.mandate-card { padding: 6px 16px 14px; margin-bottom: 20px; }
.mandate-card .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 0.5px solid var(--card-line); flex-wrap: wrap; }
.mandate-card label { color: var(--ink-2); font-size: 15px; }
.stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.stepper input { min-width: 0; padding: 0; }
.stepper button { width: 34px; height: 34px; border-radius: 17px; background: var(--card-line); font-size: 20px; }
.stepper input { width: 88px; text-align: right; border: 0; outline: 0; background: none; font: 600 28px/34px -apple-system, "SF Pro Display", system-ui; font-variant-numeric: tabular-nums; }
.stepper .cur { font: 600 22px/34px inherit; color: var(--ink-2); margin-right: 6px; }
.segmented { display: flex; background: var(--card-line); border-radius: 10px; padding: 2px; }
.segmented button { padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-2); transition: background 0.25s var(--smooth); }
.segmented button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.12); font-weight: 600; }
.fine { font-size: 13px; line-height: 18px; color: var(--ink-2); margin: 12px 0 0; }

.cta { width: 100%; height: 56px; border-radius: 28px; background: #ffc439; color: #111; font-weight: 600; font-size: 17px; box-shadow: 0 8px 24px rgba(255, 196, 57, 0.35); transition: transform 0.3s var(--spring); }
.cta:active { transform: scale(0.97); }
.cta .pp::after { content: " →"; }
.demo-note { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 12px; }

/* Live view */
.env-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.env-head span:last-child { color: var(--ink); font-weight: 600; max-width: 70%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-bar { height: 10px; border-radius: 5px; background: var(--card-line); overflow: hidden; display: flex; }
.env-bar i { display: block; height: 100%; width: 0; transition: width 0.9s var(--smooth); }
.env-bar .spent { background: var(--spent); }
.env-bar .held { background: repeating-linear-gradient(135deg, var(--held) 0 6px, #f7bd6b 6px 12px); }
.env-legend { display: flex; justify-content: space-between; margin-top: 12px; }
.env-legend div:last-child { align-items: flex-end; text-align: right; }
.env-legend div { display: flex; flex-direction: column; }
.env-legend b { font: 600 20px/25px inherit; font-variant-numeric: tabular-nums; }
.env-legend small { font-size: 12px; color: var(--ink-3); }
/* One glass bar on a mission: title row on top, budget underneath; it tightens as the feed scrolls. */
.topbar { height: auto; display: block; }
.top-row { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.topbar.has-budget { border-radius: 24px; background: var(--card); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
.top-budget { padding: 0 10px 0 0; }
.titles { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
#topSub { font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.topbar.has-budget .top-row { height: 54px; }
.topbar.has-budget #brand { cursor: pointer; }
.topbar.has-budget #topTitle { font-size: 16px; }
.top-budget .env-bar { height: 3px; border-radius: 2px; margin: 0 0 9px; }
.top-budget .env-legend { display: none; }
.topbar.expanded .env-legend { display: flex; margin: 4px 0 12px; animation: rise 0.3s var(--spring) both; }
.top-budget .env-legend b { font-size: 17px; line-height: 22px; }
@media (prefers-reduced-transparency: reduce) { .topbar.has-budget { -webkit-backdrop-filter: none; backdrop-filter: none; } }
.env-legend div:nth-child(1) b { color: var(--spent); }
.env-legend div:nth-child(2) b { color: var(--held); }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.feed > li { animation: rise 0.55s var(--spring) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .feed > li, .backdrop i { animation: none; } }
.feed-spacer { height: 120px; }
/* Split bill */
.split-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.split-row { padding: 12px; border-radius: 14px; background: var(--card-line); }
.split-top { display: flex; align-items: center; gap: 10px; }
.split-top .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.split-top .who b { font-size: 15px; }
.split-top .who small { font-size: 12px; color: var(--ink-3); }
.split-top .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 10px; }
.chip.wait { background: rgba(255, 159, 10, 0.16); color: var(--held); }
.chip.paid { background: rgba(48, 209, 88, 0.18); color: var(--ok); }
.chip.part { background: rgba(10, 132, 255, 0.16); color: var(--accent); }
.chip.off { background: var(--card-line); color: var(--ink-3); }
.split-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.split-actions button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 600; transition: background 0.2s var(--smooth), color 0.2s var(--smooth); }
.split-actions button:hover, .split-actions button.on { color: var(--accent); }
.split-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.qr-box { margin: 12px 0 2px; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: rise 0.4s var(--spring) both; }
.qr-box img { width: 180px; height: 180px; padding: 10px; border-radius: 16px; background: #fff; image-rendering: pixelated; }
.qr-box figcaption, .qr-box span { font-size: 12px; color: var(--ink-3); }
.split-foot { margin: 10px 2px 0; font-size: 12px; color: var(--ink-3); }
/* Live writing */
.say.streaming .say-text::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: caret 0.9s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.feed > li.settled { animation: none; }
.to-end { position: fixed; left: 50%; margin-left: -21px; z-index: 19; width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center; color: var(--ink); animation: end-in 0.3s var(--spring) both; }
.to-end svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.to-end.fresh::after { content: ''; position: absolute; top: 3px; right: 3px; width: 10px; height: 10px; border-radius: 5px; background: var(--accent); box-shadow: 0 0 0 2px var(--bg, #fff); }
@keyframes end-in { from { opacity: 0; transform: translateY(8px) scale(0.9); } to { opacity: 1; transform: none; } }
.new-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(10px, calc(env(safe-area-inset-bottom) - 10px)) + 72px); z-index: 19; height: 36px; padding: 0 16px; border-radius: 18px; font-size: 14px; font-weight: 600; color: var(--accent); animation: pill-in 0.4s var(--spring) both; }
@keyframes pill-in { from { opacity: 0; transform: translate(-50%, 10px); } }
/* Map: soft placeholder, then a fade-in once drawn */
.place-map { position: relative; background: linear-gradient(100deg, var(--card-line) 30%, rgba(255,255,255,0.08) 50%, var(--card-line) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
.place-map.ready { animation: none; }
.place-map .maplibregl-canvas, .place-map .maplibregl-marker, .place-map .maplibregl-ctrl { opacity: 0; transition: opacity 0.5s var(--smooth); }
.place-map.ready .maplibregl-canvas, .place-map.ready .maplibregl-marker, .place-map.ready .maplibregl-ctrl { opacity: 1; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .say.streaming .say-text::after, .place-map { animation: none; } }
/* Assistant reply actions: quiet until needed. */
.say .say-text { margin: 0; }
.msg-actions { display: flex; gap: 0; margin: 6px 0 0 -7px; }
.msg-actions button { width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; color: var(--ink-3); opacity: 0.55; transition: opacity 0.2s var(--smooth), background 0.2s var(--smooth), color 0.2s var(--smooth); }
.say:hover .msg-actions button, .msg-actions button:focus-visible, .msg-actions button.on { opacity: 1; }
@media (hover: none) { .msg-actions button { opacity: 0.8; } }
.msg-actions button:hover, .msg-actions button.on { background: var(--card-line); color: var(--ink); }
.msg-actions { align-items: center; }
.msg-time { margin-left: 8px; font-size: 12px; color: var(--ink-3); opacity: 0.8; font-variant-numeric: tabular-nums; }
.u-time { display: block; margin-top: 3px; text-align: right; font-size: 11px; line-height: 14px; opacity: 0.72; font-variant-numeric: tabular-nums; }
.say.user.images-only .u-time { color: var(--ink-3); }
.msg-actions svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* Working indicator */
.typing { align-self: flex-start; display: flex; gap: 5px; padding: 8px 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: dot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: 0.6; } }
.step.error { color: var(--warn); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step.error .retry { padding: 6px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); color: var(--accent); font-weight: 600; font-size: 13px; }

.say { align-self: stretch; max-width: 100%; padding: 0 4px; font-size: 16.5px; line-height: 25px; color: var(--ink); }
.say.user { align-self: flex-end; max-width: 78%; padding: 9px 14px; border-radius: 20px 20px 6px 20px; background: var(--accent); color: #fff; font-size: 16px; line-height: 22px; }
.step { font-size: 13px; line-height: 18px; color: var(--ink-3); padding: 0 4px; display: flex; gap: 8px; align-items: center; }
.step + .step, .seen + .step, .step + .seen { margin-top: -12px; }
.step::before { content: ""; width: 5px; height: 5px; border-radius: 3px; background: currentColor; opacity: 0.7; flex: none; }

.card { padding: 14px 16px; }
.feed .card { border-radius: 18px; box-shadow: none; }
.card header { display: flex; align-items: center; gap: 10px; }
.card header b { display: block; font-size: 15px; font-weight: 600; }
.card header small { color: var(--ink-3); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; }
.avatar.m { background: linear-gradient(135deg, #2b2f3a, #555b6b); }
.shield { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ok); background: rgba(25, 164, 99, 0.1); padding: 4px 9px; border-radius: 10px; }
.shield::before { content: "✓ "; }
.bubbles { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bubbles li { max-width: 86%; padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 20px; animation: rise 0.45s var(--spring) both; }
.bubbles li.mandat { align-self: flex-end; background: rgba(10, 108, 255, 0.1); border-bottom-right-radius: 5px; }
.bubbles li.merchant { align-self: flex-start; background: var(--card-line); border-bottom-left-radius: 5px; }
.offer { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.offer span { font-size: 13px; padding: 5px 10px; border-radius: 10px; background: var(--card-line); font-variant-numeric: tabular-nums; }
.offer span.total { background: var(--ink); color: var(--bg); font-weight: 600; }

.req .dots { margin-left: auto; display: flex; gap: 4px; }
.req .dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--ink-3); animation: blink 1.2s infinite; }
.req .dots i:nth-child(2) { animation-delay: 0.2s; } .req .dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 50% { opacity: 0.2; } }
.req p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }



.place-map { height: 210px; margin: 12px -4px 4px; border-radius: 14px; overflow: hidden; background: var(--card-line); }
.place-list { list-style: none; padding: 0; margin: 6px -8px 0; display: flex; flex-direction: column; }
.place-list button { width: 100%; display: flex; align-items: baseline; gap: 10px; padding: 7px 8px; border-radius: 10px; text-align: left; font-size: 14px; color: var(--ink-2); transition: background 0.2s var(--smooth); }
.place-list button:hover, .place-list button.on { background: var(--card-line); color: var(--ink); }
.pin-n { flex: none; width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; align-self: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.pl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { flex: none; margin-left: auto; color: var(--ink-3); font-size: 12px; }
/* Map markers */
.pin { width: 30px; height: 34px; padding: 0; cursor: pointer; }
.pin-body { width: 28px; height: 28px; margin: 0 auto; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; background: var(--accent); border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.35); transition: background 0.2s var(--smooth), transform 0.3s var(--spring); }
.pin-body b { transform: rotate(45deg); color: #fff; font: 700 12px/1 -apple-system, system-ui, sans-serif; }
.pin.on { z-index: 2; }
.pin.on .pin-body { background: #ff7a45; transform: rotate(-45deg) scale(1.15); }
/* Map controls in the app's materials */
.place-map .maplibregl-ctrl-group { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.place-map .maplibregl-ctrl-group button + button { border-top: 1px solid var(--card-line); }
.place-map .maplibregl-ctrl-attrib.maplibregl-compact { background: var(--card); color: var(--ink-3); font-size: 10px; }
.place-map .maplibregl-ctrl-attrib a { color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .place-map .maplibregl-ctrl-group button .maplibregl-ctrl-icon, .place-map .maplibregl-ctrl-attrib-button { filter: invert(1); }
}
.me-dot { width: 16px; height: 16px; border-radius: 50%; background: #0a84ff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(10,132,255,0.25), 0 2px 6px rgba(0,0,0,0.3); }
.place-pop .maplibregl-popup-content { background: var(--card); color: var(--ink); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; font: 14px/1.35 -apple-system, system-ui, sans-serif; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.place-pop .maplibregl-popup-content span { color: var(--ink-3); font-size: 12px; }
.place-pop .maplibregl-popup-content a { color: var(--accent); font-weight: 600; margin-top: 4px; text-decoration: none; }
.place-pop .maplibregl-popup-tip { border-top-color: var(--card) !important; }

/* Composer */
.composer { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 24px)); height: 64px; border-radius: 32px; display: flex; align-items: center; gap: 10px; padding: 0 8px; z-index: 20; }
.composer form { flex: 1; display: flex; align-items: center; gap: 6px; }
.composer input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; }
.send { width: 40px; height: 40px; border-radius: 20px; background: var(--accent); display: grid; place-items: center; }
.send svg { width: 18px; fill: #fff; }

.orb { position: relative; width: 48px; height: 48px; border-radius: 24px; flex: none; }
.orb-core { position: absolute; inset: 4px; border-radius: 50%; background: conic-gradient(from 0deg, #0070e0, #7b61ff, #ff7aa8, #ffb547, #0070e0); filter: saturate(1.2); animation: spin 8s linear infinite; }
.orb-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,0.7) inset; }
.orb.listening .orb-core { animation: spin 2s linear infinite, breathe 1s ease-in-out infinite; }
.orb.speaking .orb-core { animation: spin 3s linear infinite, talk 0.35s ease-in-out infinite alternate; }
.orb.thinking .orb-core { animation: spin 0.9s linear infinite; opacity: 0.85; }
/* Morph: the orb becomes the send button as soon as there is text. */
.orb-send { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; fill: #fff; opacity: 0; transform: scale(0.4) rotate(-90deg); transition: opacity 0.25s var(--smooth), transform 0.45s var(--spring); }
.orb-core { transition: inset 0.4s var(--spring), filter 0.3s var(--smooth); }
.composer.has-text .orb-core, .compose.has-text .orb-core { inset: 2px; animation: none; background: var(--accent); filter: none; }
.composer.has-text .orb-ring, .compose.has-text .orb-ring { opacity: 0; }
.composer.has-text .orb-send, .compose.has-text .orb-send { opacity: 1; transform: none; }
/* A voice waveform on the orb, so it reads as "talk to the assistant" at a glance. */
.orb-wave { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 3px; pointer-events: none; transition: opacity 0.2s var(--smooth), transform 0.45s var(--spring); }
.orb-wave i { width: 3px; height: 8px; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.orb-wave i:nth-child(2) { height: 16px; }
.orb-wave i:nth-child(3) { height: 12px; }
.orb.listening .orb-wave i, .orb.speaking .orb-wave i { animation: wave 0.6s ease-in-out infinite alternate; }
.orb-wave i:nth-child(2) { animation-delay: -0.15s; }
.orb-wave i:nth-child(3) { animation-delay: -0.3s; }
.orb-wave i:nth-child(4) { animation-delay: -0.45s; }
@keyframes wave { from { transform: scaleY(0.45); } to { transform: scaleY(1.25); } }
.orb.thinking .orb-wave { opacity: 0.55; }
.compose.has-text .orb-wave, .composer.has-text .orb-wave { opacity: 0; transform: scale(0.4); }
@media (prefers-reduced-motion: reduce) { .orb-wave i { animation: none !important; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.12) rotate(180deg); } }
@keyframes talk { to { transform: scale(1.07); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(10, 108, 255, 0.15); } }

/* Sheet (two detents look, medium by default) */
.sheet-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.28); z-index: 40; animation: fade 0.3s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; left: 50%; bottom: 0; width: min(560px, 100%); transform: translateX(-50%); z-index: 41; background: var(--card); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border-radius: 34px 34px 0 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,0.18); animation: sheet-in 0.5s var(--spring) both; }
@keyframes sheet-in { from { transform: translate(-50%, 100%); } }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--ink-3); margin: 0 auto 12px; opacity: 0.5; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.pp-badge { font-weight: 800; font-style: italic; color: var(--pp-blue); font-size: 20px; letter-spacing: -0.02em; }
@media (prefers-color-scheme: dark) { .pp-badge { color: #fff; } }
.sheet-close { color: var(--accent); font-size: 17px; }
.sheet-merchant { margin: 16px 0 8px; font-size: 15px; color: var(--ink-2); }
.sheet-lines { border-top: 0.5px solid var(--card-line); }
.sheet-lines div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 0.5px solid var(--card-line); font-size: 15px; }
.sheet-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 6px; font-weight: 600; }
.sheet-total b { font: 700 28px/34px -apple-system, "SF Pro Display", system-ui; font-variant-numeric: tabular-nums; }
.sheet-fine { font-size: 13px; color: var(--ink-2); margin: 0 0 16px; }
.hold-btn { position: relative; width: 100%; height: 56px; border-radius: 28px; overflow: hidden; background: var(--ink); color: var(--bg); font-weight: 600; }
.hold-btn .fill { position: absolute; inset: 0; background: var(--ok); transform: scaleX(0); transform-origin: left; }
.hold-btn .label { position: relative; }
.hold-btn.holding .fill { transform: scaleX(1); transition: transform 0.9s linear; }
.hold-btn.done { background: var(--ok); }

@media (min-width: 900px) {
  .view { padding-top: 40px; }
  .large-title { font-size: 44px; line-height: 50px; }
}

/* ---------- v2: account, missions, settings ---------- */
.topbar { max-width: 660px; gap: 8px; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.back { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; margin-left: -10px; }
.back svg { width: 20px; fill: var(--accent); }
#brand { min-width: 0; }
#topTitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; border-radius: 20px; background: var(--card); font-size: 18px; display: grid; place-items: center; box-shadow: 0 1px 0 var(--card-line); }
.icon-btn.plus { color: var(--accent); font-size: 22px; }
.icon-btn.stop { color: var(--warn); font-size: 13px; }
.icon-btn.stop.on { background: var(--warn); color: #fff; }

.center { text-align: center; }
.hero-orb { width: 120px; height: 120px; margin: 24px auto 8px; border-radius: 50%; position: relative; }
.hero-orb span { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #0070e0, #7b61ff, #ff7aa8, #ffb547, #0070e0); filter: blur(2px) saturate(1.2); animation: spin 9s linear infinite, breathe 4s ease-in-out infinite; box-shadow: 0 20px 60px rgba(123, 97, 255, 0.35); }
a.cta { display: grid; place-items: center; text-decoration: none; }
.cta.paypal span::before { content: "Pay"; font-weight: 800; font-style: italic; color: var(--pp-blue); margin-right: 1px; }
.cta.paypal span::after { content: ""; }
.cta.paypal span { font-weight: 600; }
.cta.paypal span:first-child::before { content: none; }

.group-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3); margin: 26px 16px 8px; }
.group { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 0 16px; margin-bottom: 8px; }
.group .row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 0; border-bottom: 0.5px solid var(--card-line); }
.group .row:last-child { border-bottom: 0; }
.group .row.col { flex-direction: column; align-items: stretch; }
.group .row label { color: var(--ink-2); font-size: 15px; margin-right: auto; }
.group .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.group .grow small, .hint { color: var(--ink-3); font-size: 13px; line-height: 18px; }
.hint { margin: 8px 4px 0; }
.field { display: flex; align-items: center; gap: 12px; min-height: 50px; border-bottom: 0.5px solid var(--card-line); }
.field:last-child { border-bottom: 0; }
.field span { width: 44%; color: var(--ink-2); font-size: 15px; flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; text-align: right; }
.segmented.wide { width: 100%; }
.segmented.wide button { flex: 1; padding: 8px 4px; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 16px; background: var(--card-line); transition: background 0.25s var(--smooth); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25); transition: transform 0.3s var(--spring); }
.switch input:checked + i { background: var(--ok); }
#sStop:checked + i { background: var(--warn); }
.switch input:checked + i::after { transform: translateX(20px); }
.link { color: var(--accent); font-size: 16px; }
.link.danger { color: var(--warn); }
.link.add { display: block; margin: 10px 16px 0; }
.pp-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--pp-blue); color: #fff; font-weight: 800; font-style: italic; display: grid; place-items: center; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 10px; }
.tag.ok { color: var(--ok); background: rgba(25, 164, 99, 0.1); }
.knows { margin: 0; padding: 14px 0; font: 14px/20px ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; color: var(--ink-2); }
.person { display: flex; gap: 8px; align-items: center; min-height: 50px; border-bottom: 0.5px solid var(--card-line); }
.person:last-child { border-bottom: 0; }
.person input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.person button { color: var(--warn); font-size: 20px; width: 32px; }
.promises { list-style: none; padding: 0; margin: 18px 4px 22px; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.promises b { color: var(--ink); }

.stopped-banner { background: rgba(229, 72, 77, 0.12); color: var(--warn); border-radius: var(--r-m); padding: 12px 16px; margin-bottom: 14px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stopped-banner button { color: var(--warn); font-weight: 700; }

.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(10px, calc(env(safe-area-inset-bottom) - 10px)); /* just above the home indicator, like the system tab bars */ height: 54px; border-radius: 27px; display: flex; padding: 4px; z-index: 20; touch-action: none; user-select: none; -webkit-user-select: none; }
.tabbar button { position: relative; z-index: 1; width: 88px; border-radius: 23px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 10px; font-weight: 600; letter-spacing: 0.01em; color: var(--ink-2); background: none; transition: color 0.3s var(--smooth), transform 0.3s var(--spring); }
.tabbar svg { width: 20px; height: 20px; fill: currentColor; }
.tabbar button[aria-current="page"] { color: var(--accent); }

.icon-round { width: 44px; height: 44px; border-radius: 22px; background: var(--card); display: grid; place-items: center; flex: none; }
.icon-round svg { width: 21px; fill: var(--ink-2); }
.composer { padding: 0 8px; }

.sheet.tall { max-height: calc(100% - 40px); overflow: auto; }
.sheet-head b { font-size: 17px; }
.sheet .field-card { margin-top: 14px; padding-right: 16px; padding-bottom: 54px; }
.nm-tools { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.nm-tools .mic-mini { position: static; }
.nm-preview { display: block; max-height: 140px; border-radius: 12px; margin-top: 10px; }
.photo-bubble img { display: block; max-width: 220px; border-radius: 14px; margin-top: 6px; }
.seen { font-size: 13px; color: var(--ink-3); padding: 0 6px; }
.seen::before { content: "👁  "; }

/* Activity ledger */
.view.wide { max-width: 980px; }
.ask-bar { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 14px; border-radius: 24px; background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow); }
.ask-bar svg { width: 18px; height: 18px; fill: var(--ink-3); flex: none; }
.ask-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; }
.ask-bar button { height: 36px; padding: 0 16px; border-radius: 18px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.ask-bar button:disabled { opacity: 0.6; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 6px 8px 6px 14px; border-radius: 16px; background: rgba(10, 132, 255, 0.14); color: var(--accent); font-size: 13px; font-weight: 600; animation: rise 0.35s var(--spring) both; }
.filter-chip button { width: 22px; height: 22px; border-radius: 11px; color: var(--accent); font-size: 12px; }
.ledger { margin-top: 14px; }
.ledger .led-who { display: inline-flex; align-items: center; gap: 8px; }
.ledger .led-emoji { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--card-line); font-size: 14px; line-height: 1; flex: none; }
.ledger .led-in { color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger .led-out { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ledger .led-zero { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ledger .led-ref { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--ink-3); }
.ledger .ag-grid-scrolling-rows.ag-layout-auto-height { min-height: 0 !important; } /* no empty band under a short ledger */
.ledger .ag-row { cursor: pointer; }
.ledger .chip { display: inline-block; line-height: 16px; }
.led-none { color: var(--ink-3); font-size: 14px; }
.ledger-empty { margin: 18px 4px; color: var(--ink-3); font-size: 15px; }

/* Home: greeting, one box to ask for anything, ideas, then missions by urgency */
.eyebrow, .hello { color: var(--ink-2); font-size: 15px; font-weight: 600; margin: 6px 0 -6px; }
#home .large-title { font-size: 32px; line-height: 38px; margin: 10px 0 20px; }
.compose { position: relative; padding: 14px 12px 10px 14px; border-radius: 24px; background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow); transition: border-color 0.25s var(--smooth); }
.compose:focus-within { border-color: rgba(10, 132, 255, 0.5); }
.compose textarea { display: block; width: 100%; min-height: 48px; resize: none; border: 0; outline: 0; background: none; font: 400 18px/25px -apple-system, "SF Pro Text", system-ui, sans-serif; color: var(--ink); padding: 0 2px; }
.compose textarea::placeholder { color: var(--ink-3); }
.c-bar { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.c-bar .grow { flex: 1; }
.c-tool { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--card-line); transition: background 0.2s var(--smooth); }
.c-tool svg { width: 18px; height: 18px; fill: var(--ink-2); }
.c-tool.listening { background: var(--accent); }
.c-tool.listening svg { fill: #fff; }
.budget-pill { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 8px 0 14px; border-radius: 18px; background: var(--card-line); line-height: 1; white-space: nowrap; }
.budget-pill small { font-size: 13px; color: var(--ink-3); }
.budget-pill b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.budget-pill i { font-style: normal; font-size: 12px; color: var(--accent); }
.budget-pill svg { width: 18px; height: 18px; fill: var(--ink-3); transition: transform 0.25s var(--smooth); }
.budget-pill[aria-expanded="true"] svg { transform: rotate(180deg); }
.budget-pill[aria-expanded="true"] { background: rgba(10, 132, 255, 0.14); }
.c-go { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; background: var(--accent); transition: transform 0.35s var(--spring), opacity 0.2s var(--smooth); }
.c-go svg { width: 20px; height: 20px; fill: #fff; }
.c-go:disabled { opacity: 0.28; transform: scale(0.92); }
.compose.sending .c-go { animation: breathe 0.9s ease-in-out infinite; }
.budget-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 2px 4px; animation: rise 0.3s var(--spring) both; }
.b-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.b-chips button { height: 32px; padding: 0 12px; border-radius: 16px; background: var(--card-line); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.b-chips button.on { background: var(--accent); color: #fff; }
.b-own { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--card-line); font-size: 13px; color: var(--ink-3); }
.b-own input { width: 64px; border: 0; outline: 0; background: none; font-size: 14px; font-weight: 600; text-align: right; color: var(--ink); }
.c-rule { margin: 8px 2px 0; font-size: 12px; color: var(--ink-3); }
.c-rule.error { color: var(--warn); }
.c-photo { position: relative; display: inline-block; margin: 6px 4px 0; }
.c-photo img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; display: block; }
.c-photo button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 11px; background: var(--ink); color: var(--bg); font-size: 11px; }
.section-title { font: 600 12px/16px -apple-system, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); margin: 30px 4px 10px; display: flex; align-items: center; gap: 8px; }
.section-title .count { font-weight: 600; padding: 1px 7px; border-radius: 9px; background: var(--card-line); letter-spacing: 0; }
.idea { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 11px; border-radius: 17px; background: var(--card); border: 1px solid var(--card-line); font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: border-color 0.2s var(--smooth), color 0.2s var(--smooth), transform 0.3s var(--spring); }
.idea:hover { border-color: rgba(10, 132, 255, 0.4); color: var(--ink); }
.idea:active { transform: scale(0.96); }
.row-menu { position: fixed; z-index: 40; min-width: 200px; padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); animation: rise 0.25s var(--spring) both; }
.row-menu button { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px; font-size: 15px; }
.row-menu button:hover { background: var(--card-line); }
.row-menu button.danger { color: var(--warn); }

.c-orb { width: 42px; height: 42px; border-radius: 21px; margin-left: 2px; }
.c-orb .orb-send { width: 20px; height: 20px; }
.compose.sending .c-orb .orb-core { animation: spin 0.9s linear infinite, breathe 0.9s ease-in-out infinite; }

/* In a mission: the composer is a solid material, and the conversation fades out before reaching it. */
.composer.glass { background: var(--card); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); }
.bottom-fade { position: fixed; left: 0; right: 0; bottom: 0; height: 140px; z-index: 15; pointer-events: none; background: linear-gradient(to top, var(--bg) 40%, transparent); }

/* Split: how it was computed */
.split-how { margin: 12px 0 0; border-radius: 14px; background: var(--card-line); padding: 0 12px; }
.split-how summary { list-style: none; cursor: pointer; padding: 11px 0; font-size: 14px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.split-how summary::-webkit-details-marker { display: none; }
.split-how summary::after { content: "›"; margin-left: auto; color: var(--ink-3); transition: transform 0.25s var(--smooth); }
.split-how[open] summary::after { transform: rotate(90deg); }
.split-paid { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.split-lines { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.split-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--card-line); }
.split-lines li:last-child { border-bottom: 0; }
.split-lines.people li span:last-child { font-weight: 600; }
.split-lines em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--ok); margin-left: 4px; }
.split-note { margin: 0 0 12px; font-size: 12px; color: var(--ink-3); line-height: 17px; }

/* Notifications */
.pill-btn { height: 34px; padding: 0 16px; border-radius: 17px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
#tabbar button { position: relative; }
#tabbar button[data-badge]:not([data-badge=""])::after { content: attr(data-badge); position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: #fff; font: 700 10px/16px -apple-system, system-ui, sans-serif; text-align: center; }

.card.req .chip { margin-left: auto; }
.req-reply { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); font-style: italic; }
.inbox-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }

.card.pay.refund .amt { color: var(--ok); }

/* Plan timeline */
.timeline { margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.tl-day h3 { margin: 0 0 6px; font: 600 12px/16px -apple-system, system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.tl-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--card-line); }
.tl-day .tl-item:last-child { border-bottom: 0; }
.tl-item.off { opacity: 0.45; }
.tl-item.off b { text-decoration: line-through; }
.tl-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card-line); font-size: 15px; flex: none; }
.tl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-main b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-main small { font-size: 12px; color: var(--ink-3); }
.tl-side { display: flex; align-items: center; gap: 8px; flex: none; }
.tl-amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-total { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.tl-total .over { color: var(--warn); font-weight: 600; }
.tl-bar { height: 4px; border-radius: 2px; background: var(--card-line); margin-top: 8px; overflow: hidden; }
.tl-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.6s var(--smooth); }
@media (max-width: 480px) { .tl-amt { display: none; } }

/* Payment waiting for approval, in the conversation */
.card.approve { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.card.approve.open { border-color: rgba(242, 163, 58, 0.45); }
.pp-mini { font: italic 800 13px/1 -apple-system, system-ui, sans-serif; color: #003087; background: #ffc439; padding: 7px 8px; border-radius: 9px; flex: none; }
.ap-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-main b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ap-main small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-later { display: block; width: 100%; margin-top: 10px; padding: 8px; font-size: 14px; color: var(--ink-3); background: none; }
/* Small screens: titles may take two lines instead of being cut */
.tl-main b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.large-title { text-wrap: balance; }

/* Payment card, compact */
.card.pay { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; }
.card.pay .lock { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 14px; background: var(--card-line); }
.card.pay.capture .lock { background: rgba(25, 164, 99, 0.16); color: var(--ok); }
.card.pay.hold .lock { background: rgba(242, 163, 58, 0.16); }
.card.pay.refund .lock { background: rgba(10, 132, 255, 0.14); color: var(--accent); }
.pay-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pay-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pay-top b { font-size: 15px; }
.pay-top .amt { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-what { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.pay .why { font-size: 12px; color: var(--ink-3); }
.card.pay .why i { font-style: normal; text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; font-weight: 700; }

.ledger .led-name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ledger .led-name small { font-size: 11px; color: var(--ink-3); }

@media (max-width: 720px) { .ledger .ag-cell, .ledger .ag-header-cell { padding-left: 9px; padding-right: 9px; } }

/* Welcome: everything on one screen */
#welcome { padding-top: 12px; }
#welcome .hero-orb { width: 84px; height: 84px; margin: 6px auto 18px; }
#welcome .large-title { margin: 0 0 10px; }
#welcome .lede { margin: 0 auto 22px; max-width: 30em; font-size: 16px; line-height: 23px; }
.points { list-style: none; margin: 0 0 24px; padding: 6px 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow); }
.points li { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--card-line); }
.points li:last-child { border-bottom: 0; }
.points b { font-size: 15px; display: block; }
.points small { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.pt-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(10, 132, 255, 0.12); flex: none; }
.pt-ic svg { width: 19px; height: 19px; fill: var(--accent); }

/* Receipts inside the unfolded mission bar */
.receipts { display: none; list-style: none; margin: 0 0 12px; padding: 0; max-height: 40vh; overflow: auto; }
.topbar.expanded .receipts { display: block; animation: rise 0.3s var(--spring) both; }
.receipts li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--card-line); }
.receipts li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.receipts b { font-size: 14px; }
.receipts small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.receipts .ref { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; }
.receipts .r-amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.receipts li.none { color: var(--ink-3); font-size: 13px; }

/* ===== Home v3: compact, structured, everything important within reach ===== */
#home { padding-bottom: 130px; }
#home .large-title { font-size: 28px; line-height: 34px; margin: 6px 0 16px; }
/* Ideas: one line you swipe through */
.idea-row { display: flex; flex-wrap: nowrap; gap: 8px; margin: 12px -20px 0; padding: 0 20px 4px; scroll-padding-left: 20px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.idea-row::-webkit-scrollbar { display: none; }
.idea { scroll-snap-align: start; flex: none; }
/* Missions panel */
.m-panel { margin-top: 24px; }
.m-tabs-wrap { position: sticky; top: calc(var(--top-h, 60px) - 2px); z-index: 8; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.m-tabs { position: relative; flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 14px; background: linear-gradient(rgba(118, 118, 128, 0.14), rgba(118, 118, 128, 0.14)), var(--card); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.m-tabs button { position: relative; z-index: 1; height: 34px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: color 0.25s var(--smooth); }
.m-tabs button[aria-selected="true"] { color: var(--ink); }
.m-tabs .n:empty { display: none; }
.m-tabs .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 18px; background: var(--card); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.m-tabs button[data-t="needs"] .n { background: var(--held); color: #fff; }
.m-tabs-pill { position: absolute; top: 4px; left: 4px; height: 34px; border-radius: 10px; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px var(--card-line); transition: transform 0.4s var(--spring), width 0.4s var(--spring); }
.m-find { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(rgba(118, 118, 128, 0.14), rgba(118, 118, 128, 0.14)), var(--card); flex: none; }
.m-find svg { width: 18px; height: 18px; fill: var(--ink-2); }
.m-search { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.m-search input { flex: 1; height: 42px; padding: 0 14px; border-radius: 14px; border: 0; outline: 0; background: var(--card-line); font-size: 16px; }
.m-search button { color: var(--accent); font-size: 15px; }
/* Notifications: one slim line */
.push-ask { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 10px 12px; border-radius: 14px; background: rgba(10, 132, 255, 0.1); font-size: 14px; font-weight: 500; animation: rise 0.4s var(--spring) both; }
.push-ask .grow { flex: 1; min-width: 0; }
.push-bell { width: 18px; height: 18px; fill: var(--accent); flex: none; }
.push-ask .link { font-weight: 600; font-size: 14px; }
.push-x { width: 24px; height: 24px; border-radius: 12px; color: var(--ink-3); font-size: 11px; }
/* The list: one rounded container, compact rows */
.m-list { margin-top: 8px; }
.m-list.slide-l { animation: slideL 0.35s var(--spring) both; }
.m-list.slide-r { animation: slideR 0.35s var(--spring) both; }
@keyframes slideL { from { opacity: 0; transform: translateX(28px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-28px); } }
.m-rows { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); overflow: hidden; }
.m-rows.faded { margin-top: 8px; opacity: 0.75; }
.m-row { display: flex; align-items: center; gap: 12px; padding: 11px 6px 11px 14px; cursor: pointer; position: relative; transition: background 0.15s var(--smooth); }
.m-row + .m-row::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 1px; background: var(--card-line); }
.m-row:hover { background: rgba(127, 127, 127, 0.06); }
.m-row:active { background: rgba(127, 127, 127, 0.12); }
.m-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card-line); font-size: 18px; flex: none; }
.m-txt { flex: 1; min-width: 0; }
.m-l1 { display: flex; align-items: baseline; gap: 8px; }
.m-l1 b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-l1 time { font-size: 12px; color: var(--ink-3); flex: none; }
.m-l2 { display: flex; align-items: baseline; gap: 8px; margin-top: 1px; }
.m-line { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-line.needs { color: var(--held); font-weight: 500; }
.m-line.working { color: var(--accent); }
.m-line.working::after { content: "…"; animation: caret 1.2s steps(1) infinite; }
.m-left { font-size: 12px; color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.m-more { width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; flex: none; color: var(--ink-3); }
.m-more svg { width: 16px; height: 16px; fill: currentColor; }
.m-more:hover { background: var(--card-line); color: var(--ink); }
.m-empty { margin: 0; padding: 22px 16px; border-radius: 18px; border: 1px dashed var(--card-line); text-align: center; color: var(--ink-3); font-size: 14px; }
.m-archived-toggle { display: block; margin: 12px auto 0; font-size: 13px; font-weight: 600; color: var(--ink-3); }

/* ===== Images in the conversation ===== */
.attach-tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 21; width: min(560px, calc(100% - 24px)); display: flex; gap: 8px; padding: 8px; border-radius: 20px; background: var(--card); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); border: 1px solid var(--card-line); box-shadow: var(--shadow); overflow-x: auto; animation: rise 0.3s var(--spring) both; }
.tray-item { position: relative; flex: none; }
.tray-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; display: block; cursor: zoom-in; }
.tray-item button { position: absolute; top: -5px; right: -5px; width: 22px; height: 22px; border-radius: 11px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 10px; border: 2px solid var(--card); }
.tray-add { flex: none; width: 64px; height: 64px; border-radius: 12px; border: 1.5px dashed var(--card-line); color: var(--ink-3); font-size: 24px; }
.composer { height: auto !important; min-height: 64px; align-items: flex-end !important; padding-top: 8px !important; padding-bottom: 8px !important; }
.composer form { align-self: center; }
.composer textarea { flex: 1; width: 100%; border: 0; outline: 0; background: none; resize: none; font: 400 17px/22px -apple-system, "SF Pro Text", system-ui, sans-serif; color: var(--ink); max-height: 140px; padding: 0; display: block; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer .icon-round, .composer .orb { align-self: flex-end; }
body.dropping #live::after { content: "Drop photos to add them"; position: fixed; inset: 12px; border: 2px dashed var(--accent); border-radius: 24px; display: grid; place-items: center; font-size: 17px; font-weight: 600; color: var(--accent); background: rgba(10, 132, 255, 0.06); z-index: 30; pointer-events: none; }
/* Your messages with photos */
.say.user.with-images { padding: 4px; }
.say.user.images-only { background: none; padding: 0; }
.u-imgs { display: grid; gap: 3px; border-radius: 16px; overflow: hidden; }
.u-imgs.n1 { grid-template-columns: 1fr; max-width: 260px; }
.u-imgs.n2 { grid-template-columns: 1fr 1fr; width: 260px; }
.u-imgs.n3, .u-imgs.n4 { grid-template-columns: 1fr 1fr; width: 260px; }
.u-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; aspect-ratio: 1; }
.u-imgs.n1 img { aspect-ratio: auto; max-height: 320px; }
.u-imgs.n3 img:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.say.user.with-images .u-text { padding: 7px 10px 5px; }
.u-legacy { font-size: 14px; opacity: 0.85; }
/* Structured replies */
.say-text.md p { margin: 0 0 8px; }
.say-text.md p:last-child { margin-bottom: 0; }
.say-text.md ul, .say-text.md ol { margin: 4px 0 8px; padding-left: 20px; }
.say-text.md li { margin: 3px 0; }
.say-text.md b { font-weight: 650; }
.say-text.md code { font: 14px ui-monospace, "SF Mono", Menlo, monospace; background: var(--card-line); padding: 1px 5px; border-radius: 6px; }
.say-text.md a { color: var(--accent); }
/* Image viewer */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.96); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); display: flex; flex-direction: column; animation: fade 0.2s ease both; }
@keyframes fade { from { opacity: 0; } }
.lb-bar { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.lb-bar button, .lb-bar a { height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; }
.lb-bar #lbClose { width: 36px; padding: 0; justify-content: center; }
.lb-stage { flex: 1; overflow: auto; display: grid; place-items: center; touch-action: pinch-zoom; padding: 12px; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 8px; cursor: zoom-in; transition: transform 0.25s var(--smooth); }
.lb-stage.zoomed { place-items: start; }
.lb-stage.zoomed img { max-width: none; max-height: none; width: 200%; cursor: zoom-out; }
body.no-scroll { overflow: hidden; }
.qr-box img { cursor: zoom-in; }

/* Liquid Glass lens under the current tab: it slides with a spring, and follows your finger when you drag along the bar. */
.tab-lens { position: absolute; z-index: 0; top: 4px; left: 0; width: 88px; height: 46px; border-radius: 23px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.22));
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6), 0 6px 16px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(4px) saturate(220%) brightness(1.06); backdrop-filter: blur(4px) saturate(220%) brightness(1.06);
  transition: transform 0.5s cubic-bezier(0.32, 1.45, 0.48, 1), width 0.3s var(--smooth), opacity 0.2s; will-change: transform; }
.tabbar.dragging .tab-lens { transition: transform 0.08s linear, width 0.3s var(--smooth); }
.tabbar.dragging .tab-lens, .tabbar.pressing .tab-lens { scale: 1.12; box-shadow: inset 0 1px 2px rgba(255, 255, 255, 1), inset 0 0 0 0.5px rgba(255, 255, 255, 0.7), 0 10px 26px rgba(0, 0, 0, 0.18); }
.tab-lens { transition-property: transform, width, opacity, scale, box-shadow; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tab-lens { background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 6px 18px rgba(0, 0, 0, 0.35); }
}
@media (prefers-reduced-motion: reduce) { .tab-lens { transition: none; } }

/* ===== Conversation, compact: one line per card, unfold on tap ===== */
.feed .card { padding: 0; overflow: hidden; }
.feed .card > header, .feed .card.fold > header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 52px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.feed .card > header .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.feed .card > header > div { flex: 1; min-width: 0; }
.feed .card > header b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.feed .card > header small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chev { width: 18px; height: 18px; flex: none; margin-left: 2px; background: currentColor; color: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.3s var(--spring); }
.fold.open > header .chev, .steps.open .chev { transform: rotate(90deg); }
.fold-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--smooth); }
.fold.open > .fold-body, .steps.open > .fold-body { grid-template-rows: 1fr; }
.fold-inner { overflow: hidden; min-height: 0; }
.fold.open > .fold-body > .fold-inner { padding: 0 12px 12px; }
.fold > .fold-body > .fold-inner > :first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .fold-body, .chev { transition: none; } }
/* Steps */
.feed > li.steps { animation: none; }
.steps-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; font-size: 13px; color: var(--ink-3); background: none; text-align: left; max-width: 100%; }
.steps-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-dot { width: 6px; height: 6px; border-radius: 3px; background: currentColor; opacity: 0.7; flex: none; }
.steps:not(.closed-group) .steps-dot { background: var(--accent); opacity: 1; animation: breathe 1s ease-in-out infinite; }
.steps:not(.multi) .chev, .steps:not(.closed-group) .chev { display: none; }
.steps-list { list-style: none; margin: 0; padding: 4px 0 2px 18px; }
.steps-list li { font-size: 12.5px; color: var(--ink-3); padding: 2px 0; }
.steps-list li.seen { color: var(--ink-2); }
/* Payment line */
.card.pay > header .lock { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.card.pay > header .pay-main b { font-size: 14px; }
.card.pay > header .amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.pay-detail p { margin: 0; font-size: 13px; color: var(--ink-2); }
.pay-detail .why { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
/* Places, plan, request, negotiation bodies */
.place-map { margin: 0 0 4px; height: 190px; border-radius: 12px; }
.place-list { margin: 4px -8px 0; }
.card.req .chip { margin-left: auto; flex: none; }
.card.req .fold-inner p { margin: 0 0 4px; font-size: 13px; color: var(--ink-2); }
.card.nego .shield { flex: none; }
.timeline { margin-top: 0; }
/* Split: compact friend lines, icon buttons, QR opens in the viewer */
.split-how { margin: 0 0 8px; }
.split-list { margin: 0; gap: 0; border-radius: 12px; overflow: hidden; background: var(--card-line); }
.split-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 0; background: none; }
.split-row + .split-row { border-top: 1px solid var(--card); }
.split-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.split-row .who b { font-size: 14px; }
.split-row .who small { font-size: 11px; color: var(--ink-3); }
.split-row .amt { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.split-row .split-actions { display: flex; gap: 2px; margin: 0; }
.split-row .split-actions button { width: 30px; height: 30px; padding: 0; border-radius: 15px; justify-content: center; background: var(--card); }
.split-foot { margin: 8px 2px 0; }

/* ===== Settings, the iOS way: slim rows, values on the right ===== */
#settings .large-title, #activity .large-title { font-size: 28px; line-height: 34px; margin: 6px 0 14px; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); }
.avatar-lg { width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; font: 600 18px/1 -apple-system, system-ui, sans-serif; color: #fff; background: linear-gradient(135deg, #0a84ff, #7b61ff); flex: none; }
.profile-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profile-card b { font-size: 17px; }
.profile-card small { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.group-title { font-size: 12px; letter-spacing: 0.06em; margin: 22px 16px 6px; }
.group { border-radius: 16px; box-shadow: none; padding: 0 14px; margin-bottom: 6px; }
.group .row { min-height: 46px; padding: 7px 0; gap: 10px; }
.group .row label { font-size: 15px; color: var(--ink); }
.group .grow b { font-size: 15px; font-weight: 500; }
.group .grow small, .hint { font-size: 12px; line-height: 16px; }
.pp-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; flex: none; }
.group .stepper { gap: 2px; }
.group .stepper button { width: 28px; height: 28px; border-radius: 14px; font-size: 16px; }
.group .stepper input { width: 58px; font-size: 15px; line-height: 20px; font-weight: 600; }
.group .stepper .cur { font-size: 13px; line-height: 20px; margin-right: 2px; }
.group .segmented.wide button { padding: 6px 4px; font-size: 13px; }
.group .row.col { padding: 10px 0 8px; }
.hint { margin: 6px 2px 0; }
.switch { width: 46px; height: 28px; }
.switch i::after { width: 24px; height: 24px; }
.switch input:checked + i::after { transform: translateX(18px); }
.field { min-height: 46px; }
.field span { width: 42%; font-size: 15px; color: var(--ink); }
.field input { font-size: 15px; color: var(--ink-2); }
.field input::placeholder { color: var(--ink-3); }
.person { min-height: 46px; }
.person input { font-size: 15px; }
.row-btn { display: block; width: 100%; min-height: 46px; text-align: left; font-size: 15px; color: var(--accent); background: none; }
.row-btn.danger { color: var(--warn); }
#people:not(:empty) + .row-btn { border-top: 0.5px solid var(--card-line); }
#sFresh + #sPrevious:not([hidden]) { border-top: 0.5px solid var(--card-line); }
.knows-box summary { list-style: none; display: flex; align-items: center; min-height: 46px; font-size: 15px; cursor: pointer; }
.knows-box summary::-webkit-details-marker { display: none; }
.knows-box summary::after { content: ""; margin-left: auto; width: 16px; height: 16px; background: currentColor; color: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.25s var(--spring); }
.knows-box[open] summary::after { transform: rotate(90deg); }
.knows { padding: 0 0 12px; font-size: 12.5px; line-height: 18px; }
.settings-fine { margin: 10px 16px 0; font-size: 12px; color: var(--ink-3); }
.danger-zone { margin-top: 28px; }
#sRestore:not([hidden]) + #sForget { border-top: 0.5px solid var(--card-line); }
/* ===== Activity: one strip of numbers, a slim search, the ledger ===== */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.head-link { font-size: 15px; font-weight: 600; color: var(--accent); background: none; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); }
.stat-strip div { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-strip div + div { border-left: 1px solid var(--card-line); }
.stat-strip small { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-strip b { font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-strip div:nth-child(1) b { color: var(--ink); }
.stat-strip div:nth-child(2) b { color: var(--held); }
.stat-strip div:nth-child(3) b { color: var(--accent); }
.stat-strip div:nth-child(4) b { color: var(--ok); }
@media (max-width: 480px) { .stat-strip div { padding: 9px 8px; } .stat-strip b { font-size: 14px; } }
.ask-bar { height: 42px; margin-top: 10px; padding: 0 4px 0 12px; border-radius: 14px; box-shadow: none; }
.ask-bar input { font-size: 15px; }
.ask-bar button { width: 34px; height: 34px; padding: 0; border-radius: 11px; display: grid; place-items: center; }
.ask-bar button svg { width: 18px; height: 18px; fill: #fff; }
.ask-bar.busy button { animation: breathe 0.9s ease-in-out infinite; }
.filter-chip { margin-top: 8px; }
.ledger { margin-top: 10px; }
.ledger-count { margin: 8px 4px 110px; font-size: 12px; color: var(--ink-3); }
.ledger-count small { font-size: 12px; }

.c-thumbs { display: flex; gap: 8px; padding: 8px 2px 2px; overflow-x: auto; }
.c-thumbs .tray-item img { width: 56px; height: 56px; }

/* Long unbroken strings (emails, links, references) wrap instead of leaving the screen */
.say, .say-text, .u-text, .feed .card, .feed .card *, .steps-list li, .step, .m-line, .receipts small, .pay-detail p { overflow-wrap: anywhere; word-break: break-word; }
.say.user { min-width: 0; }
.feed > li { max-width: 100%; min-width: 0; }
#live, .feed { overflow-x: clip; }

/* Place preview */
.card.preview { padding: 0; overflow: hidden; }
.pv-photos { display: flex; gap: 3px; height: 190px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pv-photos::-webkit-scrollbar { display: none; }
.pv-photos img { height: 100%; width: auto; min-width: 70%; max-width: 100%; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; flex: 1 0 auto; }
.pv-photos img:only-child { width: 100%; }
.pv-none { height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(135deg, rgba(10, 132, 255, 0.12), rgba(123, 97, 255, 0.12)); }
.pv-none span { font-size: 22px; }
.pv-none small { font-size: 12px; color: var(--ink-2); }
.pv-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 1px; }
.pv-body b { font-size: 15px; }
.pv-body small { font-size: 12px; color: var(--ink-3); }
.pv-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.pv-actions a { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.pv-actions a.pill-btn { color: #fff; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; font-size: 13px; }
.pv-src { margin: 8px 0 0; font-size: 11px; color: var(--ink-3); }

a.pv-none { text-decoration: none; color: inherit; cursor: pointer; transition: filter 0.2s var(--smooth); }
a.pv-none:hover { filter: brightness(1.06); }
.pv-none b { font-size: 14px; color: var(--accent); }

/* Reminders */
.card.reminder { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.card.reminder.done { opacity: 0.6; }
.rm-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(242, 163, 58, 0.16); font-size: 15px; flex: none; }
.rm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rm-main b { font-size: 14px; font-weight: 600; }
.rm-main small { font-size: 12px; color: var(--ink-3); }
.rm-cal { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; background: var(--card-line); color: var(--accent); flex: none; }
.rm-cal svg, .tl-cal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tl-cal { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--card-line); color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.step.due { color: var(--held); font-weight: 600; }

/* "All set" recap */
.card.wrapup { padding: 14px; border-color: rgba(25, 164, 99, 0.35); }
.wu-head { display: flex; gap: 10px; align-items: center; }
.wu-check { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 700; flex: none; }
.wu-head b { font-size: 16px; display: block; }
.wu-head small { font-size: 12px; color: var(--ink-3); }
.wu-lines { list-style: none; margin: 12px 0 0; padding: 0; }
.wu-lines li { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--card-line); font-size: 14px; }
.wu-when { flex: none; width: 112px; color: var(--ink-3); font-size: 12px; font-weight: 600; padding-top: 1px; font-variant-numeric: tabular-nums; }
.wu-what { flex: 1; min-width: 0; }
.wu-what i { font-style: normal; color: var(--ink-3); }
.wu-note, .wu-rem { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
.wu-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.wu-actions .pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; text-decoration: none; }
.wu-actions .pill-btn svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wu-change { font-size: 14px; font-weight: 600; color: var(--accent); background: none; }

/* Mission emoji in the top bar */
.top-emoji { font-size: 20px; line-height: 1; width: 28px; height: 28px; display: grid; place-items: center; flex: none; }
.brand.has-emoji .brand-mark { display: none; }
.m-ic, .top-emoji, .led-emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }

/* Memory (Settings) */
.mem-count { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.mem-group { padding-top: 2px; }
.mem-empty { margin: 0; padding: 12px 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }
.mem-row { display: flex; gap: 10px; align-items: center; min-height: 50px; padding: 7px 0; border-bottom: 0.5px solid var(--card-line); transition: opacity 0.2s, transform 0.2s; }
.mem-row.leaving { opacity: 0; transform: translateX(-8px); }
.mem-row .grow { min-width: 0; display: flex; flex-direction: column; }
.mem-row b { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.mem-row small { font-size: 11.5px; color: var(--ink-3); }
.mem-row button { color: var(--warn); font-size: 20px; width: 32px; flex: none; }
.mem-kind { flex: none; width: 58px; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; padding: 4px 0; border-radius: 7px; background: var(--card-line); color: var(--ink-2); }
.mem-kind.k-preference { background: rgba(10, 132, 255, 0.13); color: var(--accent); }
.mem-kind.k-person { background: rgba(175, 82, 222, 0.14); color: #a14fd0; }
.mem-kind.k-place { background: rgba(25, 164, 99, 0.14); color: var(--ok); }
.mem-kind.k-constraint { background: rgba(242, 163, 58, 0.16); color: #c47a12; }
.mem-add { display: flex; gap: 8px; align-items: center; min-height: 48px; }
.mem-add input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); }
.mem-add button { width: 30px; height: 30px; border-radius: 15px; background: var(--accent); color: #fff; font-size: 19px; line-height: 1; flex: none; }
.step.mem::before { content: "◆ "; color: var(--accent); font-size: 9px; vertical-align: 2px; }

/* Clash with something already planned */
.card.clash { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-color: rgba(242, 163, 58, 0.45); }
.cl-ic { width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; background: #f2a33a; color: #fff; font-weight: 800; flex: none; }
.cl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-main b { font-size: 14px; }
.cl-main small { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }
.cl-open { flex: none; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--card-line); height: 30px; padding: 0 12px; border-radius: 15px; }

/* Budget: edited in place, inside the pill; quick amounts in one thin row underneath */
.budget-pill { cursor: pointer; transition: box-shadow 0.2s, background 0.2s; }
.budget-pill .b-pen { width: 13px; height: 13px; opacity: 0.6; }
.budget-pill .b-inline { display: none; align-items: baseline; gap: 1px; }
.budget-pill.editing { box-shadow: inset 0 0 0 1.5px var(--accent); }
.budget-pill.editing #cBudget, .budget-pill.editing .b-pen, .budget-pill.editing #cBudgetAuto { display: none; }
.budget-pill.editing .b-inline { display: inline-flex; }
.b-inline .b-cur { font-weight: 600; }
.b-inline input + .b-cur { margin-left: 3px; }
.b-inline input { width: 4ch; padding: 0; border: 0; outline: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; caret-color: var(--accent); }
.budget-edit { display: flex; justify-content: flex-end; margin: 8px 0 0; padding: 0; background: none; animation: rise 0.25s var(--spring) both; }
.budget-edit .b-chips { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.budget-edit .b-chips::-webkit-scrollbar { display: none; }
.budget-edit .b-chips button { height: 28px; padding: 0 10px; border-radius: 14px; font-size: 12.5px; font-weight: 600; background: var(--card-line); flex: none; }
.budget-edit .b-chips button.on { background: var(--accent); color: #fff; }
.budget-pill[aria-expanded="true"] .b-pen { transform: none; }
.b-inline, .b-inline input { font-size: 15px; }
.budget-pill.unset #cBudget { font-weight: 500; color: var(--ink-3); }

/* ---------- Welcome v2: calm page, editorial type, the product shown working ---------- */
body.on-welcome { padding-top: env(safe-area-inset-top); }
body.on-welcome #topbar, body.on-welcome .backdrop { display: none; }
#welcome { min-height: 100svh; display: flex; flex-direction: column; padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); max-width: 460px; margin: 0 auto; }
.w-top { display: flex; align-items: center; justify-content: space-between; height: 32px; }
.w-mark { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 7px; }
.w-mark::before { content: ""; width: 18px; height: 18px; border-radius: 6px; background: var(--ink); -webkit-mask: radial-gradient(circle at 50% 50%, transparent 4px, #000 4.5px); mask: radial-gradient(circle at 50% 50%, transparent 4px, #000 4.5px); }
.w-badge { font-size: 11.5px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--card-line); padding: 4px 9px; border-radius: 999px; letter-spacing: 0.01em; }
.w-title { margin: 34px 0 12px; font-size: 32px; line-height: 36px; font-weight: 700; letter-spacing: -0.028em; }
.w-lede { margin: 0 0 26px; font-size: 16px; line-height: 23px; color: var(--ink-2); max-width: 34ch; }
.story { margin: 0; padding: 14px; border-radius: 22px; background: var(--card); border: 1px solid var(--card-line); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 50px rgba(20, 16, 8, 0.08); transition: opacity 0.4s var(--smooth); }
.story.fading { opacity: 0; }
.story-budget { display: flex; align-items: center; gap: 10px; padding: 0 2px 12px; border-bottom: 1px solid var(--card-line); }
.sb-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--card-line); overflow: hidden; }
.sb-bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--held); transition: width 0.9s var(--smooth); }
.story-budget small { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.story-steps { list-style: none; margin: 0; padding: 12px 0 0; display: flex; flex-direction: column; gap: 10px; min-height: 262px; }
.story-steps li { animation: storyIn 0.5s var(--spring) both; }
@keyframes storyIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.st-ask { align-self: flex-end; max-width: 82%; padding: 9px 13px; border-radius: 18px 18px 6px 18px; background: var(--accent); color: #fff; font-size: 14.5px; line-height: 19px; }
.st-row { display: flex; gap: 11px; align-items: center; }
.st-row div { display: flex; flex-direction: column; min-width: 0; }
.st-row b { font-size: 14.5px; font-weight: 600; line-height: 19px; }
.st-row small { font-size: 12.5px; color: var(--ink-3); line-height: 17px; }
.st-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--card-line); }
.st-ic svg { width: 16px; height: 16px; fill: var(--ink-2); }
.st-hold .st-ic { background: rgba(0, 112, 224, 0.12); }
.st-hold .st-ic svg { fill: var(--pp-sky); }
.st-deal .st-ic { background: rgba(242, 163, 58, 0.16); }
.st-deal .st-ic svg { fill: #c47a12; }
.st-done .st-ic { background: var(--ok); }
.st-done .st-ic svg { fill: #fff; }
.w-bottom { margin-top: auto; padding-top: 26px; }
.pp-btn { width: 100%; height: 54px; border-radius: 27px; background: #ffc439; color: #111; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; transition: transform 0.25s var(--spring), filter 0.2s; }
.pp-btn:active { transform: scale(0.98); filter: brightness(0.96); }
.pp-word { font-style: italic; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.pp-word i { font-style: italic; }
.pp-word i:first-child { color: #003087; }
.pp-word i:last-child { color: #0070e0; }
.w-fine { margin: 12px 4px 0; font-size: 12px; line-height: 17px; color: var(--ink-3); text-align: center; }
@media (prefers-color-scheme: dark) {
  .story { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
}
@media (max-height: 700px) { .w-title { margin-top: 20px; font-size: 28px; line-height: 32px; } .story-steps { min-height: 230px; } }

/* ---------- Identity v2: one calm surface, a real mark, drawn icons, no rainbow ---------- */
.backdrop { display: none; }
.logo { width: 100%; height: 100%; display: block; color: var(--ink); }
.brand-mark { width: 22px; height: 22px; background: none; box-shadow: none; border-radius: 0; display: inline-block; }
.w-mark::before { content: none; }
.w-mark .logo { width: 20px; height: 20px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn.plus .i { width: 22px; height: 22px; stroke-width: 2; }
.icon-btn.stop .i { width: 18px; height: 18px; }
#lbClose .i, .push-x .i { width: 18px; height: 18px; }
.tray-item button .i, .c-thumbs button .i { width: 12px; height: 12px; stroke-width: 2.4; }
.card.pay .lock .i { width: 16px; height: 16px; }
.card.pay.hold .lock { color: #c47a12; }
.pay-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-main small { font-size: 12px; color: var(--ink-3); }
.wu-check .i { width: 18px; height: 18px; stroke: #fff; stroke-width: 2.4; }
.rm-ic { color: #c47a12; }
.rm-ic .i { width: 16px; height: 16px; }
.plan-ic { background: var(--ink) !important; color: var(--bg); display: grid; place-items: center; }
.plan-ic .i { width: 16px; height: 16px; }
/* The voice button: a solid, quiet control (no rainbow sphere). */
.orb-core { background: var(--ink); animation: none !important; filter: none; }
.orb-ring { display: none; }
.orb-wave i { background: var(--bg); box-shadow: none; }
.orb.listening .orb-core { background: var(--accent); }
.orb.listening .orb-wave i { background: #fff; }
.orb.thinking .orb-core { animation: thinkPulse 1.4s ease-in-out infinite !important; }
@keyframes thinkPulse { 50% { opacity: 0.6; } }
.orb.speaking .orb-core { background: var(--accent); }
.orb.speaking .orb-wave i { background: #fff; }
.hero-orb { display: none; }
/* Home header: the date, then the screen's name, as in Apple's own apps. */
#home .eyebrow { text-transform: none; color: var(--ink-3); font-size: 14px; font-weight: 600; margin: 4px 0 -8px; }
.card.pay { display: block; }
.card.pay > header { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; }
.card.pay > header .pay-main { flex: 1; min-width: 0; }

/* An app does not zoom. On touch screens: no double-tap zoom, and inputs at 16px so iOS never zooms on focus. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
}

/* ---------- First run ---------- */
#onboard { min-height: 100svh; display: flex; flex-direction: column; padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); max-width: 460px; margin: 0 auto; }
.ob-top { display: flex; align-items: center; gap: 16px; height: 36px; }
.ob-progress { flex: 1; display: flex; gap: 5px; }
.ob-progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--card-line); transition: background 0.35s var(--smooth); }
.ob-progress i.on { background: var(--ink); }
.ob-skip { font-size: 15px; font-weight: 600; color: var(--ink-3); padding: 6px 0 6px 6px; }
.ob-step { animation: storyIn 0.45s var(--spring) both; }
.ob-title { margin: 30px 0 8px; font-size: 28px; line-height: 33px; font-weight: 700; letter-spacing: -0.025em; }
.ob-lede { margin: 0 0 22px; font-size: 15.5px; line-height: 22px; color: var(--ink-2); }
.ob-option { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); text-align: left; margin-bottom: 12px; transition: border-color 0.2s, background 0.2s; }
.ob-option > .i { width: 22px; height: 22px; color: var(--accent); flex: none; }
.ob-option span { display: flex; flex-direction: column; min-width: 0; }
.ob-option b { font-size: 15.5px; font-weight: 600; }
.ob-option small { font-size: 12.5px; color: var(--ink-3); line-height: 17px; }
.ob-option.on { border-color: rgba(25, 164, 99, 0.5); }
.ob-option.on > .i { color: var(--ok); }
.ob-field { display: flex; flex-direction: column; gap: 6px; padding: 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); }
.ob-field span { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.ob-field input { border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); padding: 0; }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ob-chip { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); font-size: 14.5px; font-weight: 500; transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.2s var(--spring); }
.ob-chip:active { transform: scale(0.96); }
.ob-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ob-bottom { margin-top: auto; padding-top: 24px; }
.ob-next { width: 100%; height: 54px; border-radius: 27px; background: var(--ink); color: var(--bg); font-size: 17px; font-weight: 600; transition: transform 0.25s var(--spring); }
.ob-next:active { transform: scale(0.98); }

/* ---------- Preferences: rows that unfold ---------- */
.group.prefs { padding-top: 0; padding-bottom: 0; }
.disc { border-bottom: 0.5px solid var(--card-line); }
.disc:last-child { border-bottom: 0; }
.disc-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 50px; text-align: left; }
.disc-ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--card-line); color: var(--accent); flex: none; }
.disc-ic .i { width: 16px; height: 16px; }
.disc-row b { font-size: 15px; font-weight: 500; flex: none; }
.disc-val { flex: 1; min-width: 0; text-align: right; font-size: 14px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-row .chev { width: 14px; height: 14px; flex: none; background: currentColor; color: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.25s var(--spring); }
.disc.open .chev { transform: rotate(90deg); }
.disc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s var(--smooth); }
.disc.open .disc-body { grid-template-rows: 1fr; }
.disc-inner { overflow: hidden; }
.disc.open .disc-inner { padding: 2px 0 14px; }
.disc-act { width: 100%; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: 12px; background: rgba(10, 132, 255, 0.1); color: var(--accent); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.disc-act .i { width: 18px; height: 18px; }
.addr { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--card-line); margin-bottom: 8px; }
.addr .i { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.addr input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; color: var(--ink); }
.addr-list { list-style: none; margin: 0; padding: 0; }
.addr-list li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 0.5px solid var(--card-line); cursor: pointer; }
.addr-list li:last-child { border-bottom: 0; }
.addr-list li .i { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.addr-list li span { display: flex; flex-direction: column; min-width: 0; }
.addr-list b { font-size: 14.5px; font-weight: 500; }
.addr-list small { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-list li.none { font-size: 13px; color: var(--ink-3); cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.chips-title { margin: 8px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
#pDietChips .chips-title { display: none; }
.disc .ob-chip { height: 32px; padding: 0 12px; font-size: 14px; border-radius: 16px; }
.ob-chip.add { border-style: dashed; color: var(--accent); }
.chip-add { width: 100%; height: 40px; border: 0; outline: 0; border-radius: 12px; background: var(--card-line); padding: 0 12px; font-size: 15px; color: var(--ink); }
/* Your people */
.people-empty { margin: 0; padding: 12px 0; font-size: 14px; color: var(--ink-3); }
.person-row { display: flex; align-items: center; gap: 12px; min-height: 54px; border-bottom: 0.5px solid var(--card-line); }
.p-av { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; background: var(--card-line); font-size: 13px; font-weight: 700; color: var(--ink-2); flex: none; }
.person-row .grow { display: flex; flex-direction: column; min-width: 0; }
.person-row b { font-size: 15px; font-weight: 500; }
.person-row small { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row button { color: var(--ink-3); width: 32px; height: 32px; display: grid; place-items: center; }
.person-row button .i { width: 15px; height: 15px; }
.person-add { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-bottom: 0.5px solid var(--card-line); }
.person-add input { height: 40px; border: 0; outline: 0; border-radius: 12px; background: var(--card-line); padding: 0 12px; font-size: 15px; color: var(--ink); }
.person-add button { height: 40px; border-radius: 20px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; }

.ob-addr { margin-top: 6px; padding: 0 4px; }
.ob-addr li { padding: 10px 4px; }

.ob-back { width: 32px; height: 32px; margin-left: -8px; display: grid; place-items: center; color: var(--ink); border-radius: 16px; transition: opacity 0.2s; }
.ob-back .i { width: 22px; height: 22px; stroke-width: 2.2; }
.ob-back.off { opacity: 0; pointer-events: none; }
.mandate-why { margin: -4px 0 18px; padding: 12px 14px; border-radius: 14px; background: rgba(10, 132, 255, 0.1); color: var(--ink); font-size: 14.5px; line-height: 20px; }
.need-card { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(10, 132, 255, 0.1); display: flex; flex-direction: column; gap: 10px; animation: storyIn 0.4s var(--spring) both; }
.need-card p { margin: 0; font-size: 14px; line-height: 19px; color: var(--ink); }
.need-btn { align-self: flex-start; height: 36px; padding: 0 16px; border-radius: 18px; background: #ffc439; color: #111; font-size: 14.5px; font-weight: 600; }
/* The composer bar never overflows: the budget pill shrinks, the send button keeps its place. */
.c-bar { min-width: 0; }
.c-bar .budget-pill { min-width: 0; flex-shrink: 1; overflow: hidden; }
.c-bar .orb { flex: none; }
.budget-pill.auto #cBudget { color: var(--accent); }
@media (max-width: 480px) { #cBudgetAuto { display: none !important; } }

/* ---------- Voice conversation: the conversation stays; the bottom becomes a living light ---------- */
.voicebar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(190px + env(safe-area-inset-bottom)); z-index: 21; pointer-events: none; }
.smoke { position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%); mask-image: linear-gradient(to top, #000 45%, transparent 100%); }
.smoke i { position: absolute; bottom: -60px; width: 70vw; height: 200px; border-radius: 50%; filter: blur(42px); opacity: 0.75; mix-blend-mode: screen; animation: smokeDrift 9s ease-in-out infinite alternate; transition: opacity 0.6s, background 0.8s; }
.smoke i:nth-child(1) { left: -15vw; background: #0a84ff; }
.smoke i:nth-child(2) { left: 20vw; background: #5ac8fa; animation-duration: 11s; animation-delay: -3s; }
.smoke i:nth-child(3) { left: 50vw; background: #3d6bff; animation-duration: 8s; animation-delay: -5s; }
.smoke i:nth-child(4) { left: 5vw; bottom: -110px; width: 90vw; background: #a5d8ff; opacity: 0.45; animation-duration: 13s; }
.smoke i:nth-child(5) { left: 35vw; bottom: -90px; background: #7aa7ff; animation-duration: 10s; animation-delay: -7s; }
@keyframes smokeDrift { 0% { transform: translate(-6vw, 10px) scale(1); } 50% { transform: translate(4vw, -18px) scale(1.15); } 100% { transform: translate(8vw, 6px) scale(0.95); } }
@media (prefers-color-scheme: light) { .smoke i { mix-blend-mode: multiply; opacity: 0.5; } .smoke i:nth-child(4) { opacity: 0.3; } }
.voicebar[data-phase="listening"] .smoke i { animation-duration: 5s; }
.voicebar[data-phase="thinking"] .smoke i { opacity: 0.35; animation-duration: 16s; }
.voicebar[data-phase="speaking"] .smoke i:nth-child(2) { background: #ffc439; }
.voicebar[data-phase="speaking"] .smoke i:nth-child(5) { background: #ff9f6b; }
.voicebar[data-phase="speaking"] .smoke { animation: smokePulse 1.1s ease-in-out infinite; }
.voicebar[data-phase="paused"] .smoke i { opacity: 0.2; animation-play-state: paused; }
@keyframes smokePulse { 50% { filter: brightness(1.25) saturate(1.2); } }
.vb-row { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom)); width: min(560px, calc(100% - 32px)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; pointer-events: auto; }
.vb-state { justify-self: start; font-size: 13.5px; font-weight: 600; color: var(--ink); text-shadow: 0 1px 8px var(--bg); max-width: 100%; }
.vb-orb { width: 64px; height: 64px; border-radius: 32px; display: grid; place-items: center; background: var(--ink); box-shadow: 0 10px 30px rgba(10, 132, 255, 0.35); transition: background 0.3s, transform 0.25s var(--spring); }
.vb-orb:active { transform: scale(0.94); }
.voicebar[data-phase="listening"] .vb-orb { background: var(--accent); }
.voicebar[data-phase="thinking"] .vb-orb { animation: thinkPulse 1.3s ease-in-out infinite; }
.call-wave { display: flex; align-items: center; gap: 3px; height: 26px; }
.call-wave i { width: 3.5px; height: 8px; border-radius: 2px; background: var(--bg); }
.voicebar[data-phase="listening"] .call-wave i { background: #fff; animation: callWave 0.9s ease-in-out infinite alternate; }
.voicebar[data-phase="speaking"] .call-wave i { animation: callWave 0.55s ease-in-out infinite alternate; }
.call-wave i:nth-child(2) { animation-delay: -0.2s !important; }
.call-wave i:nth-child(3) { animation-delay: -0.4s !important; }
.call-wave i:nth-child(4) { animation-delay: -0.1s !important; }
.call-wave i:nth-child(5) { animation-delay: -0.3s !important; }
@keyframes callWave { from { height: 6px; } to { height: 24px; } }
.vb-end { justify-self: end; height: 36px; padding: 0 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); color: var(--warn); font-size: 15px; font-weight: 600; }
body.voice-on .bottom-fade { display: none; }
body.voice-on #feed { padding-bottom: 120px; }
.say.user.live .u-text { opacity: 0.75; }
.say.user.live .u-text::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .smoke i, .call-wave i, .voicebar .smoke { animation: none !important; } }
/* The mist breathes with the voice: --lvl (0 to 1) comes from the microphone or the agent's words. */
.voicebar { --lvl: 0; }
.smoke i { scale: calc(1 + var(--lvl) * 0.55); opacity: calc(0.4 + var(--lvl) * 0.55); transition: scale 0.12s linear, opacity 0.12s linear, background 0.8s; transform-origin: 50% 100%; }
.voicebar[data-phase="speaking"] .smoke { animation: none; filter: brightness(calc(1 + var(--lvl) * 0.35)) saturate(calc(1 + var(--lvl) * 0.3)); }
.vb-orb { box-shadow: 0 10px 30px rgba(10, 132, 255, calc(0.25 + var(--lvl) * 0.5)), 0 0 0 calc(var(--lvl) * 10px) rgba(10, 132, 255, 0.18); }
/* Real smoke (WebGL): fills the bottom, fades out upwards; the CSS glow is only the fallback. */
.smoke-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: none; -webkit-mask-image: linear-gradient(to top, #000 55%, transparent 100%); mask-image: linear-gradient(to top, #000 55%, transparent 100%); }
body.smoke-gl-on .smoke-gl { display: block; }
body.smoke-gl-on .smoke { display: none; }
.voicebar { height: calc(240px + env(safe-area-inset-bottom)); }
.vb-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.vb-end { justify-self: auto; }
.vb-mute { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--card-line); color: var(--ink); }
.vb-mute .i { width: 18px; height: 18px; }
.vb-mute .off { display: none; }
.vb-mute.muted { color: var(--ink-3); }
.vb-mute.muted .on { display: none; }
.vb-mute.muted .off { display: inline; }

/* Memory: get to know me */
.mem-talk { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; text-align: left; }
.mem-talk .grow { display: flex; flex-direction: column; min-width: 0; }
.mem-talk b { font-size: 15px; font-weight: 600; color: var(--accent); }
.mem-talk small { font-size: 12.5px; color: var(--ink-3); }
.mem-talk .chev { width: 14px; height: 14px; flex: none; background: currentColor; color: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.iv { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); animation: ivUp 0.38s var(--spring) both; }
@keyframes ivUp { from { transform: translateY(24px); opacity: 0; } }
body.iv-open { overflow: hidden; }
.iv-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; height: 54px; padding: 0 12px; border-bottom: 0.5px solid var(--card-line); }
.iv-head b { text-align: center; font-size: 16px; }
.iv-x { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; background: var(--card-line); color: var(--ink-2); }
.iv-x .i { width: 16px; height: 16px; }
.iv-feed { list-style: none; margin: 0; padding: 18px 18px 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.iv-feed li { max-width: 84%; font-size: 15.5px; line-height: 21px; animation: storyIn 0.35s var(--spring) both; }
.iv-mandat { align-self: flex-start; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--card-line); }
.iv-you { align-self: flex-end; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--accent); color: #fff; }
.iv-noted { align-self: flex-start; font-size: 12.5px !important; color: var(--ok); font-weight: 600; padding-left: 4px; }
.iv-mandat.typing { padding: 12px 16px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--ink-3); animation: thinkPulse 1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
.iv-bottom { padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.iv-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-choices:empty { display: none; }
.iv-say { display: flex; gap: 8px; align-items: center; height: 50px; padding: 0 6px 0 16px; border-radius: 25px; background: var(--card); border: 1px solid var(--card-line); }
.iv-say input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.iv-say button { width: 38px; height: 38px; border-radius: 19px; background: var(--accent); display: grid; place-items: center; flex: none; }
.iv-say button svg { width: 18px; height: 18px; fill: #fff; }
.iv-done { height: 44px; padding: 0 22px; border-radius: 22px; background: var(--ink); color: var(--bg); font-size: 16px; font-weight: 600; }
/* People: cancel */
.pa-actions { display: flex; gap: 8px; }
.pa-actions button { flex: 1; }
.pa-cancel { height: 40px; border-radius: 20px; background: var(--card-line) !important; color: var(--ink) !important; font-size: 15px; font-weight: 600; }
/* Location state */
.loc-ok { color: var(--ok); display: grid; place-items: center; }
.loc-ok .i { width: 20px; height: 20px; stroke-width: 2.2; }
.m-rename { flex: 1; min-width: 0; font: inherit; font-size: 15.5px; font-weight: 600; color: var(--ink); background: var(--card-line); border: 0; outline: 2px solid var(--accent); border-radius: 8px; padding: 3px 8px; margin: -3px 0; }
.ob-chip.skip { color: var(--ink-3); border-style: dashed; }
/* Page titles live in the top bar now: pages start with their content. */
.page-head { justify-content: flex-end; margin-top: 0; min-height: 0; }
#home .eyebrow { margin: 2px 0 12px; }

/* Account: one card in Settings, one page behind it */
.account-open { width: 100%; text-align: left; cursor: pointer; }
.account-open .grow { display: flex; flex-direction: column; min-width: 0; }
.account-open small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-open .chev { width: 14px; height: 14px; flex: none; background: currentColor; color: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.acct-back { display: flex; align-items: center; gap: 2px; color: var(--accent); font-size: 16px; justify-self: start; margin-left: -6px; }
.acct-back .i { width: 22px; height: 22px; stroke-width: 2.2; }
.acct .iv-head { grid-template-columns: 1fr auto 1fr; }
.acct-body { flex: 1; overflow-y: auto; padding: 8px 20px 40px; }
.acct-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 8px; text-align: center; }
.avatar-xl { width: 76px; height: 76px; border-radius: 38px; display: grid; place-items: center; font: 600 28px/1 -apple-system, system-ui, sans-serif; color: #fff; background: linear-gradient(135deg, #5e9bff, #3a6bf0); margin-bottom: 6px; }
.acct-hero b { font-size: 21px; }
.acct-hero small { font-size: 14px; color: var(--ink-3); }
.acct-note { margin: 0; padding: 0 0 12px; font-size: 13px; line-height: 18px; color: var(--ink-3); }
.acct .row-btn.danger { width: 100%; margin: 4px 0 6px; }
.acct-sign { margin: 4px 0 6px; }

.avatar-edit { position: relative; border-radius: 50%; }
.avatar-cam { position: absolute; right: -2px; bottom: 4px; width: 28px; height: 28px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--card-line); color: var(--accent); box-shadow: var(--shadow); }
.avatar-cam .i { width: 15px; height: 15px; }
.avatar-lg.photo, .avatar-xl.photo { background-size: cover; background-position: center; color: transparent; }
.link.small { font-size: 13.5px; margin: 2px 0 4px; }

.card.suggest { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-color: rgba(10, 132, 255, 0.35); }
.sg-main { display: flex; flex-direction: column; gap: 2px; }
.sg-main b { font-size: 14.5px; }
.sg-main small { font-size: 13px; color: var(--ink-2); line-height: 18px; }
.sg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.sg-actions button { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 14px; font-weight: 600; }
.sg-later { color: var(--ink-3); }
.sg-go { background: var(--accent); color: #fff; }
.iv-go { align-self: flex-end; height: 38px; padding: 0 18px; border-radius: 19px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; animation: storyIn 0.3s var(--spring) both; }
.iv-choices .ob-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* What Mandat knows: a profile, not a log */
.mem-group .mem-talk + .mem-talk { border-top: 0.5px solid var(--card-line); }
.kn-edit { justify-self: end; font-size: 16px; }
.kn-loading { display: grid; place-items: center; padding: 60px 0; }
.kn-summary { margin: 14px 4px 4px; font-size: 16px; line-height: 22px; color: var(--ink-2); }
.kn-person { background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; padding: 12px 14px 6px; margin-bottom: 10px; }
.kn-person header { display: flex; gap: 12px; align-items: center; padding-bottom: 6px; }
.kn-person header b { display: block; font-size: 16px; }
.kn-person header small { font-size: 13px; color: var(--ink-3); }
.kn-lines { list-style: none; margin: 0; padding: 0; }
.kn-lines.group { background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; padding: 4px 14px; }
.kn-line { display: flex; align-items: center; gap: 10px; min-height: 42px; border-top: 0.5px solid var(--card-line); font-size: 15px; transition: opacity 0.2s, transform 0.2s; }
.kn-lines.group .kn-line:first-child { border-top: 0; }
.kn-line span { flex: 1; min-width: 0; }
.kn-line.leaving { opacity: 0; transform: translateX(-8px); }
.kn-x { display: none; width: 28px; height: 28px; border-radius: 14px; place-items: center; background: rgba(229, 72, 77, 0.12); color: var(--warn); flex: none; }
.kn-x .i { width: 13px; height: 13px; stroke-width: 2.4; }
.editing .kn-x { display: grid; }
.kn-talk { width: 100%; margin-top: 14px; color: var(--accent); }
.kn-empty { text-align: center; padding: 50px 10px; }
.kn-empty b { font-size: 19px; }
.kn-empty p { color: var(--ink-3); font-size: 15px; margin: 6px 0 20px; }
.kn-go { background: var(--accent); color: #fff; }

/* An option to decide on: the card a concierge would show */
.card.option .op-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card.option .op-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.card.option .op-what { margin: 7px 0 2px; font-size: 14px; line-height: 19px; }
.card.option .op-hl { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.card.option .op-hl li { font-size: 13px; color: var(--ink-2); padding-left: 14px; position: relative; }
.card.option .op-hl li::before { content: ''; position: absolute; left: 3px; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.card.option .op-cond { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.card.option .op-actions button { height: 32px; padding: 0 14px; border-radius: 16px; font-size: 13px; font-weight: 600; }
.card.option .op-no { background: var(--chip, rgba(120, 120, 128, 0.14)); color: var(--ink); }
.card.option.answered .op-actions button { opacity: 0.45; pointer-events: none; }
/* Ready answers under a question */
.feed > li.choices { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 0 4px; }
.choice { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--card-line); background: var(--card); color: var(--accent); font-size: 14px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice:active { transform: scale(0.97); }
/* Where it is, on the deposit and approval cards */
.pay-photo { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; margin-bottom: 6px; cursor: zoom-in; }
.pay-addr a { color: var(--accent); text-decoration: none; font-size: 13px; }
.ap-addr { display: block; color: var(--ink-3); }

/* Your face at the top of Missions */
.me-btn { padding: 0; overflow: hidden; }
.me-av { width: 36px; height: 36px; border-radius: 18px; display: grid; place-items: center; font: 600 14px/1 -apple-system, system-ui, sans-serif; color: #fff; background: linear-gradient(135deg, #5e9bff, #3a6bf0) center / cover no-repeat; }
.me-av.photo { background-size: cover; background-position: center; }

.card.option .op-route { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.card.option a.uber { background: #000; color: #fff; }

/* Mission state in the top bar: live or paused, never ambiguous */
.mstate { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 11px; border-radius: 16px; background: rgba(52, 199, 89, 0.12); color: #1f9d48; font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; transition: background 0.25s, color 0.25s; }
.mstate .i { width: 14px; height: 14px; }
.mstate .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #34c759; box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); animation: livePulse 1.6s ease-out infinite; }
.mstate.paused { background: rgba(255, 159, 10, 0.16); color: #c26a00; }
.mstate.gone { display: none; }
.mstate:active { transform: scale(0.96); }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); } }
@media (prefers-color-scheme: dark) { .mstate { color: #4cd964; } .mstate.paused { color: #ffb340; } }

/* What scrolls under the top bar fades and blurs away, up to the status bar: never sharp text behind it */
.top-fade {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9; pointer-events: none;
  height: calc(var(--top-h, 64px) + env(safe-area-inset-top) + 6px);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent 100%);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent);
}
body.on-welcome .top-fade { display: none; }

/* Booking card, folded to one line */
.card.option { padding: 0; overflow: hidden; }
.card.option > header { display: flex; align-items: center; gap: 11px; padding: 10px 12px; cursor: pointer; }
.op-thumb { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; flex: none; background: var(--chip, rgba(120,120,128,0.14)); display: grid; place-items: center; font-size: 22px; }
.op-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.op-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-main small { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.option .op-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.card.option .op-photos { height: 150px; }
.card.option .op-hero { width: 100%; height: 160px; object-fit: cover; display: block; cursor: zoom-in; }
.op-body { padding: 10px 12px 12px; }
.op-place { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 19px; }
.op-place a { color: var(--accent); text-decoration: none; }
.op-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.op-actions .pill-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; font-size: 13px; color: #fff; text-decoration: none; }
/* The best places of a city: a row of tiles in one card */
.card.top { padding: 12px 0 12px; overflow: hidden; }
.tp-head { padding: 0 14px 8px; display: flex; flex-direction: column; }
.tp-head b { font-size: 15px; }
.tp-head small { font-size: 12px; color: var(--ink-3); }
.tp-row { display: flex; gap: 9px; overflow-x: auto; padding: 0 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tp-row::-webkit-scrollbar { display: none; }
.tp-tile { flex: 0 0 132px; scroll-snap-align: start; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 0; background: none; border-radius: 12px; }
.tp-tile img, .tp-tile .tp-ph { width: 132px; height: 92px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; font-size: 26px; background: var(--chip, rgba(120,120,128,0.14)); }
.tp-tile b { font-size: 13px; line-height: 16px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-tile small { font-size: 12px; color: var(--ink-2); }
.tp-tile small i { font-style: normal; color: var(--ink-3); }
.tp-tile.on img, .tp-tile.on .tp-ph { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.tp-detail { margin: 12px 14px 0; border-top: 0.5px solid var(--card-line); padding-top: 12px; animation: rise 0.25s var(--spring) both; }
.tp-detail img { width: 100%; height: 170px; object-fit: cover; border-radius: 12px; display: block; cursor: zoom-in; }
.tp-info { display: flex; flex-direction: column; gap: 1px; margin-top: 8px; }
.tp-info b { font-size: 15px; }
.tp-info small { font-size: 12.5px; color: var(--ink-3); }

/* Keyboard open: the message bar sits right on top of it and follows it, never behind it */
body.kb-open .composer { top: var(--kb-top, auto); bottom: auto; transition: none; }
body.kb-open .tabbar { display: none; }
body.kb-open .bottom-fade { display: none; }

/* A mission is a chat: only the messages scroll; the page, the top bar and the message bar never move */
html.on-live, html.on-live body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.on-live #live { position: fixed; inset: 0; max-width: none; margin: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top) + var(--top-h, 60px) + 28px) max(20px, calc((100% - 580px) / 2)) calc(env(safe-area-inset-bottom) + 24px); }

/* A limit card: what blocks, and the way to change it */
.card.limit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.lm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lm-main b { font-size: 15px; }
.lm-main small { font-size: 12.5px; color: var(--ink-3); }
.card.limit .pill-btn { height: 32px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
.limit-link { font-size: inherit; font-weight: 600; color: var(--accent); }
.row.flash { animation: rowFlash 1.6s ease; }
@keyframes rowFlash { 0%, 100% { background: transparent; } 20%, 60% { background: rgba(10, 132, 255, 0.12); } }

/* The voice smoke behind your first words on the home screen */
.home-smoke { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: calc(300px + env(safe-area-inset-bottom)); z-index: 4; pointer-events: none; opacity: 0; transition: opacity 0.6s ease;
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent 100%); mask-image: linear-gradient(to top, #000 45%, transparent 100%); }
.home-smoke.on { opacity: 1; }

/* Still to pay: who, how much, when */
.due { margin-top: 12px; border-top: 0.5px solid var(--card-line); padding-top: 10px; }
.due-head { display: flex; justify-content: space-between; align-items: baseline; }
.due-head b { font-size: 14px; }
.due-head span { font-weight: 700; font-size: 15px; }
.due ul { list-style: none; margin: 6px 0 0; padding: 0; }
.due li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 0.5px solid var(--card-line); }
.due li:first-child { border-top: 0; }
.due li b { font-size: 13.5px; display: block; }
.due li small { font-size: 12px; color: var(--ink-3); }
.due li > span { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.due p { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.receipts .due-li { display: block; padding: 0; }

/* Real products */
.card.shop .tp-tile img.pr-img { object-fit: contain; background: #fff; padding: 6px; }
.card.shop .tp-tile small strong { color: var(--ink); }
.card.shop .tp-tile small s { color: var(--ink-3); }
.card.shop .pr-hero { object-fit: contain; background: #fff; }
.pr-gallery-wrap { position: relative; }
.pr-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; background: #fff; }
.pr-gallery::-webkit-scrollbar { display: none; }
.tp-detail .pr-gallery img { flex: 0 0 100%; width: 100%; height: 220px; object-fit: contain; border-radius: 0; scroll-snap-align: start; background: #fff; }
.pr-count { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
.lb-count { color: rgba(255, 255, 255, 0.8); font-size: 14px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.pr-offers { list-style: none; margin: 8px 0 0; padding: 0; }
.pr-offers li { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-top: 0.5px solid var(--card-line); }
.pr-offers li:first-child { border-top: 0; }
.pr-buy { height: 32px; padding: 0 14px; font-size: 13px; }

.pr-pick { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 700; color: #1f7a3d; background: rgba(52, 199, 89, 0.14); border-radius: 6px; padding: 1px 6px; margin-top: 4px; align-self: flex-start; }
.pr-look { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); font-style: italic; }
.nego-photo { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 10px; margin-bottom: 6px; cursor: zoom-in; }

/* Activity: the AG Studio dashboard fills the page between the header and the tab bar */
#activity.has-studio { max-width: 1440px; }
.studio-host { height: calc(100dvh - 190px); min-height: 520px; margin: 4px 0 12px; border-radius: 18px; overflow: hidden; }
#activity.has-studio .stat-strip, #activity.has-studio .ask-bar, #activity.has-studio .filter-chip,
#activity.has-studio #ledger, #activity.has-studio .ledger-empty, #activity.has-studio .ledger-count { display: none !important; }
@media (max-width: 719px) { .studio-host { height: calc(100dvh - 170px); margin: 0 -8px 12px; border-radius: 14px; } }

/* Agenda: the Bryntum Calendar fills the page; steps still waiting are dashed */
.calendar-host { height: calc(100dvh - 170px); min-height: 480px; margin: 8px 0 12px; border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
#agenda.view.wide { max-width: 1280px; }
.calendar-host .b-dayview .b-cal-event-wrap.mandat-pending .b-cal-event, .calendar-host .b-monthview .b-cal-event-wrap.mandat-pending .b-cal-event { border-style: dashed !important; opacity: 0.78; }
.calendar-host .b-cal-event-wrap.mandat-asked .b-cal-event { animation: mandat-asked 1.6s ease-in-out infinite; }
@keyframes mandat-asked { 50% { opacity: 0.45; } }
.agenda-note { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(10px, calc(env(safe-area-inset-bottom) - 10px)) + 66px); z-index: 21; max-width: min(520px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 14px; line-height: 19px; box-shadow: var(--shadow); }
.agenda-empty { text-align: center; color: var(--ink-2); font-size: 15px; margin: 8px 0 0; }
@media (max-width: 719px) { .calendar-host { margin: 0 -8px 12px; border-radius: 14px; height: calc(100dvh - 160px); } }
@media (max-width: 400px) { .tabbar button { width: 78px; } .tab-lens { width: 78px; } }

/* Agenda list: one clear row per booking — who, what, price, where it stands */
.calendar-host .m-ev { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 2px 0; white-space: normal; }
.calendar-host .m-ev-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.calendar-host .m-ev-title { font-weight: 650; font-size: 15px; line-height: 19px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.calendar-host .m-ev-sub { font-size: 13px; line-height: 17px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.calendar-host .m-ev-chip { flex: none; font-size: 11px; font-weight: 600; line-height: 16px; padding: 1px 7px; border-radius: 8px; }
.calendar-host .m-ev-chip.ok { color: #0f7a45; background: rgba(25, 164, 99, 0.13); }
.calendar-host .m-ev-chip.wait { color: #9a5b00; background: rgba(242, 163, 58, 0.18); }
.calendar-host .m-ev-time { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; line-height: 17px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.calendar-host .m-ev-time b { color: var(--ink); font-weight: 600; }
.calendar-host .b-agendaview .b-cal-event { background: transparent !important; color: var(--ink) !important; border-left: 3px solid var(--event-color, var(--accent)); border-radius: 4px; padding-left: 10px; height: auto !important; }
.calendar-host .b-agendaview .b-cal-event-wrap { height: auto !important; }
.calendar-host .b-agendaview .mandat-pending .b-cal-event { border: 0 !important; border-left: 3px dashed var(--held) !important; opacity: 1; }
.calendar-host .m-ev-state { font-weight: 600; }
.calendar-host .m-ev-state::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: currentColor; }
.calendar-host .m-ev-state.ok { color: #0f7a45; }
.calendar-host .m-ev-state.wait { color: #b26a00; }
@media (prefers-color-scheme: dark) { .calendar-host .m-ev-state.ok { color: #3fcf8e; } .calendar-host .m-ev-state.wait { color: #f2a33a; } }

/* ===== Activity: summary, payments, analysis ===== */
.money-sum { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); overflow: hidden; }
.money-sum div { padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.money-sum div + div { border-left: 1px solid var(--card-line); }
.money-sum small { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.money-sum b { font-size: 19px; line-height: 24px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-sum div:nth-child(2) b { color: var(--held); }
.money-sum div:nth-child(3) b { color: var(--accent); }
.money-sum div:nth-child(4) b { color: var(--ok); }
@media (max-width: 719px) {
  .money-sum { grid-template-columns: 1fr 1fr; }
  .money-sum div:nth-child(3) { border-left: 0; }
  .money-sum div:nth-child(n+3) { border-top: 1px solid var(--card-line); }
}
.analyse-open { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); text-align: left; color: var(--ink); }
.analyse-open .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.analyse-open b { font-size: 15px; font-weight: 600; }
.analyse-open small { font-size: 13px; color: var(--ink-3); }
.analyse-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(10, 108, 255, 0.12); flex: none; }
.analyse-ic svg { width: 18px; height: 18px; fill: var(--accent); }
.analyse-chev { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.analyse-open:active { background: rgba(127, 127, 127, 0.1); }
.pay-head { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-3); margin: 22px 4px 8px; }
.pay-list { list-style: none; margin: 0 0 96px; padding: 0; border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); overflow: hidden; }
.pay-day { padding: 10px 14px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: capitalize; }
.pay-day:not(:first-child) { border-top: 1px solid var(--card-line); margin-top: 2px; }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; }
.pay-row:active { background: rgba(127, 127, 127, 0.1); }
.pay-amt { flex: none; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-amt.wait { color: var(--held); }
.pay-amt.off { color: var(--ink-3); font-weight: 500; }
.pay-state.refund { color: var(--ok); }
.pay-amt.struck { color: var(--ink-3); font-weight: 500; }
.pay-amt s { text-decoration-thickness: 1.5px; }
.pay-amt, .pay-state { white-space: nowrap; }
.pay-state { flex: none; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.pay-state.ok { color: var(--ok); }
.pay-state.wait { color: var(--held); }
#activity.has-studio .pay-head, #activity.has-studio .pay-list { display: none; }
#activity.has-studio .studio-host { height: calc(100dvh - 250px); min-height: 520px; margin-top: 14px; }
/* full-screen analysis on a phone */
.analyse-sheet { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--bg); padding-top: env(safe-area-inset-top); }
.analyse-top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--card-line); }
.analyse-top b { flex: 1; font-size: 17px; }
.analyse-close { width: 34px; height: 34px; border-radius: 17px; display: grid; place-items: center; background: var(--card-line); }
.analyse-close svg { width: 16px; height: 16px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
.analyse-seg { flex: none; width: 210px; }
.analyse-body { flex: 1; min-height: 0; }
.analyse-body.loading::after { content: ""; display: block; width: 28px; height: 28px; margin: 40vh auto 0; border-radius: 50%; border: 3px solid var(--card-line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* one payment's receipt */
.receipt-sheet { padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); }
.rc-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.rc-head .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rc-head b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-head small { font-size: 13px; color: var(--ink-3); }
.rc-amount { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 2px 8px; }
.rc-amount b { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rc-amount b.struck { color: var(--ink-3); font-weight: 600; }
.rc-amount .pay-state { font-size: 14px; }
.rc-rows { margin: 0; border-radius: 14px; background: rgba(127, 127, 127, 0.06); }
.rc-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; }
.rc-rows div + div { border-top: 1px solid var(--card-line); }
.rc-rows dt { font-size: 14px; color: var(--ink-3); flex: none; }
.rc-rows dd { margin: 0; font-size: 14px; font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.rc-actions { display: flex; gap: 8px; margin-top: 16px; }
.rc-btn { flex: 1; display: grid; place-items: center; height: 46px; border-radius: 14px; font-size: 15px; font-weight: 600; background: rgba(127, 127, 127, 0.1); color: var(--ink); text-decoration: none; }
.rc-btn.primary { flex: 2; background: var(--ink); color: var(--bg); }

/* the analysis: dashboard and Mandat's assistant */
.studio-row { display: grid; grid-template-columns: 340px 1fr; gap: 12px; margin-top: 14px; height: calc(100dvh - 250px); min-height: 520px; }
.studio-row .studio-host { height: 100%; min-height: 0; margin: 0; }
#activity.has-studio .studio-host { height: 100%; margin-top: 0; }
.assistant-col { border-radius: 18px; background: var(--card); border: 1px solid var(--card-line); overflow: hidden; }
.analyse-board, .analyse-chat { height: 100%; }
.analyse-chat { background: var(--bg); }
.sc { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sc-log { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; }
.sc-hello { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 21px; }
.sc-me { align-self: flex-end; max-width: 82%; padding: 9px 14px; border-radius: 20px 20px 6px 20px; background: var(--accent); color: #fff; font-size: 16px; line-height: 22px; }
.sc-say { font-size: 16px; line-height: 24px; color: var(--ink); }
.sc-say p { margin: 0 0 6px; } .sc-say p:last-child { margin: 0; }
.sc-say ul { margin: 4px 0; padding-left: 20px; } .sc-say li { margin: 2px 0; }
.sc-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.sc-step i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.sc-step.run i { border: 2px solid var(--card-line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.sc-step.done i { background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E") center/11px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.sc-step.bad i { background: var(--warn); }
.sc-err { font-size: 14px; color: var(--warn); }
.sc-typing { display: flex; gap: 4px; padding: 6px 2px; }
.sc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: caret 1.2s ease-in-out infinite; }
.sc-typing i:nth-child(2) { animation-delay: 0.2s; } .sc-typing i:nth-child(3) { animation-delay: 0.4s; }
.sc-board { align-self: flex-start; padding: 7px 12px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--accent); background: rgba(10, 108, 255, 0.1); }
.sc-starters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.sc-starters button { padding: 8px 12px; border-radius: 16px; font-size: 14px; font-weight: 500; color: var(--ink); background: var(--card); border: 1px solid var(--card-line); }
.sc-bar { display: flex; align-items: center; gap: 8px; margin: 0 12px max(10px, calc(env(safe-area-inset-bottom) - 8px)); /* just above the home indicator */ padding: 6px 6px 6px 16px; border-radius: 26px; background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow); }
.sc-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.sc-send { width: 38px; height: 38px; border-radius: 19px; display: grid; place-items: center; background: var(--accent); flex: none; }
.sc-send:disabled { opacity: 0.4; }
.sc-send svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.assistant-col .sc-bar { box-shadow: none; margin-bottom: 12px; }
/* reading the analysis on a phone: no selection frame around a widget or a tapped cell */
.analyse-board .ag-studio-layout-widget-selected { box-shadow: none !important; }
.analyse-board .ag-cell-focus:not(.ag-cell-range-selected), .analyse-board .ag-cell-focus:focus-within { border-color: transparent !important; outline: none !important; }

body.kb-open .analyse-sheet .sc-bar { margin-bottom: 8px; }
.analyse-sheet { overscroll-behavior: contain; }

/* your people: a row opens to who they are, their sizes and style */
.person-row .p-open { flex: 1; min-width: 0; width: auto; height: auto; display: flex; align-items: center; gap: 12px; padding: 8px 0; text-align: left; color: var(--ink); }
.person-row .p-open .grow { flex: 1; }
.person-row.open .p-open small { white-space: normal; }
.person-edit { padding: 6px 0 14px 46px; border-bottom: 0.5px solid var(--card-line); }
.person-edit .chips-title:first-child { margin-top: 2px; }
.person-edit .chip-add { margin-top: 12px; width: 100%; }
.pa-rel { gap: 6px; }
#obFit .chips-title:first-child { margin-top: 0; }

/* the receipt, inside the app */
.rc-view { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; background: var(--bg); padding-top: env(safe-area-inset-top); }
.rc-view .grow { flex: 1; }
.rc-back { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 10px 0 4px; font-size: 17px; color: var(--accent); }
.rc-back svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rc-top-btn { height: 34px; padding: 0 14px; border-radius: 17px; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--card-line); }
#rcFrame { flex: 1; width: 100%; border: 0; background: #fff; padding-bottom: env(safe-area-inset-bottom); }

/* agenda: missions and pinned dates, one tap away */
.agenda-bar { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.ab-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 1px 2px; }
.ab-row::-webkit-scrollbar { display: none; }
.ab-chip, .ab-pin { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 17px; font-size: 14px; font-weight: 500; color: var(--ink); background: var(--card); border: 1px solid var(--card-line); white-space: nowrap; }
.ab-chip i { width: 8px; height: 8px; border-radius: 50%; }
.ab-chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ab-pin { background: rgba(242, 163, 58, 0.14); border-color: rgba(242, 163, 58, 0.35); }
.ab-pin b { font-weight: 650; text-transform: capitalize; }
.calendar-host .m-ev { position: relative; padding-right: 30px; }
.calendar-host .m-pin { position: absolute; right: 0; top: 2px; width: 28px; height: 28px; border-radius: 14px; font-size: 13px; line-height: 28px; text-align: center; opacity: 0.28; filter: grayscale(1); background: none; }
.calendar-host .m-ev.pinned .m-pin { opacity: 1; filter: none; }
.calendar-host .b-calendar-view-desc-text { text-transform: none !important; }

.calendar-host .b-cal-event-wrap.b-selected > .b-cal-event, .calendar-host .b-cal-event-wrap.b-active > .b-cal-event { background: rgba(10, 108, 255, 0.08) !important; color: var(--ink) !important; }

/* Recap lines unfold to show what was bought or booked */
.wu-lines li.has-pv { cursor: pointer; position: relative; padding-right: 22px; flex-wrap: wrap; }
.wu-chev { position: absolute; right: 2px; top: 14px; color: var(--ink-3); font-size: 18px; line-height: 1; transition: transform 0.2s var(--smooth); }
.wu-lines li.has-pv.open .wu-chev { transform: rotate(90deg); }
.wu-pv { display: none; flex-basis: 100%; width: 100%; margin-top: 10px; }
.wu-lines li.has-pv.open .wu-pv { display: block; animation: fade 0.2s ease both; }
.wu-pv p { margin: 4px 0; font-size: 14px; line-height: 20px; color: var(--ink-2, var(--ink)); }
.wu-pv-title { font-weight: 600; color: var(--ink) !important; }
.wu-pv-sub { color: var(--ink-3) !important; font-size: 13px !important; }
.wu-pv-link { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.wu-pics { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.wu-pics img { height: 120px; width: auto; max-width: 180px; object-fit: cover; border-radius: 10px; scroll-snap-align: start; background: var(--card-line); flex: none; }

/* Activity: payments filtered by period */
.pay-filter { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 0 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pay-filter::-webkit-scrollbar { display: none; }
.pay-filter .ob-chip { flex: none; }
.pay-more { display: block; margin: 12px auto 4px; padding: 10px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--card-line); color: var(--accent); font-weight: 600; font-size: 15px; }
