:root {
  --ink: #14110f;
  --ink-soft: #2a2420;
  --cream: #f6efe6;
  --cream-dim: #e8ddd0;
  --rose: #c45c6a;
  --rose-deep: #9e3d4c;
  --gold: #c4a574;
  --fog: rgba(246, 239, 230, 0.72);
  --line: rgba(246, 239, 230, 0.14);
  --shadow: rgba(0, 0, 0, 0.35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", system-ui, sans-serif;
  --radius: 14px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a,
button,
.btn,
.lp-btn,
.nav-toggle,
summary {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(196, 92, 106, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 45% at 90% 20%, rgba(196, 165, 116, 0.16), transparent 50%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(158, 61, 76, 0.2), transparent 55%),
    linear-gradient(165deg, #1a1512 0%, #0f0d0c 45%, #181412 100%);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Nav */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #120f0e;
  border-bottom: 1px solid transparent;
  /* no transform here — it breaks position:fixed mobile drawer */
}

.landing-page .site-header,
.landing-auth .site-header {
  background: #fff7fa;
  border-bottom-color: rgba(255, 46, 120, 0.12);
}

/* blur only on desktop — blur + sticky causes mobile scroll jitter */
@supports (backdrop-filter: blur(8px)) {
  @media (min-width: 901px) {
    .site-header {
      background: rgba(15, 13, 12, 0.86);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
    .landing-page .site-header {
      background: rgba(255, 247, 250, 0.92);
    }
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  position: relative;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 46, 120, 0.18);
}

.brand-text {
  line-height: 1.1;
}

.brand span {
  color: var(--rose);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cream);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-end {
  display: none;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-switch-bar {
  display: none;
}

.nav-toggle:active {
  transform: scale(0.96);
}

.nav-toggle-box {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
}

.nav-toggle-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle-line:nth-child(1) { top: 0; }
.nav-toggle-line:nth-child(2) { top: 6px; }
.nav-toggle-line:nth-child(3) { top: 12px; }

.nav-drawer-title {
  display: none;
}

.nav-backdrop {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links .nav-link,
.nav-links > a {
  font-size: 0.9rem;
  color: var(--fog);
  transition: color 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.nav-links .nav-link:hover,
.nav-links > a:hover {
  color: var(--cream);
}

.nav-drawer-meta {
  display: contents;
}

.nav-cta {
  padding: 0.55rem 1rem !important;
  font-size: 0.85rem !important;
  min-height: 44px;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.lang-switch a {
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 36px;
  color: var(--fog);
  opacity: 1;
  background: transparent;
}

.lang-switch a:not(.active) {
  color: rgba(246, 239, 230, 0.72);
}

.lang-switch a.active {
  background: var(--cream);
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--rose);
  color: #fff;
}

.btn-primary:hover {
  background: var(--rose-deep);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--cream);
}

.btn-ghost:hover {
  border-color: var(--cream-dim);
}

.btn-block {
  width: 100%;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-weight: 600;
}

.btn-google:hover {
  background: #f8f8f8;
}

.btn-google-icon {
  display: inline-flex;
  line-height: 0;
}

.btn-google:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Auth — match landing pink look */
.landing-auth {
  color: #1f1230;
  background: #fff5f8;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.landing-auth .site-bg {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 105, 180, 0.18), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(255, 182, 193, 0.35), transparent 40%),
    linear-gradient(180deg, #fff7fa 0%, #ffe8f1 45%, #fff5f8 100%);
}

/* Fixed flush header — never floats over form text */
.landing-auth .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: 0 1px 0 rgba(255, 46, 120, 0.12);
  z-index: 1000;
  background: #fff7fa;
  border-bottom: 1px solid rgba(255, 46, 120, 0.12);
}

.landing-auth .site-header .wrap.nav {
  max-width: var(--max);
}

.landing-auth .nav-backdrop {
  border-radius: 0;
}

.landing-auth main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 5.25rem 0 2.5rem;
  box-sizing: border-box;
}

.auth-shell {
  width: min(100% - 1.5rem, 440px);
  margin: 0 auto;
  padding: 0;
}

.landing-auth .auth-card {
  width: 100%;
  max-width: none;
  padding: 1.75rem 1.35rem 1.85rem;
  border: 1px solid rgba(255, 46, 120, 0.14);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(120, 40, 70, 0.08);
  backdrop-filter: none;
}

.landing-auth .auth-card h1 {
  font-family: "Sora", system-ui, sans-serif;
  font-size: clamp(1.55rem, 5vw, 1.9rem);
  font-weight: 800;
  color: #17141c;
}

.landing-auth .auth-card .sub {
  color: #6b5b66;
}

.landing-auth .form-group label {
  color: #6b5b66;
}

.landing-auth .form-group input,
.landing-auth .form-group textarea,
.landing-auth .form-group select {
  background: #fff8fb;
  border-color: rgba(255, 46, 120, 0.18);
  color: #17141c;
}

.landing-auth .form-group input:focus {
  border-color: #ff2e78;
}

.landing-auth .btn-primary {
  background: #ff2e78;
  color: #fff;
  border-color: #ff2e78;
  box-shadow: 0 10px 24px rgba(255, 46, 120, 0.25);
}

.landing-auth .divider {
  color: #b0899a;
}

.landing-auth .divider::before,
.landing-auth .divider::after {
  background: rgba(255, 46, 120, 0.18);
}

.landing-auth .auth-switch,
.landing-auth .auth-forgot,
.landing-auth .auth-hint {
  color: #6b5b66;
  font-size: 0.92rem;
}

.landing-auth .auth-forgot {
  text-align: right;
  margin: -0.35rem 0 1rem;
}

.landing-auth .auth-switch a,
.landing-auth .auth-forgot a {
  color: #e91e8c;
  font-weight: 700;
}

.landing-auth .auth-hint {
  margin-top: 0.65rem;
  font-size: 0.8rem;
}

.landing-auth .alert-error {
  background: #ffe4ec;
  border-color: rgba(233, 30, 140, 0.25);
  color: #9c1d4e;
}

.landing-auth .site-footer {
  background: #fff;
  color: #7a6674;
  border-top-color: rgba(255, 46, 120, 0.12);
}

@media (max-width: 640px) {
  .auth-shell {
    width: min(100% - 1.25rem, 440px);
    margin-top: 0;
  }

  .landing-auth main {
    padding-top: 5rem;
    justify-content: flex-start;
  }

  .landing-auth .auth-card {
    padding: 1.35rem 1.1rem 1.5rem;
  }
}

/* Hero — one composition, brand first */
.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  align-items: end;
  padding: 2rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% -10% auto auto;
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 40%, rgba(246, 239, 230, 0.12), transparent 55%),
    radial-gradient(circle at 60% 60%, rgba(196, 92, 106, 0.35), transparent 60%);
  filter: blur(2px);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-24px, 18px) scale(1.06); }
}

.hero-inner {
  position: relative;
  max-width: 38rem;
  animation: rise 0.9s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}

.hero-brand em {
  font-style: italic;
  color: var(--rose);
  font-weight: 500;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  color: var(--cream-dim);
}

.hero p {
  margin: 0 0 1.75rem;
  color: var(--fog);
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-note {
  font-size: 0.88rem;
  color: rgba(246, 239, 230, 0.55);
  animation: rise 1.1s ease 0.15s both;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--fog);
}

.feature-list {
  display: grid;
  gap: 1.75rem 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-item {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  animation: rise 0.7s ease both;
}

.feature-item h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
}

.feature-item p {
  margin: 0;
  color: var(--fog);
  font-size: 0.95rem;
}

.how-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  counter-reset: step;
}

.how-step {
  position: relative;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.how-step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
}

.how-step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.how-step p {
  margin: 0;
  color: var(--fog);
  font-size: 0.92rem;
}

.pricing-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.price-plan {
  padding: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.price-plan.featured {
  border-color: rgba(196, 92, 106, 0.55);
  background:
    linear-gradient(160deg, rgba(196, 92, 106, 0.18), rgba(255, 255, 255, 0.03));
}

.price-plan h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.price-plan .amount {
  font-size: 1.75rem;
  font-weight: 600;
}

.price-plan .note {
  color: var(--gold);
  font-size: 0.85rem;
  margin-top: -0.5rem;
}

.price-plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.price-plan li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  color: var(--fog);
  font-size: 0.92rem;
}

.final-cta {
  text-align: center;
  padding: 5rem 0 4rem;
}

.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 1.5rem;
  max-width: 18ch;
  margin-inline: auto;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: rgba(246, 239, 230, 0.5);
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

/* Auth */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Old dark auth cards (fallback) — do NOT center whole body (breaks header) */
.auth-page:not(.landing-auth) {
  display: flex;
  flex-direction: column;
}

.auth-page:not(.landing-auth) main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  width: min(100%, 420px);
  padding: 2rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(20, 17, 15, 0.85);
  backdrop-filter: blur(12px);
  animation: rise 0.6s ease both;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0 0 0.35rem;
}

.auth-card .sub {
  color: var(--fog);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  color: var(--cream-dim);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font: inherit;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 8rem;
}

.form-group select {
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(196, 92, 106, 0.7);
}

.alert {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-error {
  background: rgba(158, 61, 76, 0.25);
  border: 1px solid rgba(196, 92, 106, 0.45);
}

.alert-success {
  background: rgba(46, 125, 90, 0.22);
  border: 1px solid rgba(76, 175, 130, 0.4);
  color: #c8f0d8;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  color: rgba(246, 239, 230, 0.45);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--fog);
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--rose);
  font-weight: 600;
}

.auth-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.dash {
  padding: 3rem 0 4rem;
}

.dash h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
}

.dash .meta {
  color: var(--fog);
  margin-bottom: 1.5rem;
}

.dash-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  max-width: 36rem;
}

.dash-panel p {
  color: var(--fog);
  margin: 0 0 0.75rem;
}

.dash-panel p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #120f0e;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    overflow: visible;
  }

  .landing-page .site-header,
  .landing-auth .site-header {
    background: #fff7fa;
  }

  .landing-auth .site-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: none !important;
    border-radius: 0;
    margin: 0;
  }

  .landing-auth main {
    padding-top: 5.25rem;
    padding-bottom: 2rem;
    justify-content: flex-start;
  }

  .nav {
    overflow: visible;
  }

  .nav-toggle {
    display: inline-flex;
    z-index: 1003;
    position: relative;
  }

  .nav-end {
    display: inline-flex;
    z-index: 1003;
    position: relative;
  }

  .lang-switch-bar {
    display: inline-flex;
  }

  .lang-switch-bar a {
    min-height: 40px;
    min-width: 2.4rem;
    padding: 0.4rem 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.nav-open .nav-toggle {
    border-color: rgba(255, 77, 141, 0.55);
    background: rgba(255, 46, 120, 0.12);
    color: #ff4d8d;
  }

  body.nav-open .nav-toggle-line:nth-child(1) {
    top: 6px;
    transform: rotate(45deg);
  }
  body.nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-toggle-line:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
  }

  html.nav-open,
  body.nav-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(10, 6, 10, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    -webkit-tap-highlight-color: transparent;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links,
  body > .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 340px);
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    z-index: 1002;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.2rem;
    margin: 0;
    padding: 5.25rem 1.15rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 24px 0 0 24px;
    background: linear-gradient(180deg, #1a1418 0%, #120e12 100%);
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.35);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translate3d(105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, visibility 0.28s ease;
  }

  .landing-page .nav-links,
  .landing-auth .nav-links,
  .landing-page > .nav-links,
  .landing-auth > .nav-links,
  body.landing-page > .nav-links,
  body.landing-auth > .nav-links {
    background: linear-gradient(180deg, #ffffff 0%, #fff5f8 100%);
    box-shadow: -18px 0 48px rgba(180, 40, 90, 0.14);
  }

  body.nav-open .nav-links,
  body.nav-open > .nav-links {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open .site-header {
    z-index: 1003;
  }

  .nav-drawer-title {
    display: block;
    margin: 0 0.35rem 0.85rem;
    font-family: "Sora", system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(246, 239, 230, 0.45);
  }

  .landing-page .nav-drawer-title,
  .landing-auth .nav-drawer-title,
  body.landing-page > .nav-links .nav-drawer-title,
  body.landing-auth > .nav-links .nav-drawer-title {
    color: #b0899a;
  }

  .nav-drawer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .landing-page .nav-drawer-meta,
  .landing-auth .nav-drawer-meta,
  body.landing-page > .nav-links .nav-drawer-meta,
  body.landing-auth > .nav-links .nav-drawer-meta {
    border-top-color: rgba(255, 46, 120, 0.12);
  }

  .nav-links .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cream);
    background: transparent;
  }

  .nav-links .nav-link:active,
  .nav-links .nav-link:hover {
    background: rgba(255, 46, 120, 0.12);
    color: #ff7aa8;
  }

  .landing-page .nav-links .nav-link,
  .landing-auth .nav-links .nav-link,
  body.landing-page > .nav-links .nav-link,
  body.landing-auth > .nav-links .nav-link {
    color: #2a1a24;
  }

  .landing-page .nav-links .nav-link:active,
  .landing-page .nav-links .nav-link:hover,
  .landing-auth .nav-links .nav-link:active,
  .landing-auth .nav-links .nav-link:hover,
  body.landing-page > .nav-links .nav-link:active,
  body.landing-page > .nav-links .nav-link:hover,
  body.landing-auth > .nav-links .nav-link:active,
  body.landing-auth > .nav-links .nav-link:hover {
    background: #ffe4ec;
    color: #e91e8c;
  }

  .nav-links .lang-switch {
    width: 100%;
    max-width: 12rem;
    margin: 0.15rem 0 0.75rem;
    justify-content: stretch;
  }

  .nav-links .lang-switch a {
    flex: 1;
    text-align: center;
    justify-content: center;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .nav-links .nav-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    color: inherit;
    font-weight: 600;
  }

  .nav-links .nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    background: #ff2e78;
    color: #fff;
    flex-shrink: 0;
  }

  .nav-links .nav-cta {
    justify-content: center;
    margin-top: 0.35rem;
    width: 100%;
    border-radius: 999px;
    min-height: 50px;
    font-size: 1rem !important;
  }

  .wrap {
    width: min(100% - 1.25rem, var(--max));
  }

  .dash-modules {
    grid-template-columns: 1fr;
  }

  .upgrade-grid {
    grid-template-columns: 1fr !important;
  }

  .btn,
  .btn-block {
    min-height: 48px;
  }

  #together,
  #how,
  #demos,
  #templates,
  #pricing,
  #compare,
  #faq,
  #features {
    scroll-margin-top: 5rem;
  }
}

@media (max-width: 640px) {
  .hero {
    align-items: center;
    min-height: calc(100vh - 5rem);
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* prevents iOS zoom */
  }

  .dash-head-row {
    flex-direction: column;
  }

  .admin-table {
    min-width: 640px;
  }
}

/* Dashboard hub */
body.app-shell {
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(233, 30, 140, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(255, 193, 7, 0.06), transparent 50%),
    #120f0e;
}

.dash-home .dash-head-row {
  margin-bottom: 1.25rem;
}

.dash-welcome {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-avatar {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff6b9d, #c2185b);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(233, 30, 140, 0.35);
}

.dash-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dash-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 18px;
  margin-bottom: 1.75rem;
  border: 1px solid var(--line);
}

.dash-banner p {
  margin: 0 0 0.35rem;
  color: var(--fog);
}

.dash-banner p:last-child {
  margin-bottom: 0;
}

.dash-banner--plus {
  background: linear-gradient(120deg, rgba(233, 30, 140, 0.18), rgba(255, 255, 255, 0.04));
  border-color: rgba(233, 30, 140, 0.35);
}

.dash-banner--free {
  background: rgba(255, 255, 255, 0.04);
}

.dash-section {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border-radius: 22px;
  border: 1px solid transparent;
}

.dash-section-head {
  margin-bottom: 1rem;
}

.dash-section-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.dash-section-head p {
  margin: 0;
  color: var(--fog);
  font-size: 0.92rem;
}

.dash-section--together {
  background: linear-gradient(160deg, rgba(236, 64, 122, 0.12), rgba(255, 255, 255, 0.02));
  border-color: rgba(236, 64, 122, 0.22);
}

.dash-section--keepsake {
  background: linear-gradient(160deg, rgba(126, 87, 194, 0.14), rgba(255, 255, 255, 0.02));
  border-color: rgba(149, 117, 205, 0.28);
}

.dash-section--play {
  background: linear-gradient(160deg, rgba(0, 150, 136, 0.12), rgba(255, 255, 255, 0.02));
  border-color: rgba(0, 150, 136, 0.28);
}

.dash-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  vertical-align: middle;
}

.plan-badge.plus,
.plan-badge.premium {
  border-color: rgba(196, 92, 106, 0.55);
  color: var(--rose);
  background: rgba(233, 30, 140, 0.12);
}

.plan-badge.starter {
  border-color: rgba(255, 183, 77, 0.55);
  color: #ffcc80;
  background: rgba(255, 167, 38, 0.12);
}

.plan-badge.free {
  color: var(--gold);
}

.dash-modules {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dash-module {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(18, 15, 14, 0.55);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.dash-module:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.dash-section--together .dash-module:hover {
  border-color: rgba(236, 64, 122, 0.55);
  background: rgba(236, 64, 122, 0.12);
}

.dash-section--keepsake .dash-module:hover {
  border-color: rgba(149, 117, 205, 0.55);
  background: rgba(126, 87, 194, 0.14);
}

.dash-section--play .dash-module:hover {
  border-color: rgba(0, 150, 136, 0.55);
  background: rgba(0, 150, 136, 0.12);
}

.dash-module.is-featured {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, rgba(233, 30, 140, 0.2), rgba(126, 87, 194, 0.12));
  border-color: rgba(233, 30, 140, 0.35);
}

.dash-module-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dash-module-body {
  flex: 1;
  min-width: 0;
}

.dash-module h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 0.3rem;
}

.dash-module p {
  margin: 0;
  color: var(--fog);
  font-size: 0.88rem;
  line-height: 1.45;
}

.dash-module-go {
  opacity: 0.45;
  font-size: 1.1rem;
  margin-top: 0.15rem;
}

.back-link {
  margin: 0 0 1rem;
}

.back-link a {
  color: var(--fog);
  font-size: 0.92rem;
  text-decoration: none;
}

.back-link a:hover {
  color: var(--rose);
}

.upload-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--fog);
}

/* Upgrade */
.upgrade-page {
  padding: 3rem 0 4rem;
}

.upgrade-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin: 0.5rem 0 0.75rem;
}

.upgrade-lead {
  color: var(--fog);
  max-width: 36rem;
}

.upgrade-feature {
  color: var(--gold);
  font-size: 0.95rem;
}

.upgrade-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin: 2rem 0;
}

.upgrade-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.upgrade-bill-toggle {
  display: inline-flex;
  gap: 0.35rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.upgrade-bill-toggle a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fog);
}

.upgrade-bill-toggle a.is-active {
  background: rgba(196, 92, 106, 0.25);
  color: var(--cream);
}

.upgrade-bill-toggle em {
  font-style: normal;
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 46, 120, 0.2);
  color: #ff9ec0;
}

.upgrade-col {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.upgrade-col.featured {
  border-color: rgba(196, 92, 106, 0.55);
  background: linear-gradient(160deg, rgba(196, 92, 106, 0.16), rgba(255, 255, 255, 0.03));
}

.upgrade-col.is-current {
  border-color: rgba(109, 184, 138, 0.55);
  box-shadow: 0 0 0 1px rgba(109, 184, 138, 0.25);
}

.upgrade-current-pill {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(109, 184, 138, 0.18);
  color: #8fd4a8;
}

.upgrade-col .price-line {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--cream);
}

.upgrade-owned-msg {
  margin: 0;
  font-weight: 600;
  color: #8fd4a8;
}

.upgrade-journey-note {
  margin: 1.5rem 0;
  color: var(--fog);
}

.upgrade-journey-note a {
  color: #ff7aa8;
  font-weight: 600;
}

.plan-badge.starter,
.plan-badge.premium {
  border-color: rgba(196, 92, 106, 0.55);
  color: var(--rose);
}

.upgrade-col h2 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
}

.upgrade-col .note {
  color: var(--gold);
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.upgrade-col ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.upgrade-col li {
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  color: var(--fog);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .upgrade-grid-3 {
    grid-template-columns: 1fr;
  }
}

.meta-note {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: rgba(246, 239, 230, 0.5);
}

.back-link {
  color: var(--fog);
}

/* Test hub + quiz wizard */
.page-tests {
  background: #07070f;
}

.tests-hub {
  padding: 2rem 0 4rem;
}

.tests-hub-head {
  text-align: center;
  margin-bottom: 2.25rem;
}

.tests-hub-title {
  font-family: var(--font-body);
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  font-weight: 700;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.tests-hub-title span {
  background: linear-gradient(90deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tests-hub-sub {
  margin: 0 auto;
  max-width: 34rem;
  color: rgba(226, 232, 240, 0.7);
  font-size: 1rem;
}

.test-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.test-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  min-height: 168px;
  padding: 1.35rem 1rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: #12121c;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.test-card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 114, 182, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.test-card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.45rem;
  background: linear-gradient(145deg, #fb7185, #e11d48);
}

.test-card.tone-orange .test-card-icon { background: linear-gradient(145deg, #fb923c, #ea580c); }
.test-card.tone-violet .test-card-icon { background: linear-gradient(145deg, #c084fc, #7c3aed); }
.test-card.tone-green .test-card-icon { background: linear-gradient(145deg, #4ade80, #16a34a); }
.test-card.tone-blue .test-card-icon { background: linear-gradient(145deg, #60a5fa, #2563eb); }
.test-card.tone-amber .test-card-icon { background: linear-gradient(145deg, #fbbf24, #d97706); }
.test-card.tone-yellow .test-card-icon { background: linear-gradient(145deg, #fde047, #eab308); color: #1f2937; }
.test-card.tone-teal .test-card-icon { background: linear-gradient(145deg, #2dd4bf, #0d9488); }
.test-card.tone-slate .test-card-icon { background: linear-gradient(145deg, #94a3b8, #475569); }
.test-card.tone-indigo .test-card-icon { background: linear-gradient(145deg, #a78bfa, #4f46e5); }

.test-card h2 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: #f8fafc;
}

.test-card-count {
  margin-top: auto;
  color: #f43f5e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.quiz-wrap {
  padding: 1.5rem 0 3.5rem;
  display: grid;
  place-items: center;
}

.quiz-card {
  width: min(100%, 520px);
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #12121e;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.quiz-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(99, 102, 241, 0.22);
}

.quiz-card-title {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #fff;
}

.quiz-card-series {
  margin: 0;
  color: #e11d48;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.quiz-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.quiz-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.quiz-progress {
  margin: 0 0 0.75rem;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.quiz-question {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 1.15rem;
  color: #fff;
}

.quiz-options {
  display: grid;
  gap: 0.65rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option:hover {
  border-color: rgba(244, 114, 182, 0.45);
}

.quiz-option.is-selected {
  border-color: rgba(244, 114, 182, 0.7);
  background: rgba(244, 114, 182, 0.08);
}

.quiz-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quiz-option-text {
  flex: 1;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.35;
}

.quiz-option-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.55);
  flex-shrink: 0;
}

.quiz-option.is-selected .quiz-option-dot,
.quiz-option:has(input:checked) .quiz-option-dot {
  border-color: #f43f5e;
  box-shadow: inset 0 0 0 4px #12121e, inset 0 0 0 9px #f43f5e;
}

.quiz-actions {
  margin-top: 1.25rem;
}

.quiz-hint {
  min-height: 1.2rem;
  margin: 0 0 0.65rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.quiz-next {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #9f1239, #6b21a8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.quiz-next:hover:not(:disabled) {
  transform: translateY(-1px);
}

.quiz-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quiz-name-field {
  margin-bottom: 1rem;
}

.test-q {
  border: 0;
  padding: 0;
  margin-bottom: 1.35rem;
}

.test-q legend {
  font-weight: 600;
  margin-bottom: 0.55rem;
  padding: 0;
}

.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.35rem 0;
  color: var(--fog);
  cursor: pointer;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--cream-dim);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stats {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-bottom: 1.5rem;
}

.admin-stat {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.admin-stat strong {
  display: block;
  font-size: 1.6rem;
  font-family: var(--font-display);
}

.admin-stat span {
  color: var(--fog);
  font-size: 0.85rem;
}

.admin-tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-tag.ok {
  background: rgba(109, 184, 138, 0.18);
  color: #8fd4a8;
}

.admin-action {
  padding: 0.35rem 0.6rem !important;
  font-size: 0.75rem !important;
  min-height: 0 !important;
}

.admin-action-danger {
  border-color: rgba(244, 63, 94, 0.35) !important;
  color: #fb7185 !important;
}

.score-big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 4.5rem);
  color: var(--rose);
  line-height: 1;
  margin: 0.5rem 0;
}

.result-page {
  padding-bottom: 3rem;
}

.result-hero {
  max-width: 40rem;
  text-align: center;
  margin-inline: auto;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 0.5rem;
}

.result-stats div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
}

.result-stats strong {
  display: block;
  font-size: 1.35rem;
  color: var(--cream);
}

.result-stats span {
  font-size: 0.75rem;
  color: var(--fog);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.share-row,
.result-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.result-analysis {
  max-width: 44rem;
  margin: 1.5rem auto 0;
}

.result-analysis h2 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
}

.result-analysis-lead {
  margin: 0 0 0.35rem;
  color: var(--cream);
}

.analysis-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.analysis-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.03);
}

.analysis-card.is-match {
  border-color: rgba(109, 184, 138, 0.35);
}

.analysis-card.is-diff {
  border-color: rgba(196, 92, 106, 0.35);
}

.analysis-card header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  margin-bottom: 0.85rem;
}

.analysis-num {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 46, 120, 0.12);
  color: #ff7aa8;
}

.analysis-card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
  font-weight: 600;
}

.analysis-card .tag {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.analysis-card.is-match .tag {
  color: #6db88a;
  border-color: rgba(109, 184, 138, 0.4);
}

.analysis-card.is-diff .tag {
  color: #ff7aa8;
  border-color: rgba(255, 122, 168, 0.4);
}

.analysis-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.analysis-answers .who {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fog);
  margin-bottom: 0.25rem;
}

.analysis-answers p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--cream);
  line-height: 1.4;
}

.detail-row {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.detail-row h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.detail-row .tag {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}

.detail-row.match .tag {
  color: #6db88a;
}

.detail-row.mismatch .tag {
  color: var(--rose);
}

/* Lists */
.list-stack {
  display: grid;
  gap: 0.65rem;
}

.list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.list-item.is-done {
  opacity: 0.55;
  text-decoration: line-through;
}

.list-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.list-actions a {
  color: var(--gold);
}

.share-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font: inherit;
}

.qr-img {
  margin: 1rem auto;
  border-radius: 12px;
  background: #fff;
  padding: 0.5rem;
}

/* Letter builder / view */
.step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.step-pills a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  text-transform: capitalize;
  color: var(--fog);
}

.step-pills a.active {
  background: var(--cream);
  color: var(--ink);
  border-color: transparent;
}

.emotion-grid,
.template-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.emotion-opt,
.template-opt {
  display: block;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
}

.emotion-opt:has(input:checked),
.template-opt:has(input:checked) {
  border-color: var(--rose);
  box-shadow: inset 0 0 0 1px rgba(196, 92, 106, 0.35);
}

.template-opt {
  background: linear-gradient(145deg, var(--tpl-bg, #0b1220), rgba(255, 255, 255, 0.04));
  border-color: color-mix(in srgb, var(--tpl-accent, #c45c6a) 40%, transparent);
}

.letter-preview {
  white-space: pre-wrap;
  font-family: var(--font-display);
  color: var(--cream-dim);
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 10px;
  overflow: auto;
}

.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.photo-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.letter-view {
  padding: 2.5rem 0 4rem;
}

.letter-surface {
  max-width: 40rem;
  margin-inline: auto;
  padding: 2rem 1.5rem 2.5rem;
  border-radius: calc(var(--radius) + 6px);
  background: var(--letter-bg, #0b1220);
  border: 1px solid color-mix(in srgb, var(--letter-accent, #c45c6a) 35%, transparent);
  box-shadow: 0 20px 50px var(--shadow);
  animation: rise 0.7s ease both;
}

.letter-to {
  color: var(--letter-accent, var(--rose));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 1rem;
}

.letter-body {
  font-family: var(--letter-font, var(--font-display));
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--cream);
}

.letter-photos {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.letter-photos img {
  width: 100%;
  border-radius: 12px;
}

.letter-music {
  margin-top: 1.5rem;
  aspect-ratio: 16 / 9;
}

.letter-music iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* Counter */
.counter-boxes {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  margin-top: 1.5rem;
}

.counter-box {
  text-align: center;
  padding: 1.1rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at top, rgba(196, 92, 106, 0.18), transparent 70%),
    rgba(255, 255, 255, 0.03);
}

.counter-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--cream);
  line-height: 1.1;
}

.counter-box span {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog);
}

/* Puzzle */
.puzzle-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin-top: 1rem;
}

.puzzle-tile {
  border: 0;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.06);
  background-repeat: no-repeat;
  cursor: pointer;
  padding: 0;
}

.puzzle-tile.empty {
  opacity: 0.15;
  cursor: default;
}

/* Game */
.flip-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.flip-card {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(196, 92, 106, 0.25), rgba(255, 255, 255, 0.04));
  color: var(--cream);
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.flip-card:hover:not(:disabled) {
  transform: translateY(-3px);
}

.flip-card.is-heart {
  background: var(--rose);
  border-color: transparent;
}

.flip-card.is-miss {
  opacity: 0.45;
}

/* Footer brand logo */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Scroll hearts (landing) — kept in global CSS so effect always loads */
.scroll-hearts {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900;
  overflow: visible;
}

.scroll-heart {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.55rem;
  line-height: 1;
  color: #ff2e78;
  will-change: transform, opacity;
  text-shadow: 0 2px 10px rgba(255, 46, 120, 0.45);
  user-select: none;
}

.scroll-heart-trail.is-mouse {
  color: #ff5fa2;
  font-size: 1.15rem;
  animation-duration: 0.95s;
}

.scroll-heart-lead {
  font-size: 1.9rem;
  color: #e91e8c;
  z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(233, 30, 140, 0.55));
  pointer-events: none;
  transition: none;
}

.scroll-heart-trail {
  z-index: 1;
  animation: scroll-heart-fade 1.2s ease-out forwards;
  transform: translate3d(var(--sx, 0), var(--sy, 0), 0) scale(var(--sc, 1)) rotate(var(--rot, 0deg));
  transform-origin: center center;
}

@keyframes scroll-heart-fade {
  0% {
    opacity: 0.95;
    transform: translate3d(var(--sx, 0), var(--sy, 0), 0) scale(var(--sc, 1)) rotate(var(--rot, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--sx, 0), calc(var(--sy, 0px) - 40px), 0) scale(0.35) rotate(var(--rot, 0deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-heart-trail {
    display: none;
  }
}
