:root {
  --bg: #fff1d6;
  --ink: #1d1340;
  --pink: #ff5fa2;
  --yellow: #ffd23f;
  --blue: #4d96ff;
  --mint: #3bceac;
  --purple: #9b5de5;
  --orange: #ff8c42;
  --radius: 20px;
  --shadow: 6px 6px 0 var(--ink);
  color-scheme: light;
  font-family: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI Rounded', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  position: relative;
  margin: 0 auto;
  max-width: 1040px;
  min-height: 100vh;
  padding: max(28px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
}
/* Polka dots + slowly drifting colour blobs behind everything. */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, #ffb3d4 0 18%, transparent 19%),
    radial-gradient(circle at 85% 15%, #b8e7ff 0 16%, transparent 17%),
    radial-gradient(circle at 75% 85%, #c9f2d9 0 20%, transparent 21%),
    radial-gradient(circle at 10% 90%, #e2d1ff 0 15%, transparent 16%);
  filter: blur(40px);
  animation: drift 24s ease-in-out infinite alternate;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(29, 19, 64, .09) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
@keyframes drift { to { transform: translate(4%, 3%) rotate(8deg) scale(1.08); } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Floating emoji */
.floaters { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.floaters span {
  position: absolute;
  bottom: -60px;
  font-size: var(--size, 28px);
  opacity: .55;
  animation: float var(--dur, 18s) linear var(--delay, 0s) infinite;
}
@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(var(--sway, 30px), -55vh) rotate(180deg); }
  100% { transform: translate(0, -115vh) rotate(360deg); }
}

/* Header */
header { text-align: center; margin-bottom: 28px; }
.title {
  margin: 0;
  cursor: pointer;
  user-select: none;
  line-height: .9;
}
.word { display: block; }
.title .word:first-of-type {
  font-size: 1.3rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.title .big { font-size: clamp(3.2rem, 13vw, 6.5rem); font-weight: 900; letter-spacing: -.02em; }
.title .big .ch {
  display: inline-block;
  color: var(--c);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 5px 0 var(--ink);
  animation: bob 2.4s ease-in-out infinite;
  animation-delay: calc(var(--i) * 120ms);
}
.title:hover .big .ch { animation-duration: .7s; }
.title:active { transform: scale(.97); }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(var(--r, 3deg)); }
}

.tagline {
  min-height: 2.8em;
  max-width: 34ch;
  margin: 14px auto 18px;
  font-size: 1.15rem;
  font-weight: 700;
}
.tagline.swap { animation: tagline .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes tagline { from { opacity: 0; transform: translateY(10px) scale(.95); } }

.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.sticker {
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 700;
  background: var(--c);
  transform: rotate(var(--r, -2deg));
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.sticker:nth-child(even) { --r: 2deg; }
.sticker:hover { transform: rotate(0) scale(1.1); }
.sticker b { font-variant-numeric: tabular-nums; }
.sticker.pink { --c: var(--pink); }
.sticker.yellow { --c: var(--yellow); }
.sticker.blue { --c: #8fc1ff; }
.sticker.purple { --c: #cdb0f5; }

.surprise, .play {
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.surprise {
  padding: 12px 26px;
  font-size: 1.15rem;
  background: linear-gradient(90deg, var(--yellow), var(--orange), var(--pink), var(--purple), var(--blue), var(--mint), var(--yellow));
  background-size: 300% 100%;
  animation: rainbow 6s linear infinite;
}
@keyframes rainbow { to { background-position: 300% 0; } }
.surprise:hover, .play:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.surprise:active, .play:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.surprise:disabled { cursor: wait; }

/* Cards */
main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
  gap: 28px;
  margin: 8px 0 40px;
  perspective: 900px;
}
.card {
  --tilt: -1.5deg;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transform: rotate(var(--tilt)) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
  animation: pop-in .7s cubic-bezier(.34, 1.56, .64, 1) backwards;
  animation-delay: calc(var(--i) * 110ms + 200ms);
}
.card:nth-child(3n + 2) { --tilt: 1.2deg; }
.card:nth-child(3n) { --tilt: -.6deg; }
.card:hover, .card:focus-visible, .card.lit {
  --tilt: 0deg;
  box-shadow: 10px 12px 0 var(--ink);
  outline: none;
  z-index: 1;
}
.card.lit { transform: scale(1.05); box-shadow: 0 0 0 6px var(--accent), 10px 12px 0 var(--ink); }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(40px) scale(.7) rotate(-8deg); }
}

.banner {
  position: relative;
  height: 74px;
  border-radius: calc(var(--radius) - 3px) calc(var(--radius) - 3px) 0 0;
  border-bottom: 3px solid var(--ink);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .22) 0 12px, transparent 12px 24px),
    var(--accent);
  background-size: 34px 34px, auto;
  animation: stripes 3s linear infinite;
}
@keyframes stripes { to { background-position: 34px 0, 0 0; } }
.icon {
  position: absolute;
  left: 18px;
  bottom: -32px;
  width: 76px;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.card:hover .icon { animation: wiggle .5s ease-in-out 2; }
@keyframes wiggle {
  25% { transform: rotate(-10deg) scale(1.08); }
  75% { transform: rotate(10deg) scale(1.08); }
}
.badge {
  position: absolute;
  top: -16px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  font-weight: 900;
  font-size: .8rem;
  line-height: 1;
  text-align: center;
  background: var(--yellow);
  border: 3px solid var(--ink);
  clip-path: polygon(50% 0, 61% 18%, 82% 10%, 79% 32%, 100% 39%, 84% 55%, 96% 75%, 73% 77%, 67% 100%, 50% 86%, 33% 100%, 27% 77%, 4% 75%, 16% 55%, 0 39%, 21% 32%, 18% 10%, 39% 18%);
  animation: spin 9s linear infinite;
}
.badge::after { content: 'FREE!'; transform: rotate(-12deg); }
@keyframes spin { to { rotate: 360deg; } }

.body { display: flex; flex: 1; flex-direction: column; padding: 42px 20px 20px; }
h2 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.genre {
  align-self: flex-start;
  margin: 6px 0 10px;
  padding: 2px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--accent);
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  transform: rotate(-2deg);
}
.blurb { margin: 0 0 12px; line-height: 1.45; }
.quip {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 2px dashed var(--ink);
  border-radius: 12px;
  background: #fffbe8;
  font-size: .9rem;
  font-style: italic;
}
.quip::before { content: '💬 '; font-style: normal; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.tags li {
  padding: 2px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #f3ecff;
  font-size: .78rem;
  font-weight: 700;
}
.tags li:nth-child(2n) { background: #e3f7ef; }
.play {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 20px;
  max-width: 100%;
  background: var(--accent);
}
.play .host { font-weight: 600; opacity: .7; font-size: .85em; }

footer { text-align: center; font-weight: 600; opacity: .8; }
footer p { margin: 4px 0; }

.confetti { position: fixed; inset: 0; z-index: 10; width: 100%; height: 100%; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .floaters { display: none; }
}
