@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Bowlby+One+SC&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --green-dark: #0C4A2E;
  --green: #22C55E;
  --green-glow: #4ADE80;
  --green-mid: #166534;
  --cream: #FFFDF4;
  --ink: #0A2E1C;
  --gold: #FBBF24;
  --gold-dark: #D97706;
  --red: #BE123C;
  --red-light: #FEE2E2;
  --brown: #92400E;
  --brown-dark: #5C2D0A;
  --white: #ffffff;
  --shadow: rgba(0,0,0,0.5);

  --font-display: 'Bangers', cursive;
  --font-display2: 'Bowlby One SC', cursive;
  --font-body: 'Nunito', sans-serif;

  --radius: 8px;
  --radius-lg: 16px;
  --border: 3px solid var(--ink);
  --shadow-panel: 6px 6px 0 var(--ink);
  --shadow-btn: 4px 4px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--green-dark);
  color: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ────────────────────────────────── */
h1, .h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1; letter-spacing: .04em; }
h2, .h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.1; }
h3, .h3 { font-family: var(--font-display2); font-size: clamp(1.1rem, 3vw, 1.6rem); }
p, li { line-height: 1.6; font-size: 1rem; }

a { color: var(--green-glow); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  font-family: var(--font-display); font-size: 1.2rem; letter-spacing: .06em;
  padding: .5em 1.2em;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
}
.btn:hover  { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px,2px);  box-shadow: 2px 2px 0 var(--ink); }

.btn-primary { background: var(--green); color: var(--ink); }
.btn-gold    { background: var(--gold);  color: var(--ink); }
.btn-red     { background: var(--red);   color: var(--white); }
.btn-cream   { background: var(--cream); color: var(--ink); }
.btn-dark    { background: var(--ink);   color: var(--cream); }
.btn-sm      { font-size: .9rem; padding: .3em .8em; }
.btn-lg      { font-size: 1.5rem; padding: .6em 1.6em; box-shadow: 6px 6px 0 var(--ink); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: var(--shadow-btn); }

/* ── Panels ─────────────────────────────────────── */
.panel {
  background: var(--cream);
  color: var(--ink);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  padding: 1.5rem;
}
.panel-dark {
  background: var(--green-mid);
  color: var(--cream);
  border: 3px solid var(--green-glow);
  border-radius: var(--radius-lg);
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
  padding: 1.5rem;
}
.panel-gold {
  background: var(--gold);
  color: var(--ink);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  padding: 1.2rem 1.5rem;
}

/* ── Chips / Badges ──────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-display2);
  font-size: .7rem;
  padding: .15em .5em;
  border-radius: 999px;
  border: 2px solid var(--ink);
  letter-spacing: .04em;
}
.badge-green { background: var(--green); color: var(--ink); }
.badge-gold  { background: var(--gold);  color: var(--ink); }
.badge-red   { background: var(--red);   color: var(--white); }
.badge-cream { background: var(--cream); color: var(--ink); }

.chip {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .85rem;
  padding: .2em .6em;
  border-radius: 999px;
  border: 2px solid currentColor;
  transition: all .2s;
}
.chip-active  { background: var(--gold);  color: var(--ink);  border-color: var(--ink); font-size: 1rem; }
.chip-live    { background: var(--green); color: var(--ink);  border-color: var(--ink); }
.chip-bust    { background: #500; color: #f88; border-color: #f44; text-decoration: line-through; opacity: .5; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1.5rem;
  border-bottom: 3px solid var(--green-mid);
  background: rgba(0,0,0,.2);
  position: sticky; top: 0; z-index: 100;
}
.nav-logo {
  font-family: var(--font-display); font-size: 1.6rem; letter-spacing: .06em;
  color: var(--gold); text-decoration: none;
  text-shadow: 2px 2px 0 var(--ink);
}
.nav-links { display: flex; gap: 1.2rem; list-style: none; }
.nav-links a { color: var(--cream); font-weight: 700; font-size: .95rem; }
.nav-links a:hover { color: var(--green-glow); text-decoration: none; }

/* ── Dashed divider ─────────────────────────────── */
.divider {
  border: none;
  border-top: 3px dashed var(--green-mid);
  margin: 1.5rem 0;
}
.divider-gold {
  border-top-color: var(--gold-dark);
}

/* ── Callout boxes ────────────────────────────────── */
.callout {
  border-left: 6px solid var(--gold);
  background: rgba(251,191,36,.12);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
}
.callout-red {
  border-left-color: var(--red);
  background: rgba(190,18,60,.1);
}
.callout-green {
  border-left-color: var(--green-glow);
  background: rgba(74,222,128,.08);
}

/* ── Page wrapper ─────────────────────────────────── */
.page-wrap { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem; }
.page-wrap-wide { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Card pips decoration (purely decorative) ─────── */
.pips::before { content: '♠ ♥ ♦ ♣'; font-size: .9rem; opacity: .25; letter-spacing: .3em; }

/* ── Utility ─────────────────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-gold   { color: var(--gold); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green-glow); }
.text-center { text-align: center; }
.mt1 { margin-top: .5rem; }
.mt2 { margin-top: 1rem; }
.mt3 { margin-top: 1.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap1 { gap: .5rem; }
.gap2 { gap: 1rem; }
.wrap { flex-wrap: wrap; }

/* ── Confetti canvas (injected by JS) ─────────────── */
#confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
}

/* ── Modal overlay ───────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 500;
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .2s ease;
}
.modal-box {
  background: var(--cream); color: var(--ink);
  border: var(--border); border-radius: var(--radius-lg);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 2rem; max-width: 480px; width: 90%;
  animation: slide-up .25s ease;
}
@keyframes fade-in  { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } }

/* ── Toggle button (2D/3D) ───────────────────────── */
#view-toggle-btn {
  position: fixed; top: 70px; right: 14px; z-index: 200;
  font-size: .8rem; padding: .3em .8em;
}

/* ── Audio toggle ───────────────────────────────── */
#audio-toggle-btn {
  position: fixed; bottom: 14px; right: 14px; z-index: 200;
  font-size: .85rem; padding: .25em .7em;
  border-radius: 999px;
}

/* ── Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--green-dark); }
::-webkit-scrollbar-thumb { background: var(--green-mid); border-radius: 4px; }

/* ── Mobile ───────────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrap, .page-wrap-wide { padding: 1rem .75rem; }
  .nav { padding: .6rem 1rem; }
  .nav-links { gap: .8rem; }
  .panel { padding: 1rem; }
}
