/* Quirkymals: sticker-book island.
   Palette is pulled from the logo: glossy lagoon blue "Quirky", neon sunset "Mals". */
:root {
  --lagoon: #1e7fd8;
  --lagoon-deep: #0f5fb0;
  --ink: #0e3566;
  --shallows: #8fe3f0;
  --sky: #cdf3fb;
  --foam: #f4fcff;
  --sunset: #ff8a2a;
  --ember: #e2552e;
  --sand: #ffe3b3;
  --white: #fff;

  --r-common: #9fb3c8;
  --r-uncommon: #2fbf62;
  --r-rare: #2f8cff;
  --r-epic: #a35cff;
  --r-legendary: #ffb800;
  --r-mythical: #ff4fa3;
  --rainbow: linear-gradient(90deg, #ff4f6d, #ffb800, #4cd964, #2fb8ff, #a35cff, #ff4fa3);

  --font: "Baloo 2", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.75rem;
  --step-3: clamp(2.2rem, 4.2vw, 3.4rem);
  --gutter: clamp(16px, 4vw, 40px);
  --sticker: 0 0 0 5px var(--white), 0 10px 0 5px rgba(14, 53, 102, 0.14);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink);
  background: var(--foam);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--lagoon); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 4px solid var(--sunset); outline-offset: 3px; border-radius: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 12px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons: candy-press, sink on click ---------- */
.btn {
  --face: var(--sunset); --edge: var(--ember); --text: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px 12px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 800; font-size: var(--step-0); line-height: 1.1; text-decoration: none;
  color: var(--text); background: var(--face);
  box-shadow: 0 6px 0 var(--edge), 0 0 0 4px var(--white), 0 10px 0 4px rgba(14,53,102,.18);
  transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s;
  text-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge), 0 0 0 4px var(--white), 0 4px 0 4px rgba(14,53,102,.18); }
.btn-big { padding: 14px 30px 16px; font-size: var(--step-1); }
.btn-ghost { --face: var(--white); --edge: #bfe6f2; --text: var(--lagoon); text-shadow: none; }
.btn-light { --face: var(--white); --edge: #ffd2b0; --text: var(--ember); text-shadow: none; }
.btn[aria-disabled="true"] { cursor: default; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 12px var(--gutter) auto; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 8px 10px 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(14,53,102,.12);
  transform: translateY(-140%); transition: transform .35s cubic-bezier(.2,1.4,.4,1);
}
.topbar.is-shown { transform: translateY(0); }
.topbar-logo img { height: 40px; width: auto; }
.topbar-nav { display: flex; gap: 6px; margin-left: auto; }
.topbar-nav a { padding: 6px 12px; border-radius: 999px; font-weight: 700; color: var(--ink); text-decoration: none; }
.topbar-nav a:hover { background: var(--sky); }
.topbar .btn { padding: 8px 18px 10px; font-size: var(--step--1); }
.sound-toggle { border: 0; background: none; cursor: pointer; font-weight: 600; font-size: var(--step--1); color: var(--ink); opacity: .7; padding: 6px 8px; }
.sound-toggle .sound-off, .sound-toggle[aria-pressed="false"] .sound-on { display: none; }
.sound-toggle[aria-pressed="false"] .sound-off { display: inline; }
@media (max-width: 720px) { .topbar-nav, .sound-toggle { display: none; } .topbar .btn { margin-left: auto; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: clip; isolation: isolate;
  background: linear-gradient(180deg, #7fd6f5 0%, var(--sky) 62%, #e9fbff 100%);
  padding: clamp(40px, 7vw, 80px) 0 120px;
}
.sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cloud {
  position: absolute; background: var(--white); border-radius: 999px; opacity: .9;
  animation: drift 60s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 55%; height: 170%; left: 14%; bottom: 20%; }
.cloud::after { width: 38%; height: 130%; right: 14%; bottom: 25%; }
.c1 { width: 180px; height: 44px; top: 14%; left: -10%; }
.c2 { width: 120px; height: 30px; top: 34%; left: 60%; animation-duration: 80s; animation-delay: -30s; opacity: .7; }
.c3 { width: 240px; height: 56px; top: 64%; left: 20%; animation-duration: 95s; animation-delay: -60s; opacity: .6; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }

.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero-logo { margin: 0 0 8px -2%; }
.hero-logo img { width: min(560px, 100%); height: auto; filter: drop-shadow(0 14px 18px rgba(14,53,102,.22)); }
.hero-line { font-size: var(--step-2); font-weight: 800; line-height: 1.15; margin: 0 0 10px; max-width: 22ch; }
.hero-sub { margin: 0 0 26px; max-width: 46ch; font-weight: 500; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 22px 20px; }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 80px; }

/* entrance: the one orchestrated load moment */
.hero-logo img { animation: logo-in .9s cubic-bezier(.2,1.6,.4,1) both; }
.hero-line, .hero-sub, .hero .hero-ctas { animation: rise .6s .35s ease-out both; }
.egg { animation: egg-drop .9s .5s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes logo-in { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes egg-drop { 0% { transform: translateY(-120%) scale(.9); opacity: 0; } 60% { transform: translateY(0) scale(1.08,.9); opacity: 1; } 100% { transform: none; } }

/* ---------- Hatch stage ---------- */
.stage {
  position: relative; aspect-ratio: 1 / 1.02; max-width: 520px; width: 100%; justify-self: center;
  display: grid; place-items: center;
}
.fx { position: absolute; inset: -20%; width: 140%; height: 140%; pointer-events: none; z-index: 5; }
.mound {
  position: absolute; bottom: 16%; width: 78%; height: 22%;
  background: radial-gradient(ellipse at 50% 30%, #9be27e 0%, #6cc85a 60%, #4fae4a 100%);
  border-radius: 50%; box-shadow: 0 0 0 6px var(--white), 0 16px 0 6px rgba(14,53,102,.12);
}
.mound::after { /* little flowers */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 18% 40%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 80% 46%, #ffd23f 0 5px, transparent 6px),
    radial-gradient(circle at 70% 70%, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 28% 72%, #ff8ab8 0 4px, transparent 5px);
}
.rays {
  position: absolute; width: 130%; aspect-ratio: 1; border-radius: 50%; z-index: 0; opacity: 0;
  background: repeating-conic-gradient(from 0deg, var(--ray, #fff6c9) 0 10deg, transparent 10deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%);
  pointer-events: none;
}
.stage.is-revealed .rays { opacity: .85; animation: spin 14s linear infinite; }
.stage[data-tier="mythical"] .rays { --ray: #ffd6f0; background: repeating-conic-gradient(#ff4f6d 0 6deg, #ffb800 6deg 12deg, #4cd964 12deg 18deg, #2fb8ff 18deg 24deg, #a35cff 24deg 30deg, transparent 30deg 40deg); }
.stage[data-tier="legendary"] .rays { --ray: #ffe07a; }
.stage[data-tier="epic"] .rays { --ray: #e2c8ff; }
.stage[data-tier="rare"] .rays { --ray: #c8e2ff; }
@keyframes spin { to { transform: rotate(360deg); } }

.egg {
  position: relative; z-index: 2; width: 46%; aspect-ratio: 200 / 250; margin-bottom: 16%;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 48% 48% 46% 46% / 58% 58% 42% 42%;
  -webkit-tap-highlight-color: transparent;
}
.egg svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 12px 10px rgba(14,53,102,.2)); }
.egg-fill { fill: var(--egg, #fff4dc); }
.egg-spots { fill: var(--spot, var(--shallows)); }
.egg-line { fill: none; stroke: var(--white); stroke-width: 8; }
.egg-half { transition: transform .55s cubic-bezier(.2,1.2,.4,1), opacity .5s; transform-origin: 100px 140px; }
.crack { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset .18s ease-out; }
.egg[data-taps="1"] .k1, .egg[data-taps="2"] .k1, .egg[data-taps="2"] .k2,
.egg[data-taps="3"] .crack { stroke-dashoffset: 0; }
.egg.idle { animation: wiggle 3.4s 1.6s ease-in-out infinite; }
.egg:hover.idle { animation-duration: 1.2s; }
@keyframes wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-7deg); } 90% { transform: rotate(6deg); } 94% { transform: rotate(-4deg); } 97% { transform: rotate(2deg); } }
.egg.tap { animation: squish .26s cubic-bezier(.3,1.8,.5,1); }
@keyframes squish { 0% { transform: scale(1); } 35% { transform: scale(1.12, .86) rotate(var(--tilt, 4deg)); } 70% { transform: scale(.94, 1.08); } 100% { transform: scale(1); } }
.egg.shake { animation: shake .5s linear infinite; }
@keyframes shake { 0%,100% { transform: translateX(0) rotate(0); } 20% { transform: translateX(-6px) rotate(-5deg); } 40% { transform: translateX(6px) rotate(5deg); } 60% { transform: translateX(-4px) rotate(-3deg); } 80% { transform: translateX(4px) rotate(3deg); } }
.egg.is-open { pointer-events: none; }
.egg.is-open .egg-top { transform: translate(-30px, -150px) rotate(-38deg); opacity: 0; }
.egg.is-open .egg-bot { transform: translateY(40px) scale(.9); opacity: 0; }
.egg.is-open .cracks { opacity: 0; }
.egg.glow svg { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 22px var(--glow)) drop-shadow(0 0 40px var(--glow)); }

/* golden egg skin */
.egg.golden { --egg: #ffd84a; --spot: #fff3a8; }
.egg.golden .egg-line { stroke: #fff6c9; }

.tap-bubble {
  position: absolute; top: 8%; right: 6%; z-index: 3;
  background: var(--white); color: var(--ink); font-weight: 800; font-size: var(--step-1);
  padding: 8px 18px; border-radius: 22px; box-shadow: 0 8px 0 rgba(14,53,102,.12);
  animation: bob 2.4s ease-in-out infinite; transform-origin: 10% 100%;
}
.tap-bubble::after { content: ""; position: absolute; left: 18px; bottom: -12px; border: 8px solid transparent; border-top: 12px solid var(--white); border-bottom: 0; }
.tap-bubble:empty { display: none; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }

.reveal { position: absolute; inset: 0; z-index: 4; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: end; padding: 6% 0 4%; gap: 12px; }
.reveal[hidden] { display: none; }
.reveal-art { align-self: center; width: 72%; display: grid; place-items: center; }
.reveal-art img { max-height: 210px; max-width: 100%; width: auto; object-fit: contain; animation: pop-out .7s cubic-bezier(.2,1.8,.4,1) both; filter: drop-shadow(0 12px 8px rgba(14,53,102,.22)); }
.stage[data-tier="legendary"] .reveal-art img { filter: drop-shadow(0 0 18px #ffd84a) drop-shadow(0 12px 8px rgba(14,53,102,.22)); }
.stage[data-tier="mythical"] .reveal-art img { animation: pop-out .7s cubic-bezier(.2,1.8,.4,1) both, hue-glow 2.4s linear infinite; }
@keyframes hue-glow { 0% { filter: drop-shadow(0 0 16px #ff4f6d); } 33% { filter: drop-shadow(0 0 16px #2fb8ff); } 66% { filter: drop-shadow(0 0 16px #ffb800); } 100% { filter: drop-shadow(0 0 16px #ff4f6d); } }
@keyframes pop-out { 0% { transform: translateY(60px) scale(.2); opacity: 0; } 55% { transform: translateY(-14px) scale(1.12, .92); opacity: 1; } 75% { transform: scale(.96, 1.04); } 100% { transform: none; } }
.nameplate {
  display: grid; justify-items: center; gap: 2px; padding: 10px 26px 12px; border-radius: 22px;
  background: var(--white); box-shadow: 0 8px 0 rgba(14,53,102,.14);
  animation: plate .5s .25s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes plate { from { transform: translateY(20px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.nameplate-name { font-size: var(--step-2); line-height: 1.05; }
.nameplate-note { font-size: var(--step--1); font-weight: 600; opacity: .75; }
.nameplate-note.is-new { color: var(--ember); opacity: 1; }
.reveal-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; animation: rise .4s .5s both; }
.reveal-actions .btn { padding: 8px 18px 10px; }

.chip {
  display: inline-block; padding: 1px 12px 2px; border-radius: 999px; font-size: var(--step--1); font-weight: 800;
  color: var(--white); background: var(--tier-color, var(--r-common)); text-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.chip[data-tier="mythical"] { background: var(--rainbow); background-size: 200% 100%; animation: slide 3s linear infinite; }
@keyframes slide { to { background-position: 200% 0; } }

[data-tier="common"] { --tier-color: var(--r-common); }
[data-tier="uncommon"] { --tier-color: var(--r-uncommon); }
[data-tier="rare"] { --tier-color: var(--r-rare); }
[data-tier="epic"] { --tier-color: var(--r-epic); }
[data-tier="legendary"] { --tier-color: var(--r-legendary); }
[data-tier="mythical"] { --tier-color: var(--r-mythical); }

.stage-foot { position: absolute; bottom: 2%; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; z-index: 3; }
.stage.is-revealed .stage-foot { visibility: hidden; }
.count-pill { background: rgba(255,255,255,.85); padding: 4px 14px; border-radius: 999px; font-weight: 600; font-size: var(--step--1); }
.golden-btn {
  border: 0; cursor: pointer; padding: 4px 14px 5px 32px; border-radius: 999px; font-weight: 800; font-size: var(--step--1);
  color: #7a4b00; background: linear-gradient(180deg, #ffe680, #ffc21a); box-shadow: 0 3px 0 #d99500;
  position: relative;
}
.golden-btn::before { content: ""; position: absolute; left: 12px; top: 50%; width: 12px; height: 15px; translate: 0 -50%; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: #fff6c9; box-shadow: 0 0 8px #fff; }
.golden-btn:disabled { cursor: default; filter: grayscale(.7); opacity: .7; }
.golden-btn:not(:disabled) { animation: gleam 2.2s ease-in-out infinite; }
@keyframes gleam { 50% { box-shadow: 0 3px 0 #d99500, 0 0 18px #ffd84a; } }

/* page reactions */
.flash { position: fixed; inset: 0; z-index: 90; pointer-events: none; background: #fff; opacity: 0; }
.flash.go { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: .9; } 100% { opacity: 0; } }
body.quake main { animation: quake .45s linear; }
@keyframes quake { 0%,100% { transform: none; } 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); } }

/* ---------- Section titles: sticker type like the logo ---------- */
.sticker-title {
  margin: 0 0 8px; font-size: var(--step-3); font-weight: 800; line-height: 1.02; letter-spacing: -.01em;
  color: var(--lagoon);
  -webkit-text-stroke: 12px var(--white); paint-order: stroke fill;
  text-shadow: 0 7px 0 rgba(14,53,102,.16);
}
.sticker-title-light { color: var(--white); -webkit-text-stroke-color: var(--ink); text-shadow: 0 7px 0 rgba(0,0,0,.2); }
.lede { margin: 0 0 28px; max-width: 54ch; font-size: var(--step-1); font-weight: 500; line-height: 1.4; }
.lede-light { color: var(--white); }

/* ---------- Journal ---------- */
.journal {
  padding: clamp(48px, 7vw, 88px) 0;
  background-color: var(--foam);
  background-image: radial-gradient(rgba(30,127,216,.12) 1.6px, transparent 1.8px);
  background-size: 22px 22px;
}
.journal-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.journal-meter { min-width: min(320px, 100%); margin-bottom: 28px; }
.meter { height: 22px; border-radius: 999px; background: var(--white); box-shadow: inset 0 3px 0 rgba(14,53,102,.08), 0 0 0 4px var(--white); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(180deg, #ffb066, var(--sunset)); box-shadow: inset 0 -5px 0 rgba(226,85,46,.4), inset 0 4px 0 rgba(255,255,255,.4); transition: width .8s cubic-bezier(.2,1.3,.4,1); }
.meter-text { margin: 8px 0 0; font-weight: 600; text-align: right; }

.journal-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tools-gap { flex: 1; }
.filter { border: 0; cursor: pointer; padding: 4px 16px 6px; border-radius: 999px; font-weight: 700; background: var(--white); color: var(--ink); box-shadow: 0 3px 0 rgba(14,53,102,.12); }
.filter.is-on { background: var(--lagoon); color: var(--white); box-shadow: 0 3px 0 var(--lagoon-deep); }
.filter-quiet { background: none; box-shadow: none; opacity: .65; }
.filter-quiet:hover { opacity: 1; }

.journal-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px;
}
.slot {
  position: relative; aspect-ratio: 1; min-width: 0; overflow: hidden; border-radius: 20px; background: var(--white);
  display: grid; place-items: center; padding: 12px;
  box-shadow: inset 0 0 0 3px #e3f3fa;
}
.slot img { width: 82%; height: 58%; object-fit: contain; margin-bottom: 14%; filter: brightness(0) opacity(.16); transition: filter .4s, transform .4s; }
.journal-grid.is-collapsed { max-height: 420px; overflow: hidden; -webkit-mask: linear-gradient(#000 65%, transparent); mask: linear-gradient(#000 65%, transparent); }
.journal-more { display: flex; justify-content: center; margin-top: 18px; }
.slot-name { position: absolute; bottom: 6px; left: 6px; right: 6px; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.1; color: #9fb3c8; }
.slot.is-found { box-shadow: inset 0 0 0 3px var(--tier-color); }
.slot.is-found img { filter: none; }
.slot.is-found .slot-name { color: var(--ink); }
.slot.is-found[data-tier="mythical"] { box-shadow: inset 0 0 0 3px transparent; background: linear-gradient(var(--white), var(--white)) padding-box, var(--rainbow) border-box; border: 3px solid transparent; }
.slot.is-fresh { animation: slot-pop .7s cubic-bezier(.2,1.8,.4,1); }
@keyframes slot-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: none; } }
.slot.is-mystery { background: #0e3566; box-shadow: none; }
.slot.is-mystery .glitch { font-size: 2.6rem; font-weight: 800; color: var(--white); animation: glitch 2.6s steps(1) infinite; }
.slot.is-mystery .slot-name { color: #8fe3f0; }
@keyframes glitch { 0%,100% { text-shadow: 3px 0 #ff4fa3, -3px 0 #2fb8ff; } 30% { text-shadow: -4px 1px #ff4fa3, 4px -1px #2fb8ff; transform: skewX(8deg); } 33% { transform: none; } 70% { text-shadow: 2px -2px #ffb800, -2px 2px #a35cff; } }
.journal-grid[data-show="found"] .slot:not(.is-found),
.journal-grid[data-show="missing"] .slot.is-found,
.journal-grid[data-show="found"] .is-mystery { display: none; }

/* ---------- Rarity ladder ---------- */
.ladder {
  position: relative; padding: clamp(56px, 8vw, 100px) 0 clamp(48px, 6vw, 80px);
  background: radial-gradient(ellipse at 50% 120%, #2a9be0 0%, var(--lagoon) 40%, var(--ink) 100%);
  color: var(--white); overflow: clip;
}
.podiums { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; }
.podium { display: grid; justify-items: center; gap: 10px; }
.podium-art { position: relative; height: 150px; width: 100%; display: grid; place-items: end center; }
.podium-art img { max-height: 108px; max-width: 92%; width: auto; position: relative; z-index: 1; animation: idle-hop 2.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes idle-hop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-12px) scale(1.02, .98); } 90% { transform: translateY(0) scale(1.04, .96); } }
.podium-base { width: 100%; border-radius: 16px 16px 6px 6px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 3px var(--tier-color); display: grid; place-items: center; padding: 10px 6px; }
.podium:nth-child(1) .podium-base { height: 44px; }
.podium:nth-child(2) .podium-base { height: 58px; }
.podium:nth-child(3) .podium-base { height: 72px; }
.podium:nth-child(4) .podium-base { height: 86px; }
.podium:nth-child(5) .podium-base { height: 100px; }
.podium:nth-child(6) .podium-base { height: 116px; }
.podium-name { font-weight: 800; line-height: 1.1; text-align: center; }
.podium-effect { font-size: var(--step--1); opacity: .8; text-align: center; line-height: 1.2; max-width: 16ch; }

/* escalating auras, the point of this section */
.podium[data-tier="uncommon"] img { filter: saturate(1.5); }
.podium[data-tier="rare"] .podium-art::before {
  content: ""; position: absolute; inset: 10% 10% 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  background-size: 250% 100%; animation: sheen 2.4s linear infinite; z-index: 2; mix-blend-mode: overlay;
  -webkit-mask: var(--mask) center bottom / contain no-repeat; mask: var(--mask) center bottom / contain no-repeat;
}
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.podium[data-tier="epic"] img { filter: drop-shadow(0 0 10px rgba(163,92,255,.8)); }
.podium[data-tier="legendary"] img { filter: drop-shadow(0 0 14px #ffd84a) drop-shadow(0 0 4px #fff); }
.podium[data-tier="mythical"] .podium-art::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 130px; height: 130px; translate: -50% 4px; border-radius: 50%;
  background: conic-gradient(#ff4f6d, #ffb800, #4cd964, #2fb8ff, #a35cff, #ff4f6d); filter: blur(18px); opacity: .75;
  animation: spin 4s linear infinite;
}
.sparkle { position: absolute; z-index: 2; width: 10px; height: 10px; pointer-events: none;
  background: var(--c, #fff); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 1.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }

@media (max-width: 860px) {
  .podiums { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
}

/* ---------- Island ---------- */
.island { padding: clamp(56px, 8vw, 100px) 0; background: linear-gradient(180deg, var(--foam), var(--sky)); }
.island-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.map { position: relative; border-radius: 32px; overflow: hidden; box-shadow: var(--sticker); }
.map-art { width: 100%; height: auto; display: block; }
.pins { position: absolute; inset: 0; }
.pin {
  position: absolute; translate: -50% -50%; border: 0; cursor: pointer;
  padding: 4px 12px 5px; border-radius: 999px; font-weight: 800; font-size: 13px; white-space: nowrap;
  background: var(--white); color: var(--ink); box-shadow: 0 4px 0 rgba(14,53,102,.25);
  transition: transform .15s;
}
.pin:hover { transform: scale(1.08); }
.pin[aria-pressed="true"] { background: var(--sunset); color: var(--white); box-shadow: 0 4px 0 var(--ember); }
.biome-card { background: var(--white); border-radius: 28px; padding: 22px 24px 24px; box-shadow: var(--sticker); min-height: 100%; }
.biome-card h3 { margin: 0; font-size: var(--step-2); line-height: 1.1; color: var(--lagoon); }
.biome-card .biome-terrain { margin: 2px 0 12px; font-weight: 600; opacity: .7; }
.biome-card p { margin: 0 0 14px; }
.biome-mates { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.biome-mates li { display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 700; text-align: center; }
.biome-mates img { height: 52px; width: auto; object-fit: contain; }
.biome-special { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--sky); font-weight: 600; font-size: var(--step--1); }
.biome-special img { height: 44px; width: auto; }
.biome-card.swap { animation: card-swap .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes card-swap { from { transform: translateY(10px) scale(.97); opacity: .3; } to { transform: none; opacity: 1; } }
@media (max-width: 860px) { .island-layout { grid-template-columns: 1fr; } .pin { font-size: 11px; padding: 3px 9px 4px; } }

/* ---------- Play ---------- */
.play {
  position: relative; overflow: clip; text-align: center;
  padding: clamp(80px, 11vw, 140px) 0;
  background: linear-gradient(180deg, #ffb066 0%, var(--sunset) 45%, var(--ember) 100%);
}
.play-inner { position: relative; z-index: 1; display: grid; justify-items: center; }
.play .lede { margin-left: auto; margin-right: auto; }
.play .sticker-title-light { -webkit-text-stroke-color: #9a2f12; }
.play-float { position: absolute; inset: 0; }
.floater { position: absolute; width: auto; height: var(--h, 70px); opacity: .95; animation: floaty var(--t, 6s) ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }

.foot { background: var(--ink); color: #cfe6f5; padding: 28px 0; }
.foot-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.foot img { width: 140px; height: auto; }
.foot p { margin: 0; font-size: var(--step--1); }
.foot a { color: var(--shallows); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: grid; justify-items: center; }
  .hero-logo { margin: 0 0 4px; }
  .hero-line, .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .stage { max-width: 420px; }
  .journal-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
  .slot-name { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* small screens: calm the decorative layers so copy stays readable */
@media (max-width: 720px) {
  .podium .podium-base { height: 52px !important; }
  .floater { height: 46px; opacity: .5; }
  .biome-card { min-height: 0; }
}
