:root {
  --paper: #fffaf2;
  --paper-warm: #f7eddf;
  --ink: #2f2925;
  --muted: #776c64;
  --rose: #d98b95;
  --rose-deep: #9f5d67;
  --blue: #9ebfc8;
  --sage: #a9b69e;
  --cream: #fff4e3;
  --gold: #c59d52;
  --cake: #d98b95;
  --icing: #fff4e3;
  --candle: #9ebfc8;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
  font-family: "Manrope", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

img,
canvas,
svg {
  display: block;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(159, 93, 103, 0.35);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  padding: 8px 12px;
  border-radius: 8px;
  color: white;
  background: var(--rose-deep);
  transform: translateY(-160%);
  transition: transform 700ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.nav-shell {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 100;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 32px);
  align-items: center;
  gap: 32px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 41, 37, 0.1);
  border-radius: 9999px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: 0 12px 40px rgba(71, 55, 44, 0.08);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rose-deep);
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a,
footer button {
  transition: color 700ms var(--ease);
}

.nav-links a:hover,
footer button:hover {
  color: var(--rose-deep);
}

.sound-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper-warm);
  cursor: pointer;
  transition: transform 700ms var(--ease), background 700ms var(--ease);
}

.sound-toggle:hover {
  transform: scale(1.06) rotate(4deg);
  background: #ecdccc;
}

.sound-toggle:active {
  transform: scale(0.98);
}

.sound-toggle svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 48px;
  padding: 112px max(32px, calc((100vw - 1240px) / 2)) 64px;
  isolation: isolate;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--rose-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2 {
  text-wrap: balance;
}

h1 {
  max-width: 680px;
  margin: 0;
  color: #000;
  background-image: linear-gradient(90deg, #000 0%, #666 100%);
  background-clip: text;
  font-size: clamp(60px, 7vw, 96px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  max-width: 600px;
  margin: 24px 0 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 28px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--rose-deep);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 700ms var(--ease), box-shadow 700ms var(--ease), background 700ms var(--ease);
}

.primary-button {
  color: white;
  background: var(--rose-deep);
  box-shadow: 0 12px 32px rgba(159, 93, 103, 0.2);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

.primary-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.secondary-button {
  color: var(--rose-deep);
  background: transparent;
}

.proof-line {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.proof-line span {
  position: relative;
}

.proof-line span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -14px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rose);
  content: "";
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

#cake-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.scene-halo {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(32vw, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f0dfdd;
  box-shadow: 80px -120px 0 -130px var(--blue), -120px 100px 0 -125px var(--sage);
  transform: translate(-50%, -50%);
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(159, 93, 103, 0.18);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  right: -160px;
  top: 96px;
  width: 520px;
  height: 520px;
}

.orbit-two {
  right: -80px;
  top: 176px;
  width: 360px;
  height: 360px;
}

.floating-note {
  position: absolute;
  padding: 8px 12px;
  border: 1px solid rgba(47, 41, 37, 0.08);
  border-radius: 9999px;
  color: var(--muted);
  background: rgba(255, 250, 242, 0.82);
  box-shadow: 0 12px 32px rgba(71, 55, 44, 0.08);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.note-one {
  left: 4%;
  top: 27%;
  transform: rotate(-5deg);
}

.note-two {
  right: 3%;
  bottom: 24%;
  transform: rotate(6deg);
}

.cake-fallback {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 340px;
  height: 360px;
  transform: translate(-50%, -50%);
}

.three-ready .cake-fallback {
  display: none;
}

.fallback-tier,
.mini-tier,
.wish-tier {
  position: absolute;
  left: 50%;
  border-radius: 50% / 16%;
  background: var(--cake);
  box-shadow: inset 0 18px 0 var(--icing), 0 16px 24px rgba(99, 66, 59, 0.12);
  transform: translateX(-50%);
}

.tier-top {
  top: 100px;
  width: 210px;
  height: 110px;
}

.tier-bottom {
  top: 190px;
  width: 300px;
  height: 140px;
}

.fallback-plate,
.mini-plate,
.wish-plate {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 330px;
  height: 42px;
  border-radius: 50%;
  background: #e6d6c5;
  transform: translateX(-50%);
}

.fallback-candle {
  position: absolute;
  left: 50%;
  top: 52px;
  z-index: 3;
  display: flex;
  gap: 24px;
  transform: translateX(-50%);
}

.fallback-candle i {
  width: 8px;
  height: 62px;
  border-radius: 4px;
  background: var(--blue);
}

.section-pad {
  padding: 96px max(32px, calc((100vw - 1240px) / 2));
}

.section-heading {
  max-width: 680px;
  margin-bottom: 48px;
}

.section-heading h2,
.memory-intro h2,
.finale h2,
.dialog h2 {
  margin: 0;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.section-heading > p:last-child,
.memory-intro > p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 28px;
}

.atelier {
  background: #f7eddf;
}

.atelier-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
}

.cake-stage,
.cake-controls {
  min-height: 640px;
  border: 1px solid rgba(47, 41, 37, 0.08);
  border-radius: 24px;
  background: var(--paper);
}

.cake-stage {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.cake-stage::before,
.cake-stage::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.cake-stage::before {
  right: -40px;
  top: -80px;
  width: 240px;
  height: 240px;
  background: #e3ece7;
}

.cake-stage::after {
  left: -64px;
  bottom: -96px;
  width: 280px;
  height: 280px;
  background: #f0dfdd;
}

.stage-copy {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.mini-cake {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 2;
  width: 420px;
  height: 420px;
  transform: translate(-50%, -50%);
}

.mini-tier-third {
  display: none;
  top: 108px;
  width: 160px;
  height: 76px;
}

.tiers-3 .mini-tier-third {
  display: block;
}

.tiers-3 .mini-tier-top {
  top: 172px;
  width: 250px;
  height: 98px;
}

.tiers-3 .mini-tier-bottom {
  top: 254px;
  height: 118px;
}

.tiers-3 .mini-candles {
  top: 48px;
}

.tiers-3 .mini-flames {
  top: 28px;
}

.tiers-3 .mini-topper {
  top: 48px;
}

.tiers-1 .mini-tier-third,
.tiers-1 .mini-tier-top {
  display: none;
}

.tiers-1 .mini-tier-bottom {
  top: 174px;
  height: 184px;
}

.tiers-1 .mini-candles {
  top: 104px;
}

.tiers-1 .mini-flames {
  top: 84px;
}

.tiers-1 .mini-topper {
  top: 112px;
}

.mini-tier-top {
  top: 118px;
  width: 230px;
  height: 118px;
}

.mini-tier-bottom {
  top: 216px;
  width: 340px;
  height: 142px;
}

.mini-tier b {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 52px 14px 0;
  border-radius: 50%;
  background: var(--sage);
  transition: opacity 700ms var(--ease);
}

.mini-tier::after {
  position: absolute;
  left: 4%;
  top: 60%;
  width: 92%;
  height: 10px;
  border-radius: 9999px;
  background: var(--filling, #f3d9aa);
  content: "";
  opacity: 0.88;
}

.edge-ruffle .mini-tier b {
  width: 36px;
  height: 12px;
  margin-right: 0;
  margin-left: 0;
  border-radius: 50%;
  background: var(--icing);
  transform: rotate(-8deg);
}

.edge-drip .mini-tier b {
  width: 12px;
  height: 26px;
  margin-right: 10px;
  margin-left: 10px;
  border-radius: 0 0 10px 10px;
  background: #765143;
}

.mini-plate {
  bottom: 0;
  width: 390px;
}

.mini-candles,
.mini-flames {
  position: absolute;
  left: 50%;
  z-index: 5;
  display: flex;
  gap: 32px;
  transform: translateX(-50%);
}

.mini-candles {
  top: 58px;
  align-items: flex-end;
}

.mini-candles span {
  width: 10px;
  height: 72px;
  border-radius: 4px;
  background: var(--candle);
}

.mini-flames {
  top: 38px;
  gap: 34px;
}

.mini-flames span,
.wish-flame i {
  width: 8px;
  height: 18px;
  border-radius: 70% 30% 55% 45%;
  background: #e9b84b;
  box-shadow: 0 0 18px rgba(233, 184, 75, 0.6);
  animation: flame 1.4s var(--ease) infinite alternate;
}

.mini-topper {
  position: absolute;
  left: 50%;
  top: 72px;
  z-index: 6;
  color: var(--rose-deep);
  font-size: 48px;
  line-height: 1;
  transform: translateX(-50%);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.mini-topper.topper-star {
  color: var(--gold);
  transform: translateX(-50%) scale(0.9);
}

.mini-topper.topper-bow {
  color: var(--rose-deep);
  font-size: 60px;
  transform: translateX(-50%) rotate(-6deg);
}

.mini-toppings {
  position: absolute;
  left: 50%;
  top: 116px;
  z-index: 5;
  display: flex;
  width: 176px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  transform: translateX(-50%);
  pointer-events: none;
}

.tiers-3 .mini-toppings {
  top: 104px;
  width: 120px;
}

.tiers-1 .mini-toppings {
  top: 170px;
  width: 220px;
}

.mini-toppings span {
  display: block;
  color: var(--sage);
  font-size: 18px;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 2px 3px rgba(47, 41, 37, 0.08);
  transform: rotate(var(--topping-rotation));
}

.topping-berries .mini-toppings span {
  width: 14px;
  height: 14px;
  border: 3px solid #fff4e3;
  border-radius: 50%;
  background: var(--rose-deep);
}

.topping-flowers .mini-toppings span {
  color: var(--rose);
  font-size: 24px;
}

.cake-complete-note {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 8;
  display: flex;
  min-width: 280px;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid rgba(159, 93, 103, 0.16);
  border-radius: 16px;
  color: var(--rose-deep);
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 0 16px 40px rgba(71, 55, 44, 0.12);
  opacity: 0;
  transform: translate(-50%, 32px) scale(0.94);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  pointer-events: none;
}

.cake-complete-note span {
  font-size: 24px;
}

.cake-complete-note strong {
  font-size: 16px;
}

.cake-complete-note small {
  color: var(--muted);
  font-size: 12px;
}

.cake-stage.is-complete .cake-complete-note {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.cake-stage.is-complete .mini-cake {
  animation: cake-finish 1.2s var(--ease) both;
}

.cake-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}

.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wizard-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wizard-header span {
  color: var(--rose-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wizard-header strong {
  font-size: 20px;
  line-height: 28px;
}

.wizard-progress {
  width: 152px;
  height: 4px;
  overflow: hidden;
  border-radius: 9999px;
  background: var(--paper-warm);
}

.wizard-progress i {
  display: block;
  width: 14.285%;
  height: 100%;
  border-radius: inherit;
  background: var(--rose-deep);
  transition: width 700ms var(--ease);
}

.wizard-dots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wizard-dots button {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 700ms var(--ease), transform 700ms var(--ease);
}

.wizard-dots button:not(:disabled):hover {
  color: var(--rose-deep);
  transform: translateY(-2px);
}

.wizard-dots button:disabled {
  cursor: default;
  opacity: 0.4;
}

.wizard-dots span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(47, 41, 37, 0.12);
  border-radius: 50%;
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
  transition: color 700ms var(--ease), border-color 700ms var(--ease), background 700ms var(--ease);
}

.wizard-dots small {
  font-size: 12px;
}

.wizard-dots button[aria-current="step"] {
  color: var(--rose-deep);
}

.wizard-dots button[aria-current="step"] span,
.wizard-dots button.is-complete span {
  border-color: var(--rose-deep);
  color: white;
  background: var(--rose-deep);
}

.wizard-panels {
  flex: 1;
}

.wizard-panel {
  animation: panel-enter 700ms var(--ease) both;
}

.wizard-panel[hidden] {
  display: none;
}

.wizard-panel legend {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 28px;
}

.panel-hint {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.sub-legend {
  margin-top: 24px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.swatch {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid rgba(47, 41, 37, 0.1);
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: transform 700ms var(--ease), border-color 700ms var(--ease), background 700ms var(--ease);
}

.swatch::before {
  width: 28px;
  height: 28px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(47, 41, 37, 0.1);
  content: "";
}

.swatch > i {
  font-style: normal;
}

.swatch:has(.tier-symbol)::before,
.swatch:has(.edge-symbol)::before,
.swatch:has(.top-symbol)::before,
.swatch:has(.number-symbol)::before {
  display: none;
}

.tier-symbol {
  position: relative;
  display: block;
  width: 46px;
  height: 32px;
}

.tier-symbol::before,
.tier-symbol::after {
  position: absolute;
  left: 50%;
  border-radius: 50% / 28%;
  background: var(--rose);
  content: "";
  transform: translateX(-50%);
}

.tier-symbol::before {
  bottom: 0;
  width: 44px;
  height: 17px;
}

.tier-symbol::after {
  bottom: 14px;
  width: 30px;
  height: 14px;
}

.tier-symbol.one::after {
  display: none;
}

.tier-symbol.three {
  border-top: 10px solid var(--rose);
  border-radius: 50%;
}

.edge-symbol {
  display: block;
  width: 52px;
  height: 28px;
}

.edge-symbol.pearls {
  position: relative;
}

.edge-symbol.pearls::before {
  position: absolute;
  left: 2px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 14px 0 var(--sage), 28px 0 var(--sage), 42px 0 var(--sage);
  content: "";
}

.edge-symbol.ruffle {
  border: 7px dotted var(--icing);
  border-radius: 9999px;
  background: var(--rose);
}

.edge-symbol.drip {
  border-radius: 10px 10px 18px 18px;
  background: #765143;
  clip-path: polygon(0 0, 100% 0, 100% 46%, 85% 46%, 85% 92%, 68% 92%, 68% 54%, 48% 54%, 48% 76%, 28% 76%, 28% 48%, 0 48%);
}

.top-symbol,
.number-symbol {
  color: var(--rose-deep);
  font-size: 30px;
  font-weight: 600;
  line-height: 32px;
}

.number-symbol {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rose-deep);
  font-size: 14px;
}

.cake-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.cake-summary span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(47, 41, 37, 0.1);
  border-radius: 12px;
  background: var(--paper-warm);
}

.cake-summary small {
  color: var(--muted);
  font-size: 12px;
}

.cake-summary strong {
  font-size: 14px;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.wizard-back {
  margin-right: auto;
  padding: 8px 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: color 700ms var(--ease), transform 700ms var(--ease);
}

.wizard-back:hover {
  color: var(--rose-deep);
  transform: translateX(-2px);
}

.wizard-next,
.wizard-complete {
  min-width: 152px;
}

.swatch:hover {
  transform: translateY(-2px);
}

.swatch.is-selected {
  border-color: var(--rose-deep);
  color: var(--ink);
  background: #fff4e3;
}

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

.toggle-row label {
  position: relative;
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
}

.toggle-row span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(47, 41, 37, 0.1);
  border-radius: 9999px;
  color: var(--muted);
  font-size: 14px;
  transition: all 700ms var(--ease);
}

.toggle-row input:checked + span {
  border-color: var(--rose-deep);
  color: var(--rose-deep);
  background: #f0dfdd;
}

.toggle-row input:focus-visible + span {
  outline: 3px solid rgba(159, 93, 103, 0.35);
  outline-offset: 4px;
}

.tagline-section {
  display: grid;
  min-height: 80svh;
  place-items: center;
}

.tagline {
  max-width: 680px;
  margin: 0;
  font-size: 60px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  text-align: center;
}

.tagline .word {
  color: rgba(47, 41, 37, 0.28);
  transition: color 900ms var(--ease);
}

.tagline .word.is-active {
  color: var(--ink);
}

.memories {
  background: #e8eef0;
}

.memory-intro {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  align-items: end;
  gap: 80px;
}

.memory-intro h2 {
  max-width: 680px;
}

.poster-gallery {
  display: grid;
  max-width: 1080px;
  grid-template-columns: 1fr;
  gap: 80px;
  margin-top: 64px;
}

.poster-card {
  position: relative;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: #f3ebdc;
  box-shadow: 0 24px 64px rgba(53, 61, 63, 0.14);
  isolation: isolate;
}

.poster-image,
.poster-sketch-canvas,
.sketch-strokes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.poster-sketch-canvas {
  z-index: 1;
  opacity: 0;
  filter: grayscale(1) sepia(0.32) contrast(1.1) brightness(1.08);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.poster-image {
  z-index: 2;
  display: block;
  object-fit: cover;
  opacity: 0;
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}

.sketch-strokes {
  z-index: 3;
  opacity: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.sketch-strokes path {
  fill: none;
  stroke: rgba(64, 56, 48, 0.48);
  stroke-dasharray: 1480;
  stroke-dashoffset: 1480;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.sketch-strokes path:nth-child(2) {
  stroke: rgba(130, 89, 67, 0.42);
  stroke-width: 2;
}

.sketch-strokes path:nth-child(3) {
  stroke: rgba(64, 56, 48, 0.36);
  stroke-width: 2;
}

.sketch-strokes path:nth-child(4) {
  stroke: rgba(130, 89, 67, 0.32);
  stroke-width: 2;
}

.pencil-tip {
  position: absolute;
  z-index: 4;
  left: 3%;
  top: 8%;
  display: block;
  width: 54px;
  height: 12px;
  opacity: 0;
  border-radius: 3px;
  background: #c69a65;
  box-shadow: 0 8px 16px rgba(46, 38, 30, 0.18);
  transform: rotate(18deg);
  transform-origin: 100% 50%;
  pointer-events: none;
}

.pencil-tip::before {
  position: absolute;
  right: -15px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 16px solid #ead6b7;
  content: "";
}

.pencil-tip::after {
  position: absolute;
  right: -17px;
  top: 4px;
  width: 0;
  height: 0;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-left: 5px solid #3f3932;
  content: "";
}

.pencil-tip i {
  position: absolute;
  left: 0;
  top: 0;
  width: 10px;
  height: 12px;
  border-radius: 3px 0 0 3px;
  background: #b66b74;
}

.poster-frame.is-drawing .poster-sketch-canvas {
  animation: sketch-image-reveal 1800ms var(--ease) 120ms forwards;
}

.poster-frame.is-drawing .poster-image {
  animation: poster-ink-reveal 1500ms var(--ease) 1550ms forwards;
}

.poster-frame.is-drawing .sketch-strokes {
  animation: sketch-lines-fade 2450ms var(--ease) 80ms forwards;
}

.poster-frame.is-drawing .sketch-strokes path {
  animation: pencil-line 780ms var(--ease) forwards;
}

.poster-frame.is-drawing .sketch-strokes path:nth-child(2) {
  animation-delay: 340ms;
}

.poster-frame.is-drawing .sketch-strokes path:nth-child(3) {
  animation-delay: 720ms;
}

.poster-frame.is-drawing .sketch-strokes path:nth-child(4) {
  animation-delay: 1080ms;
}

.poster-frame.is-drawing .pencil-tip {
  animation: pencil-travel 2050ms var(--ease) 60ms forwards;
}

.poster-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
}

.poster-meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poster-meta strong {
  font-size: 16px;
}

.poster-meta span {
  color: var(--muted);
  font-size: 12px;
}

.download-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(47, 41, 37, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform 700ms var(--ease), background 700ms var(--ease);
}

.download-button:hover {
  transform: translateY(-2px);
  background: var(--paper);
}

.download-button:active {
  transform: scale(0.98);
}

.download-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.finale {
  background: #f0dfdd;
}

.finale-card {
  position: relative;
  display: grid;
  min-height: 580px;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 48px;
  overflow: hidden;
  padding: 64px;
  border-radius: 24px;
  background: var(--paper);
}

.finale-copy {
  position: relative;
  z-index: 2;
}

.finale-copy > p:not(.eyebrow):not(.final-message) {
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: 18px;
  line-height: 28px;
}

.final-message {
  min-height: 28px;
  margin: 24px 0 0;
  color: var(--rose-deep);
  font-size: 18px;
  font-weight: 600;
}

.wish-cake {
  position: relative;
  min-height: 460px;
}

.wish-tier {
  left: 50%;
}

.wish-top {
  top: 130px;
  width: 240px;
  height: 120px;
}

.wish-bottom {
  top: 230px;
  width: 360px;
  height: 150px;
}

.wish-plate {
  bottom: 40px;
  width: 410px;
}

.wish-candles,
.wish-flame {
  position: absolute;
  left: 50%;
  z-index: 4;
  display: flex;
  gap: 40px;
  transform: translateX(-50%);
}

.wish-candles {
  top: 62px;
}

.wish-candles i {
  width: 10px;
  height: 84px;
  border-radius: 4px;
  background: var(--blue);
}

.wish-flame {
  top: 38px;
  gap: 42px;
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}

.wish-cake.is-blown .wish-flame {
  opacity: 0;
  transform: translateX(-50%) translateY(-18px) scale(0.4);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px max(32px, calc((100vw - 1240px) / 2));
  background: var(--paper);
}

footer p,
footer button {
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  gap: 16px;
}

footer button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

dialog {
  max-width: 520px;
  padding: 40px;
  border: 1px solid rgba(47, 41, 37, 0.1);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 32px 96px rgba(47, 41, 37, 0.18);
}

dialog::backdrop {
  background: rgba(47, 41, 37, 0.56);
  backdrop-filter: blur(8px);
}

dialog h2 {
  font-size: 30px;
  line-height: 36px;
}

dialog p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 24px;
}

.dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--paper-warm);
  cursor: pointer;
  font-size: 24px;
}

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

.confetti {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 18px;
  border-radius: 2px;
  animation: confetti-fall var(--fall-time) var(--ease) forwards;
}

.reveal {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(64px);
  transition: opacity 900ms var(--ease), filter 900ms var(--ease), transform 900ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

@keyframes flame {
  from { transform: rotate(-4deg) scaleY(0.92); }
  to { transform: rotate(5deg) scaleY(1.08); }
}

@keyframes sketch-image-reveal {
  0% {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  12% {
    opacity: 0.86;
  }
  36% {
    clip-path: polygon(0 0, 38% 0, 34% 18%, 40% 42%, 35% 68%, 42% 100%, 0 100%);
  }
  72% {
    opacity: 0.92;
    clip-path: polygon(0 0, 78% 0, 74% 18%, 82% 42%, 76% 69%, 84% 100%, 0 100%);
  }
  100% {
    opacity: 0.92;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes poster-ink-reveal {
  0% {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  16% {
    opacity: 1;
  }
  42% {
    clip-path: polygon(0 0, 44% 0, 39% 20%, 47% 47%, 41% 72%, 49% 100%, 0 100%);
  }
  74% {
    clip-path: polygon(0 0, 80% 0, 76% 20%, 84% 48%, 78% 74%, 86% 100%, 0 100%);
  }
  100% {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes pencil-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sketch-lines-fade {
  0%, 8% {
    opacity: 0;
  }
  18%, 76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes pencil-travel {
  0% {
    left: 2%;
    top: 10%;
    opacity: 0;
    transform: rotate(15deg);
  }
  7% {
    opacity: 1;
  }
  23% {
    left: 82%;
    top: 20%;
    transform: rotate(9deg);
  }
  45% {
    left: 8%;
    top: 42%;
    transform: rotate(188deg);
  }
  67% {
    left: 84%;
    top: 63%;
    transform: rotate(7deg);
  }
  88% {
    left: 10%;
    top: 83%;
    opacity: 1;
    transform: rotate(189deg);
  }
  100% {
    left: 88%;
    top: 91%;
    opacity: 0;
    transform: rotate(8deg);
  }
}

@keyframes skeleton {
  from { opacity: 0.46; }
  to { opacity: 0.9; }
}

@keyframes confetti-fall {
  0% { transform: translate3d(0, -24px, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift), 110vh, 0) rotate(760deg); }
}

@keyframes panel-enter {
  from { opacity: 0; filter: blur(6px); transform: translateX(24px); }
  to { opacity: 1; filter: blur(0); transform: translateX(0); }
}

@keyframes cake-finish {
  0% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -54%) scale(1.04) rotate(-1deg); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 144px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .atelier-grid,
  .memory-intro,
  .finale-card {
    grid-template-columns: 1fr;
  }

  .memory-intro {
    gap: 24px;
  }

}

@media (max-width: 680px) {
  .nav-shell {
    gap: 12px;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .section-pad {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero {
    gap: 24px;
  }

  .orbit-one {
    right: -80px;
    width: 320px;
    height: 320px;
  }

  .orbit-two {
    right: -32px;
    width: 240px;
    height: 240px;
  }

  h1 {
    font-size: 48px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .cake-fallback {
    transform: translate(-50%, -50%) scale(0.78);
  }

  .section-heading h2,
  .memory-intro h2,
  .finale h2 {
    font-size: 36px;
    line-height: 40px;
  }

  .tagline {
    font-size: 36px;
    line-height: 40px;
  }

  .atelier-grid {
    gap: 16px;
  }

  .cake-stage,
  .cake-controls {
    min-height: 560px;
  }

  .cake-controls {
    min-height: auto;
    padding: 24px;
  }

  .mini-cake {
    transform: translate(-50%, -50%) scale(0.82);
  }

  .choice-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .swatch {
    min-height: 72px;
  }

  .wizard-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .wizard-progress {
    width: 100%;
  }

  .wizard-dots small {
    display: none;
  }

  .wizard-dots span {
    width: 24px;
    height: 24px;
  }

  .cake-summary {
    grid-template-columns: 1fr;
  }

  .poster-gallery {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .finale-card {
    padding: 32px 24px;
  }

  .wish-cake {
    min-height: 400px;
    transform: scale(0.8);
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
