:root {
  --espresso-night: #1B120F;
  --milk-foam: #F4E8D2;
  --rewind-blue: #6E8FB8;
  --cherry-ink: #B7433C;
  --caramel-lamp: #D7A85B;
  --eraser-pink: #E8B7AA;
  --charcoal-graphite: #3A3430;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--milk-foam);
  background:
    radial-gradient(circle at 20% 10%, rgba(215, 168, 91, .18), transparent 28rem),
    radial-gradient(circle at 82% 24%, rgba(110, 143, 184, .14), transparent 26rem),
    linear-gradient(135deg, #1B120F 0%, #241612 48%, #0f0908 100%);
  font-family: "Nunito Sans", sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .28;
  background-image:
    radial-gradient(circle at 22% 18%, rgba(244, 232, 210, .08) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 64%, rgba(58, 52, 48, .24) 0 1px, transparent 1px),
    linear-gradient(90deg, transparent, rgba(244, 232, 210, .035), transparent);
  background-size: 16px 16px, 23px 23px, 100% 4px;
  mix-blend-mode: soft-light;
}

.cursor-ring {
  position: fixed;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(110, 143, 184, .65);
  border-radius: 50%;
  pointer-events: none;
  z-index: 30;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 5px rgba(27, 18, 15, .2), 0 0 18px rgba(110, 143, 184, .28);
}

.counter-nav {
  position: fixed;
  top: 1rem;
  left: 3vw;
  right: 3vw;
  height: 92px;
  z-index: 15;
  pointer-events: none;
}

.rail {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}

.rail path {
  fill: none;
  stroke: rgba(244, 232, 210, .5);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 2 22;
}

.sugar-cube {
  position: absolute;
  left: var(--cube-x, 1%);
  top: var(--cube-y, 64%);
  width: 38px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--charcoal-graphite);
  background: linear-gradient(145deg, #F4E8D2, #e7d6b7);
  border-radius: 7px 5px 8px 4px;
  box-shadow: 8px 8px 20px rgba(0,0,0,.25);
  transform: rotate(var(--cube-rotate, -8deg));
  transition: left .25s ease, top .25s ease;
}

.sugar-cube span { font: 400 .72rem "Nanum Pen Script", cursive; color: var(--cherry-ink); }

.nav-dot {
  position: absolute;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--charcoal-graphite);
  border: 2px solid var(--milk-foam);
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(110, 143, 184, .0);
}

.nav-dot span {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  color: var(--milk-foam);
  font: 700 .68rem "Space Mono", monospace;
  opacity: .75;
}

.nav-dot.active { background: var(--rewind-blue); box-shadow: 0 0 0 9px rgba(110, 143, 184, .18); }
.nav-dot:nth-of-type(1) { left: 7%; top: 66%; }
.nav-dot:nth-of-type(2) { left: 27%; top: 18%; }
.nav-dot:nth-of-type(3) { left: 51%; top: 48%; }
.nav-dot:nth-of-type(4) { left: 73%; top: 68%; }
.nav-dot:nth-of-type(5) { left: 93%; top: 14%; }

.station {
  position: relative;
  min-height: 100vh;
  padding: 8rem clamp(1.2rem, 5vw, 5rem) 4rem;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  isolation: isolate;
}

.station::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  border: 1px solid rgba(244, 232, 210, .08);
  transform: rotate(-8deg);
  z-index: -1;
}

h1, h2 {
  margin: 0;
  color: var(--milk-foam);
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: .92;
}

h1 { font-size: clamp(4.5rem, 14vw, 13rem); text-shadow: 0 0 35px rgba(215,168,91,.18); }
h2 { font-size: clamp(3rem, 8vw, 7.2rem); }
p { font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.75; }

.mono-label, .receipt-line {
  font-family: "Space Mono", monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .74rem;
  color: var(--caramel-lamp);
}

.timestamp-labels-sparingly {
  font-family: "Space Mono", monospace;
  letter-spacing: .1em;
}

.hand-note { font-family: "Nanum Pen Script", cursive; font-size: clamp(1.7rem, 3vw, 3.2rem); color: var(--eraser-pink); }

.object-copy {
  max-width: 620px;
  padding: 2rem;
  border-radius: 2rem 4rem 2rem 3rem;
  background: linear-gradient(145deg, rgba(58, 52, 48, .62), rgba(27, 18, 15, .35));
  box-shadow: inset 0 0 0 1px rgba(244, 232, 210, .1), 0 24px 70px rgba(0,0,0,.3);
}

.table-scene { position: relative; min-height: 520px; }
.puddle {
  position: absolute;
  left: 12%;
  bottom: 11%;
  width: clamp(260px, 39vw, 540px);
  height: clamp(120px, 18vw, 230px);
  border-radius: 45% 55% 49% 51% / 54% 42% 58% 46%;
  background: radial-gradient(circle at 58% 42%, rgba(58, 52, 48, .9), #0b0605 70%);
  transform: scale(var(--puddle-scale, 1)) rotate(-7deg);
  box-shadow: inset 0 0 55px rgba(244, 232, 210, .06), 0 14px 45px rgba(0,0,0,.42);
  transition: transform 1.2s cubic-bezier(.2,.8,.2,1), border-radius 1.2s ease;
}

.reflection {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scaleY(-1) rotate(3deg);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 7vw, 6rem);
  color: rgba(244, 232, 210, .34);
  letter-spacing: .12em;
  filter: blur(var(--reflection-blur, 7px));
  opacity: .78;
}

.cup, .final-cup {
  position: absolute;
  width: 190px;
  height: 150px;
  border-radius: 18px 18px 70px 70px;
  background: linear-gradient(120deg, #F4E8D2 0%, #cfbea3 78%);
  box-shadow: inset -18px -13px 28px rgba(58, 52, 48, .22), 0 32px 50px rgba(0,0,0,.38);
}

.cup::after, .final-cup::after {
  content: "";
  position: absolute;
  right: -52px;
  top: 36px;
  width: 68px;
  height: 62px;
  border: 15px solid #d9ccb5;
  border-left: 0;
  border-radius: 0 50% 50% 0;
}

.tilted { left: 44%; top: 13%; transform: rotate(var(--cup-tilt, -22deg)); transition: transform 1.2s ease; }
.upright { left: 42%; bottom: 12%; transform: rotate(0deg); }
.coffee-surface { position: absolute; inset: 16px 18px auto; height: 32px; border-radius: 50%; background: radial-gradient(circle, #3A3430, #1B120F); }
.cup b { position: absolute; right: 24px; bottom: 22px; color: var(--rewind-blue); font: 700 1rem "Space Mono", monospace; }
.saucer { position: absolute; width: 250px; height: 74px; border-radius: 50%; background: radial-gradient(ellipse, transparent 32%, rgba(110,143,184,.35) 34%, transparent 36%, #F4E8D2 37%, #cdbb9b 73%); }
.spill-station .saucer { left: 39%; top: 44%; transform: rotate(-17deg); }
.rings { box-shadow: inset 0 0 0 10px rgba(110, 143, 184, .12), inset 0 0 0 22px rgba(215,168,91,.12); }

.droplet { position: absolute; width: 24px; height: 24px; border-radius: 50% 50% 50% 12%; background: #1B120F; box-shadow: inset 0 0 8px rgba(244,232,210,.1); transition: transform 1.2s ease, opacity 1s ease; }
.d1 { left: 16%; bottom: 28%; }.d2 { left: 29%; bottom: 19%; width: 15px; height: 15px; }.d3 { left: 38%; bottom: 31%; width: 19px; height: 19px; }
body.rewound .droplet { transform: translate(280px, -175px) scale(.25); opacity: .1; }
body.rewound { --puddle-scale: .46; --reflection-blur: .2px; --cup-tilt: -5deg; }
.clock-face { position: absolute; right: 8vw; top: 18vh; width: 138px; height: 138px; border: 2px solid rgba(244,232,210,.5); border-radius: 50%; display: grid; place-items: center; font: 700 .85rem "Space Mono", monospace; color: var(--caramel-lamp); }
.clock-face i { position: absolute; width: 3px; height: 48px; background: var(--caramel-lamp); transform-origin: bottom center; transform: translateY(-24px) rotate(var(--hand-angle, 344deg)); transition: transform .3s linear; }
.hero-note { position: absolute; left: 57%; bottom: 14%; transform: rotate(-9deg); }

.artifact-card, .receipt-roll {
  color: var(--charcoal-graphite);
  background:
    radial-gradient(circle at 15% 20%, rgba(215,168,91,.18), transparent 12rem),
    linear-gradient(145deg, #F4E8D2, #ead9ba);
  box-shadow: 0 28px 65px rgba(0,0,0,.34), inset 0 0 0 1px rgba(58,52,48,.12);
}
.artifact-card h2, .receipt-roll h2 { color: var(--charcoal-graphite); }
.napkin-stack { padding: clamp(2rem, 5vw, 4rem); border-radius: 8% 12% 9% 14%; transform: rotate(-4deg); }
.paragraph-gather { transition: filter 1s ease, letter-spacing 1s ease; }
.crossed span { color: var(--cherry-ink); text-decoration: line-through; }
.eraser { position: absolute; right: 14%; top: 28%; width: 180px; height: 78px; border-radius: 18px 22px 16px 20px; background: linear-gradient(130deg, #E8B7AA, #d2958d); color: var(--cherry-ink); display: grid; place-items: center; font: 700 1.1rem "Space Mono"; transform: rotate(12deg); box-shadow: 18px 20px 40px rgba(0,0,0,.25); }
.crumb-field i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--eraser-pink); opacity: .8; transform: translate(var(--x), var(--y)); transition: transform 1.1s ease; }
.crumb-field i:nth-child(1){--x:68vw;--y:64vh}.crumb-field i:nth-child(2){--x:74vw;--y:55vh}.crumb-field i:nth-child(3){--x:63vw;--y:41vh}.crumb-field i:nth-child(4){--x:80vw;--y:70vh}.crumb-field i:nth-child(5){--x:54vw;--y:58vh}.crumb-field i:nth-child(6){--x:82vw;--y:36vh}.crumb-field i:nth-child(7){--x:49vw;--y:74vh}.crumb-field i:nth-child(8){--x:66vw;--y:29vh}.crumb-field i:nth-child(9){--x:57vw;--y:34vh}.crumb-field i:nth-child(10){--x:77vw;--y:47vh}
.eraser-station.in-view .crumb-field i { transform: translate(34vw, 48vh) scale(.55); }
.toast { position: absolute; right: 9%; bottom: 11%; width: 175px; height: 170px; border-radius: 42% 42% 18% 18%; background: radial-gradient(circle at 72% 22%, rgba(183,67,60,.46), transparent 32%), linear-gradient(#D7A85B, #b4763a); display: grid; place-items: center; color: var(--milk-foam); font-family: "Nanum Pen Script"; font-size: 2rem; transition: filter .8s ease; }
.toast:hover { filter: saturate(.6) brightness(1.28); }

.receipt-station { grid-template-columns: .85fr 1.15fr; }
.ticket-clip { position: absolute; left: 47%; top: 16%; width: 80px; height: 34px; border-radius: 0 0 30px 30px; background: linear-gradient(#D7A85B, #8f6a34); }
.receipt-roll { justify-self: center; width: min(520px, 84vw); padding: 3.5rem 2.3rem; border-radius: 6px 6px 28px 28px; position: relative; transform: rotate(3deg) translateY(var(--receipt-y, 48px)); transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.receipt-roll::before, .receipt-roll::after { content: ""; position: absolute; left: 0; right: 0; height: 16px; background: repeating-linear-gradient(90deg, transparent 0 16px, rgba(27,18,15,.18) 16px 24px); }
.receipt-roll::before { top: -8px; }.receipt-roll::after { bottom: -8px; }
.receipt-station.in-view { --receipt-y: -10px; }
.receipt-roll p { border-bottom: 1px dashed rgba(58,52,48,.32); display: flex; justify-content: space-between; gap: 1rem; font-family: "Space Mono"; font-size: .95rem; }
.bad-total { color: var(--cherry-ink); text-decoration: line-through; }
.stamp { width: max-content; margin: 1.2rem auto; padding: .4rem 1rem; border: 4px double var(--cherry-ink); color: var(--cherry-ink); transform: rotate(-10deg); font-weight: 700; }
.mirror { transform: scaleX(-1); opacity: .5; }
.spoon-arrow { position: absolute; right: 10%; top: 42%; width: 220px; height: 42px; border-bottom: 13px solid var(--rewind-blue); border-radius: 0 0 80% 45%; transform: rotate(-22deg); opacity: .72; }
.spoon-arrow::after { content: ""; position: absolute; left: -18px; bottom: -26px; width: 42px; height: 42px; border: 10px solid var(--rewind-blue); border-right: 0; border-radius: 50% 0 0 50%; }
.large-ring { position: absolute; left: 9%; bottom: 12%; width: 310px; height: 310px; border-radius: 50%; border: 28px solid rgba(58,52,48,.58); box-shadow: inset 0 0 0 3px rgba(215,168,91,.38); display: grid; place-items: center; font-family: "Nanum Pen Script"; color: var(--caramel-lamp); font-size: 2rem; }

.steam-station { background: radial-gradient(circle at 72% 62%, rgba(110,143,184,.14), transparent 28rem); }
.chalk-menu { align-self: start; margin-top: 7vh; padding: 2.5rem; border-radius: 2rem; background: linear-gradient(145deg, #3A3430, #221b18); color: var(--milk-foam); transform: rotate(2deg); }
.chalk-menu h2 { color: var(--milk-foam); }
.chalk-line { font-family: "Nanum Pen Script"; font-size: 2.2rem; color: var(--milk-foam); }
.erased { color: rgba(244,232,210,.32); text-decoration: line-through; text-decoration-color: var(--rewind-blue); }
.rewritten { color: var(--eraser-pink); }
.steam-cup { position: relative; min-height: 540px; }
.steam { position: absolute; left: 35%; bottom: 45%; color: rgba(244,232,210,.62); font-family: "Nanum Pen Script"; font-size: 2.4rem; text-decoration: line-through; text-decoration-color: var(--cherry-ink); animation: steamRise 5.6s ease-in-out infinite reverse; }
.s2 { left: 50%; animation-delay: -1.4s; color: rgba(110,143,184,.68); }.s3 { left: 27%; animation-delay: -2.8s; color: rgba(232,183,170,.7); }
@keyframes steamRise { 0% { transform: translateY(-140px) rotate(8deg); opacity: 0; filter: blur(7px); } 35% { opacity: .92; } 100% { transform: translateY(20px) rotate(-8deg); opacity: 0; filter: blur(1px); } }
.cracked::before { content: ""; position: absolute; left: 50%; top: 10%; width: 2px; height: 62%; background: var(--cherry-ink); transform: rotate(28deg); transition: opacity .6s ease; }
.cracked:hover::before { opacity: 0; }
.steam-note { position: absolute; right: 8%; bottom: 12%; transform: rotate(7deg); }

.sip-station { grid-template-columns: 1.1fr .9fr; }
.final-set { position: relative; min-height: 560px; }
.final-cup { left: 38%; top: 25%; transform: rotate(var(--final-rot, 12deg)); transition: transform 1s ease; display: grid; place-items: center; color: var(--charcoal-graphite); font-family: "Cormorant Garamond"; font-size: 2rem; text-align: center; }
.final-saucer { left: 31%; top: 54%; width: 330px; height: 88px; }
.ghost-cup { position: absolute; left: 32%; top: 20%; width: 220px; height: 170px; border: 2px solid rgba(110,143,184,.34); border-radius: 18px 18px 80px 80px; transform: rotate(-18deg); opacity: .48; }
.sip-station.restored { --final-rot: -7deg; }
.ritual-button { border: 0; padding: 1rem 1.3rem; border-radius: 999px; background: var(--milk-foam); color: var(--charcoal-graphite); font: 700 .82rem "Space Mono"; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; box-shadow: 0 18px 34px rgba(0,0,0,.28); }
.ritual-button:hover { background: var(--eraser-pink); }
.sugar-packets { position: absolute; right: 8%; bottom: 10%; display: flex; gap: .6rem; transform: rotate(-8deg); }
.sugar-packets span { padding: .45rem .75rem; border-radius: 5px; background: var(--milk-foam); color: var(--cherry-ink); font-family: "Nanum Pen Script"; font-size: 1.45rem; }

.station.in-view .artifact-card, .station.in-view .object-copy { animation: unblur .9s ease both; }
@keyframes unblur { from { filter: blur(8px); transform: translateY(24px) rotate(var(--start-rotate, 0deg)); opacity: .45; } to { filter: blur(0); opacity: 1; } }

@media (max-width: 820px) {
  .station { grid-template-columns: 1fr; padding-top: 7rem; }
  .counter-nav { left: 0; right: 0; transform: scale(.9); transform-origin: top center; }
  .clock-face { display: none; }
  .cursor-ring { display: none; }
  .table-scene, .steam-cup, .final-set { min-height: 430px; }
  .tilted, .upright, .final-cup { left: 36%; }
  .spoon-arrow, .large-ring { opacity: .35; }
}
