:root {
  /* Interface labels and tiny HUD marks: **Space Grotesk** from Google Fonts in Medium and Bold for token labels */
  --ivory: #F7F0E6;
  --violet: #7A3CFF;
  --lemon: #FFF04A;
  --pink: #FF4FD8;
  --plum: #22102F;
  --aqua: #00E5FF;
  --chrome: #B9D7EA;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
  --hud: "Space Grotesk", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--plum);
}

body {
  margin: 0;
  color: var(--ivory);
  font-family: var(--body);
  background:
    radial-gradient(circle at 88% 8%, rgba(0, 229, 255, .25), transparent 27rem),
    radial-gradient(circle at 10% 72%, rgba(255, 79, 216, .22), transparent 26rem),
    linear-gradient(135deg, #22102F 0%, #351347 42%, #16091f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .22;
  background-image:
    linear-gradient(rgba(185, 215, 234, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 215, 234, .18) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(700px) rotateX(58deg) translateY(-22vh) scale(1.4);
  transform-origin: top;
}

button { font: inherit; color: inherit; }

.quest-board { position: relative; z-index: 2; }

.scene {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(8, minmax(9vh, auto));
  padding: clamp(22px, 4vw, 64px);
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 229, 255, .22);
}

.scene::after {
  content: "";
  position: absolute;
  inset: 3vw;
  z-index: -2;
  border: 1px solid rgba(247, 240, 230, .2);
  clip-path: polygon(0 8%, 92% 0, 100% 74%, 15% 100%);
  background: linear-gradient(130deg, rgba(122, 60, 255, .18), rgba(0, 229, 255, .08), rgba(255, 79, 216, .1));
}

.quest-nav {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 1.5vw;
  transform: translateY(-50%);
  display: grid;
  gap: 14px;
}

.nav-medallion {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--chrome);
  background: radial-gradient(circle at 35% 25%, var(--ivory), var(--aqua) 38%, var(--violet));
  box-shadow: 0 0 0 4px rgba(34, 16, 47, .7), 0 0 20px rgba(0, 229, 255, .45);
  cursor: pointer;
  font-family: var(--hud);
  font-size: 13px;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.nav-medallion:nth-child(2) { transform: translateX(-18px); }
.nav-medallion:nth-child(3) { transform: translateX(5px); }
.nav-medallion:nth-child(4) { transform: translateX(-28px); }
.nav-medallion:nth-child(5) { transform: translateX(-8px); }
.nav-medallion.active {
  background: radial-gradient(circle at 35% 25%, var(--lemon), var(--pink) 45%, var(--violet));
  box-shadow: 0 0 0 5px rgba(255, 79, 216, .2), 0 0 32px var(--pink);
  animation: medallionPulse 1s infinite alternate ease-in-out;
}

.cropped-title {
  grid-column: 1 / 10;
  grid-row: 1 / 4;
  align-self: start;
  margin-top: -6vw;
  margin-left: -5vw;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(78px, 15vw, 230px);
  line-height: .72;
  letter-spacing: -.08em;
  color: var(--ivory);
  text-shadow: 6px 6px 0 var(--pink), 14px 18px 0 rgba(0, 229, 255, .18);
}

.cropped-title span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 2px var(--aqua);
  transform: translateX(11vw);
}

.marble-gate {
  grid-column: 2 / 7;
  grid-row: 3 / 8;
  position: relative;
  min-height: 56vh;
  transform: rotate(-4deg);
}

.column {
  position: absolute;
  bottom: 0;
  width: 26%;
  height: 85%;
  border-radius: 26px 26px 8px 8px;
  background:
    linear-gradient(96deg, rgba(34,16,47,.18), transparent 20%, rgba(185,215,234,.65), transparent 44%, rgba(34,16,47,.14)),
    repeating-linear-gradient(90deg, var(--ivory) 0 13px, #dfd3c7 14px 18px);
  border: 3px solid var(--chrome);
  box-shadow: inset 0 0 34px rgba(122, 60, 255, .3), 12px 16px 0 rgba(34,16,47,.38);
}

.column.left { left: 8%; }
.column.right { right: 10%; transform: translateY(8%) rotate(5deg); }

.pediment {
  position: absolute;
  left: 0;
  top: 4%;
  width: 90%;
  padding: 18px 24px;
  color: var(--plum);
  font-family: var(--hud);
  letter-spacing: .12em;
  background: linear-gradient(135deg, var(--ivory), var(--chrome));
  clip-path: polygon(8% 0, 100% 14%, 88% 100%, 0 78%);
}

.aqua-grid {
  grid-column: 6 / 13;
  grid-row: 4 / 8;
  border: 2px solid var(--aqua);
  background:
    linear-gradient(rgba(0, 229, 255, .34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .34) 1px, transparent 1px),
    linear-gradient(135deg, rgba(0,229,255,.14), rgba(255,79,216,.12));
  background-size: 32px 32px, 32px 32px, auto;
  transform: rotate(7deg) skew(-6deg);
  border-radius: 34px;
  box-shadow: 0 0 40px rgba(0, 229, 255, .34), inset 0 0 60px rgba(255, 79, 216, .16);
  clip-path: polygon(0 0, 94% 8%, 100% 80%, 12% 100%);
}

.coin-token {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: clamp(76px, 10vw, 138px);
  aspect-ratio: 1;
  border-radius: 50%;
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 92px);
  background: radial-gradient(circle at 35% 28%, var(--lemon), var(--pink) 42%, var(--violet) 75%);
  color: var(--ivory);
  border: 4px solid var(--chrome);
  box-shadow: 0 16px 0 rgba(34,16,47,.45), 0 0 42px rgba(255, 79, 216, .62);
}

#heroCoin { right: 16vw; top: 42vh; animation: coinBounce 2.3s infinite cubic-bezier(.34,1.56,.64,1); }

.glass-tablet, .chrome-window {
  backdrop-filter: blur(16px);
  border: 2px solid rgba(0, 229, 255, .72);
  background: linear-gradient(135deg, rgba(247,240,230,.88), rgba(185,215,234,.5), rgba(255,79,216,.16));
  color: var(--plum);
  box-shadow: 12px 14px 0 rgba(255, 79, 216, .42), 0 0 40px rgba(0, 229, 255, .28);
}

.glass-tablet { padding: clamp(22px, 3vw, 42px); border-radius: 30px; }
.intro-tablet { grid-column: 7 / 12; grid-row: 2 / 5; transform: rotate(3deg); }
.hud, .window-bar {
  font-family: var(--hud);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--violet);
}

h1, h2 {
  margin: .1em 0;
  font-family: var(--display);
  font-size: clamp(42px, 6.8vw, 108px);
  line-height: .86;
  letter-spacing: -.04em;
}

p { font-size: clamp(18px, 1.7vw, 26px); line-height: 1.12; }

.receipt-strip, .ticker-ribbon {
  position: absolute;
  font-family: var(--hud);
  color: var(--plum);
  background: repeating-linear-gradient(90deg, var(--lemon) 0 24px, var(--ivory) 25px 48px);
  padding: 12px 20px;
  box-shadow: 8px 8px 0 rgba(34,16,47,.4);
  white-space: nowrap;
}
.receipt-strip { left: 6vw; bottom: 9vh; transform: rotate(8deg); }

.vertical-word {
  grid-column: 1 / 4;
  grid-row: 1 / 9;
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-size: clamp(88px, 16vw, 210px);
  color: transparent;
  -webkit-text-stroke: 2px var(--ivory);
  text-shadow: -9px 0 0 var(--pink);
}

.demand-arcade { background: radial-gradient(circle at 72% 36%, rgba(255,240,74,.2), transparent 34rem); }
.graph-rail {
  grid-column: 4 / 12;
  grid-row: 2 / 8;
  position: relative;
  border-left: 5px solid var(--chrome);
  border-bottom: 5px solid var(--chrome);
  background: linear-gradient(145deg, rgba(0,229,255,.12), rgba(122,60,255,.22));
  transform: rotate(-8deg);
  border-radius: 0 36px 0 18px;
  box-shadow: inset 0 0 35px rgba(0,229,255,.3), 15px 18px 0 rgba(34,16,47,.35);
}
.graph-rail::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-top: 8px dotted var(--pink);
  transform: rotate(-28deg);
}
.axis { position: absolute; font-family: var(--hud); color: var(--lemon); letter-spacing: .18em; }
.axis.price { left: -32px; top: 8%; writing-mode: vertical-rl; }
.axis.want { right: 5%; bottom: -34px; }
.gumdrop-dot {
  position: absolute;
  border: 0;
  background: transparent;
  color: var(--pink);
  font-size: 58px;
  text-shadow: 0 0 18px var(--pink), 4px 5px 0 var(--lemon);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.gumdrop-dot:hover, .gumdrop-dot.popped { transform: translateY(-28px) scale(1.25); }
.dot-a { left: 18%; bottom: 15%; }
.dot-b { left: 34%; bottom: 28%; }
.dot-c { left: 55%; bottom: 43%; }
.dot-d { left: 75%; bottom: 58%; }
.demand-window { grid-column: 7 / 12; grid-row: 5 / 8; padding: 24px; transform: rotate(5deg); border-radius: 22px; z-index: 4; }
.window-bar { border-bottom: 1px solid rgba(34,16,47,.22); padding-bottom: 10px; }
.window-bar span { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; background: var(--pink); box-shadow: 16px 0 0 var(--lemon), 32px 0 0 var(--aqua); }
.cherub-hand { position: absolute; left: 23vw; top: 23vh; font-size: 130px; color: var(--ivory); transform: rotate(19deg); text-shadow: 8px 8px 0 var(--violet); }
.sticker, .market-token, .price-tag { font-family: var(--hud); font-weight: 700; }
.sticker-pink { position: absolute; right: 16vw; top: 14vh; padding: 14px 24px; color: var(--ivory); background: var(--pink); border: 3px solid var(--ivory); transform: rotate(-13deg); border-radius: 20px 4px 20px 4px; }
.market-token { position: absolute; left: 42vw; bottom: 13vh; background: var(--lemon); color: var(--plum); width: 80px; height: 80px; display: grid; place-items: center; border-radius: 50%; animation: tokenRail 2.5s infinite ease-in-out; }

.scarcity-fountain { background: radial-gradient(circle at 20% 30%, rgba(255,79,216,.18), transparent 28rem); }
.marble-fountain { grid-column: 2 / 7; grid-row: 2 / 8; position: relative; filter: drop-shadow(18px 24px 0 rgba(34,16,47,.4)); }
.bowl { position: absolute; left: 6%; top: 12%; width: 80%; height: 28%; border-radius: 0 0 50% 50%; background: linear-gradient(120deg, var(--ivory), var(--chrome)); border: 4px solid var(--plum); }
.stem { position: absolute; left: 39%; top: 38%; width: 18%; height: 35%; background: repeating-linear-gradient(90deg, var(--ivory) 0 12px, var(--chrome) 13px 20px); border: 3px solid var(--plum); }
.plinth { position: absolute; left: 0; bottom: 3%; width: 92%; padding: 34px; background: linear-gradient(135deg, var(--ivory), var(--chrome)); color: var(--plum); font-family: var(--display); font-size: clamp(38px, 6vw, 82px); text-align: center; transform: rotate(-3deg); }
.scarcity-note { grid-column: 7 / 12; grid-row: 2 / 6; transform: rotate(-5deg); }
.scarcity-sparks span { position: absolute; width: 18px; height: 18px; background: var(--lemon); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: sparkPop 1.3s infinite ease-out; }
.scarcity-sparks span:nth-child(1) { left: 26%; top: 28%; }
.scarcity-sparks span:nth-child(2) { left: 35%; top: 37%; animation-delay: .2s; }
.scarcity-sparks span:nth-child(3) { left: 19%; top: 46%; animation-delay: .4s; }
.scarcity-sparks span:nth-child(4) { left: 47%; top: 21%; animation-delay: .6s; }
.scarcity-sparks span:nth-child(5) { left: 51%; top: 45%; animation-delay: .8s; }
.amphora { position: absolute; right: 10vw; bottom: 11vh; color: var(--aqua); font-size: 180px; transform: rotate(18deg); text-shadow: 0 0 34px var(--aqua); }
.price-tag { position: absolute; padding: 14px 18px; color: var(--plum); background: var(--lemon); box-shadow: 7px 9px 0 var(--pink); }
.tag-one { right: 22vw; top: 14vh; transform: rotate(10deg); }
.tag-two { left: 8vw; bottom: 18vh; transform: rotate(-11deg); }

.auction-chorus { background: radial-gradient(circle at 76% 68%, rgba(0,229,255,.2), transparent 30rem); }
.bust-fragment { grid-column: 1 / 5; grid-row: 2 / 8; font-family: var(--display); font-size: clamp(220px, 32vw, 470px); color: var(--ivory); text-shadow: 18px 20px 0 var(--chrome), 28px 32px 0 rgba(122,60,255,.5); transform: rotate(-8deg); }
.visor::after { content: ""; position: absolute; left: 10%; top: 42%; width: 32%; height: 9%; background: linear-gradient(90deg, var(--aqua), var(--pink)); border-radius: 999px; box-shadow: 0 0 25px var(--aqua); }
.auction-stage { grid-column: 5 / 12; grid-row: 2 / 8; align-self: center; color: var(--plum); padding: 34px; background: linear-gradient(135deg, rgba(247,240,230,.92), rgba(255,79,216,.25)); border: 3px solid var(--aqua); border-radius: 36px; transform: rotate(4deg); box-shadow: -18px 18px 0 rgba(255,240,74,.65); }
.bid-stack { min-height: 190px; position: relative; }
.bid-sticker { position: absolute; border: 3px solid var(--plum); background: var(--ivory); color: var(--plum); padding: 16px 20px; font-family: var(--hud); font-weight: 700; border-radius: 16px; cursor: pointer; transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.bid-sticker:nth-child(1) { left: 4%; top: 20px; transform: rotate(-8deg); }
.bid-sticker:nth-child(2) { left: 28%; top: 62px; background: var(--pink); color: var(--ivory); transform: rotate(7deg); }
.bid-sticker:nth-child(3) { left: 52%; top: 28px; background: var(--aqua); transform: rotate(-4deg); }
.bid-sticker:nth-child(4) { left: 42%; top: 112px; background: var(--lemon); transform: rotate(11deg); }
.bid-sticker:hover, .bid-sticker.stacked { transform: translateY(-20px) rotate(0deg) scale(1.1); z-index: 8; }
.laurel-calculator { position: absolute; right: 9vw; top: 9vh; width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; border: 5px dotted var(--lemon); color: var(--lemon); font-size: 58px; animation: spinSlow 10s linear infinite; }
.ticker-ribbon { left: -3vw; bottom: 10vh; transform: rotate(-5deg); }

.inflation-mirror { background: radial-gradient(circle at center, rgba(122,60,255,.34), transparent 36rem); }
.mirror-frame { grid-column: 2 / 8; grid-row: 2 / 8; display: grid; place-items: center; border-radius: 48% 52% 44% 56%; border: 12px solid var(--chrome); background: radial-gradient(circle, rgba(247,240,230,.32), rgba(0,229,255,.12), rgba(34,16,47,.45)); box-shadow: inset 0 0 50px var(--aqua), 0 0 60px rgba(185,215,234,.36); }
.stretch-coin { width: 210px; height: 210px; display: grid; place-items: center; border-radius: 50%; color: var(--plum); font-family: var(--display); font-size: 150px; cursor: grab; background: radial-gradient(circle at 30% 20%, var(--ivory), var(--chrome), var(--violet)); border: 5px solid var(--ivory); box-shadow: 0 20px 0 rgba(34,16,47,.42); animation: coinWobble 2s infinite ease-in-out; }
.stretch-coin.dragging { cursor: grabbing; animation: none; }
.inflation-copy { grid-column: 7 / 12; grid-row: 2 / 5; padding: 28px; border-radius: 26px; transform: rotate(-4deg); }
.receipt { position: absolute; right: 13vw; bottom: 12vh; padding: 24px; background: var(--ivory); color: var(--plum); font-family: var(--hud); line-height: 1.7; transform: rotate(8deg); box-shadow: 12px 12px 0 var(--pink); }
.halo-orbit { position: absolute; left: 16vw; top: 18vh; width: 52vw; height: 52vw; border: 2px solid rgba(0,229,255,.42); border-radius: 50%; transform: rotate(17deg); pointer-events: none; }

.equilibrium-exit { background: radial-gradient(circle at 50% 54%, rgba(255,240,74,.18), transparent 32rem); }
.equilibrium-fountain { grid-column: 1 / 8; grid-row: 2 / 8; position: relative; align-self: center; min-height: 60vh; background: linear-gradient(135deg, rgba(0,229,255,.12), rgba(255,79,216,.12)); border-radius: 42px; border: 2px solid var(--aqua); transform: rotate(-3deg); }
.curve-svg { width: 100%; height: 100%; min-height: 430px; overflow: visible; }
.curve { fill: none; stroke-width: 12; stroke-linecap: round; filter: drop-shadow(0 0 12px currentColor); stroke-dasharray: 760; stroke-dashoffset: 760; transition: stroke-dashoffset 1.1s cubic-bezier(.34,1.56,.64,1); }
.scene.active .curve { stroke-dashoffset: 0; }
.supply { stroke: var(--aqua); color: var(--aqua); }
.demand { stroke: var(--pink); color: var(--pink); }
.snap-point { fill: var(--lemon); stroke: var(--ivory); stroke-width: 8; animation: medallionPulse .8s infinite alternate; }
.fountain-label { position: absolute; left: 8%; bottom: 8%; font-family: var(--display); color: var(--ivory); font-size: clamp(58px, 9vw, 140px); text-shadow: 8px 8px 0 var(--violet); }
.exit-tablet { grid-column: 7 / 12; grid-row: 2 / 6; transform: rotate(5deg); }
.continue-medallion { margin-top: 10px; border: 0; border-radius: 999px; padding: 16px 24px; color: var(--plum); background: radial-gradient(circle at 30% 20%, var(--lemon), var(--pink)); font-family: var(--hud); font-weight: 700; text-transform: uppercase; cursor: pointer; box-shadow: 0 10px 0 rgba(34,16,47,.42); }
.continue-medallion:active { transform: translateY(7px); box-shadow: 0 3px 0 rgba(34,16,47,.42); }
.relic-inventory { position: absolute; left: 7vw; top: 10vh; display: flex; align-items: center; gap: 10px; font-family: var(--hud); text-transform: uppercase; letter-spacing: .14em; color: var(--lemon); }
.relic-inventory i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--lemon); box-shadow: 0 0 14px var(--lemon); background: transparent; }
.relic-inventory i.collected { background: var(--lemon); }

.cursor-sparks { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.cursor-sparks span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--lemon); box-shadow: 0 0 12px var(--pink); animation: sparkFade .7s ease-out forwards; }
.bounce-in { opacity: 0; transform: translateY(42px) scale(.94) rotate(var(--rot, 0deg)); transition: opacity .6s ease, transform .8s cubic-bezier(.34,1.56,.64,1); }
.scene.active .bounce-in { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rot, 0deg)); }

@keyframes coinBounce { 0%,100% { transform: translateY(-60px) rotate(-12deg) scale(1); } 48% { transform: translateY(58px) rotate(18deg) scale(1.06,.94); } 62% { transform: translateY(22px) rotate(25deg) scale(.96,1.08); } }
@keyframes medallionPulse { from { transform: scale(1); filter: saturate(1); } to { transform: scale(1.16); filter: saturate(1.45); } }
@keyframes tokenRail { 0%,100% { transform: translate(-28px,-18px); } 50% { transform: translate(54px,-68px) scale(1.12); } }
@keyframes sparkPop { 0% { transform: scale(.2) rotate(0deg); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.7) rotate(180deg) translateY(-28px); opacity: 0; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes coinWobble { 0%,100% { transform: scaleX(1) rotate(-2deg); } 50% { transform: scaleX(1.34) rotate(3deg); } }
@keyframes sparkFade { to { transform: translateY(-28px) scale(0); opacity: 0; } }

@media (max-width: 820px) {
  .quest-nav { right: 10px; gap: 8px; }
  .nav-medallion { width: 34px; height: 34px; }
  .scene { grid-template-columns: repeat(6, 1fr); padding: 24px 54px 24px 20px; }
  .cropped-title, .marble-gate, .aqua-grid, .intro-tablet, .graph-rail, .demand-window, .marble-fountain, .scarcity-note, .auction-stage, .mirror-frame, .inflation-copy, .equilibrium-fountain, .exit-tablet { grid-column: 1 / 7; }
  .cropped-title { grid-row: 1 / 3; }
  .marble-gate, .graph-rail, .marble-fountain, .mirror-frame, .equilibrium-fountain { grid-row: 3 / 7; }
  .intro-tablet, .demand-window, .scarcity-note, .auction-stage, .inflation-copy, .exit-tablet { grid-row: 5 / 9; }
  .vertical-word { opacity: .45; grid-column: 1 / 3; }
  .receipt, .cherub-hand, .amphora { display: none; }
}
