/* ============================================
   HAPIB SURPRISE — KUROMI THEME
   Fonts: Playfair Display · EB Garamond · Cinzel
   ============================================ */

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

:root {
  /* Main site palette — light purple */
  --pl:    #f5eeff;
  --pm:    #c9a0e8;
  --pd:    #6b21a8;
  --pvd:   #3b0764;
  --ink:   #1e0b3a;
  --peony: #f9a8d4;
  --white: #ffffff;

  /* Password page palette — deep dark purple */
  --pw-bg1:  #08001a;
  --pw-bg2:  #130030;
  --pw-card: rgba(255,255,255,0.07);
  --pw-border: rgba(180,140,255,0.25);
  --pw-text:   rgba(255,255,255,0.92);
  --pw-sub:    rgba(255,255,255,0.52);
  --pw-acc:    #a78bfa;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: linear-gradient(135deg, #f5eeff 0%, #e8d5f8 50%, #d4b8f0 100%);
  background-attachment: fixed;
  color: var(--ink);
  overflow-x: hidden;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ===================== PASSWORD PAGE ===================== */
.pw-page {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 40% 40%, #1e0052 0%, #0a0020 55%, #000010 100%);
  overflow: hidden;
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.pw-page.fade-out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

/* Floating hearts — password page */
.pw-hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ph {
  position: absolute;
  color: rgba(167,139,250,0.18);
  animation: heartFloat 10s ease-in-out infinite;
}

/* size & positions */
.ph-1  { font-size: 1.1rem; left: 6%;  top: 12%; animation-delay: 0s;   }
.ph-2  { font-size: 0.7rem; left: 14%; top: 65%; animation-delay: 1.2s; }
.ph-3  { font-size: 1.4rem; left: 22%; top: 35%; animation-delay: 2.4s; color: rgba(249,168,212,0.15); }
.ph-4  { font-size: 0.9rem; left: 32%; top: 80%; animation-delay: 0.6s; }
.ph-5  { font-size: 1.2rem; left: 70%; top: 18%; animation-delay: 3s;   }
.ph-6  { font-size: 0.8rem; left: 78%; top: 55%; animation-delay: 1.8s; color: rgba(249,168,212,0.15); }
.ph-7  { font-size: 1rem;   left: 85%; top: 78%; animation-delay: 4.2s; }
.ph-8  { font-size: 0.6rem; left: 90%; top: 40%; animation-delay: 5s;   }
.ph-9  { font-size: 1.3rem; left: 48%; top: 8%;  animation-delay: 2s;   }
.ph-10 { font-size: 0.75rem;left: 55%; top: 88%; animation-delay: 3.6s; }
.ph-s1 { font-size: 0.5rem; left: 5%;  top: 85%; animation-delay: 6s;   color: rgba(255,255,255,0.25); }
.ph-s2 { font-size: 0.55rem;left: 93%; top: 10%; animation-delay: 0.8s; color: rgba(255,255,255,0.2); }
.ph-s3 { font-size: 0.45rem;left: 40%; top: 95%; animation-delay: 4s;   color: rgba(255,255,255,0.2); }

@keyframes heartFloat {
  0%,100% { transform: translateY(0) scale(1);    opacity: 1; }
  33%      { transform: translateY(-22px) scale(1.08); }
  66%      { transform: translateY(-10px) scale(0.95); }
}

/* Card */
.pw-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 2.6rem 2.4rem 2.2rem;
  background: var(--pw-card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--pw-border);
  border-radius: 1.6rem;
  box-shadow: 0 0 60px rgba(100,60,200,0.2), 0 20px 60px rgba(0,0,0,0.5);
  max-width: 380px;
  width: 90%;
  text-align: center;
}

/* Kuromi */
.pw-kuromi { margin-bottom: 0.2rem; animation: kuromiBob 3.5s ease-in-out infinite; }
@keyframes kuromiBob {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* Diamond dots */
.pw-dots { display: flex; gap: 0.45rem; align-items: center; }
.pw-diamond { font-size: 0.38rem; color: var(--pw-acc); opacity: 0.75; }

/* Titles */
.pw-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--pw-text);
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin-top: 0.1rem;
}

.pw-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--pw-acc);
  margin-top: -0.3rem;
}
.pw-subtitle em { font-style: italic; }

.pw-hint {
  font-family: 'EB Garamond', serif;
  font-size: 0.88rem;
  color: var(--pw-sub);
  line-height: 1.65;
  margin-top: 0.15rem;
  margin-bottom: 0.3rem;
}

/* Input row */
.pw-input-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  width: 100%;
}

#pw-input {
  flex: 1;
  padding: 0.62rem 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(167,139,250,0.35);
  border-radius: 2rem;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  letter-spacing: 0.35em;
  text-align: center;
  color: transparent;
  text-shadow: 0 0 0 rgba(255,255,255,0.88);
  caret-color: rgba(167,139,250,0.9);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  min-width: 0;
}
#pw-input:focus {
  border-color: var(--pw-acc);
  box-shadow: 0 0 0 3px rgba(167,139,250,0.18);
}

.pw-enter-btn {
  padding: 0.62rem 1.2rem;
  background: rgba(167,139,250,0.18);
  border: 1px solid rgba(167,139,250,0.45);
  border-radius: 2rem;
  color: var(--pw-text);
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  transition: background 0.25s, transform 0.2s;
  flex-shrink: 0;
}
.pw-enter-btn:hover { background: rgba(167,139,250,0.3); transform: translateY(-1px); }
.pw-enter-btn i { font-size: 0.8rem; }

.pw-error {
  font-family: 'EB Garamond', serif;
  font-size: 0.8rem;
  color: #fca5a5;
  min-height: 1.1em;
  font-style: italic;
}

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(7px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.shake { animation: shake 0.4s ease; }

/* ===================== MAIN SITE HEARTS ===================== */
.site-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.sh {
  position: absolute;
  color: rgba(107,33,168,0.1);
  animation: heartFloat 14s ease-in-out infinite;
}
.sh-1 { font-size: 1.4rem; left: 4%;  top: 10%; animation-delay: 0s;   }
.sh-2 { font-size: 0.9rem; left: 92%; top: 22%; animation-delay: 2s;   }
.sh-3 { font-size: 1.1rem; left: 15%; top: 60%; animation-delay: 4s;   }
.sh-4 { font-size: 0.7rem; left: 82%; top: 68%; animation-delay: 1.5s; }
.sh-5 { font-size: 1.3rem; left: 48%; top: 5%;  animation-delay: 6s;   }
.sh-6 { font-size: 0.8rem; left: 72%; top: 42%; animation-delay: 3s;   color: rgba(107,33,168,0.08); }
.sh-7 { font-size: 0.6rem; left: 28%; top: 88%; animation-delay: 7s;   color: rgba(107,33,168,0.08); }
.sh-8 { font-size: 1rem;   left: 60%; top: 78%; animation-delay: 2.5s; }

/* ===================== NAVBAR ===================== */
.main-site { position: relative; z-index: 1; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 2.5rem;
  background: rgba(245,238,255,0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(107,33,168,0.12);
  box-shadow: 0 1px 12px rgba(107,33,168,0.06);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pvd);
  letter-spacing: 0.1em;
}

.nav-links { display: flex; list-style: none; gap: 0.2rem; }
.nav-link {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.95rem;
  border-radius: 2rem;
  letter-spacing: 0.03em;
  position: relative;
  transition: color 0.25s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 3px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 55%; height: 1.5px;
  background: var(--pd);
  border-radius: 2px;
  transition: transform 0.3s ease;
}
.nav-link:hover { color: var(--pd); }
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--pd);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(245,238,255,0.97);
    backdrop-filter: blur(16px);
    padding: 1rem 2rem;
    gap: 0;
    display: none;
    border-bottom: 1px solid rgba(107,33,168,0.12);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.65rem 0; font-size: 1.1rem; }
}

/* ===================== SECTIONS ===================== */
.section {
  min-height: 100vh;
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.reveal, .reveal-right {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
.reveal-right { transform: translateX(36px); }
.revealed { opacity: 1 !important; transform: translate(0) !important; }

.section-header { text-align: center; margin-bottom: 3.5rem; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pd);
  background: rgba(107,33,168,0.08);
  padding: 0.3rem 1.1rem;
  border-radius: 2rem;
  margin-bottom: 0.9rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  color: var(--pd);
  font-style: italic;
}

/* ===================== HOME ===================== */
.home-section {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  flex-wrap: wrap;
  padding-top: 7rem;
}

.home-content { max-width: 480px; }

.home-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--pd);
  opacity: 0.75;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.home-icon { font-size: 0.55rem; }

.home-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 1.05;
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 1.2rem;
}
.home-title em { color: var(--pd); font-style: italic; }

.home-body {
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  line-height: 1.9;
  color: var(--pvd);
  margin-bottom: 2.2rem;
}

.btn-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--white);
  background: linear-gradient(135deg, var(--pvd), var(--pd));
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  border-radius: 2rem;
  box-shadow: 0 6px 24px rgba(59,7,100,0.25);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn-scroll:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(59,7,100,0.35); }

/* Kuromi SVG */
.home-kuromi-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.home-kuromi-svg {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(107,33,168,0.22));
  animation: kuromiBig 5s ease-in-out infinite;
}
@keyframes kuromiBig {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}

.home-icon-row {
  display: flex;
  gap: 0.9rem;
}
.home-float-icon {
  font-size: 1.2rem;
  color: var(--pm);
  animation: heartFloat 3s ease-in-out infinite;
}
.hfi-1 { animation-delay: 0s; color: var(--peony); }
.hfi-2 { animation-delay: 0.4s; color: var(--pm); font-size: 0.85rem; }
.hfi-3 { animation-delay: 0.8s; color: var(--peony); }
.hfi-4 { animation-delay: 1.2s; color: var(--pm); font-size: 0.85rem; }
.hfi-5 { animation-delay: 1.6s; color: var(--peony); }

/* ===================== MUSIC ===================== */
.music-section {
  background: linear-gradient(180deg, transparent 0%, rgba(201,160,232,0.1) 100%);
}

.music-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 740px;
  margin: 0 auto;
  width: 100%;
}

.music-card {
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(14px);
  border-radius: 1.5rem;
  border: 1px solid rgba(107,33,168,0.15);
  padding: 1.8rem;
  box-shadow: 0 8px 30px rgba(107,33,168,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}
.music-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(107,33,168,0.16); }

.music-card-top { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1.2rem; }

.song-art {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
  overflow: visible;
  background: #0d0010;
  box-shadow: 0 4px 18px rgba(13,0,16,0.35);
  transition: transform 0.3s;
}
.song-art:hover { transform: scale(1.07); }

/* No gradients — Kuromi SVG provides all the color */
.art-1, .art-2, .art-3 { background: #0d0010; }

.kuromi-art-svg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  overflow: visible;
}

.song-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--ink); margin-bottom: 0.15rem; }
.song-artist { font-family: 'EB Garamond', serif; font-size: 0.95rem; color: var(--pd); font-style: italic; }

/* Audio player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(107,33,168,0.07);
  border-radius: 2rem;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.2rem;
}

.play-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--pd);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}
.play-btn:hover { background: var(--pvd); transform: scale(1.08); }

.progress-container {
  flex: 1;
  height: 4px;
  background: rgba(107,33,168,0.18);
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pvd), var(--pd));
  border-radius: 4px;
  width: 0%;
  transition: width 0.1s linear;
}

.time-display {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  color: var(--pd);
  flex-shrink: 0;
  min-width: 34px;
}

.song-message { border-top: 1px solid rgba(107,33,168,0.1); padding-top: 1rem; }
.message-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pd);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.message-text {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  font-style: italic;
}

/* ===================== FLIP CARDS ===================== */
.cards-section {
  background: linear-gradient(180deg, rgba(201,160,232,0.1) 0%, rgba(232,213,248,0.12) 100%);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.4rem;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  perspective: 1400px;
}

/* Portrait ratio — 3:4 */
.flip-card {
  aspect-ratio: 3 / 4;
  cursor: pointer;
  perspective: 900px;
  outline: none;
  border-radius: 1rem;
}
.flip-card:focus-visible { outline: 2px solid var(--pd); }

.flip-card-inner {
  position: relative;
  width: 100%; height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 1rem;
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }

.flip-front, .flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(107,33,168,0.2);
  box-shadow: 0 6px 24px rgba(107,33,168,0.1);
}

.flip-front {
  gap: 0.6rem;
  flex-direction: column;
}
.front-a { background: linear-gradient(160deg, #e0c8f8, #c9a0e8); }
.front-b { background: linear-gradient(160deg, #d4b0f0, #b88ae0); }
.front-c { background: linear-gradient(160deg, #c8a0dc, #a06ec8); }

.front-icon { font-size: 1.6rem; color: rgba(59,7,100,0.35); }

.card-num {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(59,7,100,0.5);
}

.front-diamonds { display: flex; gap: 0.3rem; margin-top: 0.2rem; }
.fd { font-size: 0.3rem; color: rgba(59,7,100,0.4); }

.flip-back {
  background: rgba(255,255,255,0.88);
  transform: rotateY(180deg);
}

/* Photo slot — portrait, fills most of the card */
.photo-slot {
  width: 88%;
  height: 88%;
  background: linear-gradient(160deg, #ede0fa, #f5eeff);
  border-radius: 0.65rem;
  border: 1.5px dashed rgba(107,33,168,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(107,33,168,0.35);
  font-size: 1.8rem;
}

/* ===================== LETTER / MESSAGE ===================== */
.message-section {
  background: linear-gradient(180deg, transparent 0%, rgba(201,160,232,0.06) 100%);
}

.letter-wrapper { max-width: 700px; margin: 0 auto; width: 100%; }

.letter-paper {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(14px);
  border-radius: 1.5rem;
  border: 1px solid rgba(107,33,168,0.15);
  padding: 3.5rem 4rem;
  box-shadow: 0 20px 60px rgba(107,33,168,0.08);
  position: relative;
}

.letter-top-deco, .letter-bottom-deco {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1.8rem;
}
.letter-bottom-deco { margin-top: 2rem; margin-bottom: 0; }
.ltd { font-size: 0.45rem; color: var(--pm); opacity: 0.7; }
.ltd.fa-heart { color: var(--peony); font-size: 0.55rem; }

.letter-salutation {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-style: italic;
  color: var(--pd);
  margin-bottom: 1.6rem;
}

.letter-body {
  font-family: 'EB Garamond', serif;
  font-size: 1.18rem;
  line-height: 2.1;
  color: var(--ink);
}
.letter-body p { margin-bottom: 1.3rem; }

.letter-sign {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 1.6rem;
  line-height: 1.9;
}
.letter-sign em { font-size: 1.55rem; color: var(--pd); }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--pvd);
  color: rgba(255,255,255,0.88);
  padding: 2.5rem 2rem;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  text-align: center;
}

.footer-brand {
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-heart { color: var(--peony); font-size: 0.9rem; }

.footer-site {
  color: var(--pm);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,160,232,0.45);
  transition: color 0.2s, border-color 0.2s;
}
.footer-site:hover { color: #fff; border-color: #fff; }

.footer-socials { display: flex; gap: 0.9rem; }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.05rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.18);
  transition: background 0.25s, transform 0.25s;
}
.social-link:hover { background: rgba(255,255,255,0.22); transform: translateY(-3px) scale(1.08); }

.footer-note {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255,255,255,0.45);
}

/* ===================== VOICE MESSAGE OVERLAY ===================== */
.voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 0, 26, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: voiceFadeIn 0.6s ease forwards;
}
.voice-overlay.hidden { display: none; }

@keyframes voiceFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.voice-card {
  position: relative;
  background: linear-gradient(145deg, #1a0040 0%, #2e0060 60%, #1a0040 100%);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 2rem;
  padding: 2.2rem 2.2rem 2rem;
  max-width: 380px;
  width: 92%;
  text-align: center;
  box-shadow: 0 0 60px rgba(107, 33, 168, 0.45), 0 0 120px rgba(107, 33, 168, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.voice-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(167,139,250,0.35);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.voice-close:hover { background: rgba(255,255,255,0.18); color: #fff; }

.voice-kuromi-gif {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(167,139,250,0.5));
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.voice-content { width: 100%; }

.voice-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pw-acc);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.voice-from {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  font-style: italic;
  margin-bottom: 1rem;
}

.voice-player-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 3rem;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
}

.voice-play-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--pw-acc);
  color: #1e0b3a;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 0 18px rgba(167,139,250,0.55);
}
.voice-play-btn:hover { transform: scale(1.1); background: #c4b5fd; }
.voice-play-btn.playing { background: #f472b6; box-shadow: 0 0 18px rgba(244,114,182,0.55); }

.voice-waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
}
.wv {
  flex: 1;
  height: 60%;
  background: rgba(167,139,250,0.5);
  border-radius: 3px;
  transition: height 0.1s;
}
.wv:nth-child(odd)  { height: 40%; }
.wv:nth-child(3n)   { height: 80%; }
.wv:nth-child(4n+1) { height: 55%; }

.voice-waveform.playing .wv {
  animation: waveBounce 0.8s ease-in-out infinite;
}
.voice-waveform.playing .wv:nth-child(2)  { animation-delay: 0.08s; }
.voice-waveform.playing .wv:nth-child(3)  { animation-delay: 0.16s; }
.voice-waveform.playing .wv:nth-child(4)  { animation-delay: 0.24s; }
.voice-waveform.playing .wv:nth-child(5)  { animation-delay: 0.32s; }
.voice-waveform.playing .wv:nth-child(6)  { animation-delay: 0.40s; }
.voice-waveform.playing .wv:nth-child(7)  { animation-delay: 0.48s; }
.voice-waveform.playing .wv:nth-child(8)  { animation-delay: 0.56s; }
.voice-waveform.playing .wv:nth-child(9)  { animation-delay: 0.64s; }
.voice-waveform.playing .wv:nth-child(10) { animation-delay: 0.72s; }
.voice-waveform.playing .wv:nth-child(11) { animation-delay: 0.80s; }
.voice-waveform.playing .wv:nth-child(12) { animation-delay: 0.88s; }

@keyframes waveBounce {
  0%, 100% { height: 30%; background: rgba(167,139,250,0.6); }
  50%       { height: 90%; background: #a78bfa; }
}

.voice-time {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  min-width: 2.5rem;
  text-align: right;
}

.voice-hint {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(255,255,255,0.45);
  margin-top: 0.7rem;
}

/* ===================== KUROMI GIFS — HOME ===================== */
.home-gif-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
}

.kuromi-main-gif {
  width: 260px;
  height: 260px;
  object-fit: contain;
  filter: drop-shadow(0 8px 32px rgba(107,33,168,0.4));
  animation: gifFloat 4s ease-in-out infinite;
  border-radius: 1.5rem;
  background: rgba(255,255,255,0.03);
}

.kuromi-float-gif {
  position: absolute;
  bottom: -30px;
  right: -40px;
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 1rem;
  background: rgba(255,255,255,0.05);
  filter: drop-shadow(0 4px 12px rgba(107,33,168,0.35));
  animation: gifFloat 3s ease-in-out infinite reverse;
}

@keyframes gifFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ===================== KUROMI GIFS — SECTIONS ===================== */
.section-header { position: relative; }

.section-kuromi-gif {
  width: 90px;
  height: 90px;
  object-fit: contain;
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  filter: drop-shadow(0 4px 16px rgba(107,33,168,0.35));
  animation: gifFloat 3.5s ease-in-out infinite;
  border-radius: 1rem;
}

.section-kuromi-gif.cards-gif {
  right: auto;
  left: -20px;
  animation-direction: reverse;
}

.section-kuromi-gif.letter-gif {
  right: -10px;
  width: 80px; height: 80px;
}

/* ===================== FLOWER DECORATIONS ===================== */
.home-flowers-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Peony flower — multi-layered radial petals */
.hflower {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* Peony 1 — top left */
.hf-peony-1 {
  top: -20px; left: -20px;
  width: 54px; height: 54px;
  background: radial-gradient(circle at 40% 40%, #fce4ec 20%, #f48fb1 55%, #ad1457 100%);
  box-shadow:
    0 0 0 6px rgba(244,143,177,0.25),
    0 0 0 12px rgba(244,143,177,0.12);
  animation: peonyPulse 4s ease-in-out infinite;
}
.hf-peony-1::before, .hf-peony-1::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.hf-peony-1::before {
  width: 54px; height: 20px;
  background: rgba(252, 228, 236, 0.6);
  top: 17px; left: 0;
  transform: rotate(-45deg);
}
.hf-peony-1::after {
  width: 20px; height: 54px;
  background: rgba(252, 228, 236, 0.6);
  top: 0; left: 17px;
  transform: rotate(-45deg);
}

/* Peony 2 — bottom right */
.hf-peony-2 {
  bottom: -10px; right: 10px;
  width: 40px; height: 40px;
  background: radial-gradient(circle at 40% 40%, #fff0f6 20%, #f8bbd9 55%, #e91e8c 100%);
  box-shadow: 0 0 0 5px rgba(248,187,217,0.2), 0 0 0 10px rgba(248,187,217,0.1);
  animation: peonyPulse 3.5s ease-in-out infinite reverse;
}

/* Lavender 1 — top right */
.hf-lavender-1 {
  top: 10px; right: -15px;
  width: 12px; height: 48px;
  background: linear-gradient(to bottom, #7c3aed 0%, #a78bfa 40%, #c4b5fd 70%, #e9d5ff 100%);
  border-radius: 6px 6px 3px 3px;
  box-shadow: 0 0 8px rgba(124,58,237,0.3);
  animation: lavSway 3s ease-in-out infinite;
}
.hf-lavender-1::before, .hf-lavender-1::after {
  content: '';
  position: absolute;
  width: 10px; height: 20px;
  border-radius: 50% 50% 0 0;
  background: #a78bfa;
}
.hf-lavender-1::before { left: -8px; top: 8px; transform: rotate(-20deg); }
.hf-lavender-1::after  { right: -8px; top: 8px; transform: rotate(20deg); }

/* Lavender 2 — bottom left */
.hf-lavender-2 {
  bottom: 30px; left: -10px;
  width: 10px; height: 38px;
  background: linear-gradient(to bottom, #6d28d9 0%, #8b5cf6 40%, #c4b5fd 100%);
  border-radius: 5px 5px 2px 2px;
  box-shadow: 0 0 6px rgba(109,40,217,0.3);
  animation: lavSway 3.8s ease-in-out infinite reverse;
}
.hf-lavender-2::before, .hf-lavender-2::after {
  content: '';
  position: absolute;
  width: 9px; height: 16px;
  border-radius: 50% 50% 0 0;
  background: #8b5cf6;
}
.hf-lavender-2::before { left: -7px; top: 6px; transform: rotate(-25deg); }
.hf-lavender-2::after  { right: -7px; top: 6px; transform: rotate(25deg); }

@keyframes peonyPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%       { transform: scale(1.08) rotate(5deg); }
}
@keyframes lavSway {
  0%, 100% { transform: rotate(-5deg); transform-origin: bottom center; }
  50%       { transform: rotate(5deg); transform-origin: bottom center; }
}

/* ===================== PIXEL ART STRIP ===================== */
.pixel-strip-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0.8rem 0;
  margin-bottom: 1.5rem;
}

/* Pixel heart using box-shadow */
.px-heart {
  width: 4px; height: 4px;
  background: #f472b6;
  image-rendering: pixelated;
  box-shadow:
    4px 0 #f472b6, 8px 0 #f472b6,
    -4px 4px #f472b6, 0 4px #f472b6, 4px 4px #f472b6, 8px 4px #f472b6, 12px 4px #f472b6,
    0 8px #f472b6, 4px 8px #f472b6, 8px 8px #f472b6,
    4px 12px #f472b6;
  filter: drop-shadow(0 0 4px rgba(244,114,182,0.6));
  animation: pixelPulse 2s ease-in-out infinite;
}

/* Pixel star using box-shadow */
.px-star {
  width: 4px; height: 4px;
  background: #a78bfa;
  image-rendering: pixelated;
  box-shadow:
    4px -8px #a78bfa,
    0 -4px #a78bfa, 4px -4px #a78bfa, 8px -4px #a78bfa,
    -4px 0 #a78bfa, 0 0 #a78bfa, 4px 0 #a78bfa, 8px 0 #a78bfa, 12px 0 #a78bfa,
    0 4px #a78bfa, 4px 4px #a78bfa, 8px 4px #a78bfa,
    0 8px #a78bfa, 8px 8px #a78bfa;
  filter: drop-shadow(0 0 4px rgba(167,139,250,0.6));
  animation: pixelPulse 2.5s ease-in-out infinite reverse;
}

@keyframes pixelPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.15); }
}

/* Home section pixel decoration (top) */
.home-section {
  position: relative;
}
.home-section::before {
  content: '★ ♡ ★ ♡ ★ ♡ ★ ♡ ★';
  position: absolute;
  top: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  color: rgba(167,139,250,0.25);
  font-family: monospace;
  white-space: nowrap;
  pointer-events: none;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .home-section { flex-direction: column; gap: 2.5rem; padding-top: 5rem; }
  .home-content { text-align: center; }
  .home-eyebrow { justify-content: center; }
  .letter-paper { padding: 2.2rem 1.8rem; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .kuromi-main-gif { width: 200px; height: 200px; }
  .home-gif-stack { width: 240px; }
  .kuromi-float-gif { width: 75px; height: 75px; right: -20px; }
  .section-kuromi-gif { display: none; }
}

@media (max-width: 480px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .section { padding: 4rem 1rem; }
  .navbar { padding: 0.8rem 1rem; }
  .letter-paper { padding: 1.8rem 1.2rem; }
  .voice-card { padding: 1.8rem 1.4rem 1.5rem; }
}

/* ===================== CARD PHOTO ===================== */
.card-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
  display: block;
}
