:root {
  --ink: #111; --paper: #fff; --soft: #f5f5f3; --line: 3px;
  --hand: "Patrick Hand", "Comic Neue", "Comic Sans MS", cursive;
  --bold: "Patrick Hand", "Comic Neue", cursive;
  --sans: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --pencil: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><g transform='rotate(45 16 16)'><rect x='12' y='-2' width='8' height='24' rx='1' fill='white' stroke='black' stroke-width='2'/><path d='M12 22 L16 31 L20 22 Z' fill='white' stroke='black' stroke-width='2' stroke-linejoin='round'/><path d='M15 28 L16 31 L17 28 Z' fill='black'/></g></svg>") 3 29, auto;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.5 var(--sans); cursor: var(--pencil); overflow-x: hidden; }
a, button, select, label, input[type=checkbox] { cursor: var(--pencil); }
a { color: inherit; }
::selection { background: var(--ink); color: var(--paper); }
body.shake { animation: shake .5s; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }

/* header + ticker */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--paper); border-bottom: var(--line) solid var(--ink); }
.brand { font: 36px/1 var(--bold); text-decoration: none; }
.nav { display: flex; gap: 24px; margin: 0 auto; font: 22px/1 var(--hand); }
.nav a { text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 3px no-repeat; transition: background-size .2s; padding-bottom: 3px; }
.nav a:hover { background-size: 100% 3px; }
.act { display: flex; gap: 8px; }
.ticker { overflow: hidden; background: var(--ink); color: var(--paper); border-bottom: var(--line) solid var(--ink); }
.ticker-in { display: inline-flex; white-space: nowrap; font: 22px/1 var(--hand); padding: 9px 0; animation: tick 30s linear infinite; }
.ticker-in span { padding: 0 22px; }
@keyframes tick { to { transform: translateX(-50%); } }

/* buttons: hand-drawn boxes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 6px 24px; font: 24px/1 var(--hand); color: var(--ink); background: var(--paper); border: var(--line) solid var(--ink); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; text-decoration: none; transition: transform .1s, box-shadow .1s; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { transform: translate(-1px, -1px) rotate(-1.2deg); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.solid { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 #888; }
.btn.solid:hover { box-shadow: 6px 6px 0 #888; }
.btn.sm { min-height: 40px; padding: 4px 16px; font-size: 20px; box-shadow: 3px 3px 0 var(--ink); }
.btn.sm.solid { box-shadow: 3px 3px 0 #888; }
.btn:focus-visible, .ca:focus-visible, .poke:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, .ni:focus-visible { outline: 3px dashed var(--ink); outline-offset: 4px; }

/* scribble underline under headings */
.scrib { position: relative; display: inline-block; }
.scrib::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -10px; height: 18px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 18' preserveAspectRatio='none'><path d='M3 11 C 60 3, 110 15, 170 8 S 260 4, 297 10' fill='none' stroke='black' stroke-width='4' stroke-linecap='round'/></svg>") 0 0 / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0); transition: clip-path .9s cubic-bezier(.6,.1,.3,1); }
.in .scrib::after, .hero .scrib::after { clip-path: inset(0 0 0 0); }
.hero .scrib::after { transition-delay: .2s; }

/* reveal on scroll */
.sec > *:not(h2) { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.sec.in > * { opacity: 1; transform: none; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 30px; max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; min-height: calc(100vh - 110px); }
.hero-art { position: relative; text-align: center; }
.poke { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; }
.poke svg { width: 100%; height: auto; display: block; transition: transform .12s; }
.poke:active svg { transform: scale(.97, 1.03); }
.poke.squish svg { animation: squish .35s; }
@keyframes squish { 30% { transform: scale(1.06, .92); } 60% { transform: scale(.97, 1.04); } }
.poke.mad svg { animation: mad .6s; }
@keyframes mad { 20% { transform: rotate(-3deg) scale(1.05); } 40% { transform: rotate(3deg) scale(1.08); } 60% { transform: rotate(-2deg) scale(1.1); } }
.bubble { position: absolute; left: 8%; top: 2%; z-index: 2; max-width: 70%; padding: 12px 18px; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 22px 18px 24px 14px; font: 26px/1.2 var(--hand); animation: pop .25s; }
.bubble::after { content: ""; position: absolute; left: 60%; bottom: -16px; width: 22px; height: 22px; background: var(--paper); border-right: var(--line) solid var(--ink); border-bottom: var(--line) solid var(--ink); transform: rotate(35deg) skewX(15deg); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.hint { font: 22px/1 var(--hand); color: #777; margin: 6px 0 0; }
h1 { font: 104px/1 var(--bold); margin: 0 0 24px; }
.lines { list-style: none; padding: 0; margin: 0; font: 34px/1.35 var(--hand); }
.lines li { opacity: 0; transform: translateY(8px); animation: line .5s forwards; }
.lines li:nth-child(1) { animation-delay: .4s; } .lines li:nth-child(2) { animation-delay: 1s; } .lines li:nth-child(3) { animation-delay: 1.6s; } .lines li:nth-child(4) { animation-delay: 2.2s; } .lines li:nth-child(5) { animation-delay: 2.8s; }
@keyframes line { to { opacity: 1; transform: none; } }
.be { font: 66px/1 var(--bold); margin: 22px 0 26px; opacity: 0; animation: line .6s 3.5s forwards; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.cta.center { justify-content: center; }
.ca { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; padding: 10px 16px; background: var(--soft); border: var(--line) solid var(--ink); border-radius: 12px 4px 14px 6px; font: 16px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace; color: var(--ink); }
.ca .k { font: 22px/1 var(--hand); }
.ca .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca .c { font: 20px/1 var(--hand); text-decoration: underline; }
.ca:hover { background: #ececea; }

/* sections */
.sec { max-width: 1200px; margin: 0 auto; padding: 90px 24px; border-top: var(--line) solid var(--ink); }
h2 { font: 74px/1 var(--bold); margin: 0 0 36px; text-align: center; }
h3 { font: 44px/1 var(--bold); margin: 0 0 14px; }
.sub { text-align: center; font: 26px/1.35 var(--hand); margin: -10px 0 36px; }

/* game */
.game { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: start; }
.screen { position: relative; border: var(--line) solid var(--ink); border-radius: 14px 6px 16px 8px; overflow: hidden; height: 600px; background: var(--paper); box-shadow: 8px 8px 0 var(--ink); }
.yt-top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; border-bottom: var(--line) solid var(--ink); font: 22px/1 var(--hand); background: var(--paper); position: relative; z-index: 2; }
.yt-top .logo { font: 26px/1 var(--bold); }
.yt-top .search { flex: 1; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; color: #999; }
.yt-top .score b, .yt-top .timer b { font: 28px/1 var(--bold); }
.cards { position: absolute; inset: 52px 0 0; overflow: hidden; }
.card { position: absolute; left: 4%; width: 44%; border: var(--line) solid var(--ink); border-radius: 10px 4px 12px 6px; background: var(--paper); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.card:nth-child(odd) { left: 52%; }
.thumb { height: 96px; border: 2px solid var(--ink); border-radius: 6px; background: var(--soft); position: relative; overflow: hidden; }
.thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .tt { font: 20px/1.15 var(--hand); min-height: 46px; }
.card .ch { font: 15px/1 var(--sans); color: #666; }
.ni { align-self: flex-start; font: 18px/1 var(--hand); padding: 6px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); }
.ni:hover { background: var(--ink); color: var(--paper); }
.card.gone { animation: gone .45s forwards; pointer-events: none; }
.card.gone::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M6 8 L94 92 M94 8 L6 92' stroke='black' stroke-width='6' stroke-linecap='round' fill='none'/></svg>") 0 0 / 100% 100%; }
.card.oops { animation: oops .5s; background: var(--ink); color: var(--paper); }
.card.oops .ch { color: #ccc; }
@keyframes gone { 60% { transform: scale(.96) rotate(-3deg); opacity: 1; } to { transform: scale(.8) rotate(6deg); opacity: 0; } }
@keyframes oops { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.floaty { position: absolute; z-index: 5; font: 34px/1 var(--bold); pointer-events: none; animation: floaty .8s forwards; }
@keyframes floaty { to { transform: translateY(-50px); opacity: 0; } }
.overlay { position: absolute; inset: 52px 0 0; z-index: 4; display: grid; place-items: center; background: rgba(255,255,255,.92); text-align: center; padding: 20px; }
.ov-in { max-width: 520px; font: 24px/1.35 var(--hand); }
.ov-title { font: 48px/1.05 var(--bold); margin: 0 0 12px; }
.best { color: #666; margin-top: 16px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row.center { justify-content: center; margin-top: 18px; }
.side { text-align: center; position: sticky; top: 130px; }
.side svg { width: 100%; height: auto; }
.side-say { font: 26px/1.2 var(--hand); border: var(--line) solid var(--ink); border-radius: 18px 12px 20px 10px; padding: 10px 14px; margin: 8px 0 0; min-height: 60px; }

/* panels */
.panels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.panel { margin: 0; border: var(--line) solid var(--ink); border-radius: 6px 14px 8px 12px; padding: 14px 14px 18px; background: var(--paper); box-shadow: 6px 6px 0 var(--ink); transition: transform .2s; }
.panel:nth-child(2n) { transform: rotate(1deg); } .panel:nth-child(2n+1) { transform: rotate(-.8deg); }
.panel:hover { transform: rotate(0) translateY(-6px); }
.pa svg { width: 100%; height: auto; display: block; }
.panel figcaption { font: 24px/1.25 var(--hand); text-align: center; margin-top: 10px; }

/* vs */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.col { border: var(--line) solid var(--ink); border-radius: 10px 4px 12px 6px; padding: 28px 32px; box-shadow: 6px 6px 0 var(--ink); }
.col.slop { background: var(--ink); color: var(--paper); box-shadow: 6px 6px 0 #888; }
.col ul { margin: 0; padding-left: 22px; font: 26px/1.5 var(--hand); }
.col.slop li { position: relative; width: fit-content; }
.col.slop li::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 3px; background: var(--paper); transform: scaleX(0) rotate(-2deg); transform-origin: left; transition: transform .35s; }
.col.slop li:hover::after, .col.slop.done li::after { transform: scaleX(1) rotate(-2deg); }
.hover-hint { font: 18px/1 var(--hand); color: #aaa; margin: 14px 0 0; }

/* meme + pledge */
.maker, .pledge { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; align-items: start; }
canvas { width: 100%; height: auto; border: var(--line) solid var(--ink); border-radius: 6px; background: #fff; box-shadow: 8px 8px 0 var(--ink); }
.ctl { display: flex; flex-direction: column; gap: 16px; font: 24px/1.2 var(--hand); }
.ctl label { display: flex; flex-direction: column; gap: 6px; }
.ctl label.check { flex-direction: row; align-items: center; gap: 12px; }
.check input { width: 26px; height: 26px; accent-color: #111; }
textarea, input, select { font: 24px/1.3 var(--hand); color: var(--ink); background: var(--paper); border: var(--line) solid var(--ink); border-radius: 8px 4px 10px 4px; padding: 10px 12px; }

.coin { text-align: center; }
.center-ca { margin: 0 auto 8px; }
.foot { border-top: var(--line) solid var(--ink); padding: 40px 24px 60px; text-align: center; font-size: 14px; color: #444; }
.foot p { max-width: 760px; margin: 0 auto 10px; }
.foot .tiny { font: 22px/1 var(--hand); color: var(--ink); margin-top: 18px; }

/* "or else" takeover */
.orelse { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--ink); color: var(--paper); text-align: center; animation: fadein .25s; }
.orelse p { font: 700 clamp(44px, 8vw, 110px)/1.05 var(--bold); margin: 0; padding: 20px; }
@keyframes fadein { from { opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 220%); visibility: hidden; background: var(--ink); color: var(--paper); font: 22px/1.2 var(--hand); padding: 12px 22px; border-radius: 12px 4px 14px 6px; transition: transform .25s, visibility .25s; z-index: 60; max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); visibility: visible; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: 0; padding-top: 20px; }
  .hero-art { max-width: 440px; margin: 0 auto; }
  .cta { justify-content: center; }
  .panels { grid-template-columns: 1fr 1fr; }
  .vs, .maker, .pledge { grid-template-columns: 1fr; }
  .game { grid-template-columns: 1fr; }
  .side { display: none; }
  .nav { display: none; }
  .act { margin-left: auto; }
  h1 { font-size: 76px; } h2 { font-size: 54px; } .lines { font-size: 28px; } .be { font-size: 52px; }
  .screen { height: 560px; }
}
@media (max-width: 520px) {
  .panels { grid-template-columns: 1fr; }
  .bar { padding: 10px 14px; }
  .card { width: 92%; } .card:nth-child(odd) { left: 4%; }
  .yt-top .search { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lines li, .be { animation: none; opacity: 1; transform: none; }
  .sec > *:not(h2) { opacity: 1; transform: none; transition: none; }
  .ticker-in { animation: none; }
  body.shake { animation: none; }
}

/* ================= intro ================= */
#intro { display: none; }
.intro-on #intro { display: block; position: fixed; inset: 0; z-index: 100; background: #fff; overflow: hidden; }
.intro-on { overflow: hidden; }
.intro-on .lines li, .intro-on .be { animation-play-state: paused; }
.in-stage { position: absolute; inset: 0; transform-origin: 50% 50%; }
.in-bob { position: absolute; left: 50%; top: 52%; width: min(78vw, 760px); transform: translate(-56%, -58%); }
.in-bob svg { width: 100%; height: auto; display: block; overflow: visible; }
.in-title { position: absolute; left: 50%; top: calc(52% + min(29vw, 280px)); transform: translateX(-50%); font: clamp(44px, 7vw, 92px)/1 var(--hand); white-space: nowrap; opacity: 0; }
.in-ul { position: absolute; left: -10px; width: calc(100% + 20px); bottom: -14px; height: 24px; clip-path: inset(0 100% 0 0); }
.in-pencil { position: absolute; width: 54px; height: 144px; left: 0; top: 0; pointer-events: none; }
.in-skip { position: absolute; right: 22px; bottom: 22px; font: 22px/1 var(--hand); color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px; padding: 8px 18px; z-index: 2; }
.in-skip:hover { background: var(--ink); color: #fff; }

/* meme gallery + lightbox */
.gal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.gal button { padding: 0; border: 3px solid var(--ink); border-radius: 6px 12px 8px 10px; background: #fff; overflow: hidden; box-shadow: 5px 5px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.gal button:nth-child(odd) { transform: rotate(-1deg); } .gal button:nth-child(even) { transform: rotate(1deg); }
.gal button:hover { transform: rotate(0) translateY(-5px) scale(1.03); box-shadow: 8px 8px 0 var(--ink); }
.gal img { width: 100%; height: auto; display: block; }
.lb { position: fixed; inset: 0; z-index: 70; background: rgba(255,255,255,.96); display: grid; place-items: center; padding: 20px; }
.lb-in { position: relative; max-width: min(92vw, 640px); text-align: center; }
.lb img { width: 100%; height: auto; border: 4px solid var(--ink); border-radius: 8px; box-shadow: 10px 10px 0 var(--ink); background: #fff; }
.lb-x { position: absolute; top: -18px; right: -18px; width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font: 36px/1 var(--hand); color: var(--ink); }
@media (max-width: 980px) { .gal { grid-template-columns: repeat(2, 1fr); } }

/* origins */
.origin { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.o-text p { font: 28px/1.4 var(--hand); margin: 0 0 18px; }
.o-text .credit { font: 16px/1.4 var(--sans); color: #666; margin-top: 22px; }
.o-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 980px) { .origin { grid-template-columns: 1fr; } .o-art { max-width: 380px; margin: 0 auto; } }
