/* ============================================================
   粉色系奶油风 · 游戏邀约单页
   ============================================================ */
:root {
  --cream: #fff9fb;
  --cream-2: #fff1f6;
  --cream-3: #ffe9f1;
  --pink-50: #ffe9f1;
  --pink-100: #ffd7e6;
  --pink-200: #ffbcd5;
  --pink-300: #ff9cc0;
  --pink-400: #f97fae;
  --pink-500: #ef5f98;
  --pink-600: #dd4a88;
  --pink-700: #c23a78;
  --ink: #6d4c5c;
  --ink-soft: #9c7d8c;
  --ink-faint: #bda6b1;
  --white: #ffffff;
  --radius: 42px;
  --radius-sm: 18px;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 18px 44px rgba(239, 95, 152, 0.16), 0 4px 14px rgba(239, 95, 152, 0.10);
  --shadow-btn: 0 10px 22px rgba(239, 95, 152, 0.32);
  --focus-ring: 0 0 0 4px rgba(239, 95, 152, 0.35);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 15% 0%, #fff7fb 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 20%, #ffe4ef 0%, transparent 50%),
    linear-gradient(168deg, #fff9fb 0%, #ffddea 55%, #ffc9de 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

/* ---------- 通用 ---------- */
[hidden] { display: none !important; }

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

button:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button:disabled { cursor: not-allowed; opacity: 0.55; filter: saturate(0.6); }

.sr-live {
  position: fixed;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 背景装饰：虚线爱心 / 虚线圆环 / 闪光 / 腮红 ---------- */
.decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-heart {
  position: absolute;
  width: 108px;
  opacity: 0.85;
  animation: heartSpin 26s linear infinite;
}
.hero-heart--a { top: 13%; left: 7%; }
.hero-heart--b { top: 22%; right: 8%; width: 72px;
  animation: heartSpin 34s linear infinite reverse; }

@keyframes heartSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(239, 120, 170, 0.40);
  animation: ringPulse 9s ease-in-out infinite;
}
.ring--1 { width: 300px; height: 300px; top: -70px; left: -90px; }
.ring--2 { width: 220px; height: 220px; bottom: 6%; right: -60px;
  animation-delay: 1.4s; }
.ring--3 { width: 150px; height: 150px; top: 44%; left: -46px;
  animation-delay: 2.6s; }

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50%      { transform: scale(1.09); opacity: 0.85; }
}

.sparkle {
  position: absolute;
  color: #ff9cc0;
  text-shadow: 0 0 8px rgba(255, 156, 192, 0.9);
  animation: twinkle 2.2s ease-in-out infinite;
}
.sparkle--1 { top: 16%; left: 46%; font-size: 26px; }
.sparkle--2 { top: 30%; right: 20%; font-size: 20px; animation-delay: .5s; }
.sparkle--3 { bottom: 22%; left: 12%; font-size: 24px; animation-delay: 1s; }
.sparkle--4 { bottom: 12%; right: 14%; font-size: 18px; animation-delay: 1.5s; }
.sparkle--5 { top: 8%; right: 36%; font-size: 16px; animation-delay: .8s; }
.sparkle--6 { top: 62%; left: 5%; font-size: 20px; animation-delay: 1.9s; }

@keyframes twinkle {
  0%, 100% { transform: scale(0.55) rotate(0deg); opacity: 0.35; }
  50%      { transform: scale(1.15) rotate(30deg); opacity: 1; }
}

.blush {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 200, 0.55), transparent 70%);
  filter: blur(6px);
}
.blush--1 { width: 240px; height: 200px; top: 34%; right: -50px; }
.blush--2 { width: 260px; height: 220px; bottom: 4%; left: -70px; }

/* 漂浮小爱心 */
.hearts-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.float-heart {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: 0;
  animation: floatUp linear forwards;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(-8deg) scale(0.7); opacity: 0; }
  12%  { opacity: 0.85; }
  100% { transform: translateY(-108vh) rotate(14deg) scale(1.15); opacity: 0; }
}

/* ---------- 舞台与卡片 ---------- */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app {
  width: 100%;
  text-align: center;
}

/* 顶部 44px 居中标题 */
.app-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.app-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--pink-700);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.7);
}

/* 步骤进度 */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 18px;
}
.step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--pink-200);
  transition: all 0.35s var(--ease-soft);
}
.step-dot[aria-current="step"] {
  background: linear-gradient(135deg, var(--pink-400), var(--pink-600));
  color: #fff;
  border-color: transparent;
  transform: scale(1.18);
  box-shadow: 0 6px 14px rgba(239, 95, 152, 0.4);
}
.step-line {
  width: 34px; height: 3px;
  border-radius: 3px;
  background: rgba(239, 120, 170, 0.35);
}

/* 卡片：白底渐变 + 42px 圆角 + 悬浮 */
.card {
  position: relative;
  background: linear-gradient(160deg, #ffffff 0%, var(--cream-2) 58%, var(--cream-3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 34px 30px 32px;
  overflow: hidden;
  transition: transform 0.5s var(--ease-soft), box-shadow 0.5s var(--ease-soft);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 56px rgba(239, 95, 152, 0.24), 0 6px 18px rgba(239, 95, 152, 0.12);
}

/* 步骤切换动画（backwards 填充，避免挡住 hover 悬浮效果） */
.step { animation: stepIn 0.6s var(--ease-soft) backwards; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.emoji-bg {
  position: absolute;
  top: 14px; left: 0; right: 0;
  font-size: 30px;
  letter-spacing: 14px;
  opacity: 0.65;
  pointer-events: none;
  animation: emojiBob 3.4s ease-in-out infinite;
}
@keyframes emojiBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate(3deg); }
}

.card-title {
  position: relative;
  margin: 26px 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: var(--pink-700);
}
.card-sub {
  position: relative;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.35s var(--ease-pop), box-shadow 0.35s var(--ease-soft),
    background 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-3px) scale(1.05); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pink-400) 0%, var(--pink-600) 100%);
  box-shadow: var(--shadow-btn);
}
.btn--primary:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(239, 95, 152, 0.45);
}
.btn--ghost {
  color: var(--pink-600);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--pink-200);
}
.btn--soft {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 2px dashed var(--pink-300);
}
.btn--soft:hover:not(:disabled) { color: var(--pink-600); }

/* 愿意按钮：始终居中 */
.btn--yes {
  color: #fff;
  background: linear-gradient(135deg, #ff9cc0, var(--pink-500));
  box-shadow: var(--shadow-btn);
  font-size: 18px;
  min-width: 150px;
  animation: yesGlow 2.6s ease-in-out infinite;
}
@keyframes yesGlow {
  0%, 100% { box-shadow: 0 10px 22px rgba(239, 95, 152, 0.35); }
  50%      { box-shadow: 0 14px 34px rgba(239, 95, 152, 0.6); }
}

/* 不要按钮：点击后跳到四角 + 轮换文案 */
.btn--no {
  position: relative;
  color: var(--pink-600);
  background: #fff;
  border: 2px solid var(--pink-300);
  transition: transform 0.55s var(--ease-pop), opacity 0.35s ease, background 0.3s ease,
    color 0.3s ease, scale 0.35s var(--ease-pop);
}

.choice {
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn--yes { position: relative; z-index: 2; }
.btn--no  { position: relative; z-index: 3; }

.ask {
  position: relative;
  margin: 8px 0 4px;
  font-size: 21px;
  font-weight: 800;
  color: var(--ink);
  animation: askBob 3s ease-in-out infinite;
}
@keyframes askBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

.confirm {
  margin-top: 6px;
  animation: stepIn 0.6s var(--ease-soft) backwards;
}
.confirm-text {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--pink-600);
  font-weight: 600;
}

/* ---------- Step 2 · 时间 ---------- */
.quick-chips {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.chip {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--pink-200);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s var(--ease-soft);
}
.chip:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--pink-400);
  color: var(--pink-600); }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--pink-100), var(--pink-200));
  border-color: var(--pink-400);
  color: var(--pink-700);
}

.field {
  margin: 14px auto;
  max-width: 420px;
  text-align: left;
}
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--pink-200);
  background: #fff;
  color: var(--ink);
  font-size: 17px;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field-input:hover { border-color: var(--pink-300); }
.hint {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 4px 0 2px;
}

/* ---------- Step 3 · 游戏 2×2 ---------- */
.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 6px 0 20px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 128px;
  padding: 18px 10px;
  border-radius: 26px;
  border: 3px solid var(--pink-100);
  background: #fff;
  color: var(--ink);
  transition: transform 0.4s var(--ease-pop), background 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}
.game-card:hover:not(:disabled) { transform: translateY(-4px) scale(1.04);
  box-shadow: 0 12px 26px rgba(239, 95, 152, 0.22); }
.game-card[aria-pressed="true"] {
  background: linear-gradient(145deg, var(--pink-400), var(--pink-600));
  border-color: var(--pink-600);
  color: #fff;
  box-shadow: 0 12px 26px rgba(239, 95, 152, 0.35);
  transform: translateY(-2px) scale(1.03);
}
.game-emoji { font-size: 34px; line-height: 1; }
.game-name { font-size: 16px; font-weight: 800; letter-spacing: 0.03em; }
.game-check {
  position: absolute;
  top: 10px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--pink-600);
  font-size: 15px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.35s var(--ease-pop);
}
.game-card[aria-pressed="true"] .game-check { opacity: 1; transform: scale(1); }

/* ---------- Step 4 · 摘要 ---------- */
.summary {
  margin: 6px 0 18px;
  display: grid;
  gap: 12px;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--pink-100);
  border-radius: 22px;
  padding: 14px 18px;
  min-height: 60px;
}
.summary-icon {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-100), var(--pink-200));
  font-size: 18px;
  margin-right: 8px;
}
.summary-row dt {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
}
.summary-row dd {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--pink-700);
  text-align: right;
  word-break: break-word;
}

/* 分享图预览 */
.poster-wrap {
  margin: 8px 0 18px;
  animation: stepIn 0.6s var(--ease-soft) both;
}
.poster-wrap img {
  width: min(300px, 78vw);
  height: auto;
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  border: 3px solid #fff;
}
.poster-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* 底部操作列 */
.card-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.app-foot {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.2em;
}

/* ---------- 移动端适配（铺满 + 安全区） ---------- */
@media (max-width: 480px) {
  .card { padding: 28px 20px 26px; border-radius: 34px; }
  .app-title { font-size: 17px; }
  .card-title { font-size: 21px; }
  .ask { font-size: 19px; }
  .game-card { min-height: 112px; }
  .btn { min-height: 48px; padding: 0 20px; font-size: 15px; }
}

/* ---------- 无障碍：减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .card:hover, .btn:hover, .game-card:hover { transform: none !important; }
}

@media (prefers-contrast: more) {
  :root {
    --ink: #4a3038; --ink-soft: #6d4c5c;
    --pink-300: #f26b9d; --pink-400: #e75890;
  }
  .btn--ghost, .btn--soft { border-width: 3px; }
}