:root {
  --daisy-cream: #FFF4D7;
  --aged-brass: #C99A2E;
  --marigold-glow: #F6B23A;
  --peach-lacquer: #E86F51;
  --deep-olive: #2E4B2F;
  --umber-night: #2A1A12;
  --petal-white: #FFFDF4;
  --soft-leaf: #8EA85B;
  --paper: var(--daisy-cream);
  --brass-shine: linear-gradient(135deg, #C99A2E, #F6B23A 45%, #FFF4D7 52%, #C99A2E 70%);
  --petal-rotation: 45deg;
  --stem-offset: 49%;
  --stagger-time: .16s;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--deep-olive);
  background: var(--umber-night);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-x: hidden;
}

.quest-scroll {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 8%, rgba(246, 178, 58, .22), transparent 28rem),
    radial-gradient(circle at 86% 52%, rgba(232, 111, 81, .16), transparent 24rem),
    linear-gradient(180deg, var(--petal-white), var(--daisy-cream) 38%, #f7dfb0 72%, var(--umber-night));
}

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image:
    repeating-radial-gradient(circle at 11% 17%, rgba(42, 26, 18, .14) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(95deg, rgba(255,255,255,.18) 0 1px, transparent 1px 9px);
  mix-blend-mode: multiply;
  z-index: 1;
}

.daisy-elevator {
  position: absolute;
  top: 0;
  left: var(--stem-offset);
  width: 8px;
  height: 100%;
  transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, rgba(46,75,47,.18) 0 18px, transparent 18px 30px);
  border-left: 1px solid rgba(201,154,46,.35);
  border-right: 1px solid rgba(201,154,46,.35);
  z-index: 2;
}

.stem-fill {
  display: block;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--aged-brass), var(--soft-leaf), var(--deep-olive));
  box-shadow: 0 0 20px rgba(246,178,58,.45);
}

.alcove {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 8vh clamp(18px, 5vw, 72px);
  isolation: isolate;
  z-index: 3;
}

.gate-frame, .panel, .greenhouse-arch, .night-seal {
  position: relative;
  width: min(760px, 92vw);
  border: 2px solid var(--aged-brass);
  background: rgba(255,253,244,.76);
  box-shadow: 0 22px 80px rgba(42,26,18,.18), inset 0 0 0 8px rgba(255,244,215,.75);
}

.gate-frame {
  min-height: 76vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.1rem;
  padding: clamp(28px, 6vw, 72px);
  border-radius: 42% 42% 18px 18px / 10% 10% 18px 18px;
}

.deco-corner { position: absolute; width: 46px; height: 46px; border-color: var(--aged-brass); }
.tl { top: 18px; left: 18px; border-top: 8px double; border-left: 8px double; }
.tr { top: 18px; right: 18px; border-top: 8px double; border-right: 8px double; }
.bl { bottom: 18px; left: 18px; border-bottom: 8px double; border-left: 8px double; }
.br { bottom: 18px; right: 18px; border-bottom: 8px double; border-right: 8px double; }

.sunburst {
  position: absolute;
  width: min(74vw, 720px);
  aspect-ratio: 1;
  top: 4vh;
  left: 50%;
  transform: translateX(-50%) rotate(var(--sun-rot, 0deg));
  background: conic-gradient(from 0deg, rgba(201,154,46,.6) 0 7deg, transparent 7deg 14deg, rgba(246,178,58,.5) 14deg 20deg, transparent 20deg 28deg);
  clip-path: polygon(50% 0, 57% 36%, 90% 12%, 66% 45%, 100% 50%, 66% 55%, 90% 88%, 57% 64%, 50% 100%, 43% 64%, 10% 88%, 34% 55%, 0 50%, 34% 45%, 10% 12%, 43% 36%);
  opacity: .55;
  z-index: -1;
  animation: brassBreathe 7s ease-in-out infinite alternate;
}

h1, h2 { font-family: "Limelight", Georgia, serif; font-weight: 400; color: var(--umber-night); text-align: center; }
h1 { margin: 0; font-size: clamp(3rem, 11vw, 8rem); letter-spacing: .08em; text-shadow: 3px 3px 0 rgba(246,178,58,.34); }
h2 { margin: .2rem 0 .9rem; font-size: clamp(2.1rem, 6vw, 4.6rem); line-height: .98; letter-spacing: .05em; }
p { line-height: 1.7; }

.kicker, .stamp, .field-label, .plate-number, .annotation {
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.stamp, .field-label, .plate-number {
  display: inline-block;
  padding: .45rem .7rem;
  border: 1px solid currentColor;
  background: rgba(255,244,215,.82);
  color: var(--aged-brass);
  box-shadow: 4px 4px 0 rgba(201,154,46,.16);
  transform: rotate(-2deg);
}
.stamp.peach { color: var(--peach-lacquer); }
.stamp.olive { color: var(--deep-olive); }

.hero-lore, .poem, .final-oath {
  max-width: 620px;
  margin: 0 auto;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  color: var(--deep-olive);
  text-align: center;
}

.field-labels { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.2rem; }
.note-pop { opacity: 0; transform: translateY(16px) rotate(-3deg); animation: stampIn .65s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--delay, 0s); }

.daisy-illustration { position: relative; width: 155px; height: 245px; margin: 1rem auto 0; }
.petal { position: absolute; left: 58px; top: 24px; width: 38px; height: 78px; background: var(--petal-white); border: 2px solid var(--deep-olive); border-radius: 90% 90% 60% 60%; transform-origin: 19px 54px; box-shadow: inset 0 8px 0 rgba(246,178,58,.18); animation: petalFlip .8s ease both; }
.p1 { transform: rotate(0deg) translateY(-20px); animation-delay: .2s; } .p2 { transform: rotate(45deg) translateY(-20px); animation-delay: .28s; }
.p3 { transform: rotate(90deg) translateY(-20px); animation-delay: .36s; } .p4 { transform: rotate(135deg) translateY(-20px); animation-delay: .44s; }
.p5 { transform: rotate(180deg) translateY(-20px); animation-delay: .52s; } .p6 { transform: rotate(225deg) translateY(-20px); animation-delay: .6s; }
.p7 { transform: rotate(270deg) translateY(-20px); animation-delay: .68s; } .p8 { transform: rotate(315deg) translateY(-20px); animation-delay: .76s; }
.flower-center { position: absolute; left: 49px; top: 63px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: var(--brass-shine); border: 3px solid var(--umber-night); color: var(--umber-night); z-index: 4; }
.hero-daisy .stem, .long-stem { position: absolute; left: 74px; top: 116px; width: 8px; height: 128px; background: var(--deep-olive); border-radius: 99px; }
.leaf, .pennant-leaf { position: absolute; width: 54px; height: 29px; background: var(--soft-leaf); border: 2px solid var(--deep-olive); border-radius: 100% 0 100% 0; }
.leaf.left { left: 22px; top: 166px; transform: rotate(-28deg); } .leaf.right { right: 21px; top: 192px; transform: rotate(35deg) scaleX(-1); }

.panel { padding: clamp(24px, 5vw, 58px); }
.left-panel { margin-right: min(24vw, 260px); }
.right-panel { margin-left: min(24vw, 260px); }
.plate-number { position: absolute; top: 14vh; left: 12vw; color: var(--deep-olive); }
.annotation { position: absolute; max-width: 210px; padding: 1rem; background: var(--petal-white); border: 1px dashed var(--deep-olive); font-family: "Zen Maru Gothic", sans-serif; color: var(--deep-olive); }
.right-note { right: 8vw; bottom: 18vh; transform: rotate(4deg); }
.left-note { left: 8vw; bottom: 16vh; transform: rotate(-4deg); }

.route-diagram { position: relative; height: 140px; margin: 2rem auto 0; max-width: 420px; border-bottom: 2px solid var(--aged-brass); }
.route-diagram span { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--aged-brass); background: var(--petal-white); }
.route-diagram span:nth-child(1) { left: 4%; bottom: 8px; } .route-diagram span:nth-child(2) { left: 32%; bottom: 56px; }
.route-diagram span:nth-child(3) { left: 60%; bottom: 28px; } .route-diagram span:nth-child(4) { right: 4%; bottom: 86px; background: var(--marigold-glow); }

.chapter-medallion { position: absolute; top: 12vh; left: 50%; transform: translateX(-50%); width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; background: var(--brass-shine); border: 3px double var(--umber-night); font-family: "Limelight"; font-size: 2rem; color: var(--umber-night); }
.botanical-figure { position: absolute; left: 12vw; width: 190px; height: 330px; }
.bud { position: absolute; left: 72px; top: 20px; width: 64px; height: 92px; border-radius: 70% 70% 45% 45%; background: linear-gradient(160deg, var(--soft-leaf), var(--daisy-cream)); border: 3px solid var(--deep-olive); }
.long-stem { top: 104px; height: 220px; }
.pennant-leaf { left: 82px; top: 188px; transform: rotate(28deg); }
.checkpoint { position: absolute; right: 21vw; top: 25vh; color: var(--peach-lacquer); font-size: 2.6rem; filter: drop-shadow(0 0 0 var(--umber-night)); }

.petal-counter { display: grid; place-items: center; gap: .75rem; position: absolute; right: 13vw; top: 18vh; }
.petal-token, .wax-token { cursor: pointer; border: 2px solid var(--umber-night); color: var(--umber-night); background: var(--brass-shine); font-family: "Space Mono"; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; box-shadow: 6px 6px 0 rgba(42,26,18,.2); transition: transform .2s ease, box-shadow .2s ease; }
.petal-token { width: 92px; height: 92px; border-radius: 50%; }
.petal-token:hover, .wax-token:hover { transform: translate(-2px, -2px) rotate(-2deg); box-shadow: 9px 9px 0 rgba(42,26,18,.22); }
.petal-counter output { font-family: "Limelight"; font-size: 3rem; color: var(--peach-lacquer); }
.floating-petals span { position: absolute; width: 26px; height: 58px; border: 2px solid var(--deep-olive); background: var(--petal-white); border-radius: 90%; animation: floatPetal 5s ease-in-out infinite; }
.floating-petals span:nth-child(1) { left: 16vw; top: 22vh; } .floating-petals span:nth-child(2) { right: 20vw; bottom: 18vh; animation-delay: .5s; }
.floating-petals span:nth-child(3) { left: 31vw; bottom: 14vh; animation-delay: 1s; } .floating-petals span:nth-child(4) { right: 10vw; top: 41vh; animation-delay: 1.4s; }
.floating-petals span:nth-child(5) { left: 9vw; top: 58vh; animation-delay: 2s; }

.root-maze { position: absolute; left: 12vw; width: 280px; height: 280px; border: 2px solid var(--aged-brass); background: rgba(255,253,244,.48); }
.maze-line { position: absolute; background: var(--deep-olive); border-radius: 8px; }
.maze-line.a { left: 38px; top: 48px; width: 190px; height: 7px; } .maze-line.b { left: 222px; top: 48px; width: 7px; height: 116px; }
.maze-line.c { left: 80px; top: 158px; width: 149px; height: 7px; } .maze-line.d { left: 80px; top: 158px; width: 7px; height: 82px; }
.seed-dot { position: absolute; left: 64px; bottom: 22px; width: 36px; height: 36px; border-radius: 50%; background: var(--peach-lacquer); border: 3px solid var(--umber-night); }

.greenhouse { background: linear-gradient(180deg, transparent, rgba(246,178,58,.18)); }
.greenhouse-arch { min-height: 70vh; display: grid; place-items: center; align-content: center; text-align: center; padding: clamp(28px, 6vw, 70px); border-radius: 48% 48% 14px 14px / 18% 18% 14px 14px; background: linear-gradient(180deg, rgba(255,253,244,.8), rgba(246,178,58,.28)); overflow: hidden; }
.arch-step { position: absolute; inset: auto; border: 2px solid rgba(201,154,46,.55); border-bottom: 0; border-radius: 50% 50% 0 0; }
.s1 { width: 92%; height: 86%; top: 7%; } .s2 { width: 72%; height: 66%; top: 17%; } .s3 { width: 52%; height: 46%; top: 27%; }
.dew-row { display: flex; gap: 1rem; margin-top: 2rem; }
.dew-row span { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; background: var(--petal-white); border: 1px solid var(--aged-brass); transform: rotate(-45deg); animation: dewGlint 2.4s ease-in-out infinite; }
.dew-row span:nth-child(even) { animation-delay: .5s; }

.finale { background: radial-gradient(circle at 50% 52%, rgba(232,111,81,.22), transparent 28rem), var(--umber-night); color: var(--petal-white); }
.night-seal { display: grid; place-items: center; gap: 1.1rem; min-height: 72vh; padding: clamp(28px, 6vw, 70px); background: linear-gradient(180deg, rgba(42,26,18,.92), rgba(46,75,47,.82)); border-color: var(--marigold-glow); }
.night-seal h2, .night-seal .final-oath { color: var(--petal-white); }
.tiny-daisy { width: 122px; height: 122px; margin: 0; transform: scale(.72); }
.wax-token { padding: 1rem 1.2rem; border-radius: 999px; background: var(--peach-lacquer); color: var(--petal-white); }
.wax-token.sealed { background: var(--deep-olive); }

.reveal { opacity: 0; transform: translateY(46px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.in-view .panel, .reveal.in-view .greenhouse-arch, .reveal.in-view .night-seal { animation: bracketSlide .75s ease both; }

@keyframes stampIn { to { opacity: 1; transform: translateY(0) rotate(-2deg); } }
@keyframes brassBreathe { to { opacity: .72; transform: translateX(-50%) rotate(4deg) scale(1.03); } }
@keyframes petalFlip { from { opacity: 0; scale: .8; } to { opacity: 1; } }
@keyframes floatPetal { 50% { transform: translateY(-24px) rotate(18deg); } }
@keyframes dewGlint { 50% { background: var(--marigold-glow); box-shadow: 0 0 18px var(--marigold-glow); } }
@keyframes bracketSlide { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0); } }

@media (max-width: 760px) {
  :root { --stem-offset: 50%; }
  .left-panel, .right-panel { margin: 0; }
  .annotation, .botanical-figure, .root-maze, .petal-counter { position: relative; inset: auto; margin: 1.3rem auto; }
  .alcove { align-content: center; gap: 1rem; }
  h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
}
