:root {
  --cream: #fff8f1;
  --paper: #fffdf9;
  --ink: #5a4636;
  --ink-soft: #8a7462;
  --pink: #f8c6d6;
  --pink-deep: #ee8fb0;
  --lav: #d8cbf6;
  --lav-deep: #9f8be0;
  --sky: #c3e4f8;
  --mint: #cdeedb;
  --butter: #ffe8a6;
  --peach: #ffd6bf;
  --night: #2b2552;
  --night-2: #463c86;

  --radius: 28px;
  --shadow: 0 18px 50px -20px rgba(110, 80, 140, 0.35);
  --shadow-soft: 0 8px 26px -12px rgba(110, 80, 140, 0.3);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --f-display: "Fredoka", "Zen Maru Gothic", system-ui, sans-serif;
  --f-body: "Zen Maru Gothic", "Fredoka", system-ui, sans-serif;
  --f-kana: "Mochiy Pop One", "Zen Maru Gothic", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }

.eyebrow {
  font-family: var(--f-display);
  text-transform: lowercase;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--lav-deep);
  margin: 0 0 0.6rem;
}
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 56ch; }
.kana { font-family: var(--f-kana); margin: 0; color: var(--pink-deep); letter-spacing: 0.25em; }
.hl {
  background: linear-gradient(transparent 60%, var(--butter) 60%);
  padding: 0 0.15em;
  border-radius: 4px;
}

/* ---------- sky canvas (confetti, sparkles) ---------- */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 60;
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.95em 1.6em;
  border-radius: 999px;
  background: var(--bg);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12), var(--shadow-soft);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out);
}
.btn:hover { transform: translateY(-3px) rotate(-1.5deg); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
:focus-visible { outline: 3px solid var(--lav-deep); outline-offset: 3px; border-radius: 12px; }

/* ---------- nav ----------
   Sits on top of the hero and scrolls away with it. Styled like the title. */
.nav {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  z-index: 50;
  width: min(1160px, 100% - 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 22px 0;
}
.brand,
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-family: var(--f-display);
  text-shadow:
    0 2px 0 rgba(179, 160, 230, 0.75),
    0 6px 16px rgba(120, 90, 180, 0.4);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  perspective: 300px;
}
/* same lazy rock-and-float as the token coin, scaled down */
.brand img {
  --lift: 4px;
  width: 42px;
  height: 42px;
  animation: coin-float 6s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(120, 90, 180, 0.35));
}
.nav-links { display: flex; gap: clamp(0.6rem, 2vw, 1.8rem); }
.nav-links a {
  position: relative;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.3em 0.1em;
  transition: transform 0.3s var(--ease-spring);
}
/* a little pastel squiggle that draws in on hover */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='6' viewBox='0 0 16 6'%3E%3Cpath d='M0 3 Q4 0 8 3 T16 3' fill='none' stroke='%23f8c6d6' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.4s var(--ease-out);
}
.nav-links a:hover { transform: translateY(-2px); }
.nav-links a:hover::after,
.nav-links a:focus-visible::after { clip-path: inset(0 0 0 0); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: start center;
  overflow-x: clip;
  isolation: isolate;
}
/* the art runs past the hero and dissolves into the page, so there is no seam */
.hero-art {
  position: absolute;
  inset: 0 0 -16% 0;
  z-index: -1;
  background: linear-gradient(#bfe0fb, #f7d3e5);
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 100%;
}
.hero-copy {
  text-align: center;
  padding: clamp(88px, 12vh, 140px) 16px 0;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}
.title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.4rem, min(12vw, 17vh), 9rem);
  line-height: 0.95;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 0 #c7b6ef,
    0 5px 0 #b3a0e6,
    0 14px 30px rgba(120, 90, 180, 0.45);
  display: flex;
}
.title span {
  display: inline-block;
  animation: droop 4.8s var(--ease-out) infinite;
  animation-delay: calc(var(--i) * 0.12s);
  transform-origin: 50% 100%;
}
.tagline {
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
  font-weight: 700;
  margin: 0.4rem 0 1rem;
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.9);
}
.tagline em { color: var(--lav-deep); font-style: normal; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }

.ca-pill {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px dashed rgba(90, 70, 54, 0.35);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  max-width: 100%;
  transition: transform 0.25s var(--ease-spring);
}
.ca-pill:hover { transform: scale(1.03); }
.ca-label {
  background: var(--lav);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-family: var(--f-display);
  font-weight: 600;
}
.ca-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ca-copy {
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.75rem;
  font-family: var(--f-display);
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  translate: -50% 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--f-display);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.scroll-hint i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  position: relative;
  animation: lazy-roll 3.4s ease-in-out infinite;
}
.scroll-hint i::before,
.scroll-hint i::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.scroll-hint i::before { left: 4px; }
.scroll-hint i::after { right: 4px; }

/* ---------- meet ---------- */
.meet { padding: clamp(70px, 10vw, 130px) 0; position: relative; overflow-x: clip; }
.meet-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
}
.meet-stage { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.halo {
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--pink), transparent 55%),
    radial-gradient(circle at 70% 40%, var(--sky), transparent 55%),
    radial-gradient(circle at 50% 75%, var(--butter), transparent 60%),
    var(--lav);
  filter: blur(6px);
  opacity: 0.85;
  animation: halo 14s linear infinite;
}
.meet-panda {
  position: relative;
  width: 78%;
  animation: breathe 4.2s ease-in-out infinite;
  transform-origin: 50% 90%;
  cursor: pointer;
  filter: drop-shadow(0 14px 18px rgba(90, 60, 120, 0.22));
}
.meet-panda.is-squished { animation: squish 0.7s var(--ease-spring); }
.mochi-shadow {
  position: absolute;
  bottom: 18%;
  width: 60%;
  height: 7%;
  border-radius: 50%;
  background: rgba(90, 60, 120, 0.15);
  filter: blur(8px);
}
.meet-copy h2 { margin-bottom: 1.1rem; }
.facts {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.facts li {
  background: var(--paper);
  border-radius: 22px;
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
  transition: transform 0.35s var(--ease-spring);
}
.facts li:nth-child(1) { background: #fdeef3; }
.facts li:nth-child(2) { background: #eef6fd; }
.facts li:nth-child(3) { background: #fff6dc; }
.facts li:nth-child(4) { background: #eefaf2; }
.facts li:hover { transform: translateY(-4px) rotate(-1deg); }
.facts b { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; }
.facts span { color: var(--ink-soft); font-size: 0.95rem; }
.roll-meter {
  font-size: 0.98rem;
  color: var(--ink-soft);
  padding: 12px 16px;
  border-radius: 18px;
  border: 1.5px dashed var(--lav);
  display: inline-block;
}
.roll-meter b { font-family: ui-monospace, Menlo, monospace; color: var(--ink); }

/* ---------- explore / map ---------- */
.explore {
  padding: clamp(60px, 9vw, 110px) 0 40px;
}
.section-head { text-align: center; display: grid; justify-items: center; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .lede { margin: 0.8rem 0 0; }

/* a second sky, like the hero's, that fades in and out so there is no seam */
.explore { isolation: isolate; padding-top: clamp(90px, 12vw, 160px); }
.town-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 22%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(#bfe0fb, #d8d0f6 45%, #f7d3e5 80%, #fde9da);
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 16%, #000 70%, transparent);
}
/* slow sun rays behind the title */
.town-rays {
  position: absolute;
  left: 50%;
  top: 24%;
  width: max(1400px, 140vw);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.55) 0deg 7deg, transparent 7deg 18deg);
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent 70%);
  mask-image: radial-gradient(closest-side, #000, transparent 70%);
  animation: halo 90s linear infinite;
}
.cloud {
  position: absolute;
  top: var(--y);
  left: 0;
  width: var(--w);
  aspect-ratio: 2.4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 50'%3E%3Cpath fill='%23fff' d='M18 48a16 16 0 0 1-2-32 20 20 0 0 1 37-8 18 18 0 0 1 31 4 14 14 0 0 1 22 10 13 13 0 0 1-2 26z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 6px 10px rgba(140, 120, 200, 0.18));
  opacity: 0.95;
  animation: cloud-drift var(--t) linear infinite;
  animation-delay: var(--d);
}
.balloon {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(26px, 3vw, 40px);
  aspect-ratio: 0.82;
  border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.85) 0 12%, transparent 13%), var(--c);
  rotate: var(--r, 0deg);
  animation: balloon-bob var(--t) ease-in-out infinite;
  box-shadow: inset -4px -6px 0 rgba(0, 0, 0, 0.08);
}
.balloon::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1.5px;
  height: 260%;
  background: linear-gradient(rgba(255, 255, 255, 0.95), transparent);
}

.tate-town {
  top: clamp(80px, 9vw, 140px);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  background: none;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 18px rgba(170, 140, 230, 0.6);
  opacity: 1;
}
.town-eyebrow {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  padding: 0.35em 1.1em;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.town-title { display: grid; justify-items: center; margin: 0.2rem 0 0.4rem; }
.town-welcome {
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  font-weight: 600;
  color: var(--pink-deep);
  background: #fff;
  padding: 0.15em 0.9em 0.25em;
  border-radius: 999px;
  rotate: -4deg;
  box-shadow: 0 4px 0 var(--pink), var(--shadow-soft);
  position: relative;
  z-index: 1;
  margin-bottom: -0.35em;
}
.town-name {
  display: flex;
  font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 8rem);
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 0 #c7b6ef,
    0 5px 0 #b3a0e6,
    0 14px 30px rgba(120, 90, 180, 0.45);
}
.town-name span {
  display: inline-block;
  animation: droop 4.8s var(--ease-out) infinite;
  animation-delay: calc(var(--i) * 0.12s + 0.6s);
  transform-origin: 50% 100%;
}
.town-name .sp { width: 0.28em; }
.town-lede {
  margin: 0.6rem 0 0;
  padding: 0.7em 1.6em;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  font-size: clamp(1rem, 1.9vw, 1.2rem);
  font-weight: 700;
  line-height: 1.55;
  max-width: 100%;
}
.spark-chip {
  display: inline-block;
  background: var(--pink);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 0.6em;
  box-shadow: 0 3px 0 var(--pink-deep);
  rotate: -2deg;
}
.spark-chip i {
  display: inline-block;
  font-style: normal;
  color: #fff;
  animation: twinkle 2.4s ease-in-out infinite;
}

/* rainbow ring around the map, with a sticker on the corner */
.map-frame {
  position: relative;
  z-index: 1;
  width: min(1320px, 100% - 32px);
  margin-inline: auto;
  padding: 6px;
  border-radius: clamp(28px, 3.4vw, 46px);
  background: linear-gradient(110deg, var(--pink), var(--butter), var(--mint), var(--sky), var(--lav), var(--pink));
  background-size: 200% 100%;
  box-shadow: var(--shadow), 0 0 60px -10px rgba(255, 255, 255, 0.9);
  animation: rainbow-slide 10s linear infinite;
}
.map-sticker {
  position: absolute;
  top: -24px;
  left: clamp(14px, 3vw, 40px);
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  width: clamp(70px, 8vw, 92px);
  aspect-ratio: 1;
  border-radius: 50% 50% 46% 54% / 60% 55% 45% 40%;
  background: var(--butter);
  box-shadow: 0 5px 0 #e6c464, var(--shadow-soft);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  line-height: 1.1;
  text-align: center;
  rotate: -10deg;
  animation: sfx-bob 4s ease-in-out infinite;
}
.map-sticker b { font-family: var(--f-kana); font-weight: 400; font-size: 1.35em; color: var(--pink-deep); display: block; }
.map-scroller {
  width: 100%;
  border-radius: clamp(22px, 3vw, 40px);
  overflow: auto;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
  scrollbar-width: none;
  cursor: grab;
  overscroll-behavior-x: contain;
}
.map-scroller::-webkit-scrollbar { display: none; }
.map-scroller.is-dragging { cursor: grabbing; }
.map { position: relative; min-width: 900px; user-select: none; }
.map img { width: 100%; pointer-events: none; -webkit-user-drag: none; }
.map-hint {
  display: none;
  text-align: center;
  font-family: var(--f-display);
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 12px 0 0;
}

.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: radial-gradient(circle, #fff 0 30%, rgba(255, 255, 255, 0.6) 31% 55%, transparent 56%);
  display: grid;
  place-items: center;
}
.hotspot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #fff;
  animation: ping 2.4s var(--ease-out) infinite;
  animation-delay: var(--d, 0s);
}
.hotspot svg { width: 22px; height: 22px; fill: var(--pink-deep); animation: twinkle 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.hotspot.is-tare { width: 60px; height: 60px; }
.hotspot.is-tare svg { width: 28px; height: 28px; fill: var(--lav-deep); }
.hotspot-label {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 4px;
  white-space: nowrap;
  background: #fff;
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.3s var(--ease-spring);
}
.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label { opacity: 1; translate: -50% 0; }

/* ---------- friends ---------- */
.friends { padding: clamp(70px, 9vw, 120px) 0; }
.friend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.friend-card {
  --tint: var(--pink);
  position: relative;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #fff, var(--tint));
  padding: 18px 18px 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.45s var(--ease-spring), box-shadow 0.3s var(--ease-out);
  overflow: hidden;
}
.friend-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.7) 45%, transparent 60%);
  translate: -120% 0;
  transition: translate 0.8s var(--ease-out);
  pointer-events: none;
}
.friend-card:hover { transform: translateY(-8px) rotate(var(--tilt, -1.2deg)); box-shadow: var(--shadow); }
.friend-card:hover::after { translate: 120% 0; }
.friend-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  transition: transform 0.6s var(--ease-spring);
}
.friend-card:hover img { transform: scale(1.06) translateY(-4px); }
.friend-card h3 { margin-top: 8px; }
.friend-card p { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.friend-card .kana { font-size: 0.75rem; letter-spacing: 0.1em; }

/* ---------- dialog ---------- */
.friend-dialog {
  border: 0;
  padding: 0;
  width: min(820px, 100% - 32px);
  border-radius: 34px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(60, 40, 100, 0.5);
  overflow: hidden;
}
.friend-dialog[open] { display: grid; grid-template-columns: 1fr 1fr; animation: pop-in 0.5s var(--ease-spring); }
.friend-dialog::backdrop { background: rgba(70, 50, 110, 0.35); backdrop-filter: blur(6px); }
.fd-art {
  background: radial-gradient(circle at 50% 40%, #fff, var(--fd-tint, var(--pink)));
  display: grid;
  place-items: center;
  padding: 24px;
}
.fd-art img { width: 100%; animation: breathe 4.2s ease-in-out infinite; }
.fd-body { padding: 36px 32px; align-self: center; }
.fd-body h3 { font-size: 2rem; margin-bottom: 0.6rem; }
.fd-body p { margin: 0 0 0.8rem; }
.fd-tare {
  background: #f3effd;
  border-radius: 18px;
  padding: 12px 16px;
  font-size: 0.95rem;
}
.fd-tare::before { content: "Tarepanda says: "; font-weight: 700; }
.fd-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  z-index: 2;
}

/* ---------- token ---------- */
.token {
  padding: clamp(70px, 9vw, 120px) 0;
}
.token-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.coin-stage { perspective: 900px; display: grid; justify-items: center; }
.coin {
  width: min(380px, 80vw);
  aspect-ratio: 1;
  position: relative;
  transform-style: preserve-3d;
  animation: coin-float 6s ease-in-out infinite;
}
.coin-face { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; filter: drop-shadow(0 10px 20px rgba(200, 150, 60, 0.35)); }
.coin-back { transform: rotateY(180deg); }
.coin-shadow {
  width: 50%;
  height: 22px;
  margin-top: 18px;
  border-radius: 50%;
  background: rgba(120, 90, 40, 0.18);
  filter: blur(8px);
  animation: shadow-pulse 6s ease-in-out infinite;
}
.stats {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.stat {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 22px;
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
}
.stat-k { font-size: 0.85rem; color: var(--ink-soft); }
.stat-v { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; overflow-wrap: anywhere; }

/* ---------- buy ---------- */
.buy { padding: clamp(70px, 9vw, 120px) 0 clamp(90px, 10vw, 140px); }
.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.step {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 46px 22px 24px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease-spring);
}
.step:nth-child(even) { translate: 0 22px; }
.step:hover { transform: translateY(-6px); }
.step p { color: var(--ink-soft); font-size: 0.95rem; margin: 0.5rem 0 0; }
.step-n {
  position: absolute;
  top: -22px;
  left: 22px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.4rem;
  background: var(--lav);
  border-radius: 50% 50% 46% 54% / 60% 55% 45% 40%;
  box-shadow: 0 4px 0 var(--lav-deep);
}
.step:nth-child(2) .step-n { background: var(--pink); box-shadow: 0 4px 0 var(--pink-deep); }
.step:nth-child(3) .step-n { background: var(--sky); box-shadow: 0 4px 0 #84bde3; }
.step:nth-child(4) .step-n { background: var(--butter); box-shadow: 0 4px 0 #e6c464; }
.link-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 70px; }

/* ---------- night footer ---------- */
.night { color: #f4eeff; }
.night-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(680px, 66vw);
  padding-top: clamp(150px, 15vw, 240px);
}
.night-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-mask-image: linear-gradient(transparent, rgba(0, 0, 0, 0.35) 14%, #000 32%);
  mask-image: linear-gradient(transparent, rgba(0, 0, 0, 0.35) 14%, #000 32%);
}
.night-sky img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.night-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 82%, var(--night));
}
.night-copy { text-align: center; display: grid; justify-items: center; gap: 0.4rem; }
.night .lede { color: #e6defc; margin: 0.4rem 0 0; }
.kana-light { color: #ffd6ea; }
.night h2 { text-shadow: 0 4px 30px rgba(170, 140, 255, 0.6); }
.night-base { padding: 10px 0 48px; display: grid; justify-items: center; background: var(--night); width: 100%; }
.disclaimer {
  margin: 0;
  max-width: 70ch;
  text-align: center;
  font-size: 0.8rem;
  color: #bdb2e6;
  line-height: 1.6;
}

/* ---------- page glows ----------
   Soft colour circles that fade to nothing on every side. Sections have no
   backgrounds, so the glows drift across section borders without a seam. */
.glow {
  position: absolute;
  z-index: -1;
  width: clamp(380px, var(--s, 60vw), 1100px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--c), transparent);
  pointer-events: none;
}
.g-pink { --c: rgba(248, 198, 214, 0.55); }
.g-lav { --c: rgba(216, 203, 246, 0.55); }
.g-sky { --c: rgba(195, 228, 248, 0.6); }
.g-mint { --c: rgba(205, 238, 219, 0.6); }
.g-butter { --c: rgba(255, 232, 166, 0.55); }
.g-peach { --c: rgba(255, 214, 191, 0.5); }

/* ---------- japanese lettering ---------- */
[lang="ja"] { font-feature-settings: "palt"; }
.explore, .friends, .token, .buy { position: relative; overflow-x: clip; }
.eyebrow .jp {
  font-family: var(--f-kana);
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--pink-deep);
  margin-right: 0.7em;
  padding-right: 0.7em;
  border-right: 1.5px solid currentColor;
}
/* tategaki: large, pale vertical phrases in the margins */
.tate {
  position: absolute;
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--f-kana);
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  letter-spacing: 0.32em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  color: transparent;
  background: linear-gradient(var(--pink), var(--lav) 55%, var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0.75;
}
.tate-side { top: clamp(60px, 8vw, 110px); }
.tate-l { left: max(14px, calc((100vw - 1160px) / 2 - 64px)); }
.tate-r { right: max(14px, calc((100vw - 1160px) / 2 - 64px)); }
.tate-hero-l, .tate-hero-r {
  top: 22vh;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  background: none;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 18px rgba(170, 140, 230, 0.55);
  opacity: 1;
}
.tate-hero-l { left: clamp(18px, 6vw, 110px); }
.tate-hero-r { right: clamp(18px, 6vw, 110px); top: 30vh; }
.meet-grid, .section-head, .friend-grid, .token-grid, .steps, .link-row, .map-scroller { position: relative; z-index: 1; }

/* sound-effect words floating beside characters */
.sfx {
  position: absolute;
  font-family: var(--f-kana);
  pointer-events: none;
  user-select: none;
  z-index: 2;
  letter-spacing: 0.06em;
  -webkit-text-stroke: 5px #fff;
  paint-order: stroke fill;
}
.sfx-peta {
  top: 16%;
  right: 4%;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  color: var(--pink-deep);
  rotate: 10deg;
  opacity: 0.85;
  animation: sfx-bob 4.2s ease-in-out infinite;
}
.sfx-suya {
  left: 64%;
  top: 54%;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  color: #e9e1ff;
  -webkit-text-stroke: 0;
  text-shadow: 0 0 14px rgba(200, 180, 255, 0.9);
  rotate: -8deg;
  animation: sfx-bob 5s ease-in-out infinite;
}
.step-jp {
  font-family: var(--f-kana);
  font-size: 0.78rem !important;
  letter-spacing: 0.12em;
  color: var(--lav-deep) !important;
  margin: 0.25rem 0 0 !important;
}
.stat-k .jp { font-family: var(--f-kana); font-size: 0.72rem; color: var(--pink-deep); margin-left: 0.4em; letter-spacing: 0.08em; }
.mata {
  font-family: var(--f-kana);
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  color: #ffd6ea;
  margin: 0 0 1rem;
}
.mata [lang="en"] { font-family: var(--f-display); font-size: 0.8rem; letter-spacing: 0.08em; color: #bdb2e6; margin-left: 0.6em; }
@keyframes sfx-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (max-width: 900px) {
  .tate-side { display: none; }
  .tate-hero-l, .tate-hero-r, .tate-town { display: none; }
}

/* ---------- lazy follower ---------- */
.follower {
  position: fixed;
  left: 0;
  bottom: 10px;
  width: 74px;
  z-index: 55;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 6px 6px rgba(80, 60, 120, 0.25));
  opacity: 0;
  transition: opacity 0.6s;
}
.follower.is-on { opacity: 1; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  translate: -50% 140%;
  background: var(--ink);
  color: #fff;
  font-family: var(--f-display);
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transition: translate 0.45s var(--ease-spring), opacity 0.3s, visibility 0s 0.45s;
  box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.is-on { translate: -50% 0; opacity: 1; visibility: visible; transition: translate 0.45s var(--ease-spring), opacity 0.2s; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- keyframes ---------- */
@keyframes droop {
  0%, 62%, 100% { transform: none; }
  70% { transform: scaleY(0.82) scaleX(1.08) translateY(4px); }
  80% { transform: scaleY(1.04) scaleX(0.98); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50% { transform: scale(1.025, 0.975) translateY(2px); }
}
@keyframes squish {
  0% { transform: scale(1); }
  30% { transform: scale(1.18, 0.78); }
  60% { transform: scale(0.94, 1.08); }
  100% { transform: scale(1); }
}
@keyframes halo { to { rotate: 360deg; } }
@keyframes lazy-roll {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(8px) rotate(180deg); }
}
@keyframes ping {
  0% { transform: scale(0.7); opacity: 0.9; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.25) rotate(20deg); }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes coin-float {
  0%, 100% { transform: translateY(0) rotateY(-18deg); }
  50% { transform: translateY(calc(var(--lift, 16px) * -1)) rotateY(18deg); }
}
@keyframes cloud-drift {
  from { transform: translateX(-30vw); }
  to { transform: translateX(110vw); }
}
@keyframes balloon-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
}
@keyframes rainbow-slide { to { background-position: 200% 0; } }
@keyframes shadow-pulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.8); opacity: 0.6; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { flex-direction: column; gap: 0.4rem; padding-top: 16px; }
  .nav-links { flex-wrap: wrap; justify-content: center; gap: 0.2rem 1rem; }
  .nav-links a { font-size: 0.95rem; }
  .meet-grid, .token-grid { grid-template-columns: 1fr; }
  .meet-stage { max-width: 440px; margin-inline: auto; width: 100%; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .map-hint { display: block; }
}
@media (max-width: 700px) and (orientation: portrait) {
  /* show the whole scene at the bottom instead of a huge crop */
  .scroll-hint { display: none; }
  .hero-art { inset: 0 0 -12% 0; background: linear-gradient(#a9cff6 0%, #c9c6f3 45%, #f3cfe4 75%); }
  .hero-img {
    position: absolute;
    bottom: 0;
    left: -45%;
    width: 190%;
    max-width: none;
    height: auto;
    object-fit: initial;
    -webkit-mask-image: linear-gradient(transparent, #000 30%);
    mask-image: linear-gradient(transparent, #000 30%);
  }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .step:nth-child(even) { translate: none; }
  .friend-dialog[open] { display: block; max-height: calc(100svh - 32px); overflow: auto; }
  .fd-body { padding: 8px 22px 26px; }
  .fd-art { padding: 20px 36px 14px; }
  .facts b { font-size: 1.25rem; }
  .follower { width: 56px; }
  .hero-copy { padding-top: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
