:root {
  color-scheme: light dark;
  --bg: #fbf5ea;
  --bg-2: #f3e8d4;
  --surface: #ffffff;
  --ink: #12343b;
  --muted: #2a4246;
  --line: #e7d9bf;
  --ocean: #0f7c8a;
  --ocean-deep: #0b4f5c;
  --ocean-soft: #d9efef;
  --coral: #e85d3f;
  --coral-ink: #ffffff;
  --mango: #f4b13d;
  --mango-soft: #fdeccb;
  --palm: #2f8559;
  --palm-soft: #dcefe2;
  --shadow: 0 1px 2px rgba(18, 52, 59, .06), 0 6px 20px rgba(18, 52, 59, .07);
  /* Very light pills: dark text on a soft tint, with a slightly deeper edge. */
  --pill-sky: #ecf7f8; --pill-sky-edge: #cfe8ea;
  --pill-sun: #fff5de; --pill-sun-edge: #f3dfb0;
  --pill-leaf: #ecf6ee; --pill-leaf-edge: #cfe6d5;
  --pill-rose: #fdefea; --pill-rose-edge: #f3d4ca;
  --pill-lilac: #f3f0fb; --pill-lilac-edge: #dcd5f0;
  --radius: 18px;
  --heading: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1d22;
    --bg-2: #10272d;
    --surface: #132d34;
    --ink: #f2ebdf;
    --muted: #dbe5e5;
    --line: #22434b;
    --ocean: #3fb8c5;
    --ocean-deep: #8fd8df;
    --ocean-soft: #133f47;
    --coral: #ff8466;
    --coral-ink: #1b0d08;
    --mango: #f6c060;
    --mango-soft: #3d3218;
    --palm: #6cc993;
    --palm-soft: #18392a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --pill-sky: #17363c; --pill-sky-edge: #25535b;
    --pill-sun: #332c1b; --pill-sun-edge: #574a2a;
    --pill-leaf: #17332a; --pill-leaf-edge: #26523f;
    --pill-rose: #382420; --pill-rose-edge: #5c3a30;
    --pill-lilac: #29263a; --pill-lilac-edge: #433d5f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 600 1rem/1.55 var(--body);
}
img, iframe { max-width: 100%; }
a { color: var(--ocean); }
h1, h2, h3 { font-family: var(--heading); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 9vw, 4.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(2.1rem, 6vw, 2.8rem); margin: 0 0 .5em; }
h3 { font-size: 1.5rem; margin: 0 0 .35em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 1rem; }

/* Header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.45rem var(--heading); color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.nav a:hover { background: var(--bg-2); }
.nav a[aria-current="page"] { background: var(--ocean-soft); color: var(--ocean-deep); }

/* Hero */
.hero { position: relative; background: linear-gradient(180deg, var(--mango-soft), var(--bg)); overflow: hidden; }
.hero .wrap { padding-top: 56px; padding-bottom: 96px; position: relative; z-index: 1; }
.hero p.lead { font-size: 1.25rem; max-width: 34em; color: var(--ink); }
.hero .sun { position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, var(--mango) 0 55%, transparent 56%); opacity: .55; }
.hero .waves { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 70px; display: block; }
.page-head { padding: 40px 0 8px; }
.page-head p { color: var(--ink); max-width: 40em; font-size: 1.15rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font: 800 1.05rem var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; min-height: 54px; }
.btn-primary { background: var(--coral); color: var(--coral-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: transparent; color: var(--ocean-deep); border-color: var(--ocean); }
.btn-secondary:hover { background: var(--ocean-soft); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Sections and cards */
section { padding: 40px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); }
.step-num { background: var(--ocean); color: var(--bg); font: 700 1.6rem var(--heading); }
.how-steps { margin-bottom: 16px; }
.how-steps h3 { margin: 0; }
.icon-badge { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 12px; }
.bg-ocean { background: var(--ocean-soft); }
.bg-mango { background: var(--mango-soft); }
.bg-palm { background: var(--palm-soft); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--ocean); color: var(--bg);
  display: grid; place-items: center; font: 700 1.2rem var(--heading); }
.steps li > div { align-self: center; font-size: 1.25rem; }
.faq { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.faq li { padding-top: 12px; border-top: 1px solid var(--line); }
.faq li:first-child { padding-top: 0; border-top: 0; }
.faq a { font-weight: 700; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 1rem; font-weight: 800; color: var(--ink); }
.chip-sky, .chip-ocean { background: var(--pill-sky); border-color: var(--pill-sky-edge); }
.chip-sun, .chip-mango { background: var(--pill-sun); border-color: var(--pill-sun-edge); }
.chip-leaf, .chip-palm { background: var(--pill-leaf); border-color: var(--pill-leaf-edge); }
.chip-rose { background: var(--pill-rose); border-color: var(--pill-rose-edge); }
.chip-lilac { background: var(--pill-lilac); border-color: var(--pill-lilac-edge); }
.chip-coral { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); }

/* Game types on the home page */
.types { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.type { display: flex; flex-direction: column; gap: 12px; }
.type p { margin: 0; }
.type-head { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.type-head .icon-badge { margin: 0; }
.type-head h3 { margin: 0 0 2px; }
.type .time { font-weight: 800; color: var(--ocean-deep); font-size: 1.05rem; }
a.chip { text-decoration: none; }
a.chip:hover { border-color: var(--ink); }
.chip .award { font-weight: 800; }
.award-note { margin: 0; font-weight: 800; }
.types .chip { border-radius: 12px; }

/* Next event highlight */
.next-event { display: grid; gap: 6px; }
.next-event h3 { margin: 0; }
.next-event .when { font: 700 1.6rem var(--heading); }
.next-event .where { font-size: 1.15rem; }
.secret { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 10px; background: var(--mango-soft); font-weight: 700; }

/* Schedule */
.month { margin: 32px 0 14px; font-size: 1.6rem; }
.event { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: start; padding: 18px; margin-bottom: 12px; }
.event.cancelled { opacity: .6; }
.event.cancelled h3 { text-decoration: line-through; }
.datebox { text-align: center; border-radius: 14px; background: var(--ocean-soft); color: var(--ocean-deep); padding: 8px 4px; }
.datebox .dow { font-size: 1rem; font-weight: 800; }
.datebox .day { font: 700 2rem/1.05 var(--heading); }
.datebox .mon { font-size: 1rem; font-weight: 800; }
.event .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 1.05rem; margin: 2px 0 8px; }
.event p { margin: 6px 0 0; }

/* Past game days */
.past h3 { margin: 20px 0 6px; }
.past h3:first-child { margin-top: 0; }
.past-row { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.past-date { font-weight: 800; }

/* Games */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.filter { border: 2px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px;
  font: 800 1.05rem var(--body); cursor: pointer; min-height: 48px; }
.filter[aria-pressed="true"] { border-color: var(--ocean); background: var(--ocean-soft); color: var(--ocean-deep); }
.games { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.game { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.game .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game .facts { display: flex; gap: 16px; color: var(--muted); font-size: 1.05rem; font-weight: 800; }
.game .teach { background: var(--palm-soft); color: var(--palm); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 1.05rem; }
.game .links { margin-top: auto; display: flex; gap: 14px; flex-wrap: wrap; font-weight: 700; padding-top: 6px; }
.video { position: relative; aspect-ratio: 16 / 9; background: #0b2b31; border: 0; padding: 0; width: 100%; cursor: pointer; display: block; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video .play { position: absolute; inset: auto 12px 12px auto; background: var(--coral); color: var(--coral-ink); border-radius: 999px;
  padding: 8px 16px; font: 800 1rem var(--body); display: flex; align-items: center; gap: 6px; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video.none { display: grid; place-items: center; color: #cfe; font-weight: 700; cursor: default; }

/* Host guide */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.ideas { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.ideas ul { margin: 0; }
.callout { background: var(--ocean-soft); border-radius: var(--radius); padding: 18px 20px; margin: 1.2em 0; }
.callout strong { color: var(--ocean-deep); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; color: var(--muted); font-size: 1rem; }
.site-footer .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

.empty { padding: 28px; text-align: center; color: var(--muted); }
.loading { color: var(--muted); padding: 20px 0; }

/* Phones: most visitors arrive from the WhatsApp group on a phone. */
@media (max-width: 560px) {
  html { font-size: 21px; }
  .site-header { position: static; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 6px; gap: 6px; }
  .nav { width: 100%; justify-content: space-between; margin: 0 -8px; width: calc(100% + 16px); }
  .nav a { padding: 10px 6px; font-size: 1rem; }

  .hero .wrap { padding-top: 28px; padding-bottom: 64px; }
  .hero p.lead { font-size: 1.15rem; }
  .hero .sun { width: 180px; height: 180px; right: -50px; top: -50px; }
  .page-head { padding-top: 24px; }
  .page-head p { font-size: 1.1rem; }
  section { padding: 24px 0; }
  h2 { margin-bottom: .4em; }

  .btn-row .btn { flex: 1 1 100%; }
  .card { padding: 18px; }
  .grid { gap: 12px; }

  /* Icon beside the heading instead of above it, so cards stay short. */
  .grid-3 > .card { display: grid; grid-template-columns: 54px 1fr; column-gap: 14px; align-items: start; }
  .grid-3 > .card > .icon-badge { grid-row: span 2; margin: 0; }
  .grid-3 > .card > h3 { align-self: center; margin: 0 0 4px; }
  .grid-3 > .card > p { margin: 0; }

  /* Filters scroll sideways in one row rather than stacking three deep. */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 4px -16px 18px; padding: 0 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }

  .event { grid-template-columns: 66px 1fr; gap: 12px; padding: 14px; }
  .datebox { padding: 6px 2px; }
  .datebox .day { font-size: 1.75rem; }
  .event h3 { font-size: 1.3rem; }
  .month { margin-top: 20px; }
  .card.game { padding: 0; }
  .types { gap: 12px; }
  .type-head { flex-direction: row; align-items: center; gap: 14px; }
  .game .body { padding: 16px; }
  .site-footer { margin-top: 24px; }
}
