* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --marigold: #f59e0b;
  --tika: #b91c1c;
  --cream: #fff7e6;
  --wood: #7c4a2d;
  --ink: #3d2b1f;
  --card: rgba(255, 247, 230, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Mukta", system-ui, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  background: var(--cream);
}
::selection { background: var(--marigold); color: #fff; }

/* ── Scroll progress ── */
#progress {
  position: fixed; top: 0; left: 0; z-index: 70;
  height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--tika), var(--marigold));
}

/* ── Nav ── */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 20px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 247, 230, 0.6);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(124, 74, 45, 0.18);
}
#topnav .brand {
  font-weight: 800; font-size: 1.25rem; color: var(--tika);
  text-decoration: none; letter-spacing: 0.5px;
}
.nav-links { display: flex; gap: clamp(10px, 2.5vw, 28px); margin-left: auto; }
.nav-links a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  position: relative; padding: 2px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--tika);
  transform: scaleX(0); transform-origin: right; transition: transform 0.3s;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
/* ── Live visitor badge ── */
.live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.82rem; font-weight: 700;
  background: rgba(22, 163, 74, 0.13);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.3);
  border-radius: 999px; padding: 5px 12px;
  white-space: nowrap;
}
.live[hidden] { display: none; }
.live b { font-variant-numeric: tabular-nums; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; flex: none;
  animation: live-pulse 1.9s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1;    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%      { opacity: 0.75; box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

.visit-line {
  margin-top: 12px; opacity: 0.75; font-size: 0.92rem;
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.visit-line[hidden] { display: none; }
.visit-line b { color: var(--marigold); font-variant-numeric: tabular-nums; }
.dot-sep { opacity: 0.45; }

#nav-share {
  font-family: inherit; font-weight: 700; font-size: 0.85rem;
  background: var(--ink); color: var(--cream);
  border: none; border-radius: 999px; padding: 8px 16px; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
#nav-share:hover { background: var(--tika); transform: translateY(-1px); }

/* ── Hero ── */
#hero { position: relative; height: 100svh; min-height: 540px; }
#scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
/* svg is oversized so parallax layers never expose an edge */
#scene svg { position: absolute; width: 106%; height: 106%; left: -3%; top: -3%; display: block; }
.plx { will-change: transform; }

/* clouds drift */
.cloud-a { animation: drift 71s linear infinite; }
.cloud-b { animation: drift 97s linear infinite reverse; }
.cloud-c { animation: drift 127s linear infinite; animation-delay: -40s; }
@keyframes drift {
  from { transform: translateX(-220px); }
  to   { transform: translateX(1500px); }
}

/* kites bob around (fallback keyframes) */
.kite-a { transform-origin: center; animation: fly-a 18s ease-in-out infinite; }
.kite-b { animation: fly-b 23s ease-in-out infinite; }
@keyframes fly-a {
  0%   { transform: translate(880px, 210px) rotate(-8deg); }
  50%  { transform: translate(940px, 150px) rotate(10deg); }
  100% { transform: translate(880px, 210px) rotate(-8deg); }
}
@keyframes fly-b {
  0%   { transform: translate(600px, 130px) rotate(6deg); }
  50%  { transform: translate(540px, 190px) rotate(-9deg); }
  100% { transform: translate(600px, 130px) rotate(6deg); }
}

/* kites ride real wind loops where CSS Motion Path is supported */
@supports (offset-path: path("M0,0 L10,10")) {
  .kite-a {
    offset-path: path("M880,210 C990,90 1140,130 1060,230 C1000,310 900,320 840,270 C800,236 820,225 880,210");
    offset-rotate: 0deg;
    animation: kite-drift 30s linear infinite, kite-wobble-a 6s ease-in-out infinite;
  }
  .kite-b {
    offset-path: path("M600,130 C520,200 450,170 495,105 C540,55 665,72 600,130");
    offset-rotate: 0deg;
    animation: kite-drift 24s linear infinite reverse, kite-wobble-b 5s ease-in-out infinite;
  }
  body.playing .kite-a { animation-duration: 19s, 4s; }
  body.playing .kite-b { animation-duration: 15s, 3.2s; }
}
@keyframes kite-drift { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes kite-wobble-a { 0%, 100% { rotate: -8deg; } 50% { rotate: 10deg; } }
@keyframes kite-wobble-b { 0%, 100% { rotate: 7deg; }  50% { rotate: -9deg; } }

/* kite tails ripple */
.kite-tail { animation: tail-flutter 1.13s linear infinite; }
@keyframes tail-flutter { to { stroke-dashoffset: -18; } }

/* launched kite (from the 🪁 button) */
.kite-launched { animation: launch 9s ease-in forwards; }
@keyframes launch {
  0%   { transform: translate(200px, 760px) rotate(-15deg) scale(0.9); opacity: 1; }
  60%  { transform: translate(820px, 260px) rotate(12deg)  scale(1); opacity: 1; }
  100% { transform: translate(1500px, 60px) rotate(20deg) scale(0.85); opacity: 0; }
}

/* The swing is a real pendulum driven frame-by-frame from app.js — no
   keyframes here, or the JS `rotate` would fight them. Grab it and throw. */
#swing {
  transform-box: fill-box;
  transform-origin: 50% 0;
  cursor: grab;
  touch-action: none;
}
#swing:active { cursor: grabbing; }
/* The ropes and seat are thin lines; this invisible rect over the kid is
   what people actually manage to grab. */
.rider-hit { pointer-events: all; }

/* the kid leans into the swing while music plays */
#rider { transform-box: fill-box; transform-origin: 50% 20%; cursor: pointer; }
/* Pumping a swing is legs-then-lean, not a rigid body tilt: the knees
   snap out at the front of the arc and tuck at the back. */
#swing.swinging #rider { animation: rider-lean 2.6s ease-in-out infinite; }
@keyframes rider-lean {
  0%, 100% { transform: rotate(9deg); }
  50%      { transform: rotate(-8deg); }
}
#swing.swinging .k-leg-l, #swing.swinging .k-leg-r,
#swing.swinging .k-shin-l, #swing.swinging .k-shin-r,
#swing.swinging .k-head {
  animation-duration: 2.6s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.3, 1);
  animation-iteration-count: infinite;
}
#swing.swinging .k-leg-l  { animation-name: pump-hip; }
#swing.swinging .k-leg-r  { animation-name: pump-hip; animation-delay: -0.07s; }
#swing.swinging .k-shin-l { animation-name: pump-knee; }
#swing.swinging .k-shin-r { animation-name: pump-knee; animation-delay: -0.07s; }
#swing.swinging .k-head   { animation-name: head-lag; }
@keyframes pump-hip  { 0%, 100% { rotate: -26deg; } 50% { rotate: 16deg; } }
@keyframes pump-knee { 0%, 100% { rotate: 2deg; }   50% { rotate: -38deg; } }
/* The head lags a beat behind the torso — follow-through. */
@keyframes head-lag  { 0%, 100% { rotate: -7deg; }  55% { rotate: 6deg; } }

/* Hair trails whatever the head just did. */
.k-hair { animation: hair-trail 2.9s ease-in-out infinite; }
@keyframes hair-trail { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }

/* Idle: the standing kids shift their weight rather than stand frozen. */
#kid-kite .kid, #kid-watch .kid {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: weight-shift 5.3s ease-in-out infinite;
}
#kid-watch .kid { animation-duration: 6.1s; animation-delay: -2s; }
@keyframes weight-shift {
  0%, 100% { transform: rotate(-1.2deg) translateY(0); }
  50%      { transform: rotate(1.2deg)  translateY(-1.5px); }
}
/* The waving arm: shoulder holds it up, the forearm does the waving. */
.k-wave-up { rotate: 6deg; }
.k-wave-fore { animation: wave-fore 1.47s ease-in-out infinite; }
@keyframes wave-fore { 0%, 100% { rotate: -20deg; } 50% { rotate: 22deg; } }

/* ── Swing him too hard: he falls off, walks back, climbs on ── */
#swing.empty #rider { opacity: 0; }

#faller {
  opacity: 0;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
#faller.falling {
  opacity: 1;
  animation: kid-fall 5.4s ease-in-out forwards;
}
/* Local y=330 is the foot of the bamboo poles, i.e. the ground. Sitting
   on the seat is (0,0); +60 puts his feet on that ground standing, and
   +98 lays him flat on it. */
@keyframes kid-fall {
  0%   { transform: translate(0, 0)        rotate(0deg); }
  8%   { transform: translate(46px, 22px)  rotate(42deg); }
  17%  { transform: translate(88px, 98px)  rotate(102deg); }
  30%  { transform: translate(88px, 98px)  rotate(102deg); }
  41%  { transform: translate(88px, 60px)  rotate(0deg); }
  81%  { transform: translate(0, 60px)     rotate(0deg); }
  96%  { transform: translate(0, 0)        rotate(0deg); }
  100% { transform: translate(0, 0)        rotate(0deg); }
}

/* ── Joints ──
   Every limb pivots about the top-centre of its own bounding box, which is
   exactly where its joint sits: shoulder, elbow, hip, knee. Because the
   shin group is nested inside the thigh group, rotating the thigh carries
   the shin with it and the knee bends on top of that. */
/* Pivots are stamped inline per joint (transform-box:view-box plus the
   joint's own coordinates) because `50% 0` of a bounding box is only the
   joint for a perfectly vertical limb — angle the limb and it drifts. */

/* Walk: hips swing, and each knee folds through its own swing phase. A
   knee that never bends is what made the old walk read as a puppet — a
   real leg cannot stay straight while it passes under the body. */
#faller.falling .k-leg-l, #faller.falling .k-leg-r,
#faller.falling .k-shin-l, #faller.falling .k-shin-r,
#faller.falling .k-arm-l, #faller.falling .k-arm-r,
#faller.falling .k-fore-l, #faller.falling .k-fore-r {
  animation-duration: 0.62s;
  animation-timing-function: ease-in-out;
  animation-delay: 2.2s;
  animation-iteration-count: 4;
}
#faller.falling .k-leg-l  { animation-name: hip-a; }
#faller.falling .k-leg-r  { animation-name: hip-b; }
#faller.falling .k-shin-l { animation-name: knee-a; }
#faller.falling .k-shin-r { animation-name: knee-b; }
#faller.falling .k-arm-r  { animation-name: hip-a; }
#faller.falling .k-arm-l  { animation-name: hip-b; }
#faller.falling .k-fore-r { animation-name: elbow-a; }
#faller.falling .k-fore-l { animation-name: elbow-b; }
/* Whole body rises and falls twice per stride, on the push-off. */
#faller.falling .kid {
  animation: walk-bob 0.31s ease-in-out 2.2s 8;
  transform-box: fill-box; transform-origin: 50% 100%;
}

@keyframes hip-a   { 0%, 100% { rotate: 27deg; }  50% { rotate: -22deg; } }
@keyframes hip-b   { 0%, 100% { rotate: -22deg; } 50% { rotate: 27deg; } }
/* Knees only fold backwards, and most of the fold happens mid-swing. */
@keyframes knee-a  { 0% { rotate: -3deg; } 30% { rotate: -46deg; } 55% { rotate: -12deg; } 100% { rotate: -3deg; } }
@keyframes knee-b  { 0% { rotate: -12deg; } 20% { rotate: -4deg; } 70% { rotate: -46deg; } 100% { rotate: -12deg; } }
@keyframes elbow-a { 0%, 100% { rotate: -18deg; } 50% { rotate: -42deg; } }
@keyframes elbow-b { 0%, 100% { rotate: -42deg; } 50% { rotate: -18deg; } }
@keyframes walk-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }

/* ── Sun ── */
.sun-glow { transform-box: fill-box; transform-origin: center; animation: sun-pulse 7.3s ease-in-out infinite; }
@keyframes sun-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.14); opacity: 0.75; }
}
#sun-rays { transform-box: fill-box; transform-origin: center; opacity: 0.55; animation: rays-spin 97s linear infinite; }
@keyframes rays-spin { to { transform: rotate(360deg); } }

/* ── Birds ── */
.flock { animation: fly-across 41s linear infinite; animation-delay: 4s; }
.flock-b { animation-duration: 59s; animation-delay: 18s; }
@keyframes fly-across {
  from { transform: translateX(0); }
  to   { transform: translateX(1620px); }
}
.bird { transform-box: fill-box; transform-origin: center; animation: flap 0.83s ease-in-out infinite; }
.bird:nth-child(2) { animation-delay: 0.15s; }
.bird:nth-child(3) { animation-delay: 0.3s; }
@keyframes flap {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.35); }
}

/* ── Chimney smoke ── */
.smoke {
  transform-box: fill-box; transform-origin: center;
  opacity: 0;
  animation: smoke-rise 6.7s ease-out infinite;
}
.smoke.s2 { animation-delay: -2.2s; }
.smoke.s3 { animation-delay: -4.5s; }
@keyframes smoke-rise {
  0%   { transform: translate(0, 0) scale(0.4); opacity: 0; }
  15%  { opacity: 0.55; }
  100% { transform: translate(16px, -72px) scale(1.7); opacity: 0; }
}

/* ── Wind ──
   Two animations per stem, and they compose rather than fight: one drives
   `transform` (the slow gust that bends everything over), the other drives
   the independent `rotate` property (a quick flutter). Sum of two periods
   that don't divide into each other means the motion never visibly loops.
   Gust delays are stamped inline from each stem's x, so a gust travels
   across the field left to right instead of hitting it all at once. */
.flower, .grass {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: gust-bend 11.3s cubic-bezier(0.36, 0, 0.25, 1) infinite,
             leaf-flutter 2.27s ease-in-out infinite;
}
@keyframes gust-bend {
  0%, 100% { transform: rotate(-1.5deg) skewX(0deg); }
  38%      { transform: rotate(10deg)   skewX(-3deg); }
  60%      { transform: rotate(6deg)    skewX(-1.5deg); }
}
@keyframes leaf-flutter {
  0%, 100% { rotate: -3deg; }
  50%      { rotate: 3deg; }
}
body.playing .flower, body.playing .grass {
  animation-duration: 6.7s, 1.31s;
}

/* ── Village life ── */
/* Prayer flags: each one snaps on its own inline-stamped delay, so the
   ripple travels along the rope instead of the whole line flapping. */
.flag {
  transform-box: fill-box; transform-origin: 50% 0;
  animation: flag-flutter 1.63s ease-in-out infinite,
             flag-gust 11.3s cubic-bezier(0.36, 0, 0.25, 1) infinite;
}
@keyframes flag-flutter {
  0%, 100% { transform: skewX(0deg)   scaleX(1); }
  35%      { transform: skewX(-13deg) scaleX(0.88); }
  70%      { transform: skewX(10deg)  scaleX(0.96); }
}
/* Same 11.3s clock as the grass, so the whole valley gusts together. */
@keyframes flag-gust {
  0%, 100% { rotate: 0deg; }
  38%      { rotate: 13deg; }
  60%      { rotate: 8deg; }
}

/* River: two ripple sheets at different speeds, plus glints that catch the
   sun. Water never moves at one speed, so neither does this. */
.current { animation: drift-water 9.3s linear infinite; }
.current-b { animation: drift-water 14.7s linear infinite reverse; }
@keyframes drift-water {
  from { transform: translateX(0); }
  to   { transform: translateX(112px); }
}
.glint { animation: glint 5.9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes glint {
  0%, 100% { opacity: 0; transform: scaleX(0.4); }
  8%       { opacity: 0.85; transform: scaleX(1); }
  22%      { opacity: 0; transform: scaleX(0.5); }
}

/* Cloud shadows crawl the hillside, slower than the clouds themselves
   because they're cast further away. */
.cshadow { animation: shadow-crawl 96s linear infinite; }
@keyframes shadow-crawl {
  from { transform: translateX(-260px); }
  to   { transform: translateX(1700px); }
}

#buffalo-head { transform-box: fill-box; transform-origin: 20% 60%; animation: graze 7.9s ease-in-out infinite; }
@keyframes graze { 0%, 62%, 100% { rotate: 0deg; } 78% { rotate: 15deg; } }
#buffalo-tail { transform-box: fill-box; transform-origin: 100% 0; animation: tail-swish 2.53s ease-in-out infinite; }
@keyframes tail-swish { 0%, 100% { rotate: -12deg; } 50% { rotate: 12deg; } }

.goat { transform-box: fill-box; transform-origin: 50% 100%; animation: goat-bob 3.29s ease-in-out infinite; }
@keyframes goat-bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-3px) rotate(-2deg); } }

/* .grass shares the wind rule with .flower above — no separate sway here,
   or it would override the layered gust/flutter pair. */

/* The kite flyer leans as his kite pulls. Rotating the rig about his hand
   keeps the string attached while the kite roams. */
#flown-kite {
  transform-box: fill-box;
  transform-origin: 0% 100%;   /* his raised hand, bottom-left of the rig */
  animation: kite-pull 8.3s ease-in-out infinite;
}
@keyframes kite-pull {
  0%, 100% { rotate: -2.6deg; }
  50%      { rotate: 2.8deg; }
}
/* The lean goes on the inner .kid, never on #kid-kite itself: that group
   is positioned by transform="translate(650,690)", and a CSS transform
   replaces the attribute rather than composing with it — which threw the
   whole child to the scene origin and off screen.
   It also uses `rotate`, so it layers over .kid's weight-shift transform
   instead of overwriting that too. */
#kid-kite .kid {
  animation-name: weight-shift, flyer-lean;
  animation-duration: 5.3s, 8.3s;
}
@keyframes flyer-lean {
  0%, 100% { rotate: -2deg; }
  50%      { rotate: 2.4deg; }
}
body.playing #flown-kite { animation-duration: 4.4s; }
body.playing #kid-kite .kid { animation-duration: 3.4s, 4.4s; }

/* ── Falling marigold petals ── */
#petals { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -24px;
  border-radius: 62% 38% 55% 45% / 48% 60% 40% 58%;
  background: radial-gradient(circle at 35% 35%, #fbbf24, #f59e0b 60%, #d97706);
  box-shadow: 0 0 4px rgba(217, 119, 6, 0.35);
  will-change: transform;
  animation: petal-fall var(--dur, 9s) linear forwards;
}
@keyframes petal-fall {
  0%   { transform: translate(0, -4vh) rotate(0deg); opacity: 1; }
  30%  { transform: translate(var(--sway, 50px), 28vh) rotate(150deg); }
  60%  { transform: translate(calc(var(--sway, 50px) * -0.6), 60vh) rotate(300deg); }
  95%  { opacity: 1; }
  100% { transform: translate(var(--sway, 50px), 106vh) rotate(460deg); opacity: 0; }
}

/* ── Hero type (oversized editorial) ── */
.hero-inner {
  position: absolute; left: clamp(16px, 5vw, 72px); bottom: clamp(90px, 16vh, 170px);
  z-index: 3;
  animation: pop-in 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.2s both;
}
@keyframes pop-in {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
}
.display {
  font-size: clamp(4.5rem, 17vw, 15rem);
  font-weight: 800; line-height: 0.82; letter-spacing: -0.02em;
  text-transform: none; user-select: none;
}
.display .fill {
  color: var(--cream);
  text-shadow: 0 4px 30px rgba(61, 43, 31, 0.45);
}
.display .outline {
  color: transparent;
  -webkit-text-stroke: 3px var(--cream);
  text-stroke: 3px var(--cream);
  filter: drop-shadow(0 4px 18px rgba(61, 43, 31, 0.35));
}
.tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.3rem); font-weight: 600;
  color: var(--cream); text-shadow: 0 2px 12px rgba(61, 43, 31, 0.6);
  margin-top: 14px;
}
.countdown {
  margin-top: 12px; display: inline-block;
  background: var(--tika); color: #fff;
  font-weight: 700; font-size: 0.9rem;
  padding: 5px 16px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.4);
}
.countdown:empty { display: none; }

.scroll-hint {
  position: absolute; right: clamp(16px, 4vw, 48px); bottom: 96px; z-index: 3;
  color: var(--cream); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.35em; text-transform: uppercase;
  writing-mode: vertical-rl;
  text-shadow: 0 2px 8px rgba(61, 43, 31, 0.6);
}
.scroll-hint span { display: inline-block; animation: hint-bob 1.6s ease-in-out infinite; }
@keyframes hint-bob { 50% { transform: translateY(7px); } }

/* ── Marquee ── */
.marquee {
  position: relative; z-index: 4;
  background: var(--tika); color: var(--cream);
  transform: rotate(-1.2deg) scale(1.02);
  margin: -26px 0 0; padding: 12px 0;
  box-shadow: 0 8px 26px rgba(61, 43, 31, 0.25);
  overflow: hidden; white-space: nowrap;
}
.marquee-track { display: inline-flex; animation: marquee 26s linear infinite; }
.marquee-track span { font-weight: 700; font-size: clamp(1rem, 2.4vw, 1.5rem); letter-spacing: 0.04em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Page sections ── */
.page-sec {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) clamp(18px, 5vw, 48px) clamp(40px, 7vh, 80px);
}
.sec-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 34px; }
.sec-num {
  font-weight: 800; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--marigold);
}
.sec-head h2 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; color: var(--tika); line-height: 1; }
.sec-head p { flex-basis: 100%; margin-top: 6px; font-size: 1.05rem; opacity: 0.7; }

/* songs — editorial rows */
#song-rows { list-style: none; border-top: 2px solid var(--ink); }
#song-rows li {
  display: flex; align-items: baseline; gap: clamp(12px, 3vw, 28px);
  padding: clamp(14px, 2.6vw, 24px) 8px;
  border-bottom: 2px solid var(--ink);
  cursor: pointer; position: relative; overflow: hidden;
  transition: color 0.25s;
}
#song-rows li::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--marigold);
  transform: translateY(101%); transition: transform 0.3s cubic-bezier(0.6, 0, 0.2, 1);
}
#song-rows li:hover::before, #song-rows li.active::before { transform: translateY(0); }
#song-rows li:hover, #song-rows li.active { color: #fff; }
#song-rows .row-num { font-weight: 800; font-size: 0.95rem; opacity: 0.55; min-width: 34px; }
#song-rows .row-title { font-weight: 800; font-size: clamp(1.25rem, 3.6vw, 2.2rem); line-height: 1.15; flex: 1; }
#song-rows .row-artist { font-size: 0.9rem; opacity: 0.65; white-space: nowrap; }
#song-rows .row-play { font-size: 1.1rem; opacity: 0; transition: opacity 0.2s; }
#song-rows li:hover .row-play, #song-rows li.active .row-play { opacity: 1; }

/* about cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(124, 74, 45, 0.2);
  border-radius: 22px; padding: 30px 26px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: 0 18px 44px rgba(61, 43, 31, 0.18);
  border-color: var(--marigold);
}
.card-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.card h3 { font-size: 1.4rem; font-weight: 800; color: var(--tika); margin-bottom: 8px; }
.card p { line-height: 1.65; opacity: 0.85; }

/* big countdown */
.big-days { display: flex; align-items: baseline; gap: 18px; }
#big-days-num {
  font-size: clamp(6rem, 24vw, 19rem); font-weight: 800; line-height: 0.9;
  color: transparent; -webkit-text-stroke: 4px var(--tika);
}
#big-days-label { font-size: clamp(1.5rem, 4vw, 3rem); font-weight: 800; color: var(--marigold); }
.dates-line { margin-top: 26px; font-size: 1.02rem; opacity: 0.75; line-height: 1.7; }
.dates-line strong { color: var(--tika); }

/* footer */
#site-footer {
  position: relative; z-index: 1;
  background: var(--ink); color: var(--cream);
  text-align: center; padding: 90px 20px 140px; margin-top: 60px;
}
.foot-big { font-size: clamp(2.4rem, 8vw, 6rem); font-weight: 800; line-height: 1; }
.foot-small { margin-top: 18px; opacity: 0.6; }
.foot-small a { color: var(--marigold); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(44px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* film grain */
#grain {
  position: fixed; inset: -100px; z-index: 80; pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-40px, 30px); }
  50% { transform: translate(30px, -45px); }
  75% { transform: translate(-25px, -20px); }
  100% { transform: translate(35px, 40px); }
}

/* ── Entry gate (curtain) ── */
#entry {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream);
  transition: transform 0.85s cubic-bezier(0.7, 0, 0.2, 1);
}
#entry.gone { transform: translateY(-100%); pointer-events: none; }
.entry-card {
  text-align: center;
  padding: 20px;
  max-width: 640px;
  animation: card-in 0.65s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(34px) scale(0.92); }
}
.entry-emoji { font-size: 3.4rem; display: inline-block; animation: emoji-bob 2.6s ease-in-out infinite; }
@keyframes emoji-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-9px) rotate(3deg); }
}
.entry-card h2 {
  font-size: clamp(3.4rem, 14vw, 8.5rem);
  font-weight: 800; line-height: 0.95; margin: 8px 0 14px; user-select: none;
}
.entry-card h2 .fill { color: var(--tika); }
.entry-card h2 .outline { color: transparent; -webkit-text-stroke: 3px var(--tika); }
.entry-card p { font-size: 1.05rem; margin-bottom: 26px; opacity: 0.8; }
.entry-marquee {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--ink); color: var(--cream);
  padding: 10px 0; overflow: hidden; white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem; font-weight: 700;
}
#enter-btn {
  font-family: inherit; font-size: 1.25rem; font-weight: 700;
  background: var(--tika); color: #fff;
  border: none; border-radius: 999px;
  padding: 14px 36px; cursor: pointer;
  box-shadow: 0 6px 0 #7f1d1d;
  transition: transform 0.1s, box-shadow 0.1s;
}
#enter-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #7f1d1d; }
#enter-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #7f1d1d; }
.entry-card small { display: block; margin-top: 14px; opacity: 0.6; }

/* ── Player bar ── */
#player-bar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 10;
  width: min(880px, calc(100vw - 28px));
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 247, 230, 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 3px solid var(--wood);
  border-radius: 20px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(61, 43, 31, 0.35);
  animation: rise-in 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) 0.4s both;
}
@keyframes rise-in {
  from { opacity: 0; transform: translateX(-50%) translateY(46px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.np { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1.2; }
.np-disc { font-size: 1.7rem; }
.np-disc.spin { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.np-text { min-width: 0; }
#np-title {
  font-weight: 700; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#np-artist { font-size: 0.8rem; opacity: 0.65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.controls { display: flex; align-items: center; gap: 8px; }
.controls button, .extras button {
  font-family: inherit; font-size: 1.05rem;
  background: none; border: 2px solid transparent; border-radius: 12px;
  cursor: pointer; padding: 6px 9px; color: var(--ink);
  transition: background 0.15s;
}
.controls button:hover, .extras button:hover { background: rgba(245, 158, 11, 0.25); }
.controls .big {
  background: var(--tika); color: #fff;
  font-size: 1.2rem; border-radius: 50%;
  width: 48px; height: 48px; padding: 0;
}
.controls .big:hover { background: #991b1b; }

.seek-wrap { display: flex; align-items: center; gap: 8px; flex: 2; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
#seekbar {
  flex: 1; height: 8px; border-radius: 999px;
  background: rgba(124, 74, 45, 0.25);
  cursor: pointer; overflow: hidden;
}
#seek-fill { height: 100%; width: 0%; background: var(--marigold); border-radius: 999px; }

.extras { display: flex; align-items: center; gap: 4px; }
#volume { width: 74px; accent-color: var(--tika); }

/* ── Playlist drawer ── */
#drawer {
  position: fixed; right: 18px; bottom: 104px; z-index: 9;
  width: min(360px, calc(100vw - 36px));
  max-height: min(430px, calc(100vh - 220px));
  overflow-y: auto;
  background: var(--card);
  border: 3px solid var(--wood);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(61, 43, 31, 0.35);
  transition: transform 0.25s, opacity 0.25s;
}
#drawer h3 { color: var(--tika); margin-bottom: 10px; }
#track-list { list-style: none; }
#track-list li {
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  display: flex; gap: 10px; align-items: baseline;
  transition: background 0.15s;
}
#track-list li:hover { background: rgba(245, 158, 11, 0.2); }
#track-list li.active { background: var(--marigold); color: #fff; }
#track-list li.active small { color: rgba(255,255,255,0.85); }
#track-list .num { font-size: 0.75rem; opacity: 0.6; min-width: 18px; }
#track-list .t { font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
#track-list small { display: block; font-size: 0.75rem; opacity: 0.65; }

/* ── TV ── */
#tv {
  position: fixed; left: 20px; bottom: 104px; z-index: 8;
  transition: transform 0.25s, opacity 0.25s;
}
.tv-frame {
  background: var(--wood);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(61, 43, 31, 0.4);
}
#yt-player, #yt-player iframe {
  width: min(320px, calc(100vw - 80px));
  height: 180px;
  border-radius: 8px; border: 0; display: block;
  background: #000;
}
.tv-legs { display: flex; justify-content: space-between; padding: 0 30px; }
.tv-legs span { width: 12px; height: 14px; background: var(--wood); border-radius: 0 0 6px 6px; }

.hidden-panel { opacity: 0; pointer-events: none; transform: translateY(16px); }

/* ── Toast ── */
#toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-80px);
  z-index: 60;
  background: var(--ink); color: var(--cream);
  padding: 10px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem;
  transition: transform 0.3s;
  max-width: calc(100vw - 40px);
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  #petals { display: none; }
}

/* ── Small screens ── */
@media (max-width: 720px) {
  /* The nav is already tight on phones; the footer still carries the count. */
  .live { display: none; }
  /* Five links no longer fit a 360px screen: let the row scroll sideways
     instead of wrapping or shrinking to unreadable. */
  .nav-links {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { font-size: 0.8rem; flex: none; }
  #nav-share { padding: 7px 12px; font-size: 0.75rem; }
  .scroll-hint { display: none; }
  .hero-inner { bottom: 120px; }
  #player-bar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; bottom: 10px; }
  .np { flex-basis: 100%; }
  .seek-wrap { order: 3; flex-basis: 100%; }
  .extras { margin-left: auto; }
  #volume { display: none; }
  #drawer { bottom: 150px; }
  #tv { left: 12px; bottom: 150px; }
}

/* ── Micro-life ──
   Long pauses with a very short close: a blink is ~120ms in a ~6s cycle,
   so it registers as alive without ever drawing attention. */
.blink {
  transform-box: fill-box; transform-origin: center;
  animation: blink 6.1s steps(1, end) infinite;
}
@keyframes blink {
  0%, 96%, 100% { transform: scaleY(1); }
  97.5%         { transform: scaleY(0.08); }
}
.breathe {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: breathe 4.3s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scaleY(1)     scaleX(1); }
  50%      { transform: scaleY(1.035) scaleX(0.99); }
}

/* ── Light grading ──
   A warm wash plus a soft vignette. Flat vector colour reads as clip-art;
   uneven light is most of what makes it read as a painting. */
#scene::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 85% at 72% 44%, rgba(255, 150, 70, 0.34), transparent 55%),
    radial-gradient(130% 110% at 50% 100%, transparent 52%, rgba(35, 22, 52, 0.44));
  mix-blend-mode: multiply;
  opacity: 0.85;
}
#scene::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: radial-gradient(85% 60% at 72% 44%, rgba(255, 170, 90, 0.5), transparent 62%);
  mix-blend-mode: screen;
  animation: daylight 23.7s ease-in-out infinite;
}
@keyframes daylight {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.9; }
}

/* ── The village grows with the audience ──
   Two houses and the temple always stand; each extra person online builds
   another. A transition rather than an animation, so a house can also
   settle back down when someone leaves.

   The wrapper carries no transform="" of its own — a CSS transform would
   replace it — so the positioning sits on an inner group. */
.village-house {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  opacity: 0;
  transform: scale(0.05) translateY(6px);
  transition: opacity 0.45s ease, transform 0.8s cubic-bezier(0.22, 1.4, 0.36, 1);
}
.village-house.built {
  opacity: 1;
  transform: none;
}

/* ── Animals ──
   Four two-segment legs each, so they can take weight rather than stand on
   rigid posts. The pairs are offset in time: an animal that shifts all four
   legs at once reads as a toy being jiggled. */
.an-hip-a, .an-hip-b, .an-hip-c, .an-hip-d,
.an-knee-a, .an-knee-b, .an-knee-c, .an-knee-d {
  animation-duration: 6.7s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.an-hip-a, .an-knee-c { animation-name: hoof-shift-a; }
.an-hip-b, .an-knee-d { animation-name: hoof-shift-b; animation-delay: -1.9s; }
.an-hip-c { animation-name: hoof-shift-b; animation-delay: -3.4s; }
.an-hip-d { animation-name: hoof-shift-a; animation-delay: -0.8s; }
.an-knee-a { animation-name: hoof-shift-b; animation-delay: -2.6s; }
.an-knee-b { animation-name: hoof-shift-a; animation-delay: -4.1s; }
@keyframes hoof-shift-a { 0%, 100% { rotate: -1.6deg; } 50% { rotate: 2.2deg; } }
@keyframes hoof-shift-b { 0%, 100% { rotate: 2deg; }    50% { rotate: -1.4deg; } }

.an-body {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: beast-breathe 5.1s ease-in-out infinite;
}
@keyframes beast-breathe {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50%      { transform: scaleY(1.028) scaleX(0.995); }
}
/* Ears flick — a quick twitch on a long timer, like the blink. */
.an-ear { animation: ear-flick 8.3s ease-in-out infinite; }
@keyframes ear-flick {
  0%, 88%, 100% { rotate: 0deg; }
  92%           { rotate: -22deg; }
  96%           { rotate: 6deg; }
}

/* Goats: heads down grazing most of the time, up to look around. */
.goat-head { animation: graze-dip 9.7s ease-in-out infinite; }
@keyframes graze-dip {
  0%, 22%   { rotate: 26deg; }
  40%, 62%  { rotate: 2deg; }
  80%, 100% { rotate: 26deg; }
}
.goat-tail { animation: goat-tail 2.9s ease-in-out infinite; }
@keyframes goat-tail { 0%, 100% { rotate: -14deg; } 50% { rotate: 16deg; } }
[class*="an-hip-g"], [class*="an-knee-g"] {
  animation: hoof-shift-a 7.3s ease-in-out infinite;
}
[class*="an-hip-g1b"], [class*="an-knee-g1c"] { animation-delay: -2.2s; }
[class*="an-hip-g2a"], [class*="an-knee-g2d"] { animation-delay: -4.6s; }

/* Birds rise and fall as they cross, instead of tracking a ruler. The
   independent `translate` property composes with fly-across's transform. */
.flock { animation: fly-across 41s linear infinite, flock-rise 9.4s ease-in-out infinite; }
.flock-b { animation-duration: 59s, 12.7s; }
@keyframes flock-rise {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -26px; }
}

/* ── Rive canvas ──
   Sits over the SVG scene and stays inert until a .riv actually loads;
   rive-scene.js is what un-hides it and turns pointer events back on. */
#rive-canvas {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}
#rive-canvas[hidden] { display: none; }
/* With Rive driving the ping, the SVG's own grab cursor would be a lie. */
body.rive-on #swing { cursor: default; }

/* ── Lite mode for phones ─────────────────────────────────────────────
   The hero animates ~175 SVG nodes on top of two full-layer Gaussian
   blurs, a grain layer repainting four times a second, backdrop-filter
   and a blend-mode wash. That is comfortable on a desktop GPU and
   punishing on a mid-range phone, so the costly effects come off and the
   ambient crowd thins. Nothing structural changes — the scene, the
   swing, the falling child and the growing village all stay. */
@media (pointer: coarse), (max-width: 720px) {
  /* Parallax is desktop-only anyway, so this promise just wastes memory. */
  .plx { will-change: auto; }

  /* Blurring two full-width layers is the single most expensive thing
     here. CSS beats the SVG presentation attribute. */
  .plx[filter] { filter: none; }

  /* Full-viewport repaints. */
  #grain { display: none; }
  #scene::before { animation: none; opacity: 0.7; }

  /* Smoke from the six distant houses: 18 animated nodes for detail
     nobody can resolve at this size. The near houses keep theirs. */
  .plx[data-depth="12"] .smoke { animation: none; }

  /* Flags keep the travelling gust and lose the per-flag flutter,
     halving the work across 26 elements. */
  .flag { animation-name: flag-gust; animation-duration: 11.3s; }

  /* Cheaper glass. */
  #topnav {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

/* Trees sway on the same 11.3s valley clock as the grass and the flags,
   with the canopy lagging the trunk. */
.tree {
  transform-box: view-box;
  animation: tree-sway 11.3s cubic-bezier(0.36, 0, 0.25, 1) infinite;
}
@keyframes tree-sway {
  0%, 100% { transform: rotate(-0.5deg) skewX(0deg); }
  38%      { transform: rotate(1.5deg)  skewX(-1.4deg); }
  60%      { transform: rotate(0.9deg)  skewX(-0.7deg); }
}

/* ── Dusk life ── */
.star {
  transform-box: fill-box; transform-origin: center;
  animation: twinkle 3.1s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 0.95; transform: scale(1.15); }
}

/* A flame gutters: fast, small, never symmetric. */
.flame {
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: gutter 0.83s ease-in-out infinite;
}
@keyframes gutter {
  0%, 100% { transform: scaleY(1)    skewX(0deg); }
  30%      { transform: scaleY(1.18) skewX(-4deg); }
  62%      { transform: scaleY(0.86) skewX(3deg); }
}
.flame-glow {
  transform-box: fill-box; transform-origin: center;
  animation: glow-pulse 2.3s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50%      { opacity: 0.55; transform: scale(1.15); }
}

/* Fireflies blink on one clock and wander on another, so no two ever
   repeat the same path-and-pulse together. */
.fly {
  animation: fly-blink 5.3s ease-in-out infinite, fly-drift 11.9s ease-in-out infinite;
}
@keyframes fly-blink {
  0%, 100% { opacity: 0; }
  12%, 26% { opacity: 0.9; }
  38%      { opacity: 0.1; }
  55%, 64% { opacity: 0.75; }
}
@keyframes fly-drift {
  0%, 100% { translate: 0 0; }
  30%      { translate: 26px -18px; }
  55%      { translate: -12px -30px; }
  80%      { translate: 14px -8px; }
}

@media (pointer: coarse), (max-width: 720px) {
  .fly { display: none; }
}

/* ── One kite per person online ──
   The pool waits invisible with its animations paused (a hidden kite
   still costing a composited layer per frame would be pure waste), and
   each fades up when the live count reaches its data-at. */
.viz-kite {
  offset-rotate: 0deg;
  animation-name: kite-drift, kite-wobble-a;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-play-state: paused, paused;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.viz-kite.flying { opacity: 1; animation-play-state: running, running; }
/* Without motion-path support they would all pile up at the origin. */
@supports not (offset-path: path("M0,0 L1,1")) { .viz-kite { display: none; } }

/* ── Time-of-day dressing ──
   sky.js re-stops the gradients; these rules handle what gradients can't:
   which props exist at that hour, and where the CSS light grade points. */
body[data-sky="day"] #stars, body[data-sky="dawn"] #stars { display: none; }
body[data-sky="day"] #moon { display: none; }
body[data-sky="day"] #flies, body[data-sky="dawn"] #flies { display: none; }
body[data-sky="day"] .flame, body[data-sky="day"] .flame-glow,
body[data-sky="dawn"] .flame, body[data-sky="dawn"] .flame-glow { display: none; }
body[data-sky="night"] #sun { display: none; }
body[data-sky="night"] #moon {
  transform-box: fill-box; transform-origin: center; transform: scale(1.5);
}
body[data-sky="night"] .star { animation-duration: 2.3s; }
/* Clouds read white at noon, blush at dawn, near-invisible at night. */
body[data-sky="day"] .cloud { fill: #ffffff; }
body[data-sky="dawn"] .cloud { fill: #ffe2d0; }
body[data-sky="night"] .cloud { fill: #3a4468; }
/* The horizon glow band only makes sense with the sun near the horizon. */
body[data-sky="day"] #sun > ellipse { display: none; }
body[data-sky="night"] #cloud-shadows, body[data-sky="dusk"] #cloud-shadows { opacity: 0.4; }
/* The grade follows the light source. */
body[data-sky="day"] #scene::after {
  background:
    radial-gradient(120% 85% at 82% 12%, rgba(255, 226, 150, 0.24), transparent 55%),
    radial-gradient(130% 110% at 50% 100%, transparent 55%, rgba(61, 43, 31, 0.26));
}
body[data-sky="day"] #scene::before {
  background: radial-gradient(90% 60% at 84% 14%, rgba(255, 240, 190, 0.38), transparent 60%);
}
body[data-sky="dawn"] #scene::after {
  background:
    radial-gradient(120% 85% at 22% 40%, rgba(255, 190, 130, 0.3), transparent 55%),
    radial-gradient(130% 110% at 50% 100%, transparent 55%, rgba(70, 50, 80, 0.3));
}
body[data-sky="dawn"] #scene::before {
  background: radial-gradient(85% 60% at 22% 44%, rgba(255, 210, 150, 0.45), transparent 62%);
}
body[data-sky="night"] #scene::after {
  background:
    radial-gradient(90% 70% at 14% 12%, rgba(200, 214, 255, 0.14), transparent 55%),
    radial-gradient(130% 110% at 50% 100%, transparent 45%, rgba(8, 10, 26, 0.55));
}
body[data-sky="night"] #scene::before {
  background: radial-gradient(70% 50% at 14% 12%, rgba(210, 222, 255, 0.22), transparent 60%);
}

/* ── Wish wall ── */
#wish-sky {
  position: absolute; inset: 0; z-index: 2;
  overflow: hidden; pointer-events: none;
}
.wish-float {
  position: absolute; left: 100%;
  display: flex; align-items: center; gap: 7px;
  max-width: 340px;
  background: rgba(20, 16, 38, 0.55);
  color: var(--cream);
  border: 1px solid rgba(255, 226, 184, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  backdrop-filter: blur(4px);
  animation: wish-fly var(--dur, 26s) linear forwards;
}
.wish-float small { opacity: 0.65; font-weight: 400; }
@keyframes wish-fly {
  to { transform: translateX(calc(-100vw - 100%)); }
}

#wish-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
#wish-form input {
  font-family: inherit; font-size: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(124, 74, 45, 0.3);
  border-radius: 12px; padding: 11px 16px;
  color: var(--ink); min-width: 0;
}
#wish-form input:focus { outline: none; border-color: var(--marigold); }
#wish-name { flex: 1 1 150px; }
#wish-text { flex: 3 1 280px; }
#wish-form button {
  font-family: inherit; font-size: 1rem; font-weight: 700;
  background: var(--tika); color: #fff;
  border: none; border-radius: 12px; padding: 11px 22px; cursor: pointer;
  transition: transform 0.12s, background 0.15s;
}
#wish-form button:hover { background: #991b1b; transform: translateY(-1px); }
#wish-form button:disabled { opacity: 0.55; cursor: wait; }

#wish-list { list-style: none; display: grid; gap: 8px; }
#wish-list li {
  display: flex; gap: 10px; align-items: baseline;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(124, 74, 45, 0.18);
  border-radius: 12px; padding: 9px 14px;
}
#wish-list .w-kite { flex: none; }
#wish-list .w-text { font-weight: 600; }
#wish-list .w-name { margin-left: auto; font-size: 0.8rem; opacity: 0.6; white-space: nowrap; }

@media (pointer: coarse), (max-width: 720px) {
  .wish-float { font-size: 0.78rem; max-width: 240px; }
}

/* ── Card maker ── */
.card-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
#card-name {
  font-family: inherit; font-size: 1rem;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(124, 74, 45, 0.3);
  border-radius: 12px; padding: 11px 16px;
  color: var(--ink); flex: 1 1 200px; min-width: 0;
}
#card-name:focus { outline: none; border-color: var(--marigold); }
.card-check { display: inline-flex; gap: 7px; align-items: center; font-weight: 600; font-size: 0.92rem; }
.card-check input { accent-color: var(--tika); width: 17px; height: 17px; }
#card-download, #card-share {
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  border: none; border-radius: 12px; padding: 11px 20px; cursor: pointer;
  transition: transform 0.12s;
}
#card-download { background: var(--tika); color: #fff; }
#card-share { background: var(--ink); color: var(--cream); }
#card-download:hover, #card-share:hover { transform: translateY(-1px); }
#card-canvas {
  width: 100%; height: auto; display: block;
  border-radius: 18px;
  box-shadow: 0 16px 44px rgba(35, 22, 52, 0.35);
}

@media (max-width: 720px) {
  #wish-form button { flex: 1 1 100%; }
  .card-controls { gap: 8px; }
  #card-download, #card-share { flex: 1 1 40%; }
  .sec-head p { font-size: 0.95rem; }
}

/* ── Footer share nudge ── */
.foot-notice { margin-top: 26px; font-size: 1.05rem; opacity: 0.85; }
#foot-share {
  font-family: inherit; font-size: 1.05rem; font-weight: 700;
  margin-top: 14px;
  background: var(--marigold); color: #3d2b1f;
  border: none; border-radius: 999px; padding: 13px 30px; cursor: pointer;
  box-shadow: 0 5px 0 #b45309;
  transition: transform 0.1s, box-shadow 0.1s;
}
#foot-share:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #b45309; }
#foot-share:active { transform: translateY(3px); box-shadow: 0 2px 0 #b45309; }
