:root {
  --bg0: #0d0a12;
  --bg1: #1b1021;
  --bg2: #351227;
  --panel: #17121e;
  --panel-2: #211929;
  --ink: #fce7ef;
  --muted: #cbb8c8;
  --accent: #f43f5e;
  --accent-2: #fb7185;
  --line: #4a2f45;
  --ok: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 15% -5%, #50203d 0%, transparent 38%),
    radial-gradient(circle at 90% 100%, #372247 0%, transparent 28%),
    linear-gradient(140deg, var(--bg0), var(--bg1), var(--bg2));
}

.petal-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.petal {
  position: absolute;
  top: -12vh;
  font-size: 0.95rem;
  opacity: 0.7;
  animation: drift linear forwards;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 20px;
  backdrop-filter: blur(10px);
  background: rgba(16, 11, 20, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand,
.step-label {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
}

.progress-wrap {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #2f2336;
  border: 1px solid #5b3750;
}

.progress {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 280ms ease;
}

.app {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 22px 14px 34px;
}

.scene {
  display: none;
  border-radius: 24px;
  padding: clamp(18px, 3.5vw, 34px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 40%);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: fadeUp 380ms ease;
}

.scene.active {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  line-height: 1.12;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3.3vw, 2.6rem);
  margin-bottom: 8px;
}

h3 {
  margin-bottom: 6px;
}

h1 span {
  color: var(--accent-2);
}

.kicker {
  margin-bottom: 8px;
  color: #f6bdcb;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.lead,
.sub,
.builder-note {
  color: var(--muted);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  align-items: center;
}

.rose-orb {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle, #3a162f, #1b1024 72%);
  border: 1px solid #734164;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.ring-a {
  width: 80%;
  height: 80%;
  animation: spin 10s linear infinite;
}

.ring-b {
  width: 58%;
  height: 58%;
  animation: spin 6s linear infinite reverse;
}

.core {
  font-size: 5rem;
  filter: drop-shadow(0 0 16px rgba(244, 63, 94, 0.45));
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 0.95rem;
}

.btn.prime {
  background: linear-gradient(90deg, var(--accent), #e11d48);
  color: white;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid #6b3e57;
}

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

.stats article {
  padding: 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.stats strong {
  display: block;
  font-size: 1.8rem;
  color: #ffd5df;
}

.stats span {
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 14px;
}

.timeline li {
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.tag {
  margin-bottom: 6px;
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #46293a;
  font-size: 0.75rem;
  color: #f5cdd7;
}

.nav-row {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.vault-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
}

.memory-tile {
  min-height: 88px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #28192f, #1e1529);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease;
}

.memory-tile:hover,
.memory-tile.active {
  transform: translateY(-2px);
  border-color: var(--accent-2);
}

.memory-panel {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
  min-height: 208px;
}

.panel-kicker {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #f5c7d4;
}

.builder-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.chip {
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid #6a4257;
  background: #251926;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.chip.active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.2);
}

.bouquet-stage {
  height: 320px;
  border-radius: 18px;
  position: relative;
  border: 1px solid #70435a;
  background: linear-gradient(180deg, #1f1424, #130f18);
  overflow: hidden;
}

.vase {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 140px;
  height: 130px;
  transform: translateX(-50%);
  clip-path: polygon(20% 0, 80% 0, 92% 100%, 8% 100%);
  background: linear-gradient(180deg, #fca5a5, #be123c);
  opacity: 0.72;
}

.stems {
  position: absolute;
  inset: 0;
}

.stem {
  position: absolute;
  bottom: 78px;
  width: 2px;
  background: #52b76d;
  transform-origin: bottom;
}

.bloom {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.12);
}

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

.q-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
}

.options {
  display: grid;
  gap: 7px;
}

.option {
  text-align: left;
  border-radius: 10px;
  border: 1px solid #6a4055;
  background: #26182a;
  color: var(--ink);
  padding: 8px 10px;
  cursor: pointer;
}

.option.locked {
  opacity: 0.65;
  pointer-events: none;
}

.option.good {
  border-color: var(--ok);
  background: #183120;
}

.option.bad {
  border-color: #f97316;
  background: #3a241a;
}

.meter-wrap {
  margin-top: 12px;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #2f2633;
  border: 1px solid #65435a;
}

.meter {
  height: 100%;
  width: 0;
  transition: width 220ms ease;
  background: linear-gradient(90deg, #fb7185, #22c55e);
}

.letter-box {
  min-height: 230px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #f4dde6;
}

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

@keyframes drift {
  to {
    transform: translateY(125vh) rotate(340deg);
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .vault-layout,
  .builder-layout {
    grid-template-columns: 1fr;
  }

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

  .tile-grid {
    grid-template-columns: 1fr;
  }

  .bouquet-stage {
    height: 280px;
  }
}
