/* Harmony Home — components and layout. Mobile-first.
   Visual language: the original 2.9.0 prototype (frosted glass, emerald, soft inset shadows).
   Components and interaction: Harmony Guide (v2). Colors come only from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; overflow-x: hidden; overflow-x: clip; }
/* Keep focused controls clear of the floating bottom dock (WCAG 2.4.11); the dock becomes a side rail at 960px. */
html:has(.app.has-tabs) { scroll-padding-bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { html:has(.app.has-tabs) { scroll-padding-bottom: 0; } }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  isolation: isolate;
}
body::before { content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none; background: var(--page-bg); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); line-height: 1.13; margin: 0; letter-spacing: -0.035em; font-weight: 750; overflow-wrap: break-word; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
ul, ol { margin: 0; padding: 0; }
code { font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
[hidden] { display: none !important; }
::selection { background: #b7e9cf; color: #083f2e; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
[data-route-heading]:focus, .view:focus, #followup-title:focus { outline: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100; padding: 12px 18px;
  background: var(--accent-strong); color: var(--on-accent); border-radius: 15px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
}
.skip-link:focus { top: max(14px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.fine { font-size: var(--fs-xs); color: var(--muted); }
.center { text-align: center; }
.noscript { padding: 24px; text-align: center; }

/* ------------------------------------------------------------ ambience */
/* The original's three soft light pools, now drifting slowly (Harmony Guide's motion). */

.ambient { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: var(--blob-opacity); will-change: transform; }
.blob-1 { width: 400px; height: 400px; right: -180px; top: 16%; background: var(--blob-1); animation: drift-a 26s ease-in-out infinite alternate; }
.blob-2 { width: 300px; height: 300px; left: -180px; bottom: 10%; background: var(--blob-2); animation: drift-b 32s ease-in-out infinite alternate; }
.blob-3 { width: 230px; height: 230px; left: 32%; top: 2%; background: var(--blob-3); opacity: calc(var(--blob-opacity) * 0.6); animation: drift-a 38s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { to { transform: translate(6vmax, 5vmax) scale(1.1); } }
@keyframes drift-b { to { transform: translate(5vmax, -6vmax) scale(0.92); } }
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.12' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 680px) { .blob { filter: blur(45px); } }

/* ------------------------------------------------------------- surfaces */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}
.glow-border { position: relative; }
.glow-border::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: var(--btn-primary); opacity: 0.55;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* -------------------------------------------------------------- buttons */
/* The original .button family: rounded-rect glass, emerald primary, tactile press. */

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--tap); padding: 11px 20px; border-radius: var(--radius-btn);
  border: 1px solid var(--glass-edge); font-weight: 700; font-size: var(--fs-md); line-height: 1.3;
  text-decoration: none; text-align: center; color: var(--text); background: var(--surface); box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-primary { color: var(--on-accent); border-color: var(--btn-edge); background: var(--btn-primary); box-shadow: var(--btn-primary-shadow); }
.btn-primary:hover:not(:disabled) { background: var(--btn-primary-hover); box-shadow: var(--btn-primary-shadow), 0 10px 26px -12px rgba(0, 91, 66, 0.35); }
.btn-secondary { background: var(--surface-2); border-color: var(--glass-edge); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.btn-ghost { background: transparent; border-color: var(--border-strong); box-shadow: none; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); box-shadow: none; }
.btn-danger { background: var(--danger); border-color: transparent; color: var(--on-danger); box-shadow: var(--shadow-soft); }
.btn-sm { min-height: var(--tap); padding: 8px 14px; font-size: var(--fs-sm); border-radius: 14px; }
.btn-xl { min-height: 56px; padding: 14px 26px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 17px; border: 1px solid var(--glass-edge); background: var(--surface-2); color: var(--text); text-decoration: none;
  box-shadow: var(--shadow-soft); transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.icon-btn:hover:not(:disabled) { transform: translateY(-2px); }
.icon-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 2px 3px 6px rgba(29, 73, 61, 0.15); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.icon-btn-lg { width: 56px; height: 56px; border-radius: 20px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--accent-strong); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--accent); text-decoration-thickness: 2px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: var(--space-3); }
.back-link:hover { color: var(--text); }
.icon { flex: none; }

/* ---------------------------------------------------------------- pills */

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; border: 1px solid var(--glass-edge); background: var(--surface-2); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-pending { background: var(--talk-bg); color: var(--talk); }
.pill-muted { background: var(--surface); color: var(--muted); }
.pill-warn { background: var(--danger-bg); color: var(--danger); }
.pill-planned { background: var(--unknown-bg); color: var(--unknown); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent-2); }
.tag { display: inline-flex; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--sage); font-size: var(--fs-sm); color: var(--text); list-style: none; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }

/* --------------------------------------------------------------- layout */

.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: relative; z-index: 20; padding: max(12px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); view-transition-name: topbar; }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: calc(var(--page-width) - 32px); margin: 0 auto;
  min-height: 66px; padding: 9px 12px 9px 16px; border-radius: 24px;
  background: var(--glass-bar); border: 1px solid var(--glass-edge); box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); text-decoration: none; font-family: var(--font-display); font-weight: 750; letter-spacing: -0.05em; font-size: 1.15rem; line-height: 1.04; color: var(--heading); flex-shrink: 0; }
.brand img { width: 40px; height: 40px; }
.brand > span > span { display: block; }
.brand strong { display: block; font-weight: 750; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions .btn { white-space: nowrap; }
.preview-note {
  display: flex; align-items: flex-start; justify-content: center; gap: 7px; max-width: calc(var(--page-width) - 32px);
  margin: 8px auto 0; padding: 6px 14px; font-size: var(--fs-xs); color: var(--muted); text-align: center; line-height: 1.5;
}
.preview-note .icon { margin-top: 2px; color: var(--talk); }
.view { flex: 1; min-width: 0; outline: none; padding: var(--space-5) max(var(--gutter), env(safe-area-inset-right)) calc(var(--space-7) + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); }
.app.has-tabs .view { padding-bottom: calc(var(--tabbar-h) + var(--space-7) + env(safe-area-inset-bottom)); }
.page { max-width: var(--content-w); margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.page-head { display: flex; flex-direction: column; gap: var(--space-2); max-width: 720px; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -0.045em; }
.lede { color: var(--muted); font-size: var(--fs-lg); line-height: 1.55; }
.section-title { font-size: var(--fs-xl); margin-bottom: var(--space-2); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: var(--space-2); }

@media (max-width: 420px) {
  .hide-xs { display: none; }
  .brand { font-size: 1.02rem; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .topbar-inner { padding: 8px 10px 8px 12px; gap: 8px; }
}
@media (max-width: 359px) {
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn-sm { padding: 8px 10px; }
  .tab-link { font-size: 0.62rem; }
  .tab-label { white-space: normal; text-align: center; line-height: 1.1; }
}

/* ---------------------------------------------------------------- tabs */
/* Phones: the original floating glass dock. Desktop: a glass side rail. */

.tabs {
  position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 30;
  padding: 6px; border-radius: 26px;
  background: var(--tabbar-bg); border: 1px solid var(--glass-edge); box-shadow: 0 8px 26px rgba(29, 73, 61, 0.1), var(--shadow-soft);
  backdrop-filter: blur(36px) saturate(130%); -webkit-backdrop-filter: blur(36px) saturate(130%);
  view-transition-name: tabs;
}
.tab-list { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; max-width: 560px; margin: 0 auto; }
.tab-link {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 58px; padding: 6px 2px; border-radius: 21px; border: 1px solid transparent; text-decoration: none; color: var(--muted);
  font-size: 0.68rem; font-weight: 650; transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.tab-link:hover { color: var(--text); background: var(--surface); }
.tab-link.is-active { color: var(--accent-strong); background: var(--tab-active-bg); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--inset-highlight); }
.tab-link.is-locked { color: var(--faint); }
.tab-icon { position: relative; display: grid; place-items: center; width: 40px; height: 28px; transition: transform var(--dur) var(--spring); }
.tab-link.is-active .tab-icon { transform: translateY(-1px); }
.tab-label { white-space: normal; text-align: center; line-height: 1.15; }
.badge { position: absolute; top: -5px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--talk); color: var(--bg-elevated); font-size: 0.68rem; font-weight: 800; display: grid; place-items: center; }
.badge-soft { background: var(--accent); color: var(--on-accent); }

@media (min-width: 960px) {
  .app.has-tabs { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: 'rail top' 'rail view'; }
  .app.has-tabs .topbar { grid-area: top; }
  .app.has-tabs .view { grid-area: view; padding-bottom: var(--space-7); }
  .app.has-tabs .tabs {
    grid-area: rail; position: sticky; top: 16px; left: auto; right: auto; bottom: auto; align-self: start;
    height: calc(100dvh - 32px); margin: 16px 0 16px 16px; padding: 96px 12px 20px; border-radius: var(--radius);
  }
  .tab-list { grid-template-columns: 1fr; gap: 6px; }
  .tab-link { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 52px; padding: 6px 12px; font-size: var(--fs-md); border-radius: 18px; }
  .tab-icon { width: 34px; height: 34px; }
  .tab-label { white-space: nowrap; text-align: left; }
}

/* -------------------------------------------------------------- welcome */
/* Ported from the original 2.9.0 home page: the "people-hero". */

.welcome { max-width: var(--page-width); margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-6); min-width: 0; }
.hero { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; align-items: center; min-height: 530px; gap: 16px; padding: 15px 0 34px; }
.hero-copy { position: relative; z-index: 2; min-width: 0; animation: hero-enter 0.8s var(--ease) both; }
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-art { position: relative; isolation: isolate; min-width: 0; display: flex; align-items: center; justify-content: center; min-height: 470px; animation: hero-enter 0.95s 0.1s var(--ease) both; }
.hero-art::before {
  content: ''; position: absolute; z-index: -1; width: 116%; height: 40%; border-radius: 50%; transform: rotate(-22deg); opacity: 0.38;
  border: 1px solid var(--ribbon-edge); border-top-color: var(--ribbon-top); border-bottom-color: var(--ribbon-bottom);
  box-shadow: inset 0 1px 6px var(--ribbon-glow), 0 1px 0 var(--ribbon-glow-outer);
  background: linear-gradient(160deg, transparent, var(--ribbon-sheen), transparent);
  animation: ribbon-drift 16s ease-in-out infinite;
}
.hero-art::after { content: ''; position: absolute; z-index: -2; inset: 4% 6%; border-radius: 50%; background: var(--house-glow); pointer-events: none; }
.hero-house { position: relative; width: 118%; max-width: 620px; max-height: 600px; filter: drop-shadow(0 20px 24px rgba(35, 86, 67, 0.09)); animation: house-float 7s ease-in-out infinite; z-index: 1; }
.hero-residents { aspect-ratio: 1; flex-shrink: 0; }
.house-scroll-layer { display: contents; }
.house-scene-stack { position: absolute; inset: 0; }
.house-scene {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; pointer-events: none;
  animation: home-resident-cycle var(--banner-cycle) cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: calc(var(--banner-step) * var(--scene-offset));
}
.house-scene-alex { opacity: 1; }
.floating-chip {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 8px; max-width: 220px; padding: 12px 15px; border-radius: 16px;
  background: var(--glass-bar); border: 1px solid var(--glass-edge);
  box-shadow: 0 6px 18px rgba(29, 73, 61, 0.06); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.floating-chip .icon { color: var(--accent); }
.floating-chip.chip-one { left: 0; top: 17%; }
.floating-chip.chip-two { right: 0; top: 55%; }

.people-hero { --banner-step: 2.4s; --banner-count: 13; --banner-cycle: calc(var(--banner-step) * var(--banner-count)); }
.home-headline { font-size: clamp(48px, 4.9vw, 68px); line-height: 1.14; letter-spacing: -0.055em; font-weight: 700; margin-bottom: 25px; }
.home-headline .headline-line { display: block; }
.home-headline .headline-with { --name-row: 1.25em; display: flex; align-items: flex-start; gap: 0.15em; height: var(--name-row); white-space: nowrap; margin-top: 0.06em; }
.headline-prefix { display: block; flex: 0 0 auto; line-height: var(--name-row); }
.headline-word, .name-label { position: relative; top: -0.055em; }
.name-window { position: relative; display: block; flex: 0 0 auto; width: max-content; height: var(--name-row); overflow: hidden; color: var(--hero-name); }
/* The longest illustrated pairing fixes the invisible reel width without shifting the phrase. */
.name-window::before { content: 'José + Warren'; display: block; visibility: hidden; height: var(--name-row); line-height: var(--name-row); white-space: nowrap; letter-spacing: -0.055em; }
.name-track { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; width: 100%; animation: home-name-cycle var(--banner-cycle) cubic-bezier(0.4, 0, 0.2, 1) infinite; will-change: transform; }
.name-item { display: block; flex: 0 0 var(--name-row); height: var(--name-row); line-height: var(--name-row); white-space: nowrap; letter-spacing: -0.055em; }
.hero-details > p.hero-lede { font-size: 19px; line-height: 1.6; max-width: 520px; color: var(--muted); margin-bottom: 20px; }
.price-callout {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 650; font-size: var(--fs-sm);
  background: var(--surface-2); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-soft);
}
.price-callout .icon { color: var(--accent); }
.hero-harmony { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; max-width: 520px; }
.hero-harmony-mark { flex: none; display: grid; }
.hero-harmony-bubble {
  padding: 10px 14px; border-radius: 18px 18px 18px 6px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text);
  background: var(--bubble-harmony); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.hero-harmony-bubble strong { color: var(--heading); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.hero-hint { flex-basis: 100%; color: var(--muted); font-size: var(--fs-sm); }
.hero-caption-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; margin-top: 20px; color: var(--muted); }
.hero-caption { font-size: 11px; line-height: 1.5; }
.motion-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 6px 12px;
  border: 1px solid var(--glass-edge); border-radius: 12px; background: var(--surface); color: var(--muted);
  font-size: 11px; font-weight: 600; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.motion-toggle:hover { background: var(--surface-2); color: var(--text); }
.hero-motion-paused .motion-toggle { background: var(--accent-soft); color: var(--accent-strong); }
.hero-motion-paused .name-track, .hero-motion-paused .house-scene, .hero-motion-paused .hero-residents,
.hero-motion-paused .hero-art::before, .hero-motion-paused .house-scroll-layer, .hero-motion-paused .hero-details { animation-play-state: paused; }

/* Each 2.4-second slot holds for 72%, then scrolls and crossfades together (13 residents + the first repeated). */
@keyframes home-name-cycle {
  0.000000000%, 5.538461538% { transform: translateY(0); }
  7.692307692%, 13.230769231% { transform: translateY(-7.142857143%); }
  15.384615385%, 20.923076923% { transform: translateY(-14.285714286%); }
  23.076923077%, 28.615384615% { transform: translateY(-21.428571429%); }
  30.769230769%, 36.307692308% { transform: translateY(-28.571428571%); }
  38.461538462%, 44.000000000% { transform: translateY(-35.714285714%); }
  46.153846154%, 51.692307692% { transform: translateY(-42.857142857%); }
  53.846153846%, 59.384615385% { transform: translateY(-50.000000000%); }
  61.538461538%, 67.076923077% { transform: translateY(-57.142857143%); }
  69.230769231%, 74.769230769% { transform: translateY(-64.285714286%); }
  76.923076923%, 82.461538462% { transform: translateY(-71.428571429%); }
  84.615384615%, 90.153846154% { transform: translateY(-78.571428571%); }
  92.307692308%, 97.846153846% { transform: translateY(-85.714285714%); }
  100% { transform: translateY(-92.857142857%); }
}
@keyframes home-resident-cycle { 0%, 5.538461538% { opacity: 1; } 7.692307692%, 97.846153846% { opacity: 0; } 100% { opacity: 1; } }

/* "How it works": the original glass journey strip, three steps. */
.how-strip { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px 16px; border-radius: 27px; }
.how-step { display: flex; align-items: flex-start; gap: 13px; padding: 4px 18px; min-width: 0; }
.how-step + .how-step { border-left: 1px solid var(--line); }
.soft-icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-soft); color: var(--accent); }
.how-step small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent-2); }
.how-step h3 { font-size: 1.05rem; letter-spacing: -0.02em; margin: 1px 0 3px; }
.how-step p { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.assure { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.assure ul { list-style: none; display: grid; gap: var(--space-3); }
.assure li { display: flex; gap: 10px; color: var(--muted); }
.assure li strong { color: var(--heading); }
.assure li .icon { color: var(--accent); margin-top: 3px; }
@media (min-width: 900px) { .assure ul { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 1500px) { .hero { min-height: 570px; } .hero-art { min-height: 530px; } }
@media (max-width: 1100px) {
  .hero { min-height: 480px; gap: 0; }
  .hero-art { min-height: 430px; }
  .hero-house { width: 115%; }
  .floating-chip { padding: 10px 12px; font-size: 11px; max-width: 180px; }
}
@media (min-width: 681px) and (max-width: 1100px) { .home-headline { font-size: clamp(32px, 4.7vw, 50px); } }
/* Members see a 240px side rail from 960px, so the hero is narrower than the original's full-width page.
   "with José + Warren" can't wrap (~8.1em), so size the headline from the copy column left beside the rail:
   (100vw − rail − gutters − rail margin − gap) × 1.02 / 2.02, divided by ~8.4em of line (with headroom). */
@media (min-width: 960px) {
  .app.has-tabs .home-headline { font-size: clamp(32px, calc((100vw - var(--rail-w) - 2 * var(--gutter) - 48px) * 0.505 / 8.4), 68px); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 440px; }
  .hero-details > p.hero-lede { font-size: 16px; }
  .hero-art { min-height: 380px; }
  .floating-chip { font-size: 10px; padding: 9px 10px; max-width: 155px; }
  .how-strip { grid-template-columns: 1fr; gap: 14px; padding: 18px 16px; }
  .how-step { padding: 2px 4px; }
  .how-step + .how-step { border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
}
@media (max-width: 680px) {
  .view:has(.people-hero) { padding-top: 6px; }
  .people-hero {
    --welcome-heading-size: clamp(32px, 9.74vw, 46px);
    --welcome-house-size: min(440px, calc(100vw - 2 * var(--gutter)), max(240px, calc(100vh - 210px - var(--welcome-heading-size) * 2.45 - max(10px, env(safe-area-inset-bottom)))));
  }
  .hero { display: flex; flex-direction: column; min-height: 0; padding: 0 0 22px; gap: 0; }
  .people-hero .hero-copy { display: contents; }
  .people-hero .hero-art { order: 1; width: 100%; min-height: 0; height: var(--welcome-house-size); margin: 0 0 -10px; perspective: 1000px; overflow: visible; }
  .people-hero .hero-intro { order: 2; width: 100%; animation: hero-enter 0.8s var(--ease) both; }
  .people-hero .hero-intro .eyebrow { display: none; }
  .people-hero .hero-details { order: 3; width: 100%; margin-top: 22px; }
  .people-hero .house-scroll-layer { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; transform-style: preserve-3d; }
  .people-hero .hero-residents { width: var(--welcome-house-size); height: var(--welcome-house-size); max-width: none; max-height: none; }
  .hero-art::before { width: 115%; height: 43%; }
  .home-headline { font-size: var(--welcome-heading-size); margin-bottom: 0; line-height: 1.14; }
  .hero-details > p.hero-lede { font-size: 16px; line-height: 1.6; max-width: 100%; }
  .hero-actions { margin-top: 20px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-caption-row { margin-top: 15px; gap: 10px; }
  .hero-caption { font-size: 10px; }
  .motion-toggle { font-size: 12px; padding: 6px 10px; }
  .people-hero .floating-chip { font-size: 10px; max-width: 145px; padding: 9px 11px; }
  .people-hero .floating-chip.chip-one { top: 15%; left: 0; }
  .people-hero .floating-chip.chip-two { top: 63%; right: 0; }
}
@media (max-width: 390px) { .hero-details > p.hero-lede { font-size: 15px; } .people-hero .floating-chip { max-width: 125px; font-size: 9px; padding: 8px 9px; } }
@supports (height: 100svh) {
  @media (max-width: 680px) {
    .people-hero { --welcome-house-size: min(440px, calc(100vw - 2 * var(--gutter)), max(240px, calc(100svh - 210px - var(--welcome-heading-size) * 2.45 - max(10px, env(safe-area-inset-bottom))))); }
  }
}
/* Progressive mobile depth follows ordinary scrolling; all content stays visible. */
@supports (animation-timeline: view()) {
  @media (max-width: 680px) and (prefers-reduced-motion: no-preference) {
    .people-hero { view-timeline-name: --home-hero; view-timeline-axis: block; }
    .people-hero .house-scroll-layer { animation: house-scroll-depth 1s linear both; animation-timeline: --home-hero; animation-range: contain 0% exit 100%; }
    .people-hero .hero-art::before { animation: house-scroll-light 1s linear both; animation-timeline: --home-hero; animation-range: contain 0% exit 100%; }
    .people-hero .hero-details { animation: hero-details-appear 1s ease-out both; animation-timeline: view(block); animation-range: entry 0% entry 75%; }
    .hero-motion-paused .house-scroll-layer, .hero-motion-paused .hero-art::before, .hero-motion-paused .hero-details { animation-play-state: paused; }
  }
}
@keyframes house-scroll-depth { from { transform: translateY(0) scale(1) rotateX(0); } to { transform: translateY(-24px) scale(0.95) rotateX(3deg); } }
@keyframes house-scroll-light { from { opacity: 0.38; } to { opacity: 0.12; } }
@keyframes hero-details-appear { from { opacity: 0.78; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* -------------------------------------------------------- guide (chat Q&A) */

.app[data-route='questions'] .view { padding-top: var(--space-3); }
.guide { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-4); }
.guide-bar {
  position: sticky; top: 8px; z-index: 15; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: 24px; background: var(--glass-bar);
}
.guide-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.guide-who span { display: flex; flex-direction: column; line-height: 1.15; }
.guide-who small, .harmony-badge small { color: var(--muted); font-size: 0.72rem; }
.guide-progress { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.guide-count { font-family: var(--font-display); font-weight: 800; white-space: nowrap; color: var(--heading); }
.guide-count small { color: var(--muted); font-weight: 600; }
.progress { flex: 1; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; min-width: 40px; box-shadow: inset 0 1px 2px rgba(30, 63, 33, 0.08); }
.progress span { display: block; height: 100%; background: var(--progress); border-radius: inherit; transition: width 0.45s var(--ease); }
.guide-exit { font-size: var(--fs-sm); white-space: nowrap; }
@media (max-width: 520px) {
  .guide-who span { display: none; }
  .guide-exit { font-size: var(--fs-xs); }
}

.transcript { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; align-items: flex-end; gap: 10px; scroll-margin-top: 90px; }
.msg-avatar { flex: none; display: grid; }
.msg-you { flex-direction: column; align-items: flex-end; gap: 2px; }
.bubble { max-width: min(560px, 86%); padding: 13px 17px; border-radius: 22px; overflow-wrap: anywhere; }
.bubble-harmony {
  background: var(--bubble-harmony); border: 1px solid var(--glass-edge); border-bottom-left-radius: 6px; box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(120%); -webkit-backdrop-filter: blur(24px) saturate(120%);
  display: flex; flex-direction: column; gap: 6px;
}
.bubble-you { background: var(--bubble-you); color: var(--bubble-you-text); border: 1px solid var(--btn-edge); border-bottom-right-radius: 6px; font-weight: 650; box-shadow: var(--btn-primary-shadow); }
.bubble-extra { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; font-size: var(--fs-xs); font-weight: 600; opacity: 0.9; }
.bubble-extra .icon { margin-top: 2px; }
.bubble-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1.18; }
.bubble-lead { color: var(--accent-strong); font-weight: 700; font-size: var(--fs-sm); }
.bubble-help { color: var(--muted); font-size: var(--fs-sm); }
.change-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: var(--tap); min-width: var(--tap); padding: 0 10px; font-size: var(--fs-xs); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.change-link:hover { color: var(--text); }
.chapter { list-style: none; display: flex; justify-content: center; margin: 12px 0 4px; }
.chapter span { padding: 5px 14px; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); background: var(--surface); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-soft); }
.why { font-size: var(--fs-sm); color: var(--muted); }
.why summary { cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center; color: var(--unknown); font-weight: 700; }
.why p { margin-top: 4px; }

.typing-row { overflow: hidden; max-height: 70px; animation: typing-out 0.2s ease forwards 0.5s; }
@keyframes typing-out { to { opacity: 0; max-height: 0; margin-top: -10px; } }
.typing-demo, .typing { display: inline-flex; flex-direction: row; gap: 5px; align-items: center; min-height: 20px; }
.typing-demo i, .typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.1s ease-in-out infinite; }
.typing-demo i:nth-child(2), .typing i:nth-child(2) { animation-delay: 0.15s; }
.typing-demo i:nth-child(3), .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }
.enter { animation: bubble-in 0.5s var(--spring) both; animation-delay: calc(var(--delay, 0ms) + 0.55s); }
.msg-you.enter, .chapter.enter { animation-delay: 0s; }
/* The original question-enter slide, used for the reply tray. */
.tray.enter { animation: question-enter 0.4s var(--ease) both 0.75s; }
.tray.enter .chip { animation: chip-in 0.45s var(--spring) both; animation-delay: calc(0.8s + var(--i, 0) * 50ms); }
@keyframes bubble-in { from { opacity: 0; transform: translateY(12px) scale(0.96); transform-origin: bottom left; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(10px) scale(0.94); } }

.tray { display: flex; flex-direction: column; gap: var(--space-3); }
.tray-hint { font-size: var(--fs-sm); color: var(--muted); }
.chips { display: grid; gap: 10px; }
.chips-row { display: flex; flex-wrap: wrap; }
/* Chips are the original .option cards: tactile glass, check bubble on the right. */
.chip {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 14px 16px; text-align: left;
  border-radius: var(--radius-md); border: 1.5px solid var(--option-edge); background: var(--option-bg); color: var(--text);
  box-shadow: 0 4px 9px rgba(43, 76, 40, 0.055);
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.chip:hover { transform: translateX(2px); background: var(--option-hover); border-color: var(--accent-edge); }
.chip:active { transform: scale(0.98); }
.chip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chip-text strong { font-weight: 700; font-size: 0.95rem; line-height: 1.35; }
.chip-text small { color: var(--muted); font-size: var(--fs-xs); line-height: 1.45; }
.chip-check {
  order: 2; display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); color: transparent; background: var(--surface); transition: all var(--dur) var(--spring);
}
.chip.is-on { border-color: var(--accent-edge); background: var(--option-on); box-shadow: var(--glow); }
.chip.is-on .chip-check { background: var(--accent); border-color: transparent; color: var(--on-accent); transform: scale(1.08); }
.chip-small { min-height: var(--tap); padding: 9px 14px; border-radius: 16px; }
.chip-priority { flex: 1 1 140px; width: auto; }
.chip-idea { display: inline-flex; gap: 6px; width: auto; }
.tray-set { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tray-set legend { font-weight: 700; margin-bottom: 8px; padding: 0; color: var(--heading); }
.optional { color: var(--muted); font-weight: 500; }
.tray-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.guide-foot { text-align: center; color: var(--faint); font-size: var(--fs-xs); padding-top: var(--space-3); }
@media (min-width: 600px) {
  .tray { padding-left: 44px; }
  .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chips-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------- summary */

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.stat { padding: 16px; display: flex; flex-direction: column; gap: 2px; text-align: center; border-radius: var(--radius-md); }
.stat strong { font-family: var(--font-display); font-size: var(--fs-2xl); letter-spacing: -0.04em; line-height: 1.2; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: var(--fs-xs); color: var(--muted); }
.harmony-note { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.harmony-note p { color: var(--muted); }
.harmony-note strong { color: var(--heading); }
.summary-chapters { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.summary-chapter { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.summary-chapter h2 { font-size: var(--fs-lg); color: var(--accent-2); letter-spacing: -0.02em; }
.answers { margin: 0; display: flex; flex-direction: column; }
.answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.answer-row:first-child { border-top: 0; }
.answer-row dt { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 750; grid-column: 1; }
.answer-row dd { margin: 0; grid-column: 1; display: flex; flex-direction: column; gap: 2px; font-weight: 650; min-width: 0; }
.answer-row .housemate { display: flex; gap: 6px; font-weight: 550; color: var(--accent-strong); font-size: var(--fs-xs); }
.answer-row .housemate .icon { margin-top: 2px; }
.answer-row .change { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: var(--fs-sm); }
.next-cta { padding: var(--space-6) var(--space-5); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.next-cta h2 { font-size: var(--fs-xl); }
.next-cta p { color: var(--muted); }
@media (min-width: 840px) { .summary-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------- membership */

.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.plan-card { padding: var(--space-6) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.plan-card.is-active { max-width: 560px; }
.plan-name { font-size: var(--fs-lg); color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 7px; color: var(--heading); }
.price strong { font-family: var(--font-display); font-size: 3.4rem; font-weight: 800; letter-spacing: -0.065em; line-height: 1.05; }
.price span { color: var(--muted); }
.ticks { list-style: none; display: grid; gap: 11px; }
.ticks li { display: flex; gap: 10px; }
.ticks .icon { color: var(--accent); margin-top: 3px; }
.plan-badge { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--btn-primary); color: var(--on-accent); font-weight: 750; font-size: var(--fs-sm); }
.joined { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); border: 1px solid var(--glass-edge); }
@media (min-width: 760px) { .plan-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; } }

/* ------------------------------------------------------------- avatars */
/* The original portrait: ivory ring and a soft drop shadow. */

.avatar {
  display: inline-grid; place-items: center; flex: none; border-radius: 50%; position: relative;
  font-family: var(--font-display); font-weight: 800; color: #103d32;
  border: 3px solid var(--bg-elevated); box-shadow: 0 5px 9px rgba(55, 71, 34, 0.15);
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.85rem; border-width: 2px; }
.avatar-md { width: 46px; height: 46px; font-size: 1.05rem; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.6rem; border-width: 4px; }
.avatar-xl { width: 100px; height: 100px; font-size: 2rem; border-width: 4px; }
.avatar-photo { background: #d8e0c9 url('../shared/assets/portraits.webp') no-repeat; background-size: 300% 100%; }
.avatar-photo[data-portrait='0'] { background-position: 0% 30%; }
.avatar-photo[data-portrait='1'] { background-position: 50% 30%; }
.avatar-photo[data-portrait='2'] { background-position: 100% 30%; }
.avatar-initial { background: linear-gradient(140deg, #e8edd8, #cbdabc); }
.avatar-initial[data-tone='1'] { background: linear-gradient(140deg, #e3f0ea, #b9dccd); }
.avatar-initial[data-tone='2'] { background: linear-gradient(140deg, #f7eddb, #e9d3ae); }
.avatar-you { background: var(--btn-primary); color: var(--on-accent); font-size: 0.72em; letter-spacing: -0.02em; }
.avatar-you.avatar-md { font-size: 0.78rem; }
.avatar-you.avatar-sm { font-size: 0.6rem; }

/* -------------------------------------------------------------- people */

.deck { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); min-width: 0; }
.deck-count { color: var(--muted); font-weight: 650; font-size: var(--fs-sm); }
.deck-stack { position: relative; width: min(640px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); padding-top: 22px; }
.deck-ghost {
  grid-area: 1 / 1; height: 100%; display: flex; align-items: flex-start; justify-content: center; gap: 10px; padding-top: 6px;
  color: var(--faint); font-weight: 700; font-size: var(--fs-sm); pointer-events: none; transition: transform var(--dur-slow) var(--spring);
}
.deck-ghost .avatar { width: 26px; height: 26px; border-width: 2px; box-shadow: none; opacity: 0.6; }
.ghost-1 { transform: translateY(-12px) scale(0.96); opacity: 0.85; }
.ghost-2 { transform: translateY(-22px) scale(0.92); opacity: 0.55; }
.person-card {
  grid-area: 1 / 1; min-width: 0; position: relative; z-index: 2; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--glass-strong); border-radius: var(--radius); touch-action: pan-y; user-select: none;
  transition: transform var(--dur) var(--spring); animation: card-in 0.5s var(--spring) both;
}
.person-card.dragging { transition: none; cursor: grabbing; }
@media (max-width: 480px) { .person-card { padding: 21px 18px; } .card-name { font-size: var(--fs-xl); } }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
.card-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.card-id { flex: 1; min-width: 140px; }
.card-name { font-size: var(--fs-2xl); letter-spacing: -0.045em; }
.card-meta { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--fs-sm); }
.tagline { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 650; color: var(--accent-strong); letter-spacing: -0.02em; }
.bio { color: var(--muted); user-select: text; }
/* The original segmented control. */
.card-tabs { display: flex; gap: 4px; padding: 5px; border-radius: 19px; background: var(--sage); border: 1px solid var(--glass-edge); box-shadow: inset 0 2px 5px rgba(53, 84, 44, 0.055); overflow-x: auto; scrollbar-width: none; }
.tab {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 6px 14px;
  border: 0; border-radius: 15px; background: transparent; color: var(--muted); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected='true'] { background: var(--bg-elevated); box-shadow: 0 3px 7px var(--segment-shadow), inset 0 1px 0 var(--inset-highlight-strong); }
.tab-share[aria-selected='true'] { color: var(--ok); }
.tab-talk[aria-selected='true'] { color: var(--talk); }
.tab-unknown[aria-selected='true'] { color: var(--unknown); }
@media (max-width: 560px) {
  .card-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .tab { flex-direction: column; gap: 2px; padding: 6px 4px; border-radius: 13px; white-space: normal; text-align: center; line-height: 1.15; font-size: var(--fs-xs); }
}
.tab-panel { padding: 6px 2px; min-height: 120px; border-radius: var(--radius-sm); user-select: text; animation: rise-in 0.3s var(--ease) both; }
/* The original fit-blocks: shared (green), discuss (amber), unknown (blue). */
.fit-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.fit-list li { display: flex; flex-direction: column; gap: 2px; padding: 12px 15px; border-radius: 18px; background: var(--ok-bg); border: 1px solid var(--glass-edge); }
.tab-panel-talk .fit-list li { background: var(--talk-bg); }
.tab-panel-unknown .fit-list li { background: var(--unknown-bg); }
.fit-list li.is-essential { box-shadow: inset 3px 0 0 var(--talk); }
.fit-list strong { font-size: var(--fs-sm); color: var(--heading); }
.tab-panel-talk .fit-list strong { color: var(--talk); }
.tab-panel-unknown .fit-list strong { color: var(--unknown); }
.fit-list span { font-size: var(--fs-sm); color: var(--text); }
.fit-list small { font-size: var(--fs-xs); color: var(--muted); }
.fit-plan li { background: var(--surface-2) !important; }
.sub-head { font-size: 0.72rem; margin: 14px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.list-empty { padding: 12px 2px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--line); }
.card-actions .btn-primary, .card-actions .btn-secondary { flex: 1 1 180px; }
.deck-controls { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: min(640px, 100%); }
.deck-meta { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.dots { display: flex; gap: 6px; }
.dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--track); transition: width var(--dur) var(--spring), background var(--dur); }
.dots span.on { width: 24px; background: var(--accent); }
.deck-hint { font-size: var(--fs-xs); color: var(--faint); }
.hidden-people { padding: 14px 18px; }
.hidden-people summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 700; }
.hidden-people ul { list-style: none; display: grid; gap: 8px; margin-top: 8px; }
.hidden-people li { display: flex; align-items: center; gap: 10px; }
.hidden-people li span { flex: 1; }

.empty { padding: var(--space-7) var(--space-5); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.empty h2 { font-size: var(--fs-2xl); }
.empty p { color: var(--muted); max-width: 460px; }
.empty-art { animation: house-float 8s ease-in-out infinite; }

/* --------------------------------------------------------------- intro */

.intro-head { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.compose { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); max-width: 720px; }
.field-label { font-weight: 700; color: var(--heading); }
textarea {
  display: block; width: 100%; min-width: 0; min-height: 120px; resize: vertical; padding: 13px 15px; border-radius: 16px;
  border: 1.5px solid var(--border-strong); background: var(--input-bg); color: var(--text); line-height: 1.55; box-shadow: var(--input-shadow);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
textarea::placeholder { color: var(--faint); }
textarea:focus { outline: none; border-color: var(--accent-edge); }
textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); color: var(--muted); }
.suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hint-line { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: var(--fs-sm); }
.hint-line .icon { color: var(--accent); }
.notice { display: flex; gap: 10px; padding: 14px 17px; border-radius: var(--radius-sm); background: var(--ok-bg); border: 1px solid var(--glass-edge); color: var(--text); font-size: var(--fs-sm); line-height: 1.55; }
.compose .btn-xl { align-self: flex-start; }
.waiting { padding: var(--space-6) var(--space-5); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; max-width: 720px; }
.waiting p { color: var(--muted); }
.waiting-orbit { position: relative; display: grid; place-items: center; width: 120px; height: 120px; }
.ping { position: absolute; inset: 10px; border-radius: 50%; border: 2px solid var(--accent); animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(0.7); opacity: 0.9; } to { transform: scale(1.35); opacity: 0; } }
.sent-message { margin: 0; padding: 14px 18px; border-radius: 20px 20px 6px 20px; background: var(--bubble-you); color: var(--bubble-you-text); font-weight: 600; max-width: 520px; text-align: left; overflow-wrap: anywhere; box-shadow: var(--btn-primary-shadow); }

/* Preview-only controls: the original amber "warning" notice, dashed. */
.demo-panel { width: 100%; border: 1.5px dashed var(--talk); border-radius: var(--radius-md); padding: 12px 14px; background: var(--talk-bg); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.demo-label { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-xs); color: var(--talk); }
.demo-label .icon { margin-top: 1px; }
.demo-label strong { color: var(--talk); }
.demo-body { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------ messages */

.thread-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); max-width: 820px; }
.thread { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-radius: 24px; }
.thread-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.thread-text { min-width: 0; flex: 1; }
.thread-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.thread-preview { color: var(--muted); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.thread-declined { opacity: 0.75; }

/* ---------------------------------------------------------------- chat */

.chat { max-width: 820px; gap: var(--space-3); }
.chat-head { position: sticky; top: 8px; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 24px; background: var(--glass-bar); flex-wrap: wrap; }
.chat-who { flex: 1; min-width: 150px; }
.chat-who h1 { font-size: var(--fs-lg); letter-spacing: -0.02em; }
.chat-who p { font-size: var(--fs-xs); color: var(--talk); }
.chat-log { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: var(--space-3) 0; min-height: 240px; }
.chat-day { display: flex; justify-content: center; }
.chat-day span { font-size: var(--fs-xs); color: var(--muted); padding: 4px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--glass-edge); }
.msg-them .bubble, .bubble-them { background: var(--bubble-harmony); border: 1px solid var(--glass-edge); border-bottom-left-radius: 6px; box-shadow: var(--shadow-soft); }
.msg-you .bubble-you { font-weight: 550; }
.bubble small { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 4px; font-size: 0.7rem; opacity: 0.8; }
.demo-tag { padding: 1px 8px; border-radius: var(--radius-pill); background: var(--talk-bg); color: var(--talk); font-weight: 700; }
.chat .msg.enter { animation-delay: 0s; }
.chat-log .msg { scroll-margin-bottom: calc(var(--tabbar-h) + 110px); }
.composer { position: sticky; bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom)); z-index: 10; display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 24px; background: var(--glass-strong); }
.composer textarea { min-height: 48px; max-height: 160px; border-radius: 18px; resize: none; field-sizing: content; }
.btn-send { width: 52px; height: 48px; padding: 0; flex: none; }
.chat-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.demo-btn { border-style: dashed; border-color: var(--talk); color: var(--talk); }
@media (min-width: 960px) { .composer { bottom: 16px; } }

/* ---------------------------------------------------------------- crew */

.crew-hero { padding: var(--space-5); display: grid; gap: var(--space-5); align-items: center; justify-items: center; }
.orbit { --size: min(320px, 64vw); --r: calc(var(--size) / 2 - 4px); position: relative; width: var(--size); height: var(--size); margin: 30px auto; }
.orbit-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.orbit-ring circle { fill: none; stroke-width: 3; }
.orbit-ring .track { stroke: var(--track); stroke-dasharray: 2 8; }
.orbit-ring .fill { stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(79, 184, 143, 0.55)); transition: stroke-dasharray var(--dur-slow) var(--spring); }
.orbit-ring .tick { fill: var(--talk); stroke: none; }
.orbit-center { position: absolute; inset: 22%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: var(--house-glow); }
.orbit-center svg { filter: drop-shadow(0 8px 12px rgba(35, 86, 67, 0.18)); }
.orbit.is-ready .orbit-center svg { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { transform: scale(1.06); } }
.orbit-center strong { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; color: var(--heading); }
.orbit-center strong small { font-size: 1rem; color: var(--muted); }
.orbit-center span { font-size: var(--fs-xs); color: var(--muted); }
.orbit-seats { list-style: none; position: absolute; inset: 0; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seat { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) rotate(calc(var(--a) * -1)); }
.seat-inner { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; animation: spin 90s linear infinite reverse; }
.orbit.is-paused .orbit-seats, .orbit.is-paused .seat-inner,
.orbit:hover .orbit-seats, .orbit:hover .seat-inner,
.crew-hero:focus-within .orbit-seats, .crew-hero:focus-within .seat-inner { animation-play-state: paused; }
.orbit-toggle { align-self: flex-start; min-height: var(--tap); padding: 6px 14px; font-size: var(--fs-xs); }
.seat-label { font-size: 0.7rem; font-weight: 700; white-space: nowrap; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-elevated); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-soft); }
.seat-empty { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px dashed var(--border-strong); color: var(--faint); background: var(--surface-2); }
.seat-empty + .seat-label { color: var(--faint); }
.seat-pending .avatar { opacity: 0.6; border-color: var(--talk); animation: pulse 2s ease-in-out infinite; }
.seat-pending .seat-label { color: var(--talk); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--talk-bg); } }
.crew-status { display: flex; flex-direction: column; gap: var(--space-3); max-width: 440px; }
.crew-status h2 { font-size: var(--fs-xl); }
.crew-status p { color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; box-shadow: inset 0 1px 2px rgba(30, 63, 33, 0.08); }
.meter span { display: block; height: 100%; background: var(--progress); border-radius: inherit; transition: width var(--dur-slow) var(--ease); }
.lock-line { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-sm); }
.lock-line .icon { margin-top: 3px; color: var(--accent-2); }
.crew-section { display: flex; flex-direction: column; gap: var(--space-3); }
.members { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.member { padding: 16px; display: flex; flex-direction: column; gap: 12px; border-radius: 24px; transition: box-shadow var(--dur-slow); }
.member.is-done { box-shadow: var(--glow), var(--shadow); }
.member-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.member-head > div { flex: 1; min-width: 120px; }
.member-head h3 { font-size: var(--fs-lg); letter-spacing: -0.02em; }
.confirm-remove { display: flex; flex-wrap: wrap; gap: 6px; }
.rings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ring-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: var(--tap); padding: 10px 6px; border-radius: 17px;
  border: 1px solid var(--glass-edge); background: var(--surface); color: var(--muted); font-size: var(--fs-xs); font-weight: 650; text-align: center;
  box-shadow: var(--shadow-soft); transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.ring-btn:hover { border-color: var(--accent-edge); color: var(--text); }
.ring { position: relative; display: grid; place-items: center; width: 44px; height: 44px; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring-track { stroke: var(--track); }
.ring-fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100.6; stroke-dashoffset: 100.6; transition: stroke-dashoffset var(--dur-slow) var(--spring); }
.ring .icon { color: var(--accent); opacity: 0; transform: scale(0.4); transition: all var(--dur) var(--spring); }
.ring-btn.is-on { color: var(--heading); border-color: var(--accent-edge); background: var(--option-on); }
.ring-btn.is-on .ring-fill { stroke-dashoffset: 0; }
.ring-btn.is-on .ring .icon { opacity: 1; transform: scale(1); }
.invite-list { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.invite { padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 24px; }
.invite-text { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.invite-actions .demo-panel { width: auto; }
.whats-left { padding: 14px 18px; }
.whats-left summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; font-weight: 700; }
.whats-left ul { padding-left: 20px; color: var(--muted); display: grid; gap: 4px; margin-top: 6px; }
@media (min-width: 840px) {
  .crew-hero { grid-template-columns: auto 1fr; justify-items: start; column-gap: var(--space-4); }
  .crew-hero .orbit { margin: 36px 60px; }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------- homes */
/* The original home card: an inset photo inside a glass frame. */

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.home-card { overflow: hidden; display: flex; flex-direction: column; padding: 8px; border-radius: 30px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.home-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.home-card.is-linked { box-shadow: var(--glow), var(--shadow); border-color: var(--accent-edge); }
.home-media { position: relative; aspect-ratio: 1.55; overflow: hidden; border-radius: 23px; background: var(--sage); }
.home-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.65s var(--ease); }
.home-card:hover .home-media img { transform: scale(1.025); }
.home-badge { position: absolute; top: 13px; left: 13px; z-index: 1; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--bg-elevated); color: var(--talk); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08); font-size: var(--fs-xs); font-weight: 750; }
.home-body { padding: 18px 14px 14px; display: flex; flex-direction: column; gap: var(--space-3); }
.home-body h2 { font-size: var(--fs-xl); letter-spacing: -0.04em; }
.home-body > p { color: var(--muted); font-size: var(--fs-sm); }
.home-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.home-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--glass-edge); font-size: var(--fs-xs); color: var(--text); }
.home-more summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--unknown); font-weight: 700; }
.home-more p { color: var(--muted); font-size: var(--fs-sm); }
/* The original reaction row. */
.react { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.react-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; padding: 7px 6px; border-radius: 15px;
  border: 1px solid var(--glass-edge); background: var(--option-bg); color: var(--text); font-weight: 650; font-size: var(--fs-sm); box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s;
}
.react-btn:hover { transform: translateY(-1px); }
.react-btn.is-on { color: var(--on-accent); transform: translateY(-2px); box-shadow: inset 0 1px 3px rgba(228, 255, 239, 0.38), 0 4px 8px rgba(0, 79, 52, 0.12); }
.react-interested.is-on { background: var(--btn-primary); border-color: var(--btn-edge); }
.react-discuss.is-on { background: var(--talk); border-color: transparent; color: var(--bg-elevated); }
.react-pass.is-on { background: var(--danger); border-color: transparent; color: var(--on-danger); }
.crew-reactions { list-style: none; display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.crew-reactions li { display: flex; align-items: center; gap: 8px; }
.crew-reactions strong { color: var(--heading); }
@media (min-width: 720px) { .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------------------------------------------------------- next steps */
/* The original stage track, vertical. */

.journey { list-style: none; padding: var(--space-5); display: grid; gap: 4px; }
.journey-step { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; color: var(--muted); }
.journey-step:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 40px; bottom: -12px; width: 2px; background: var(--track); }
.journey-step.is-done:not(:last-child)::after { background: var(--accent); }
.journey-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--glass-edge); background: var(--sage); box-shadow: 0 0 0 1px var(--border-strong); font-weight: 800; font-size: var(--fs-sm); flex: none; color: var(--text); }
.journey-step.is-done { color: var(--text); }
.journey-step.is-done .journey-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--on-accent); }
.journey-step.is-current { color: var(--accent-strong); font-weight: 750; }
.journey-step.is-current .journey-dot { box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px var(--accent-soft); }
.service-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.service { padding: var(--space-5); display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.service h3 { font-size: var(--fs-lg); letter-spacing: -0.02em; }
.service p { color: var(--muted); flex: 1; }
.service-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--surface-2); color: var(--accent); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-soft); }
.service.is-on { box-shadow: var(--glow), var(--shadow); }
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); } }
.service .pill { white-space: normal; }

.harmony-badge { display: inline-flex; align-items: center; gap: 8px; }
.harmony-badge span { display: flex; flex-direction: column; line-height: 1.15; }
.harmony-mark .mark-a { stop-color: var(--mark-a); }
.harmony-mark .mark-b { stop-color: var(--mark-b); }
.harmony-mark .harmony-face { fill: var(--mark-face); }
.harmony-mark .harmony-smile { stroke: var(--mark-face); }
.harmony-mark.can-blink .harmony-eyes { transform-origin: center 27px; animation: blink 5s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.orbit-stop-a { stop-color: var(--orbit-a); }
.orbit-stop-b { stop-color: var(--orbit-b); }

/* ------------------------------------------------------ toasts & party */

.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(480px, calc(100vw - 2 * var(--gutter))); pointer-events: none; }
.app.has-tabs ~ .toasts { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .app.has-tabs ~ .toasts { bottom: 24px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 16px; border-radius: 18px; background: var(--toast-bg); color: var(--toast-text); border: 1px solid rgba(222, 255, 235, 0.3); box-shadow: 0 12px 30px rgba(4, 49, 31, 0.2); animation: toast-in 0.4s var(--spring) both; }
.toast p { flex: 1; font-size: var(--fs-sm); }
.toast-icon { color: var(--toast-accent); display: grid; }
.toast-warn .toast-icon { color: #ffd27a; }
.toast-action { min-height: var(--tap); padding: 0 12px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.12); color: var(--toast-accent); font-weight: 750; }
.toast-close { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 14px; background: transparent; color: var(--toast-text); opacity: 0.8; flex: none; }
.toast-close:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }
.toast :focus-visible { outline-color: #ffe38a; }
.toast.leaving { animation: toast-out 0.2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.celebrations { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 70; width: min(440px, calc(100vw - 2 * var(--gutter))); pointer-events: none; }
.celebration {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 24px; overflow: hidden;
  background: var(--glass-strong); border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lift), var(--glow);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); animation: party-in 0.6s var(--spring) both;
}
.celebration strong { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--heading); }
.celebration p { color: var(--muted); font-size: var(--fs-sm); }
.celebration-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--btn-primary); color: var(--on-accent); flex: none; animation: spin-pop 0.9s var(--spring) both 0.15s; }
.celebration-glow { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%); animation: sheen 1.6s ease 0.3s both; }
.celebration.leaving { animation: party-out 0.4s ease forwards; }
@keyframes party-in { from { opacity: 0; transform: translateY(-24px) scale(0.9); } }
@keyframes party-out { to { opacity: 0; transform: translateY(-16px); } }
@keyframes spin-pop { from { transform: rotate(-120deg) scale(0.3); } }
@keyframes sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.confetti { position: fixed; inset: 0; z-index: 65; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; border-radius: 2px; background: var(--c); animation: fall 2.2s cubic-bezier(0.2, 0.6, 0.4, 1) var(--d) both; }
.confetti i.round { width: 9px; height: 9px; border-radius: 50%; }
@keyframes fall { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* -------------------------------------------------------------- dialog */

.dialog { max-width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--glass-edge); border-radius: var(--radius); background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-lift); }
.dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); }
.dialog form { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.dialog h2 { font-size: var(--fs-xl); }
.dialog ul { padding-left: 20px; color: var(--muted); margin: 8px 0; display: grid; gap: 2px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: var(--space-2); }
.dialog[open] { animation: page-enter 0.3s var(--ease); }

/* ------------------------------------------- original entrances + reveal */

.route-enter { animation: page-enter 0.45s var(--ease) backwards; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-enter { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes question-enter { from { opacity: 0.4; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes house-float { 0%, 100% { transform: translateY(0) rotate(-0.3deg); } 50% { transform: translateY(-9px) rotate(0.3deg); } }
@keyframes chip-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes ribbon-drift { 0%, 100% { transform: rotate(-22deg) translateY(0); } 50% { transform: rotate(-18deg) translateY(12px); } }

/* ---------------------------------------------------- view transitions */
/* Route changes use the original page-enter motion inside a View Transition. */

::view-transition-old(root) { animation: vt-out 0.22s var(--ease) both; }
::view-transition-new(root) { animation: page-enter 0.45s var(--ease) both; }
html[data-direction='back']::view-transition-new(root) { animation-name: vt-in-back; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateY(-8px); } }

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .confetti, .typing-row { display: none !important; }
  .blob { animation: none !important; } /* the light pools stay, just still (like the original) */
  .orbit-seats, .seat-inner { animation: none !important; }
  .hero-house, .hero-art::before, .floating-chip, .empty-art { animation: none !important; }
  .name-track { animation: none !important; transform: none !important; will-change: auto; }
  .house-scene { animation: none !important; opacity: 0; }
  .house-scene-alex { opacity: 1; }
  .house-scroll-layer, .hero-details { animation: none !important; transform: none !important; opacity: 1; }
  .motion-toggle { display: none; }
  .reveal { opacity: 1; transform: none; }
  .btn:hover:not(:disabled), .icon-btn:hover:not(:disabled), .chip:hover, .home-card:hover, .react-btn:hover { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

@media (forced-colors: active) {
  .glass, .btn, .chip, .tab, .ring-btn, .react-btn, .tabs, .topbar-inner, .bubble { border: 1px solid CanvasText; }
  .chip.is-on, .tab[aria-selected='true'], .ring-btn.is-on, .react-btn.is-on, .tab-link.is-active { outline: 2px solid Highlight; }
  .ambient, .grain, body::before, .hero-art::before, .hero-art::after { display: none; }
  .name-window { color: CanvasText; }
  .motion-toggle { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }
  .brand strong, .stat strong { color: CanvasText; background: none; }
}
