

:root {
  
  --bg-cream: #fafcf8;
  --bg-cream-alt: #f2f5ee;
  --matcha-light: #8aa07e;
  --matcha-medium: #788d6e;
  --matcha-deep: #66795d;
  --matcha-dark: #56674e;
  --matcha-forest: #46543f;
  
  --white-pure: #ffffff;
  --shadow-soft: 0 10px 30px rgba(70, 84, 63, 0.08);
  --shadow-card: 0 15px 35px rgba(70, 84, 63, 0.12);
  --shadow-hover: 0 22px 45px rgba(70, 84, 63, 0.18);

  
  --font-heading: 'Fredoka', cursive, sans-serif;
  --font-handwriting: 'Caveat', cursive, sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}


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

html, body {
  scroll-behavior: smooth;
  scrollbar-width: none; 
  -ms-overflow-style: none; 
}

html::-webkit-scrollbar, body::-webkit-scrollbar {
  display: none !important; 
}

body {
  font-family: var(--font-body);
  
  background: radial-gradient(circle at 50% 35vh, #ffffff 0%, #fafcf8 20%, #e2eadb 48%, #8aa07e 75%, #56674e 100%);
  background-attachment: fixed;
  color: var(--matcha-forest);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}


#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}


.music-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--matcha-forest);
  color: var(--white-pure);
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(70, 84, 63, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: var(--transition-smooth);
}

.music-toggle-btn:hover {
  transform: scale(1.1);
  background: var(--matcha-dark);
}

.music-toggle-btn.playing {
  animation: pulse-music 2s infinite ease-in-out;
}

@keyframes pulse-music {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(70, 84, 63, 0.4); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(70, 84, 63, 0); }
}


.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}



.envelope-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #fafcf8 20%, #e2eadb 48%, #8aa07e 75%, #56674e 100%);
  z-index: 50;
  padding: 20px;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope-screen.opened {
  opacity: 0;
  transform: translateY(-40px) scale(0.95);
  pointer-events: none;
}

.envelope-card {
  background: var(--white-pure);
  padding: 40px 32px;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 380px;
  width: 100%;
  position: relative;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.8);
  transition: var(--transition-smooth);
  animation: float-gentle 4s ease-in-out infinite;
}

.envelope-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.envelope-graphic {
  margin: 36px auto 28px;
  width: 160px;
  height: 110px;
  position: relative;
  user-select: none;
  overflow: visible;
}


.envelope-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  -webkit-perspective: 1000px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  overflow: visible;
}

.env-back {
  position: absolute;
  inset: 0;
  background: #788d6e;
  border: 2px solid #56674e;
  border-radius: 14px;
  z-index: 1;
}

.env-letter {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  height: 86px;
  background: #ffffff;
  border-radius: 10px;
  border: 1.8px solid #56674e;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.65s cubic-bezier(0.34, 1.4, 0.64, 1) 0.42s, opacity 0.25s ease 0.42s;
  z-index: 5;
  transform: translateY(16px);
  -webkit-transform: translateY(16px);
  opacity: 0;
}

.env-letter .letter-stamp {
  font-size: 1.3rem;
  line-height: 1;
}

.env-letter .letter-text {
  font-family: var(--font-handwriting, cursive);
  font-size: 1.1rem;
  font-weight: 700;
  color: #56674e;
  line-height: 1;
}

.env-letter .mini-text-line {
  width: 45px;
  height: 3px;
  background: #e2eadb;
  border-radius: 2px;
}

.env-pocket {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.env-top-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 74px;
  transform-origin: 50% 0%;
  -webkit-transform-origin: 50% 0%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

.env-seal {
  position: absolute;
  top: 71px;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 34px;
  height: 34px;
  background: #fafcf8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1.8px solid #56674e;
  z-index: 30;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}


.envelope-card.is-opening {
  animation: none !important;
}

.envelope-card.is-opening .env-seal {
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

.envelope-card.is-opening .env-top-flap {
  transform: rotateX(180deg);
  -webkit-transform: rotateX(180deg);
  z-index: 1 !important;
}

.envelope-card.is-opening .env-letter {
  transform: translateY(-56px) scale(1.05);
  -webkit-transform: translateY(-56px) scale(1.05);
  opacity: 1;
  z-index: 10 !important;
}

.envelope-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--matcha-forest);
  margin-bottom: 6px;
}

.envelope-subtitle {
  font-size: 0.95rem;
  color: var(--matcha-deep);
  margin-bottom: 24px;
}

.tap-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--matcha-forest);
  color: var(--bg-cream);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.envelope-card:hover .tap-hint-pill {
  background: var(--matcha-dark);
}



.main-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-bottom: 80px;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.section-container {
  max-width: 860px;
  margin: 0 auto 64px;
  padding: 0 20px;
}


.hero-section {
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 40px;
  position: relative;
  background: transparent;
  margin-bottom: 32px;
  overflow: hidden;
}


.bunting-garland {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 15;
  opacity: 0.95;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
  pointer-events: none;
  overflow: hidden;
}


.hero-ornaments {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.ornament {
  position: absolute;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
}

.ornament.spark-1 {
  top: 6%;
  left: 4%;
  animation: float-spark 3s ease-in-out infinite alternate;
}

.ornament.spark-2 {
  top: 65%;
  right: 5%;
  animation: float-spark 3.5s ease-in-out 0.5s infinite alternate;
}

.ornament.leaf-1 {
  top: 42%;
  left: 3%;
  animation: float-leaf 4s ease-in-out infinite alternate;
}

.ornament.leaf-2 {
  top: 48%;
  right: 3%;
  animation: float-leaf 4.5s ease-in-out 0.8s infinite alternate;
}

.ornament.heart-1 {
  bottom: 18%;
  left: 5%;
  animation: float-spark 3.2s ease-in-out 1s infinite alternate;
}

@keyframes float-spark {
  0% { transform: translateY(0) scale(1) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-10px) scale(1.2) rotate(15deg); opacity: 1; }
  100% { transform: translateY(-4px) scale(0.9) rotate(-10deg); opacity: 0.8; }
}

@keyframes float-leaf {
  0% { transform: translateY(0) rotate(-10deg); }
  100% { transform: translateY(-14px) rotate(15deg); }
}

.leaf-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(138, 160, 126, 0.18);
  color: var(--matcha-forest);
  border: 1px solid rgba(138, 160, 126, 0.3);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7.5vw, 4.8rem);
  color: var(--matcha-forest);
  line-height: 1.12;
  margin-bottom: 12px;
  text-wrap: balance;
  -webkit-text-stroke: 2.5px #ffffff;
  paint-order: stroke fill;
  filter: drop-shadow(0 6px 16px rgba(70, 84, 63, 0.22));
}

.hero-title.pop-anim {
  animation: title-pop-in 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes title-pop-in {
  0% {
    transform: scale(0.3) translateY(40px);
    opacity: 0;
  }
  65% {
    transform: scale(1.12) translateY(-6px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--matcha-forest, #3d4937) !important;
  max-width: 540px;
  margin: 0 auto 28px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 1;
  text-shadow: 0 1px 4px rgba(255, 255, 255, 0.6);
}

.hero-subtitle strong {
  font-weight: 800;
  color: var(--matcha-forest, #3d4937);
  text-decoration: underline;
  text-decoration-thickness: 2.5px;
  text-underline-offset: 3px;
}

.scroll-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--matcha-deep);
  opacity: 0.8;
  animation: bounce-hint 2s infinite ease-in-out;
}

@keyframes bounce-hint {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}



.cake-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cake-art-wrapper {
  position: relative;
  width: 240px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cake-vector-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 15px 30px rgba(70, 84, 63, 0.25));
}


.flame-wrapper {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
  cursor: pointer;
  z-index: 10;
}

.flame-wrapper.blown {
  opacity: 0;
  transform: translate(-50%, -12px) scale(0.5);
  pointer-events: none;
}

.flame-outer {
  width: 18px;
  height: 28px;
  background: linear-gradient(to bottom, #fff5b8 0%, #ffa439 60%, #ff523b 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flicker-outer 0.7s infinite alternate ease-in-out;
}

.flame-inner {
  position: absolute;
  width: 8px;
  height: 14px;
  background: #ffffff;
  border-radius: 50% 50% 20% 20%;
  bottom: 3px;
}

.flame-glow {
  position: absolute;
  width: 44px;
  height: 44px;
  background: rgba(255, 185, 75, 0.5);
  border-radius: 50%;
  filter: blur(10px);
}

@keyframes flicker-outer {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.15) rotate(3deg); }
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--matcha-forest);
  color: var(--bg-cream);
  padding: 14px 30px;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(70, 84, 63, 0.28);
  transition: var(--transition-smooth);
}

.action-btn:hover {
  background: var(--matcha-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(70, 84, 63, 0.35);
}

.action-btn:hover {
  background: var(--matcha-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}


.counter-card {
  background: var(--white-pure);
  padding: 32px 24px;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(138, 160, 126, 0.2);
  text-align: center;
}

.counter-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.counter-header h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--matcha-forest);
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.counter-box {
  background: var(--bg-cream-alt);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.count-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--matcha-dark);
  line-height: 1;
}

.count-label {
  font-size: 0.8rem;
  color: var(--matcha-deep);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}


.letter-card {
  background: #fdfefc;
  background-image: repeating-linear-gradient(#fdfefc 0px, #fdfefc 27px, #eef3eb 28px);
  padding: 48px 36px 40px;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(138, 160, 126, 0.3);
  position: relative;
}

.tape-decoration {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: rgba(138, 160, 126, 0.4);
  backdrop-filter: blur(2px);
  border-left: 2px dashed rgba(255,255,255,0.5);
  border-right: 2px dashed rgba(255,255,255,0.5);
}

.letter-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--matcha-forest);
  margin-bottom: 24px;
  text-align: center;
}

.letter-body p {
  font-family: var(--font-handwriting);
  font-size: 1.55rem;
  color: var(--matcha-forest);
  line-height: 1.6;
  margin-bottom: 18px;
}

.letter-sign {
  font-family: var(--font-handwriting);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--matcha-dark);
  text-align: right;
  margin-top: 32px;
}


.section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
  color: var(--matcha-forest);
}

.section-title-wrap h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
}



.polaroid-section {
  position: relative;
  background-color: #f6f7f4;
  background-image: 
    linear-gradient(rgba(100, 120, 90, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 120, 90, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 40px 20px 50px;
  border-radius: 24px;
  border: 1px dashed rgba(138, 160, 126, 0.35);
  overflow: visible;
}

.coverflow-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  perspective: 1200px;
  perspective-origin: 50% 40%;
}

.coverflow-track {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  touch-action: pan-y;
}

.coverflow-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 380px;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
  user-select: none;
  box-sizing: border-box;
  transform-style: preserve-3d;
  cursor: pointer;
}


.browser-window {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.browser-header {
  height: 32px;
  background: linear-gradient(to bottom, #f3f3f3, #e5e5e5);
  border-bottom: 1px solid #d5d5d5;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  user-select: none;
}

.browser-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.browser-dots .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.browser-dots .dot.close { background: #ff5f56; border: 0.5px solid #e0443e; }
.browser-dots .dot.minimize { background: #ffbd2e; border: 0.5px solid #dea123; }
.browser-dots .dot.maximize { background: #27c93f; border: 0.5px solid #1aab29; }

.browser-address {
  flex: 1;
  height: 20px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #cccccc;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  font-size: 0.72rem;
  color: #666666;
  font-family: var(--font-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-body {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111111;
}

.browser-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.browser-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  color: #ffffff;
  padding: 16px 14px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
}

.browser-caption-overlay .date-badge {
  font-size: 0.8rem;
  opacity: 0.9;
}


.card-reflection {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08) 0%, transparent 100%);
  border-radius: 0 0 10px 10px;
  pointer-events: none;
  transform: scaleY(-1);
  opacity: 0.4;
  filter: blur(2px);
}


.coverflow-controls-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
  position: relative;
  z-index: 50;
}

.coverflow-control-box {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  gap: 8px;
}

.control-arrow-btn {
  background: transparent;
  border: none;
  color: #555555;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-arrow-btn:hover {
  background: #f0f0f0;
  color: #111111;
}

.carousel-numbers-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.carousel-num-btn {
  background: transparent;
  border: none;
  color: #555555;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-num-btn:hover {
  background: #f4f4f4;
  color: #111111;
}

.carousel-num-btn.active {
  background: var(--matcha-forest, #56674e);
  color: #ffffff;
  font-weight: 700;
}


.handwritten-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-handwriting, cursive);
  font-size: 1.35rem;
  color: #444444;
  transform: rotate(-3deg);
  margin-left: 90px;
  user-select: none;
}

.handwritten-arrow {
  color: #444444;
}

@media (max-width: 640px) {
  .coverflow-track {
    max-width: 280px;
    height: 240px;
  }
  
  .coverflow-item {
    max-width: 280px;
  }

  .handwritten-hint {
    margin-left: 0;
    font-size: 1.15rem;
  }
}

.polaroid-date {
  font-size: 0.85rem;
  color: var(--matcha-medium);
  text-align: center;
  margin-top: 2px;
  font-weight: 600;
  width: 100%;
  white-space: nowrap;
}


.quiz-card {
  background: var(--white-pure);
  padding: 40px 28px;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(138, 160, 126, 0.25);
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  box-sizing: border-box;
}

.quiz-question {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--matcha-forest);
  margin-bottom: 28px;
  line-height: 1.3;
  text-wrap: balance;
}

.quiz-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  min-height: 100px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

@media (min-width: 540px) {
  .quiz-actions {
    flex-direction: row;
    gap: 20px;
  }
}

.quiz-btn {
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 260px;
  box-shadow: 0 6px 18px rgba(70, 84, 63, 0.12);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.yes-btn {
  background: var(--matcha-forest);
  color: var(--white-pure);
  box-shadow: 0 8px 20px rgba(70, 84, 63, 0.22);
  z-index: 2;
}

.yes-btn:hover {
  background: var(--matcha-dark);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px rgba(70, 84, 63, 0.28);
}

.no-btn {
  background: var(--bg-cream-alt);
  color: var(--matcha-dark);
  border: 1.5px solid var(--matcha-medium);
  z-index: 2;
  transition: left 0.15s ease-out, top 0.15s ease-out, transform 0.2s ease;
}

.quiz-result {
  margin-top: 24px;
  padding: 18px 24px;
  background: rgba(138, 160, 126, 0.12);
  border: 2px dashed var(--matcha-medium);
  border-radius: 20px;
  font-family: var(--font-handwriting);
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  color: var(--matcha-forest);
  font-weight: 700;
  line-height: 1.35;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  word-break: break-word;
  box-sizing: border-box;
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


.footer-wrap {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-main-text {
  font-size: 0.95rem;
  color: var(--matcha-forest);
  opacity: 0.9;
  margin: 0;
}

.footer-initial-trigger {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.footer-initial-text {
  font-size: 0.78rem;
  color: var(--matcha-medium);
  opacity: 0.7;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
}

.footer-initial-trigger:hover .footer-initial-text {
  opacity: 1;
  color: var(--matcha-dark);
  background: rgba(138, 160, 126, 0.14);
}

.footer-initial-text.initial-active {
  color: var(--matcha-dark);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  opacity: 1;
  background: rgba(138, 160, 126, 0.2);
  animation: footerPopAnim 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes footerPopAnim {
  0% { transform: scale(0.92); opacity: 0.5; }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}



@media (max-width: 600px) {
  .main-content {
    padding: 24px 16px 80px;
  }

  .envelope-card {
    max-width: 90vw;
    padding: 32px 20px;
    border-radius: 20px;
  }

  .envelope-title {
    font-size: 1.9rem;
  }

  .tap-hint-pill {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 12px 48px;
    justify-content: center;
  }

  .hero-title {
    font-size: clamp(2.1rem, 7.5vw, 3rem);
    padding: 0 4px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 32px;
    padding: 0 8px;
  }

  .cake-container {
    gap: 24px;
  }

  .action-btn {
    min-height: 48px;
    width: 100%;
    max-width: 280px;
    justify-content: center;
    font-size: 0.95rem;
  }

  .counter-card {
    padding: 24px 16px;
    border-radius: 20px;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .counter-box {
    padding: 12px 8px;
  }

  .count-num {
    font-size: 1.7rem;
  }

  .letter-card {
    padding: 36px 18px 28px;
    border-radius: 16px;
  }

  .letter-title {
    font-size: 1.6rem;
  }

  .letter-body p {
    font-size: 1.35rem;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .letter-sign {
    font-size: 1.6rem;
  }

  .polaroid-section {
    padding: 24px 12px 36px;
    border-radius: 18px;
  }

  .coverflow-carousel-wrapper {
    min-height: 250px;
    padding: 10px 0;
  }

  .coverflow-track {
    max-width: 250px;
    height: 195px;
    touch-action: pan-y;
  }

  .coverflow-item {
    max-width: 250px;
  }

  .coverflow-controls-container {
    margin-top: 18px;
    gap: 8px;
  }

  .coverflow-control-box {
    padding: 4px 6px;
    gap: 2px;
    max-width: 95vw;
    overflow-x: auto;
  }

  .control-arrow-btn {
    padding: 8px;
    min-width: 38px;
    min-height: 38px;
  }

  .carousel-num-btn {
    padding: 6px 8px;
    min-width: 34px;
    min-height: 34px;
    font-size: 0.88rem;
  }

  .handwritten-hint {
    margin-left: 0;
    font-size: 1.1rem;
    transform: rotate(-1deg);
    justify-content: center;
    width: 100%;
  }

  .quiz-card {
    padding: 32px 16px;
    border-radius: 20px;
  }

  .quiz-question {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .quiz-actions {
    flex-direction: column;
    gap: 12px;
  }

  .quiz-btn {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .music-toggle-btn {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
}



.bouquet-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(138, 160, 126, 0.35);
  border-radius: 28px;
  padding: 40px 24px 36px 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 680px;
  margin: 0 auto;
  transition: var(--transition-smooth);
}

.bouquet-header {
  margin-bottom: 22px;
}

.bouquet-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--matcha-dark);
  margin-bottom: 6px;
}

.bouquet-subtitle {
  font-size: 0.95rem;
  color: var(--matcha-forest);
  opacity: 0.85;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.5;
}


.flower-note-display {
  background: linear-gradient(135deg, #f3f8f1 0%, #e5eee0 100%);
  border: 1.5px solid var(--matcha-medium);
  border-radius: 18px;
  padding: 16px 24px;
  margin: 0 auto 24px auto;
  max-width: 540px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(70, 84, 63, 0.06);
  transition: var(--transition-smooth);
}

.flower-note-display p {
  font-family: var(--font-handwriting);
  font-size: 1.5rem;
  color: var(--matcha-forest);
  line-height: 1.45;
  margin: 0;
}

.flower-note-display.pop-note p {
  animation: note-pop-anim 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes note-pop-anim {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}


.bouquet-composition-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 430px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bouquet-graphic-layer {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 14px 28px rgba(70, 84, 63, 0.16));
}

.flowers-bouquet {
  position: absolute;
  top: 15px;
  width: 100%;
  height: 330px;
  z-index: 5;
}


.flower-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  user-select: none;
  -webkit-user-select: none;
}


.flower-1  { left: 38%; top: 105px; z-index: 12; animation: sway-bouquet 4.2s ease-in-out infinite alternate; }
.flower-2  { left: 22%; top: 110px; z-index: 11; animation: sway-bouquet 3.8s ease-in-out infinite alternate-reverse; }
.flower-3  { left: 54%; top: 110px; z-index: 11; animation: sway-bouquet 4.5s ease-in-out infinite alternate; }
.flower-4  { left: 39%; top: 55px;  z-index: 10; animation: sway-bouquet 4s ease-in-out infinite alternate-reverse; }
.flower-5  { left: 10%; top: 100px; z-index: 10; animation: sway-bouquet 3.9s ease-in-out infinite alternate; }
.flower-6  { left: 68%; top: 100px; z-index: 10; animation: sway-bouquet 4.3s ease-in-out infinite alternate-reverse; }
.flower-7  { left: 24%; top: 58px;  z-index: 9;  animation: sway-bouquet 3.6s ease-in-out infinite alternate; }
.flower-8  { left: 56%; top: 58px;  z-index: 9;  animation: sway-bouquet 4.1s ease-in-out infinite alternate-reverse; }
.flower-9  { left: 41%; top: 12px;  z-index: 8;  animation: sway-bouquet 3.7s ease-in-out infinite alternate; }
.flower-10 { left: 12%; top: 52px;  z-index: 8;  animation: sway-bouquet 4.4s ease-in-out infinite alternate-reverse; }
.flower-11 { left: 70%; top: 52px;  z-index: 8;  animation: sway-bouquet 4.0s ease-in-out infinite alternate; }
.flower-12 { left: 39%; top: 138px; z-index: 13; animation: sway-bouquet 3.5s ease-in-out infinite alternate-reverse; }

@keyframes sway-bouquet {
  0% { transform: rotate(-2deg) translateY(0px); }
  100% { transform: rotate(2deg) translateY(-3px); }
}


.flower-head {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  filter: drop-shadow(0 8px 16px rgba(70, 84, 63, 0.16));
}

.flower-item:hover .flower-head {
  transform: scale(1.2) translateY(-6px);
  filter: drop-shadow(0 14px 24px rgba(70, 84, 63, 0.28));
}


.flower-item.plucked .flower-head {
  transform: translateY(-45px) scale(0.2) rotate(35deg);
  opacity: 0.1;
  filter: blur(4px);
  pointer-events: none;
}

.flower-item.plucked {
  pointer-events: none;
}


.bouquet-footer {
  margin-top: 20px;
}

.water-btn {
  background: linear-gradient(135deg, var(--matcha-medium) 0%, var(--matcha-dark) 100%);
  color: var(--white-pure);
  border: none;
  padding: 13px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 22px rgba(86, 103, 78, 0.25);
  transition: var(--transition-smooth);
}

.water-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(86, 103, 78, 0.35);
  background: linear-gradient(135deg, var(--matcha-light) 0%, var(--matcha-medium) 100%);
}

.water-btn:active {
  transform: translateY(1px) scale(0.98);
}


.floating-petal {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50% 0 50% 50%;
  animation: floatPetalAnim 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes floatPetalAnim {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(var(--dx), var(--dy-half)) rotate(180deg) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * 1.5), var(--dy-full)) rotate(360deg) scale(0.4);
  }
}


@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;
  }
}

