:root {
  --ink: #081512;
  --ink-soft: #2a4238;
  --paper: #e8f1ea;
  --paper-2: #d8e8dd;
  --line: rgba(8, 21, 18, 0.12);
  --line-strong: rgba(8, 21, 18, 0.2);
  --teal: #0c7a6d;
  --teal-deep: #064942;
  --teal-glow: rgba(12, 122, 109, 0.38);
  --lime: #d6ff3a;
  --lime-soft: #b8f042;
  --lime-ink: #1c2a08;
  --coral: #e85a4f;
  --sand: #efe4d2;
  --glass: rgba(255, 255, 255, 0.48);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --shadow: 0 20px 50px rgba(8, 21, 18, 0.12);
  --shadow-lift: 0 28px 70px rgba(8, 21, 18, 0.16);
  --radius: 22px;
  --font-display: "Bricolage Grotesque", "Syne", sans-serif;
  --font-brand: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --max: 1120px;
  --aurora-a: rgba(214, 255, 58, 0.48);
  --aurora-b: rgba(12, 122, 109, 0.4);
  --aurora-c: rgba(214, 236, 220, 0.7);
  --aurora-d: rgba(214, 255, 58, 0.22);
  --bg-spot-1: rgba(214, 255, 58, 0.34);
  --bg-spot-2: rgba(12, 122, 109, 0.26);
  --bg-spot-3: rgba(214, 236, 220, 0.55);
  --bg-spot-4: rgba(12, 122, 109, 0.1);
  --bg-base-1: #f4faf5;
  --bg-base-2: var(--paper);
  --bg-base-3: #dcebe2;
  --theme-color: #e8f1ea;
  --spark-glow: rgba(214, 255, 58, 0.85);
  --orbit-a: rgba(12, 122, 109, 0.18);
  --orbit-b: rgba(214, 255, 58, 0.16);
  --orbit-c: rgba(12, 122, 109, 0.1);
  --ray-a: rgba(214, 255, 58, 0.07);
  --ray-b: rgba(12, 122, 109, 0.08);
  --orbit-opacity: 0.62;
  --cursor-a: rgba(214, 255, 58, 0.24);
  --cursor-b: rgba(12, 122, 109, 0.14);
}

/* allow theme colors to interpolate on class change */
@property --ink { syntax: "<color>"; inherits: true; initial-value: #081512; }
@property --ink-soft { syntax: "<color>"; inherits: true; initial-value: #2a4238; }
@property --paper { syntax: "<color>"; inherits: true; initial-value: #e8f1ea; }
@property --paper-2 { syntax: "<color>"; inherits: true; initial-value: #d8e8dd; }
@property --teal { syntax: "<color>"; inherits: true; initial-value: #0c7a6d; }
@property --teal-deep { syntax: "<color>"; inherits: true; initial-value: #064942; }
@property --teal-glow { syntax: "<color>"; inherits: true; initial-value: #0c7a6d61; }
@property --lime { syntax: "<color>"; inherits: true; initial-value: #d6ff3a; }
@property --lime-soft { syntax: "<color>"; inherits: true; initial-value: #b8f042; }
@property --lime-ink { syntax: "<color>"; inherits: true; initial-value: #1c2a08; }
@property --bg-spot-1 { syntax: "<color>"; inherits: true; initial-value: #d6ff3a57; }
@property --bg-spot-2 { syntax: "<color>"; inherits: true; initial-value: #0c7a6d42; }
@property --bg-spot-3 { syntax: "<color>"; inherits: true; initial-value: #d6ecdc8c; }
@property --bg-spot-4 { syntax: "<color>"; inherits: true; initial-value: #0c7a6d1a; }
@property --bg-base-1 { syntax: "<color>"; inherits: true; initial-value: #f4faf5; }
@property --bg-base-2 { syntax: "<color>"; inherits: true; initial-value: #e8f1ea; }
@property --bg-base-3 { syntax: "<color>"; inherits: true; initial-value: #dcebe2; }
@property --aurora-a { syntax: "<color>"; inherits: true; initial-value: #d6ff3a7a; }
@property --aurora-b { syntax: "<color>"; inherits: true; initial-value: #0c7a6d66; }
@property --aurora-c { syntax: "<color>"; inherits: true; initial-value: #d6ecdcb3; }
@property --aurora-d { syntax: "<color>"; inherits: true; initial-value: #d6ff3a38; }
@property --cursor-a { syntax: "<color>"; inherits: true; initial-value: #d6ff3a3d; }
@property --cursor-b { syntax: "<color>"; inherits: true; initial-value: #0c7a6d24; }
@property --glass { syntax: "<color>"; inherits: true; initial-value: #ffffff7a; }
@property --glass-strong { syntax: "<color>"; inherits: true; initial-value: #ffffffd1; }
@property --line { syntax: "<color>"; inherits: true; initial-value: #0815121f; }
@property --line-strong { syntax: "<color>"; inherits: true; initial-value: #08151233; }

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 640px at 6% -10%, var(--bg-spot-1), transparent 56%),
    radial-gradient(980px 560px at 98% -4%, var(--bg-spot-2), transparent 50%),
    radial-gradient(760px 520px at 72% 92%, var(--bg-spot-3), transparent 54%),
    radial-gradient(520px 420px at 18% 72%, var(--bg-spot-4), transparent 58%),
    linear-gradient(
      168deg,
      var(--bg-base-1) 0%,
      var(--bg-base-1) 22%,
      var(--bg-base-2) 52%,
      var(--bg-base-2) 68%,
      var(--bg-base-3) 100%
    );
  overflow-x: hidden;
  transition:
    background 0.95s var(--ease),
    color 0.7s ease,
    --ink 0.7s ease,
    --ink-soft 0.7s ease,
    --paper 0.9s ease,
    --paper-2 0.9s ease,
    --teal 0.8s ease,
    --teal-deep 0.8s ease,
    --teal-glow 0.8s ease,
    --lime 0.8s ease,
    --lime-soft 0.8s ease,
    --lime-ink 0.8s ease,
    --bg-spot-1 0.95s ease,
    --bg-spot-2 0.95s ease,
    --bg-spot-3 0.95s ease,
    --bg-spot-4 0.95s ease,
    --bg-base-1 0.95s ease,
    --bg-base-2 0.95s ease,
    --bg-base-3 0.95s ease,
    --aurora-a 0.9s ease,
    --aurora-b 0.9s ease,
    --aurora-c 0.9s ease,
    --aurora-d 0.9s ease,
    --cursor-a 0.8s ease,
    --cursor-b 0.8s ease,
    --glass 0.7s ease,
    --glass-strong 0.7s ease,
    --line 0.7s ease,
    --line-strong 0.7s ease,
    --shadow 0.8s ease;
}

/* smooth theme wash when switching relation */
body.is-theme-flow::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 60% at 50% 38%,
    color-mix(in srgb, var(--lime) 22%, transparent),
    color-mix(in srgb, var(--teal) 10%, transparent) 45%,
    transparent 72%
  );
  opacity: 0;
  animation: themeFlowWash 0.95s var(--ease) both;
}

@keyframes themeFlowWash {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}

/* glyph theme switch: soft in-place morph (no flight) */
.mood-glyph.is-theme-morph-out,
.alive-motes i.is-theme-morph-out {
  animation: none !important;
  pointer-events: none !important;
  transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease !important;
  opacity: 0 !important;
  transform: scale(0.72) !important;
  filter: blur(3px) !important;
}

.mood-glyph.is-theme-morph-in,
.alive-motes i.is-theme-morph-in {
  animation: none !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1), filter 0.35s ease !important;
  opacity: 0.85 !important;
  transform: scale(1) !important;
  filter: none !important;
}

.mood-glyph.is-theme-gone,
.alive-motes i.is-theme-gone {
  animation: none !important;
  pointer-events: none !important;
  transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease !important;
  opacity: 0 !important;
  transform: scale(0.5) !important;
  filter: blur(4px) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(8, 21, 18, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 21, 18, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 10%, transparent 70%);
  z-index: 0;
  animation: gridDrift 48s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -25%;
  pointer-events: none;
  z-index: 0;
  /* soft blobs only — conic mesh made a hard diagonal color cut */
  background:
    radial-gradient(ellipse 55% 45% at 28% 22%, var(--mesh-a, rgba(214, 255, 58, 0.07)), transparent 70%),
    radial-gradient(ellipse 50% 40% at 78% 48%, var(--mesh-b, rgba(12, 122, 109, 0.08)), transparent 68%),
    radial-gradient(ellipse 48% 42% at 52% 88%, var(--mesh-a, rgba(214, 255, 58, 0.05)), transparent 72%);
  filter: blur(48px);
  animation: meshDrift 70s var(--ease) infinite alternate;
  opacity: 0.55;
}

@keyframes meshDrift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(3%, 2%, 0) scale(1.06);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 56px 56px, 56px 56px;
  }
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  z-index: 1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 35%, transparent 38%, rgba(8, 21, 18, 0.1) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 28%, transparent 72%, rgba(8, 21, 18, 0.06) 100%);
}

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 16s var(--ease) infinite alternate;
  will-change: transform;
}

.aurora-blob.a {
  width: 48vw;
  height: 48vw;
  left: -14%;
  top: -18%;
  background: var(--aurora-a);
}

.aurora-blob.b {
  width: 40vw;
  height: 40vw;
  right: -12%;
  top: 12%;
  background: var(--aurora-b);
  animation-delay: -5s;
}

.aurora-blob.c {
  width: 44vw;
  height: 32vw;
  left: 28%;
  bottom: -20%;
  background: var(--aurora-c);
  animation-delay: -10s;
}

.aurora-blob.d {
  width: 28vw;
  height: 28vw;
  left: 55%;
  top: 40%;
  background: var(--aurora-d);
  animation-delay: -3s;
  animation-duration: 22s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(5%, 7%, 0) scale(1.14);
  }
}

.spark-field {
  display: none !important;
}

.spark {
  display: none !important;
}

@keyframes sparkFloat {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.4);
  }
  15% {
    opacity: 0.85;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) scale(1);
  }
}

.cursor-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle, var(--cursor-a), transparent 55%),
    radial-gradient(circle, var(--cursor-b), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  mix-blend-mode: multiply;
}

body.has-glow .cursor-glow {
  opacity: 1;
}

.view {
  position: relative;
  z-index: 3;
  display: none;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(14px);
}

#view-welcome,
#view-landing {
  overflow: clip;
}

.view[hidden] {
  display: none !important;
}

.view.is-active {
  display: block;
  opacity: 1;
  transform: none;
  animation: viewIn 0.7s var(--ease) both;
}

.view.is-active[hidden] {
  display: block !important;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem clamp(1rem, 4vw, 2.5rem);
  /* room for fixed invite-fab (+ orbit icon) so top-link never overlaps */
  padding-right: max(11.5rem, calc(env(safe-area-inset-right) + 10.8rem));
  position: relative;
  z-index: 5;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.05em;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease);
}

.logo-mark {
  width: 2.05rem;
  height: 2.05rem;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--teal) 30%, transparent));
  transition: transform 0.35s var(--ease-spring), filter 0.45s var(--ease);
}

.logo-word {
  line-height: 1;
}

.logo:hover {
  opacity: 0.92;
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.06);
}

.top-link,
.step-pill {
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink-soft);
  font: 600 0.88rem/1 var(--font-body);
  padding: 0.68rem 1rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(12, 24, 20, 0.05);
  transition:
    transform 0.3s var(--ease),
    background 0.3s ease,
    border-color 0.3s ease;
}

.top-link:hover {
  transform: translateY(-2px);
  background: var(--glass-strong);
  border-color: var(--line-strong);
}

.step-pill {
  cursor: default;
  background: linear-gradient(135deg, rgba(210, 255, 63, 0.18), var(--glass));
}

/* —— HERO —— */
.welcome-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.welcome-orbit {
  position: absolute;
  left: 58%;
  top: 42%;
  width: min(92vw, 720px);
  height: min(92vw, 720px);
  transform: translate(-40%, -50%);
}

.welcome-ring {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1.5px solid rgba(12, 122, 109, 0.16);
  animation: spin 36s linear infinite;
}

.welcome-ring.wr-1 {
  width: 100%;
  height: 100%;
  border-style: dashed;
}

.welcome-ring.wr-2 {
  width: 68%;
  height: 68%;
  border-color: rgba(214, 255, 58, 0.28);
  animation-direction: reverse;
  animation-duration: 24s;
}

.welcome-ring.wr-3 {
  width: 38%;
  height: 38%;
  border-color: rgba(12, 122, 109, 0.22);
  animation-duration: 16s;
}

.welcome-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(22vw, 150px);
  height: min(22vw, 150px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.55), transparent 42%),
    radial-gradient(circle at 50% 55%, #0c7a6d, #064942 70%, #031a16);
  box-shadow:
    0 0 0 14px rgba(12, 122, 109, 0.08),
    0 30px 60px rgba(8, 21, 18, 0.22);
  animation: welcomeCorePulse 5s var(--ease) infinite;
}

.welcome-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
}

.welcome-dot.wd-a {
  background: var(--lime);
  box-shadow: 0 0 0 6px rgba(214, 255, 58, 0.2);
  animation: welcomeOrbitA 10s var(--ease) infinite;
}

.welcome-dot.wd-b {
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(12, 122, 109, 0.18);
  animation: welcomeOrbitB 10s var(--ease) infinite;
}

.welcome-waveband {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 12%;
  height: clamp(90px, 18vh, 160px);
  opacity: 0.45;
}

.welcome-waveband svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.welcome-waveband path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.welcome-waveband path:first-child {
  stroke: var(--teal);
  stroke-dasharray: 12 10;
  opacity: 0.55;
  animation: dash 6s linear infinite;
}

.welcome-waveband path:last-child {
  stroke: var(--lime-soft);
  stroke-width: 2;
  stroke-dasharray: 4 14;
  opacity: 0.4;
  animation: dash 8s linear infinite reverse;
}

@keyframes welcomeCorePulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes welcomeOrbitA {
  0%,
  100% {
    transform: translate(-210px, -40px);
  }
  50% {
    transform: translate(170px, 50px);
  }
}

@keyframes welcomeOrbitB {
  0%,
  100% {
    transform: translate(190px, 36px);
  }
  50% {
    transform: translate(-160px, -48px);
  }
}

.welcome-wrap {
  position: relative;
  z-index: 2;
  max-width: 42rem;
  margin: 0;
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem clamp(1.1rem, 5vw, 3.5rem) max(3rem, env(safe-area-inset-bottom));
  animation: fadeUp 0.75s var(--ease) both;
}

.welcome-wrap .brand {
  margin: 0 0 0.35rem;
  font-size: clamp(3.4rem, 11vw, 7.2rem);
}

.welcome-wrap h1 {
  margin: 0.1rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.6vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 18ch;
  animation: fadeUp 0.8s 0.2s var(--ease) both;
}

.welcome-wrap .lead {
  margin: 0 0 1.55rem;
  max-width: 32rem;
  font-size: clamp(1rem, 2.1vw, 1.12rem);
  line-height: 1.5;
  color: var(--ink-soft);
  animation: fadeUp 0.8s 0.35s var(--ease) both;
}

.welcome-wrap .hero-actions {
  animation: fadeUp 0.8s 0.5s var(--ease) both;
}

.intro-hello {
  margin: 0.35rem 0 0.55rem;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 600;
  color: var(--teal-deep);
  letter-spacing: -0.01em;
}

.relation-actions {
  flex-wrap: wrap;
  gap: 0.65rem;
}

.relation-actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 9.5rem);
}

.relation-continue {
  margin-top: 1rem;
  max-width: 100%;
  width: 100%;
  animation: fadeUp 0.45s var(--ease) both;
}

.relation-continue[hidden] {
  display: none !important;
}

.btn-probe {
  margin-top: 1.15rem;
  width: min(100%, 34rem);
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 1.1rem 1.25rem 1.2rem;
  border-radius: 18px;
  border: 1.5px solid color-mix(in srgb, var(--teal) 32%, transparent);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  box-shadow: none;
  outline: none;
  transition:
    transform 0.35s var(--ease-spring),
    border-color 0.3s ease,
    background 0.3s ease;
  animation: probePulse 2.8s ease-in-out infinite;
}

.btn-probe:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--teal) 40%, transparent);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.probe-badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0;
  border-radius: 0;
  background: transparent;
  color: #22c55e;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(34, 197, 94, 0.45);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

.btn-probe.is-tone-couple {
  border-color: rgba(255, 59, 92, 0.55);
  background: rgba(255, 59, 92, 0.14);
  box-shadow: 0 0 28px rgba(255, 59, 92, 0.2);
}

.btn-probe.is-tone-couple .probe-badge {
  color: #ff3b5c;
  text-shadow: 0 0 18px rgba(255, 59, 92, 0.55);
}

.btn-probe.is-tone-couple .probe-title,
.btn-probe.is-tone-couple .probe-desc {
  color: #7a1024;
}

.btn-probe.is-tone-friends {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(255, 159, 26, 0.16);
  box-shadow: 0 0 28px rgba(249, 115, 22, 0.22);
}

.btn-probe.is-tone-friends .probe-badge {
  color: #f97316;
  text-shadow: 0 0 18px rgba(249, 115, 22, 0.55);
}

.btn-probe.is-tone-friends .probe-title,
.btn-probe.is-tone-friends .probe-desc {
  color: #7a3d08;
}

.btn-probe.is-tone-family {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.16);
  box-shadow: 0 0 28px rgba(37, 99, 235, 0.22);
}

.btn-probe.is-tone-family .probe-badge {
  color: #38bdf8;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
}

.btn-probe.is-tone-family .probe-title,
.btn-probe.is-tone-family .probe-desc {
  color: #0f2744;
}

@keyframes probePulse {
  0%,
  100% { border-color: rgba(12, 24, 20, 0.14); }
  50% { border-color: color-mix(in srgb, var(--teal) 35%, rgba(12, 24, 20, 0.1)); }
}

.btn-probe.is-tone-couple,
.btn-probe.is-tone-friends,
.btn-probe.is-tone-family {
  animation: none;
}

.btn-relation {
  /* palette + layout owned by design-delight.css */
}

.probe-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: color 0.35s ease;
}

.probe-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 0.35s ease;
}

.probe-result-wrap {
  max-width: 520px;
}

.probe-bars {
  margin: 1.5rem 0 1.75rem;
  display: grid;
  gap: 0.85rem;
}

.probe-bar-row {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--glass);
}

.probe-bar-row.is-win {
  border-color: color-mix(in srgb, var(--teal) 45%, transparent);
  background: color-mix(in srgb, var(--teal) 10%, var(--glass-strong));
  box-shadow: 0 10px 28px color-mix(in srgb, var(--teal) 12%, transparent);
}

.probe-bar-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.probe-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(12, 24, 20, 0.08);
  overflow: hidden;
}

.probe-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--lime));
  transition: width 1s var(--ease);
}

.probe-result-actions {
  display: grid;
  gap: 0.7rem;
}

body.theme-couple .btn-probe,
body.theme-friends .btn-probe,
body.theme-family .btn-probe {
  background: rgba(255, 255, 255, 0.14);
}

.intro-wrap {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem) max(2.5rem, env(safe-area-inset-bottom));
  display: grid;
  gap: clamp(1.75rem, 4vh, 2.75rem);
}

.intro-copy {
  max-width: 38rem;
  animation: fadeUp 0.7s var(--ease) both;
}

.intro-copy .brand {
  margin: 0;
}

.intro-copy h1 {
  margin: 0.15rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.2vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.intro-copy .lead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.intro-pick {
  animation: fadeUp 0.75s var(--ease) 0.08s both;
}

.intro-pick-title {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
}

.intro-pick-lead {
  margin: 0 0 0.25rem;
}

.intro-wrap .relation-grid {
  margin-top: 1.25rem;
}

.hero {
  height: calc(100vh - 72px);
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  padding: 0 clamp(1.1rem, 5vw, 3.5rem) clamp(1.4rem, 4vh, 2.8rem);
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  mask-image: linear-gradient(180deg, #000 0%, #000 72%, rgba(0, 0, 0, 0.4) 90%, transparent 100%);
}

.hero-visual::after {
  content: none;
  display: none;
}

.orbit-stage {
  position: absolute;
  inset: -6% 0 8%;
  display: grid;
  place-items: center;
  transition: transform 0.45s var(--ease);
  will-change: transform;
  transform: scale(1.08);
}

.light-rays {
  position: absolute;
  width: min(90vw, 720px);
  height: min(90vw, 720px);
  border-radius: 50%;
  /* denser soft sunbeams around the core */
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 8deg,
    var(--ray-a) 14deg,
    transparent 22deg 38deg,
    var(--ray-b) 44deg,
    transparent 52deg 68deg,
    var(--ray-a) 74deg,
    transparent 82deg 98deg,
    var(--ray-b) 104deg,
    transparent 112deg 128deg,
    var(--ray-a) 134deg,
    transparent 142deg 158deg,
    var(--ray-b) 164deg,
    transparent 172deg 180deg
  );
  animation: spin 50s linear infinite;
  filter: blur(22px);
  opacity: calc(var(--orbit-opacity) * 0.72);
  transition: opacity 0.5s ease;
}

.orbit-ring {
  position: absolute;
  border: 1px solid var(--orbit-a);
  border-radius: 50%;
  animation: spin 40s linear infinite;
  box-shadow:
    inset 0 0 40px var(--orbit-b),
    0 0 30px var(--orbit-c);
  opacity: var(--orbit-opacity);
  transition:
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    opacity 0.5s ease;
}

.ring-1 {
  width: min(78vw, 700px);
  height: min(78vw, 700px);
  border-style: dashed;
  border-width: 1.5px;
}

.ring-2 {
  width: min(58vw, 510px);
  height: min(58vw, 510px);
  animation-direction: reverse;
  animation-duration: 28s;
  border-color: var(--orbit-b);
}

.ring-3 {
  width: min(38vw, 330px);
  height: min(38vw, 330px);
  animation-duration: 18s;
  border-color: var(--orbit-a);
}

.ring-4 {
  width: min(22vw, 180px);
  height: min(22vw, 180px);
  animation-direction: reverse;
  animation-duration: 12s;
  border-color: var(--orbit-b);
  border-style: dotted;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wave {
  position: absolute;
  width: min(92vw, 860px);
  height: 190px;
  opacity: calc(var(--orbit-opacity) * 0.9);
  filter: drop-shadow(0 0 12px var(--orbit-c));
  transition: opacity 0.5s ease;
}

.wave svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wave-path {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.wave-a .wave-path {
  stroke: var(--teal);
  stroke-dasharray: 14 11;
  animation: dash 5.5s linear infinite;
  opacity: 0.55;
}

.wave-b {
  transform: translateY(30px);
  opacity: 0.45;
}

.wave-b .wave-path {
  stroke: var(--teal-deep);
  stroke-opacity: 0.45;
  stroke-width: 2.5;
  animation: dash 7.2s linear infinite reverse;
}

.wave-c {
  transform: translateY(-18px) scaleY(0.85);
  opacity: 0.35;
}

.wave-c .wave-path {
  stroke: var(--lime-soft);
  stroke-width: 2;
  stroke-dasharray: 4 14;
  animation: dash 9s linear infinite;
  opacity: 0.5;
}

@keyframes dash {
  to {
    stroke-dashoffset: -240;
  }
}

.phase-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.phase-dot i {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.dot-a {
  animation: orbitA 9s var(--ease) infinite;
}

.dot-a i {
  background: var(--teal);
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--teal) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--teal) 45%, transparent);
  opacity: 0.75;
}

.dot-b {
  animation: orbitB 9s var(--ease) infinite;
}

.dot-b i {
  background: var(--lime);
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--lime) 22%, transparent),
    0 0 28px color-mix(in srgb, var(--lime) 55%, transparent);
  opacity: 0.75;
}

@keyframes orbitA {
  0%,
  100% {
    transform: translate(-150px, -24px);
  }
  50% {
    transform: translate(130px, 34px);
  }
}

@keyframes orbitB {
  0%,
  100% {
    transform: translate(150px, 28px);
  }
  50% {
    transform: translate(-120px, -32px);
  }
}

.phase-core {
  position: relative;
  width: min(46vw, 260px);
  height: min(46vw, 260px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  animation: pulseCore 4.2s var(--ease) infinite;
  transition:
    border-radius 0.55s var(--ease),
    transform 0.55s var(--ease-spring),
    filter 0.4s ease;
  z-index: 1;
}

.phase-core.is-morphing {
  animation: corePop 0.7s var(--ease-spring);
}

@keyframes corePop {
  0% { transform: scale(0.72) rotate(-8deg); }
  55% { transform: scale(1.14) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.core-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.75), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(210, 255, 63, 0.7), rgba(13, 122, 111, 0.5) 48%, transparent 70%);
  filter: blur(1px);
  box-shadow:
    0 0 80px rgba(210, 255, 63, 0.35),
    0 0 140px rgba(13, 122, 111, 0.25);
  transition:
    background 0.55s ease,
    box-shadow 0.55s ease,
    border-radius 0.55s var(--ease),
    clip-path 0.55s var(--ease);
}

.core-shine {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.55), transparent 55%);
  animation: shineSpin 8s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.core-fx,
.core-face,
.core-radar,
.core-heart {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}

.core-heart {
  width: 100%;
  height: 100%;
  overflow: visible;
  z-index: 3;
  filter: drop-shadow(0 0 28px rgba(217, 72, 108, 0.55))
    drop-shadow(0 0 60px rgba(180, 35, 74, 0.35));
}

.core-heart .heart-body {
  transform-origin: 50% 55%;
}

.core-symbol {
  position: relative;
  z-index: 3;
  font-size: clamp(3.2rem, 12vw, 5.5rem);
  line-height: 1;
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.35s ease 0.12s,
    transform 0.55s var(--ease-spring) 0.08s;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
  user-select: none;
}

/* —— couple: полноценное бьющееся сердце —— */
.phase-core[data-shape="couple"] {
  animation: none;
  width: min(48vw, 260px);
  height: min(48vw, 260px);
}

.phase-core[data-shape="couple"] .core-glow {
  opacity: 0;
  visibility: hidden;
}

.phase-core[data-shape="couple"] .core-shine {
  opacity: 0;
  visibility: hidden;
}

.phase-core[data-shape="couple"] .core-symbol {
  display: none;
}

.phase-core[data-shape="couple"] .core-heart {
  opacity: 1;
  visibility: visible;
  animation: heartBeatShape 1.05s ease-in-out infinite;
  transform-origin: 50% 55%;
}

.phase-core[data-shape="couple"] .core-fx {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.phase-core[data-shape="couple"] .core-fx i {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 78%;
  height: 78%;
  border: 2px solid rgba(255, 143, 171, 0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: heartRipple 1.05s ease-out infinite;
}

.phase-core[data-shape="couple"] .core-fx i:nth-child(2) {
  animation-delay: 0.22s;
  border-color: rgba(217, 72, 108, 0.4);
}

.phase-core[data-shape="couple"] .core-fx i:nth-child(3) {
  animation-delay: 0.44s;
  border-color: rgba(255, 179, 198, 0.35);
}

@keyframes heartBeatShape {
  0%,
  28%,
  70%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 28px rgba(217, 72, 108, 0.55))
      drop-shadow(0 0 60px rgba(180, 35, 74, 0.35));
  }
  14% {
    transform: scale(1.16);
    filter: drop-shadow(0 0 40px rgba(255, 92, 138, 0.75))
      drop-shadow(0 0 90px rgba(180, 35, 74, 0.5));
  }
  42% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 34px rgba(217, 72, 108, 0.65))
      drop-shadow(0 0 70px rgba(180, 35, 74, 0.42));
  }
}

@keyframes heartRipple {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.65;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.55);
    opacity: 0;
  }
}

/* —— friends: warm playful face —— */
.phase-core[data-shape="friends"] {
  animation: friendsBob 3.4s var(--ease) infinite;
}

.phase-core[data-shape="friends"] .core-glow {
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.95), transparent 30%),
    radial-gradient(circle at 68% 72%, rgba(255, 160, 40, 0.35), transparent 42%),
    radial-gradient(circle at 50% 50%, #fff3a0 0%, #ffe566 34%, #f5c518 58%, #e8a010 78%, transparent 82%);
  box-shadow:
    0 0 60px rgba(255, 213, 74, 0.55),
    0 0 120px rgba(255, 176, 50, 0.35),
    0 0 180px rgba(234, 88, 12, 0.15);
}

.phase-core[data-shape="friends"] .core-shine {
  opacity: 0.55;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.7), transparent 48%);
}

.phase-core[data-shape="friends"] .core-symbol {
  display: none;
}

.phase-core[data-shape="friends"] .core-face {
  opacity: 1;
  visibility: visible;
  z-index: 3;
}

.face-eye {
  position: absolute;
  top: 34%;
  width: 15%;
  height: 17%;
  background: #1f1806;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    inset 0 -2px 0 rgba(255, 255, 255, 0.12),
    0 4px 10px rgba(42, 34, 8, 0.18);
  animation: eyeBlink 4.8s var(--ease) infinite;
}

.face-eye.left { left: 27%; }
.face-eye.right { right: 27%; animation-delay: 0.1s; }

.face-eye i {
  position: absolute;
  top: 18%;
  left: 30%;
  width: 36%;
  height: 36%;
  border-radius: 50%;
  background: #fffdf0;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  animation: pupilLook 4s var(--ease) infinite;
}

.face-brow {
  position: absolute;
  top: 27%;
  width: 14%;
  height: 3%;
  border-radius: 999px;
  background: rgba(42, 34, 8, 0.42);
  transform-origin: center;
  animation: browTalk 4s var(--ease) infinite;
}

.face-brow.left { left: 28%; --brow-rot: -10deg; }
.face-brow.right { right: 28%; --brow-rot: 10deg; animation-delay: 0.12s; }

.face-cheek {
  position: absolute;
  top: 50%;
  width: 14%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 90, 0.55), rgba(255, 120, 90, 0.08) 70%);
  filter: blur(0.5px);
  animation: cheekGlow 2.6s ease-in-out infinite;
}

.face-cheek.left { left: 15%; }
.face-cheek.right { right: 15%; animation-delay: 0.25s; }

.face-mouth {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 30%;
  height: 16%;
  border: 3.5px solid #2a2208;
  border-color: transparent transparent #2a2208;
  border-radius: 0 0 55% 55%;
  transform: translateX(-50%);
  animation: mouthMimic 4s var(--ease) infinite;
}

@keyframes friendsBob {
  0%,
  100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

@keyframes eyeBlink {
  0%,
  42%,
  46%,
  100% { transform: scaleY(1); }
  44% { transform: scaleY(0.08); }
  78%,
  82% { transform: scaleY(1); }
  80% { transform: scaleY(0.08); }
}

@keyframes pupilLook {
  0%,
  100% { transform: translate(0, 0); }
  25% { transform: translate(35%, 10%); }
  50% { transform: translate(-20%, -8%); }
  75% { transform: translate(10%, 18%); }
}

@keyframes browTalk {
  0%,
  100% { transform: translateY(0) rotate(var(--brow-rot, 0deg)); }
  30% { transform: translateY(-3px) rotate(var(--brow-rot, 0deg)); }
  55% { transform: translateY(1px) rotate(var(--brow-rot, 0deg)); }
}

@keyframes cheekGlow {
  0%,
  100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes mouthMimic {
  0%,
  100% {
    width: 28%;
    height: 14%;
    border-radius: 0 0 50% 50%;
    border-width: 0 0 3.5px 0;
    background: transparent;
  }
  25% {
    width: 34%;
    height: 18%;
    border-radius: 0 0 55% 55%;
  }
  45% {
    width: 18%;
    height: 18%;
    border-radius: 50%;
    border-width: 0;
    background: #2a2208;
  }
  65% {
    width: 32%;
    height: 12%;
    border-radius: 0 0 60% 60%;
    border-width: 0 0 3.5px 0;
    background: transparent;
  }
}

/* —— family: ДНК-клетка —— */
.phase-core[data-shape="family"] {
  animation: dnaCellBob 3.6s var(--ease) infinite;
  border-radius: 50%;
}

.phase-core[data-shape="family"] .core-glow {
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.7), transparent 30%),
    radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.35), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(147, 197, 253, 0.55) 0%, rgba(37, 99, 235, 0.55) 48%, rgba(30, 64, 175, 0.35) 72%, transparent 78%);
  box-shadow:
    0 0 90px rgba(59, 130, 246, 0.55),
    0 0 160px rgba(30, 78, 140, 0.4),
    inset 0 0 50px rgba(191, 219, 254, 0.25);
  filter: none;
  animation: dnaCellGlow 2.8s ease-in-out infinite;
}

.phase-core[data-shape="family"] .core-shine {
  border-radius: 50%;
  inset: 10%;
  opacity: 0.35;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.45), transparent 55%);
  animation: dnaMembranePulse 4s ease-in-out infinite;
}

.phase-core[data-shape="family"] .core-symbol {
  display: none;
}

.phase-core[data-shape="family"] .core-dna {
  opacity: 1;
  visibility: visible;
  z-index: 3;
}

.dna-halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1.5px solid rgba(147, 197, 253, 0.45);
  animation: dnaHalo 2.8s ease-out infinite;
}

.dna-halo.delay {
  inset: 0;
  animation-delay: 0.7s;
  border-color: rgba(96, 165, 250, 0.3);
}

.dna-membrane {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 2px dashed rgba(219, 234, 254, 0.55);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%);
  animation: dnaMembraneSpin 12s linear infinite, dnaMembranePulse 3.2s ease-in-out infinite;
}

.dna-nucleus {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(circle at 50% 55%, rgba(96, 165, 250, 0.5), rgba(30, 64, 175, 0.35) 70%, transparent 75%);
  box-shadow:
    0 0 30px rgba(96, 165, 250, 0.45),
    inset 0 0 20px rgba(255, 255, 255, 0.15);
  animation: dnaNucleusPulse 2.4s ease-in-out infinite;
}

.dna-helix {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  height: 62%;
  transform: translate(-50%, -50%);
  overflow: visible;
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.75));
  animation: dnaHelixFloat 3.2s ease-in-out infinite;
  z-index: 4;
}

.dna-strand {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 220;
  animation: dnaDraw 3.6s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(147, 197, 253, 0.8));
}

.dna-strand.right {
  animation-delay: -1.8s;
}

.dna-rungs line {
  stroke: rgba(191, 219, 254, 0.85);
  stroke-width: 2.2;
  stroke-linecap: round;
  animation: dnaRungFlash 2.2s ease-in-out infinite;
}

.dna-rungs line:nth-child(2) { animation-delay: 0.15s; }
.dna-rungs line:nth-child(3) { animation-delay: 0.3s; }
.dna-rungs line:nth-child(4) { animation-delay: 0.45s; }
.dna-rungs line:nth-child(5) { animation-delay: 0.6s; }
.dna-rungs line:nth-child(6) { animation-delay: 0.75s; }
.dna-rungs line:nth-child(7) { animation-delay: 0.9s; }
.dna-rungs line:nth-child(8) { animation-delay: 1.05s; }
.dna-rungs line:nth-child(9) { animation-delay: 1.2s; }

.dna-nodes circle {
  fill: #fff;
  transform-origin: center;
  transform-box: fill-box;
  filter: drop-shadow(0 0 5px rgba(147, 197, 253, 1));
  animation: dnaNodePulse 1.8s ease-in-out infinite;
}

.dna-nodes circle:nth-child(odd) { animation-delay: 0.25s; }
.dna-nodes circle:nth-child(3n) { animation-delay: 0.5s; }

.dna-orbit {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(147, 197, 253, 0.35);
  animation: dnaOrbitSpin 8s linear infinite;
}

.dna-orbit.o2 {
  inset: 22%;
  border-style: dashed;
  animation-duration: 11s;
  animation-direction: reverse;
  border-color: rgba(96, 165, 250, 0.3);
}

.dna-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #60a5fa 70%, transparent 100%);
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.95);
  offset-rotate: 0deg;
}

.dna-particle.p1 {
  left: 50%;
  top: 50%;
  margin: -4px 0 0 -4px;
  animation: dnaCircle 5.5s linear infinite;
}

.dna-particle.p2 {
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  animation: dnaCircle 7s linear infinite reverse;
}

.dna-particle.p3 {
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  animation: dnaCircle 4.2s linear infinite;
  animation-delay: -1.5s;
}

.dna-particle.p4 {
  left: 22%;
  top: 30%;
  animation: dnaDrift 3.4s ease-in-out infinite;
}

.dna-particle.p5 {
  right: 20%;
  top: 42%;
  width: 5px;
  height: 5px;
  animation: dnaDrift 2.8s ease-in-out infinite reverse;
}

.dna-particle.p6 {
  left: 40%;
  bottom: 18%;
  width: 6px;
  height: 6px;
  animation: dnaDrift 3.8s ease-in-out infinite 0.4s;
}

@keyframes dnaCellBob {
  0%,
  100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.03); }
}

@keyframes dnaCellGlow {
  0%,
  100% {
    filter: brightness(1) saturate(1);
    box-shadow:
      0 0 90px rgba(59, 130, 246, 0.55),
      0 0 160px rgba(30, 78, 140, 0.4),
      inset 0 0 50px rgba(191, 219, 254, 0.25);
  }
  50% {
    filter: brightness(1.15) saturate(1.2);
    box-shadow:
      0 0 120px rgba(96, 165, 250, 0.75),
      0 0 200px rgba(37, 99, 235, 0.5),
      inset 0 0 60px rgba(255, 255, 255, 0.28);
  }
}

@keyframes dnaHalo {
  0% { transform: scale(0.92); opacity: 0.75; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes dnaMembraneSpin {
  to { transform: rotate(360deg); }
}

@keyframes dnaMembranePulse {
  0%,
  100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes dnaNucleusPulse {
  0%,
  100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes dnaHelixFloat {
  0%,
  100% { transform: translate(-50%, -50%) rotate(-4deg) scale(1); }
  50% { transform: translate(-50%, calc(-50% - 4px)) rotate(4deg) scale(1.05); }
}

@keyframes dnaDraw {
  0%,
  100% { stroke-dashoffset: 0; opacity: 1; }
  50% { stroke-dashoffset: 40; opacity: 0.75; }
}

@keyframes dnaRungFlash {
  0%,
  100% { stroke: rgba(191, 219, 254, 0.35); stroke-width: 2; }
  40% { stroke: rgba(255, 255, 255, 0.95); stroke-width: 2.8; }
  70% { stroke: rgba(96, 165, 250, 0.8); }
}

@keyframes dnaNodePulse {
  0%,
  100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.45); opacity: 1; }
}

@keyframes dnaOrbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes dnaCircle {
  from { transform: rotate(0deg) translateX(68px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(68px) rotate(-360deg); }
}

@keyframes dnaDrift {
  0%,
  100% { transform: translate(0, 0) scale(0.8); opacity: 0.45; }
  50% { transform: translate(10px, -14px) scale(1.25); opacity: 1; }
}

body.theme-couple .core-glow,
body.theme-friends .core-glow,
body.theme-family .core-glow {
  /* shaped by data-shape above */
}

@keyframes shineSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseCore {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.88;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.orbit-specks {
  position: absolute;
  width: min(70vw, 580px);
  height: min(70vw, 580px);
  animation: spin 60s linear infinite;
}

.orbit-specks i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--spark-glow);
  opacity: 0.5;
}

.orbit-specks i:nth-child(1) {
  top: 8%;
  left: 48%;
}
.orbit-specks i:nth-child(2) {
  top: 42%;
  right: 4%;
  background: var(--teal);
  animation-delay: 0.5s;
}
.orbit-specks i:nth-child(3) {
  bottom: 12%;
  left: 30%;
}
.orbit-specks i:nth-child(4) {
  top: 22%;
  left: 12%;
  width: 3px;
  height: 3px;
}
.orbit-specks i:nth-child(5) {
  bottom: 28%;
  right: 18%;
  background: #fff;
}
.orbit-specks i:nth-child(6) {
  top: 58%;
  left: 6%;
  width: 4px;
  height: 4px;
  background: var(--teal);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.1rem 0 0;
}

.brand {
  position: relative;
  margin: 0 0 0.15rem;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.84;
  letter-spacing: -0.07em;
  display: flex;
  gap: 0.015em;
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(
    115deg,
    var(--ink) 12%,
    var(--teal-deep) 38%,
    #0a2f28 52%,
    var(--ink) 68%,
    #163d32 88%
  );
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: brandShimmer 8s ease-in-out infinite;
  /* no filter / no child transforms — both paint a solid white bar over clipped text */
  filter: none !important;
  isolation: auto;
}

@keyframes brandShimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.brand span {
  display: inline-block;
  /* opacity-only: transform breaks background-clip:text into a white stripe */
  animation: letterFade 0.85s var(--ease) both;
}

.brand span:nth-child(2) {
  animation-delay: 0.06s;
}
.brand span:nth-child(3) {
  animation-delay: 0.12s;
}
.brand span:nth-child(4) {
  animation-delay: 0.18s;
}

@keyframes letterFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes letterPop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero h1,
.how-wrap h2,
.setup-wrap h2,
.handoff-wrap h2,
.score-copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  max-width: 16ch;
  font-weight: 750;
  animation: fadeUp 0.8s 0.25s var(--ease) both;
}

.lead,
.setup-lead,
.handoff-text,
.result-lead {
  margin: 0.55rem 0 0;
  font-size: 1.02rem;
  line-height: 1.48;
  color: var(--ink-soft);
  max-width: 36ch;
}

.lead {
  animation: fadeUp 0.8s 0.4s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
  animation: fadeUp 0.8s 0.55s var(--ease) both;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none;
  border-radius: 15px;
  padding: 1.05rem 1.55rem;
  font: 700 0.98rem/1 var(--font-body);
  letter-spacing: -0.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.35s var(--ease-spring),
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(150deg, #183028 0%, var(--ink) 48%, #04110e 100%);
  color: var(--lime);
  box-shadow:
    0 16px 40px rgba(8, 21, 18, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  background: linear-gradient(150deg, var(--teal-deep), #042e28);
  color: #fff;
  box-shadow: 0 22px 48px rgba(6, 73, 66, 0.38);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-cta {
  min-width: 10.5rem;
  padding-inline: 1.85rem;
}

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 10px 28px rgba(12, 24, 20, 0.06);
}

.btn-ghost:hover {
  background: var(--glass-strong);
  transform: translateY(-3px);
  border-color: rgba(13, 122, 111, 0.28);
}

.btn-wide {
  width: 100%;
  margin-top: 1.5rem;
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(210, 255, 63, 0.45), transparent 75%);
  transform: translateX(-130%);
  animation: shine 3.2s ease-in-out infinite;
}

@keyframes shine {
  0%,
  55%,
  100% {
    transform: translateX(-130%);
  }
  70% {
    transform: translateX(130%);
  }
}

/* —— HOW —— */
.how-wrap,
.setup-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.how-wrap h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.85rem;
}

.how-about {
  max-width: 38rem;
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.how-steps-eyebrow {
  margin-top: 0.25rem;
}

.how-steps {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: none;
}

.how-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.35rem 1.45rem;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.55), var(--glass));
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--teal) 70%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(8, 21, 18, 0.05);
  transition:
    transform 0.4s var(--ease-spring),
    background 0.3s ease,
    box-shadow 0.35s ease,
    border-color 0.3s ease;
}

.how-steps li:hover {
  transform: translateX(10px);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  border-left-color: var(--lime-ink);
}

.how-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--teal);
  letter-spacing: -0.04em;
}

.how-steps h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.how-steps p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* —— SETUP —— */
.setup-wrap h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.setup-lead {
  margin-bottom: 2rem;
}

.person-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}

.person-panel {
  margin: 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 14px 36px rgba(12, 24, 20, 0.06);
  transition:
    transform 0.4s var(--ease),
    box-shadow 0.4s ease;
}

.person-panel:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.panel-a {
  border-top: 3px solid var(--teal);
}

.panel-b {
  border-top: 3px solid var(--lime-ink);
  background: linear-gradient(160deg, rgba(200, 240, 66, 0.12), rgba(255, 255, 255, 0.65));
}

.person-panel legend {
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0 0.35rem;
}

.person-panel label {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.person-panel input,
.person-panel select {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: 600 1rem/1.2 var(--font-body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s var(--ease);
}

.person-panel input:focus,
.person-panel select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 110, 102, 0.15);
  transform: scale(1.01);
}

.person-link {
  display: grid;
  place-items: center;
  width: 28px;
}

.person-link span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow:
    0 0 0 8px rgba(200, 240, 66, 0.25),
    0 -40px 0 -3px rgba(15, 110, 102, 0.35),
    0 40px 0 -3px rgba(15, 110, 102, 0.35);
  animation: linkPulse 2.2s var(--ease) infinite;
}

@keyframes linkPulse {
  50% {
    transform: scale(1.25);
  }
}

/* —— QUIZ —— */
.top-quiz {
  padding-bottom: 0.4rem;
}

.quiz-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.who-badge,
.q-count {
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
}

.who-badge {
  background: linear-gradient(145deg, #15241e, var(--ink));
  color: var(--lime);
  box-shadow: 0 8px 22px rgba(12, 24, 20, 0.18);
}

.who-badge.is-b {
  background: linear-gradient(145deg, var(--lime), #b6e030);
  color: var(--lime-ink);
  box-shadow: 0 8px 22px rgba(210, 255, 63, 0.35);
}

.q-count {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.quiz-progress {
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(18, 32, 28, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--lime));
  box-shadow: 0 0 16px rgba(210, 255, 63, 0.45);
  transition: width 0.55s var(--ease);
}

.orbit-mini {
  position: relative;
  width: 52px;
  height: 28px;
}

.mini-dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  transition: left 0.55s var(--ease-spring);
}

.mini-dot.a {
  left: 0;
  background: var(--teal);
}

.mini-dot.b {
  left: 36px;
  background: var(--lime);
}

.mini-dot.a.is-near {
  left: 14px;
}
.mini-dot.b.is-near {
  left: 26px;
}

.quiz-stage {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.q-cat {
  margin: 0 0 0.6rem;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  background: rgba(15, 110, 102, 0.1);
  animation: fadeUp 0.45s var(--ease) both;
}

.q-text {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  animation: fadeUp 0.5s 0.05s var(--ease) both;
}

.options {
  display: grid;
  gap: 0.75rem;
}

.option {
  position: relative;
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.05rem 1.15rem 1.05rem 3.4rem;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.15);
  font: 600 1.02rem/1.35 var(--font-body);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 10px 28px rgba(12, 24, 20, 0.04);
  transition:
    transform 0.35s var(--ease-spring),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.35s ease;
  animation-duration: 0.58s;
  animation-fill-mode: both;
  animation-timing-function: var(--ease-spring);
}

.option:nth-child(1) {
  animation-name: optFromLeft;
  animation-delay: 0.05s;
}
.option:nth-child(2) {
  animation-name: optFromRight;
  animation-delay: 0.11s;
}
.option:nth-child(3) {
  animation-name: optFromUp;
  animation-delay: 0.17s;
}
.option:nth-child(4) {
  animation-name: optScaleIn;
  animation-delay: 0.23s;
}
.option:nth-child(5) {
  animation-name: optFromLeft;
  animation-delay: 0.31s;
}
.option:nth-child(6) {
  animation-name: optFromRight;
  animation-delay: 0.39s;
}
.option:nth-child(7) {
  animation-name: optFromUp;
  animation-delay: 0.47s;
}
.option:nth-child(8) {
  animation-name: optScaleIn;
  animation-delay: 0.55s;
}
.option:nth-child(9),
.option.is-custom {
  animation-name: optScaleIn;
  animation-delay: 0.62s;
}

@keyframes optFromLeft {
  from {
    opacity: 0;
    transform: translateX(-22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes optFromRight {
  from {
    opacity: 0;
    transform: translateX(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes optFromUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes optScaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.option::before {
  content: attr(data-key);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(18, 32, 28, 0.06);
  color: var(--ink-soft);
  transition: background 0.25s ease, color 0.25s ease;
}

.option:hover {
  transform: translateX(10px) scale(1.02);
  border-color: rgba(13, 122, 111, 0.4);
  background: var(--glass-strong);
  box-shadow:
    0 18px 40px rgba(12, 24, 20, 0.1),
    0 0 0 1px rgba(210, 255, 63, 0.12);
}

.option:hover::before {
  background: var(--lime);
  color: var(--lime-ink);
  box-shadow: 0 0 16px rgba(210, 255, 63, 0.55);
}

.option.is-picked {
  transform: scale(1.025);
  background: linear-gradient(145deg, #15241e, var(--ink));
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 16px 36px rgba(12, 24, 20, 0.22);
}

.option.is-picked::before {
  background: var(--lime);
  color: var(--lime-ink);
}

/* —— HANDOFF —— */
.handoff-wrap {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.handoff-orb {
  /* legacy fallback — handoff now uses .handoff-core */
  display: none;
}

.handoff-core {
  /* sized in design-alive; keep layout slot */
  margin-bottom: 0.5rem;
}

.handoff-wrap h2 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  max-width: 12ch;
}

.handoff-text {
  margin: 1rem auto 2rem;
  max-width: 34ch;
}

/* —— RESULTS —— */
.results-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2.5rem) 4.5rem;
}

.score-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.2rem, 4vw, 2.5rem);
  align-items: center;
  margin-bottom: 2.5rem;
}

.score-ring-wrap {
  position: relative;
  width: min(42vw, 220px);
  height: min(42vw, 220px);
  /* 0 = dull, 1 = bright — set from JS via --ring-fill; hues by theme */
  --ring-fill: 0.5;
  --ring-hot: #ff2458;
  --ring-mid: #ff5c8a;
  --ring-cool: #c4788a;
  --ring-color: color-mix(
    in srgb,
    var(--ring-hot) calc(var(--ring-fill) * 100%),
    var(--ring-cool)
  );
  --ring-glow: color-mix(
    in srgb,
    var(--ring-color) calc(22% + var(--ring-fill) * 48%),
    transparent
  );
  filter: drop-shadow(0 0 calc(16px + var(--ring-fill) * 22px) var(--ring-glow));
  transition: filter 0.8s ease;
}

/* couple (default on results with has-mood): rose → hot pink/red */
body.theme-couple .score-ring-wrap {
  --ring-hot: #ff2458;
  --ring-mid: #ff5c8a;
  --ring-cool: #c4788a;
}

/* friends: soft gold → bright amber */
body.theme-friends .score-ring-wrap {
  --ring-hot: #ffb300;
  --ring-mid: #ffca28;
  --ring-cool: #b89a5a;
}

/* family: muted blue → vivid blue */
body.theme-family .score-ring-wrap {
  --ring-hot: #2563eb;
  --ring-mid: #60a5fa;
  --ring-cool: #7a9bc4;
}

.score-ring-wrap::before {
  content: "";
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--ring-color) calc(14% + var(--ring-fill) * 32%), transparent),
    transparent 65%
  );
  opacity: calc(0.4 + var(--ring-fill) * 0.6);
  animation: pulseCore 3.5s var(--ease) infinite;
  z-index: -1;
  transition: background 0.8s ease, opacity 0.8s ease;
}

.score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(18, 32, 28, 0.08);
  stroke-width: 12;
}

.ring-val {
  fill: none;
  stroke: var(--ring-color);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 528;
  stroke-dashoffset: 528;
  transition:
    stroke-dashoffset 1.6s var(--ease),
    stroke 0.85s ease;
}

.score-ring-wrap.is-high .ring-val,
.score-ring-wrap.is-mid .ring-val,
.score-ring-wrap.is-low .ring-val {
  stroke: var(--ring-color);
}

.score-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.9;
}

.score-num span {
  font-size: clamp(2.8rem, 8vw, 4rem);
  letter-spacing: -0.05em;
}

.score-num small {
  font-size: 1rem;
  color: var(--ink-soft);
}

.score-copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  max-width: 16ch;
}

.pair-line {
  margin: 1rem 0 0;
  font-weight: 700;
  color: var(--teal-deep);
}

.cats {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.cat-row {
  padding: 1.05rem 1.2rem;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(12, 24, 20, 0.04);
  animation: fadeUp 0.55s var(--ease) both;
}

.cat-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.cat-top strong {
  font-family: var(--font-display);
}

.cat-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(18, 32, 28, 0.07);
  overflow: hidden;
}

.cat-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--lime));
  transition: width 1.1s var(--ease);
}

.friction,
.sync {
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.friction {
  background: linear-gradient(145deg, rgba(232, 90, 79, 0.1), rgba(255, 255, 255, 0.6));
}

.sync {
  background: linear-gradient(145deg, rgba(200, 240, 66, 0.16), rgba(255, 255, 255, 0.6));
}

.friction h3,
.sync h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.friction ul,
.sync ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.friction li,
.sync li {
  padding-left: 1.1rem;
  position: relative;
  color: var(--ink-soft);
  line-height: 1.45;
  font-weight: 550;
}

.friction li::before,
.sync li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
}

.friction li::before {
  background: var(--coral);
}

.sync li::before {
  background: var(--teal);
}

/* —— DEEP REPORT (paid) —— */
.deep-report {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 1.75rem;
}

.deep-report[hidden] {
  display: none !important;
}

.deep-block {
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  animation: fadeUp 0.55s var(--ease) both;
}

.deep-overview {
  background:
    linear-gradient(145deg, rgba(15, 110, 102, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.7);
}

.deep-block h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.deep-overview p:not(.eyebrow) {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.deep-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.deep-stat {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  text-align: center;
}

.deep-stat strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.deep-stat span {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

.deep-cats {
  display: grid;
  gap: 0.75rem;
}

.deep-cat {
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.deep-cat.is-high {
  border-left: 3px solid #6a9a12;
}

.deep-cat.is-mid {
  border-left: 3px solid var(--teal);
}

.deep-cat.is-low {
  border-left: 3px solid var(--coral);
}

.deep-cat-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.deep-cat h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.deep-cat p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 0.95rem;
}

.deep-cat-meta {
  font-size: 0.88rem !important;
}

.deep-cat-meta span {
  font-weight: 700;
  color: var(--ink);
}

.deep-diff {
  background: linear-gradient(145deg, rgba(232, 90, 79, 0.08), rgba(255, 255, 255, 0.65));
}

.deep-same {
  background: linear-gradient(145deg, rgba(200, 240, 66, 0.14), rgba(255, 255, 255, 0.65));
}

.deep-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.deep-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.deep-item:first-child {
  padding-top: 0;
}

.deep-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.55rem;
}

.deep-item h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  flex: 1;
}

.deep-chip {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.deep-chip.is-bad {
  background: rgba(232, 90, 79, 0.14);
  color: #a33a32;
}

.deep-chip.is-good {
  background: rgba(15, 110, 102, 0.12);
  color: var(--teal-deep);
}

.deep-answers {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.deep-answers p,
.deep-answers-one {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.deep-answers strong {
  color: var(--ink);
  margin-right: 0.35rem;
}

.deep-tip {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--line);
}

.deep-talk ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.7rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.results-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.burst-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* —— MOBILE —— */
@media (max-width: 820px) {
  body {
    background:
      radial-gradient(700px 420px at 10% -10%, rgba(214, 255, 58, 0.26), transparent 55%),
      radial-gradient(560px 360px at 100% 0%, rgba(12, 122, 109, 0.18), transparent 50%),
      linear-gradient(168deg, #f4faf5 0%, var(--paper) 45%, #dcebe2 100%);
  }

  body::before {
    background-size: 40px 40px;
    animation: none;
  }

  body::after {
    display: none;
  }

  .aurora-blob {
    filter: blur(48px);
    opacity: 0.4;
  }

  .aurora-blob.d,
  .spark-field,
  .cursor-glow,
  .vignette {
    display: none !important;
  }

  .welcome-orbit {
    left: 50%;
    top: 28%;
    width: min(120vw, 420px);
    height: min(120vw, 420px);
    transform: translate(-50%, -50%);
    opacity: 0.85;
  }

  .welcome-waveband {
    bottom: auto;
    top: 42%;
    opacity: 0.28;
  }

  .welcome-wrap .brand {
    font-size: clamp(3.2rem, 16vw, 4.6rem);
  }

  .top {
    padding: 0.85rem max(10rem, calc(env(safe-area-inset-right) + 9.2rem)) 0.85rem
      var(--shell-pad-x, 1.75rem);
    padding-top: max(0.85rem, env(safe-area-inset-top));
  }

  .logo {
    font-size: 1.25rem;
    gap: 0.45rem;
  }

  .logo-mark {
    width: 1.85rem;
    height: 1.85rem;
  }

  .top-link,
  .step-pill {
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
    max-width: min(10.5rem, 38vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
  }

  .hero {
    min-height: 0;
    height: auto;
    min-height: calc(100svh - 4.5rem);
    min-height: calc(100dvh - 4.5rem);
    justify-content: flex-end;
    /* shell pads owned by design-cinema.css (--shell-pad-*) */
    padding-top: 38vh;
  }

  .intro-wrap {
    padding: 0.5rem max(1rem, env(safe-area-inset-right))
      max(5rem, calc(env(safe-area-inset-bottom) + 3.5rem))
      max(1rem, env(safe-area-inset-left));
    gap: 1.35rem;
  }

  .welcome-wrap {
    min-height: calc(100svh - 5rem);
    min-height: calc(100dvh - 5rem);
    justify-content: flex-end;
    /* keep sides/bottom from --shell-pad-* in cinema; only tune top */
    padding-top: 1.25rem !important;
  }

  .welcome-wrap h1 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .relation-actions {
    flex-direction: column;
  }

  .relation-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .intro-hello {
    font-size: 0.98rem;
  }

  .intro-copy h1 {
    font-size: clamp(1.65rem, 7vw, 2.15rem);
  }

  .intro-pick-title {
    font-size: 1.35rem;
  }

  .intro-wrap .relation-grid {
    margin-top: 1rem;
  }

  .intro-wrap .mode-card ul {
    display: none;
  }

  .hero-visual {
    inset: 0 0 auto 0;
    height: 48%;
  }

  .orbit-stage {
    align-content: center;
    transform: none !important;
  }

  .light-rays {
    width: min(120vw, 420px);
    height: min(120vw, 420px);
    opacity: 0.55;
    animation-duration: 80s;
  }

  .ring-1 {
    width: min(88vw, 340px);
    height: min(88vw, 340px);
  }

  .ring-2 {
    width: min(68vw, 260px);
    height: min(68vw, 260px);
  }

  .ring-3 {
    width: min(48vw, 180px);
    height: min(48vw, 180px);
  }

  .ring-4 {
    width: min(28vw, 100px);
    height: min(28vw, 100px);
  }

  .wave {
    width: 110vw;
    height: 120px;
  }

  .phase-core {
    width: min(36vw, 140px);
    height: min(36vw, 140px);
    box-shadow:
      0 0 40px rgba(210, 255, 63, 0.28),
      0 0 70px rgba(13, 122, 111, 0.18);
  }

  .orbit-specks {
    display: none;
  }

  .hero-copy {
    max-width: none;
    width: 100%;
  }

  .brand {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero h1 {
    font-size: clamp(1.25rem, 5.8vw, 1.65rem);
    max-width: 16ch;
  }

  .lead {
    font-size: 0.98rem;
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin-top: 1.1rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    text-align: center;
  }

  .btn {
    min-height: 48px;
    padding: 0.95rem 1.2rem;
    border-radius: 14px;
  }

  .btn-primary:hover,
  .btn-ghost:hover {
    transform: none;
  }

  .how-wrap,
  .setup-wrap,
  .modes-wrap,
  .results-wrap {
    padding: 1.25rem max(1rem, env(safe-area-inset-right))
      max(5.5rem, calc(env(safe-area-inset-bottom) + 4.5rem))
      max(1rem, env(safe-area-inset-left));
  }

  .how-wrap h2,
  .setup-wrap h2,
  .modes-wrap h2 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }

  .how-steps li {
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
  }

  .how-steps li:hover {
    transform: none;
  }

  .person-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .person-link {
    width: 100%;
    height: 24px;
  }

  .person-link span {
    box-shadow:
      0 0 0 7px rgba(210, 255, 63, 0.22),
      -36px 0 0 -3px rgba(13, 122, 111, 0.3),
      36px 0 0 -3px rgba(13, 122, 111, 0.3);
  }

  .person-panel {
    padding: 1.15rem;
  }

  .person-panel input,
  .person-panel select {
    min-height: 48px;
    font-size: 16px; /* prevent iOS zoom */
  }

  .mode-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .mode-card {
    padding: 1.2rem 1.15rem;
  }

  .mode-card:hover {
    transform: none;
  }

  .mode-price {
    font-size: 1.55rem;
  }

  .len-picks {
    grid-template-columns: repeat(4, 1fr);
  }

  .len-btn {
    min-height: 44px;
  }

  .quiz-stage {
    padding: 1.25rem max(1rem, env(safe-area-inset-right))
      max(7.5rem, calc(env(safe-area-inset-bottom) + 6.5rem))
      max(1rem, env(safe-area-inset-left));
  }

  .q-text {
    font-size: clamp(1.3rem, 5.5vw, 1.7rem);
    margin-bottom: 1.1rem;
  }

  .options {
    gap: 0.55rem;
  }

  .option {
    padding: 0.95rem 0.95rem 0.95rem 3.1rem;
    font-size: 0.95rem;
    min-height: 52px;
    border-radius: 16px;
  }

  .option:hover {
    transform: none;
  }

  .option.is-kb-focus {
    transform: none;
  }

  .options[data-count="8"] .option {
    padding: 0.8rem 0.9rem 0.8rem 3rem;
    font-size: 0.9rem;
  }

  .option::before {
    width: 1.55rem;
    height: 1.55rem;
    left: 0.85rem;
    font-size: 0.72rem;
  }

  .top-quiz {
    gap: 0.5rem;
  }

  .quiz-meta {
    gap: 0.4rem;
  }

  .who-badge,
  .q-count {
    font-size: 0.75rem;
    padding: 0.5rem 0.65rem;
  }

  .handoff-wrap {
    padding: 2rem max(1rem, env(safe-area-inset-left))
      max(5rem, env(safe-area-inset-bottom));
  }

  .handoff-wrap h2 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .score-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .score-ring-wrap {
    width: min(48vw, 180px);
    height: min(48vw, 180px);
  }

  .score-copy h2 {
    margin-inline: auto;
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .result-lead,
  .pair-line {
    margin-inline: auto;
    max-width: 34ch;
  }

  .results-actions {
    flex-direction: column;
  }

  .results-actions .btn {
    width: 100%;
  }

  .deep-stats {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .deep-stat {
    padding: 0.75rem 0.55rem;
  }

  .deep-stat strong {
    font-size: 1rem;
  }

  .deep-item-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .deep-chip {
    white-space: normal;
  }

  .kb-help-btn {
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    padding: 0.7rem 0.85rem;
    font-size: 0.78rem;
  }

  .kb-hint {
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    bottom: max(3.5rem, calc(env(safe-area-inset-bottom) + 3rem));
    transform: none;
    border-radius: 16px;
    gap: 0.35rem;
    padding: 0.5rem 0.55rem;
    font-size: 0.68rem;
  }

  .kb-hint span {
    padding: 0.2rem 0.4rem;
  }

  .kb-modal {
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    align-items: end;
  }

  .kb-modal-card {
    width: 100%;
    max-height: min(88dvh, 640px);
    overflow: auto;
    padding: 1.35rem 1.15rem 1.2rem;
    border-radius: 24px 24px 18px 18px;
  }

  .kb-keys li {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 2.6rem;
  }

  .who-badge {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .kb-hint span:nth-child(4) {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .mode-card:hover,
  .how-steps li:hover,
  .option:hover,
  .btn-primary:hover,
  .btn-ghost:hover,
  .top-link:hover {
    transform: none;
    box-shadow: inherit;
  }

  .option:active {
    transform: scale(0.985);
    background: var(--glass-strong);
  }

  .btn-primary:active {
    transform: scale(0.98);
  }

  .kb-hint {
    display: none !important;
  }

  .quiz-stage {
    padding-bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4rem));
  }
}

/* —— MODES —— */
.modes-wrap,
.pay-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 4rem;
}

.modes-wrap h2,
.pay-wrap h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.035em;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.mode-card {
  display: flex;
  flex-direction: column;
  padding: 1.55rem 1.45rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.62), var(--glass));
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 16px 40px rgba(8, 21, 18, 0.06);
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.4s ease,
    border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: auto -20% 35% -20%;
  height: 65%;
  background: radial-gradient(circle, rgba(214, 255, 58, 0.2), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.mode-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--teal) 45%, transparent);
}

.mode-card:hover::before {
  opacity: 1;
}

.mode-card.is-mid {
  border-top: 3px solid var(--teal);
  background: linear-gradient(165deg, rgba(12, 122, 109, 0.14), var(--glass-strong));
}

.mode-card.is-pro {
  border-top: 3px solid var(--lime-ink);
  background: linear-gradient(165deg, rgba(214, 255, 58, 0.28), var(--glass-strong));
  box-shadow:
    0 16px 40px rgba(8, 21, 18, 0.08),
    0 0 0 1px rgba(214, 255, 58, 0.18);
}

.mode-tag {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.mode-card h3 {
  margin: 0.45rem 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.mode-price {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.mode-card ul {
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  flex: 1;
}

.mode-card li {
  position: relative;
  padding-left: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.35;
}

.mode-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--teal);
}

.modes-test-note {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.relation-card-lead {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.35;
}

.context-form {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.15rem;
}

.context-q {
  margin: 0;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  animation: fadeUp 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.07s);
}

.context-q legend {
  padding: 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.context-options {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.context-option {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--ease);
}

.context-option:hover {
  transform: translateY(-1px);
  border-color: var(--teal-glow);
}

.context-option:has(input:checked) {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal) 12%, transparent);
}

.context-option input {
  margin-top: 0.2rem;
  accent-color: var(--teal);
}

.context-option span {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--ink);
}

.len-picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.len-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 0.55rem 0.3rem;
  font: 700 0.9rem/1 var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s var(--ease);
}

.len-btn:hover {
  transform: translateY(-2px);
}

.len-btn.is-active {
  background: var(--ink);
  color: var(--lime);
  border-color: var(--ink);
}

/* —— PAY —— */
.pay-form {
  max-width: 420px;
  margin-top: 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.pay-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.pay-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  font: 600 1rem/1.2 var(--font-body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
}

.pay-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 110, 102, 0.15);
}

.pay-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.pay-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* —— AD —— */
.ad-wrap {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 2rem clamp(1rem, 4vw, 2rem);
  text-align: center;
}

.ad-label {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ad-card {
  width: min(100%, 440px);
  padding: 2rem 1.6rem;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(200, 240, 66, 0.22), transparent 40%),
    linear-gradient(160deg, #1a2228, #101418 70%);
  color: #f4f7f5;
  box-shadow: 0 24px 60px rgba(16, 20, 24, 0.28);
  animation: fadeUp 0.55s var(--ease) both;
}

.ad-brand {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}

.ad-card h2 {
  margin: 0.7rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.ad-card p {
  margin: 0;
  color: rgba(244, 247, 245, 0.78);
  line-height: 1.45;
}

.ad-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.4rem 0 1rem;
  font-weight: 600;
  color: rgba(244, 247, 245, 0.7);
}

.ad-timer strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--lime);
  min-width: 1.4ch;
}

.ad-card .btn-primary {
  background: var(--lime);
  color: var(--lime-ink);
}

.ad-card .btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ad-card.is-ready .btn-primary {
  animation: pulseCore 1.2s var(--ease) infinite;
}

.ad-hint {
  margin: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.options[data-count="6"],
.options[data-count="8"] {
  gap: 0.55rem;
}

.options[data-count="8"] .option {
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  font-size: 0.95rem;
}

.options[data-count="6"] .option:nth-child(5),
.options[data-count="6"] .option:nth-child(6),
.options[data-count="8"] .option:nth-child(n + 5) {
  animation-duration: 0.68s;
}

/* —— invite / remote coop —— */
.invite-fab {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 45;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--ink);
  font: 700 0.82rem/1 var(--font-body);
  letter-spacing: 0.02em;
  padding: 0.72rem 0.95rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(8, 21, 18, 0.1);
  transition: transform 0.3s var(--ease-spring), background 0.25s ease, border-color 0.25s ease;
}

.invite-fab:hover,
.invite-fab.is-active {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--teal) 45%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--lime) 48%, #fff),
    var(--glass-strong)
  );
}

.invite-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 21, 18, 0.42);
  backdrop-filter: blur(8px);
}

.invite-modal[hidden] {
  display: none !important;
}

.invite-modal-card {
  position: relative;
  width: min(100%, 460px);
  padding: 1.6rem 1.5rem 1.4rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), var(--glass-strong));
  box-shadow: var(--shadow-lift);
}

.invite-modal-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  letter-spacing: -0.03em;
}

.invite-modal-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.invite-link-box,
.handoff-invite,
.remote-wait-link {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.invite-link-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: 600 0.9rem/1.3 var(--font-body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.invite-status {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--teal-deep);
  font-weight: 600;
}

.coop-banner {
  position: fixed;
  top: max(3.6rem, calc(env(safe-area-inset-top) + 3.2rem));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 44;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  max-width: min(92vw, 360px);
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, transparent);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: 0 10px 28px rgba(8, 21, 18, 0.08);
}

.coop-banner[hidden] {
  display: none !important;
}

.coop-banner button {
  border: none;
  background: transparent;
  color: var(--teal-deep);
  font: 700 0.8rem/1 var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

.remote-wait-wrap {
  max-width: 520px;
  margin: 0 auto;
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  position: relative;
}

.remote-wait-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  right: 8%;
  top: 18%;
  background: radial-gradient(circle at 35% 30%, rgba(214, 255, 58, 0.45), rgba(12, 122, 109, 0.35) 55%, transparent 70%);
  filter: blur(8px);
  animation: welcomeCorePulse 5s var(--ease) infinite;
  pointer-events: none;
}

.remote-wait-wrap h2 {
  margin: 0.2rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.035em;
}

.remote-join-form {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

.remote-join-form .field {
  display: grid;
  gap: 0.4rem;
}

.remote-join-form .field span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.remote-join-form input[type="text"],
.remote-join-form input:not([type]) {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font: 600 1rem/1.2 var(--font-body);
  background: var(--glass-strong);
}

.remote-join-form .gender-field {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  background: var(--glass);
}

.remote-join-form .gender-field legend {
  padding: 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.remote-wait-meta {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

body.coop-on .invite-fab {
  border-color: color-mix(in srgb, var(--teal) 50%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--lime) 55%, #fff),
    var(--glass-strong)
  );
}

@media (max-width: 820px) {
  .invite-fab {
    top: max(0.7rem, env(safe-area-inset-top));
    right: max(0.7rem, env(safe-area-inset-right));
    padding: 0.65rem 0.8rem;
    font-size: 0.78rem;
  }

  .coop-banner {
    left: max(0.7rem, env(safe-area-inset-left));
    right: max(0.7rem, env(safe-area-inset-right));
    max-width: none;
  }

  .top {
    padding-right: max(10rem, calc(env(safe-area-inset-right) + 9.2rem));
  }

  .top-link {
    max-width: min(11.5rem, 42vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* —— keyboard UI —— */
.kb-help-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--lime);
  font: 700 0.82rem/1 var(--font-body);
  letter-spacing: 0.02em;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(12, 24, 20, 0.28);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.kb-help-btn:hover,
.kb-help-btn.is-kb-focus {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 36px rgba(12, 24, 20, 0.35), 0 0 24px rgba(210, 255, 63, 0.2);
}

.kb-hint {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  max-width: min(92vw, 640px);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(12, 24, 20, 0.82);
  color: rgba(244, 247, 245, 0.88);
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(12, 24, 20, 0.25);
}

.kb-hint[hidden] {
  display: none !important;
}

.kb-hint span {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.kb-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(12, 24, 20, 0.45);
  backdrop-filter: blur(8px);
}

.kb-modal[hidden] {
  display: none !important;
}

.kb-modal-card {
  position: relative;
  width: min(100%, 480px);
  padding: 1.6rem 1.5rem 1.4rem;
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(210, 255, 63, 0.16), transparent 40%),
    var(--glass-strong);
  box-shadow: var(--shadow-lift);
  animation: fadeUp 0.4s var(--ease) both;
}

.kb-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 10px;
  background: rgba(12, 24, 20, 0.06);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
}

.kb-modal-card h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.kb-modal-lead {
  margin: 0.7rem 0 1.1rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.kb-keys {
  list-style: none;
  margin: 0 0 1.2rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.kb-keys li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
}

.kb-keys span {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.35;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  padding: 0.28rem 0.45rem;
  margin-right: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--lime);
  font: 700 0.78rem/1 var(--font-body);
  box-shadow: 0 3px 0 rgba(12, 24, 20, 0.25);
}

.is-kb-focus {
  outline: none !important;
  box-shadow:
    0 0 0 3px rgba(210, 255, 63, 0.55),
    0 0 0 6px rgba(13, 122, 111, 0.2),
    0 14px 34px rgba(12, 24, 20, 0.12) !important;
  border-color: rgba(13, 122, 111, 0.45) !important;
  transform: translateX(6px) scale(1.015);
  z-index: 2;
}

.option.is-kb-focus {
  background: var(--glass-strong);
}

.btn.is-kb-focus,
.len-btn.is-kb-focus,
.top-link.is-kb-focus {
  transform: translateY(-2px) scale(1.03);
}

body.kb-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .mode-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body::after,
  .welcome-visual,
  .welcome-waveband {
    animation: none !important;
  }
}

/* —— relation themes —— */
.mood-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.has-mood .mood-deco {
  opacity: 1;
}

.mood-glyph {
  position: absolute;
  font-size: clamp(1.1rem, 2.4vw, 1.85rem);
  line-height: 1;
  opacity: 0.28;
  --dx: 18px;
  --dy: -22px;
  --rot: 10deg;
  --fx-dur: 8s;
  animation: moodDrift var(--fx-dur) var(--ease) infinite alternate;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
  user-select: none;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.25s ease, filter 0.25s ease, color 0.7s ease,
    left 2.8s cubic-bezier(0.37, 0.01, 0.2, 1),
    top 2.8s cubic-bezier(0.37, 0.01, 0.2, 1);
  z-index: 1;
  /* larger tap target without looking bigger */
  padding: 0.45rem;
  margin: -0.45rem;
  touch-action: manipulation;
}

.mood-glyph.is-fx-glide {
  transition:
    left 2.9s cubic-bezier(0.37, 0.01, 0.2, 1),
    top 2.9s cubic-bezier(0.37, 0.01, 0.2, 1),
    opacity 0.25s ease,
    filter 0.25s ease,
    color 0.7s ease;
}

.mood-glyph.is-fx-snap,
.mood-glyph.is-fx-pop {
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease !important;
}

.mood-glyph:hover {
  opacity: 0.55;
  filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--teal) 25%, transparent));
}

.mood-glyph:nth-child(3),
.mood-glyph:nth-child(6) {
  font-size: 1.3em;
}

@keyframes moodDrift {
  from {
    transform: scale(0.97);
    opacity: 0.22;
  }
  to {
    transform: scale(1.03);
    opacity: 0.38;
  }
}

@keyframes moodFloat {
  from { transform: translateY(0) rotate(-8deg) scale(0.92); }
  to { transform: translateY(-18px) rotate(10deg) scale(1.08); }
}

body.theme-couple {
  --ink: #3a0f1c;
  --ink-soft: #7a3a4f;
  --paper: #fff0f4;
  --paper-2: #fcdce6;
  --line: rgba(58, 15, 28, 0.12);
  --line-strong: rgba(58, 15, 28, 0.2);
  --teal: #d9486c;
  --teal-deep: #b4234a;
  --teal-glow: rgba(217, 72, 108, 0.38);
  --lime: #ffb3c6;
  --lime-soft: #ff8fab;
  --lime-ink: #4a1024;
  --coral: #ff5c7a;
  --sand: #ffe0e8;
  --shadow: 0 24px 60px rgba(180, 35, 74, 0.14);
  --shadow-lift: 0 30px 80px rgba(180, 35, 74, 0.2);
  --aurora-a: rgba(255, 143, 171, 0.5);
  --aurora-b: rgba(217, 72, 108, 0.36);
  --aurora-c: rgba(255, 224, 232, 0.7);
  --aurora-d: rgba(255, 105, 140, 0.28);
  --bg-spot-1: rgba(255, 143, 171, 0.38);
  --bg-spot-2: rgba(217, 72, 108, 0.22);
  --bg-spot-3: rgba(255, 224, 232, 0.65);
  --bg-spot-4: rgba(255, 105, 140, 0.12);
  --bg-base-1: #fff7f9;
  --bg-base-2: #fff0f4;
  --bg-base-3: #f8d9e4;
  --spark-glow: rgba(255, 143, 171, 0.85);
  --orbit-a: rgba(217, 72, 108, 0.16);
  --orbit-b: rgba(255, 179, 198, 0.14);
  --orbit-c: rgba(180, 35, 74, 0.08);
  --ray-a: rgba(255, 143, 171, 0.06);
  --ray-b: rgba(217, 72, 108, 0.07);
  --orbit-opacity: 0.42;
  --cursor-a: rgba(255, 59, 92, 0.32);
  --cursor-b: rgba(224, 17, 58, 0.18);
  --mesh-a: rgba(255, 143, 171, 0.07);
  --mesh-b: rgba(224, 17, 58, 0.07);
  --logo-from: #3a0f1c;
  --logo-to: #ff3b5c;
}

body.theme-couple .mood-glyph {
  color: #d9486c;
  opacity: 0.42;
}

body.theme-couple .mood-glyph,
body.theme-couple .alive-motes i {
  /* keep hearts pointing the same way */
  --rot: 3deg !important;
}

body.theme-friends {
  --ink: #2a2208;
  --ink-soft: #6b5a1e;
  --paper: #fff9e6;
  --paper-2: #ffe9a8;
  --line: rgba(42, 34, 8, 0.12);
  --line-strong: rgba(42, 34, 8, 0.2);
  --teal: #d4a017;
  --teal-deep: #a67c00;
  --teal-glow: rgba(212, 160, 23, 0.4);
  --lime: #ffe566;
  --lime-soft: #ffd54a;
  --lime-ink: #3a2e00;
  --coral: #f0a020;
  --sand: #fff1c2;
  --shadow: 0 24px 60px rgba(166, 124, 0, 0.14);
  --shadow-lift: 0 30px 80px rgba(166, 124, 0, 0.2);
  --aurora-a: rgba(255, 229, 102, 0.55);
  --aurora-b: rgba(212, 160, 23, 0.32);
  --aurora-c: rgba(255, 241, 194, 0.75);
  --aurora-d: rgba(255, 213, 74, 0.3);
  --bg-spot-1: rgba(255, 229, 102, 0.42);
  --bg-spot-2: rgba(212, 160, 23, 0.2);
  --bg-spot-3: rgba(255, 241, 194, 0.7);
  --bg-spot-4: rgba(255, 213, 74, 0.14);
  --bg-base-1: #fffdf5;
  --bg-base-2: #fff9e6;
  --bg-base-3: #f5e6b0;
  --spark-glow: rgba(255, 213, 74, 0.9);
  --orbit-a: rgba(212, 160, 23, 0.16);
  --orbit-b: rgba(255, 229, 102, 0.14);
  --orbit-c: rgba(166, 124, 0, 0.08);
  --ray-a: rgba(255, 229, 102, 0.07);
  --ray-b: rgba(212, 160, 23, 0.06);
  --orbit-opacity: 0.42;
  --cursor-a: rgba(255, 159, 26, 0.34);
  --cursor-b: rgba(249, 115, 22, 0.2);
  --mesh-a: rgba(255, 229, 102, 0.08);
  --mesh-b: rgba(249, 115, 22, 0.07);
  --logo-from: #ea580c;
  --logo-to: #fde047;
}

body.theme-friends .mood-glyph {
  opacity: 0.4;
  filter: drop-shadow(0 2px 6px rgba(166, 124, 0, 0.15));
}

body.theme-family {
  --ink: #0b1a2e;
  --ink-soft: #3a5270;
  --paper: #eef4fb;
  --paper-2: #d7e6f7;
  --line: rgba(11, 26, 46, 0.12);
  --line-strong: rgba(11, 26, 46, 0.2);
  --teal: #2b6cb0;
  --teal-deep: #1e4e8c;
  --teal-glow: rgba(43, 108, 176, 0.38);
  --lime: #93c5fd;
  --lime-soft: #60a5fa;
  --lime-ink: #0f2744;
  --coral: #3b82f6;
  --sand: #dbeafe;
  --shadow: 0 24px 60px rgba(30, 78, 140, 0.14);
  --shadow-lift: 0 30px 80px rgba(30, 78, 140, 0.2);
  --aurora-a: rgba(147, 197, 253, 0.5);
  --aurora-b: rgba(43, 108, 176, 0.34);
  --aurora-c: rgba(219, 234, 254, 0.7);
  --aurora-d: rgba(96, 165, 250, 0.28);
  --bg-spot-1: rgba(147, 197, 253, 0.4);
  --bg-spot-2: rgba(43, 108, 176, 0.2);
  --bg-spot-3: rgba(219, 234, 254, 0.65);
  --bg-spot-4: rgba(96, 165, 250, 0.12);
  --bg-base-1: #f7faff;
  --bg-base-2: #eef4fb;
  --bg-base-3: #d5e4f6;
  --spark-glow: rgba(96, 165, 250, 0.85);
  --orbit-a: rgba(43, 108, 176, 0.14);
  --orbit-b: rgba(147, 197, 253, 0.12);
  --orbit-c: rgba(30, 78, 140, 0.08);
  --ray-a: rgba(147, 197, 253, 0.05);
  --ray-b: rgba(43, 108, 176, 0.06);
  --orbit-opacity: 0.32;
  --cursor-a: rgba(56, 189, 248, 0.34);
  --cursor-b: rgba(37, 99, 235, 0.2);
  --mesh-a: rgba(147, 197, 253, 0.08);
  --mesh-b: rgba(37, 99, 235, 0.07);
  --logo-from: #1e4e8c;
  --logo-to: #93c5fd;
}

body.theme-family .mood-glyph {
  color: #2b6cb0;
  opacity: 0.22;
}

.mode-card[data-relation="family"] {
  border-top: 3px solid #2b6cb0;
  background: linear-gradient(165deg, rgba(147, 197, 253, 0.32), var(--glass-strong));
}

.mode-card[data-relation="family"] .mode-tag {
  color: #2b6cb0;
}

@media (max-width: 760px) {
  .mood-glyph:nth-child(n + 5) {
    display: none;
  }

  .mood-glyph {
    opacity: 0.16;
  }
}

/* —— click fx by relation —— */
.click-fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: visible;
}

.click-fx {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  will-change: transform, opacity;
  animation: clickFxFly 0.85s var(--ease) forwards;
}

.fx-heart {
  color: #ff3b5c;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(224, 17, 58, 0.35));
  animation-name: clickFxHeart;
}

.fx-confetti {
  border-radius: 2px;
  animation-name: clickFxConfetti;
}

.fx-gene {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
  animation-name: clickFxGene;
  animation-duration: 0.7s;
}

.fx-gene.is-soft {
  animation-duration: 0.62s !important;
}

.fx-gene.is-dream {
  animation-duration: 0.95s !important;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.7));
}

.fx-gene-link {
  width: 16px;
  height: 3px;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.7);
  animation-name: clickFxGene;
}

/* soft ambient taps (empty space) */
.click-fx.is-soft {
  animation-duration: 0.55s !important;
  opacity: 0.75;
  filter: blur(0.2px);
}

.fx-soft-ring,
.fx-btn-ring {
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--teal) 45%, #fff);
  background: transparent;
  animation: fxRingOut 0.55s var(--ease) forwards;
  box-shadow: 0 0 12px color-mix(in srgb, var(--teal) 25%, transparent);
}

.fx-btn-ring {
  border-width: 2.5px;
  border-color: color-mix(in srgb, var(--lime) 55%, var(--teal));
  animation: fxRingOut 0.65s var(--ease-spring) forwards;
  box-shadow:
    0 0 0 1px color-mix(in srgb, #fff 40%, transparent),
    0 0 18px color-mix(in srgb, var(--lime) 40%, transparent);
}

.fx-btn-spark {
  width: 6px;
  height: 6px;
  margin: -3px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px color-mix(in srgb, var(--lime) 70%, transparent);
  animation-name: clickFxFly;
  animation-duration: 0.6s;
}

.click-fx.is-btn {
  animation-duration: 0.65s !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

@keyframes fxRingOut {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.2);
  }
}

/* polished button press */
.btn.is-press-pop,
.btn-relation.is-press-pop,
.top-link.is-press-pop,
.len-btn.is-press-pop,
.invite-fab.is-press-pop,
.kb-help-btn.is-press-pop {
  animation: uiPressPop 0.45s var(--ease-spring) both !important;
}

@keyframes uiPressPop {
  0% { transform: scale(1); }
  35% { transform: scale(0.94); }
  70% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

/* —— realistic theme glyphs (float up, soft fade) —— */
.fx-real-glyph {
  line-height: 1;
  font-style: normal;
  margin: 0;
  transform: translate(-50%, -50%);
  animation: fxRealRise 0.95s cubic-bezier(0.22, 0.61, 0.36, 1) forwards !important;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.12));
}

.fx-real-glyph.is-couple {
  color: #e11d48;
  /* keep heart point-down upright — no tumble */
  animation-name: fxRealRiseUpright !important;
}

.fx-real-glyph.is-friends {
  color: #c2410c;
  font-size: 1.05em;
  animation-name: fxRealRiseUpright !important;
}

.fx-real-glyph.is-family { color: #1d4ed8; }
.fx-real-glyph.is-phase { color: #0c7a6d; }

.fx-real-glyph.is-btn.is-friends {
  animation-duration: 0.55s !important;
  opacity: 0.85;
}

.fx-soft-ring.is-friends {
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 0 10px rgba(255, 229, 102, 0.28);
  animation-duration: 0.45s !important;
}

.fx-btn-ring.is-friends {
  animation-duration: 0.48s !important;
}

.fx-real-glyph.is-soft {
  opacity: 0.7;
  animation-duration: 0.55s !important;
  filter: blur(0.15px) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.fx-real-glyph.is-btn {
  animation-duration: 0.7s !important;
}

.fx-real-glyph.is-dream {
  animation-duration: 1.15s !important;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.16));
}

.fx-real-core {
  line-height: 1;
  font-size: 2.35rem;
  transform: translate(-50%, -50%);
  animation: fxRealCore 1.05s cubic-bezier(0.34, 1.2, 0.64, 1) forwards !important;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.18));
  z-index: 2;
}

.fx-real-core.is-couple { color: #e11d48; }
.fx-real-core.is-friends { color: #ea580c; }
.fx-real-core.is-family { color: #1d4ed8; }
.fx-real-core.is-phase { color: #0c7a6d; }

.fx-real-ring {
  width: 18px;
  height: 18px;
  margin: -9px;
  border-radius: 50%;
  border: 1.5px solid rgba(12, 122, 109, 0.45);
  background: transparent;
  animation: fxRingOut 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards !important;
  box-shadow: none;
}

.fx-real-ring.is-couple { border-color: rgba(225, 29, 72, 0.4); }
.fx-real-ring.is-friends { border-color: rgba(234, 88, 12, 0.4); }
.fx-real-ring.is-family { border-color: rgba(37, 99, 235, 0.4); }
.fx-real-ring.is-phase { border-color: rgba(214, 255, 58, 0.5); }

.fx-btn-ring.is-couple { border-color: rgba(225, 29, 72, 0.5); box-shadow: 0 0 14px rgba(255, 143, 171, 0.35); }
.fx-btn-ring.is-friends { border-color: rgba(234, 88, 12, 0.5); box-shadow: 0 0 14px rgba(255, 229, 102, 0.35); }
.fx-btn-ring.is-family { border-color: rgba(37, 99, 235, 0.5); box-shadow: 0 0 14px rgba(147, 197, 253, 0.35); }
.fx-btn-ring.is-phase { border-color: color-mix(in srgb, var(--lime) 55%, var(--teal)); }

@keyframes fxRealRise {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 6px) scale(0.65) rotate(0deg);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%)
      translate(calc(var(--dx, 0px) * 0.18), calc(var(--dy, -40px) * 0.18))
      scale(1.05)
      rotate(calc(var(--rot, 0deg) * 0.25));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%)
      translate(calc(var(--dx, 0px) + var(--sway, 0px)), var(--dy, -56px))
      scale(0.88)
      rotate(var(--rot, 0deg));
  }
}

/* hearts / smiles: fly without spinning upside-down */
@keyframes fxRealRiseUpright {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(0, 6px) scale(0.7) rotate(0deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%)
      translate(calc(var(--dx, 0px) * 0.2), calc(var(--dy, -40px) * 0.2))
      scale(1.05)
      rotate(var(--rot, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%)
      translate(calc(var(--dx, 0px) + var(--sway, 0px) * 0.35), var(--dy, -56px))
      scale(0.92)
      rotate(var(--rot, 0deg));
  }
}

@keyframes fxRealCore {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-28px) scale(0.9);
  }
}

/* —— DREAM boom: floating glyph / mote tap —— */
.fx-dream-veil {
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0;
  animation: dreamVeil 0.55s ease forwards !important;
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.14), transparent 52%);
  mix-blend-mode: soft-light;
}

.fx-dream-veil.is-couple {
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 77, 109, 0.14), transparent 55%);
}
.fx-dream-veil.is-friends {
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 213, 74, 0.14), transparent 55%);
}
.fx-dream-veil.is-family {
  background: radial-gradient(ellipse at 50% 42%, rgba(56, 189, 248, 0.14), transparent 55%);
}
.fx-dream-veil.is-phase {
  background: radial-gradient(ellipse at 50% 42%, rgba(214, 255, 58, 0.12), transparent 55%);
}

@keyframes dreamVeil {
  0% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 0; }
}

.fx-dream-flash {
  width: 28px;
  height: 28px;
  margin: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, transparent 70%);
  animation: dreamFlash 0.7s var(--ease) forwards !important;
  mix-blend-mode: screen;
}

.fx-dream-flash.is-couple {
  background: radial-gradient(circle, #fff 0%, #ff8fab 35%, transparent 72%);
}
.fx-dream-flash.is-friends {
  background: radial-gradient(circle, #fff 0%, #ffe566 35%, transparent 72%);
}
.fx-dream-flash.is-family {
  background: radial-gradient(circle, #fff 0%, #93c5fd 35%, transparent 72%);
}
.fx-dream-flash.is-phase {
  background: radial-gradient(circle, #fff 0%, #d6ff3a 38%, transparent 72%);
}

.fx-dream-wave {
  width: 20px;
  height: 20px;
  margin: -10px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: transparent;
  animation: dreamWave 0.95s var(--ease) forwards !important;
}

.fx-dream-wave.is-couple { border-color: #ff4d6d; box-shadow: 0 0 24px rgba(255, 77, 109, 0.55); }
.fx-dream-wave.is-friends { border-color: #f59e0b; box-shadow: 0 0 24px rgba(245, 158, 11, 0.5); }
.fx-dream-wave.is-family { border-color: #38bdf8; box-shadow: 0 0 24px rgba(56, 189, 248, 0.55); }
.fx-dream-wave.is-phase { border-color: #d6ff3a; box-shadow: 0 0 24px rgba(214, 255, 58, 0.55); }

.fx-dream-core {
  font-size: 2.4rem;
  line-height: 1;
  animation: dreamCore 1.05s var(--ease-spring) forwards !important;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.2));
  z-index: 2;
}

.fx-dream-core.is-couple { color: #ff3b5c; text-shadow: 0 0 28px rgba(255, 59, 92, 0.8); }
.fx-dream-core.is-friends { filter: drop-shadow(0 0 18px rgba(255, 213, 74, 0.9)); }
.fx-dream-core.is-family { color: #2563eb; text-shadow: 0 0 28px rgba(37, 99, 235, 0.75); }
.fx-dream-core.is-phase {
  color: #0c7a6d;
  text-shadow: 0 0 28px rgba(214, 255, 58, 0.85);
  filter: drop-shadow(0 0 16px rgba(214, 255, 58, 0.7));
}

.fx-dream-glyph,
.fx-dream-heart {
  line-height: 1;
  color: #ff3b5c;
  animation: dreamShard 1.15s var(--ease) forwards !important;
  filter: drop-shadow(0 4px 12px rgba(224, 17, 58, 0.45));
}

.fx-dream-glyph.is-friends,
.fx-dream-heart.is-friends {
  color: inherit;
  filter: drop-shadow(0 4px 14px rgba(249, 115, 22, 0.45));
}

.fx-dream-glyph.is-family {
  color: #2b6cb0;
  filter: drop-shadow(0 4px 14px rgba(43, 108, 176, 0.5));
}

.fx-dream-glyph.is-phase {
  color: #0c7a6d;
  filter: drop-shadow(0 0 14px rgba(214, 255, 58, 0.75));
}

.fx-dream-confetti {
  border-radius: 3px;
  animation: dreamShard 1.15s var(--ease) forwards !important;
  box-shadow: 0 0 12px rgba(255, 159, 26, 0.55);
}

.fx-dream-gene {
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 50%;
  animation: dreamShard 1.15s var(--ease) forwards !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.85);
}

.fx-dream-phase,
.fx-phase-spark {
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: #d6ff3a;
  box-shadow: 0 0 14px rgba(214, 255, 58, 0.85);
  animation: dreamShard 1.15s var(--ease) forwards !important;
}

.fx-signal-hex.is-soft,
.fx-helix-crystal.is-soft,
.fx-helix-node.is-soft {
  animation-duration: 0.65s !important;
}

.fx-soft-ring.is-phase,
.fx-btn-ring.is-phase {
  border-color: color-mix(in srgb, #d6ff3a 70%, #0c7a6d);
  box-shadow: 0 0 16px rgba(214, 255, 58, 0.45);
}

/* —— GREEN Signal Pulse —— */
.fx-signal-nova {
  animation: signalNova 0.95s var(--ease) forwards !important;
}

.fx-signal-ring {
  width: 18px;
  height: 18px;
  margin: -9px;
  border-radius: 50%;
  border: 2.5px solid #d6ff3a;
  box-shadow:
    0 0 20px rgba(214, 255, 58, 0.7),
    inset 0 0 12px rgba(12, 122, 109, 0.35);
  animation: signalRing 1.15s var(--ease) forwards !important;
  background: transparent;
}

.fx-signal-core {
  width: 52px;
  height: 52px;
  margin: -26px;
  animation: signalCore 1.25s var(--ease-spring) forwards !important;
}

.fx-signal-core b {
  position: absolute;
  inset: 10px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(145deg, #fff, #d6ff3a 40%, #0c7a6d);
  box-shadow: 0 0 28px rgba(214, 255, 58, 0.9);
}

.fx-signal-core i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 18px;
  margin: -9px 0 0 -1.5px;
  border-radius: 2px;
  background: #d6ff3a;
  box-shadow: 0 0 10px rgba(214, 255, 58, 0.9);
  transform-origin: center 18px;
}

.fx-signal-core i:nth-child(2) { transform: rotate(0deg) scaleY(0.7); }
.fx-signal-core i:nth-child(3) { transform: rotate(90deg) scaleY(1.1); }
.fx-signal-core i:nth-child(4) { transform: rotate(180deg) scaleY(0.85); }
.fx-signal-core i:nth-child(5) { transform: rotate(270deg) scaleY(1.2); }

.fx-signal-bar {
  width: 4px;
  height: 24px;
  margin: -12px 0 0 -2px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #d6ff3a 40%, #0c7a6d);
  box-shadow: 0 0 14px rgba(214, 255, 58, 0.75);
  transform-origin: center bottom;
  animation: fxSignalBarBurst 1.1s var(--ease) forwards !important;
}

.fx-signal-hex {
  width: 14px;
  height: 14px;
  margin: -7px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(145deg, #f7ffb0, #d6ff3a, #0a7568);
  box-shadow: 0 0 16px rgba(214, 255, 58, 0.8);
  animation: signalHex 1.25s var(--ease) forwards !important;
}

.fx-signal-hex.tone-2 {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  width: 12px;
  height: 12px;
  margin: -6px;
}

.fx-signal-hex.tone-3 {
  clip-path: none;
  border-radius: 3px;
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  margin: -5px;
}

.fx-signal-hub {
  width: 10px;
  height: 10px;
  margin: -5px;
  border-radius: 50%;
  border: 2px solid #d6ff3a;
  background: rgba(12, 122, 109, 0.55);
  box-shadow: 0 0 16px rgba(214, 255, 58, 0.7);
  animation: signalHub 1.3s var(--ease) forwards !important;
}

@keyframes signalNova {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(2.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(7.5); }
}

@keyframes signalRing {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.25); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(var(--ring-scale, 8)); }
}

@keyframes signalCore {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-30deg); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.35) rotate(12deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) rotate(40deg) translateY(-36px); }
}

@keyframes fxSignalBarBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot)) scaleY(0.2);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot)) scaleY(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scaleY(0.3);
  }
}

@keyframes signalHex {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25) rotate(calc(var(--spin) * 0.3));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.4) rotate(var(--spin));
  }
}

@keyframes signalHub {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--orbit-a)) translateX(0) scale(0.4);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--orbit-a)) translateX(54px) scale(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--orbit-a) + 140deg)) translateX(120px) scale(0.35);
  }
}

/* —— BLUE Constellation Helix —— */
.fx-helix-nova {
  animation: helixNova 1s var(--ease) forwards !important;
}

.fx-helix-ring {
  width: 22px;
  height: 22px;
  margin: -11px;
  border-radius: 50%;
  border: 2px dashed #60a5fa;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.65);
  animation: helixRing 1.25s var(--ease) forwards !important;
  background: transparent;
}

.fx-helix-core {
  font-size: 2.6rem;
  line-height: 1;
  color: #93c5fd;
  text-shadow:
    0 0 20px rgba(56, 189, 248, 0.95),
    0 0 40px rgba(37, 99, 235, 0.7);
  animation: helixCore 1.35s var(--ease-spring) forwards !important;
}

.fx-helix-link {
  height: 3px;
  margin: -1.5px 0 0 0;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #93c5fd 30%, #2563eb 70%, transparent);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.85);
  transform-origin: left center;
  animation: helixLink 1.15s var(--ease) forwards !important;
}

.fx-helix-node {
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #60a5fa 45%, #1e4e8c);
  box-shadow:
    0 0 0 2px rgba(147, 197, 253, 0.55),
    0 0 18px rgba(56, 189, 248, 0.85);
  animation: helixNode 1.3s var(--ease) forwards !important;
}

.fx-helix-node.tone-2 {
  width: 9px;
  height: 9px;
  margin: -4.5px;
  background: radial-gradient(circle at 35% 30%, #e0f2fe, #38bdf8, #1d4ed8);
}

.fx-helix-node.tone-3 {
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #bfdbfe, #2563eb);
}

.fx-helix-node.tone-4 {
  width: 14px;
  height: 8px;
  margin: -4px -7px;
  border-radius: 8px;
}

.fx-helix-crystal {
  width: 16px;
  height: 16px;
  margin: -8px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  background: linear-gradient(145deg, #fff, #93c5fd 40%, #1e40af);
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.9);
  animation: helixCrystal 1.3s var(--ease) forwards !important;
}

.fx-helix-electron {
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: #e0f2fe;
  box-shadow: 0 0 14px #38bdf8;
  animation: helixElectron 1.4s var(--ease) forwards !important;
}

@keyframes helixNova {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.1); }
  28% { opacity: 1; transform: translate(-50%, -50%) scale(2.6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

@keyframes helixRing {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.2) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(9) rotate(55deg); }
}

@keyframes helixCore {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15) rotateY(0deg); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.45) rotateY(40deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.55) rotateY(120deg) translateY(-42px); }
}

@keyframes helixLink {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot)) scaleX(0.1);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot)) scaleX(1.15);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scaleX(0.2);
  }
}

@keyframes helixNode {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  22% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.35);
  }
}

@keyframes helixCrystal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(calc(var(--spin) * 0.35));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.4) rotate(var(--spin));
  }
}

@keyframes helixElectron {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--orbit-a)) translateX(12px) scale(0.4);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(calc(var(--orbit-a) + 80deg)) translateX(58px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--orbit-a) + 240deg)) translateX(130px) scale(0.3);
  }
}

/* —— PINK Heart Bloom —— */
.fx-bloom-nova {
  animation: bloomNova 1s var(--ease) forwards !important;
}

.fx-bloom-ring {
  width: 20px;
  height: 20px;
  margin: -10px;
  border-radius: 50%;
  border: 2.5px solid #ff8fab;
  box-shadow: 0 0 22px rgba(255, 77, 109, 0.65);
  animation: bloomRing 1.2s var(--ease) forwards !important;
  background: transparent;
}

.fx-bloom-core {
  font-size: 2.8rem;
  line-height: 1;
  color: #ff3b5c;
  text-shadow:
    0 0 22px rgba(255, 59, 92, 0.95),
    0 0 48px rgba(217, 72, 108, 0.7);
  animation: bloomCore 1.35s var(--ease-spring) forwards !important;
}

.fx-bloom-petal {
  width: 18px;
  height: 28px;
  margin: -14px -9px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, #ffb3c6, #ff4d6d 55%, #b4234a);
  box-shadow: 0 0 16px rgba(255, 77, 109, 0.7);
  transform-origin: center bottom;
  animation: bloomPetal 1.15s var(--ease) forwards !important;
}

.fx-bloom-heart {
  line-height: 1;
  color: #ff3b5c;
  filter: drop-shadow(0 4px 12px rgba(224, 17, 58, 0.5));
  animation: bloomHeart 1.3s var(--ease) forwards !important;
}

.fx-bloom-heart.size-1 { font-size: 1rem; }
.fx-bloom-heart.size-2 { font-size: 1.35rem; color: #ff8fab; }
.fx-bloom-heart.size-3 { font-size: 1.7rem; color: #e11d48; }

.fx-bloom-spark {
  width: 8px;
  height: 8px;
  margin: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #ff8fab);
  box-shadow: 0 0 14px #ff4d6d;
  animation: bloomSpark 1.35s var(--ease) forwards !important;
}

.fx-bloom-heart.is-soft,
.fx-bloom-heart.is-btn {
  animation-duration: 0.65s !important;
}

@keyframes bloomNova {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.12); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(2.7); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(7.8); }
}

@keyframes bloomRing {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(9); }
}

@keyframes bloomCore {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-16deg); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1.55) rotate(8deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.45) translateY(-44px) rotate(16deg); }
}

@keyframes bloomPetal {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot)) scale(0.2);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0.35);
  }
}

@keyframes bloomHeart {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2) rotate(calc(var(--rot) * 0.3));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.4) rotate(var(--rot));
  }
}

@keyframes bloomSpark {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--orbit-a)) translateX(8px) scale(0.3);
  }
  40% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(calc(var(--orbit-a) + 70deg)) translateX(52px) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--orbit-a) + 200deg)) translateX(118px) scale(0.25);
  }
}

/* —— YELLOW Party Nova —— */
.fx-party-nova {
  animation: partyNova 1s var(--ease) forwards !important;
}

.fx-party-ring {
  width: 20px;
  height: 20px;
  margin: -10px;
  border-radius: 50%;
  border: 2.5px solid #fbbf24;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.65);
  animation: partyRing 1.2s var(--ease) forwards !important;
  background: transparent;
}

.fx-party-core {
  font-size: 2.6rem;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(255, 213, 74, 0.95));
  animation: partyCore 1.35s var(--ease-spring) forwards !important;
}

.fx-party-ribbon {
  width: 5px;
  height: 28px;
  margin: -14px -2.5px;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff7cc, #f59e0b 50%, #ea580c);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
  transform-origin: center top;
  animation: partyRibbon 1.15s var(--ease) forwards !important;
}

.fx-party-ribbon.tone-2 { background: linear-gradient(180deg, #fff, #fb7185, #e11d48); }
.fx-party-ribbon.tone-3 { background: linear-gradient(180deg, #fff, #ffe566, #ca8a04); }
.fx-party-ribbon.tone-4 { background: linear-gradient(180deg, #fff, #fdba74, #c2410c); }

.fx-party-star {
  line-height: 1;
  color: #f59e0b;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
  animation: partyStar 1.25s var(--ease) forwards !important;
}

.fx-party-face {
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(234, 88, 12, 0.35));
  animation: partyFace 1.3s var(--ease) forwards !important;
}

.fx-party-chip {
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 159, 26, 0.55);
  animation: partyChip 1.2s var(--ease) forwards !important;
}

.fx-party-star.is-soft,
.fx-party-star.is-btn,
.fx-party-chip.is-soft,
.fx-party-chip.is-btn {
  animation-duration: 0.65s !important;
}

@keyframes partyNova {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.12); }
  28% { opacity: 1; transform: translate(-50%, -50%) scale(2.8); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(8); }
}

@keyframes partyRing {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.25) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(9) rotate(-40deg); }
}

@keyframes partyCore {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-12deg); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.5) rotate(10deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5) translateY(-40px) rotate(18deg); }
}

@keyframes partyRibbon {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot)) scaleY(0.15);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot)) scaleY(1.25);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scaleY(0.25);
  }
}

@keyframes partyStar {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3) rotate(calc(var(--spin) * 0.4));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.35) rotate(var(--spin));
  }
}

@keyframes partyFace {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(-20deg);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.25) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4) rotate(24deg);
  }
}

@keyframes partyChip {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.5);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(0.6);
  }
}

@keyframes dreamFlash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(2.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(6); }
}

@keyframes dreamWave {
  0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(9); }
}

@keyframes dreamCore {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-20deg); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.55) rotate(8deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) translateY(-40px) rotate(18deg); }
}

@keyframes dreamShard {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15) rotate(calc(var(--rot) * 0.3));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.55) rotate(var(--rot));
  }
}

@keyframes clickFxFly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1);
  }
}

@keyframes clickFxHeart {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 18px))
      scale(1.15) rotate(var(--rot));
  }
}

@keyframes clickFxConfetti {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 24px))
      rotate(var(--rot)) scale(0.7);
  }
}

@keyframes clickFxGene {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.45) rotate(0deg);
  }
  35% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--dx) * 0.35),
        calc(-50% + var(--dy) * 0.35)
      )
      scale(1.15) rotate(calc(var(--rot) * 0.4));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      scale(0.85) rotate(calc(var(--rot) + 120deg));
  }
}

/* —— themed glints: brand + «Выбрано» —— */
@keyframes brandThemeGlint {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes chosenTextGlint {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes pickedShineSweep {
  0%,
  55%,
  100% {
    transform: translateX(-140%) skewX(-12deg);
    opacity: 0;
  }
  62% {
    opacity: 0.85;
  }
  78% {
    transform: translateX(140%) skewX(-12deg);
    opacity: 0;
  }
}

body.theme-couple .brand,
body.theme-friends .brand,
body.theme-family .brand {
  animation: brandThemeGlint 5.5s ease-in-out infinite;
}

body.theme-couple .brand {
  background: linear-gradient(
    105deg,
    #5c1828 0%,
    #d9486c 28%,
    #e8899e 42%,
    #c23a5a 58%,
    #3a0f1c 100%
  );
  background-size: 220% 100%;
}

body.theme-couple .brand::before {
  content: none;
}

body.theme-friends .brand {
  background: linear-gradient(
    105deg,
    #5c4010 0%,
    #d4a017 28%,
    #e8c45a 42%,
    #c47f12 58%,
    #2a2208 100%
  );
  background-size: 220% 100%;
}

body.theme-friends .brand::before {
  content: none;
}

body.theme-family .brand {
  background: linear-gradient(
    105deg,
    #152a44 0%,
    #2b6cb0 28%,
    #6b9fd4 42%,
    #2563eb 58%,
    #0b1a2e 100%
  );
  background-size: 220% 100%;
}

body.theme-family .brand::before {
  content: none;
}

.relation-actions .btn.is-picked-relation {
  position: relative;
  overflow: visible;
}

.relation-actions .btn.is-picked-relation > span {
  position: relative;
  z-index: 2;
}

.btn-chosen {
  overflow: hidden;
}

.btn-chosen .chosen-label {
  position: relative;
  z-index: 2;
  display: inline-block;
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: chosenTextGlint 2.2s ease-in-out infinite;
}

body.theme-couple .btn-chosen {
  background: linear-gradient(145deg, #ff4d6d, #e0113a 55%, #9b1234);
  color: #fff;
  box-shadow:
    0 16px 40px rgba(224, 17, 58, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-couple .btn-chosen .chosen-label {
  background-image: linear-gradient(
    105deg,
    #fff 10%,
    #ffe0e8 35%,
    #fff 50%,
    #ffb3c6 70%,
    #fff 90%
  );
}

body.theme-couple .btn-chosen .btn-shine {
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, 0.65), transparent 78%);
  animation-duration: 2.2s;
}

body.theme-friends .btn-chosen {
  background: linear-gradient(145deg, #ffb020, #f97316 55%, #c2410c);
  color: #fff;
  box-shadow:
    0 16px 40px rgba(249, 115, 22, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-friends .btn-chosen .chosen-label {
  background-image: linear-gradient(
    105deg,
    #fff 10%,
    #fff3c4 35%,
    #fff 50%,
    #ffe566 70%,
    #fff 90%
  );
}

body.theme-friends .btn-chosen .btn-shine {
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, 0.7), transparent 78%);
  animation-duration: 2.2s;
}

body.theme-family .btn-chosen {
  background: linear-gradient(145deg, #60a5fa, #2563eb 55%, #1e3a8a);
  color: #fff;
  box-shadow:
    0 16px 40px rgba(37, 99, 235, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-family .btn-chosen .chosen-label {
  background-image: linear-gradient(
    105deg,
    #fff 10%,
    #dbeafe 35%,
    #fff 50%,
    #93c5fd 70%,
    #fff 90%
  );
}

body.theme-family .btn-chosen .btn-shine {
  background: linear-gradient(110deg, transparent 22%, rgba(255, 255, 255, 0.7), transparent 78%);
  animation-duration: 2.2s;
}

@media (prefers-reduced-motion: reduce) {
  body.theme-couple .brand,
  body.theme-friends .brand,
  body.theme-family .brand,
  .btn-chosen .chosen-label,
  .relation-actions .btn.is-picked-relation::after {
    animation: none !important;
  }
}
