:root{
  --bg1:#ffb3c7;
  --bg2:#ffd6e7;
  --ink:#1f1f28;
  --card:#ffffffcc;
  --stroke:#ffffff80;
  --shadow: 0 20px 60px rgba(0,0,0,.18);
  --r: 22px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--ink);
  overflow:hidden;
}

.bg-grad{
  position:fixed; inset:0;
  background: radial-gradient(1200px 800px at 20% 10%, #fff6, transparent 50%),
              radial-gradient(1200px 800px at 90% 30%, #fff5, transparent 55%),
              linear-gradient(135deg, var(--bg1), var(--bg2));
  filter:saturate(1.1);
  z-index:-2;
}

.sparkles{
  position:fixed; inset:0;
  background-image:
    radial-gradient(circle at 10% 20%, #fff8 0 2px, transparent 3px),
    radial-gradient(circle at 70% 30%, #fff6 0 1px, transparent 3px),
    radial-gradient(circle at 40% 80%, #fff7 0 2px, transparent 4px),
    radial-gradient(circle at 90% 70%, #fff6 0 1px, transparent 3px);
  opacity:.6;
  animation: floaty 8s ease-in-out infinite alternate;
  z-index:-1;
}
@keyframes floaty{
  from{ transform: translateY(0px); }
  to{ transform: translateY(-12px); }
}

.app{
  height:100%;
  display:grid;
  place-items:center;
  padding:20px;
}

.page{ display:none; width:min(1000px, 92vw); }
.page--active{ display:block; }

.card{
  background:var(--card);
  border:1px solid var(--stroke);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
  padding:28px;
  text-align:center;
}

.card.wide{ padding:28px 28px 22px; }

.title{
  margin:0 0 10px;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing:-0.02em;
}

.subtitle{
  margin:0 0 22px;
  opacity:.82;
  font-size: clamp(14px, 2.2vw, 18px);
}

.btn-row{
  display:flex;
  justify-content:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:10px;
  align-items:center;
  position:relative;
}

.btn{
  border:0;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 16px;
  cursor:pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  transition: transform .12s ease, filter .12s ease;
  user-select:none;
  position:relative;
  z-index:2;
}
.btn:active{ transform: translateY(1px) scale(.99); }
.btn:hover{ filter: brightness(1.02); transform: translateY(-1px); }

.btn--yes{
  background: linear-gradient(135deg, #ff4d88, #ff7aa8);
  color:white;
}
.btn--no{
  background: linear-gradient(135deg, #2b2b34, #4b4b58);
  color:white;
  will-change: transform;
}
.btn--ghost{
  background: #ffffffcc;
  border: 1px solid #ffffffaa;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

.hint{
  margin:18px 0 0;
  font-size: 13px;
  opacity:.7;
}

.footer-row{
  margin-top: 18px;
  display:flex;
  justify-content:center;
}

/* Character */
.corner-character{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  pointer-events: none;
  opacity: 1;
}

.char-box{
  display:grid;
  gap: 10px;
  justify-items:end;
}

.char-lottie{
  width: 280px;
  height: 280px;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,.18));
}

.char-bubble{
  background: #ffffffd6;
  border: 1px solid #ffffffaa;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
  max-width: 300px;
  text-align:right;
}

/* Celebration overlay */
.celebrate-overlay{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  overflow:hidden;
  background: radial-gradient(1000px 600px at 50% 40%, rgba(255,255,255,.25), transparent 60%),
              linear-gradient(135deg, rgba(255,77,136,.55), rgba(255,214,231,.55));
  backdrop-filter: blur(6px);
  opacity: 1;
}
.celebrate-overlay.show{ display:block; }

.celebrate-center{
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  text-align:center;
  color: white;
  text-shadow: 0 16px 40px rgba(0,0,0,.20);
  z-index: 2;
  padding: 0 16px;
}
.celebrate-title{
  font-size: clamp(40px, 7vw, 76px);
  font-weight: 800;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(14px) scale(.98);
}
.celebrate-sub{
  margin-top: 10px;
  font-size: clamp(16px, 2.5vw, 22px);
  opacity: 0;
  transform: translateY(10px);
}

#petalCanvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}


/* ----------------------------
   PAGE 2: Photo wall columns (FIXED)
---------------------------- */
#page2{
  position: relative;
  width: min(1200px, 96vw);
  height: min(720px, 86vh);
  overflow: hidden;
  border-radius: 28px;
}

/* the wall MUST be flex */
#page2 .photo-wall{
  position:absolute;
  inset:-80px;
  z-index:0;

  display:flex;
  gap: 26px;
  padding: 42px;

  transform: translate3d(0,0,0) rotate(-6deg);
}


/* Force 5–6 columns: each column is a fraction of the wall width */
#page2 .wall-col{
  flex: 1 1 0;
  min-width: 0;                 /* IMPORTANT: allows 6 columns */
  display:flex;
  flex-direction: column;
  gap: 18px;
  will-change: transform;
}

/* Tall portrait tiles, full width of column + border frame */
#page2 .wall-photo{
  width: 100%;
  height: clamp(300px, 40vh, 520px);     /* tall */
  border-radius: 26px;

  border: 3px solid rgba(255,255,255,.60);
  outline: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.10);
  box-shadow: 0 28px 70px rgba(0,0,0,.25);

  overflow: hidden;
  flex: 0 0 auto;
}

#page2 .wall-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  display:block;
}

#page2 .photo-wall-vignette{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    radial-gradient(700px 420px at 50% 45%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.10) 40%, rgba(0,0,0,.35));
  pointer-events:none;
}

/* overlay content */
#page2 .overlay-card{
  position:absolute;
  inset: 0;
  z-index: 2;
  display:grid;
  place-items:center;
  padding: 24px;
  text-align:center;
}
#page2 .overlay-card > *{ max-width: 560px; }
#page2 .overlay-card .title{
  color: white;
  text-shadow: 0 16px 40px rgba(0,0,0,.30);
}
#page2 .overlay-card .subtitle{
  color: rgba(255,255,255,.92);
  text-shadow: 0 16px 40px rgba(0,0,0,.22);
}
#page2 .overlay-actions{
  display:flex;
  gap: 12px;
  justify-content:center;
  flex-wrap: wrap;
  margin-top: 10px;
}
#page2 .overlay-hint{
  margin-top: 14px;
  font-size: 13px;
  color: rgba(255,255,255,.75);
  text-shadow: 0 16px 40px rgba(0,0,0,.22);
}


/* ----------------------------
   PAGE 3: Better Plan Page
---------------------------- */
#page3{
  width: min(1100px, 92vw);
}

.plan-wrap{
  display:grid;
  gap: 18px;
}

.plan-hero{
  text-align: center;
  padding: 10px 10px 0;
}

.plan-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 14px 32px rgba(0,0,0,.10);
  font-weight: 650;
  letter-spacing: .2px;
}

.plan-title{
  margin: 12px 0 6px;
  font-size: clamp(30px, 4.5vw, 46px);
  letter-spacing: -0.03em;
}

.plan-subtitle{
  margin: 0;
  opacity: .82;
  font-size: clamp(14px, 2.2vw, 18px);
}

.plan-card{
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
  padding: 22px;
  overflow:hidden;
}

/* Timeline layout */
.plan-timeline{
  position: relative;
  display:grid;
  gap: 14px;
  padding: 10px 6px 6px 6px;
}

.plan-timeline::before{
  content:"";
  position:absolute;
  left: 22px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255,77,136,.15),
    rgba(255,77,136,.55),
    rgba(255,77,136,.15)
  );
  border-radius: 999px;
}

.plan-item{
  display:grid;
  grid-template-columns: 44px 78px 1fr;
  gap: 12px;
  align-items: stretch;
  position: relative;
  padding: 10px 10px;
  border-radius: 18px;
  transition: transform .14s ease, filter .14s ease;
}

.plan-item:hover{
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.plan-dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin-left: 15px;
  margin-top: 14px;
  background: radial-gradient(circle at 35% 35%, #fff, rgba(255,77,136,.95));
  box-shadow: 0 10px 24px rgba(255,77,136,.22);
  border: 2px solid rgba(255,255,255,.85);
  z-index: 2;
}

.plan-time{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 36px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
  font-weight: 750;
  letter-spacing: .3px;
}

.plan-content{
  background: rgba(255,255,255,.60);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.10);
}

.plan-head{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.plan-emoji{
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(255,77,136,.18), rgba(255,214,231,.26));
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 18px 40px rgba(255,77,136,.10);
}

.plan-activity{
  font-weight: 850;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.plan-note{
  margin-top: 3px;
  opacity: .78;
  font-size: 14px;
}

/* Footer */
.plan-footer{
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.7);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.plan-footer-title{
  font-weight: 850;
  letter-spacing: -0.01em;
}

.plan-footer-note{
  opacity: .78;
  font-size: 14px;
  margin-top: 4px;
}

.plan-footer-left{
  text-align:left;
}
