:root{
  --bg1:#0b0b0d;
  --bg2:#14101a;
  --card: rgba(18,18,22,.72);
  --text:#f5f5f5;
  --muted:#c8c2cc;
  --line:rgba(255,255,255,.12);
  --pink:#ff6fb3;
  --pink2:#ffb3d9;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(255,111,179,.22), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(255,179,217,.16), transparent 62%),
    radial-gradient(900px 700px at 50% 95%, rgba(201,162,39,.14), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  overflow-x:hidden;
}

/* Music button */
.musicToggle{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  border-radius: 999px;
  border: 1px solid rgba(255,111,179,.35);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  color: rgba(245,245,245,.95);
  font-weight: 900;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.musicToggle:hover{ filter: brightness(1.06); transform: translateY(-1px); }
.musicToggle:active{ transform: scale(.98); }
.musicToggle.on{
  border-color: rgba(255,111,179,.70);
  box-shadow: 0 0 0 3px rgba(255,111,179,.12);
}

.shell{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  position:relative;
  z-index:2;
}

.card{
  width:min(590px, 100%);
  border:1px solid rgba(255,111,179,.30);
  background: var(--card);
  backdrop-filter: blur(10px);
  border-radius:26px;
  padding:22px;
  box-shadow: 0 16px 50px rgba(0,0,0,.55);
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:26px;
  background: radial-gradient(700px 180px at 50% 0%, rgba(255,111,179,.22), transparent 70%);
  opacity:.85;
  pointer-events:none;
  animation: glow 3s ease-in-out infinite;
}
@keyframes glow{ 50%{ opacity:.55; } }

.step{ display:none; position:relative; z-index:1; }
.step.active{ display:block; }

.gifWrap{
  display:flex;
  justify-content:center;
  margin-bottom:14px;
}
.gifWrap.small{ margin-bottom:10px; }

.gif{
  width:210px;
  height:auto;
  border-radius:18px;
  border:1px solid rgba(255,111,179,.22);
  box-shadow: 0 12px 26px rgba(0,0,0,.30);
}

.title{
  margin:8px 0 6px;
  font-size:28px;
  line-height:1.15;
  text-align:center;
}
.sub{
  margin:0 0 14px;
  text-align:center;
  color:var(--muted);
  font-size:14px;
}

.bigLine{
  text-align:center;
  margin: 12px 0 6px;
  font-size:18px;
  font-weight:1000;
  color: rgba(245,245,245,.96);
}

.actions{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:14px;
}
.actions.split{ justify-content:space-between; }

.btn{
  appearance:none;
  border:none;
  border-radius:14px;
  padding:12px 16px;
  font-weight:900;
  cursor:pointer;
  transition: transform .12s ease, opacity .12s ease, filter .12s ease;
  color:var(--text);
}
.btn:hover{ filter: brightness(1.06); }
.btn:active{ transform: scale(.98); }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

.btn.primary{
  background: linear-gradient(135deg, rgba(255,111,179,.95), rgba(255,179,217,.90));
  color:#1b0b12;
}
.btn.ghost{
  background: transparent;
  border:1px solid var(--line);
  color:var(--text);
}
.btn.danger{
  background: rgba(255, 80, 80, .18);
  border:1px solid rgba(255,80,80,.35);
}

/* Questions */
.qBox{
  border:1px solid rgba(255,111,179,.18);
  border-radius:18px;
  padding:14px;
  background: rgba(0,0,0,.18);
}
.question{
  font-size:18px;
  margin:0 0 10px;
  text-align:center;
}
.feedback{
  min-height:18px;
  margin: 0 0 10px !important;
  color: rgba(245,245,245,.92);
}
.choices{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
}
.choiceBtn{
  border:1px solid rgba(255,111,179,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:900;
  transition: transform .12s ease, box-shadow .12s ease;
}
.choiceBtn:hover{ transform: translateY(-1px); }
.choiceBtn.selected{
  border-color: rgba(255,111,179,.75);
  box-shadow: 0 0 0 3px rgba(255,111,179,.16);
}

/* Photos: Polaroid grid */
.polaroidGrid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin-top:10px;
}
.polaroid{
  background: rgba(255,255,255,.94);
  border-radius: 10px;
  padding:10px 10px 18px;
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
  transform: rotate(var(--rot));
  transition: transform .15s ease;
}
.polaroid:hover{ transform: rotate(var(--rot)) scale(1.02); }
.polaroid img{
  width:100%;
  height:130px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.12);
  display:block;
}
.polaroid .cap{
  margin-top:10px;
  font-size:12px;
  color: rgba(0,0,0,.78);
  text-align:center;
  font-weight:800;
  min-height:14px;
}

/* Note / letter */
.letter{
  border:1px solid rgba(255,111,179,.18);
  border-radius:18px;
  background: rgba(0,0,0,.18);
  padding:14px;
  line-height:1.55;
  color: rgba(245,245,245,.95);
  max-height:340px;
  overflow:auto;
}
.letter p{ margin:0 0 10px; }

.noteChoices{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
  position:relative;
}
.choiceWide{
  width:100%;
  border:1px solid rgba(255,111,179,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding:12px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:900;
  text-align:left;
  transition: transform .12s ease, filter .12s ease;
}
.choiceWide:hover{ transform: translateY(-1px); filter: brightness(1.06); }

/* Final */
.finalArea{
  margin-top:10px;
  position:relative;
  height:190px;
  border:1px dashed rgba(255,111,179,.25);
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  overflow:hidden;
}
.no{
  position:absolute;
  right:18px;
  bottom:18px;
}
.finalArea.partyOn{
  border-color: rgba(255,111,179,.55);
  box-shadow: 0 0 0 4px rgba(255,111,179,.12), 0 18px 60px rgba(0,0,0,.45);
}

.celebrate{
  display:none;
  margin-top:12px;
  text-align:center;
  border:1px solid rgba(255,111,179,.28);
  background: rgba(255,111,179,.10);
  border-radius:18px;
  padding:14px;
  position:relative;
  overflow:hidden;
}
.celebrate.show{ display:block; }

/* Party banner */
.partyBanner{
  text-align:center;
  margin-top:10px;
  padding:12px;
  border-radius:18px;
  border:1px solid rgba(255,111,179,.25);
  background: rgba(0,0,0,.14);
}
.partyLineBig{
  font-size:22px;
  font-weight:1000;
  margin:10px 0 6px;
  color: rgba(245,245,245,.98);
}
.partyLineSmall{
  margin:0;
  font-size:13px;
  color: rgba(245,245,245,.80);
}

/* Confetti */
.confetti{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  display:none;
}
.confetti.show{ display:block; }
.confetti i{
  position:absolute;
  top:-12px;
  border-radius:3px;
  opacity:.9;
  animation: fall 1.4s linear infinite;
}
@keyframes fall{
  to{ transform: translateY(240px) rotate(180deg); opacity:.65; }
}
.confetti .spark{
  position:absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  opacity: .9;
  animation: sparkFall 1.2s linear infinite;
}
@keyframes sparkFall{
  to{ transform: translateY(260px) scale(.8); opacity:.6; }
}

/* Popper burst emojis */
.popperBurst{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  font-size: 34px;
  opacity: 0;
  animation: burst 900ms ease forwards;
  pointer-events:none;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}
@keyframes burst{
  10%{ opacity: 1; transform: translate(-50%,-50%) scale(1.05); }
  60%{ opacity: 1; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.25); }
  100%{ opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.9); }
}

/* Falling hearts background */
.hearts{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:1;
  overflow:hidden;
}
.heart{
  position:absolute;
  top:-10vh;
  opacity:.22;
  animation: drop linear infinite;
}
@keyframes drop{
  to{ transform: translateY(120vh) rotate(180deg); }
}

/* Mobile */
@media (max-width: 560px){
  .polaroidGrid{ grid-template-columns: repeat(2, 1fr); }
  .polaroid img{ height:150px; }
}
