/* =========================================================
   噜噜的慢慢告白 — 主样式
   配色：奶油白 #FFF9F0 / 浅黄 #F6D98B / 淡粉 #F5DCE1
        深咖 #594B42 / 柔和橘 #EBA66B / 浅棕 #B99576
   ========================================================= */

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

html, body { height: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: #FFF9F0;
  color: #594B42;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 背景柔光 ---------- */
.bg-deco {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.blob { position: absolute; display: block; border-radius: 50%; }
.b1 {
  width: 78vw; height: 78vw; left: -28vw; top: -30vw;
  background: radial-gradient(circle, #FDE7EA 0%, rgba(253,231,234,.55) 45%, rgba(253,231,234,0) 72%);
}
.b2 {
  width: 94vw; height: 94vw; right: -36vw; bottom: -42vw;
  background: radial-gradient(circle, #FBEBC4 0%, rgba(251,235,196,.5) 45%, rgba(251,235,196,0) 72%);
}
.b3 {
  width: 62vw; height: 62vw; right: -22vw; top: 24vh;
  background: radial-gradient(circle, #FDEEE4 0%, rgba(253,238,228,0) 70%);
}

/* 背景里慢慢飘的小爱心 */
.drift {
  position: absolute;
  bottom: -8%;
  color: #F2B7C2;
  font-size: 13px;
  opacity: 0;
  -webkit-animation: driftUp linear infinite;
  animation: driftUp linear infinite;
}
.drift.h1 { left: 8%;  font-size: 13px; -webkit-animation-duration: 21s; animation-duration: 21s; -webkit-animation-delay: -2s;  animation-delay: -2s; }
.drift.h2 { left: 26%; font-size: 10px; color: #F0C86A; -webkit-animation-duration: 26s; animation-duration: 26s; -webkit-animation-delay: -11s; animation-delay: -11s; }
.drift.h3 { left: 52%; font-size: 15px; -webkit-animation-duration: 23s; animation-duration: 23s; -webkit-animation-delay: -17s; animation-delay: -17s; }
.drift.h4 { left: 74%; font-size: 11px; color: #E3B58F; -webkit-animation-duration: 28s; animation-duration: 28s; -webkit-animation-delay: -6s;  animation-delay: -6s; }
.drift.h5 { left: 90%; font-size: 12px; color: #F5C9CF; -webkit-animation-duration: 24s; animation-duration: 24s; -webkit-animation-delay: -15s; animation-delay: -15s; }

@-webkit-keyframes driftUp {
  0%   { -webkit-transform: translate3d(0,0,0) rotate(0deg); opacity: 0; }
  15%  { opacity: .5; }
  80%  { opacity: .3; }
  100% { -webkit-transform: translate3d(18px,-108vh,0) rotate(14deg); opacity: 0; }
}
@keyframes driftUp {
  0%   { transform: translate3d(0,0,0) rotate(0deg); opacity: 0; }
  15%  { opacity: .5; }
  80%  { opacity: .3; }
  100% { transform: translate3d(18px,-108vh,0) rotate(14deg); opacity: 0; }
}

/* ---------- 页面容器与切换 ---------- */
.page {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  -webkit-transform: translateY(10px);
  transform: translateY(10px);
  -webkit-transition: opacity .38s ease, -webkit-transform .38s ease, visibility .38s;
  transition: opacity .38s ease, transform .38s ease, visibility .38s;
}
.page.active {
  opacity: 1;
  visibility: visible;
  -webkit-transform: none;
  transform: none;
}
.page.leaving {
  opacity: 0;
  -webkit-transform: translateY(-6px);
  transform: translateY(-6px);
}
.page-inner {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
  padding: 64px 24px 46px;
  padding-bottom: calc(46px + env(safe-area-inset-bottom));
  text-align: center;
}

/* ---------- 文字 ---------- */
.kicker {
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: .32em;
  text-indent: .32em;
  color: #B08F74;
}
.sign {
  margin-top: 20px;
  font-size: 13px;
  letter-spacing: .06em;
  color: #8C7A6B;
}

.h1 {
  font-size: 27px;
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: .02em;
  color: #594B42;
  margin-bottom: 14px;
}
.h2 {
  font-size: 23px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: .02em;
  color: #594B42;
  margin-bottom: 12px;
}
.h2.big { font-size: 25px; }

.sub {
  max-width: 420px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.95;
  color: #7B6A5D;
}
.note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.9;
  color: #A08D7E;
}

.prose {
  max-width: 480px;
  margin: 18px auto 0;
  text-align: center;
}
.prose p {
  font-size: 15.5px;
  line-height: 2.05;
  color: #5F5148;
  margin-bottom: 18px;
}
.prose p:last-child { margin-bottom: 0; }
.prose p.emphasis { color: #D98753; font-weight: 600; }

.question {
  margin: 26px auto 0;
  font-size: 21px;
  line-height: 1.7;
  font-weight: 600;
  color: #4E4138;
}

/* ---------- 噜噜（原图，不修改） ---------- */
.lulu-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 26px;
  -webkit-animation: floaty 5.6s ease-in-out infinite;
  animation: floaty 5.6s ease-in-out infinite;
}
.lulu-wrap:before {
  content: "";
  position: absolute;
  left: 50%; top: 52%;
  width: 118%; height: 118%;
  margin: -59% 0 0 -59%;
  border-radius: 50%;
  z-index: 0;
  background: radial-gradient(circle, rgba(246,217,139,.42) 0%, rgba(246,217,139,.12) 45%, rgba(246,217,139,0) 70%);
}
.lulu {
  position: relative;
  z-index: 1;
  width: 212px;
  max-width: 54vw;
  padding: 9px;
  background: #FFFFFF;
  border-radius: 34px;
  box-shadow: 0 22px 38px rgba(185,149,118,.22), 0 3px 10px rgba(185,149,118,.12);
  -webkit-transform: rotate(-2deg);
  transform: rotate(-2deg);
}
.lulu img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
}
.lulu-wrap.small .lulu { width: 150px; }
.lulu-wrap.mid .lulu { width: 174px; }

/* 首页是横版大图，单独放宽一点 */
.page-1 .lulu { width: 420px; max-width: 86vw; padding: 8px; border-radius: 30px; }
.page-1 .lulu img { border-radius: 24px; }

.party .lulu img {
  -webkit-animation: pop 1.1s ease-in-out 2;
  animation: pop 1.1s ease-in-out 2;
}

@-webkit-keyframes floaty {
  0%, 100% { -webkit-transform: translateY(0); }
  50%      { -webkit-transform: translateY(-8px); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@-webkit-keyframes pop {
  0%, 100% { -webkit-transform: scale(1); }
  50%      { -webkit-transform: scale(1.05); }
}
@keyframes pop {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

/* 人物周围的小装饰 */
.spark {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  color: #F2A9B6;
  -webkit-animation: sparkle 3.6s ease-in-out infinite;
  animation: sparkle 3.6s ease-in-out infinite;
}
.spark.s1 { left: -16px;  top: 18%;   font-size: 16px; }
.spark.s2 { right: -18px; top: 8%;    font-size: 13px; color: #F0C86A; -webkit-animation-delay: 1.1s; animation-delay: 1.1s; }
.spark.s3 { right: -8px;  bottom: 16%; font-size: 12px; color: #E7A99B; -webkit-animation-delay: 2s; animation-delay: 2s; }

@-webkit-keyframes sparkle {
  0%, 100% { opacity: .3; -webkit-transform: translateY(0) scale(.9); }
  50%      { opacity: .95; -webkit-transform: translateY(-6px) scale(1.1); }
}
@keyframes sparkle {
  0%, 100% { opacity: .3; transform: translateY(0) scale(.9); }
  50%      { opacity: .95; transform: translateY(-6px) scale(1.1); }
}

/* ---------- 按钮 ---------- */
.btn {
  font-family: inherit;
  font-size: 16px;
  line-height: 1;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.btn-primary {
  margin-top: 30px;
  padding: 16px 32px;
  background: #EBA66B;
  color: #4A3123;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: 0 12px 24px rgba(235,166,107,.4), inset 0 -2px 0 rgba(140,90,50,.12);
}
.btn-primary:active {
  -webkit-transform: translateY(1px) scale(.985);
  transform: translateY(1px) scale(.985);
  box-shadow: 0 6px 14px rgba(235,166,107,.35);
}

.choices {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
  margin-top: 24px;
}
.choices .btn { min-width: 138px; margin: 6px; }
.btn-yes {
  padding: 16px 34px;
  background: #F3B58C;
  background: -webkit-linear-gradient(135deg, #F3B58C 0%, #EBA66B 100%);
  background: linear-gradient(135deg, #F3B58C 0%, #EBA66B 100%);
  color: #4A3123;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 14px 26px rgba(235,166,107,.45), inset 0 -2px 0 rgba(140,90,50,.1);
}
.btn-yes:active {
  -webkit-transform: scale(.97);
  transform: scale(.97);
}
.btn-no {
  padding: 16px 30px;
  background: #FFFDF9;
  color: #8C7A6B;
  font-weight: 500;
  border: 1.5px solid #E7D3BA;
  box-shadow: 0 6px 14px rgba(185,149,118,.12);
  -webkit-transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .25s ease, opacity .25s ease;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .25s ease, opacity .25s ease;
}
.btn-no:active { box-shadow: 0 3px 8px rgba(185,149,118,.16); }

/* ---------- 噜噜说的话（气泡） ---------- */
.bubble-slot {
  min-height: 72px;
  margin-bottom: 12px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-justify-content: center;
  justify-content: center;
  padding-top: 2px;
}
.bubble {
  position: relative;
  max-width: 340px;
  margin: 0;
  padding: 11px 16px;
  background: #FFFDF9;
  border: 1px solid #F3E2CF;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #6B5B4E;
  text-align: center;
  opacity: 0;
  -webkit-transform: translateY(6px);
  transform: translateY(6px);
  -webkit-transition: opacity .3s ease, -webkit-transform .3s ease;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 8px 18px rgba(185,149,118,.14);
}
.bubble.show { opacity: 1; -webkit-transform: none; transform: none; }
.bubble:before {
  content: "";
  position: absolute;
  left: 50%; top: -6px;
  width: 11px; height: 11px;
  margin-left: -5.5px;
  background: #FFFDF9;
  border-left: 1px solid #F3E2CF;
  border-top: 1px solid #F3E2CF;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

/* ---------- 入场动画 ---------- */
.fade-up {
  opacity: 0;
  -webkit-transform: translateY(12px);
  transform: translateY(12px);
  -webkit-transition: opacity .6s ease, -webkit-transform .6s ease;
  transition: opacity .6s ease, transform .6s ease;
}
.page.active .fade-up { opacity: 1; -webkit-transform: none; transform: none; }
.d1 { -webkit-transition-delay: .06s; transition-delay: .06s; }
.d2 { -webkit-transition-delay: .14s; transition-delay: .14s; }
.d3 { -webkit-transition-delay: .22s; transition-delay: .22s; }
.d4 { -webkit-transition-delay: .30s; transition-delay: .30s; }
.d5 { -webkit-transition-delay: .38s; transition-delay: .38s; }
.d6 { -webkit-transition-delay: .46s; transition-delay: .46s; }
.d7 { -webkit-transition-delay: .54s; transition-delay: .54s; }

.reveal {
  opacity: 0;
  -webkit-transform: translateY(10px);
  transform: translateY(10px);
  -webkit-transition: opacity .7s ease, -webkit-transform .7s ease;
  transition: opacity .7s ease, transform .7s ease;
}
.page.active .reveal { opacity: 1; -webkit-transform: none; transform: none; }
.page.active .reveal:nth-child(1) { -webkit-transition-delay: .20s; transition-delay: .20s; }
.page.active .reveal:nth-child(2) { -webkit-transition-delay: .32s; transition-delay: .32s; }
.page.active .reveal:nth-child(3) { -webkit-transition-delay: .44s; transition-delay: .44s; }
.page.active .reveal:nth-child(4) { -webkit-transition-delay: .56s; transition-delay: .56s; }
.page.active .reveal:nth-child(5) { -webkit-transition-delay: .68s; transition-delay: .68s; }
.page.active .reveal:nth-child(6) { -webkit-transition-delay: .80s; transition-delay: .80s; }

/* ---------- 顶部小按钮 ---------- */
.icon-btn {
  position: fixed;
  z-index: 50;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #EFDCC6;
  background: rgba(255,253,249,.94);
  color: #8C7A6B;
  font-family: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: none;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 14px rgba(185,149,118,.16);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn.show { display: -webkit-flex; display: flex; }
.back  { left: 14px;  top: 14px; top: calc(14px + env(safe-area-inset-top)); }
.music { right: 14px; top: 14px; top: calc(14px + env(safe-area-inset-top)); }
.music.playing { color: #D98753; border-color: #EFC9A6; }
.music:after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 1.5px;
  background: #8C7A6B;
  -webkit-transform: translate(-50%,-50%) rotate(-45deg);
  transform: translate(-50%,-50%) rotate(-45deg);
  opacity: 0;
  -webkit-transition: opacity .2s ease;
  transition: opacity .2s ease;
}
.music.muted:after { opacity: 1; }

/* ---------- 成功页爱心 ---------- */
.confetti-layer {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 60;
}
.confetti {
  position: absolute;
  top: -8vh;
  line-height: 1;
  -webkit-animation: confettiFall linear forwards;
  animation: confettiFall linear forwards;
}
@-webkit-keyframes confettiFall {
  0%   { opacity: 0; -webkit-transform: translate3d(0,0,0) rotate(0deg); }
  8%   { opacity: 1; }
  100% { opacity: 0; -webkit-transform: translate3d(12px,120vh,0) rotate(330deg); }
}
@keyframes confettiFall {
  0%   { opacity: 0; transform: translate3d(0,0,0) rotate(0deg); }
  8%   { opacity: 1; }
  100% { opacity: 0; transform: translate3d(12px,120vh,0) rotate(330deg); }
}

/* ---------- 小屏微调 ---------- */
@media (max-width: 520px) {
  .page-inner { padding: 56px 22px 34px; padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
  .lulu-wrap { margin-bottom: 20px; }
  .page-3 .lulu-wrap { margin-bottom: 12px; }
  .lulu-wrap.mid .lulu { width: 150px; }
  .prose p { font-size: 15px; line-height: 1.95; margin-bottom: 15px; }
  .bubble { font-size: 13px; padding: 10px 14px; }
  .bubble-slot { min-height: 62px; margin-bottom: 8px; }
  .question { margin-top: 20px; font-size: 19px; }
  .choices { margin-top: 18px; }
  .choices .btn { min-width: 128px; }
}

@media (max-width: 360px) {
  .h1 { font-size: 24px; }
  .h2 { font-size: 21px; }
  .h2.big { font-size: 22px; }
  .prose p { font-size: 14.5px; }
  .lulu { width: 186px; }
  .lulu-wrap.mid .lulu { width: 140px; }
  .choices .btn { min-width: 0; -webkit-flex: 1 1 118px; flex: 1 1 118px; }
}

/* ---------- 大屏 ---------- */
@media (min-width: 900px) {
  .page-inner { padding: 80px 32px 56px; padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .h1 { font-size: 34px; }
  .h2 { font-size: 28px; }
  .h2.big { font-size: 32px; }
  .sub { font-size: 16px; }
  .prose p { font-size: 16.5px; }
  .question { font-size: 24px; }
  .lulu { width: 244px; }
  .page-1 .lulu { width: 480px; }
  .lulu-wrap.small .lulu { width: 170px; }
  .lulu-wrap.mid .lulu { width: 200px; }
}

/* ---------- 尊重系统“减少动态效果” ---------- */
@media (prefers-reduced-motion: reduce) {
  * {
    -webkit-animation-duration: .001s !important;
    animation-duration: .001s !important;
    -webkit-animation-iteration-count: 1 !important;
    animation-iteration-count: 1 !important;
    -webkit-transition-duration: .001s !important;
    transition-duration: .001s !important;
  }
}
