/* Tamo. Black with shades of black, or white. The only real color is the pip.
   Controls are a little raised, like soft keys; glass sits over the room. */

@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --top: env(safe-area-inset-top, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --col: min(520px, calc(100% - 28px));
  --pip: #8fd0ff;
  --dock-h: 200px;
}

/* ---------- black ---------- */
:root[data-tone="black"] {
  color-scheme: dark;
  --bg: #060607;
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.62);
  --text-3: rgba(235, 235, 245, 0.34);
  --line: rgba(255, 255, 255, 0.07);
  --glass: rgba(26, 26, 30, 0.56);
  --glass-2: rgba(36, 36, 42, 0.66);
  --edge: rgba(255, 255, 255, 0.075);
  --hi: rgba(255, 255, 255, 0.1);
  --raise-1: #25252a;
  --raise-2: #151518;
  --raise-hi: rgba(255, 255, 255, 0.12);
  --raise-lo: rgba(0, 0, 0, 0.45);
  --drop: 0 10px 26px rgba(0, 0, 0, 0.42);
  --inset: rgba(0, 0, 0, 0.32);
  --inset-edge: inset 0 1px 2px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.045);
  --card: linear-gradient(180deg, rgba(31, 31, 36, 0.86), rgba(18, 18, 21, 0.86));
  --sheet: #0e0e10;
  --sheet-edge: rgba(255, 255, 255, 0.07);
  --cta: linear-gradient(180deg, #ffffff, #d6d6dc);
  --cta-fg: #0a0a0c;
  --cta-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.12), inset 0 1px 0 #fff;
  --pos: #74e0a6;
  --warn: #ffb25e;
  --bad: #ff7a72;
  --veil: rgba(0, 0, 0, 0.55);
}

/* ---------- white ---------- */
:root[data-tone="white"] {
  color-scheme: light;
  --bg: #f4f4f6;
  --text: #0b0b0e;
  --text-2: rgba(40, 40, 52, 0.62);
  --text-3: rgba(40, 40, 52, 0.34);
  --line: rgba(10, 10, 30, 0.07);
  --glass: rgba(255, 255, 255, 0.64);
  --glass-2: rgba(255, 255, 255, 0.82);
  --edge: rgba(10, 10, 30, 0.07);
  --hi: rgba(255, 255, 255, 0.95);
  --raise-1: #ffffff;
  --raise-2: #f1f1f4;
  --raise-hi: #ffffff;
  --raise-lo: rgba(10, 10, 30, 0.06);
  --drop: 0 8px 22px rgba(20, 20, 50, 0.08);
  --inset: rgba(10, 10, 30, 0.045);
  --inset-edge: inset 0 1px 2px rgba(20, 20, 50, 0.08), inset 0 0 0 1px rgba(10, 10, 30, 0.035);
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 250, 252, 0.88));
  --sheet: #f7f7f9;
  --sheet-edge: rgba(10, 10, 30, 0.06);
  --cta: linear-gradient(180deg, #26262c, #060607);
  --cta-fg: #ffffff;
  --cta-shadow: 0 10px 24px rgba(10, 10, 30, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --pos: #12985a;
  --warn: #c76b00;
  --bad: #d43d33;
  --veil: rgba(30, 30, 45, 0.24);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; overscroll-behavior: none; }
body {
  font: 400 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; -webkit-user-select: text; user-select: text; }
input:focus { outline: none; }
:focus-visible { outline: 2px solid var(--pip); outline-offset: 2px; }
svg.i { display: block; flex: none; }
.num, .c-big, .c-v, .tx-a, .bal-v, .amt { font-variant-numeric: tabular-nums; }

/* things that look raised: soft keys with a lit top edge */
.raised, .tb, .act, .sh-x, .mini, .cta.ghost, .more, .danger, .back, .date, .tile {
  background: linear-gradient(180deg, var(--raise-1), var(--raise-2));
  box-shadow: inset 0 1px 0 var(--raise-hi), inset 0 -1px 0 var(--raise-lo), 0 0 0 1px var(--edge), var(--drop);
}

/* ---------- the room ---------- */
.room {
  --horizon: 55%;
  --wall: #ffffff; --wall-low: #fbfbfc; --seam: #f1f1f4; --floor: #f7f7f9; --floor-near: #fdfdfe;
  --corner: rgba(20, 20, 40, 0.04); --spot: rgba(255, 255, 255, 0); --aura: 0;
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 45% at 50% calc(var(--horizon) - 18%), var(--spot), transparent 70%),
    radial-gradient(130% 95% at 50% var(--horizon), transparent 55%, var(--corner) 100%),
    linear-gradient(180deg, var(--wall) 0%, var(--wall-low) calc(var(--horizon) - 30%), var(--seam) calc(var(--horizon) - 2%), var(--seam) calc(var(--horizon) + 2%), var(--floor) calc(var(--horizon) + 16%), var(--floor-near) 100%);
}
:root[data-room="dark"] .room {
  --wall: #070709; --wall-low: #0c0c10; --seam: #17171e; --floor: #0f0f14; --floor-near: #060608;
  --corner: rgba(0, 0, 0, 0.5); --spot: rgba(255, 255, 255, 0.05); --aura: 1;
}
/* a faint glow of the pip's own color on the wall behind it */
.room::after {
  content: ''; position: absolute; left: 50%; top: calc(var(--horizon) - 22%); width: 120vmin; height: 70vmin;
  transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--pip) 22%, transparent), transparent);
  opacity: calc(var(--aura) * 0.55); filter: blur(10px);
  transition: top 0.5s var(--ease);
}

#stage { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; }
.no-gl #stage { display: none; }

/* ---------- the app over the room ---------- */
.app { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.app > * { pointer-events: none; }
.top, .dock, .chat .scroll { pointer-events: auto; }
.top > *, .dock > * { pointer-events: auto; }

.top {
  position: absolute; left: 50%; transform: translateX(-50%); width: var(--col);
  top: calc(var(--top) + 10px); height: 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: opacity 0.5s ease;
}
.tb {
  height: 34px; padding: 0 13px 0 10px; border-radius: 17px;
  display: inline-flex; align-items: center; gap: 6px; font: 550 13px/1 var(--font); letter-spacing: -0.005em;
}
.tb:active, .act:active, .chip:active, .pp:active, .mini:active, .sh-x:active, .back:active { transform: scale(0.96); }
.tb, .act, .chip, .pp, .mini, .sh-x, .back, .cta { transition: transform 0.18s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s; }
.tb.me { width: 34px; padding: 0; justify-content: center; border-radius: 50%; }
.me-i { font: 600 13px/1 var(--display); }
.bal {
  position: absolute; left: 50%; transform: translateX(-50%); top: 0; height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.bal-v { font: 650 16px/1 var(--display); letter-spacing: -0.02em; transition: filter 0.3s, opacity 0.3s; }
.bal small { font: 500 10.5px/1 var(--font); color: var(--text-3); letter-spacing: 0.01em; }
.bal.hid .bal-v { letter-spacing: 0.12em; opacity: 0.7; }

/* the conversation */
.talk { position: absolute; inset: 0; }
.scroll {
  position: absolute; left: 50%; transform: translateX(-50%); width: var(--col);
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none; overscroll-behavior: contain;
}
.scroll::-webkit-scrollbar { display: none; }
.idle .scroll {
  bottom: calc(var(--dock-h) + 14px); top: auto; max-height: 30vh;
  display: flex; flex-direction: column; justify-content: flex-end; text-align: center;
}
.idle .log { padding: 0 10px 6px; }
.idle .msg.pip .say { font: 450 16px/1.45 var(--display); letter-spacing: -0.01em; text-wrap: balance; max-width: 340px; margin: 0 auto; }
.idle .msg.pip .cards { text-align: left; }
.chat .scroll {
  top: 26vh; bottom: calc(var(--dock-h) + 8px);
  display: flex; flex-direction: column;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 64px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(180deg, transparent 0, #000 64px, #000 calc(100% - 14px), transparent);
}
.chat .log { margin-top: auto; padding: 64px 0 10px; display: flex; flex-direction: column; gap: 14px; }
.log { transition: opacity 0.2s ease, transform 0.2s ease; }
.log.out { opacity: 0; transform: translateY(6px); }

.msg { animation: msgIn 0.42s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg.me { display: flex; justify-content: flex-end; }
.msg.me p {
  margin: 0; max-width: 82%; padding: 8px 13px; border-radius: 18px 18px 6px 18px;
  background: var(--glass-2); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  font: 450 15px/1.4 var(--font); -webkit-user-select: text; user-select: text;
}
.msg.pip .say { margin: 0; font: 420 15.5px/1.5 var(--font); letter-spacing: -0.008em; -webkit-user-select: text; user-select: text; }
.msg.pip .say:empty { display: none; }
.w { animation: wIn 0.38s ease both; }
.w.now { animation: none; }
@keyframes wIn { from { opacity: 0; filter: blur(5px); } }
.dots { display: inline-flex; gap: 5px; padding: 8px 0; }
.idle .dots { justify-content: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); animation: dot 1.1s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.14s; }
.dots i:nth-child(3) { animation-delay: 0.28s; }
@keyframes dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.cards { display: grid; gap: 10px; }
.cards:not(:empty) { margin-top: 14px; }

/* the dock */
.dock {
  position: absolute; left: 50%; transform: translateX(-50%); width: var(--col);
  bottom: calc(var(--bottom) + 12px);
  display: flex; flex-direction: column; gap: 8px;
  transition: opacity 0.6s ease, transform 0.6s var(--ease);
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px; margin: 0 -16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  transition: opacity 0.3s, max-height 0.4s var(--ease), margin 0.4s var(--ease);
  max-height: 42px;
}
.chips::-webkit-scrollbar { display: none; }
.chat .chips { opacity: 0; max-height: 0; margin-bottom: -8px; pointer-events: none; }
.chip {
  flex: none; height: 32px; padding: 0 12px; border-radius: 16px; white-space: nowrap;
  font: 500 13px/32px var(--font); color: var(--text-2);
  background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.chip:hover { color: var(--text); }

.ask {
  position: relative; height: 48px; border-radius: 24px; padding: 0 5px 0 16px;
  display: flex; align-items: center; gap: 9px;
  background: var(--glass-2); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), var(--drop);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  transition: box-shadow 0.3s;
}
.ask.focus { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px color-mix(in srgb, var(--pip) 45%, var(--edge)), 0 0 0 5px color-mix(in srgb, var(--pip) 10%, transparent), var(--drop); }
/* thinking: a slow ring of the pip's color runs around the bar */
.ask::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--a, 0deg), transparent 0 55%, color-mix(in srgb, var(--pip) 90%, #fff) 75%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity 0.4s;
}
.thinking .ask::before { opacity: 1; animation: spin 1.6s linear infinite; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.ask-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff, var(--pip) 55%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pip) 70%, transparent);
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(0.8); opacity: 0.75; } }
.ask input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; font: 420 16px/1 var(--font); letter-spacing: -0.005em; }
.ask input::placeholder { color: var(--text-3); }
.ask-go, .ask-mic, .ask-end { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ask-go { background: var(--cta); color: var(--cta-fg); box-shadow: var(--cta-shadow); transform: scale(0.4); opacity: 0; pointer-events: none; transition: transform 0.3s var(--spring), opacity 0.2s; position: absolute; right: 5px; }
.ask.has .ask-go, .ask:not(.can-mic) .ask-go { transform: none; opacity: 1; pointer-events: auto; position: static; }
.ask:not(.can-mic):not(.has) .ask-go { opacity: 0.35; pointer-events: none; }
.ask.has .ask-mic { display: none; }
.ask-mic { color: var(--text-2); }
.ask.rec .ask-mic { color: var(--cta-fg); background: var(--pip); animation: breathe 1.2s ease-in-out infinite; }
.ask-end { width: 28px; height: 28px; margin-left: -8px; color: var(--text-2); background: var(--inset); display: none; }
.chat .ask-end { display: grid; }
.chat .ask-dot { display: none; }

.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act {
  height: 48px; border-radius: 24px; display: flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 15px/1 var(--font); letter-spacing: -0.01em;
}
.act.pri { background: var(--cta); color: var(--cta-fg); box-shadow: var(--cta-shadow); }

/* zoomed out to the studio: the app steps aside; zoomed in: it stays */
.top, .talk { transition: opacity 0.45s ease; }
.zoom-out .top, .zoom-out .dock, .zoom-out .talk { opacity: 0; pointer-events: none !important; }
.zoom-out .top *, .zoom-out .dock *, .zoom-out .talk * { pointer-events: none !important; }
.recenter {
  position: fixed; left: 50%; z-index: 3; top: calc(var(--top) + 58px);
  height: 36px; min-width: 36px; padding: 0 11px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 13px/1 var(--font); color: var(--text);
  background: var(--glass-2); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), var(--drop);
  -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  opacity: 0; pointer-events: none; transform: translate(-50%, -8px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s var(--spring), top 0.45s var(--ease);
}
.zoom-in .recenter, .zoom-out .recenter { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.zoom-out .recenter { top: auto; bottom: calc(var(--bottom) + 22px); padding: 0 15px 0 12px; height: 40px; border-radius: 20px; }
.sheet-open .recenter { opacity: 0; pointer-events: none; }

/* first visit: only the room and the egg */
.egg .dock, .egg .top { opacity: 0; pointer-events: none; }
.egg .dock { transform: translate(-50%, 24px); }
.egg .top *, .egg .dock * { pointer-events: none !important; }

/* ---------- cards ---------- */
.card {
  border-radius: 20px; padding: 14px 14px 12px; text-align: left;
  background: var(--card); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), 0 16px 40px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
}
:root[data-tone="white"] .card { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), 0 14px 34px rgba(20, 20, 50, 0.07); }
.card.enter { animation: cardIn 0.55s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.card.nudge { animation: spot 0.7s var(--ease); }
@keyframes spot { 35% { transform: scale(1.025); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pip) 45%, transparent); } }
.c-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.c-k { font: 550 12.5px/1.3 var(--font); color: var(--text-2); }
.c-delta { font: 500 12px/1.3 var(--font); color: var(--text-2); text-align: right; white-space: nowrap; }
.c-delta.good { color: var(--pos); }
.c-big { font: 650 28px/1.1 var(--display); letter-spacing: -0.03em; margin: 6px 0 2px; }
.c-big small { font: 500 14px/1 var(--font); color: var(--text-2); letter-spacing: 0; }
.c-sub { font: 450 12.5px/1.4 var(--font); color: var(--text-2); }
.c-bar { display: flex; gap: 3px; height: 6px; margin: 12px 0 4px; }
.c-bar i { border-radius: 4px; min-width: 3px; background: color-mix(in srgb, var(--text) calc(var(--o) * 78%), transparent); }
.c-bar i:first-child, .dot.first { background: var(--pip); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; background: color-mix(in srgb, var(--text) calc(var(--o) * 78%), transparent); }
.c-rows .dot:first-child { }
.c-rows li:first-child .dot { background: var(--pip); }
.c-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.c-rows li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font: 450 14px/1.3 var(--font); }
.c-rows li:first-child { border-top: 0; }
.c-n { flex: 1; min-width: 0; }
.c-n small { display: block; font: 450 12px/1.3 var(--font); color: var(--text-2); margin-top: 2px; }
.c-v { font-weight: 550; white-space: nowrap; }
.c-rows li.off { opacity: 0.45; }
.c-rows li.off .c-v { text-decoration: line-through; }
.wf li { padding: 8px 0; color: var(--text-2); }
.wf li .c-v { color: var(--text); font-weight: 500; }
.wf li.this { color: var(--text); }
.wf li.this .c-v { font-weight: 650; }
.pill { font: 600 12px/1 var(--font); padding: 6px 10px; border-radius: 12px; white-space: nowrap; }
.v-yes .pill { color: var(--pos); background: color-mix(in srgb, var(--pos) 14%, transparent); }
.v-tight .pill { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.v-no .pill { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.v-no .c-big { color: var(--bad); }
.date { width: 36px; height: 38px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.date b { font: 650 14px/1 var(--display); }
.date small { font: 550 10px/1 var(--font); color: var(--text-2); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.04em; }
.mini { height: 28px; padding: 0 11px; border-radius: 14px; font: 550 12px/1 var(--font); flex: none; }
.mini.warn { color: var(--warn); }
.c-who { display: flex; align-items: center; gap: 12px; }
.c-who b { display: block; font: 600 15px/1.2 var(--font); }
.c-who small { font: 450 12.5px/1.2 var(--font); color: var(--text-2); }
.c-blob { flex: none; display: grid; place-items: center; }
.you-dot { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--pip) 50%, color-mix(in srgb, var(--pip) 70%, #000)); transform: scale(0.72); }
.c-pay .c-big { font-size: 36px; margin-top: 12px; }
.c-pay .c-sub { margin-bottom: 12px; }
.c-pay.sent .c-sub::before { content: 'Sent. '; color: var(--pos); font-weight: 600; }
.c-split .cta, .c-pay .cta { margin-top: 12px; }
.meter { padding: 12px 0 2px; border-top: 1px solid var(--line); }
.meter:first-of-type { border-top: 0; }
.c-head + .meter { margin-top: 6px; }
.m-top { display: flex; justify-content: space-between; font: 500 14.5px/1.3 var(--font); }
.m-top small { color: var(--text-2); font-weight: 450; }
.m-bar { height: 6px; border-radius: 3px; background: var(--inset); box-shadow: var(--inset-edge); margin: 9px 0 7px; overflow: hidden; }
.m-bar i { display: block; height: 100%; border-radius: 3px; background: var(--text); transition: width 0.8s var(--ease); }
.meter small { font: 450 12.5px/1.2 var(--font); color: var(--text-2); }
.meter.near .m-bar i { background: var(--warn); }
.meter.over .m-bar i { background: var(--bad); }
.goal + .goal { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.goal .m-bar i { background: var(--pip); }
.goal .cta { margin: 12px 0 8px; }
.c-list .txs { margin-top: 6px; }

/* buttons that do things */
.cta {
  width: 100%; height: 46px; border-radius: 23px; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--cta); color: var(--cta-fg); box-shadow: var(--cta-shadow);
  font: 600 15px/1 var(--font); letter-spacing: -0.01em;
}
.cta:active:not(:disabled) { transform: scale(0.98); }
.cta:disabled { opacity: 0.4; }
.cta.ghost { color: var(--text); }
.cta.sm { display: inline-flex; height: 34px; border-radius: 17px; font-size: 13px; width: auto; padding: 0 13px; }
.hold {
  position: relative; width: 100%; height: 50px; border-radius: 25px; overflow: hidden;
  background: var(--cta); color: var(--cta-fg); box-shadow: var(--cta-shadow);
  font: 600 15px/1 var(--font); letter-spacing: -0.01em; touch-action: none; -webkit-touch-callout: none;
  --k: 0;
}
.hold:disabled { opacity: 0.35; }
.hold-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--k)); background: linear-gradient(90deg, color-mix(in srgb, var(--pip) 55%, transparent), var(--pip)); opacity: 0.9; }
.hold-l, .hold-d { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.hold-d { display: none; }
.hold.holding { transform: scale(0.985); }
.hold.done { background: var(--pos); color: #04140b; }
.hold.done .hold-fill, .hold.done .hold-l { display: none; }
.hold.done .hold-d { display: inline-flex; }
.nudge { animation: nudge 0.42s ease; }
@keyframes nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* rows of money */
.txs { list-style: none; margin: 0; padding: 0; }
.tx { display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; padding: 8px 0; cursor: default; }
.sheet .tx { cursor: pointer; }
.tile { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--text-2); }
.tile-pip { background: none; box-shadow: none; }
.tile-pip svg.blb { width: 36px; height: 36px; }
.tx-t { min-width: 0; }
.tx-t b { display: block; font: 550 14px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-t small { display: block; font: 450 12px/1.3 var(--font); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tx-a { font: 550 14px/1 var(--font); white-space: nowrap; }
.tx-a.in { color: var(--pos); }
.tx.fresh { animation: fresh 1.6s ease; }
@keyframes fresh { 0% { background: color-mix(in srgb, var(--pip) 18%, transparent); } 100% { background: transparent; } }
.tx-more { grid-column: 1 / -1; padding: 0 0 6px 47px; font: 450 12.5px/1.4 var(--font); color: var(--text-2); animation: msgIn 0.3s var(--ease) both; }
.tx-more .row2 { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- sheets ---------- */
.veil { position: fixed; inset: 0; z-index: 30; background: var(--veil); opacity: 0; transition: opacity 0.4s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.veil.on { opacity: 1; }
.sheet {
  --drag: 0px;
  position: fixed; left: 50%; z-index: 31; width: min(560px, 100%);
  display: flex; flex-direction: column;
  background: var(--sheet); color: var(--text);
  box-shadow: 0 0 0 1px var(--sheet-edge), 0 -30px 80px rgba(0, 0, 0, 0.45);
  transition: transform 0.52s var(--ease);
  -webkit-user-select: none; user-select: none;
}
.sheet.drag { transition: none; }
.sheet.from-bottom { bottom: 0; max-height: calc(100% - var(--top) - 14px); border-radius: 30px 30px 0 0; transform: translate(-50%, calc(100% + 40px)); }
.sheet.from-bottom.on { transform: translate(-50%, var(--drag)); }
.sheet.from-top { top: 0; max-height: calc(100% - 40px); border-radius: 0 0 30px 30px; transform: translate(-50%, calc(-100% - 40px)); box-shadow: 0 0 0 1px var(--sheet-edge), 0 30px 80px rgba(0, 0, 0, 0.45); }
.sheet.from-top.on { transform: translate(-50%, calc(0px - var(--drag))); }
.sheet.sh-history { height: calc(100% - 40px); }
.sheet.sh-send, .sheet.sh-receive { height: min(760px, calc(100% - var(--top) - 14px)); }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); margin: 8px auto 0; flex: none; opacity: 0.6; touch-action: none; }
.sheet.from-top .grab { margin: 0 auto 10px; }
.sh-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 8px; flex: none; touch-action: none; }
.sheet.from-top .sh-h { padding-top: calc(var(--top) + 14px); }
.sh-h h2 { margin: 0; font: 650 18px/1.1 var(--display); letter-spacing: -0.02em; }
.sh-x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.sh-b { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 18px calc(var(--bottom) + 18px); scrollbar-width: none; -webkit-user-select: none; user-select: none; }
.sh-b::-webkit-scrollbar { display: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 13px; background: var(--inset); box-shadow: var(--inset-edge); }
.seg button { height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font: 550 13px/1 var(--font); color: var(--text-2); transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.seg button[aria-pressed="true"] { color: var(--text); background: linear-gradient(180deg, var(--raise-1), var(--raise-2)); box-shadow: inset 0 1px 0 var(--raise-hi), 0 0 0 1px var(--edge), 0 4px 10px rgba(0, 0, 0, 0.18); }
.seg.sm button { height: 28px; padding: 0 10px; font-size: 12.5px; }

.search { display: flex; align-items: center; gap: 8px; height: 40px; border-radius: 12px; padding: 0 12px; margin-top: 12px; background: var(--inset); box-shadow: var(--inset-edge); color: var(--text-3); }
.search input { flex: 1; min-width: 0; background: none; border: 0; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { display: none; }

.ppl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pp { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 6px 9px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); }
.pp svg.blb { margin-bottom: 4px; }
.pp b { font: 600 13px/1.2 var(--font); }
.pp small { font: 450 11px/1.2 var(--font); color: var(--text-3); }
.ppl.row { display: flex; overflow-x: auto; gap: 8px; margin: 14px -20px 0; padding: 2px 20px 4px; scrollbar-width: none; }
.ppl.row::-webkit-scrollbar { display: none; }
.ppl.row .pp { flex: none; width: 74px; padding: 10px 4px 9px; }
.pp[aria-pressed="true"] { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 2px var(--text); }

.radar { position: relative; height: 318px; margin: 10px -20px 0; overflow: hidden; }
.radar .ring { position: absolute; left: 50%; bottom: 58px; width: 120px; height: 120px; margin: 0 0 -60px -60px; border-radius: 50%; border: 1px solid var(--text-3); opacity: 0; animation: ring 3.6s ease-out infinite; }
.radar .ring:nth-child(2) { animation-delay: 1.2s; }
.radar .ring:nth-child(3) { animation-delay: 2.4s; }
@keyframes ring { 0% { transform: scale(0.6); opacity: 0.55; } 100% { transform: scale(4.4); opacity: 0; } }
.near-you { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); }
.near {
  position: absolute; left: calc(50% + var(--x)); top: var(--y); transform: translate(-50%, 10px) scale(0.6); opacity: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px;
  transition: transform 0.6s var(--spring), opacity 0.4s;
}
.near.in { transform: translate(-50%, 0) scale(1); opacity: 1; }
.near b { font: 600 13px/1.2 var(--font); }
.near small { font: 500 11px/1.2 var(--font); color: var(--text-2); }
.near.real svg.blb { filter: drop-shadow(0 0 14px color-mix(in srgb, var(--pos) 55%, transparent)); }
.near:active { transform: translate(-50%, 0) scale(0.94); }
.radar.big { height: 236px; }
.radar.big .ring { bottom: 50%; margin-bottom: -60px; }
.near-me { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.35)); }
.status { text-align: center; margin: 8px 0 0; font: 500 14px/1.4 var(--font); }
.fine { font: 450 12px/1.4 var(--font); color: var(--text-3); text-align: center; margin: 14px 0 0; }
.fine.center { text-align: center; }
.rx-who { text-align: center; margin-top: 2px; }
.rx-who b { display: block; font: 650 17px/1.2 var(--display); letter-spacing: -0.015em; }
.rx-who small { font: 450 13px/1.3 var(--font); color: var(--text-2); }
.incoming { min-height: 64px; margin-top: 14px; }
.inc { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.5s var(--spring); }
.inc.in { opacity: 1; transform: none; }
.inc > span:nth-child(2) { flex: 1; }
.inc b { display: block; font: 600 14px/1.2 var(--font); }
.inc small { font: 450 12.5px/1.2 var(--font); color: var(--text-2); }
.inc-a { font: 650 15px/1 var(--display); color: var(--text-2); }
.inc.paid .inc-a { color: var(--pos); }
.rain { position: absolute; left: 50%; top: 0; width: 0; height: 100%; pointer-events: none; }
.rain i { position: absolute; left: var(--x); top: -30px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6cf, #f7c652 45%, #c98d1c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15); animation: rain 0.8s cubic-bezier(0.5, 0, 0.9, 0.6) var(--d) both; }
@keyframes rain { 0% { transform: translateY(0) rotateY(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(128px) rotateY(540deg) scale(0.4); opacity: 0; } }

.to { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.to b { display: block; font: 600 15px/1.2 var(--font); }
.to small { font: 450 12.5px/1.2 var(--font); color: var(--text-2); }
.back { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--text-2); }
.amt { text-align: center; margin: 18px 0 2px; font: 650 52px/1 var(--display); letter-spacing: -0.04em; white-space: nowrap; transition: font-size 0.2s, color 0.2s; }
.amt .cur { font-size: 0.5em; vertical-align: 0.62em; color: var(--text-2); margin-right: 2px; letter-spacing: 0; }
.amt.long { font-size: 40px; }
.amt.over { color: var(--warn); }
.amt.sm { font-size: 40px; margin-top: 14px; }
.amt-sub { text-align: center; font: 450 12.5px/1.3 var(--font); color: var(--text-2); }
.note { width: 100%; height: 40px; border-radius: 12px; border: 0; padding: 0 12px; margin: 14px 0 4px; text-align: center; background: var(--inset); box-shadow: var(--inset-edge); font-size: 16px; }
.note::placeholder { color: var(--text-3); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 4px 0 12px; }
.pad button { height: 46px; border-radius: 14px; display: grid; place-items: center; font: 500 22px/1 var(--display); color: var(--text); transition: background 0.12s; }
.pad button:active { background: var(--inset); }
.done-v { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 70px 0 60px; animation: msgIn 0.5s var(--ease) both; }
.done-v .ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--pos); color: #04140b; margin-bottom: 10px; animation: pop 0.6s var(--spring) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }
.done-v b { font: 650 36px/1 var(--display); letter-spacing: -0.03em; }
.done-v span { font: 450 14px/1.3 var(--font); color: var(--text-2); }
.fly-coin { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; z-index: 5; background: radial-gradient(circle at 35% 30%, #fff6cf, #f7c652 45%, #c98d1c); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3); animation: fly 0.62s cubic-bezier(0.3, 0, 0.4, 1) both; }
@keyframes fly {
  0% { transform: translate(var(--x0), var(--y0)) scale(0.6); }
  50% { transform: translate(calc((var(--x0) + var(--x1)) / 2), calc(var(--y1) - 60px)) scale(1.15); }
  100% { transform: translate(var(--x1), var(--y1)) scale(0.3); opacity: 0.6; }
}
.qr { position: relative; width: 208px; margin: 14px auto 12px; padding: 12px; border-radius: 22px; background: #fff; color: #0b0b0e; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3); }
.qr svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.qr-pip { position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 20px; background: #fff; display: grid; place-items: center; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }

/* history */
.h-sum { padding: 2px 0 6px; }
.h-sum .c-big { font-size: 32px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font: 450 12.5px/1.3 var(--font); color: var(--text-2); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend > span:first-child .dot { background: var(--pip); }
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 12px -20px 0; padding: 0 20px 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; height: 30px; padding: 0 12px; border-radius: 15px; font: 550 12.5px/1 var(--font); color: var(--text-2); background: var(--inset); box-shadow: var(--inset-edge); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.days section h3 { position: sticky; top: -6px; z-index: 1; display: flex; justify-content: space-between; margin: 14px -20px 0; padding: 10px 20px 6px; background: var(--sheet); font: 600 13px/1 var(--font); color: var(--text-2); }
.more { width: 100%; height: 40px; border-radius: 20px; margin-top: 12px; font: 550 13.5px/1 var(--font); }

/* cancelling a subscription for you */
.cx-top { display: flex; align-items: center; gap: 10px; }
.cx-top .c-n b { display: block; font: 600 15px/1.2 var(--font); }
.cx-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; font: 650 16px/1 var(--display); color: var(--text);
  background: linear-gradient(180deg, var(--raise-1), var(--raise-2)); box-shadow: inset 0 1px 0 var(--raise-hi), 0 0 0 1px var(--edge); }
.cx-logo.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.c-cancel .pill { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.cx-why { list-style: none; margin: 12px 0 0; padding: 0; }
.cx-why li { display: flex; align-items: center; gap: 9px; padding: 5px 0; font: 450 13.5px/1.35 var(--font); color: var(--text-2); }
.cx-why svg { color: var(--text-3); }
.cx-save { display: grid; gap: 2px; margin: 12px 0 14px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--pos) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pos) 18%, transparent); }
.cx-save > span { font: 500 12px/1.2 var(--font); color: var(--text-2); }
.cx-save b { font: 650 26px/1.15 var(--display); letter-spacing: -0.02em; color: var(--pos); }
.cx-save b small { font: 500 13px/1 var(--font); color: var(--text-2); letter-spacing: 0; }
.cx-save > small { font: 450 12px/1.3 var(--font); color: var(--text-2); }
.cx-fine { margin: 8px 2px 0; font: 450 11.5px/1.4 var(--font); color: var(--text-3); }
.cx-undo { font: 600 11.5px/1 var(--font); color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.cx-steps { list-style: none; margin: 4px 0 0; padding: 0; }
.cx-steps li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font: 500 13.5px/1.3 var(--font); color: var(--text-3); transition: color 0.3s; }
.cx-steps li i { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.cx-steps li.go { color: var(--text); }
.cx-steps li.go i { box-shadow: inset 0 0 0 2px var(--line); border: 2px solid transparent; border-top-color: var(--pip); animation: spin2 0.7s linear infinite; }
.cx-steps li.ok { color: var(--text); }
.cx-steps li.ok i { background: var(--pos); color: #04140b; box-shadow: none; }
@keyframes spin2 { to { transform: rotate(360deg); } }
.cx-done { display: flex; align-items: center; gap: 12px; padding: 4px 0 2px; }
.cx-done.pop { animation: pop 0.55s var(--spring) both; }
.cx-done .ok { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--pos); color: #04140b; }
.cx-done b { display: block; font: 650 16px/1.2 var(--font); }
.cx-done small { font: 450 12.5px/1.35 var(--font); color: var(--text-2); }
.c-insights .c-rows li { gap: 10px; }
.tag { font: 600 10.5px/1 var(--font); font-style: normal; padding: 3px 6px; border-radius: 6px; margin-left: 4px; vertical-align: 1px; }
.tag.t-cancel, .tag.t-review { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.tag.t-keep { color: var(--text-2); background: var(--inset); }
.cx-sofar { margin-top: 8px; color: var(--pos); }
.saved-line, .saved-v { color: var(--pos) !important; }

/* places */
.sec { font: 600 12px/1 var(--font); color: var(--text-2); letter-spacing: 0.02em; margin: 4px 2px 8px; }
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.place-t { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 6px 8px; border-radius: 16px; text-align: left; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); }
.place-t[aria-pressed="true"] { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 2px var(--text); }
.pt-img { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: 11px; overflow: hidden; margin-bottom: 4px; }
.pt-img svg { display: block; width: 100%; height: 100%; }
.place-t b { font: 600 12.5px/1.2 var(--font); padding: 0 2px; }
.place-t small { font: 450 11px/1.25 var(--font); color: var(--text-2); padding: 0 2px; }
.place-t.locked .pt-img svg { filter: grayscale(1) blur(1.5px); opacity: 0.45; }
.pt-lock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); }
.pt-bar { display: block; width: calc(100% - 4px); height: 3px; margin: 5px 2px 0; border-radius: 2px; background: var(--inset); overflow: hidden; }
.pt-bar i { display: block; height: 100%; background: var(--pip); border-radius: 2px; }
.c-place .c-thumb { border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 2; margin-bottom: 10px; }
.c-place .c-thumb svg { display: block; width: 100%; height: 100%; }
.c-place .c-name { font: 650 20px/1.2 var(--display); letter-spacing: -0.015em; margin: 4px 0 2px; }
.c-place .cta { margin-top: 12px; }
/* in a real place, a soft wash behind the words keeps them readable */
:root[data-place="couch"] .app::before, :root[data-place="office"] .app::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--dock-h) + 26vh); pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 82%, transparent) 0, color-mix(in srgb, var(--bg) 55%, transparent) 55%, transparent);
}
:root[data-place="couch"] .app::after, :root[data-place="office"] .app::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--top) + 90px); pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 78%, transparent), transparent);
}
/* in a place, the balance sits on glass so it never fights with the room behind it */
:root[data-place="couch"] .bal, :root[data-place="office"] .bal {
  height: 38px; top: 1px; padding: 0 14px; border-radius: 19px;
  background: var(--glass-2); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
/* talking in a place: the words get a calm backdrop of their own */
:root[data-place="couch"] .app.chat::before, :root[data-place="office"] .app.chat::before {
  height: 76vh;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 94%, transparent) 0, color-mix(in srgb, var(--bg) 88%, transparent) 72%, transparent);
}
.zoom-out .app::before, .zoom-out .app::after { opacity: 0; }

/* you */
.you-hd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 16px; }
.you-hd svg.blb { margin-bottom: 8px; }
.you-hd b { font: 650 19px/1.2 var(--display); letter-spacing: -0.02em; }
.you-hd small { font: 450 13px/1.3 var(--font); color: var(--text-2); }
.set { list-style: none; margin: 0; padding: 0 16px; border-radius: 20px; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); }
.set li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; border-top: 1px solid var(--line); font: 500 14.5px/1.3 var(--font); }
.set li:first-child { border-top: 0; }
.set .v { color: var(--text-2); text-align: right; display: inline-flex; align-items: center; gap: 7px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 10px var(--pos); display: inline-block; }
.tog { width: 46px; height: 28px; border-radius: 14px; background: var(--inset); box-shadow: var(--inset-edge); position: relative; transition: background 0.25s; }
.tog i { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #fff, #e4e4ea); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); transition: transform 0.3s var(--spring); }
.tog[aria-pressed="true"] { background: var(--pos); }
.tog[aria-pressed="true"] i { transform: translateX(18px); }
.set li.go { cursor: pointer; }
.set li.go .v svg { color: var(--text-3); margin-right: -4px; }

/* how the pip thinks */
.br-intro { font: 450 13px/1.45 var(--font); color: var(--text-2); margin: 0 2px 12px; }
.brains { display: grid; gap: 8px; }
.br { border-radius: 18px; padding: 0 14px; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); transition: box-shadow 0.2s; }
.br[aria-current="true"] { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1.5px var(--text); }
.br-top { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; text-align: left; color: var(--text); }
.br-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--inset); box-shadow: var(--inset-edge); font: 650 12.5px/1 var(--font); color: var(--text-2); }
.br-t { flex: 1; min-width: 0; }
.br-t b { display: block; font: 600 14.5px/1.25 var(--font); }
.br-t small { display: block; font: 450 12px/1.38 var(--font); color: var(--text-2); margin-top: 2px; }
.br-s { flex: none; display: inline-flex; align-items: center; gap: 4px; font: 550 12px/1 var(--font); color: var(--text-2); white-space: nowrap; }
.br-s.on { color: var(--pos); }
.br-more { display: none; padding: 0 0 14px; }
.br.open .br-more { display: block; animation: msgIn 0.3s var(--ease); }
.br-more .sec { margin-top: 12px; }
.br-more .cta { height: 42px; font-size: 14px; }
.field { display: flex; align-items: center; gap: 8px; height: 42px; border-radius: 12px; padding: 0 5px 0 12px; margin: 0 0 8px; background: var(--inset); box-shadow: var(--inset-edge); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font: 450 16px/1 var(--font); color: var(--text); }
.field input::placeholder { color: var(--text-3); }
.chips-sm { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.chips-sm button { height: 28px; padding: 0 10px; border-radius: 14px; font: 550 12px/1 var(--font); color: var(--text-2); background: var(--inset); box-shadow: var(--inset-edge); }
.chips-sm button[aria-pressed="true"] { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.br-bar { height: 5px; border-radius: 3px; margin: 10px 0 0; background: var(--inset); overflow: hidden; }
.br-bar i { display: block; height: 100%; background: var(--pip); border-radius: 3px; transition: width 0.3s; }
.br-note { font: 450 12px/1.45 var(--font); color: var(--text-3); margin: 8px 2px 0; }
.br-note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.br-sec { margin-top: 18px; }
.br-conn { padding-bottom: 12px; }
.br-conn .field { margin: 0; }
.br-conn input { font-size: 14px; color: var(--text-2); }
.linkbtn { font: 550 12.5px/1 var(--font); color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; padding: 6px 2px 0; }
.danger { width: 100%; height: 44px; border-radius: 22px; margin-top: 16px; font: 600 14.5px/1 var(--font); color: var(--bad); }

/* Troy's 2D pips: breathe, blink, glance, wink, hop, catch */
svg.blb { display: block; overflow: visible; flex: none; }
svg.blb .blb-all { transform-box: fill-box; transform-origin: 50% 100%; animation: blbBreathe 2.6s ease-in-out infinite alternate; animation-delay: var(--bd, 0s); }
@keyframes blbBreathe { from { transform: scale(1.025, 0.975); } to { transform: scale(0.985, 1.018); } }
svg.blb .blb-ei { transform-box: fill-box; transform-origin: center; transition: transform 0.07s ease; }
svg.blb.blink .blb-ei { transform: scaleY(0.08); }
svg.blb .blb-p { animation: blbLook 7.5s ease-in-out infinite; animation-delay: var(--bd, 0s); }
@keyframes blbLook { 0%, 38% { transform: translate(0, 0); } 44%, 58% { transform: translate(3px, -1.5px); } 64%, 82% { transform: translate(-3px, 1px); } 88%, 100% { transform: translate(0, 0); } }
svg.blb .blb-mo { display: none; }
svg.blb.open .blb-mo, svg.blb.wink .blb-mo { display: inline; }
svg.blb.open .blb-m, svg.blb.wink .blb-m { display: none; }
svg.blb.wink .blb-e2 .blb-ei { transform: scaleY(0.08); transition-duration: 0.1s; }
svg.blb.wink .blb-all, svg.blb.hop .blb-all { animation: blbHop 0.85s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes blbHop { 0% { transform: scale(1, 1); } 18% { transform: scale(1.13, 0.85); } 45% { transform: translateY(-14%) scale(0.93, 1.09); } 72% { transform: scale(1.06, 0.95); } 100% { transform: scale(1, 1); } }
svg.blb .blb-gk { opacity: 0; transition: opacity 0.5s; }
svg.blb.gold .blb-gk { opacity: 1; }
svg.blb.gold .blb-ck { opacity: 0; }
svg.blb.open .blb-p { animation: none; transform: translate(0, -3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01s !important; animation-duration: 0.01s !important; }
  svg.blb .blb-all, svg.blb .blb-p { animation: none; }
}

@media (min-width: 700px) {
  .idle .msg.pip .say { font-size: 18px; max-width: 420px; }
}

/* The studio: a private panel for shaping the pip (press S). */
.studio {
  position: fixed; left: 16px; top: 16px; z-index: 80;
  width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
  padding: 14px 14px 10px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 40px rgba(20, 20, 50, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  font: 500 12px/1.2 var(--font); color: #2a2838; text-align: left;
}
.studio[hidden] { display: none; }
:root[data-room="dark"] .studio { background: rgba(24, 24, 32, 0.72); color: #e9e8f2; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.st-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.st-head b { font-size: 13px; letter-spacing: 0.02em; }
.st-x { font-size: 20px; line-height: 1; opacity: 0.6; }
.st-row { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 8px; padding: 5px 0; }
.st-row > span { opacity: 0.55; }
.st-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.st-chips button { border-radius: 999px; padding: 6px 10px; background: rgba(30, 30, 60, 0.06); display: inline-grid; place-items: center; min-height: 30px; }
:root[data-room="dark"] .st-chips button { background: rgba(255, 255, 255, 0.08); }
.st-chips button[aria-pressed="true"] { background: #1d1b26; color: #fff; }
:root[data-room="dark"] .st-chips button[aria-pressed="true"] { background: #fff; color: #1d1b26; }
.st-chips svg { stroke: none; }
.st-sw { width: 26px; height: 26px; min-height: 26px !important; padding: 0 !important; background: radial-gradient(circle at 35% 30%, #fff 0, var(--c) 45%, var(--d) 100%) !important; }
.st-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1d1b26; }

/* the real wallet */
.spin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--pip); animation: spin2 0.7s linear infinite; vertical-align: -5px; }
.spin.sm { width: 14px; height: 14px; border-width: 1.5px; vertical-align: -2px; }
.rw-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 8px 8px; }
.rw-empty > svg { color: var(--text-2); }
.rw-empty b { font: 650 18px/1.25 var(--display); letter-spacing: -0.015em; }
.rw-empty p { font: 450 13.5px/1.5 var(--font); color: var(--text-2); margin: 0 0 10px; max-width: 320px; }
.rw-empty .cta { max-width: 300px; text-decoration: none; }
.rw-total { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 14px; }
.rw-total small { font: 500 12px/1 var(--font); color: var(--text-2); }
.rw-total b { font: 650 34px/1.15 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.rw-total span { font: 450 12px/1 var(--font); color: var(--text-3); }
.rw-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.rw-acts .cta { height: 42px; font-size: 14px; }
.rw-hs { list-style: none; margin: 0; padding: 0; }
.rw-hs li { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font: 550 13.5px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.rw-hs li:first-child { border-top: 0; }
.rw-hs li > span { display: flex; flex-direction: column; gap: 2px; }
.rw-hs li > span:last-child { align-items: flex-end; }
.rw-hs small { font: 450 11.5px/1 var(--font); color: var(--text-3); }
.br-more .row2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; grid-template-columns: none; }
a.mini { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.rw-add { margin-top: 12px; height: 42px; font-size: 14px; }
.rw-out { display: block; margin: 12px auto 0; }
.mv-k { font: 600 12px/1 var(--font); color: var(--text-2); margin: 14px 2px 7px; }
.mv-k:first-child { margin-top: 4px; }
.mv-pick { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 0 12px 0 14px; border-radius: 14px; text-align: left; font: 550 14px/1.3 var(--font); color: var(--text); background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); }
.mv-pick em { font-style: normal; color: var(--text-3); }
.mv-pick svg { color: var(--text-3); flex: none; }
.mv-amt input { font: 600 22px/1 var(--font); font-variant-numeric: tabular-nums; }
.mv-amt { height: 50px; }
.mv-sym { font: 600 14px/1 var(--font); color: var(--text-2); }
.mv .cta { margin-top: 14px; }
.mv-err { color: var(--warn) !important; }
.mv .linkbtn, .rv .linkbtn, .sh-wallet .sh-b > .linkbtn { display: block; margin: 12px auto 0; }
small.inl { display: inline !important; font-weight: 450; color: var(--text-2); }
.linkbtn.inl { padding: 0; font-size: inherit; }
.rv { display: flex; flex-direction: column; }
.rv-row { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); }
.rv-row span { font: 550 12px/1 var(--font); color: var(--text-2); }
.rv-row b { font: 650 24px/1.2 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rv-row small { font: 450 12.5px/1.3 var(--font); color: var(--text-2); }
.rv-arrow { display: grid; place-items: center; height: 26px; color: var(--text-3); }
.rv-facts { margin: 12px 2px 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 12.5px !important; word-break: break-all; }
.rw-steps { margin: 10px 4px 6px; }
.rw-steps li { font-size: 15px; padding: 9px 0; }
.cx-steps li.bad { color: var(--warn); }
.cx-steps li.bad i { box-shadow: inset 0 0 0 1.5px var(--warn); color: var(--warn); }
.rw-pick { justify-content: center; }
.sh-wallet .qr { margin-top: 6px; }

/* paths: the whole game on one screen */
.pa-intro { font: 450 13px/1.5 var(--font); color: var(--text-2); margin: 0 2px 14px; }
.pa-scen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.pa-scen button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 10px 12px; border-radius: 14px; text-align: left; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); color: var(--text); }
.pa-scen b { font: 600 13.5px/1.2 var(--font); }
.pa-scen small { font: 450 11.5px/1.35 var(--font); color: var(--text-2); }
.pa-lean { display: grid; gap: 6px; margin-bottom: 16px; padding: 0 2px; }
.pa-lean > span { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; font: 550 12.5px/1 var(--font); }
.pa-list { display: grid; gap: 8px; margin-bottom: 16px; }
.pa { padding: 12px 14px; border-radius: 18px; background: var(--glass); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); opacity: 0.78; }
.pa.on { opacity: 1; }
.pa.here { box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1.5px var(--text); opacity: 1; }
.pa-h { display: flex; align-items: center; gap: 10px; }
.pa-h b { flex: 1; font: 600 14.5px/1.25 var(--font); }
.pa-step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--inset); box-shadow: var(--inset-edge); font: 650 12px/1 var(--font); color: var(--text-2); }
.pa.on .pa-step { background: var(--pip); color: #101015; box-shadow: none; }
.pa-thumb { width: 44px; height: 30px; border-radius: 8px; overflow: hidden; flex: none; }
.pa-thumb svg { display: block; width: 100%; height: 100%; }
.pa:not(.on) .pa-thumb svg { filter: grayscale(1); opacity: 0.6; }
.pa-tag { display: inline-flex; align-items: center; gap: 6px; font: 550 11.5px/1 var(--font); color: var(--text-3); }
.pa.on .pa-tag { color: var(--pos); }
.pa.here .pa-tag { color: var(--text); }
.pa-what { font: 450 12.5px/1.45 var(--font); color: var(--text-2); margin: 7px 0 0; }
.pa-none { color: var(--text-3); }
.pa-needs { list-style: none; margin: 9px 0 0; padding: 0; display: grid; gap: 6px; }
.pa-needs li { display: grid; grid-template-columns: 1fr 64px auto; align-items: center; gap: 8px; font: 500 12px/1.3 var(--font); color: var(--text-2); }
.pa-bar { display: block; height: 4px; border-radius: 2px; background: var(--inset); overflow: hidden; }
.pa-bar i { display: block; height: 100%; border-radius: 2px; background: var(--pip); }
.pa-n { font: 550 11.5px/1 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.pa-act { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.pa-act .mini { display: inline-flex; align-items: center; gap: 5px; }
.pa-how { list-style: none; margin: 0 0 4px; padding: 0 2px; display: grid; gap: 6px; font: 450 12.5px/1.45 var(--font); color: var(--text-2); }
.pa-how b { color: var(--text); font-weight: 600; margin-right: 4px; }
.coat-sw { width: 40px; height: 40px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff8 0, transparent 34%), linear-gradient(160deg, var(--ca), var(--cb)); box-shadow: inset 0 -3px 8px #0003, 0 4px 12px #0004; }
.coat-sw.sm { width: 26px; height: 26px; }
.coat-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 2px; }
.coat-row > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.c-coat .c-name { font: 650 18px/1.2 var(--display); letter-spacing: -0.015em; }
.c-coat .cta, .c-paths .cta { margin-top: 12px; }
.c-paths { padding: 0 !important; background: none !important; box-shadow: none !important; }
.c-paths .cta { margin-top: 0; height: 40px; font-size: 13.5px; }
.rw-earn { margin: 0 0 16px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--pip) 12%, var(--glass)), var(--glass)); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge); }
.re-h { display: flex; align-items: center; justify-content: space-between; }
.re-h b { display: inline-flex; align-items: center; gap: 6px; font: 600 14.5px/1.2 var(--font); }
.re-apy { font: 650 13px/1 var(--font); color: var(--pos); }
.rw-earn p { font: 450 12.5px/1.45 var(--font); color: var(--text-2); margin: 6px 0 0; }
.rw-earn p b { color: var(--text); font-weight: 600; }
.rw-earn .row2 { display: flex; gap: 6px; margin-top: 10px; grid-template-columns: none; }
.re-what { margin-top: 0; }
.rv .hold { margin-top: 12px; }
