:root {
  --bg: #050409;
  --bg-raised: #0a0714;
  --sheet: #17131f;
  --field: #0d0a18;
  --caption: #221c31;
  --goal: #1d1830;
  --ink: #edeaf4;
  --muted: #b9aeda;
  --subtle: rgba(237, 234, 244, .52);
  --line: rgba(255, 255, 255, .13);
  --purple: #8e47ff;
  --cup: #501a65;
  --magenta: #c3319a;
  --coral: #ff8964;
  --coral-deep: #ff6f4f;
  --xp: #f3fc2f;
  --success: #63d26b;
  --success-soft: #9fdca4;
  --danger: #ff7c78;
  --phone-w: 393px;
  --phone-h: 852px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(90% 60% at 50% 0%, #160e29 0%, #050409 60%),
    var(--bg);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(255, 137, 100, .7);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.hidden { display: none !important; }

#app {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.phone {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}

@media (min-width: 600px) {
  body { display: grid; place-items: center; padding: 30px; overflow: auto; }
  #app {
    width: var(--phone-w);
    height: min(var(--phone-h), calc(100vh - 60px));
    min-height: 620px;
    border-radius: 46px;
    box-shadow:
      0 0 0 11px #0d0d10,
      0 0 0 12.5px #26262b,
      0 32px 90px rgba(0, 0, 0, .62);
  }
  .phone { border-radius: inherit; }
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dots {
  0%, 80%, 100% { transform: scale(.45); opacity: .35; }
  40% { transform: scale(1); opacity: 1; }
}
@keyframes xp-pop {
  0% { opacity: 0; transform: translateY(12px) scale(.92); }
  45% { opacity: 1; transform: translateY(0) scale(1.04); }
  100% { opacity: 1; transform: none; }
}
@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(142, 71, 255, .26); }
  50% { box-shadow: 0 0 0 12px rgba(142, 71, 255, 0); }
}

/* Incoming call */
.incoming {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: calc(80px + var(--safe-top)) 24px calc(54px + var(--safe-bottom));
  background:
    radial-gradient(105% 68% at 18% -8%, rgba(108, 59, 251, .32), transparent 62%),
    radial-gradient(100% 60% at 92% 0%, rgba(255, 137, 100, .18), transparent 64%),
    #050409;
  animation: fade-in .35s ease both;
}
.mode-badge {
  position: absolute;
  top: calc(18px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: rgba(237, 234, 244, .8);
  background: rgba(255, 255, 255, .055);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mode-badge.live::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--success);
}
.mode-badge.preview { color: #ffd3c3; border-color: rgba(255, 137, 100, .3); }
.incoming-avatar {
  width: 110px;
  height: 110px;
  margin-top: auto;
  border: 3px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--cup);
  box-shadow: 0 22px 64px rgba(80, 26, 101, .35);
}
.incoming-avatar img { width: 135%; height: 135%; object-fit: contain; transform: translateY(3%); }
.incoming h1 { margin: 18px 0 4px; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.incoming-sub { margin: 0; color: rgba(237, 234, 244, .54); font-size: 13px; }
.incoming-actions { margin-top: 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.answer-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; color: rgba(237, 234, 244, .5); font-size: 12px; }
.answer {
  position: relative;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #5bd46d;
  color: #07150b;
  animation: ring-pulse 2s ease-in-out infinite;
}
.answer::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; background: rgba(91, 212, 109, .16); z-index: -1; }
.answer svg { width: 26px; height: 26px; }
.text-instead {
  margin-top: 20px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .03);
}
.ai-disclosure { margin-top: 24px; color: rgba(237, 234, 244, .43); font-size: 11px; line-height: 1.55; }
.ai-disclosure button {
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--coral);
  padding: 0 8px;
}

/* Call shell */
.call {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(120% 50% at 80% -4%, rgba(255, 137, 100, .3), transparent 63%),
    radial-gradient(110% 46% at -10% 0%, rgba(108, 59, 251, .38), transparent 62%),
    #050409;
}
.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 110px);
  z-index: 1;
  pointer-events: none;
}
.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72));
  z-index: 1;
  pointer-events: none;
}
.avatar-stage {
  position: absolute;
  inset: 70px 0 150px;
  display: grid;
  place-items: center;
  z-index: 0;
  transition: filter .3s ease, opacity .3s ease;
}
.avatar-stage svg { width: min(84vw, 390px); height: min(58vh, 470px); overflow: visible; }
.avatar-stage[data-av="reconnecting"] { filter: grayscale(.14) brightness(.75); }
.avatar-stage[data-av="error"] { filter: saturate(.7) brightness(.72); }
.thinking-dots {
  position: absolute;
  left: 50%;
  bottom: 22%;
  display: none;
  gap: 5px;
  transform: translateX(-50%);
}
[data-av="thinking"] .thinking-dots { display: flex; }
.thinking-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9aeda;
  animation: dots 1.1s ease-in-out infinite;
}
.thinking-dots i:nth-child(2) { animation-delay: .12s; }
.thinking-dots i:nth-child(3) { animation-delay: .24s; }

.status-row {
  position: relative;
  z-index: 8;
  height: calc(52px + var(--safe-top));
  padding: calc(13px + var(--safe-top)) 26px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  font-size: 14px;
  font-weight: 650;
}
.status-icons { display: flex; gap: 6px; align-items: center; }
.notch {
  position: absolute;
  top: calc(10px + var(--safe-top));
  left: 50%;
  width: 120px;
  height: 34px;
  border-radius: 20px;
  transform: translateX(-50%);
  background: #050409;
}
.call-top {
  position: relative;
  z-index: 9;
  min-height: 42px;
  margin: 0 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
}
.xp-pill, .call-pill {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(12, 8, 20, .6);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 750;
}
.xp-pill { justify-self: start; gap: 5px; padding: 0 10px; color: var(--xp); border-color: rgba(243, 252, 47, .35); transition: opacity .25s ease; }
.call-pill { padding: 0 13px; letter-spacing: .06em; text-transform: uppercase; user-select: none; -webkit-user-select: none; }
.top-actions { justify-self: end; display: flex; gap: 7px; }
.mini-btn {
  position: relative;
  isolation: isolate;
  width: 44px;
  height: 44px;
  margin: -7px;
  border: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
}
.mini-btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(12, 8, 20, .6);
  backdrop-filter: blur(10px);
}
.mini-btn svg { width: 14px; height: 14px; }

.self-view {
  position: absolute;
  z-index: 10;
  top: calc(100px + var(--safe-top));
  right: 14px;
  width: 74px;
  height: 98px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-radius: 16px;
  background: #17131f;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.self-view video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.self-view-off { height: 100%; display: grid; place-items: center; color: rgba(237, 234, 244, .44); font-size: 11px; }

.net-banner {
  position: absolute;
  z-index: 15;
  top: calc(102px + var(--safe-top));
  left: 50%;
  max-width: calc(100% - 116px);
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(10, 7, 18, .8);
  backdrop-filter: blur(12px);
  font-size: 11px;
  animation: rise .25s ease both;
}
.net-banner .spinner { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 1.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.net-banner.failed {
  width: min(270px, calc(100% - 116px));
  max-width: none;
  border-color: rgba(255, 137, 100, .36);
  text-align: center;
}
.net-banner button {
  min-height: 36px;
  margin-left: 8px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  color: #180a04;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
}
.sound-banner {
  position: absolute;
  z-index: 18;
  top: calc(145px + var(--safe-top));
  left: 50%;
  width: min(270px, calc(100% - 44px));
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid rgba(243, 252, 47, .5);
  border-radius: 15px;
  color: #f7fbd1;
  background: rgba(22, 20, 7, .92);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .4);
  text-align: left;
  animation: rise .25s ease both;
}
.sound-banner strong, .sound-banner span { display: block; }
.sound-banner strong { font-size: 13px; }
.sound-banner span { margin-top: 2px; color: rgba(247, 251, 209, .68); font-size: 10.5px; }

.receipt-toast {
  position: absolute;
  z-index: 17;
  top: calc(104px + var(--safe-top));
  left: 14px;
  right: 100px;
  text-align: center;
  padding: 7px 12px;
  border: 1px solid rgba(99, 210, 107, .4);
  border-radius: 999px;
  color: var(--success-soft);
  background: rgba(10, 20, 12, .78);
  font-size: 11px;
  animation: rise .3s ease both;
}

.celebration {
  position: absolute;
  z-index: 16;
  top: calc(150px + var(--safe-top));
  left: 22px;
  right: 22px;
  padding: 17px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 20px;
  background:
    linear-gradient(140deg, rgba(255, 137, 100, .16), rgba(142, 71, 255, .16)),
    rgba(13, 9, 22, .9);
  backdrop-filter: blur(14px);
  animation: pop .5s cubic-bezier(.34, 1.56, .64, 1) both;
}
.celebration-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.celebration-award {
  font-size: 29px;
  line-height: 1;
  font-weight: 850;
  background: linear-gradient(120deg, #ff9a6a, #c3319a, #8e47ff);
  -webkit-background-clip: text;
  color: transparent;
  animation: xp-pop .8s ease both;
}
.level-chip { padding: 5px 9px; border-radius: 999px; color: #180a04; background: var(--xp); font-size: 10px; font-weight: 800; }
.celebration p { margin: 8px 0 12px; color: rgba(237, 234, 244, .78); font-size: 12px; }
.xp-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.xp-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--purple)); transition: width .8s cubic-bezier(.16, 1, .3, 1); }
.root-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.root-chips span { padding: 4px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: rgba(237, 234, 244, .7); font-size: 10px; }

.call-bottom {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: max(8px, var(--safe-bottom));
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.call-bottom > * { pointer-events: auto; }

.captions {
  margin: 0 14px 10px;
  max-height: 164px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 9px 11px 10px;
  background: rgba(10, 7, 18, .72);
  backdrop-filter: blur(8px);
}
.captions-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: rgba(237, 234, 244, .55); font-size: 10px; font-weight: 800; letter-spacing: .07em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(99, 210, 107, .12); }
.caption-list { display: flex; flex-direction: column; gap: 5px; }
.caption {
  max-width: 88%;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--ink);
  background: var(--caption);
  font-size: 12.5px;
  line-height: 1.35;
  animation: rise .2s ease both;
}
.caption.user { align-self: flex-end; color: #241007; background: linear-gradient(92deg, #ff9a6a, #ff6f4f); }
.caption.typing { display: inline-flex; gap: 4px; width: 42px; }
.caption.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: dots 1.1s ease infinite; }
.caption.typing i:nth-child(2) { animation-delay: .12s; }
.caption.typing i:nth-child(3) { animation-delay: .24s; }

.widget-sheet {
  margin: 0 8px 8px;
  max-height: min(49vh, 430px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 22px;
  background: var(--sheet);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
  animation: rise .35s cubic-bezier(.32, .72, 0, 1) both;
}
.sheet-grab { width: 40px; height: 4px; margin: 8px auto 5px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.sheet-head { padding: 3px 16px 8px; color: rgba(237, 234, 244, .45); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.sheet-body { max-height: min(43vh, 374px); overflow: auto; padding: 0 14px 14px; -webkit-overflow-scrolling: touch; }
.widget-title { margin: 2px 0 6px; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
.widget-sub { margin: 0 0 13px; color: rgba(237, 234, 244, .58); font-size: 12.5px; line-height: 1.42; }
.widget-error { margin: 8px 0; padding: 9px 10px; border: 1px solid rgba(255, 124, 120, .34); border-radius: 11px; color: #ffc1bd; background: rgba(255, 124, 120, .08); font-size: 12px; }
.gate-note { margin: 8px 0; color: rgba(237, 234, 244, .42); font-size: 11px; }

.goal-grid, .people-grid { display: grid; gap: 8px; }
.goal-card, .person-card, .select-row, .vibe-chip {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  color: var(--ink);
  background: var(--goal);
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.goal-card { padding: 12px; text-align: left; }
.goal-card strong { display: block; font-size: 14px; }
.goal-card small { display: block; margin-top: 3px; color: rgba(237, 234, 244, .52); font-size: 11px; }
.goal-card.selected, .person-card.selected, .select-row.selected, .vibe-chip.selected {
  border-color: var(--coral);
  background: linear-gradient(125deg, rgba(255, 137, 100, .14), rgba(142, 71, 255, .12)), var(--goal);
}
.goal-card:active, .person-card:active, .vibe-chip:active { transform: scale(.985); }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.vibe-chip, .quick-chip {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255, 137, 100, .44);
  border-radius: 999px;
  color: #ffb596;
  background: rgba(20, 10, 6, .58);
  font-size: 13px;
  font-weight: 650;
}
.vibe-chip { color: var(--ink); background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .13); }

.field, .composer {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--field);
}
.field { padding: 0 12px; }
textarea.field { min-height: 86px; padding: 11px 12px; resize: vertical; line-height: 1.4; }
.field::placeholder, textarea::placeholder { color: rgba(237, 234, 244, .32); }
.field-row { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 8px; }
.field-note { margin: 6px 2px 10px; color: rgba(237, 234, 244, .42); font-size: 11px; }
.field-note.ok { color: var(--success-soft); }

.tag-receipt { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.tag-receipt span { padding: 6px 9px; border-radius: 999px; background: rgba(142, 71, 255, .17); color: #d9c8ff; font-size: 12px; }
.readback { display: grid; gap: 8px; }
.readback-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; background: rgba(255, 255, 255, .035); font-size: 12px; }
.readback-row span:first-child { color: rgba(237, 234, 244, .42); text-transform: uppercase; letter-spacing: .05em; font-size: 9px; font-weight: 800; }
.edit-link, .text-link {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--coral);
  padding: 7px;
  font-size: 12px;
}

.profile-layout { display: grid; grid-template-columns: 94px 1fr; gap: 12px; }
.avatar-picker { width: 94px; height: 94px; overflow: hidden; border: 2px solid var(--coral); border-radius: 50%; background: var(--field); }
.avatar-picker img { width: 100%; height: 100%; object-fit: cover; }
.face-row { display: flex; gap: 7px; margin-top: 10px; overflow-x: auto; padding-bottom: 3px; }
.face-choice { width: 45px; height: 45px; flex: none; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 50%; background: var(--field); }
.face-choice.selected { border-color: var(--coral); }
.face-choice img { width: 100%; height: 100%; object-fit: cover; }

.person-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; text-align: left; }
.person-avatar { width: 42px; height: 42px; overflow: hidden; border-radius: 50%; background: var(--purple); }
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-copy strong { display: block; font-size: 13px; }
.person-copy small { display: block; margin-top: 2px; color: rgba(237, 234, 244, .5); font-size: 10.5px; line-height: 1.3; }
.person-action { min-width: 58px; min-height: 44px; padding: 0 9px; border: 1px solid rgba(255, 137, 100, .5); border-radius: 999px; color: #ffb596; background: rgba(255, 137, 100, .07); font-size: 11px; font-weight: 750; }
.person-card.selected .person-action { color: #241007; background: var(--coral); }

.post-preview { margin-bottom: 10px; padding: 11px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 13px; background: var(--goal); }
.post-author { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.post-author .person-avatar { width: 28px; height: 28px; }
.post-preview p { margin: 0; color: rgba(237, 234, 244, .78); font-size: 12.5px; line-height: 1.42; }
.draft-row { display: flex; gap: 6px; overflow-x: auto; margin: 8px 0; }
.draft-row button { min-height: 44px; flex: none; max-width: 250px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; color: rgba(237, 234, 244, .7); background: rgba(255, 255, 255, .04); font-size: 11px; }

.otp-destination { margin-bottom: 10px; color: rgba(237, 234, 244, .55); font-size: 12px; }
.otp-wrap { position: relative; }
.otp-input {
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 13px;
  color: var(--ink);
  background: var(--field);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: .32em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.otp-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }

.primary, .secondary {
  min-height: 44px;
  border-radius: 999px;
  font-weight: 750;
  transition: opacity .15s ease, transform .15s ease;
}
.primary {
  width: 100%;
  margin-top: 12px;
  border: 0;
  color: #180a04;
  background: linear-gradient(92deg, var(--coral), var(--coral-deep));
}
.primary:disabled { opacity: .4; }
.primary:not(:disabled):active { transform: translateY(1px); }
.secondary { padding: 0 16px; border: 1px solid rgba(255, 255, 255, .15); color: var(--ink); background: rgba(255, 255, 255, .04); }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.action-row .primary { margin-top: 0; }
.action-row .secondary { width: 100%; }
.name-skip { display: block; margin: 2px auto -6px; }

.input-area { margin: 0 14px 4px; }
.quick-chips { display: flex; gap: 7px; margin-bottom: 7px; overflow-x: auto; scrollbar-width: none; }
.quick-chips::-webkit-scrollbar { display: none; }
.talk-row { display: grid; grid-template-columns: 44px 1fr 44px; gap: 7px; }
.talk-btn, .send-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.talk-btn { position: relative; color: var(--ink); background: rgba(13, 10, 24, .82); border: 1px solid rgba(255, 255, 255, .12); }
.talk-btn::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; border: 2px solid var(--bg); border-radius: 50%; background: var(--success); }
.talk-btn.off::after { background: rgba(255, 255, 255, .25); }
.talk-btn svg, .send-btn svg { width: 18px; height: 18px; }
.talk-btn:disabled { opacity: .52; }
.talk-input { min-width: 0; height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; color: var(--ink); background: rgba(13, 10, 24, .8); }
.send-btn { color: #180a04; background: linear-gradient(92deg, var(--coral), var(--coral-deep)); }
.send-btn:disabled { opacity: .35; }
.voice-hint {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(237, 234, 244, .58);
  font-size: 11px;
}
.voice-hint .talk-btn { flex: none; }
.voice-hint.preview {
  min-height: 32px;
  color: rgba(237, 234, 244, .42);
  letter-spacing: .02em;
}
.home-indicator { width: 120px; height: 5px; margin: 5px auto 0; border-radius: 999px; background: rgba(255, 255, 255, .7); }

/* Privacy */
.modal-backdrop {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(4px);
  animation: fade-in .2s ease both;
}
.privacy {
  width: 100%;
  max-height: 88%;
  overflow: auto;
  padding: 8px 18px calc(22px + var(--safe-bottom));
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 24px 24px 0 0;
  background: var(--sheet);
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .55);
  animation: rise .35s cubic-bezier(.32, .72, 0, 1) both;
}
.privacy h2 { margin: 12px 0 5px; font-size: 23px; }
.privacy > p { margin: 0 0 14px; color: rgba(237, 234, 244, .55); font-size: 13px; line-height: 1.45; }
.privacy-list { display: grid; gap: 9px; }
.privacy-row { display: grid; grid-template-columns: 25px 1fr; gap: 9px; align-items: start; color: rgba(237, 234, 244, .72); font-size: 12.5px; line-height: 1.4; }
.privacy-row i { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px; color: var(--success-soft); background: rgba(99, 210, 107, .09); font-style: normal; }
.privacy-actions { display: grid; gap: 8px; margin-top: 18px; }
.privacy-actions .primary { margin: 0; }

/* Presenter */
.presenter {
  position: absolute;
  z-index: 120;
  inset: 0;
  padding: calc(24px + var(--safe-top)) 16px calc(22px + var(--safe-bottom));
  overflow: auto;
  color: var(--ink);
  background: rgba(5, 4, 9, .96);
  backdrop-filter: blur(18px);
  animation: fade-in .2s ease both;
}
.presenter-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.presenter h2 { margin: 0; font-size: 20px; }
.presenter h3 { margin: 18px 0 8px; color: rgba(237, 234, 244, .52); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.presenter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.presenter button { min-height: 44px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 11px; color: var(--ink); background: rgba(255, 255, 255, .045); }
.presenter pre { max-height: 210px; overflow: auto; padding: 10px; border-radius: 10px; color: #d9c8ff; background: #0d0a18; font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.close-presenter { width: 44px; min-height: 44px !important; border-radius: 50% !important; }

.verification-steps { display: grid; gap: 8px; margin: 12px 0 14px; }
.verification-steps > div { display: grid; grid-template-columns: 30px 1fr; column-gap: 9px; align-items: center; padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.verification-steps span { grid-row: 1 / span 2; display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: var(--xp); background: rgba(243, 252, 47, .1); font-size: 11px; font-weight: 850; }
.verification-steps strong { font-size: 12px; }
.verification-steps small { color: var(--muted); font-size: 10px; }
.presence-orbit { position: relative; display: grid; width: 116px; height: 116px; margin: 10px auto 16px; place-items: center; border: 1px solid rgba(142, 71, 255, .45); border-radius: 50%; box-shadow: 0 0 0 9px rgba(142, 71, 255, .07); }
.presence-orbit::before { position: absolute; inset: -6px; border: 2px solid transparent; border-top-color: var(--coral); border-radius: 50%; content: ""; animation: orbit 1.8s linear infinite; }
.presence-orbit.passed::before { border-color: var(--success); animation: none; }
.presence-orbit img { width: 80px; height: 80px; }
.presence-orbit span { position: absolute; right: -2px; bottom: 5px; display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #102814; background: var(--success); }
.presence-orbit span:empty { display: none; }
.presence-orbit svg { width: 18px; height: 18px; }
.visual-code { margin: 12px 0; padding: 14px; border: 1px solid rgba(243, 252, 47, .32); border-radius: 14px; color: var(--xp); background: rgba(243, 252, 47, .07); font: 850 34px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .28em; text-align: center; }
.badge-success-mark { display: grid; width: 64px; height: 64px; margin: 4px auto 12px; place-items: center; border-radius: 50%; color: #102814; background: var(--success); box-shadow: 0 0 0 10px rgba(99, 210, 107, .09); }
.badge-success-mark svg { width: 34px; height: 34px; }

@keyframes orbit { to { transform: rotate(1turn); } }

/* Recap and feed */
.recap {
  height: 100%;
  overflow: auto;
  padding: calc(56px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
  background:
    radial-gradient(100% 48% at 50% 0%, rgba(142, 71, 255, .28), transparent 70%),
    #050409;
}
.recap-eyebrow { color: var(--xp); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.recap h1 { margin: 5px 0 6px; font-size: 30px; line-height: 1.05; letter-spacing: -.035em; }
.recap-sub { margin: 0 0 18px; color: rgba(237, 234, 244, .55); font-size: 13px; }
.tree {
  position: relative;
  height: 260px;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 90%, rgba(99, 210, 107, .18), transparent 38%),
    linear-gradient(155deg, rgba(142, 71, 255, .14), rgba(255, 137, 100, .08)),
    var(--sheet);
}
.tree svg { width: 100%; height: 100%; }
.recap-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 12px; }
.metric { padding: 10px 6px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; text-align: center; background: rgba(255, 255, 255, .035); }
.metric strong { display: block; font-size: 18px; }
.metric span { display: block; margin-top: 2px; color: rgba(237, 234, 244, .43); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; padding: 7px 10px; border: 1px solid rgba(99, 210, 107, .3); border-radius: 999px; color: var(--success-soft); background: rgba(99, 210, 107, .08); font-size: 11px; font-weight: 750; }

.feed {
  height: 100%;
  overflow: auto;
  color: #17131f;
  background: #f7f4fa;
}
.feed-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + var(--safe-top)) 16px 12px; color: #fff; background: #501a65; }
.feed-brand { font-size: 22px; font-weight: 900; letter-spacing: -.04em; }
.feed-avatar { width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: #8e47ff; }
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-body { padding: 14px 14px calc(30px + var(--safe-bottom)); }
.restore-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; padding: 13px 14px; border: 1px solid rgba(80, 26, 101, .18); border-radius: 14px; background: rgba(99, 210, 107, .12); color: #501a65; }
.restore-banner > span { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: #63d26b; color: #102814; }
.restore-banner svg { width: 17px; height: 17px; }
.restore-banner strong, .restore-banner small { display: block; }
.restore-banner strong { font-size: 14px; }
.restore-banner small { margin-top: 2px; color: #75627c; font-size: 11px; }
.feed-card { margin-bottom: 10px; padding: 13px; border: 1px solid #e6deeb; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(80, 26, 101, .06); }
.feed-card.pinned { border-color: rgba(142, 71, 255, .38); }
.feed-label { margin-bottom: 7px; color: #8e47ff; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.feed-card p { margin: 7px 0 0; color: #30253a; font-size: 13px; line-height: 1.43; }
.feed-author { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; }
.suggest-row { display: flex; gap: 8px; overflow-x: auto; margin: 8px -2px 14px; padding: 2px; }
.suggest { min-width: 128px; padding: 12px; border: 1px solid #e6deeb; border-radius: 14px; text-align: center; background: #fff; }
.suggest img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.suggest strong { display: block; margin-top: 5px; font-size: 11px; }
.auntea-dm { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; color: #fff; background: linear-gradient(130deg, #501a65, #8e47ff); }
.auntea-dm img { width: 48px; height: 48px; border-radius: 50%; background: var(--cup); }

@media (max-height: 720px) {
  .avatar-stage { inset: 60px 0 132px; transform: scale(.82); }
  .captions { max-height: 128px; margin-bottom: 6px; }
  .caption { padding: 5px 8px; font-size: 11.5px; }
  .widget-sheet { max-height: 43vh; }
  .sheet-body { max-height: 36vh; }
  .incoming { padding-top: calc(42px + var(--safe-top)); padding-bottom: calc(28px + var(--safe-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
[data-reduce="on"] *, [data-reduce="on"] *::before, [data-reduce="on"] *::after {
  animation: none !important;
  transition-duration: .01ms !important;
}
