:root {
  --cream: #FFF4E0;
  --ink: #111111;
  --red: #FF3B30;
  --orange: #FF9500;
  --yellow: #FFD60A;
  --green: #34C759;
  --blue: #2F6BFF;
  --purple: #7B2FF7;
  --grey: #7A7A7A;
  --shadow: 6px 6px 0 var(--ink);
  --f-head: 'Unbounded', 'Arial Black', sans-serif;
  --f-body: 'Rubik', system-ui, sans-serif;
  --f-mono: 'Rubik Mono One', 'Arial Black', sans-serif;
  --f-hand: 'Caveat', cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { overflow-x: clip; }
body { background: var(--cream); color: var(--ink); font-family: var(--f-body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.hand { font-family: var(--f-hand); font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.1; }
.red { color: var(--red); } .blue { color: var(--blue); } .yellow { color: var(--yellow); }
.purple { color: var(--purple); } .white { color: #fff; }

/* ---------- buttons & stickers ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-head); font-weight: 700; font-size: 16px; letter-spacing: .01em;
  padding: 16px 28px; border-radius: 999px; border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s; white-space: nowrap; color: var(--ink);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-secondary { background: #fff; }

.sticker {
  display: inline-block; font-family: var(--f-mono); font-size: 18px; color: #fff;
  background: var(--red); border: 3px solid var(--ink); border-radius: 12px;
  padding: 10px 18px; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap;
}
.sticker-black { background: var(--ink); }
.sticker-green { background: var(--green); color: var(--ink); }
.tilt-l { transform: rotate(-2deg); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px clamp(16px, 4.4vw, 64px); background: var(--cream); border-bottom: 3px solid var(--ink);
}
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--f-head); font-weight: 700; font-size: 20px; }
.badge { background: var(--ink); color: var(--yellow); font-weight: 900; border-radius: 999px; padding: 6px 12px; }
.links { display: flex; gap: 28px; font-weight: 500; font-size: 17px; }
.links a { position: relative; }
.links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 3px; background: var(--red); transition: right .2s; }
.links a:hover::after { right: 0; }
.burger { display: none; width: 46px; height: 46px; border: 3px solid var(--ink); border-radius: 12px; background: var(--yellow); flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.burger span { width: 20px; height: 3px; background: var(--ink); border-radius: 2px; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 24px;
  padding: 56px clamp(16px, 4.4vw, 64px) 40px; max-width: 1440px; margin: 0 auto;
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; position: relative; z-index: 2; }
h1 { font-family: var(--f-head); font-weight: 900; font-size: clamp(64px, 9.2vw, 132px); line-height: .92; letter-spacing: -.03em; }
.sub { font-size: clamp(17px, 1.6vw, 22px); font-weight: 500; line-height: 1.4; max-width: 560px; }
.ctas { display: flex; flex-wrap: wrap; gap: 20px; }
.note { color: var(--purple); font-size: 26px; transform: rotate(-2deg); }

.collage { position: relative; width: 100%; max-width: 640px; aspect-ratio: 640 / 660; justify-self: center; container-type: inline-size; }
.rainbow {
  position: absolute; left: -12%; right: -12%; bottom: 0; aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0;
  background: radial-gradient(50% 100% at 50% 100%, transparent 0 44%, var(--purple) 44% 50%, var(--blue) 50% 59%, var(--green) 59% 68%, var(--yellow) 68% 77%, var(--orange) 77% 86%, var(--red) 86% 95%, transparent 95%);
  opacity: .92;
}
.big-num {
  position: absolute; font-family: var(--f-head); font-weight: 900; font-size: 36cqw; line-height: 1;
  -webkit-text-stroke: .8cqw var(--ink); paint-order: stroke fill;
}
.six { color: var(--yellow); left: -4%; top: 44%; transform: rotate(12deg); animation: bob 3s ease-in-out infinite; }
.seven { color: var(--blue); right: -6%; top: 40%; transform: rotate(-10deg); animation: bob 3s ease-in-out infinite reverse; }
.polaroid {
  position: absolute; left: 21%; top: 6%; width: 60%; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 8px;
  padding: 2.5cqw 2.5cqw 2cqw; box-shadow: 10px 10px 0 var(--ink); transform: rotate(-4deg); transition: transform .3s;
}
.polaroid { translate: 0 var(--lift, 0px); transition: transform .3s, translate .2s; cursor: inherit; }
.polaroid:hover { transform: rotate(0deg) scale(1.02); }
.polaroid.takeoff { animation: takeoff 1.4s cubic-bezier(.5, 0, .9, .5) forwards; }
.polaroid.landing { animation: landing 1.2s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes takeoff { 0% { translate: 0 0; rotate: 0deg; } 15% { translate: 0 12px; rotate: -3deg; } 100% { translate: -30vw -160vh; rotate: -40deg; } }
@keyframes landing { from { translate: 0 120vh; rotate: 25deg; } to { translate: 0 0; rotate: 0deg; } }
.photo-wrap { position: relative; }
.propeller { position: absolute; left: 52.7%; top: 14.8%; width: 16%; translate: -50% -50%; perspective: 200px; pointer-events: none; }
.blades { transform-style: preserve-3d; }
.blades svg { display: block; width: 100%; height: auto; }
.propeller.spinning .blades { animation: prop var(--spin, .4s) linear infinite; }
@keyframes prop { to { transform: rotateY(360deg); } }
.prop-hint {
  position: absolute; left: 50%; bottom: -6%; translate: -50% 0; z-index: 5; width: max-content; max-width: 94%; text-align: center;
  font-family: var(--f-mono); font-size: max(11px, 2.4cqw); background: var(--ink); color: var(--yellow);
  padding: 8px 14px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.prop-hint.show { opacity: 1; }
.polaroid img { width: 100%; aspect-ratio: 380 / 500; object-fit: cover; border: 2px solid var(--ink); }
.polaroid figcaption { text-align: center; font-size: 3.9cqw; margin-top: 1.6cqw; white-space: nowrap; }
.cat-circle {
  position: absolute; right: 0; top: 0; width: 31%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); animation: spin-wobble 4s ease-in-out infinite;
}
.collage .sticker { position: absolute; font-size: max(11px, 2.7cqw); padding: 1.4cqw 2.6cqw; }
.s-prop { left: 34%; top: 0; transform: rotate(5deg); }
.s-warn { right: -3%; top: 44%; transform: rotate(8deg); }
.starburst {
  position: absolute; left: 0; top: 7%; width: 23%; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--yellow); border: 0;
  clip-path: polygon(50% 0%, 59% 13%, 74% 5%, 75% 21%, 92% 18%, 85% 33%, 100% 40%, 87% 50%, 100% 60%, 85% 67%, 92% 82%, 75% 79%, 74% 95%, 59% 87%, 50% 100%, 41% 87%, 26% 95%, 25% 79%, 8% 82%, 15% 67%, 0% 60%, 13% 50%, 0% 40%, 15% 33%, 8% 18%, 25% 21%, 26% 5%, 41% 13%);
  filter: drop-shadow(0 0 0 var(--ink)); animation: spin 18s linear infinite;
}
.starburst span { color: var(--ink); font-family: var(--f-head); font-weight: 900; font-size: 3.6cqw; text-align: center; line-height: 1.05; animation: spin 18s linear infinite reverse; }

@keyframes bob { 50% { translate: 0 -12px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes spin-wobble { 50% { rotate: 8deg; } }

/* ---------- marquee ---------- */
.marquee { position: relative; z-index: 2; height: 200px; overflow-x: clip; overflow-y: visible; }
.band { position: absolute; left: -5%; width: 110%; border: 3px solid var(--ink); padding: 18px 0; overflow: hidden; }
.band-blue { background: var(--blue); color: #fff; top: 105px; transform: rotate(2.5deg); }
.band-black { background: var(--ink); color: var(--yellow); top: 55px; transform: rotate(-2deg); }
.track { display: flex; width: max-content; font-family: var(--f-mono); font-size: 30px; white-space: nowrap; animation: marquee 30s linear infinite; }
.track.rev { animation-direction: reverse; animation-duration: 26s; }
.track span { padding-right: 24px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 100px clamp(16px, 4.4vw, 64px) 110px; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.section-yellow { background: var(--yellow); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.section-black { background: var(--ink); }
.section-purple { background: var(--purple); }
.heading { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
h2 { font-family: var(--f-head); font-weight: 900; font-size: clamp(40px, 6.2vw, 88px); letter-spacing: -.02em; line-height: 1; }
.heading .hand { transform: rotate(-1.5deg); }

/* ---------- id card ---------- */
.id-card { width: 100%; max-width: 1312px; background: #fff; border: 3px solid var(--ink); border-radius: 32px; box-shadow: 12px 12px 0 var(--ink); overflow: hidden; }
.strip { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; padding: 20px 40px; background: var(--blue); color: #fff; font-family: var(--f-mono); font-size: 22px; border-bottom: 3px solid var(--ink); }
.strip .yellow { font-size: 16px; align-self: center; }
.id-body { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 48px; padding: 40px; align-items: start; }
.id-photo { position: relative; }
.id-photo img { width: 100%; aspect-ratio: 280 / 360; object-fit: cover; border-radius: 20px; border: 3px solid var(--ink); }
.stamp {
  position: absolute; left: 50%; bottom: -14px; padding: 18px 22px; border: 5px solid var(--red); border-radius: 50%;
  color: var(--red); font-family: var(--f-mono); font-size: 16px; text-align: center; line-height: 1.2;
  transform: rotate(-14deg); background: rgba(255, 255, 255, .55); mix-blend-mode: multiply;
}
.fields { display: flex; flex-direction: column; gap: 16px; }
.fields > div { display: flex; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 2px dashed var(--ink); }
.fields dt { flex: 0 0 150px; font-family: var(--f-mono); font-size: 12px; color: var(--grey); }
.fields dd { font-weight: 700; font-size: 20px; }
.stats { background: var(--cream); border: 3px solid var(--ink); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.stats h3 { font-family: var(--f-mono); font-weight: 400; font-size: 15px; }
.stat > div { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.stat b { font-family: var(--f-head); font-weight: 900; }
.stat i { display: block; height: 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.stat s { display: block; height: 100%; width: 0; background: var(--c); transition: width 1.2s cubic-bezier(.2, .9, .3, 1.2); }
.stats.on .stat s { width: var(--p); }

/* ---------- memes ---------- */
.meme-grid { display: grid; grid-template-columns: repeat(3, 316px); gap: 64px 56px; justify-content: center; }
.meme {
  background: #fff; border: 3px solid var(--ink); border-radius: 24px; padding: 12px 12px 18px; box-shadow: 8px 8px 0 var(--ink);
  display: flex; flex-direction: column; gap: 14px; transform: rotate(var(--r)); transition: transform .2s;
}
.meme:hover { transform: rotate(0deg) translateY(-6px); }
.meme img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; border: 2px solid var(--ink); }
.meme p { font-weight: 700; font-size: 18px; line-height: 1.25; }
.meme-meta { display: flex; justify-content: space-between; align-items: center; }
.like { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; padding: 4px 8px 4px 4px; border-radius: 999px; transition: background .15s; }
.like:hover { background: #ffe9e7; }
.like svg { width: 22px; height: 22px; transition: transform .15s; }
.like.liked svg { animation: pop .4s; }
.like.liked path { fill: var(--red); }
.tag { background: var(--blue); color: #fff; font-weight: 500; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.meme-add {
  border: 3px dashed var(--ink); border-radius: 24px; background: var(--cream); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; min-height: 430px; transform: rotate(1.5deg);
}
.meme-add .plus { font-family: var(--f-head); font-weight: 900; font-size: 96px; line-height: 1; }
.meme-add b { font-family: var(--f-head); font-weight: 900; font-size: 28px; }
@keyframes pop { 50% { transform: scale(1.5); } }

/* ---------- facts ---------- */
.fact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 300px)); gap: 40px; justify-content: center; }
.fact {
  background: var(--c); border: 3px solid var(--ink); border-radius: 24px; padding: 24px; box-shadow: 6px 6px 0 #fff;
  transform: rotate(var(--r)); display: flex; flex-direction: column; gap: 12px; animation: drop-in .45s cubic-bezier(.2, .9, .3, 1.3) both;
}
.fact b { font-family: var(--f-head); font-weight: 900; font-size: 40px; }
.fact p { font-weight: 500; font-size: 18px; line-height: 1.3; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-30px) rotate(calc(var(--r) * 4)); } }

/* ---------- quiz ---------- */
.quiz { width: 100%; max-width: 880px; background: #fff; border: 3px solid var(--ink); border-radius: 32px; box-shadow: 12px 12px 0 var(--ink); padding: 44px 48px 48px; display: flex; flex-direction: column; gap: 24px; }
.q-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 14px; color: var(--grey); }
.dots { display: flex; gap: 6px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--purple); }
.dots i.on { background: var(--purple); }
.q-text { font-family: var(--f-head); font-weight: 900; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.15; }
.opts { display: flex; flex-direction: column; gap: 14px; }
.opt {
  display: flex; justify-content: space-between; align-items: center; text-align: left; width: 100%;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 16px; padding: 18px 24px; font-weight: 700; font-size: 20px; transition: transform .1s, background .15s;
}
.opt:hover:not(:disabled) { transform: translateX(6px); background: #fff; }
.opt:disabled { cursor: default; }
.opt.good { background: var(--green); border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }
.opt.bad { background: #ffb3ad; }
.opt small { font-family: var(--f-mono); font-size: 13px; font-weight: 400; }
.result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.result .pct { font-family: var(--f-head); font-weight: 900; font-size: clamp(80px, 14vw, 160px); line-height: 1; color: var(--purple); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.result p { font-size: 22px; font-weight: 700; line-height: 1.35; max-width: 600px; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 80px clamp(16px, 4.4vw, 64px) 40px; display: flex; flex-direction: column; gap: 36px; overflow: hidden; }
.footer-big { font-family: var(--f-head); font-weight: 900; font-size: clamp(64px, 11.6vw, 168px); line-height: .95; letter-spacing: -.03em; color: var(--yellow); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; font-weight: 500; font-size: 18px; }
.footer-row nav { display: flex; gap: 28px; color: #bdbdbd; }
.footer-row nav a:hover { color: #fff; }
.footer-row .btn { color: var(--ink); }
.counter { color: #8a8a8a; font-size: 14px; }
.counter b { color: var(--yellow); }

/* ---------- mog overlay ---------- */
.mog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(123, 47, 247, .92), rgba(17, 17, 17, .96)); transition: opacity .2s; }
.mog.show { opacity: 1; pointer-events: auto; cursor: pointer; }
.mog-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; transform: scale(.4) rotate(-10deg); transition: transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.mog.show .mog-inner { transform: scale(1) rotate(-3deg); }
.mog img { width: min(260px, 50vw); aspect-ratio: 1; object-fit: cover; object-position: 50% 25%; border-radius: 50%; border: 5px solid var(--yellow); box-shadow: 0 0 0 8px var(--ink), 0 0 80px var(--red); }
.mog-title { font-family: var(--f-head); font-weight: 900; font-size: clamp(56px, 12vw, 150px); line-height: .9; color: var(--yellow); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--red); }
.mog-sub { font-family: var(--f-hand); font-weight: 700; font-size: 34px; color: #fff; }
.flying { position: fixed; z-index: 101; pointer-events: none; font-family: var(--f-head); font-weight: 900; -webkit-text-stroke: 2px var(--ink); animation: fly 1.6s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
body.shake { animation: shake .4s; }
@keyframes shake { 20% { translate: -8px 4px; } 40% { translate: 8px -4px; } 60% { translate: -6px -2px; } 80% { translate: 6px 2px; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .id-body { grid-template-columns: 240px minmax(0, 1fr); }
  .stats { grid-column: 1 / -1; }
  .meme-grid { grid-template-columns: repeat(2, 316px); }
}
@media (max-width: 1240px) { .nav-cta { display: none; } }
@media (max-width: 1100px) {
  .links { display: none; }
  .burger { display: flex; }
  .links.open {
    display: flex; flex-direction: column; gap: 18px; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); padding: 20px 20px 28px; border-bottom: 3px solid var(--ink); font-size: 22px;
  }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .collage { max-width: 520px; }
  .fact-grid { grid-template-columns: repeat(2, minmax(0, 300px)); }
}
@media (max-width: 680px) {
  .logo { font-size: 16px; }
  .hero-copy { gap: 20px; }
  .hero-copy .sticker { font-size: 13px; white-space: normal; }
  .btn { white-space: normal; text-align: center; }
  .ctas { width: 100%; flex-direction: column; }
  .ctas .btn { width: 100%; }
  .note { font-size: 22px; }
  .marquee { height: 130px; }
  .band { padding: 12px 0; }
  .band-blue { top: 66px; } .band-black { top: 30px; }
  .track { font-size: 18px; }
  .section { padding: 64px 16px; gap: 36px; }
  .strip { padding: 14px 20px; font-size: 13px; }
  .strip .yellow { font-size: 11px; align-self: flex-start; }
  .id-body { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .id-photo img { aspect-ratio: 4 / 3; object-position: 50% 30%; }
  .fields > div { flex-direction: column; gap: 2px; }
  .fields dt { flex: none; font-size: 11px; }
  .fields dd { font-size: 18px; }
  .stats { padding: 20px; }
  .meme-grid { grid-template-columns: minmax(0, 340px); gap: 40px; }
  .meme-add { min-height: 260px; }
  .fact-grid { grid-template-columns: minmax(0, 340px); gap: 28px; }
  .quiz { padding: 24px 20px; border-radius: 24px; gap: 18px; box-shadow: 8px 8px 0 var(--ink); }
  .opt { font-size: 17px; padding: 14px 16px; }
  .footer { padding-top: 48px; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}
/* ---------- nav tools ---------- */
.nav-tools { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; min-width: 46px; padding: 0 12px; justify-content: center;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--f-mono); font-size: 13px; transition: transform .12s, background .15s;
}
.icon-btn:hover { transform: translate(-1px, -1px); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[aria-pressed="true"] { background: var(--purple); color: #fff; }
.phonk-btn[aria-pressed="true"] svg { animation: wiggle .45s ease-in-out infinite; }
@keyframes wiggle { 50% { rotate: 14deg; scale: 1.15; } }
.link-btn { text-decoration: underline; color: var(--yellow); }

/* ---------- phonk mode ---------- */
body.phonk .six, body.phonk .seven { animation-duration: .44s; }
body.phonk.beat .polaroid img, body.phonk.beat h1 { animation: thump .22s ease-out; }
body.phonk.beat .cat-circle { scale: 1.08; }
@keyframes thump { 40% { scale: 1.04; filter: saturate(1.6) contrast(1.15); } }

/* ---------- pop text, trail, pigeon ---------- */
.pop-text { position: fixed; z-index: 120; translate: -50% -50%; pointer-events: none; font-family: var(--f-head); font-weight: 900; font-size: 28px; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; animation: pop-up 1s ease-out forwards; }
@keyframes pop-up { to { translate: -50% -160%; opacity: 0; } }

body.lolly, body.lolly a, body.lolly button, body.lolly label, body.lolly canvas {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cline x1='20' y1='20' x2='32' y2='32' stroke='%23fff' stroke-width='5' stroke-linecap='round'/%3E%3Cline x1='20' y1='20' x2='32' y2='32' stroke='%23999' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='13' cy='13' r='11' fill='%23FFD60A' stroke='%23111' stroke-width='2'/%3E%3Cpath d='M13 13m-7 0a7 7 0 0 1 14 0' fill='none' stroke='%23FF3B30' stroke-width='3'/%3E%3Cpath d='M13 13m-4 0a4 4 0 0 0 8 0' fill='none' stroke='%232F6BFF' stroke-width='3'/%3E%3Ccircle cx='13' cy='13' r='1.5' fill='%2334C759'/%3E%3C/svg%3E") 4 4, auto;
}
.trail { position: fixed; z-index: 90; width: 12px; height: 12px; border-radius: 50%; translate: -50% -50%; pointer-events: none; animation: trail .6s ease-out forwards; }
@keyframes trail { to { scale: .1; opacity: 0; } }

.pigeon { position: fixed; left: 0; top: 0; z-index: 95; width: 160px; height: 120px; cursor: pointer; }
.pigeon img { position: absolute; left: 25px; top: 5px; width: 110px; height: 110px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 4px solid var(--ink); box-shadow: 0 0 30px rgba(255, 59, 48, .7); }
.pigeon .wing { position: absolute; top: 34px; width: 56px; height: 30px; background: #d9d2f0; border: 3px solid var(--ink); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: flap .18s ease-in-out infinite alternate; }
.pigeon .wing.l { left: -6px; transform-origin: 100% 50%; }
.pigeon .wing.r { right: -6px; transform-origin: 0% 50%; }
@keyframes flap { from { rotate: -28deg; } to { rotate: 22deg; } }
.pigeon .wing.r { animation-direction: alternate-reverse; }
.laser { position: fixed; z-index: 94; height: 6px; transform-origin: 0 50%; border-radius: 3px; pointer-events: none; opacity: 0; background: #fff; box-shadow: 0 0 6px 3px #ff2a2a, 0 0 18px 8px rgba(255, 0, 0, .55); transition: opacity .1s; }
.burned { filter: sepia(1) saturate(3) hue-rotate(-20deg) brightness(.55) contrast(1.3); animation: smolder .25s steps(2) 6; transition: filter 1.2s; }
@keyframes smolder { 50% { translate: 2px -1px; } }
.smoke { position: absolute; z-index: 93; width: 40px; height: 40px; border-radius: 50%; background: rgba(60, 60, 60, .55); pointer-events: none; filter: blur(4px); animation: smoke 1.8s ease-out forwards; }
@keyframes smoke { from { scale: .3; opacity: .9; } to { translate: 0 -120px; scale: 2.2; opacity: 0; } }
.burn-tag { position: absolute; z-index: 96; translate: -50% -50%; rotate: -8deg; font-family: var(--f-mono); font-size: 18px; color: #fff; background: var(--red); border: 3px solid var(--ink); padding: 8px 14px; border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); pointer-events: none; animation: pop .4s; white-space: nowrap; }

/* ---------- meme generator ---------- */
.gen-card { width: 100%; max-width: 1100px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; background: #fff; border: 3px solid var(--ink); border-radius: 32px; box-shadow: 12px 12px 0 var(--ink); padding: 32px; }
.gen-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; }
#memeCanvas { width: 100%; aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 20px; touch-action: none; background: var(--cream); }
.gen-tip { color: var(--purple); font-size: 24px; }
.gen-controls { display: flex; flex-direction: column; gap: 20px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.row { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.field-label { font-family: var(--f-mono); font-size: 12px; color: var(--grey); }
.field input[type=text] { font: 700 18px var(--f-body); padding: 14px 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--cream); color: var(--ink); }
.field input[type=text]:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-weight: 700; font-size: 14px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.chip.on { background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.check input, input[type=range] { accent-color: var(--purple); }
input[type=range] { flex: 1; min-width: 140px; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }

/* ---------- game ---------- */
.section-blue { background: var(--blue); border-top: 3px solid var(--ink); }
.game-wrap { width: 100%; max-width: 760px; background: var(--ink); border: 3px solid var(--ink); border-radius: 28px; box-shadow: 12px 12px 0 var(--yellow); overflow: hidden; }
.game-hud { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; color: #fff; font-family: var(--f-mono); font-size: 15px; }
.game-hud b { color: var(--yellow); font-family: var(--f-head); font-weight: 900; font-size: 22px; margin-left: 6px; }
.lives { color: var(--red); font-size: 24px; letter-spacing: 4px; }
.game-stage { position: relative; height: 480px; background: radial-gradient(circle at 50% 120%, #3a1d7a, #12082b 70%); }
#gameCanvas { width: 100%; height: 100%; display: block; touch-action: manipulation; }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; color: #fff; padding: 24px; background: rgba(17, 8, 43, .82); }
.game-overlay[hidden] { display: none; }
.go-title { font-family: var(--f-head); font-weight: 900; font-size: clamp(32px, 5vw, 52px); color: var(--yellow); }
.go-score { font-family: var(--f-head); font-weight: 900; font-size: 96px; line-height: 1; -webkit-text-stroke: 4px var(--yellow); paint-order: stroke fill; color: var(--purple); }
.game-overlay p { font-size: 18px; line-height: 1.4; max-width: 420px; }
.go-best { color: #bdbdbd; }

/* ---------- cosmos theme ---------- */
body.cosmos {
  --cream: #160a35;
  color: #fff;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(123, 47, 247, .55), transparent 55%),
    radial-gradient(ellipse at 85% 60%, rgba(47, 107, 255, .45), transparent 55%),
    radial-gradient(ellipse at 40% 95%, rgba(255, 59, 48, .25), transparent 50%),
    #0b0420;
  background-attachment: fixed;
}
body.cosmos .nav { background: rgba(11, 4, 32, .88); backdrop-filter: blur(8px); border-color: #c9a8ff; }
body.cosmos .marquee, body.cosmos .section, body.cosmos .section-yellow, body.cosmos .section-black, body.cosmos .section-purple, body.cosmos .section-blue { background: transparent; }
body.cosmos .section-yellow, body.cosmos .section-blue { border-color: #c9a8ff; }
body.cosmos h1 .red { text-shadow: 0 0 18px #ff3b30, 0 0 48px rgba(255, 59, 48, .7); }
body.cosmos h1 .blue { text-shadow: 0 0 18px #2f6bff, 0 0 48px rgba(47, 107, 255, .8); }
body.cosmos h2 { color: #fff; text-shadow: 0 0 14px #c9a8ff, 0 0 40px #7b2ff7; }
body.cosmos .footer-big { text-shadow: 0 0 20px var(--yellow), 0 0 60px rgba(255, 214, 10, .5); }
body.cosmos .heading .hand { color: var(--yellow); }
body.cosmos .note { color: #c9a8ff; }
body.cosmos .logo { color: #fff; }
body.cosmos .btn, body.cosmos .icon-btn:not([aria-pressed="true"]), body.cosmos .id-card, body.cosmos .meme, body.cosmos .meme-add, body.cosmos .fact, body.cosmos .quiz, body.cosmos .gen-card, body.cosmos .chip { color: var(--ink); }
body.cosmos .stats, body.cosmos .opt, body.cosmos .meme-add, body.cosmos .field input[type=text] { background: #efe6ff; color: var(--ink); }
body.cosmos .fields dd { color: var(--ink); }
body.cosmos .burger { box-shadow: 0 0 16px var(--yellow); }
body.cosmos .links.open { background: #0b0420; }
body.cosmos .polaroid, body.cosmos .id-card, body.cosmos .gen-card, body.cosmos .quiz { box-shadow: 0 0 0 3px var(--ink), 0 0 40px rgba(201, 168, 255, .55); }
body.cosmos .rainbow { opacity: .75; filter: drop-shadow(0 0 24px rgba(201, 168, 255, .6)); }

/* ---------- deco stickers (below the fold) ---------- */
.section { position: relative; }
.section > :not(.deco) { position: relative; z-index: 1; }
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.deco-item { position: absolute; will-change: translate; }
.deco-num { font-family: var(--f-head); font-weight: 900; font-size: var(--size); line-height: 1; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.deco-sticker { font-family: var(--f-mono); font-size: 16px; color: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 16px; box-shadow: 4px 4px 0 var(--ink); white-space: nowrap; }
.section-black .deco-sticker { box-shadow: 4px 4px 0 #fff; }
.deco-circle { width: var(--size); aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); overflow: hidden; background: #fff; }
.deco-circle img { width: 100%; height: 100%; object-fit: cover; }
.deco-burst { width: var(--size); aspect-ratio: 1; display: grid; place-items: center; background: var(--yellow); clip-path: polygon(50% 0%, 59% 13%, 74% 5%, 75% 21%, 92% 18%, 85% 33%, 100% 40%, 87% 50%, 100% 60%, 85% 67%, 92% 82%, 75% 79%, 74% 95%, 59% 87%, 50% 100%, 41% 87%, 26% 95%, 25% 79%, 8% 82%, 15% 67%, 0% 60%, 13% 50%, 0% 40%, 15% 33%, 8% 18%, 25% 21%, 26% 5%, 41% 13%); }
.deco-burst span { font-family: var(--f-head); font-weight: 900; font-size: calc(var(--size) * .14); text-align: center; line-height: 1.05; color: var(--ink); }
.deco-lolly svg, .deco-star svg { display: block; width: var(--size); height: auto; }
.deco-rainbow { width: var(--size); aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0; background: radial-gradient(50% 100% at 50% 100%, transparent 0 44%, var(--purple) 44% 50%, var(--blue) 50% 59%, var(--green) 59% 68%, var(--yellow) 68% 77%, var(--orange) 77% 86%, var(--red) 86% 95%, transparent 95%); }
body.cosmos .deco-circle { box-shadow: 0 0 0 4px var(--ink), 0 0 30px rgba(201, 168, 255, .6); }
body.cosmos .deco-num { text-shadow: 0 0 24px currentColor; }

/* ---------- mini tickers between sections ---------- */
.mini-marquee { position: relative; height: 0; z-index: 6; }
.mini-band { position: absolute; left: -5%; width: 110%; top: -24px; border-block: 3px solid var(--ink); padding: 9px 0; overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.mini-band .track { font-size: 18px; animation-duration: 22s; }
.mini-band .track span { padding-right: 28px; }
.mb-red { background: var(--red); color: #fff; }
.mb-green { background: var(--green); color: var(--ink); }
.mb-yellow { background: var(--yellow); color: var(--ink); }
.mb-pink { background: #FF8AD8; color: var(--ink); }
.mb-ink { background: var(--ink); color: var(--yellow); border-color: var(--yellow); }
.mb-blue { background: var(--blue); color: #fff; }
body.cosmos .mini-band { box-shadow: 0 0 24px rgba(201, 168, 255, .5); }

/* ---------- scroll reveal, stamp slam ---------- */
.reveal { opacity: 0; translate: 0 70px; scale: .92; transition: opacity .55s ease, translate .8s cubic-bezier(.2, 1.25, .4, 1), scale .8s cubic-bezier(.2, 1.25, .4, 1), transform .2s; }
.reveal.in { opacity: 1; translate: 0 0; scale: 1; }
.stamp.armed { opacity: 0; scale: 3; }
.stamp.slam { animation: slam .38s cubic-bezier(.5, 0, .7, 1.4) forwards; }
@keyframes slam { from { opacity: 0; scale: 3; } 70% { opacity: 1; scale: .88; } to { opacity: 1; scale: 1; } }
.id-card.jolt { animation: jolt .35s; }
@keyframes jolt { 25% { translate: 0 6px; } 50% { translate: -3px -2px; } 75% { translate: 2px 2px; } }

/* ---------- phonk: shouts, flash, bounce, VHS ---------- */
body.phonk .track { animation-duration: 9s; }
body.phonk .track.rev { animation-duration: 8s; }
body.phonk .mini-band .track { animation-duration: 7s; }
body.phonk.beat :is(.meme, .meme-add, .fact, .deco-item, .collage .sticker, .stats, .opt, .chip, .game-hud b) { animation: bop .28s ease-out; }
body.phonk.beat .heading h2 { animation: thump .22s ease-out; }
@keyframes bop { 35% { scale: 1.07; } }
body.phonk .polaroid img { animation: vhs .3s steps(2) infinite; }
@keyframes vhs {
  0% { filter: drop-shadow(4px 0 0 rgba(255, 0, 60, .75)) drop-shadow(-4px 0 0 rgba(0, 200, 255, .75)); }
  50% { filter: drop-shadow(-3px 1px 0 rgba(255, 0, 60, .75)) drop-shadow(3px -1px 0 rgba(0, 200, 255, .75)) saturate(1.5); }
}
.beat-flash { position: fixed; inset: 0; z-index: 89; pointer-events: none; background: var(--flash, var(--yellow)); opacity: 0; }
.beat-flash.on { animation: flash .38s ease-out; }
@keyframes flash { from { opacity: .2; } to { opacity: 0; } }
body.cosmos .beat-flash { mix-blend-mode: screen; }
.shout { position: fixed; z-index: 97; translate: -50% -50%; pointer-events: none; padding: 34px 40px; background: var(--bg); clip-path: polygon(50% 0%, 61% 18%, 82% 6%, 80% 28%, 100% 30%, 86% 48%, 100% 66%, 79% 70%, 84% 94%, 62% 80%, 50% 100%, 38% 80%, 16% 94%, 21% 70%, 0% 66%, 14% 48%, 0% 30%, 20% 28%, 18% 6%, 39% 18%); animation: shout .75s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.shout span { font-family: var(--f-head); font-weight: 900; font-size: clamp(26px, 4.6vw, 60px); color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; white-space: nowrap; }
@keyframes shout { 0% { scale: 0; } 25% { scale: 1.15; } 40% { scale: 1; opacity: 1; } 100% { scale: 1.05; opacity: 0; } }

/* ---------- cosmos depth ---------- */
.space { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; display: none; }
body.cosmos .space { display: block; }
.stars { position: absolute; inset: 0; background-repeat: repeat; }
.stars.s1 { background-image: radial-gradient(1px 1px at 12px 20px, #fff 50%, transparent 51%), radial-gradient(1px 1px at 110px 90px, #c9a8ff 50%, transparent 51%), radial-gradient(1px 1px at 60px 140px, #fff 50%, transparent 51%); background-size: 170px 170px; opacity: .55; }
.stars.s2 { background-image: radial-gradient(1.5px 1.5px at 40px 60px, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 210px 190px, #ffd60a 50%, transparent 51%); background-size: 280px 280px; opacity: .8; }
.stars.s3 { background-image: radial-gradient(2.5px 2.5px at 90px 120px, #fff 50%, transparent 51%), radial-gradient(2px 2px at 330px 300px, #8eb3ff 50%, transparent 51%); background-size: 440px 440px; animation: twinkle 3s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .45; } }
.planet { position: absolute; border-radius: 50%; animation: drift 38s ease-in-out infinite alternate; }
.planet.p1 { width: 190px; aspect-ratio: 1; left: 4%; top: 32%; background: radial-gradient(circle at 32% 30%, #ff9ee0, #7b2ff7 55%, #2a0b5e); box-shadow: 0 0 70px rgba(201, 168, 255, .45); opacity: .8; }
.planet.p2 { width: 120px; aspect-ratio: 1; right: 7%; top: 62%; background: radial-gradient(circle at 35% 30%, #a6c4ff, #2f6bff 55%, #0d2470); box-shadow: 0 0 50px rgba(47, 107, 255, .5); animation-duration: 52s; opacity: .85; }
.planet.p2 i { position: absolute; inset: 38% -48%; border: 7px solid rgba(255, 214, 10, .75); border-radius: 50%; rotate: -16deg; }
.planet.p3 { width: 56px; aspect-ratio: 1; left: 68%; top: 12%; background: radial-gradient(circle at 35% 30%, #ffd2a0, #ff3b30 60%, #6b0f0a); box-shadow: 0 0 30px rgba(255, 59, 48, .5); animation-duration: 30s; }
@keyframes drift { to { transform: translate(50px, -40px) rotate(25deg); } }
.shooting { position: absolute; width: 170px; height: 2px; transform-origin: 0 50%; rotate: -26.6deg; background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); border-radius: 2px; box-shadow: 0 0 8px #fff; animation: shoot 1.1s ease-in forwards; }
@keyframes shoot { from { translate: 0 0; opacity: 0; } 12% { opacity: 1; } to { translate: -440px 220px; opacity: 0; } }

@media (max-width: 900px) {
  .gen-card { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
}
@media (max-width: 680px) {
  .nav-tools { gap: 8px; }
  .icon-btn .label { display: none; }
  .icon-btn { height: 44px; min-width: 44px; padding: 0; }
  .gen-card { border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); }
  .gen-actions .btn { flex: 1; }
  .game-stage { height: 440px; }
  .game-hud { padding: 12px 14px; font-size: 12px; }
  .go-score { font-size: 72px; }
  .deco-item:not(.keep-mobile) { display: none; }
  /* on phones the few kept stickers sit on top, slapped onto the card edges */
  .deco { z-index: 2; }
  .deco-item { scale: .45; }
  .deco-item[style*="left:"] { left: -40px !important; }
  .deco-item[style*="right:"] { right: -40px !important; }
  .mini-band .track { font-size: 14px; }
  .mini-band { padding: 7px 0; top: -18px; }
  .planet.p1 { width: 120px; }
}

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