:root {
  --pink: #ff8fb7;
  --pink-deep: #ff5d9a;
  --mint: #b8f0e1;
  --lemon: #fff3b0;
  --lilac: #e7d7ff;
  --cream: #fff7fb;
  --ink: #4a3350;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans TC", "Fredoka", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, #ffe3f0 0, transparent 28%),
    radial-gradient(circle at 90% 20%, #d9fff4 0, transparent 26%),
    radial-gradient(circle at 80% 90%, #fff0c7 0, transparent 24%),
    var(--cream);
  color: var(--ink);
}

h1, h2, h3, .logo, .eyebrow {
  font-family: "Fredoka", "Noto Sans TC", sans-serif;
}

.floaters span {
  position: fixed;
  z-index: 0;
  opacity: 0.28;
  font-size: 1.4rem;
  animation: float 8s ease-in-out infinite;
}

.floaters span:nth-child(1) { left: 6%; top: 20%; }
.floaters span:nth-child(2) { left: 88%; top: 30%; animation-delay: 1s; }
.floaters span:nth-child(3) { left: 12%; top: 70%; animation-delay: 2s; }
.floaters span:nth-child(4) { left: 80%; top: 78%; animation-delay: 1.5s; }
.floaters span:nth-child(5) { left: 48%; top: 8%; animation-delay: 0.6s; }

@keyframes float {
  50% { transform: translateY(-10px); }
}

.nav, main, footer {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 6vw;
}

.logo {
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: var(--pink-deep);
  font-weight: 700;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 1.5rem 6vw 3rem;
  align-items: center;
}

.sticker {
  display: inline-block;
  background: var(--lemon);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
}

h1 {
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  line-height: 1.05;
}

h1 em {
  color: var(--pink-deep);
  font-style: normal;
}

.lede {
  margin-top: 1rem;
  line-height: 1.8;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  color: #4a3350;
}

.btn.pink {
  background: var(--pink);
  color: #fff;
}

.btn.mint {
  background: var(--mint);
}

.hero-art img {
  width: 100%;
  border-radius: 2rem;
  background: #fff;
  box-shadow: 0 16px 0 #ffd0e4;
}

.caption {
  text-align: center;
  margin-top: 0.7rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

.gallery, .game, .catch, .facts {
  padding: 3.2rem 6vw;
}

.eyebrow {
  color: var(--pink-deep);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.intro {
  margin-bottom: 1.4rem;
  line-height: 1.7;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.photo-grid figure {
  background: #fff;
  border-radius: 1.4rem;
  overflow: hidden;
  padding: 0.6rem 0.6rem 0.9rem;
  transform: rotate(-1deg);
}

.photo-grid figure:nth-child(even) {
  transform: rotate(1.2deg);
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 1rem;
}

.photo-grid figcaption {
  text-align: center;
  margin-top: 0.45rem;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
}

.game {
  background: linear-gradient(180deg, #ffe9f4, #fff7fb);
  border-radius: 2.4rem 2.4rem 0 0;
}

.quiz-card {
  background: #fff;
  border-radius: 1.6rem;
  padding: 1.3rem;
  max-width: 44rem;
}

.quiz-card h3 {
  margin-bottom: 0.9rem;
}

.choices {
  display: grid;
  gap: 0.6rem;
}

.choice {
  width: 100%;
  text-align: left;
  border: 2px solid #ffd7e8;
  background: #fff;
  border-radius: 1rem;
  padding: 0.8rem 1rem;
  font: inherit;
  cursor: pointer;
}

.choice:hover, .choice.correct {
  background: var(--mint);
  border-color: #7ad9c2;
}

.choice.wrong {
  background: #ffd6e4;
  border-color: var(--pink-deep);
}

.progress, .score {
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.feedback {
  margin-top: 0.8rem;
  max-width: 44rem;
  background: var(--lilac);
  border-radius: 1rem;
  padding: 0.8rem 1rem;
}

.memory-wrap {
  margin-top: 2.4rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 140px));
  gap: 0.8rem;
}

.card {
  width: 100%;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  border-radius: 1.1rem;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card.matched {
  outline: 4px solid #7ad9c2;
}

.fact-pop, .win {
  margin-top: 1rem;
  background: #fff;
  border-radius: 1.2rem;
  padding: 1rem;
  max-width: 40rem;
}

.win img {
  width: 120px;
  border-radius: 1rem;
}

.catch {
  background: linear-gradient(180deg, #e8fff8, #fff7fb);
}

.catch-hud {
  display: flex;
  gap: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.catch-stage {
  position: relative;
  height: 340px;
  max-width: 720px;
  overflow: hidden;
  border-radius: 1.6rem;
  background:
    radial-gradient(circle at 50% 0, #fff 0, transparent 40%),
    linear-gradient(180deg, #cdefff, #ffe6f2);
  border: 4px solid #fff;
}

.drop {
  position: absolute;
  top: -40px;
  border: 0;
  background: transparent;
  font-size: 1.7rem;
  cursor: pointer;
  animation: rain linear forwards;
  filter: drop-shadow(0 4px 0 rgba(255, 255, 255, 0.4));
}

.drop.fake {
  opacity: 0.7;
}

@keyframes rain {
  to { transform: translateY(400px); }
}

.catch-controls {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.catch-msg {
  font-weight: 600;
}

.box-result {
  margin-top: 1.2rem;
  max-width: 360px;
  background: #fff;
  border-radius: 1.5rem;
  padding: 1rem;
  text-align: center;
}

.box-result img {
  width: 100%;
  border-radius: 1.1rem;
  margin: 0.6rem 0;
}

.facts .fact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.facts article {
  background: #fff;
  border-radius: 1.3rem;
  overflow: hidden;
}

.facts img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.facts h3, .facts p {
  padding: 0 0.85rem;
}

.facts h3 {
  margin: 0.7rem 0 0.3rem;
}

.facts p {
  padding-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.92rem;
}

footer {
  padding: 1.4rem 6vw 2.4rem;
}

.tiny {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  opacity: 0.7;
  max-width: 40rem;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hero, .photo-grid, .facts .fact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero, .photo-grid, .facts .fact-grid {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
