:root {
  --paper-milk: #fffbf4;
  --paper-card: #ffffff;
  --eucalyptus: #dcead8;
  --eucalyptus-deep: #5e8c67;
  --strawberry: #fad3dc;
  --butter-sun: #fbe8a8;
  --espresso-ink: #3a2e2a;
  --ink-soft: #6a5a54;
  --berry-pop: #d95d78;
  --berry-hover: #c34a66;
  --border-ink: #3a2e2a;
  --shadow-cute: 5px 5px 0 #3a2e2a;
  --radius-card: 22px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--espresso-ink);
  background-color: var(--paper-milk);
  background-image: radial-gradient(rgba(58, 46, 42, 0.08) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  line-height: 1.65;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid var(--berry-pop);
  outline-offset: 3px;
}

/* Ambient Floating Background Doodles */
.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-doodle {
  position: absolute;
  bottom: -40px;
  opacity: 0;
  user-select: none;
  animation: ambientRise var(--ad-dur, 14s) linear infinite;
  animation-delay: var(--ad-delay, 0s);
}

@keyframes ambientRise {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.34;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    transform: translate3d(var(--ad-drift, 35px), -112vh, 0) rotate(var(--ad-rot, 180deg)) scale(1.1);
    opacity: 0;
  }
}

/* Tap Sparkle Layer */
#sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
  overflow: hidden;
}

.tap-spark {
  position: fixed;
  pointer-events: none;
  user-select: none;
  font-size: 1rem;
  animation: sparkBurst 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes sparkBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--sx)), calc(-50% + var(--sy))) scale(1.25) rotate(var(--srot));
    opacity: 0;
  }
}

.hug-float-toast {
  position: fixed;
  pointer-events: none;
  z-index: 96;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--berry-pop);
  background: var(--paper-card);
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  box-shadow: 2px 3px 0 var(--border-ink);
  animation: toastRise 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes toastRise {
  0% {
    transform: translate(-50%, 0) scale(0.7);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -14px) scale(1.06);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -58px) scale(0.95);
    opacity: 0;
  }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Confetti Layer */
#confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.floating-piece {
  position: fixed;
  font-size: 1.4rem;
  user-select: none;
  pointer-events: none;
  animation: floatFall var(--dur, 3.2s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatFall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg) scale(0.7);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift, 40px), 108vh, 0) rotate(var(--rot, 240deg)) scale(1.1);
    opacity: 0;
  }
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 10px;
  z-index: 40;
  padding: 0 12px;
}

.nav-pill {
  max-width: 980px;
  margin: 0 auto;
  background: rgba(255, 251, 244, 0.95);
  backdrop-filter: blur(8px);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-pill);
  box-shadow: 0 5px 0 rgba(58, 46, 42, 0.14);
  padding: 7px 10px 7px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--berry-pop);
  border: 2px solid var(--border-ink);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a:hover {
  background: var(--eucalyptus);
  color: var(--espresso-ink);
}

.hug-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--strawberry);
  color: var(--espresso-ink);
  border: 2.2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  min-height: 38px;
  font-weight: 800;
  font-size: 0.86rem;
  white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.hug-btn:hover {
  background: var(--butter-sun);
}

.hug-btn:active {
  transform: scale(0.95);
}

.hug-heart {
  color: var(--berry-pop);
}

.hug-count {
  background: var(--paper-card);
  border: 1.8px solid var(--border-ink);
  border-radius: var(--radius-pill);
  padding: 0 7px;
  font-size: 0.78rem;
}

/* Mobile Quick Nav Strip */
.mobile-quick-nav {
  display: none;
  max-width: 980px;
  margin: 8px auto 0;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 2px 4px;
}

.mobile-quick-nav::-webkit-scrollbar {
  display: none;
}

.mobile-quick-nav a {
  flex: 0 0 auto;
  background: rgba(255, 251, 244, 0.95);
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--espresso-ink);
  box-shadow: 2px 2px 0 rgba(58, 46, 42, 0.25);
}

/* Main Container */
main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 18px 88px;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 40px;
  align-items: center;
  padding: 24px 0 42px;
}

.hero-copy > * {
  animation: heroPopIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.22s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.3s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.38s; }
.hero-copy > *:nth-child(6) { animation-delay: 0.44s; }

@keyframes heroPopIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mascot-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--eucalyptus);
  border: 2.5px solid var(--border-ink);
  border-radius: 26px;
  padding: 7px 16px;
  box-shadow: 4px 4px 0 var(--border-ink);
  margin-bottom: 16px;
}

.mascot-svg {
  width: 52px;
  height: 52px;
  animation: mascotBob 2.6s ease-in-out infinite;
}

.mascot-svg:last-of-type {
  animation-delay: 1.3s;
}

@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}

.badge-heart {
  font-size: 1.35rem;
  color: var(--berry-pop);
  animation: gentleBeat 1.35s ease-in-out infinite;
}

@keyframes gentleBeat {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.32); }
  65% { transform: scale(1.08); }
}

.hero-title {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2.15rem, 6vw, 3.55rem);
  line-height: 1.08;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 1.04rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 0 18px;
}

.hero-lead strong {
  color: var(--espresso-ink);
}

.ldr-ribbon {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  background: var(--paper-card);
  border: 2px dashed var(--border-ink);
  border-radius: 16px;
  padding: 8px 14px;
  margin-bottom: 22px;
  font-weight: 800;
  font-size: 0.88rem;
}

.ldr-city {
  color: var(--espresso-ink);
}

.ldr-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 78px;
  justify-content: center;
}

.ldr-dots {
  color: rgba(58, 46, 42, 0.35);
  letter-spacing: 2px;
  font-size: 0.85rem;
}

.ldr-travel-heart {
  position: absolute;
  left: 0;
  color: var(--berry-pop);
  font-size: 1rem;
  animation: travelLove 2.4s ease-in-out infinite;
}

@keyframes travelLove {
  0% { transform: translateX(0) scale(0.95); }
  50% { transform: translateX(62px) scale(1.25); }
  100% { transform: translateX(0) scale(0.95); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-note {
  font-family: "Caveat", cursive;
  font-size: 1.35rem;
  color: var(--eucalyptus-deep);
  margin: 4px 0 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--border-ink);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  box-shadow: 4px 4px 0 var(--border-ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translate(-1px, -2px);
  box-shadow: 5px 6px 0 var(--border-ink);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--border-ink);
}

.btn-primary {
  background: var(--berry-pop);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--berry-hover);
}

.btn-secondary {
  background: var(--butter-sun);
  color: var(--espresso-ink);
}

.btn-dodge {
  background: var(--paper-card);
  color: var(--espresso-ink);
}

/* Interactive Polaroid Stack */
.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.polaroid-stack {
  position: relative;
  width: min(320px, 80vw);
  height: 400px;
  cursor: pointer;
  user-select: none;
}

.stack-card {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border: 2.5px solid var(--border-ink);
  border-radius: 14px;
  padding: 12px 12px 54px;
  box-shadow: 0 12px 24px rgba(58, 46, 42, 0.13);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid rgba(58, 46, 42, 0.15);
}

.stack-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  font-family: "Caveat", cursive;
  font-size: 1.26rem;
  text-align: center;
  color: var(--espresso-ink);
  line-height: 1.12;
}

.stack-card.is-leaving {
  transform: translate(90px, -20px) rotate(12deg) !important;
  opacity: 0;
}

.shuffle-btn {
  background: var(--paper-card);
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  min-height: 42px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--espresso-ink);
  box-shadow: 3px 3px 0 var(--border-ink);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.shuffle-btn:hover {
  background: var(--eucalyptus);
}

/* Shared Section Styling */
.section {
  padding: 52px 0 20px;
  scroll-margin-top: 96px;
}

.section-head {
  max-width: 640px;
  margin: 0 0 24px;
}

.section-head h2 {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.65rem, 4.5vw, 2.3rem);
  margin: 0 0 8px;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* Koala ID + Sticky Board */
.notebook-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 26px;
  align-items: start;
}

.koala-id-card {
  position: relative;
  background: var(--paper-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-card);
  padding: 24px 20px 20px;
  box-shadow: var(--shadow-cute);
}

.tape {
  position: absolute;
  width: 88px;
  height: 22px;
  background: rgba(251, 232, 168, 0.88);
  border: 1.5px solid rgba(58, 46, 42, 0.25);
  border-radius: 4px;
}

.tape-top {
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
}

.id-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px dashed rgba(58, 46, 42, 0.2);
}

.id-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--border-ink);
  flex-shrink: 0;
}

.id-name {
  font-family: "Fredoka", sans-serif;
  font-size: 1.28rem;
  margin: 0;
}

.id-aka {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--berry-pop);
  font-weight: 700;
}

.id-stats {
  margin: 0;
  display: grid;
  gap: 12px;
}

.id-stats dt {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--eucalyptus-deep);
}

.id-stats dd {
  margin: 2px 0 0;
  font-size: 0.94rem;
  color: var(--espresso-ink);
}

/* Sticky Notes */
.sticky-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sticky-note {
  text-align: left;
  border: 2.5px solid var(--border-ink);
  border-radius: 18px;
  padding: 16px 16px 18px;
  box-shadow: 4px 4px 0 var(--border-ink);
  color: var(--espresso-ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sticky-note:nth-child(odd) {
  transform: rotate(-0.7deg);
}

.sticky-note:nth-child(even) {
  transform: rotate(0.7deg);
}

.sticky-note:hover {
  transform: translateY(-2px) rotate(0deg);
  box-shadow: 6px 7px 0 var(--border-ink);
}

.note-sage { background: var(--eucalyptus); }
.note-pink { background: var(--strawberry); }
.note-butter { background: var(--butter-sun); }
.note-cream { background: #fff4e4; }

.note-tag {
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}

.sticky-note h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.12rem;
  margin: 4px 0 0;
}

.note-preview {
  margin: 0;
  font-size: 0.91rem;
  color: var(--ink-soft);
}

.note-secret {
  display: none;
  margin: 4px 0 0;
  font-size: 0.94rem;
  color: var(--espresso-ink);
  font-weight: 600;
}

.sticky-note.is-open {
  transform: rotate(0deg);
  animation: notePop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes notePop {
  0% { transform: scale(0.95) rotate(-2deg); }
  50% { transform: scale(1.03) rotate(1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.sticky-note.is-open .note-preview {
  display: none;
}

.sticky-note.is-open .note-secret {
  display: block;
}

.sticky-note.is-open .note-tag {
  background: var(--berry-pop);
  color: #fff;
}

/* Gallery Filter & Scrapbook Grid */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-chip {
  flex: 0 0 auto;
  background: var(--paper-card);
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  min-height: 40px;
  padding: 7px 16px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--espresso-ink);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.filter-chip:hover {
  background: var(--eucalyptus);
}

.filter-chip.is-active {
  background: var(--berry-pop);
  color: #ffffff;
  box-shadow: 3px 3px 0 var(--border-ink);
}

.scrapbook-grid {
  columns: 3 250px;
  column-gap: 20px;
}

.photo-polaroid {
  break-inside: avoid;
  margin: 0 0 22px;
  position: relative;
  background: #ffffff;
  border: 2.3px solid var(--border-ink);
  border-radius: 14px;
  padding: 10px 10px 14px;
  box-shadow: 4px 5px 0 rgba(58, 46, 42, 0.9);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
  animation: polaroidEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--enter-delay, 0s);
}

@keyframes polaroidEnter {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.92) rotate(0deg);
  }
  100% {
    opacity: 1;
  }
}

.photo-polaroid:hover {
  transform: translateY(-4px) rotate(0deg) !important;
  box-shadow: 7px 9px 0 rgba(58, 46, 42, 0.95);
}

.photo-polaroid .washi {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(var(--tape-rot, -3deg));
  width: 66px;
  height: 17px;
  border-radius: 3px;
  opacity: 0.92;
  border: 1.5px solid rgba(58, 46, 42, 0.2);
}

.photo-polaroid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1.5px solid rgba(58, 46, 42, 0.12);
}

.photo-polaroid figcaption {
  margin-top: 10px;
  font-family: "Caveat", cursive;
  font-size: 1.32rem;
  line-height: 1.2;
  color: var(--espresso-ink);
  text-align: center;
  padding: 0 4px;
}

/* Pojok Main Section */
.play-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.play-card {
  background: var(--paper-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-cute);
  display: flex;
  flex-direction: column;
}

.play-card h3 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.35rem;
  margin: 0 0 6px;
}

.play-desc {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.gacha-stage {
  background: var(--eucalyptus);
  border: 2.2px solid var(--border-ink);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: center;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gacha-ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--border-ink);
  background: linear-gradient(180deg, var(--berry-pop) 50%, #ffffff 50%);
  color: var(--espresso-ink);
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 rgba(58, 46, 42, 0.2);
}

.gacha-ball.is-shaking {
  animation: gachaShake 0.45s ease;
}

@keyframes gachaShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-18deg) scale(1.1); }
  50% { transform: rotate(18deg) scale(1.15); }
  75% { transform: rotate(-10deg) scale(1.05); }
}

.gacha-text {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.48;
  max-width: 34ch;
}

.gacha-text.is-popping {
  animation: textPop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes textPop {
  0% { opacity: 0; transform: translateY(10px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.gacha-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gacha-counter {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--eucalyptus-deep);
}

/* Quiz / Dodge Card */
.quiz-box {
  position: relative;
  background: #fff4f7;
  border: 2.2px solid var(--border-ink);
  border-radius: 18px;
  padding: 20px 16px;
  min-height: 236px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  flex: 1;
}

.quiz-question {
  font-family: "Fredoka", sans-serif;
  font-size: 1.22rem;
  margin: 0 0 6px;
}

.quiz-tease {
  margin: 0 0 18px;
  font-size: 0.91rem;
  color: var(--berry-pop);
  font-weight: 700;
  min-height: 1.4em;
}

.quiz-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.btn-dodge.is-floating {
  position: absolute;
  z-index: 5;
  transition: left 0.2s ease, top 0.2s ease;
}

.certificate {
  background: var(--butter-sun);
  border: 2.5px dashed var(--border-ink);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popIn {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cert-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--berry-pop);
}

.certificate h4 {
  font-family: "Fredoka", sans-serif;
  font-size: 1.18rem;
  margin: 4px 0 8px;
}

.certificate p {
  margin: 0 0 8px;
  font-size: 0.91rem;
}

.cert-sign {
  font-family: "Caveat", cursive;
  font-size: 1.35rem;
  margin: 8px 0 0 !important;
}

/* Interactive Envelope Letter */
.envelope-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.envelope-btn {
  width: 100%;
  position: relative;
  background: var(--strawberry);
  border: 2.5px solid var(--border-ink);
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-cute);
  transition: transform 0.2s ease;
}

.envelope-btn:hover {
  transform: translateY(-3px);
}

.envelope-flap {
  height: 52px;
  background: #f5b9c7;
  border-bottom: 2.5px solid var(--border-ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-btn.is-opened .envelope-flap {
  transform: rotateX(180deg);
}

.envelope-body {
  padding: 20px 20px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.wax-seal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--berry-pop);
  color: #ffffff;
  border: 2.5px solid var(--border-ink);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-top: -42px;
  box-shadow: 0 4px 0 rgba(58, 46, 42, 0.22);
  animation: sealWiggle 2.6s ease-in-out infinite;
}

@keyframes sealWiggle {
  0%, 75%, 100% { transform: rotate(0deg) scale(1); }
  82% { transform: rotate(-10deg) scale(1.1); }
  90% { transform: rotate(10deg) scale(1.1); }
}

.envelope-to {
  font-family: "Fredoka", sans-serif;
  font-size: 1.15rem;
  color: var(--espresso-ink);
}

.envelope-hint {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.letter-paper {
  margin-top: 18px;
  background: #fffdf8;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 33px,
    rgba(94, 140, 103, 0.16) 33px,
    rgba(94, 140, 103, 0.16) 34px
  );
  border: 2.5px solid var(--border-ink);
  border-radius: 20px;
  padding: 28px 26px;
  box-shadow: var(--shadow-cute);
  animation: popIn 0.35s ease;
}

.letter-greeting {
  font-family: "Caveat", cursive;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--berry-pop);
}

.letter-paper p {
  margin: 0 0 15px;
  font-size: 1rem;
  line-height: 1.75;
}

.letter-closing {
  font-family: "Caveat", cursive;
  font-size: 1.6rem;
  line-height: 1.35 !important;
  margin-top: 20px !important;
}

.close-letter-btn {
  margin-top: 10px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 26px 18px calc(76px + env(safe-area-inset-bottom, 0px));
  border-top: 2px dashed rgba(58, 46, 42, 0.22);
  max-width: 960px;
  margin: 0 auto;
}

.site-footer p {
  margin: 4px 0;
}

.footer-sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Floating Love Rain Button */
.love-rain-fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  background: var(--butter-sun);
  color: var(--espresso-ink);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-pill);
  min-height: 44px;
  padding: 9px 18px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 4px 4px 0 var(--border-ink);
  animation: fabFloat 2.8s ease-in-out infinite;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

@keyframes fabFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.love-rain-fab:hover {
  background: var(--strawberry);
  animation-play-state: paused;
  transform: translateY(-2px) scale(1.04);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 25, 22, 0.8);
  backdrop-filter: blur(4px);
}

.lightbox-dialog {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border: 3px solid var(--border-ink);
  border-radius: 20px;
  padding: 16px 16px 14px;
  width: min(680px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-figure {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox-figure img {
  max-height: 62vh;
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-figure figcaption {
  font-family: "Caveat", cursive;
  font-size: 1.48rem;
  text-align: center;
  color: var(--espresso-ink);
  max-width: 44ch;
  line-height: 1.25;
}

.lightbox-controls {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.lightbox-counter {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-soft);
  min-width: 56px;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.2px solid var(--border-ink);
  background: var(--butter-sun);
  color: var(--espresso-ink);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 2px 3px 0 var(--border-ink);
}

.lightbox-close {
  position: absolute;
  top: -15px;
  right: -12px;
  background: var(--strawberry);
}

/* Tablet & Mobile Responsive */
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .mobile-quick-nav {
    display: flex;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
    padding: 16px 0 32px;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .notebook-grid,
  .play-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0 16px;
    scroll-margin-top: 112px;
  }
}

@media (max-width: 560px) {
  main {
    padding: 18px 14px 80px;
  }

  .nav-pill {
    padding: 6px 8px 6px 13px;
  }

  .brand {
    font-size: 0.94rem;
  }

  .hug-btn {
    padding: 6px 11px;
    font-size: 0.82rem;
  }

  .mascot-svg {
    width: 44px;
    height: 44px;
  }

  .polaroid-stack {
    width: min(290px, 84vw);
    height: 368px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .sticky-board {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sticky-note:nth-child(odd),
  .sticky-note:nth-child(even) {
    transform: rotate(0deg);
  }

  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .scrapbook-grid {
    columns: 1;
  }

  .photo-polaroid {
    transform: rotate(0deg) !important;
    margin-bottom: 18px;
  }

  .play-card {
    padding: 18px 16px;
  }

  .letter-paper {
    padding: 22px 18px;
  }

  .lightbox-dialog {
    padding: 14px 12px 14px;
  }

  .lightbox-figure img {
    max-height: 56vh;
  }
}

@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;
  }
}
