:root {
  --blue: #3fb6d8;
  --blue-dark: #2489a8;
  --yellow: #ffd23f;
  --orange: #ff8c42;
  --red: #e2434f;
  --cream: #fffaf0;
  --ink: #1f2d3d;
  --green: #4caf6d;
  --shadow: 0 6px 0 rgba(0,0,0,0.12);
  font-size: 17px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Baloo 2", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #eaf8fd 0%, #fdf6ec 45%, #fdf6ec 100%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

button, .btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 0.7em 1.3em;
  cursor: pointer;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button:active, .btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.12); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-orange { background: var(--orange); }
.btn-red { background: var(--red); }
.btn-green { background: var(--green); }
.btn-outline { background: #fff; color: var(--blue-dark); border: 3px solid var(--blue); box-shadow: none; }
.btn-small { padding: 0.4em 0.9em; font-size: 0.9rem; border-radius: 10px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem 1.2rem;
  background: #fff;
  border-bottom: 4px solid var(--blue);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; color: var(--blue-dark); text-decoration: none; }
#brand-mascot { width: 46px; height: 48px; display: flex; }
.site-nav { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-left: auto; }
.nav-link {
  text-decoration: none;
  font-weight: 700;
  padding: 0.5em 0.9em;
  border-radius: 12px;
  color: var(--ink);
}
.nav-link:hover { background: #eaf8fd; }
.nav-link.active { background: var(--blue); color: #fff; }
.points-badge {
  background: var(--yellow);
  border-radius: 999px;
  padding: 0.4em 1em;
  font-weight: 800;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  background: #fff;
  border: 3px solid var(--blue);
  color: var(--blue-dark);
  border-radius: 12px;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.35em 0.65em;
  cursor: pointer;
  box-shadow: none;
}

main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }

.footer {
  text-align: center;
  padding: 1.2rem;
  font-size: 0.9rem;
  color: #5a6b7a;
  border-top: 3px dashed var(--blue);
  background: #fff;
}
.footer button { margin-bottom: 0.6rem; }

/* Cards & generic layout */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: 0 4px 18px rgba(31,45,61,0.08);
  border: 3px solid #eef6fa;
}
.hero { text-align: center; padding: 1rem 0 2rem; }
.hero h1 { font-size: 2.4rem; margin: 0.4rem 0; color: var(--blue-dark); }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0.6rem auto; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.hint-box {
  background: #fff8e1;
  border: 3px dashed var(--yellow);
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.hint-box .icon { font-size: 1.4rem; }

.tag { display: inline-block; background: var(--blue); color: #fff; border-radius: 999px; padding: 0.15em 0.7em; font-size: 0.8rem; font-weight: 700; }

h2 { color: var(--blue-dark); }

/* Games */
.game-wrap { text-align: center; }
.game-canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  background: linear-gradient(180deg,#bdeeff 0%, #fdf6ec 100%);
  border-radius: 18px;
  border: 4px solid var(--blue);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.game-stats { display: flex; justify-content: center; gap: 2rem; font-weight: 800; margin: 0.6rem 0; font-size: 1.2rem; flex-wrap: wrap; }
.game-stats span { color: var(--blue-dark); }
.game-wrap button { touch-action: manipulation; -webkit-user-select: none; user-select: none; }

/* Merch */
.item-card { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.item-emoji { font-size: 3rem; }
.price { font-weight: 800; color: var(--orange); font-size: 1.1rem; }
.price.discounted { color: var(--green); }
.price-strike { text-decoration: line-through; color: #999; font-size: 0.9rem; margin-right: 0.4rem; }

.cart-row { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0; border-bottom: 1px solid #eee; }
.cart-row .name { flex: 1; font-weight: 700; }
.qty-controls { display: flex; align-items: center; gap: 0.4rem; }
.qty-controls button { padding: 0.2em 0.7em; border-radius: 8px; }

.wheel-wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
#spin-wheel { width: 280px; height: 280px; border-radius: 50%; border: 8px solid var(--ink); transition: transform 4s cubic-bezier(.17,.67,.32,1.02); position: relative; }
.wheel-pointer { font-size: 2rem; margin-bottom: -14px; z-index: 2; }

/* Chick game */
.chick-stage { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.stat-bars { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 0.5rem; }
.stat-row { display: flex; align-items: center; gap: 0.6rem; }
.stat-label { width: 90px; font-weight: 700; font-size: 0.9rem; }
.stat-track { flex: 1; background: #eee; border-radius: 999px; height: 16px; overflow: hidden; }
.stat-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.action-row { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-top: 0.5rem; }

.mascot-wrap { position: relative; display: inline-block; }
.mascot-wrap svg { display: block; transform-origin: 50% 88%; }
.fx-layer { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.fx-particle {
  position: absolute; left: 50%; top: 45%; font-size: 1.7rem;
  transform: translate(-50%, -50%);
  animation: fx-float 1.1s ease-out forwards;
}
.fx-particle.slow { animation-duration: 1.8s; font-size: 2rem; }
@keyframes fx-float {
  0% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -50%) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -120px) scale(1.2); }
}
.mascot-wrap.fx-feed svg { animation: fx-peck 0.55s ease-in-out 2; }
.mascot-wrap.fx-water svg { animation: fx-tilt 0.6s ease-in-out 2; }
.mascot-wrap.fx-play svg { animation: fx-fly 0.45s ease-in-out 3; }
.mascot-wrap.fx-clean svg { animation: fx-wiggle 0.35s ease-in-out 4; }
.mascot-wrap.fx-sleep svg { animation: fx-doze 1.7s ease-in-out 1; }
@keyframes fx-peck { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(10px) rotate(-4deg); } }
@keyframes fx-tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-14deg); } }
@keyframes fx-fly { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-30px) rotate(6deg); } }
@keyframes fx-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes fx-doze { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(0.96) translateY(5px); } }

/* Dress up */
.dressup-layout { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.slot-list { display: flex; flex-direction: column; gap: 0.6rem; min-width: 240px; }
.slot-item { display: flex; align-items: center; gap: 0.6rem; background: #fff; border-radius: 14px; padding: 0.5rem 0.8rem; border: 2px solid #eef6fa; }
.slot-item.equipped { border-color: var(--green); background: #f2fbf4; }
.slot-item .emoji { font-size: 1.6rem; }
.slot-item .info { flex: 1; }
.slot-item .info b { display: block; }

.toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: var(--ink);
  color: #fff;
  padding: 0.8em 1.4em;
  border-radius: 14px;
  font-weight: 700;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.about-photo { display:flex; justify-content:center; margin: 1rem 0; }
.about-photo svg { filter: drop-shadow(0 8px 10px rgba(0,0,0,0.12)); }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    justify-content: center;
    margin-left: 0;
    width: 100%;
    order: 4;
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .site-nav.open { max-height: 640px; }
  .site-nav .nav-link { text-align: center; padding: 0.9em; border-radius: 10px; }
}
