:root {
  --mist-paper: #F2EFE6;
  --frosted-glass: #DDE8E3;
  --weathered-ink: #25231F;
  --muted-vermilion: #B6543C;
  --lantern-amber: #D99B4A;
  --moss-shadow: #63745A;
  --wet-stone: #7F8A84;
  --deep-eave: #171B18;
  --pale-water: #BFD3D1;
  --paper: rgba(242,239,230,.72);
  --frost: rgba(221,232,227,.44);
  --serif-display: "Cormorant Garamond", "Cormorant", "Palatino Linotype", Garamond, Georgia, serif;
  --serif-body: "EB Garamond", "Lora", Garamond, Georgia, serif;
  --sans-label: "Noto Sans JP", Inter, "Hiragino Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; overflow: hidden; }

body {
  color: var(--weathered-ink);
  background:
    radial-gradient(circle at 18% 30%, rgba(191,211,209,.42), transparent 28%),
    radial-gradient(circle at 82% 72%, rgba(217,155,74,.2), transparent 24%),
    linear-gradient(135deg, var(--mist-paper), #dfe7df 46%, #c8d3cc);
  font-family: var(--serif-body);
}

button { font: inherit; color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(37,35,31,.16) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(99,116,90,.15) 0 1px, transparent 1px),
    linear-gradient(90deg, transparent 0 48%, rgba(37,35,31,.07) 50%, transparent 52%);
  background-size: 17px 19px, 23px 29px, 7px 100%;
}

.pilgrimage { position: fixed; inset: 0; overflow: hidden; }

.shrine-rail {
  height: 100vh;
  display: flex;
  will-change: transform;
  transform: translate3d(0,0,0);
}

.station {
  position: relative;
  flex: 0 0 100vw;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(242,239,230,.12), rgba(221,232,227,.24)),
    radial-gradient(circle at var(--orb-x, 70%) var(--orb-y, 40%), rgba(255,255,255,.28), transparent 28%);
}

.station-torii { flex-basis: 92vw; --orb-x: 80%; --orb-y: 20%; }
.station-basin { flex-basis: 118vw; --orb-x: 48%; --orb-y: 62%; background-color: var(--pale-water); }
.station-collage { flex-basis: 82vw; background-color: #e9e1d0; }
.station-lantern { flex-basis: 138vw; color: var(--mist-paper); background: linear-gradient(135deg, var(--deep-eave), #273026 55%, #49351d); }
.station-clearing { flex-basis: 104vw; background: linear-gradient(120deg, #e8ede4, var(--mist-paper) 58%, #d3ded5); }

.mist {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(242,239,230,.72), transparent 32%),
    radial-gradient(ellipse at 76% 22%, rgba(221,232,227,.46), transparent 34%),
    linear-gradient(100deg, transparent, rgba(242,239,230,.36), transparent);
  filter: blur(18px);
  animation: fogDrift 22s ease-in-out infinite alternate;
}

.veil-two { opacity: .64; animation-duration: 28s; }

.frost-panel, .paper-note, .charm-label, .scrap {
  background: var(--paper);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(242,239,230,.54);
  box-shadow: inset 0 0 22px rgba(255,255,255,.24), 0 24px 70px rgba(23,27,24,.16);
}

.opening-panel {
  position: absolute;
  left: 12vw;
  top: 17vh;
  width: min(600px, 58vw);
  min-height: 430px;
  padding: 54px 58px 44px;
  border-radius: 46% 54% 51% 49% / 5% 8% 6% 9%;
  transform: rotate(-1.4deg);
}

.tiny-label {
  margin: 0 0 18px;
  font-family: var(--sans-label);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--moss-shadow);
}

.station-lantern .tiny-label { color: rgba(242,239,230,.75); }

h1, h2 {
  margin: 0;
  font-family: var(--serif-display);
  font-weight: 700;
  line-height: .9;
  letter-spacing: .035em;
}

h1 { font-size: clamp(70px, 10vw, 148px); text-shadow: 1px 0 rgba(182,84,60,.22), -1px 1px rgba(99,116,90,.18); }
h2 { font-size: clamp(42px, 6vw, 92px); }

p { font-size: clamp(18px, 1.5vw, 24px); line-height: 1.45; }

.poem { max-width: 380px; margin-top: 30px; color: rgba(37,35,31,.8); }

.seal, .ritual-seal {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-top: 28px;
  border: 2px solid var(--muted-vermilion);
  border-radius: 50% 46% 52% 48%;
  color: var(--muted-vermilion);
  font-family: var(--sans-label);
  transform: rotate(5deg);
  background: rgba(242,239,230,.35);
}

.torii-shape {
  position: absolute;
  right: -9vw;
  top: 4vh;
  width: 54vw;
  height: 82vh;
  opacity: .24;
  border-top: 34px solid var(--muted-vermilion);
  border-left: 22px solid var(--muted-vermilion);
  border-right: 30px solid var(--muted-vermilion);
  transform: rotate(2deg) skewX(-3deg);
  filter: blur(.4px);
}

.torii-shape span {
  position: absolute;
  left: -70px;
  right: -54px;
  top: 72px;
  height: 28px;
  background: var(--muted-vermilion);
}

.foreground-grass, .rope-fibers {
  position: absolute;
  left: -4vw;
  right: -4vw;
  bottom: -20px;
  height: 180px;
  background: repeating-linear-gradient(100deg, transparent 0 22px, rgba(99,116,90,.45) 23px 26px, transparent 27px 44px);
  opacity: .44;
  transform: skewY(-2deg);
}

.leaf-shadow, .falling-leaf {
  position: absolute;
  width: 170px;
  height: 86px;
  background: var(--moss-shadow);
  opacity: .22;
  clip-path: polygon(50% 0, 62% 22%, 96% 18%, 72% 48%, 88% 84%, 52% 66%, 20% 100%, 26% 58%, 0 35%, 36% 28%);
  filter: blur(1px);
}

.leaf-a { right: 17vw; top: 18vh; animation: leafDrift 15s ease-in-out infinite alternate; }
.leaf-b { left: 22vw; top: 18vh; animation: leafDrift 17s ease-in-out infinite alternate; }
.leaf-c { right: 15vw; bottom: 21vh; width: 110px; transform: rotate(70deg); animation: leafDrift 19s ease-in-out infinite alternate-reverse; }

.basin-wrap { position: absolute; left: 24vw; top: 24vh; width: 52vw; height: 48vh; }

.basin {
  position: absolute;
  inset: 8% 0 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 48% 38%, rgba(242,239,230,.7), rgba(191,211,209,.45) 36%, rgba(127,138,132,.38) 62%, rgba(37,35,31,.28)),
    linear-gradient(115deg, rgba(221,232,227,.52), transparent);
  border: 18px solid rgba(127,138,132,.45);
  box-shadow: inset 0 -24px 58px rgba(37,35,31,.18), 0 40px 90px rgba(99,116,90,.24);
  transform: rotate(-3deg);
}

.water-ring, .amber-ripple::before, .amber-ripple::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  aspect-ratio: 1;
  border: 1px solid rgba(242,239,230,.78);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.2);
  animation: ripple 5.4s ease-out infinite;
}

.ring-two { animation-delay: 1.5s; }
.ring-three { animation-delay: 3s; }

.ladle {
  position: absolute;
  right: 1vw;
  top: 0;
  width: 150px;
  height: 36px;
  border-radius: 20px;
  background: rgba(99,116,90,.5);
  transform: rotate(31deg);
  box-shadow: -72px -4px 0 -8px rgba(99,116,90,.44);
}

.charm-label {
  position: absolute;
  min-width: 130px;
  padding: 18px 22px;
  border-radius: 3px 11px 4px 14px;
  font-family: var(--sans-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .45s ease, box-shadow .45s ease;
}

.charm-left { left: 18vw; top: 28vh; transform: rotate(-5deg); }
.charm-right { right: 24vw; bottom: 20vh; transform: rotate(4deg); }
.charm-label:hover { transform: translateY(-8px) rotate(0deg); }

.paper-note {
  position: absolute;
  padding: 36px 42px;
  max-width: 460px;
  border-radius: 18px 7px 24px 9px;
}

.basin-note { right: 13vw; top: 14vh; transform: rotate(1.2deg); }
.collage-note { left: 7vw; bottom: 10vh; transform: rotate(-1.8deg); }
.final-note { left: 10vw; top: 20vh; max-width: 560px; }

.collage-band {
  position: absolute;
  left: 7vw;
  right: 7vw;
  top: 22vh;
  height: 42vh;
  border-top: 2px solid rgba(99,116,90,.25);
  border-bottom: 2px solid rgba(99,116,90,.18);
}

.scrap {
  position: absolute;
  border: 0;
  padding: 28px 34px;
  min-width: 150px;
  min-height: 110px;
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 26px;
  transition: transform .45s ease, filter .45s ease;
}

.scrap:hover { filter: saturate(1.12); transform: translateY(-13px) rotate(0deg) scale(1.02); }
.scrap-map { left: 4%; top: 7%; transform: rotate(-4deg); border-radius: 5px 18px 8px 3px; }
.scrap-leaf { left: 24%; top: 28%; transform: rotate(3deg); background: rgba(191,211,209,.68); }
.scrap-fabric { left: 46%; top: 2%; transform: rotate(-2deg); background: rgba(217,155,74,.35); }
.scrap-stamp { right: 12%; top: 22%; transform: rotate(4deg); color: var(--muted-vermilion); }
.scrap-washi { right: 1%; top: -5%; transform: rotate(-3deg); }

.string-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 48vh;
  height: 7px;
  background: repeating-linear-gradient(90deg, rgba(99,116,90,.22) 0 18px, transparent 19px 30px);
  transform: rotate(-1deg);
}

.eaves {
  position: absolute;
  left: -4vw;
  right: -4vw;
  top: 0;
  height: 24vh;
  background: repeating-linear-gradient(92deg, #0f120f 0 34px, #25231F 35px 68px);
  box-shadow: 0 28px 80px rgba(0,0,0,.5);
  transform: rotate(-1deg);
}

.lantern {
  position: absolute;
  top: 17vh;
  width: 94px;
  height: 150px;
  border-radius: 44% 49% 47% 45%;
  background: radial-gradient(circle, rgba(217,155,74,.95), rgba(182,84,60,.4) 60%, rgba(242,239,230,.1));
  box-shadow: 0 0 60px rgba(217,155,74,.55), inset 0 0 24px rgba(242,239,230,.34);
  animation: lanternSwing 6s ease-in-out infinite alternate;
}

.lantern::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 90px; border-left: 1px solid rgba(242,239,230,.32); }
.lantern span { position: absolute; inset: 13px; border-left: 1px solid rgba(242,239,230,.34); border-right: 1px solid rgba(242,239,230,.24); border-radius: inherit; }
.lantern-one { left: 22vw; }
.lantern-two { left: 49vw; top: 11vh; transform: scale(1.22); animation-delay: -1.5s; }
.lantern-three { right: 28vw; top: 21vh; transform: scale(.8); animation-delay: -3s; }

.lantern-panel { position: absolute; left: 63vw; top: 36vh; width: 520px; padding: 42px 48px; color: var(--mist-paper); background: rgba(23,27,24,.48); border-color: rgba(242,239,230,.25); transform: rotate(.8deg); }

.pull-cord { display: inline-flex; gap: 14px; align-items: center; margin-top: 14px; font-family: var(--sans-label); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; }
.pull-cord span { width: 16px; height: 86px; border-left: 1px solid var(--lantern-amber); position: relative; }
.pull-cord span::after { content: ""; position: absolute; left: -7px; bottom: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--lantern-amber); }

.amber-ripple { position: absolute; left: 50vw; top: 42vh; width: 280px; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.amber-ripple::before, .amber-ripple::after { content: ""; border-color: rgba(217,155,74,.5); animation-duration: 6.8s; }
.amber-ripple::after { animation-delay: 2.2s; }

.rope-fibers { opacity: .16; background: repeating-linear-gradient(84deg, transparent 0 17px, rgba(242,239,230,.42) 18px 20px, transparent 21px 36px); }

.clearing-moon { position: absolute; right: 12vw; top: 13vh; width: 230px; aspect-ratio: 1; border-radius: 50%; background: rgba(221,232,227,.54); box-shadow: 0 0 100px rgba(242,239,230,.75); }

.wish-branch { position: absolute; right: 12vw; top: 30vh; width: 48vw; height: 38vh; }
.branch { position: absolute; left: 0; right: 0; top: 28%; height: 10px; border-radius: 50%; background: var(--moss-shadow); transform: rotate(-9deg); }
.wish { position: absolute; top: 29%; width: 42px; height: 148px; padding-top: 30px; text-align: center; background: rgba(242,239,230,.78); border-radius: 2px 7px 3px 9px; box-shadow: 0 18px 34px rgba(99,116,90,.15); font-family: var(--sans-label); color: var(--muted-vermilion); transform-origin: top; animation: wishSway 5s ease-in-out infinite alternate; }
.wish-one { left: 14%; transform: rotate(4deg); }
.wish-two { left: 34%; transform: rotate(-3deg); animation-delay: -1s; }
.wish-three { left: 57%; transform: rotate(2deg); animation-delay: -2s; }
.wish-four { left: 78%; transform: rotate(-5deg); animation-delay: -3s; }

.ritual-seal { border-radius: 50%; margin-top: 22px; cursor: pointer; width: 94px; height: 94px; font-family: var(--sans-label); font-size: 11px; letter-spacing: .08em; }
.ritual-seal.tied { background: rgba(182,84,60,.14); transform: rotate(-7deg) scale(1.05); }

.stone-nav {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(242,239,230,.36);
  border: 1px solid rgba(242,239,230,.46);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.stone {
  position: relative;
  width: 16px;
  height: 13px;
  padding: 0;
  border: 0;
  border-radius: 50% 43% 54% 47%;
  background: var(--wet-stone);
  cursor: pointer;
  transition: transform .3s ease, background .3s ease;
}

.stone:nth-child(2) { width: 13px; height: 17px; }
.stone:nth-child(3) { width: 19px; height: 14px; }
.stone:nth-child(4) { width: 14px; height: 14px; }
.stone.active { background: var(--muted-vermilion); transform: scale(1.42); }
.stone span { position: absolute; opacity: 0; pointer-events: none; }

.quest-phrase {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 38;
  max-width: 270px;
  padding: 13px 18px;
  border-radius: 15px 4px 19px 7px;
  background: rgba(242,239,230,.62);
  color: var(--moss-shadow);
  font-family: var(--sans-label);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .78;
  transition: opacity .3s ease, transform .3s ease;
}
.quest-phrase.reveal { opacity: 1; transform: translateY(-8px) rotate(-1deg); }

.cursor-ripple {
  position: fixed;
  z-index: 42;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(182,84,60,.44);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-80px,-80px,0) scale(.3);
}
.cursor-ripple.pulse { animation: cursorPulse .8s ease-out; }

.soak-in { animation: soakIn 1.8s ease both; }
.glow-more .lantern { box-shadow: 0 0 95px rgba(217,155,74,.8), inset 0 0 30px rgba(242,239,230,.42); }

@keyframes soakIn { from { opacity: 0; filter: blur(10px); transform: translateY(20px) rotate(-2.6deg); } to { opacity: 1; filter: blur(0); } }
@keyframes fogDrift { from { transform: translateX(-3%) translateY(1%); } to { transform: translateX(4%) translateY(-2%); } }
@keyframes leafDrift { from { transform: translate3d(-10px, 0, 0) rotate(-18deg); } to { transform: translate3d(32px, 28px, 0) rotate(28deg); } }
@keyframes ripple { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.25); } 15% { opacity: .7; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(5.4); } }
@keyframes lanternSwing { from { translate: -5px 0; rotate: -2deg; } to { translate: 8px 4px; rotate: 3deg; } }
@keyframes wishSway { from { rotate: -3deg; } to { rotate: 4deg; } }
@keyframes cursorPulse { 0% { opacity: .75; transform: translate3d(var(--x), var(--y), 0) scale(.35); } 100% { opacity: 0; transform: translate3d(var(--x), var(--y), 0) scale(3.4); } }

@media (max-width: 760px) {
  .opening-panel, .paper-note, .lantern-panel { left: 7vw; right: auto; width: 82vw; padding: 30px; }
  .station { flex-basis: 100vw; }
  .basin-wrap { left: 8vw; width: 84vw; }
  .lantern-panel { top: 40vh; }
  .quest-phrase { display: none; }
}
