:root {
  --pink: #f6c9d0;
  --cream: #fff7f2;
  --ink: #4a3b3b;
  --accent: #e88ba0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #fff7f2, #ffeef2 40%, #fdf2f6);
  font-family: "Quicksand", sans-serif;
  color: var(--ink);
}

#opening {
  position: fixed;
  inset: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: linear-gradient(180deg, #fff7f2, #ffeef2 40%, #fdf2f6);
  z-index: 20;
  transition: opacity 0.8s ease;
}

#opening.hide {
  opacity: 0;
  pointer-events: none;
}

.opening-label {
  font-family: "Caveat", cursive;
  font-size: 2rem;
  color: var(--accent);
}

#open-btn {
  font-size: 4rem;
  background: none;
  border: none;
  cursor: pointer;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

#wall[hidden] {
  display: none;
}

#music-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--cream);
  border: 1px solid var(--pink);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
}

#music-toggle[hidden] {
  display: none;
}

#intro {
  text-align: center;
  padding: 3rem 1.5rem 1rem;
}

#intro h1 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1.15;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

#intro .hint {
  font-family: "Caveat", cursive;
  font-size: 1.4rem;
  color: var(--ink);
  opacity: 0.7;
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

#wall {
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
}

.polaroid {
  background: #fff;
  padding: 0.75rem 0.75rem 1.25rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  width: 88%;
  opacity: 0;
  transform: translateY(40px) rotate(var(--rot, 0deg));
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.polaroid.visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--rot, 0deg));
}

.polaroid img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.polaroid .phrase {
  display: block;
  margin-top: 0.6rem;
  text-align: center;
  font-family: "Caveat", cursive;
  font-size: 1.6rem;
  color: var(--accent);
}

#finale {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  font-family: "Caveat", cursive;
  font-size: 2.2rem;
  color: var(--accent);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

#finale.visible {
  opacity: 1;
  transform: translateY(0);
}
