@font-face { font-family: "Lilita One"; src: url("../fonts/lilita-one-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --clay-50: #F9F3F0; --clay-100: #F4E6E1; --clay-200: #E9CDC3; --clay-500: #BE6E50; --clay-600: #A0563B; --clay-700: #7F442F;
  --leaf-100: #E7EEDD; --leaf-500: #89AC56; --leaf-700: #5A7138; --leaf-800: #47592C;
  --sand-50: #F7F6F5; --sand-200: #DDD9D4; --sand-600: #736960; --sand-700: #554D45;
  --char-900: #211D1A; --char-line: #433A33;
  --gold: #E8B84B; --cream: #F8F0F0; --sage: #EEF4E6; --ink: #303030; --paper: #FFFFFF;
  --shadow-card: 0 2px 8px rgba(48,48,48,.08); --shadow-pop: 0 8px 24px rgba(48,48,48,.12);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand-50); color: var(--ink); font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf-700); }
h1, h2, h3 { font-family: "Lilita One", "Poppins", sans-serif; font-weight: 400; margin: 0; letter-spacing: .01em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--sand-200); }
.site-header .wrap { display: flex; justify-content: center; padding-top: 14px; padding-bottom: 14px; }
.site-header img { width: 260px; height: auto; }
@media (min-width: 768px) { .site-header img { width: 320px; } }

/* Hero */
.hero { background: var(--cream); padding: 48px 0 56px; text-align: center; position: relative; overflow: hidden; }
.hero .monkey { width: 132px; height: 132px; margin: 0 auto 8px; animation: swing 3.2s ease-in-out infinite; transform-origin: 50% 8%; }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .hero .monkey { animation: none; } }
.eyebrow { display: inline-block; font-size: .75rem; line-height: 1.4; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--clay-700); background: var(--clay-100); border-radius: 9999px; padding: 6px 14px; margin-bottom: 16px; }
.hero h1 { font-size: 2.5rem; line-height: 1.1; color: var(--clay-500); }
.hero h1 .a { color: var(--leaf-500); }
@media (min-width: 768px) { .hero h1 { font-size: 3.5rem; } }
.hero p { max-width: 640px; margin: 16px auto 0; font-size: 1.125rem; color: var(--sand-700); }

/* Stats */
.stats { background: var(--char-900); color: #fff; padding: 40px 0; }
.stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; text-align: center; }
@media (min-width: 900px) { .stats ul { grid-template-columns: repeat(4, 1fr); } }
.stats .num { display: block; font-family: "Lilita One", sans-serif; font-size: 1.75rem; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .stats .num { font-size: 2.25rem; } }
.stats .label { display: block; margin-top: 6px; font-size: .875rem; font-weight: 600; color: var(--sand-200); }

/* Section bars */
.bar { background: var(--clay-500); color: #fff; text-align: center; padding: 18px 16px; }
.bar h2 { font-size: 1.75rem; line-height: 1.2; }
@media (min-width: 768px) { .bar h2 { font-size: 2.25rem; } }

/* Thank you */
.thanks { background: var(--sage); padding: 48px 0; }
.thanks .grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .thanks .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.card { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-card); padding: 24px; }
.card .icon { width: 44px; height: 44px; border-radius: 9999px; display: grid; place-items: center; background: var(--leaf-100); color: var(--leaf-700); margin-bottom: 12px; }
.card h3 { font-size: 1.375rem; line-height: 1.25; color: var(--clay-700); margin-bottom: 8px; }
.card p { margin: 0; color: var(--sand-700); }
.letter { max-width: 720px; margin: 0 auto 32px; text-align: center; font-size: 1.125rem; color: var(--ink); }
.letter p { margin: 0 0 12px; }
.letter .sign { font-family: "Lilita One", sans-serif; color: var(--clay-500); font-size: 1.5rem; margin-top: 16px; }

/* Charity CTA */
.charity { background: var(--paper); padding: 48px 0; text-align: center; }
.charity h2 { font-size: 2rem; line-height: 1.15; color: var(--clay-700); }
.charity .big { font-family: "Lilita One", sans-serif; color: var(--leaf-500); font-size: 3rem; line-height: 1.1; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .charity .big { font-size: 4rem; } }
.charity p { max-width: 620px; margin: 8px auto 0; color: var(--sand-700); }
.btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; background: var(--leaf-700); color: #fff; font-weight: 700; text-decoration: none; padding: 14px 28px; border-radius: 9999px; transition: background .15s, box-shadow .15s, transform .15s; }
.btn:hover, .btn:focus-visible { background: var(--leaf-800); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* Winners */
.winners { background: var(--cream); padding: 48px 0 56px; }
.winners .intro { text-align: center; max-width: 620px; margin: 0 auto 28px; color: var(--sand-700); font-size: 1.125rem; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.gallery li { background: var(--paper); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-card); }
.gallery li:nth-child(odd) { transform: rotate(-1.2deg); }
.gallery li:nth-child(even) { transform: rotate(1.2deg); }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; }

/* Footer */
.site-footer { background: var(--char-900); color: var(--sand-200); padding: 32px 0; text-align: center; font-size: .875rem; }
.site-footer a { color: #fff; font-weight: 600; }
.site-footer .social { display: flex; justify-content: center; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.site-footer .social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px; border: 1px solid var(--char-line); color: #fff; }
.site-footer .social a:hover { background: var(--clay-600); border-color: var(--clay-600); }
.site-footer p { margin: 4px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Header logo as a link (game pages link back home) */
.site-header a { display: inline-block; border-radius: 12px; }
.site-header a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* Games teaser on the home page */
.games { background: var(--sage); padding: 48px 0 56px; }
.games .intro { text-align: center; max-width: 620px; margin: 0 auto 28px; color: var(--sand-700); font-size: 1.125rem; }
.games .grid { display: grid; gap: 16px; max-width: 840px; margin: 0 auto; }
@media (min-width: 640px) { .games .grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.game-card { background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-card); border: 1px solid var(--sand-200); padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.game-card .badge { width: 56px; height: 56px; border-radius: 9999px; display: grid; place-items: center; background: rgba(232,184,75,.15); }
.game-card .badge svg { width: 36px; height: 36px; }
.game-card h3 { font-size: 1.75rem; line-height: 1.2; color: var(--clay-500); }
.game-card p { margin: 0; font-size: .875rem; color: var(--sand-600); }
.game-card .btn { margin-top: 12px; }

/* Game pages */
.game-page { padding: 32px 0 48px; }
.game-page .head { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.game-page h1 { font-size: 2.5rem; line-height: 1.1; color: var(--clay-500); }
@media (min-width: 768px) { .game-page h1 { font-size: 3rem; } }
.game-page .head p { margin: 8px 0 0; font-size: 1.125rem; color: var(--sand-700); }
.game-box { max-width: 860px; margin: 0 auto; background: var(--paper); border: 1px solid var(--sand-200); border-radius: 16px; box-shadow: var(--shadow-card); overflow: hidden; }
.hud { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--sand-200); font-size: .875rem; color: var(--sand-600); }
.hud .val { font-family: "Lilita One", sans-serif; font-size: 1.375rem; color: var(--clay-500); font-variant-numeric: tabular-nums; }
.hud .best { font-weight: 600; color: #C8982B; font-variant-numeric: tabular-nums; }
.hud .right { display: flex; align-items: center; gap: 12px; }
.hearts { display: inline-flex; gap: 4px; }
.hearts svg { color: var(--gold); }
.hearts svg.lost { color: var(--sand-200); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9999px; background: none; color: var(--sand-600); cursor: pointer; }
.icon-btn:hover { background: #EFEDEB; }
.icon-btn:focus-visible { outline: 2px solid var(--leaf-500); }
.stage { position: relative; }
.stage canvas { display: block; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas.r-banana { aspect-ratio: 4 / 5; }
.stage canvas.r-coconut { aspect-ratio: 1 / 1; }
@media (min-width: 640px) { .stage canvas.r-banana { aspect-ratio: 5 / 4; } .stage canvas.r-coconut { aspect-ratio: 16 / 10; } }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: #fff; background: rgba(33,29,26,.3); overflow-y: auto; }
.overlay.dark { background: rgba(33,29,26,.6); }
.overlay[hidden] { display: none; }
.overlay .big { font-family: "Lilita One", sans-serif; font-size: 2.25rem; line-height: 1.15; }
.overlay .big.gold { color: var(--gold); }
.overlay p { margin: 0; max-width: 320px; }
.overlay .btn { margin-top: 4px; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.aim-hint { position: absolute; left: 0; right: 0; top: 12px; display: flex; justify-content: center; pointer-events: none; }
.aim-hint span { background: rgba(33,29,26,.55); color: #fff; border-radius: 9999px; padding: 4px 12px; font-size: .875rem; }
.aim-hint[hidden] { display: none; }
.game-note { text-align: center; margin: 16px auto 0; font-size: .875rem; color: var(--sand-600); }
.back { text-align: center; margin-top: 24px; }
.back a { font-weight: 600; }
.icon-btn svg[hidden] { display: none; }

/* Phones: tighter, smaller type so more fits on screen */
@media (max-width: 639px) {
  body { font-size: .9375rem; line-height: 1.55; }
  .hero { padding: 32px 0 40px; }
  .hero .monkey { width: 104px; height: 104px; }
  .hero h1 { font-size: 2rem; }
  .hero p, .letter, .winners .intro, .games .intro, .game-page .head p { font-size: .9375rem; }
  .letter .sign { font-size: 1.25rem; }
  .eyebrow { font-size: .6875rem; margin-bottom: 12px; }
  .stats { padding: 28px 0; }
  .stats .num { font-size: 1.375rem; }
  .stats .label { font-size: .75rem; }
  .bar { padding: 14px 16px; }
  .bar h2 { font-size: 1.5rem; }
  .thanks, .charity, .winners, .games { padding: 36px 0; }
  .card { padding: 20px; }
  .card h3, .game-card h3 { font-size: 1.25rem; }
  .card p, .game-card p { font-size: .8125rem; }
  .charity h2 { font-size: 1.5rem; }
  .charity .big { font-size: 2.25rem; }
  .charity p { font-size: .875rem; }
  .btn { font-size: .9375rem; padding: 12px 24px; }
  .game-page { padding: 20px 0 36px; }
  .game-page .head { margin-bottom: 16px; }
  .game-page h1 { font-size: 2rem; }
  .hud { font-size: .8125rem; padding: 8px 12px; }
  .hud .val { font-size: 1.125rem; }
  .overlay .big { font-size: 1.75rem; }
  .overlay p { font-size: .875rem; }
  .game-note { font-size: .8125rem; }
  .site-footer { font-size: .8125rem; }
}
