:root {
  /* compliance terms: Inter** short explanatory lines Interactions should feel like discovering clues rather than clicking sales prompts. Avoid overused parallax-heavy full-bleed dashboard language */
  --cream: #F4E8D0;
  --brass: #D7B56D;
  --green: #243E3A;
  --graphite: #6D6F76;
  --vermilion: #B77A4A;
  --sage: #9BAF8A;
  --glow: #FFF7E6;
  --limelight: 'Limelight', Georgia, serif;
  --poiret: 'Poiret One', 'Trebuchet MS', sans-serif;
  --inter: 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--green);
  font-family: var(--inter);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 247, 230, 0.92), rgba(255, 247, 230, 0) 34rem),
    linear-gradient(118deg, rgba(109, 111, 118, 0.10) 0 1px, transparent 1px 130px),
    linear-gradient(242deg, rgba(183, 122, 74, 0.08) 0 1px, transparent 1px 150px),
    linear-gradient(180deg, var(--cream), #efe1c5 48%, rgba(155, 175, 138, 0.42));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(36, 62, 58, 0.11) 0 1px, transparent 1px),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(215, 181, 109, 0.08) 18px 19px, transparent 19px 38px);
  background-size: 34px 34px, auto;
  mix-blend-mode: multiply;
  opacity: .52;
}

.quest-stage {
  position: relative;
  min-height: 100vh;
}

.act {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 7rem 1.5rem;
  isolation: isolate;
}

.act::before,
.act::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(82vw, 880px);
  pointer-events: none;
  z-index: -1;
}

.act::before {
  top: 10vh;
  height: 78vh;
  border-left: 1px solid rgba(215, 181, 109, .58);
  border-right: 1px solid rgba(215, 181, 109, .58);
}

.act::after {
  top: 14vh;
  height: 70vh;
  background: linear-gradient(105deg, transparent 0 36%, rgba(255, 247, 230, .42) 36% 48%, transparent 48% 100%);
  clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
}

.elevator-cable {
  position: fixed;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100vh;
  background: linear-gradient(var(--brass), rgba(215, 181, 109, .24));
  box-shadow: 0 0 0 5px rgba(215, 181, 109, .05);
  z-index: 0;
}

.floor-tabs {
  position: fixed;
  top: 50%;
  left: 1.2rem;
  transform: translateY(-50%);
  z-index: 20;
  display: grid;
  gap: .7rem;
}

.floor-tab,
.stamp-button {
  font-family: var(--inter);
  letter-spacing: .18em;
  color: var(--green);
  background: rgba(255, 247, 230, .68);
  border: 1px solid rgba(215, 181, 109, .9);
  box-shadow: 0 10px 26px rgba(36, 62, 58, .10), inset 0 0 0 1px rgba(255, 247, 230, .88);
  cursor: pointer;
  transition: transform .28s ease, background .28s ease, color .28s ease, border-color .28s ease;
}

.floor-tab {
  width: 4.15rem;
  height: 2rem;
  font-size: .62rem;
}

.floor-tab.is-active,
.floor-tab:hover,
.stamp-button:hover {
  transform: translateY(-2px) scale(1.04);
  color: var(--glow);
  background: var(--vermilion);
  border-color: var(--vermilion);
}

.side-rail {
  position: fixed;
  top: 7vh;
  bottom: 7vh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  color: rgba(109, 111, 118, .76);
  font-size: .62rem;
  letter-spacing: .22em;
  writing-mode: vertical-rl;
  pointer-events: none;
}

.side-rail-left { left: 6.5rem; }
.side-rail-right { right: 3.2rem; }

.ritual-card {
  position: relative;
  width: min(92vw, 720px);
  min-height: 32rem;
  padding: clamp(2rem, 6vw, 4.8rem) clamp(1.2rem, 5vw, 4.2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 247, 230, .82), rgba(244, 232, 208, .78)),
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(36, 62, 58, .035) 19px 20px);
  border: 1px solid rgba(215, 181, 109, .95);
  box-shadow: 0 28px 80px rgba(36, 62, 58, .16), inset 0 0 0 7px rgba(255, 247, 230, .42);
  backdrop-filter: blur(8px);
}

.ritual-card::before,
.ritual-card::after {
  content: "";
  position: absolute;
  width: 4.2rem;
  height: 4.2rem;
  border-color: var(--brass);
  opacity: .88;
}

.ritual-card::before { top: .8rem; left: .8rem; border-top: 2px solid; border-left: 2px solid; }
.ritual-card::after { right: .8rem; bottom: .8rem; border-right: 2px solid; border-bottom: 2px solid; }

.scalloped-card {
  clip-path: polygon(4% 0, 96% 0, 100% 4%, 100% 96%, 96% 100%, 4% 100%, 0 96%, 0 4%);
}

.ticket-card {
  background: linear-gradient(180deg, rgba(255, 247, 230, .8), rgba(155, 175, 138, .22)), var(--cream);
}

.ticket-card::before {
  background-image: radial-gradient(circle, transparent 0 8px, var(--brass) 8.5px 9.5px, transparent 10px);
  background-size: 28px 28px;
  border: 0;
  left: -14px;
  top: 8%;
  width: 28px;
  height: 84%;
}

.ticket-card::after {
  border: 0;
  inset: auto -14px 8% auto;
  width: 28px;
  height: 84%;
  background-image: radial-gradient(circle, transparent 0 8px, var(--brass) 8.5px 9.5px, transparent 10px);
  background-size: 28px 28px;
}

.memo-stamp {
  margin: 0 0 1rem;
  color: var(--vermilion);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: var(--limelight);
  color: var(--green);
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(215, 181, 109, .42);
}

h1 { font-size: clamp(3.1rem, 9vw, 7.6rem); line-height: .95; }
h2 { max-width: 11ch; font-size: clamp(2rem, 6.6vw, 5.4rem); line-height: 1.02; }

.chapter,
.poem-line,
.compass-label {
  font-family: var(--poiret);
  color: var(--green);
}

.chapter {
  margin: 1rem 0 1.4rem;
  font-size: clamp(1.3rem, 3vw, 2rem);
  letter-spacing: .16em;
}

.body-copy,
.poem-line {
  max-width: 34rem;
  margin: 1.4rem auto 0;
  color: var(--graphite);
  font-size: .98rem;
  line-height: 1.8;
  letter-spacing: .04em;
}

.poem-line { font-size: clamp(1.15rem, 2.2vw, 1.75rem); line-height: 1.45; }

.medallion {
  position: relative;
  width: min(58vw, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: .6rem auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 230, .9), rgba(155, 175, 138, .20));
  box-shadow: inset 0 0 0 1px var(--brass), inset 0 0 0 13px rgba(215, 181, 109, .12), 0 20px 60px rgba(36, 62, 58, .14);
  animation: breathe 4s ease-in-out infinite;
}

.ray-burst {
  position: absolute;
  inset: -3.1rem;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(215, 181, 109, .78) 0 4deg, transparent 4deg 15deg);
  clip-path: circle(0 at 50% 50%);
  transition: clip-path 1.2s cubic-bezier(.2, 1.4, .35, 1), opacity 1s ease;
  opacity: 0;
}

.hero-act.is-visible .ray-burst,
body.noon-awake .ray-burst {
  clip-path: circle(48% at 50% 50%);
  opacity: .65;
}

.line-art {
  width: 100%;
  height: auto;
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-art path,
.line-art circle {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 1.8s cubic-bezier(.25, .8, .25, 1);
}

.act.is-visible .line-art path,
.act.is-visible .line-art circle,
.hero-act .line-art path,
.hero-act .line-art circle { stroke-dashoffset: 0; }

.noon-clock {
  margin-top: .8rem;
  font-family: var(--limelight);
  color: var(--brass);
  font-size: clamp(2rem, 6vw, 4.6rem);
  letter-spacing: .18em;
  text-shadow: 1px 1px 0 rgba(36, 62, 58, .22);
}

.stamp-button {
  margin-top: -5.2rem;
  position: relative;
  z-index: 4;
  padding: .9rem 1.3rem;
  font-size: .72rem;
}

.map-diagram,
.steam-oracle,
.table-setting {
  position: relative;
  width: min(88vw, 520px);
  margin-top: 2rem;
}

.map-diagram { padding: 1rem; background: rgba(155, 175, 138, .16); border: 1px solid rgba(215, 181, 109, .54); }
.route-art { stroke: var(--green); }
.route-path { stroke: var(--vermilion); stroke-width: 4; }

.compass-label {
  position: absolute;
  font-size: .86rem;
  letter-spacing: .16em;
  color: var(--vermilion);
  text-transform: uppercase;
}

.label-north { left: 50%; top: -1rem; transform: translateX(-50%); }
.label-east { right: -.8rem; top: 45%; transform: rotate(90deg); }
.label-west { left: -.9rem; bottom: 25%; transform: rotate(-90deg); }

.floating-receipt {
  position: absolute;
  right: max(4vw, calc(50vw - 30rem));
  bottom: 12vh;
  width: 11rem;
  padding: 1rem .9rem 1.2rem;
  text-align: center;
  color: var(--green);
  background: rgba(255, 247, 230, .82);
  border: 1px solid rgba(215, 181, 109, .85);
  box-shadow: 0 22px 44px rgba(36, 62, 58, .14);
  transform: rotate(7deg);
}

.floating-receipt::after {
  content: "";
  display: block;
  margin-top: .85rem;
  border-top: 2px dashed rgba(183, 122, 74, .55);
}

.floating-receipt span,
.floating-receipt em { display: block; font-size: .58rem; letter-spacing: .18em; color: var(--graphite); text-transform: uppercase; }
.floating-receipt strong { display: block; margin: .75rem 0; font-family: var(--limelight); color: var(--vermilion); letter-spacing: .11em; }

.steam-oracle { max-width: 340px; }
.steam-art { filter: drop-shadow(0 18px 20px rgba(36, 62, 58, .12)); }
.steam-line { animation: steamSway 3.6s ease-in-out infinite; }
.steam-line:nth-of-type(4) { animation-delay: .35s; }
.steam-line:nth-of-type(5) { animation-delay: .7s; }

.agenda-shadow {
  position: absolute;
  inset: 18% -28%;
  z-index: -1;
  background: linear-gradient(110deg, transparent 0 38%, rgba(109, 111, 118, .14) 38% 47%, transparent 47% 100%);
  transform: skewX(-13deg);
}

.memo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  justify-content: center;
  margin-top: 1.3rem;
}

.memo-tags span {
  padding: .42rem .62rem;
  border: 1px solid rgba(183, 122, 74, .56);
  color: var(--vermilion);
  background: rgba(255, 247, 230, .45);
  font-size: .62rem;
  letter-spacing: .15em;
}

.table-setting { max-width: 330px; }
.final-card { background: linear-gradient(180deg, rgba(255, 247, 230, .86), rgba(215, 181, 109, .18)), var(--cream); }
.reset-button { margin-top: 1.4rem; }

.petal-field i {
  position: fixed;
  z-index: 2;
  width: .75rem;
  height: .42rem;
  border: 1px solid rgba(155, 175, 138, .85);
  border-radius: 80% 20% 80% 20%;
  background: rgba(255, 247, 230, .56);
  animation: petalDrift 9s ease-in-out infinite;
}

.petal-field i:nth-child(1) { top: 18%; left: 26%; animation-delay: 0s; }
.petal-field i:nth-child(2) { top: 26%; right: 22%; animation-delay: 1.6s; }
.petal-field i:nth-child(3) { top: 56%; left: 14%; animation-delay: 3.2s; }
.petal-field i:nth-child(4) { top: 68%; right: 17%; animation-delay: 2.4s; }
.petal-field i:nth-child(5) { top: 82%; left: 42%; animation-delay: 4s; }
.petal-field i:nth-child(6) { top: 38%; right: 42%; animation-delay: 5.2s; }

.act .ritual-card {
  transform: translateY(34px) scale(.985);
  opacity: .2;
  transition: transform .9s cubic-bezier(.2, 1.18, .26, 1), opacity .9s ease;
}

.act.is-visible .ritual-card,
.hero-act .ritual-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}

@keyframes petalDrift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  45% { transform: translate3d(18px, -28px, 0) rotate(48deg); }
  70% { transform: translate3d(-12px, -10px, 0) rotate(22deg); }
}

@keyframes steamSway {
  0%, 100% { transform: translateX(0); opacity: .82; }
  50% { transform: translateX(7px); opacity: 1; }
}

@media (max-width: 760px) {
  .floor-tabs { top: auto; bottom: 1rem; left: 50%; transform: translateX(-50%); display: flex; }
  .side-rail { display: none; }
  .act { padding: 5rem 1rem 7rem; }
  .ritual-card { min-height: 30rem; }
  .stamp-button { margin-top: -4rem; }
  .floating-receipt { position: relative; right: auto; bottom: auto; margin-top: -4rem; justify-self: center; }
  .label-east, .label-west { display: none; }
}
