:root{
  --bg1:#13091f;
  --bg2:#2a0d27;
  --bg3:#ff4f8b;
  --card:rgba(255,255,255,.10);
  --card-border:rgba(255,255,255,.15);
  --text:#fff8fd;
  --soft:#ffd5e8;
  --accent:#ff5fa2;
  --accent-2:#ff86b8;
  --gold:#ffd166;
  --shadow:0 18px 45px rgba(0,0,0,.35);
  --radius:28px;
}

*{
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

html,body{
  margin:0;
  width:100%;
  height:100%;
  font-family:"Inter","Segoe UI",Arial,sans-serif;
  background:
    radial-gradient(circle at top, rgba(255,143,192,.18), transparent 30%),
    linear-gradient(160deg, var(--bg1), var(--bg2) 55%, #1d0d2c 100%);
  color:var(--text);
  overflow:hidden;
}

body{
  position:relative;
}

.stars, .hearts-bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index:0;
}

.star{
  position:absolute;
  width:2px;
  height:2px;
  border-radius:50%;
  background:#fff;
  opacity:.75;
  animation:twinkle 2.8s infinite ease-in-out;
}

@keyframes twinkle{
  0%,100%{ opacity:.2; transform:scale(.8); }
  50%{ opacity:1; transform:scale(1.5); }
}

.app{
  position:relative;
  width:100%;
  height:100%;
  max-width:480px;
  margin:0 auto;
  overflow:hidden;
  z-index:1;
}

.screen{
  position:absolute;
  inset:0;
  padding:18px 16px 24px;
  display:none;
  flex-direction:column;
  overflow:hidden;
}

.screen.active{
  display:flex;
  animation:fadeIn .45s ease;
}

@keyframes fadeIn{
  from{ opacity:0; transform:translateY(18px); }
  to{ opacity:1; transform:translateY(0); }
}

.status-space{
  height:10px;
  flex-shrink:0;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  gap:10px;
}

.back-btn, .ghost-btn, .menu-btn{
  border:none;
  outline:none;
  color:white;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-radius:999px;
  padding:10px 14px;
  font-size:14px;
  font-weight:700;
  box-shadow:var(--shadow);
  cursor:pointer;
}

.title-mini{
  font-size:13px;
  color:#ffd9ea;
  letter-spacing:.3px;
  opacity:.9;
}

.hero-card, .glass-card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:var(--radius);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:var(--shadow);
}

.home-hero{
  padding:22px 18px 20px;
  position:relative;
  overflow:hidden;
  margin-top:4px;
}

.home-hero::before{
  content:"";
  position:absolute;
  inset:auto -40px -80px auto;
  width:160px;
  height:160px;
  background:radial-gradient(circle, rgba(255,118,175,.35), transparent 70%);
  filter:blur(10px);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  font-size:12px;
  color:#ffe6f1;
  margin-bottom:14px;
}

.home-hero h1{
  margin:0 0 10px;
  font-size:28px;
  line-height:1.08;
  letter-spacing:-.5px;
}

.home-hero p{
  margin:0;
  color:#ffe2ef;
  line-height:1.55;
  font-size:15.5px;
}

.signature{
  margin-top:14px;
  font-size:14px;
  color:#ffd6ea;
  font-weight:700;
}

.menu-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:18px;
  overflow:auto;
  padding-bottom:20px;
}

.menu-card{
  border:none;
  text-align:left;
  padding:18px 16px;
  cursor:pointer;
  color:white;
  background:linear-gradient(135deg, rgba(255,95,162,.25), rgba(255,255,255,.08));
}

.menu-card h3{
  margin:0 0 6px;
  font-size:18px;
}

.menu-card p{
  margin:0;
  color:#ffe1ee;
  line-height:1.45;
  font-size:14px;
}

.menu-icon{
  width:44px;
  height:44px;
  border-radius:16px;
  display:grid;
  place-items:center;
  font-size:22px;
  margin-bottom:12px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
}

.love-screen{
  gap:12px;
}

.love-header{
  padding:16px;
}

.love-header h2{
  margin:0 0 8px;
  font-size:23px;
}

.love-header p{
  margin:0;
  color:#ffe1ee;
  line-height:1.5;
  font-size:14px;
}

.love-stage{
  position:relative;
  flex:1;
  min-height:0;
  overflow:hidden;
  border-radius:32px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.08), transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(255,90,150,.18), transparent 22%),
    linear-gradient(180deg, rgba(18,7,31,.95), rgba(23,11,39,.98));
  border:1px solid rgba(255,255,255,.08);
  box-shadow:var(--shadow);
}

.love-hud{
  position:absolute;
  top:14px;
  left:14px;
  right:14px;
  z-index:8;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.pill{
  padding:10px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  font-size:12px;
  font-weight:700;
  color:#fff0f7;
  backdrop-filter:blur(10px);
}

.heart-wrap{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:4;
}

.heart-box{
  position:relative;
  width:min(68vw,270px);
  height:min(68vw,270px);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .25s ease;
}

.heart-box.pulse{
  animation:pulseHeart .45s ease;
}

@keyframes pulseHeart{
  0%{ transform:scale(1); }
  50%{ transform:scale(1.08); }
  100%{ transform:scale(1); }
}

#heartSvg{
  width:100%;
  height:100%;
  overflow:visible;
  filter:drop-shadow(0 12px 26px rgba(255,73,132,.28));
}

.heart-label{
  position:absolute;
  text-align:center;
  font-weight:800;
  font-size:14px;
  line-height:1.3;
  color:white;
  text-shadow:0 2px 12px rgba(0,0,0,.28);
  width:120px;
}

.tap-btn{
  position:absolute;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  z-index:9;
  border:none;
  padding:14px 18px;
  min-width:190px;
  border-radius:18px;
  background:linear-gradient(135deg, var(--accent), #ff79af);
  color:white;
  font-size:15px;
  font-weight:800;
  box-shadow:0 15px 28px rgba(255,79,139,.35);
  cursor:pointer;
}

.floating-word{
  position:absolute;
  z-index:7;
  font-size:13px;
  font-weight:800;
  color:#ffe7f1;
  opacity:0;
  animation:floatPhrase 1.8s ease forwards;
  text-shadow:0 3px 16px rgba(0,0,0,.38);
  pointer-events:none;
  max-width:120px;
  text-align:center;
}

@keyframes floatPhrase{
  0%{
    opacity:0;
    transform:translateY(10px) scale(.8);
  }
  15%{
    opacity:1;
    transform:translateY(0) scale(1);
  }
  85%{
    opacity:1;
  }
  100%{
    opacity:0;
    transform:translateY(-26px) scale(1.08);
  }
}

.rocket{
  position:absolute;
  width:42px;
  height:42px;
  display:none;
  align-items:center;
  justify-content:center;
  font-size:30px;
  z-index:8;
  transform-origin:center center;
  pointer-events:none;
}

.rocket.active{
  display:flex;
  animation:orbit 2.1s linear infinite;
}

@keyframes orbit{
  0%{ transform:rotate(0deg) translateX(115px) rotate(0deg); }
  100%{ transform:rotate(360deg) translateX(115px) rotate(-360deg); }
}

.infinite-line{
  position:absolute;
  inset:auto 0 84px 0;
  text-align:center;
  z-index:6;
  color:#ffe2ee;
  font-size:17px;
  font-weight:800;
  opacity:0;
  transform:translateY(10px);
  transition:.45s ease;
  padding:0 20px;
}

.infinite-line.show{
  opacity:1;
  transform:translateY(0);
}

.moon-zone{
  position:absolute;
  right:18px;
  top:76px;
  width:104px;
  height:104px;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:8px;
}

.moon{
  position:relative;
  width:72px;
  height:72px;
  border-radius:50%;
  background:
    radial-gradient(circle at 32% 30%, #fffef7, #efe2be 55%, #d6c49f 100%);
  box-shadow:
    0 0 24px rgba(255,240,200,.28),
    inset -8px -8px 18px rgba(0,0,0,.12);
  overflow:hidden;
  cursor:pointer;
  transition:transform .2s ease;
}

.moon:active{
  transform:scale(.96);
}

.moon-shadow{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border-radius:50%;
  background:#0f0820;
  transform:translateX(0%);
  animation:moonPhase 8s ease-in-out infinite alternate;
}

@keyframes moonPhase{
  0%{ transform:translateX(-65%); }
  25%{ transform:translateX(-20%); }
  50%{ transform:translateX(0%); }
  75%{ transform:translateX(25%); }
  100%{ transform:translateX(70%); }
}

.moon-caption{
  font-size:11px;
  color:#ffe8f2;
  opacity:.85;
  text-align:center;
  line-height:1.3;
  max-width:100px;
}

.toast{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:92px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.16);
  color:#fff2f7;
  padding:11px 14px;
  border-radius:16px;
  font-size:13px;
  font-weight:700;
  box-shadow:var(--shadow);
  opacity:0;
  pointer-events:none;
  z-index:12;
  transition:.28s ease;
  text-align:center;
  max-width:88%;
  backdrop-filter:blur(10px);
}

.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(-4px);
}

.gallery-wrap{
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:0;
  height:100%;
}

.gallery-header{
  padding:16px;
}

.gallery-header h2{
  margin:0 0 8px;
  font-size:23px;
}

.gallery-header p{
  margin:0;
  color:#ffe2ef;
  line-height:1.5;
  font-size:14px;
}

.slider-card{
  flex:1;
  min-height:0;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.slider-photo-wrap{
  position:relative;
  flex:1;
  min-height:300px;
  border-radius:24px;
  overflow:hidden;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.12);
}

.slider-photo{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.photo-overlay{
  position:absolute;
  inset:auto 0 0 0;
  padding:18px 16px 16px;
  background:linear-gradient(180deg, transparent, rgba(0,0,0,.55));
}

.photo-title{
  margin:0 0 4px;
  font-size:18px;
  font-weight:800;
}

.photo-desc{
  margin:0;
  font-size:14px;
  color:#ffe5ef;
  line-height:1.45;
}

.slider-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.slider-btn{
  flex:1;
  border:none;
  border-radius:16px;
  padding:14px 12px;
  font-size:14px;
  font-weight:800;
  color:white;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  cursor:pointer;
}

.dots{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}

.dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:rgba(255,255,255,.25);
  transition:.25s ease;
}

.dot.active{
  width:24px;
  background:#fff;
}

.story-screen{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-height:0;
  height:100%;
}

.story-header{
  padding:16px;
}

.story-header h2{
  margin:0 0 8px;
  font-size:23px;
}

.story-header p{
  margin:0;
  color:#ffe2ef;
  line-height:1.5;
  font-size:14px;
}

.story-stage{
  flex:1;
  min-height:0;
  position:relative;
  overflow:hidden;
  border-radius:30px;
  border:1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(circle at 50% 100%, rgba(255,95,162,.14), transparent 35%),
    linear-gradient(180deg, rgba(12,6,21,.95), rgba(19,10,34,.98));
  box-shadow:var(--shadow);
  padding-bottom:80px;
}

.story-viewport{
  position:absolute;
  inset:0;
  overflow:hidden;
  padding:0 20px;
}

.story-scroll{
  position:absolute;
  left:18px;
  right:18px;
  bottom:-75%;
  text-align:center;
  color:#fff4fa;
  font-size:18px;
  line-height:1.75;
  font-weight:700;
  white-space:pre-line;
  text-shadow:0 2px 10px rgba(0,0,0,.35);
  opacity:0;
  display:none;
}

.story-scroll.run{
  display:block;
  opacity:1;
  animation:storyUp 40s linear forwards;
}

@keyframes storyUp{
  0%{
    transform:translateY(75%);
  }

  100%{
    transform:translateY(-110%);
  }
}

.story-bottom-fade{
  position:absolute;
  inset:auto 0 0 0;
  height:110px;
  background:linear-gradient(180deg, transparent, rgba(14,8,24,.96));
  z-index:3;
  pointer-events:none;
}

.story-top-fade{
  position:absolute;
  inset:0 0 auto 0;
  height:80px;
  background:linear-gradient(180deg, rgba(14,8,24,.96), transparent);
  z-index:3;
  pointer-events:none;
}

.story-actions{
  position:absolute;
  left:0;
  right:0;
  bottom:20px;
  z-index:6;
  display:flex;
  justify-content:center;
  gap:10px;
  padding:0 16px;
}

.story-action-btn{
  border:none;
  border-radius:16px;
  padding:13px 16px;
  font-size:14px;
  font-weight:800;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  cursor:pointer;
}

.love-summary{
  position:absolute;
  inset:18px 14px 70px 14px;
  display:none;
  align-content:start;
  z-index:4;
  gap:12px;
  animation:fadeIn .5s ease;
  overflow-y:auto;
  padding-bottom:20px;
}

.love-summary.show{
  display:grid;
}

.summary-title{
  text-align:center;
  font-size:21px;
  font-weight:900;
  color:#fff;
  margin-top:auto;
  margin-bottom:2px;
}

.summary-sub{
  text-align:center;
  color:#ffe0ee;
  font-size:14px;
  line-height:1.4;
  margin-bottom:4px;
}

.stats-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.stat-card{
  padding:14px 12px;
  border-radius:20px;
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.14);
  text-align:center;
  backdrop-filter:blur(12px);
}

.stat-number{
  display:block;
  font-size:22px;
  font-weight:900;
  margin-bottom:4px;
  color:#fff;
}

.stat-label{
  font-size:12px;
  color:#ffe5f0;
  line-height:1.35;
  font-weight:700;
}

.couple-card{
  overflow:hidden;
  padding:0;
}

.couple-photo{
  display:block;
  width:100%;
  height:auto;
  max-height:260px;
  object-fit:cover;
  border-radius:22px;
}

.couple-caption{
  padding:12px 14px 14px;
  font-size:14px;
  color:#ffe3ef;
  text-align:center;
  font-weight:800;
}

.small-note{
  font-size:11px;
  text-align:center;
  color:#ffe7f1;
  opacity:.75;
  line-height:1.4;
  margin-top:2px;
}

@media (max-width:380px){
  .home-hero h1{ font-size:24px; }
  .heart-box{ width:min(70vw,240px); height:min(70vw,240px); }
  .tap-btn{ min-width:170px; font-size:14px; }
  .story-scroll{ font-size:16px; }
}

.story-scroll.hidden{
  display:none !important;
}

.story-viewport.hidden{
  display:none;
}