:root {
  --ink: #4c1737;
  --ink-soft: #7c4464;
  --rose: #ff5d88;
  --rose-strong: #ea316b;
  --blush: #ff9cba;
  --apricot: #ffbf86;
  --cream: #fff8f4;
  --panel: rgba(255, 247, 251, 0.82);
  --panel-strong: rgba(255, 250, 252, 0.9);
  --border: rgba(255, 255, 255, 0.55);
  --shadow: 0 30px 90px rgba(133, 37, 86, 0.22);
  --shadow-soft: 0 20px 50px rgba(133, 37, 86, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 243, 221, 0.72), transparent 26%),
    radial-gradient(circle at 85% 20%, rgba(255, 184, 209, 0.34), transparent 24%),
    radial-gradient(circle at 75% 82%, rgba(255, 212, 166, 0.32), transparent 28%),
    linear-gradient(145deg, #fff8f8 0%, #ffe7f0 42%, #ffdcd7 100%);
}

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 28px 18px;
  overflow: hidden;
}

.ambient,
.grid-haze {
  position: absolute;
  pointer-events: none;
}

.ambient {
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.72;
}

.ambient-one {
  width: 360px;
  height: 360px;
  top: -80px;
  left: -90px;
  background: rgba(255, 160, 198, 0.34);
  animation: drift 14s ease-in-out infinite;
}

.ambient-two {
  width: 300px;
  height: 300px;
  right: -80px;
  top: 18%;
  background: rgba(255, 202, 149, 0.34);
  animation: drift 18s ease-in-out infinite reverse;
}

.ambient-three {
  width: 420px;
  height: 420px;
  bottom: -160px;
  left: 30%;
  background: rgba(255, 122, 166, 0.22);
  animation: drift 16s ease-in-out infinite;
}

.grid-haze {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 88%);
  opacity: 0.35;
}

.stage-card {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 26px;
  padding: 28px;
  border-radius: 38px;
  border: 1px solid var(--border);
  background: rgba(255, 250, 252, 0.44);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: stageIn 0.8s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.stage-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 36px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.18), transparent 40%);
  pointer-events: none;
  z-index: -1;
}

.hero-panel,
.calculator-panel {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.hero-panel {
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(255, 223, 192, 0.8), transparent 28%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.92), rgba(255, 237, 245, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.calculator-panel {
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(180deg, rgba(255, 248, 251, 0.96), rgba(255, 241, 246, 0.92));
  box-shadow: var(--shadow-soft);
}

.eyebrow,
.panel-kicker,
.special-badge,
.result-label,
.stat-label,
.mood-label,
.mini-title {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 241, 245, 0.88);
  color: var(--rose-strong);
  font-size: 0.74rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 0.96;
}

h1 {
  margin-top: 18px;
  max-width: 11ch;
  font-size: clamp(3.3rem, 8vw, 5.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.subcopy {
  max-width: 34rem;
  margin: 18px 0 0;
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 1.03rem;
}

.spark-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.spark-notes span {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rose-strong);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.74);
}

.hero-stack {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  max-width: 32rem;
}

.mood-card,
.mini-card {
  position: relative;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 30px rgba(162, 64, 105, 0.12);
}

.mood-card-main {
  padding: 18px 18px 20px;
}

.mood-label,
.mini-title,
.panel-kicker,
.result-label,
.stat-label,
.special-badge {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--rose-strong);
}

.mood-card strong {
  display: block;
  margin-top: 10px;
  font-size: 1.2rem;
  line-height: 1.35;
}

.mood-card p,
.mini-card p,
.panel-note,
.result-copy p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mini-card {
  min-height: 148px;
  padding: 16px;
}

.mini-card-warm {
  background: linear-gradient(180deg, rgba(255, 248, 233, 0.92), rgba(255, 235, 244, 0.72));
}

.orbit-cluster {
  position: absolute;
  right: 20px;
  bottom: 12px;
  width: 260px;
  height: 260px;
  pointer-events: none;
  opacity: 0.92;
}

.orbit,
.planet {
  position: absolute;
  border-radius: 50%;
}

.orbit {
  border: 1px solid rgba(242, 108, 152, 0.22);
}

.orbit-a {
  inset: 24px;
}

.orbit-b {
  inset: 58px;
}

.orbit-c {
  inset: 92px;
}

.planet {
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.35rem;
  box-shadow: 0 14px 30px rgba(212, 77, 122, 0.24);
}

.planet-heart {
  width: 58px;
  height: 58px;
  top: 20px;
  right: 42px;
  background: linear-gradient(145deg, #ff87ad, #ea316b);
  animation: bob 5s ease-in-out infinite;
}

.planet-star {
  width: 44px;
  height: 44px;
  left: 30px;
  bottom: 54px;
  background: linear-gradient(145deg, #ffc47f, #ff9367);
  animation: bob 6s ease-in-out infinite reverse;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-note {
  max-width: 11rem;
  margin: 0;
  text-align: right;
  font-size: 0.92rem;
}

.live-chip {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  background: rgba(255, 233, 242, 0.86);
  color: var(--rose-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.love-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.hero-form {
  max-width: 34rem;
  margin-top: 20px;
}

.hero-form .cta {
  justify-self: start;
  min-width: 240px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.field input {
  width: 100%;
  padding: 17px 18px;
  border-radius: 18px;
  border: 1px solid rgba(238, 164, 191, 0.34);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  outline: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.field input::placeholder {
  color: rgba(124, 68, 100, 0.55);
}

.field input:focus {
  transform: translateY(-1px);
  border-color: rgba(234, 49, 107, 0.52);
  box-shadow: 0 0 0 6px rgba(255, 93, 136, 0.12);
}

.cta {
  margin-top: 4px;
  min-height: 58px;
  padding: 16px 18px;
  border: 0;
  border-radius: 20px;
  cursor: pointer;
  color: white;
  font-size: 0.98rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6d92 0%, #ea316b 48%, #ff9f66 100%);
  box-shadow: 0 18px 34px rgba(233, 68, 119, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  background-size: 160% 160%;
  animation: ctaSheen 5s linear infinite;
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(233, 68, 119, 0.34);
  filter: saturate(1.04);
}

.result {
  margin-top: 24px;
}

.result-shell {
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 242, 247, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 18px 36px rgba(168, 67, 110, 0.14);
  transform: translateY(14px) scale(0.985);
  opacity: 0;
}

.result.result-visible .result-shell {
  animation: resultReveal 0.55s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.result.special-match {
  position: relative;
  animation: pulseGlow 1.8s ease-in-out infinite;
}

.hidden {
  display: none;
}

.special-celebration {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.special-celebration span {
  display: inline-block;
  animation: floatSpark 1.6s ease-in-out infinite;
}

.special-celebration span:nth-child(2) {
  animation-delay: 0.15s;
}

.special-celebration span:nth-child(3) {
  animation-delay: 0.3s;
}

.special-celebration span:nth-child(4) {
  animation-delay: 0.45s;
}

.special-celebration span:nth-child(5) {
  animation-delay: 0.6s;
}

.result-topline {
  display: grid;
  gap: 10px;
}

.result-label {
  margin: 0;
  text-align: center;
}

.heart-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
}

.heart-meter {
  position: relative;
  width: 160px;
  height: 144px;
  background: rgba(255, 193, 210, 0.32);
  transform: rotate(-45deg);
  border-radius: 28px 28px 12px 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.62);
}

.heart-meter::before,
.heart-meter::after,
.heart-fill::before,
.heart-fill::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: inherit;
}

.heart-meter::before,
.heart-fill::before {
  top: -80px;
  left: 0;
}

.heart-meter::after,
.heart-fill::after {
  top: 0;
  left: 80px;
}

.heart-fill {
  position: absolute;
  inset: auto 0 0;
  height: 0%;
  background: linear-gradient(180deg, rgba(255, 202, 128, 0.96), rgba(255, 93, 136, 0.98));
  transition: height 900ms cubic-bezier(0.2, 1, 0.3, 1);
}

.score-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  font-family: "Fraunces", serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 16px rgba(130, 24, 67, 0.4);
}

.result-copy {
  margin-top: 16px;
  text-align: center;
}

.special-badge {
  margin: 0 0 10px;
}

.result-copy p {
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.stat-pill {
  padding: 14px 12px 16px;
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 240, 247, 0.94);
  transform: translateY(8px);
  opacity: 0;
}

.result.result-visible .stat-pill {
  animation: statRise 0.45s ease forwards;
}

.result.result-visible .stat-pill:nth-child(1) {
  animation-delay: 0.12s;
}

.result.result-visible .stat-pill:nth-child(2) {
  animation-delay: 0.2s;
}

.result.result-visible .stat-pill:nth-child(3) {
  animation-delay: 0.28s;
}

.stat-pill strong {
  display: block;
  margin-top: 8px;
  font-family: "Fraunces", serif;
  font-size: 1.42rem;
}

.compatibility-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.compatibility-tags span {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 229, 238, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.84);
  color: var(--rose-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.share-actions {
  margin-top: 16px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.share-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #ff6d92 0%, #ea316b 60%, #ff9f66 100%);
  box-shadow: 0 10px 20px rgba(233, 68, 119, 0.24);
}

.share-btn:hover,
.share-btn:focus-visible {
  transform: translateY(-1px);
}

.share-feedback {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-18px) scale(1.06);
  }
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes ctaSheen {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes floatSpark {
  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) scale(1.12) rotate(8deg);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 95, 143, 0));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(255, 95, 143, 0.34));
  }
}

@media (max-width: 960px) {
  .stage-card {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .calculator-panel {
    padding: 24px;
  }

  .orbit-cluster {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 24px auto 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 14px;
  }

  .stage-card {
    padding: 14px;
    gap: 14px;
    border-radius: 26px;
  }

  .hero-panel,
  .calculator-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .mini-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .spark-notes span {
    font-size: 0.72rem;
  }

  .panel-header {
    display: grid;
  }

  .hero-form .cta {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .panel-note {
    max-width: none;
    text-align: left;
  }

  .heart-meter {
    width: 132px;
    height: 118px;
  }

  .heart-meter::before,
  .heart-meter::after,
  .heart-fill::before,
  .heart-fill::after {
    width: 132px;
    height: 132px;
  }

  .heart-meter::before,
  .heart-fill::before {
    top: -66px;
  }

  .heart-meter::after,
  .heart-fill::after {
    left: 66px;
  }

  .score-text {
    font-size: 1.7rem;
  }

  .orbit-cluster {
    width: 200px;
    height: 200px;
  }
}
