@font-face {
  font-family: 'Fredoka One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/fredoka-one-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('fonts/nunito-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --red: #C41E3A;
  --red-dark: #9B1B30;
  --green: #2E8B57;
  --green-dark: #1F6B3F;
  --gold: #FFD700;
  --gold-dark: #DAA520;
  --cream: #FFF8DC;
  --cream-dark: #F5E6C8;
  --brown: #8B4513;
  --brown-light: #A0522D;
  --sky: #87CEEB;
  --snow: #FFFAFA;
  --text-dark: #3E2723;
  --text-light: #FFF8E1;
  --shadow: rgba(0,0,0,0.2);
}

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

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

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Fredoka One', cursive;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ==================== ACCESSIBILITY ==================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 11000;
}

.skip-link:focus {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  width: auto;
  height: auto;
  padding: 0.9rem 1.6rem;
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.4);
  outline: 4px solid var(--gold);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="gridcell"]:focus-visible,
[role="tab"]:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.cookie-canvas {
  outline: none;
}

.cookie-canvas:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-contrast: more) {
  body {
    color: #121212;
  }
  .card-body p, .name-box-sub, .cert-message {
    color: #4A2C17;
  }
  .footer-copy, .footer-credit {
    opacity: 1;
    color: var(--cream);
  }
  .cert-date {
    color: #5D4037;
    font-weight: 600;
  }
  .nav-links a {
    text-shadow: 0 1px 0 rgba(0,0,0,0.45);
  }
}

/* ==================== HEADER ==================== */
.site-header {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px var(--shadow);
  border-bottom: 4px solid var(--gold);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
}

.site-logo .logo-icon {
  font-size: 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-light);
  padding: 0.6rem 1rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.nav-links a.active {
  background: var(--gold);
  color: var(--brown);
}

.sparkle-badge {
  background: var(--gold);
  color: var(--brown);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 8px rgba(255,215,0,0.4);
  transition: transform 0.3s ease;
}

.sparkle-badge:hover {
  transform: scale(1.08);
}

/* ==================== HERO / BANNER ==================== */
.hero {
  background: linear-gradient(180deg, var(--green-dark) 0%, var(--green) 30%, var(--sky) 100%);
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(255,215,0,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  color: var(--text-light);
  text-shadow: 3px 3px 0 var(--brown), 0 0 30px rgba(255,215,0,0.3);
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  font-size: 1.3rem;
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.daily-activity {
  background: rgba(255,248,220,0.95);
  border-radius: 20px;
  padding: 1.25rem 2rem;
  display: inline-block;
  box-shadow: 0 8px 25px var(--shadow);
  border: 3px solid var(--gold);
  max-width: 500px;
}

.daily-activity .label {
  color: var(--red);
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.daily-activity .activity-name {
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--brown);
}

/* ==================== SNOWFALL ==================== */
.snowflakes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -20px;
  color: white;
  font-size: 1rem;
  opacity: 0.8;
  animation: snowfall linear infinite;
  text-shadow: 0 0 3px rgba(255,255,255,0.5);
}

@keyframes snowfall {
  0% {
    transform: translateY(-20px) rotate(0deg) translateX(0);
    opacity: 0.8;
  }
  25% {
    transform: translateY(25vh) rotate(90deg) translateX(15px);
  }
  50% {
    transform: translateY(50vh) rotate(180deg) translateX(-10px);
  }
  75% {
    transform: translateY(75vh) rotate(270deg) translateX(20px);
  }
  100% {
    transform: translateY(105vh) rotate(360deg) translateX(-5px);
    opacity: 0.3;
  }
}

/* ==================== SECTIONS ==================== */
.section {
  padding: 3rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--red);
  margin-bottom: 2rem;
  text-shadow: 2px 2px 0 var(--cream-dark);
}

.section-title .emoji {
  font-size: 1.8rem;
  margin: 0 0.3rem;
}

/* ==================== CARDS / GRID ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid transparent;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  border-color: var(--gold);
}

.card-icon {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.card-icon.bg-red { background: linear-gradient(135deg, var(--red), #E74C3C); }
.card-icon.bg-green { background: linear-gradient(135deg, var(--green), #27AE60); }
.card-icon.bg-gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); }
.card-icon.bg-brown { background: linear-gradient(135deg, var(--brown), var(--brown-light)); }
.card-icon.bg-sky { background: linear-gradient(135deg, #5DADE2, var(--sky)); }
.card-icon.bg-pink { background: linear-gradient(135deg, #E91E63, #F48FB1); }

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-size: 1.2rem;
  color: var(--red-dark);
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.95rem;
  color: #5D4037;
  margin-bottom: 1rem;
}

.card-body .skill-tag {
  display: inline-block;
  background: var(--cream);
  color: var(--brown);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
}

.card-body .card-hint {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--brown);
  opacity: 0.85;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  touch-action: manipulation;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 15px var(--shadow);
}

.btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 10px var(--shadow);
}

.btn:disabled:hover {
  transform: none;
  box-shadow: 0 4px 10px var(--shadow);
}

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: none;
}

.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: white;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--brown);
}

.btn-danger {
  background: linear-gradient(135deg, #E53935, #B71C1C);
  color: white;
}

.btn-brown {
  background: linear-gradient(135deg, var(--brown), var(--brown-light));
  color: white;
}

.btn-outline {
  background: white;
  color: var(--red);
  border: 3px solid var(--red);
}

.btn-large {
  padding: 1.1rem 3rem;
  font-size: 1.3rem;
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

/* ==================== GAME CONTAINER ==================== */
.game-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: 25px;
  box-shadow: 0 8px 30px var(--shadow);
  border: 3px solid var(--gold);
}

.game-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.game-header h2 {
  font-size: 1.8rem;
  color: var(--red);
}

.game-header p {
  color: #5D4037;
  margin-top: 0.3rem;
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.game-stat {
  background: var(--cream);
  padding: 0.75rem 1.5rem;
  border-radius: 15px;
  text-align: center;
  font-weight: 700;
}

.game-stat .stat-value {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  color: var(--red);
}

.game-stat .stat-label {
  font-size: 0.8rem;
  color: var(--brown);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-area {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== MEMORY GAME ==================== */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 1;
  border-radius: 15px;
  cursor: pointer;
  position: relative;
  perspective: 600px;
  min-height: 80px;
}

.memory-card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  border-radius: 15px;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front, .memory-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.memory-card-front {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  box-shadow: 0 4px 10px var(--shadow);
}

.memory-card-back {
  background: linear-gradient(135deg, var(--cream), white);
  transform: rotateY(180deg);
  border: 3px solid var(--gold);
  box-shadow: 0 4px 10px var(--shadow);
}

.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card.matched .memory-card-back {
  background: linear-gradient(135deg, #C8E6C9, #A5D6A7);
  border-color: var(--green);
}

/* ==================== CHRISTMAS AROUND THE WORLD ==================== */
.world-status {
  text-align: center;
  margin-bottom: 1.25rem;
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  color: var(--red);
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 880px;
  margin: 0 auto;
}

.world-country {
  position: relative;
  min-height: 100px;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  border: 3px solid rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px var(--shadow);
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.world-country:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow);
}

.world-country.bg-red { background: linear-gradient(135deg, var(--red), #E74C3C); }
.world-country.bg-gold { background: linear-gradient(135deg, var(--gold-dark), var(--gold)); }
.world-country.bg-sky { background: linear-gradient(135deg, #5DADE2, var(--sky)); }
.world-country.bg-brown { background: linear-gradient(135deg, var(--brown), var(--brown-light)); }

.world-flag {
  font-size: 2.6rem;
  line-height: 1;
  text-align: center;
}

.world-flag-img {
  display: inline-block;
  width: 46px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.world-flag-emoji {
  display: none;
  font-size: 2.6rem;
  line-height: 1;
}

.world-name {
  font-family: 'Fredoka One', cursive;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: center;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
}

.world-check {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 0.95rem;
  font-weight: bold;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Fact popup */
.world-fact-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(0,0,0,0.55);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  padding: 1.5rem;
}

.world-fact-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.world-fact-popup {
  background: linear-gradient(135deg, #FFF8E1, white);
  border-radius: 25px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0,0,0,0.35);
  border: 4px solid var(--gold);
  max-width: 460px;
  width: 88%;
  position: relative;
  margin: auto;
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.world-fact-overlay.show .world-fact-popup {
  transform: scale(1);
}

.world-fact-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--brown);
  cursor: pointer;
  padding: 0;
}

.world-fact-flag {
  margin-bottom: 0.35rem;
}

.world-fact-flag-wrap {
  display: inline-block;
}

.world-fact-flag-img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.world-fact-flag-emoji {
  display: none;
  font-size: 4.2rem;
  line-height: 1;
}

.world-fact-name {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.world-fact-body {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--brown);
  margin-bottom: 1rem;
}

.world-fact-santa {
  background: #FFF3DC;
  border: 2px dashed var(--gold);
  border-radius: 14px;
  padding: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--brown);
}

.world-fact-santa strong {
  color: var(--red);
}

/* ==================== ADVENT CALENDAR ==================== */
.advent-status {
  text-align: center;
  margin-bottom: 1.25rem;
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  color: var(--red);
}

.advent-today {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--green);
}

.advent-door.locked .advent-door-front {
  animation: advent-shake 0.4s ease;
}

@keyframes advent-shake {
  0%, 100% { transform: rotateX(0deg); }
  25% { transform: rotateX(-12deg); }
  50% { transform: rotateX(10deg); }
  75% { transform: rotateX(-6deg); }
}

.advent-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
}

.advent-door {
  max-height: 210px;
  min-height: 130px;
  aspect-ratio: 3 / 4;
  border-radius: 15px;
  cursor: pointer;
  position: relative;
  perspective: 900px;
  background: none;
  border: none;
  padding: 0;
}

.advent-door-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cream), white);
  border: 3px solid var(--gold);
  box-shadow: 0 4px 12px var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem;
  text-align: center;
  overflow: hidden;
}

.advent-picture {
  font-size: 2.8rem;
  line-height: 1.1;
  text-shadow: 0 3px 6px rgba(0,0,0,0.12);
}

.advent-picture-name {
  font-family: 'Fredoka One', cursive;
  font-size: 0.72rem;
  line-height: 1.15;
  color: var(--red);
}

.advent-door-front {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: bottom center;
  transition: transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  box-shadow: 0 4px 12px var(--shadow);
  border: 3px solid rgba(255,255,255,0.35);
  z-index: 2;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.advent-door-green .advent-door-front {
  background: linear-gradient(135deg, var(--green), #1E6B4E);
}

.advent-door-gold .advent-door-front {
  background: linear-gradient(135deg, var(--gold-dark), #B8860B);
}

.advent-door-sky .advent-door-front {
  background: linear-gradient(135deg, #4A90D9, #2A5FA8);
}

.advent-door.open .advent-door-front {
  transform: rotateX(100deg);
}

.advent-door-front::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.12);
}

.advent-door-wreath {
  position: relative;
  width: 30px;
  height: 30px;
  margin-bottom: 0.15rem;
}

.advent-door-wreath::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 7px solid #2E8B57;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.advent-wreath-berry {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 1px 1px rgba(0,0,0,0.35);
  z-index: 1;
}

.advent-wreath-berry.b1 { top: 1px; left: 50%; transform: translateX(-50%); }
.advent-wreath-berry.b2 { right: 1px; top: 50%; transform: translateY(-50%); }
.advent-wreath-berry.b3 { bottom: 1px; left: 50%; transform: translateX(-50%); }
.advent-wreath-berry.b4 { left: 1px; top: 50%; transform: translateY(-50%); }

.advent-door-day {
  font-family: 'Fredoka One', cursive;
  font-size: 2.3rem;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
}

.advent-door-knob {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* ==================== COOKIE DECORATOR ==================== */
.cookie-canvas-wrapper {
  text-align: center;
}

.cookie-canvas {
  border: 4px solid var(--brown);
  border-radius: 20px;
  background: #D2B48C;
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 3 / 2;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.color-palette {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.color-swatch {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 4px solid white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px var(--shadow);
}

.color-swatch:hover,
.color-swatch.active {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.brush-sizes {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.brush-size {
  border-radius: 50%;
  border: 3px solid var(--brown);
  background: var(--brown);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.brush-size:hover,
.brush-size.active {
  border-color: var(--red);
  transform: scale(1.15);
}

/* ==================== SORTING GAME ==================== */
.sorting-game {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.sort-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  min-height: 80px;
  padding: 1rem;
  background: var(--cream);
  border-radius: 15px;
  border: 3px dashed var(--gold);
}

.sort-item {
  background: white;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 2px solid var(--gold);
  cursor: grab;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  touch-action: none;
  -webkit-user-drag: none;
}

.sort-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--shadow);
}

.sort-item:active {
  cursor: grabbing;
}

.sort-item.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(196,30,58,0.3);
}

.sort-item.dragging {
  opacity: 0.4;
  transform: scale(0.9);
}

.drag-ghost {
  position: fixed;
  z-index: 9999;
  background: white;
  border: 3px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.8rem;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.95;
  transform: rotate(3deg) scale(1.05);
}

.sort-item.wrong {
  animation: shake 0.5s ease;
  border-color: var(--red);
  background: #FFEBEE;
}

.sort-zones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.sort-zone {
  background: white;
  border: 3px dashed #CCC;
  border-radius: 20px;
  padding: 1rem;
  min-height: 120px;
  text-align: center;
  transition: all 0.3s ease;
}

.sort-zone.drag-over {
  border-color: var(--green);
  background: #E8F5E9;
}

.sort-zone h4 {
  color: var(--brown);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.sort-zone .zone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.sort-zone .dropped-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  min-height: 40px;
}

.sort-zone .sort-item {
  font-size: 0.9rem;
  padding: 0.4rem 0.8rem;
}

.sort-zone.correct .sort-item {
  border-color: var(--green);
  background: #E8F5E9;
}

/* ==================== SANTA ROUTE ==================== */
.route-map {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(180deg, #1a237e 0%, #283593 30%, #1565C0 70%, white 70%, #E3F2FD 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid var(--brown);
}

.route-point {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 2;
}

.route-point:hover {
  transform: scale(1.2);
}

.route-point.active {
  box-shadow: 0 0 0 4px var(--gold), 0 0 20px rgba(255,215,0,0.5);
  animation: pulse 1.5s infinite;
}

.route-point.correct {
  background: var(--green) !important;
}

.route-point.wrong {
  background: var(--red) !important;
  animation: shake 0.5s ease;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--gold), 0 0 20px rgba(255,215,0,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255,215,0,0.3), 0 0 30px rgba(255,215,0,0.5); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ==================== STORY BUILDER ==================== */
.story-container {
  text-align: center;
}

.story-illustration {
  font-size: 5rem;
  margin: 1rem 0;
}

.story-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-dark);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 15px;
  border-left: 5px solid var(--gold);
}

.story-choices {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.story-choice {
  padding: 1rem 2rem;
  border-radius: 15px;
  border: 3px solid var(--red);
  background: white;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  color: var(--red);
  transition: all 0.3s ease;
  max-width: 250px;
}

.story-choice:hover {
  background: var(--red);
  color: white;
  transform: translateY(-3px);
}

/* ==================== QUIZ ==================== */
.quiz-container {
  max-width: 600px;
  margin: 0 auto;
}

.quiz-question {
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--brown);
}

.quiz-image {
  text-align: center;
  font-size: 5rem;
  margin-bottom: 1rem;
}

.quiz-feedback {
  text-align: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1.2rem;
  color: var(--red);
  background: var(--cream);
  border-radius: 15px;
  border-left: 5px solid var(--gold);
  padding: 1rem;
  margin-top: 1.5rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quiz-option {
  padding: 1rem;
  border-radius: 15px;
  border: 3px solid var(--cream-dark);
  background: white;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-align: center;
}

.quiz-option:hover {
  border-color: var(--red);
  transform: scale(1.03);
}

.quiz-option.correct {
  border-color: var(--green);
  background: #E8F5E9;
}

.quiz-option.wrong {
  border-color: var(--red);
  background: #FFEBEE;
}

.quiz-progress {
  width: 100%;
  height: 12px;
  background: var(--cream-dark);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* ==================== ELF SKILLS ACADEMY ==================== */
.skill-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.nav-btn {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 15px;
  border: 3px solid var(--cream-dark);
  background: white;
  color: var(--brown);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  border-color: var(--red);
  transform: scale(1.03);
}

.nav-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.game-view {
  display: none;
}

.game-view.active {
  display: block;
}

.skill-display {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--brown);
  min-height: 3.5rem;
  letter-spacing: 0.3rem;
  word-break: break-word;
  line-height: 1.4;
}

.skill-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.choice-btn {
  font-family: 'Fredoka One', cursive;
  font-size: 1.4rem;
  padding: 1rem;
  border-radius: 15px;
  border: 3px solid var(--cream-dark);
  background: var(--cream);
  color: var(--brown);
  cursor: pointer;
  transition: all 0.3s ease;
}

.choice-btn:hover {
  border-color: var(--green);
  background: #E8F5E9;
  transform: scale(1.05);
}

.skill-feedback {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  min-height: 2.5rem;
}

.skill-clue {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
  background: var(--cream);
  border: 3px solid var(--gold);
  border-radius: 15px;
  padding: 0.75rem 1.5rem;
  max-width: 450px;
  margin: 0 auto 1.5rem;
}

/* ==================== PRINTABLE CARDS ==================== */
.printable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.printable-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 20px var(--shadow);
  border: 3px solid var(--cream-dark);
}

.printable-card .preview {
  font-size: 4rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 15px;
}

.printable-card h3 {
  color: var(--red-dark);
  margin-bottom: 0.5rem;
}

.printable-card p {
  color: #5D4037;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* ==================== PARENT HUB ==================== */
.parent-section {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 20px var(--shadow);
}

.parent-section h3 {
  color: var(--red);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.tip-card {
  background: var(--cream);
  border-radius: 15px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 5px solid var(--green);
}

.tip-card h4 {
  color: var(--green-dark);
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.progress-list {
  list-style: none;
}

.progress-list li {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-list li:last-child {
  border-bottom: none;
}

.progress-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.progress-badge.completed {
  background: #E8F5E9;
  color: var(--green-dark);
}

.progress-badge.in-progress {
  background: #FFF3E0;
  color: #E65100;
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: linear-gradient(135deg, var(--brown), var(--brown-light));
  color: var(--cream);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--cream);
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-credit {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  opacity: 0.9;
}

.footer-credit a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}

/* ==================== ADVENT LOCKED POPUP ==================== */
.advent-locked-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(0,0,0,0.55);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
  padding: 1.5rem;
}

.advent-locked-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.advent-locked-popup {
  background: linear-gradient(135deg, #FFF8E1, white);
  border-radius: 25px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0,0,0,0.35);
  border: 4px solid var(--gold);
  max-width: 360px;
  width: 88%;
  position: relative;
  margin: auto;
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.advent-locked-overlay.show .advent-locked-popup {
  transform: scale(1);
}

.advent-locked-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--brown);
  cursor: pointer;
  padding: 0;
}

.advent-locked-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.advent-locked-text {
  font-family: 'Fredoka One', cursive;
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--red);
  margin-bottom: 1.25rem;
}

.advent-locked-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--green), #1E6B4E);
  color: white;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  padding: 0.6rem 2rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.advent-locked-button:hover {
  filter: brightness(1.1);
}

/* ==================== SPARKLE DUST POPUP ==================== */
.sparkle-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: white;
  border-radius: 25px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0,0,0,0.3);
  z-index: 10000;
  border: 4px solid var(--gold);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 400px;
  width: 90%;
}

.sparkle-popup.show {
  transform: translate(-50%, -50%) scale(1);
}

.sparkle-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sparkle-popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.sparkle-amount {
  font-family: 'Fredoka One', cursive;
  font-size: 2.5rem;
  color: var(--gold-dark);
  margin: 0.5rem 0;
}

.clear-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(0,0,0,0.55);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.clear-confirm-box {
  background: white;
  border-radius: 25px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0,0,0,0.35);
  border: 4px solid var(--red);
  max-width: 420px;
  width: 100%;
  margin: auto;
}

.clear-confirm-box p {
  margin: 0.75rem 0 1.25rem;
}

.clear-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.name-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(0,0,0,0.55);
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.name-box {
  background: linear-gradient(180deg, #fffdf5, #fff7e0);
  border-radius: 25px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0,0,0,0.35);
  border: 4px solid var(--gold);
  max-width: 420px;
  width: 100%;
  margin: auto;
}

.name-box-title {
  font-family: 'Fredoka One', cursive;
  color: var(--red);
  margin: 0.5rem 0 0.25rem;
}

.name-box-sub {
  color: #5D4037;
  margin: 0 0 1rem;
}

.name-skip-btn {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  color: #8B7355;
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.name-skip-btn:hover,
.name-skip-btn:focus {
  color: var(--red);
}

.name-input-label {
  display: block;
  font-family: 'Fredoka One', cursive;
  color: #5D4037;
  margin-bottom: 0.4rem;
}

.name-input-box {
  width: 100%;
  max-width: 260px;
  padding: 0.8rem 1rem;
  font-size: 1.25rem;
  font-family: 'Fredoka One', cursive;
  color: #5D4037;
  text-align: center;
  border: 3px solid var(--gold);
  border-radius: 16px;
  outline: none;
  background: white;
}

.name-input-box:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(196, 30, 58, 0.15);
}

.name-input-box.name-input-error {
  border-color: #B71C1C;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ==================== CERTIFICATE ==================== */
.cert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background: rgba(0,0,0,0.6);
  z-index: 10003;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}

.cert-frame {
  background: white;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  max-width: 760px;
  width: 100%;
  margin: auto;
}

.cert-frame.cert-visible {
  display: block;
}

.cert-window {
  position: relative;
  background: linear-gradient(180deg, #FFF8E1, #FFEFC0 50%, #FFF8E1);
  border: 10px solid var(--gold);
  outline: 4px solid var(--red);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  box-shadow: inset 0 0 0 3px var(--green);
}

@media (max-width: 480px) {
  .cert-window {
    padding: 1.25rem 0.9rem;
  }
  .cert-title {
    font-size: 2rem;
  }
  .cert-name {
    font-size: 1.9rem;
  }
  .cert-actions .btn {
    width: 100%;
  }
}

.cert-header {
  margin-bottom: 1.25rem;
}

.cert-deco {
  font-size: 1.4rem;
  letter-spacing: 0.4rem;
  margin-bottom: 0.4rem;
}

.cert-title {
  font-family: 'Fredoka One', cursive;
  color: var(--red);
  font-size: 2.6rem;
  margin: 0;
}

.cert-sub {
  font-family: 'Fredoka One', cursive;
  color: var(--green-dark);
  font-size: 1.15rem;
  letter-spacing: 0.05rem;
}

.cert-award {
  color: var(--brown);
  margin: 0.25rem 0 0.5rem;
  font-size: 1.05rem;
}

.cert-name {
  font-family: 'Fredoka One', cursive;
  color: var(--red-dark);
  font-size: 2.6rem;
  border-bottom: 3px dotted var(--gold-dark);
  display: inline-block;
  padding: 0 1.5rem 0.25rem;
  margin-bottom: 0.5rem;
  word-break: break-word;
}

.cert-message {
  color: #5D4037;
  font-size: 1.05rem;
  margin: 0.5rem auto 1rem;
  max-width: 90%;
}

.cert-achievements {
  background: rgba(255,255,255,0.55);
  border: 2px dashed var(--gold);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  max-width: 85%;
  margin: 0 auto 1rem;
}

.cert-achieve-label {
  font-family: 'Fredoka One', cursive;
  color: var(--brown);
  margin-bottom: 0.35rem;
}

.cert-achievements ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cert-achievements li {
  color: var(--red-dark);
  font-weight: 700;
  padding: 0.15rem 0;
}

.cert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 2px solid var(--gold);
  padding-top: 0.75rem;
}

.cert-stats {
  color: var(--brown);
  font-weight: 700;
}

.cert-stat-sep {
  margin: 0 0.5rem;
}

.cert-santa {
  font-size: 2rem;
}

.cert-date {
  color: #888;
  font-size: 0.9rem;
}

.cert-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}

.cert-img-container {
  text-align: center;
  padding-top: 1rem;
}

.cert-img-container img {
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border: 3px solid var(--gold);
  display: block;
  margin: 0 auto;
  touch-action: manipulation;
  -webkit-user-select: all;
  user-select: all;
}

@media print {
  body * {
    visibility: hidden;
  }
  #cert-overlay, #cert-overlay * {
    visibility: visible;
  }
  #cert-overlay {
    display: flex !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: white;
    padding: 0;
    overflow: visible;
  }
  #cert-frame {
    box-shadow: none;
    max-width: 100%;
  }
  .cert-actions {
    display: none !important;
  }
}

/* ==================== TOUCH IMPROVEMENTS ==================== */
button, a, .memory-card, .advent-door, .sort-item, .route-point, .quiz-option, .story-choice, .color-swatch, .brush-size, select, input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,215,0,0.35);
}

/* ==================== RESPONSIVE ==================== */
/* Large tablets / small desktops */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .route-point {
    width: 55px;
    height: 55px;
    font-size: 1.7rem;
  }
}

/* Tablets & phones */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .course-grid, .world-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .world-country {
    aspect-ratio: 4 / 3;
  }

  .world-flag {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .header-inner {
    justify-content: center;
    gap: 0.75rem;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 100%;
  }

  .advent-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
  }

  .advent-door-day {
    font-size: 1.6rem;
  }

  .advent-door-wreath {
    width: 22px;
    height: 22px;
    border-width: 5px;
  }

  .advent-door-wreath::before {
    border-width: 5px;
  }

  .advent-wreath-berry {
    width: 4px;
    height: 4px;
  }

  .advent-picture {
    font-size: 1.9rem;
  }

  .advent-picture-name {
    font-size: 0.6rem;
  }

  .advent-door-knob {
    width: 10px;
    height: 10px;
    right: 8px;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }

  .game-container {
    padding: 1rem;
    margin: 1rem;
    border-radius: 20px;
  }

  .route-map {
    height: 320px;
  }

  .route-point {
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
  }

  .sort-zone {
    min-height: 100px;
  }

  .sort-items {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .story-text {
    font-size: 1.05rem;
    padding: 1.1rem;
  }

  .game-stat {
    padding: 0.5rem 1rem;
  }

  .btn-large {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
  }

  .page-banner h1 {
    font-size: 1.7rem;
  }

  .audio-btn {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    bottom: 1rem;
    right: 1rem;
  }

  .confetti {
    width: 8px;
    height: 10px;
  }

  .confetti-circle {
    width: 10px !important;
    height: 10px !important;
  }

  .skill-display {
    font-size: 2rem;
    letter-spacing: 0.2rem;
  }
}

/* Phones */
@media (max-width: 480px) {
  .site-logo {
    font-size: 1.1rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
  }

  .header-inner nav {
    width: 100%;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 0.25rem;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .hero {
    padding: 2rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero .subtitle {
    font-size: 0.95rem;
  }

  .daily-activity {
    padding: 1rem 1.25rem;
    max-width: 100%;
  }

  .skill-display {
    font-size: 1.5rem;
    letter-spacing: 0.15rem;
    min-height: 2.5rem;
    margin-bottom: 1rem;
  }

.memory-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .world-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .world-flag {
    font-size: 1.9rem;
  }

  .world-flag-img {
    width: 38px;
    height: 28px;
  }

  .world-flag-emoji {
    font-size: 1.9rem;
  }

  .world-name {
    font-size: 0.8rem;
  }

  .advent-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .advent-door-day {
    font-size: 1.35rem;
  }

  .advent-door-wreath {
    width: 18px;
    height: 18px;
  }

  .advent-door-wreath::before {
    border-width: 4px;
  }

  .advent-wreath-berry {
    width: 3px;
    height: 3px;
  }

  .advent-picture {
    font-size: 1.5rem;
  }

  .advent-picture-name {
    font-size: 0.52rem;
  }

  .advent-door-knob {
    width: 8px;
    height: 8px;
    right: 6px;
  }

  .memory-card {
    min-height: 65px;
  }

  .memory-card-front, .memory-card-back {
    font-size: 1.8rem;
  }

  .route-map {
    height: 280px;
  }

  .route-point {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }

  .game-area {
    min-height: 220px;
  }

  .sort-zones {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .sparkle-badge {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
  }

  .story-choice {
    max-width: 100%;
    width: 100%;
    padding: 1rem;
  }

  .story-choices {
    flex-direction: column;
    gap: 0.6rem;
  }

  .quiz-image {
    font-size: 3.5rem;
  }

  .quiz-question {
    font-size: 1.1rem;
  }

  .printable-card {
    padding: 1rem;
  }

  .cookie-canvas {
    border-radius: 15px;
  }

  .color-swatch {
    width: 38px;
    height: 38px;
  }
}

/* Small phones */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 1.35rem;
  }

  .world-flag {
    font-size: 1.6rem;
  }

  .world-name {
    font-size: 0.7rem;
  }

  .page-banner h1 {
    font-size: 1.4rem;
  }

  .advent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advent-door-day {
    font-size: 1.2rem;
  }

  .advent-door-wreath {
    width: 16px;
    height: 16px;
  }

  .advent-door-wreath::before {
    border-width: 4px;
  }

  .advent-wreath-berry {
    width: 3px;
    height: 3px;
  }

  .advent-picture {
    font-size: 1.3rem;
  }

  .advent-picture-name {
    font-size: 0.48rem;
  }

  .memory-card-front, .memory-card-back {
    font-size: 1.5rem;
  }

  .route-point {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }

  .skill-display {
    font-size: 1.3rem;
    letter-spacing: 0.1rem;
  }
}

/* ==================== ACCESSIBILITY ==================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --cream: #FFFFFF;
    --text-dark: #000000;
  }

  .card, .game-container, .parent-section {
    border: 3px solid #000;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .snowflakes {
    display: none;
  }
}

/* ==================== CONFETTI ==================== */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10001;
}

.confetti {
  position: absolute;
  top: -10px;
  animation: confetti-fall linear forwards;
}

.confetti-circle {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50%;
}

.confetti-ribbon {
  border-radius: 2px;
}

@keyframes confetti-fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  25% {
    transform: translate(var(--sway, 0), 25vh) rotate(180deg);
    opacity: 1;
  }
  50% {
    transform: translate(calc(var(--sway, 0) * -1), 50vh) rotate(360deg);
    opacity: 1;
  }
  75% {
    transform: translate(var(--sway, 0), 75vh) rotate(540deg);
    opacity: 0.8;
  }
  100% {
    transform: translate(0, 100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ==================== WELCOME MODAL ==================== */
.welcome-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: white;
  border-radius: 25px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 15px 50px rgba(0,0,0,0.3);
  z-index: 10002;
  border: 4px solid var(--gold);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 480px;
  width: 90%;
}

.welcome-modal.show {
  transform: translate(-50%, -50%) scale(1);
}

.welcome-modal h2 {
  font-size: 1.8rem;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.welcome-modal p {
  color: #5D4037;
  margin-bottom: 1.5rem;
}

.name-input {
  padding: 0.8rem 1.5rem;
  border: 3px solid var(--gold);
  border-radius: 15px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  text-align: center;
  width: 80%;
  max-width: 250px;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.name-input:focus {
  border-color: var(--red);
}

/* ==================== TOOLTIP / AUDIO BTN ==================== */
.audio-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  border: 3px solid white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--shadow);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.audio-btn:hover {
  transform: scale(1.1);
}

.audio-btn:active {
  transform: scale(0.92);
}

.audio-btn.muted {
  background: #8a8a94;
  border-color: #d0d0d6;
}

.audio-btn.pop {
  animation: audioPop 0.3s ease;
}

@keyframes audioPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ==================== PAGE TRANSITION BANNER ==================== */
.page-banner {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  padding: 2rem 1.5rem;
  text-align: center;
}

.page-banner h1 {
  color: white;
  font-size: 2.2rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.page-banner p {
  color: var(--cream);
  font-weight: 600;
  margin-top: 0.3rem;
}

.page-banner .breadcrumb {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.page-banner .breadcrumb a {
  color: var(--gold);
}

.page-banner .breadcrumb span {
  color: rgba(255,255,255,0.7);
}

/* ==================== SLEIGH LOAD PHYSICS ==================== */
.sleigh-stage {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 340px;
  min-height: 340px;
  height: clamp(300px, 54vh, 440px);
  margin: 0 auto;
  background: linear-gradient(180deg, #4FC3F7 0%, #81D4FA 34%, #B3E5FC 42%, #6d4c26 42%, #5d3f1c 100%);
  border-radius: 28px;
  overflow: hidden;
  touch-action: manipulation;
}

.sleigh-belt {
  position: absolute;
  left: 0;
  right: 0;
  top: 56%;
  height: 30px;
  background: repeating-linear-gradient(90deg, #7b6a57 0 16px, #635241 16px 32px);
  border-top: 4px solid #9c876f;
  border-bottom: 4px solid #4d3e30;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.sleigh-sack {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 36%;
  height: 48%;
  background: #C62828;
  border: 4px solid #8E1D1D;
  border-top: none;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: inset 0 20px 40px rgba(0,0,0,0.25), 0 4px 14px rgba(0,0,0,0.35);
  z-index: 2;
}

.sleigh-sack::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -6px;
  right: -6px;
  height: 24px;
  background: white;
  border-radius: 50%;
  border: 3px solid #8E1D1D;
}

.sleigh-sack-fill {
  position: absolute;
  bottom: calc(100% - 10px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  white-space: nowrap;
  display: flex;
  gap: 2px;
  pointer-events: none;
  z-index: 3;
}

.sleigh-sack-fill > span {
  display: inline-block;
  animation: sleighPopIn .3s ease-out forwards;
}

@keyframes sleighPopIn {
  from { transform: translateY(12px) scale(0.6); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

.sleigh-sack--wiggle {
  animation: sleighWiggle 0.35s ease-in-out;
}

@keyframes sleighWiggle {
  0%   { transform: translateX(-50%) rotate(0); }
  25%  { transform: translateX(-50%) rotate(4deg); }
  50%  { transform: translateX(-50%) rotate(-3deg); }
  75%  { transform: translateX(-50%) rotate(2deg); }
  100% { transform: translateX(-50%) rotate(0); }
}

.sleigh-toy {
  position: absolute;
  top: 52%;
  transform: translate(-50%, -50%);
  font-size: 58px;
  z-index: 5;
  visibility: hidden;
  will-change: left, top, transform;
}

.sleigh-controls {
  text-align: center;
  margin-top: 1.4rem;
}

.sleigh-drop-btn {
  width: 150px;
  height: 150px;
  font-size: 1.6rem;
  width: clamp(110px, 28vw, 160px);
  height: clamp(110px, 28vw, 160px);
  font-size: clamp(1.4rem, 4.5vw, 1.8rem);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #EF5350, #B71C1C 72%);
  color: white;
  font-weight: 900;
  font-family: 'Fredoka One', cursive, sans-serif;
  border: 6px solid #7B1616;
  box-shadow: 0 8px 0 #6a1212, 0 14px 24px rgba(0,0,0,0.3);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}

.sleigh-drop-btn:focus-visible {
  box-shadow: 0 0 0 4px white, 0 0 0 7px #1976D2, 0 8px 0 #6a1212, 0 14px 24px rgba(0,0,0,0.3);
}

.sleigh-drop-btn:active {
  transform: translateY(6px);
  box-shadow: 0 0 0 #6a1212, 0 2px 6px rgba(0,0,0,0.3);
}

.sleigh-bubble {
  position: absolute;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #5D4037;
  border-radius: 50%;
  padding: 0.4rem 0.7rem;
  font-size: 1rem;
  font-weight: 700;
  color: #5D4037;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  animation: sleighBubbleUp .85s ease-out forwards;
}

@keyframes sleighBubbleUp {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(0.7) translateY(0); }
  40%  { opacity: 1; transform: translate(-50%, -50%) scale(1)   translateY(-14px); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05) translateY(-38px); }
}

.sleigh-spark {
  position: absolute;
  font-size: 1.4rem;
  pointer-events: none;
  z-index: 20;
  opacity: 1;
  animation: sleighSpark .6s ease-out forwards;
}

@keyframes sleighSpark {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); }
  to   { opacity: 0; transform: translate(-50%, -50%) scale(0.5) translateY(-32px); }
}

/* ===== Magic Snow Globe ===== */
.globe-game-area {
  max-width: 560px;
  margin: 0 auto;
}

.globe-shake {
  position: relative;
  width: 90vw;
  max-width: 420px;
  margin: 0 auto 0.25rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.globe-shake:focus-visible {
  outline: 3px dashed #C62828;
  outline-offset: 6px;
  border-radius: 50%;
}

.globe {
  position: relative;
  width: 78vw;
  max-width: 344px;
  height: 78vw;
  max-height: 344px;
  margin: 0 auto;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.55);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.3), 0 6px 0 rgba(0,0,0,0.12), 0 18px 40px rgba(15,60,110,0.35);
  overflow: hidden;
  background: linear-gradient(180deg, #A5D8F5 0%, #CFE9FA 52%, #F4FBFE 62%, #FFFFFF 100%);
}

.globe-scene {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.globe-scene::before {
  content: '';
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -42%;
  height: 70%;
  background: radial-gradient(ellipse at 50% 100%, #FFFFFF 25%, #D9F1FC 62%, rgba(217,241,252,0) 70%);
  z-index: 1;
}

.globe-snow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.snow-bit {
  position: absolute;
  top: -8%;
  left: 0;
  color: #FFFFFF;
  text-shadow: 0 0 4px rgba(135,206,250,0.8);
  animation: globe-fall linear infinite;
}
@keyframes globe-fall {
  0%   { top: -8%;  transform: translateX(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.9; }
  100% { top: 106%; transform: translateX(10px) rotate(160deg); opacity: 0.75; }
}

.globe-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.globe-house {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 290px;
  opacity: 0.95;
  pointer-events: none;
  z-index: 1;
}
.globe-house svg {
  width: 100%;
  height: auto;
  display: block;
}

.globe-char {
  position: absolute;
  bottom: 10%;
  left: 50%;
  margin: 0 0 0 -1.4rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}
.globe-char span {
  display: block;
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 4px rgba(0,0,0,0.18));
}
.globe-char em {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  color: #1E5573;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  margin-top: 2px;
}
.globe-char-snowman { left: 22%; }
.globe-char-elf     { left: 50%; }
.globe-char-penguin { left: 78%; }

.globe-char-snowman.is-dancing { animation: globe-waddle 0.5s ease-in-out infinite; }
.globe-char-elf.is-dancing     { animation: globe-twirl 0.85s ease-in-out infinite; }
.globe-char-penguin.is-dancing { animation: globe-slide 0.55s ease-in-out infinite; }
@keyframes globe-waddle {
  0%, 100% { transform: rotate(-10deg) translateY(0); }
  50%      { transform: rotate(10deg) translateY(-8px); }
}
@keyframes globe-twirl {
  0%   { transform: rotate(0deg) translateY(0); }
  40%  { transform: rotate(180deg) translateY(-18px); }
  75%  { transform: rotate(320deg) translateY(-6px); }
  100% { transform: rotate(360deg) translateY(0); }
}
@keyframes globe-slide {
  0%, 100% { transform: translateX(0) rotate(0deg) translateY(0); }
  25%      { transform: translateX(-22px) rotate(-14deg) translateY(-4px); }
  50%      { transform: translateX(0) rotate(0deg) translateY(2px); }
  75%      { transform: translateX(22px) rotate(14deg) translateY(-4px); }
}

.globe-shake.is-shaking .globe { animation: globe-jiggle 0.65s ease-in-out; }
@keyframes globe-jiggle {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(-6deg) translateX(-4px); }
  40%      { transform: rotate(5deg) translateX(4px); }
  60%      { transform: rotate(-4deg) translateX(-3px); }
  80%      { transform: rotate(3deg) translateX(2px); }
}

.globe-spark {
  position: absolute;
  pointer-events: none;
  z-index: 8;
  animation: globe-spark-fly 0.8s ease-out forwards;
}
@keyframes globe-spark-fly {
  0%   { transform: translateY(0) scale(0.6); opacity: 1; }
  100% { transform: translateY(-34px) scale(1.15); opacity: 0; }
}

.globe-stand {
  width: 62vw;
  max-width: 260px;
  height: 34px;
  margin: -8px auto 0;
  background: linear-gradient(180deg, #C62828, #8E1414);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  text-align: center;
  line-height: 34px;
}
.globe-stand span {
  font-family: 'Fredoka One', cursive;
  color: #FFD54F;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.globe-controls {
  text-align: center;
  margin-top: 1.25rem;
}
.globe-controls .btn { margin: 0.35rem 0.4rem 0.6rem; }

/* === Splat the Naughty Elf === */
.splat-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 400px;
  min-height: 400px;
  height: clamp(380px, 72vw, 520px);
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #1B2E6B 0%, #2C4A9E 45%, #6B8BD6 78%, #EAF4FF 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  touch-action: manipulation;
}
.splat-star {
  position: absolute;
  color: #FFF3B0;
  opacity: 0.85;
  z-index: 0;
  pointer-events: none;
  animation: splat-twinkle 2s ease-in-out infinite;
}
@keyframes splat-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}
.splat-ground {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -20px;
  height: 42%;
  background: linear-gradient(180deg, #FFFFFF, #DCEBFF);
  border-radius: 50% 50% 0 0 / 26% 26% 0 0;
  z-index: 1;
}
.splat-tree {
  position: absolute;
  bottom: 22%;
  width: 0;
  height: 0;
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-bottom: 58px solid #2E7D32;
  z-index: 1;
  opacity: 0.95;
}
.splat-tree::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 48px;
  width: 14px;
  height: 16px;
  background: #6D4C41;
  border-radius: 0 0 4px 4px;
}
.splat-tree--left { left: 5%; }
.splat-tree--right { right: 5%; }
.splat-jar {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  min-width: 86px;
  max-width: 40%;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #5D4037;
  border-radius: 12px;
  padding: 6px 8px 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}
.splat-jar-fill {
  font-size: 15px;
  line-height: 1.3;
  min-height: 19px;
  letter-spacing: 0.05em;
  word-break: break-all;
}
.splat-jar-label {
  display: block;
  font-size: 10px;
  color: #5D4037;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.splat-bowl {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  width: 58px;
  height: 52px;
  background: #C62828;
  border: 3px solid #7A1226;
  border-radius: 8px 8px 18px 18px;
  text-align: center;
  line-height: 48px;
  font-size: 26px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
.splat-elfbtn {
  position: absolute;
  left: 50%;
  top: 20%;
  width: 76px;
  min-width: 76px;
  width: clamp(64px, 13vw, 88px);
  height: 88px;
  min-height: 88px;
  height: clamp(76px, 16vw, 104px);
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  touch-action: manipulation;
  display: none;
  padding: 0;
}
.splat-elfbtn .splat-elf-emoji {
  display: block;
  width: 100%;
  height: 100%;
  font-size: 64px;
  font-size: clamp(58px, 12vw, 80px);
  line-height: 1.1;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.35));
  user-select: none;
  animation: splat-bob 1.6s ease-in-out infinite;
}
@keyframes splat-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.splat-elfbtn.is-in { display: block; }
.splat-elfbtn.is-in.animate-pop { animation: splat-pop-in 0.22s ease-out; }
@keyframes splat-pop-in {
  0% { transform: translate(-50%, -50%) scale(0.2); }
  70% { transform: translate(-50%, -50%) scale(1.18); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.splat-elfbtn.is-shock .splat-elf-emoji { animation: splat-shock 0.3s ease-in-out; }
@keyframes splat-shock {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(0); }
}
.splat-elfbtn:focus-visible { outline: 3px solid #FFD54F; outline-offset: 2px; border-radius: 12px; }
.splat-candy {
  position: absolute;
  z-index: 4;
  width: 32px;
  height: 34px;
  margin-left: -16px;
  margin-top: -17px;
  font-size: 30px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  transition: left 0.32s cubic-bezier(0.2, 0.7, 0.3, 1), top 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.splat-splash {
  position: absolute;
  z-index: 5;
  width: 74px;
  height: 74px;
  margin-left: -37px;
  margin-top: -37px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, #FFD54F 0%, #F48FB1 48%, rgba(255, 255, 255, 0) 72%);
  transform: scale(0);
  animation: splat-splash 0.45s ease-out forwards;
}
@keyframes splat-splash {
  65% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
.splat-drop {
  position: absolute;
  z-index: 5;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}
.splat-bubble {
  position: absolute;
  z-index: 6;
  background: #FFFFFF;
  color: #B71C1C;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  pointer-events: none;
  animation: splat-tip 0.9s ease-out forwards;
}
.splat-bubble::after {
  content: '';
  position: absolute;
  left: 18px;
  bottom: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #FFFFFF;
}
@keyframes splat-tip {
  0% { opacity: 0; transform: translateY(8px); }
  15% { opacity: 1; transform: translateY(0); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-16px); }
}
