/* ============================================================
   婚礼请柬 · 移动端竖屏样式（基准 375x667px）
   主题：简约创意 · 香槟金 × 米白 × 樱粉
   ============================================================ */

:root {
  --bg: #faf6ef;
  --bg-grad-1: #fdf8f0;
  --bg-grad-2: #f6ecdd;
  --card: #ffffff;
  --gold: #c9a86a;
  --gold-deep: #b8945a;
  --gold-soft: #f3e7cf;
  --pink: #f0a3b5;
  --pink-soft: #f8d3dc;
  --ink: #3d3428;
  --ink-sub: #8a7f6d;
  --ink-light: #b3a994;
  --line: #eee4d5;
  --danger: #c95b5b;
  --success: #4a9d6a;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(180, 150, 100, 0.12);
  --font-serif: Georgia, "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% 0%, var(--bg-grad-1) 0%, var(--bg-grad-2) 100%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 顶部柔和金光 */
body::before {
  content: "";
  position: fixed;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(201, 168, 106, 0.16), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* 蕾丝波点底纹 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(201, 168, 106, 0.10) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(240, 163, 181, 0.08) 1px, transparent 1.6px);
  background-size: 30px 30px, 30px 30px;
  background-position: 0 0, 15px 15px;
  pointer-events: none;
  z-index: 0;
}

/* ---------------- 飘落花瓣 ---------------- */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 999;
}

.petal {
  position: absolute;
  top: -30px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, var(--pink-soft), var(--pink));
  border-radius: 150% 0 150% 0;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); }
  20%  { transform: translate3d(14px, 20vh, 0) rotate(80deg); }
  50%  { transform: translate3d(-10px, 50vh, 0) rotate(180deg); }
  80%  { transform: translate3d(12px, 80vh, 0) rotate(280deg); }
  100% { transform: translate3d(-6px, 108vh, 0) rotate(360deg); }
}

/* 手机竖屏容器：以 375px 为基准，大屏居中显示 */
.phone {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 375px;
  margin: 0 auto;
  padding: 0 18px 40px;
  animation: fadeUp 0.7s ease both;
}

/* ---------------- 主视觉 hero ---------------- */
.hero {
  text-align: center;
  padding: 46px 0 22px;
}

.hero-ring {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ring-outer {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-dasharray: 3 5;
  animation: spin 40s linear infinite;
  transform-origin: center;
}

.ring-inner {
  fill: none;
  stroke: var(--gold);
  stroke-width: 0.8;
  opacity: 0.5;
}

.hero-monogram {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, var(--gold-soft) 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.monogram-char {
  font-family: var(--font-serif);
  font-size: 42px;
  color: var(--gold-deep);
  line-height: 1;
}

.hero-en {
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 14px;
}

.hero-names {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 6px;
  color: var(--ink);
  margin-bottom: 12px;
}

.hero-and {
  display: inline-block;
  margin: 0 10px;
  color: var(--gold);
  font-style: italic;
  font-size: 22px;
}

.hero-heart {
  display: flex;
  justify-content: center;
  margin: 0 0 12px;
}

.hero-heart svg {
  width: 16px;
  height: 16px;
}

.hero-date {
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--ink);
  font-weight: 500;
}

.hero-date .dot { margin: 0 6px; color: var(--gold); }

.hero-lunar {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-sub);
}

/* ---------------- 倒计时 ---------------- */
.countdown {
  margin: 22px 0 0;
}

.countdown-title {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--ink-sub);
  margin-bottom: 10px;
}

.countdown-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.cd-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 46px;
  padding: 10px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(180, 150, 100, 0.10);
}

.cd-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}

.cd-label {
  font-size: 11px;
  color: var(--ink-sub);
  margin-top: 5px;
}

.cd-sep {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold);
  line-height: 1;
  margin-top: 14px;
}

/* ---------------- 戒指分隔 ---------------- */
.rings-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 2px 0 6px;
  line-height: 0;
}

.rings {
  width: 74px;
  height: 50px;
}

.bow {
  width: 34px;
  height: 22px;
}

/* ---------------- 寄语 ---------------- */
.slogan {
  text-align: center;
  padding: 4px 8px 22px;
}

.slogan p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink-sub);
  letter-spacing: 1px;
}

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px;
  margin-bottom: 16px;
  animation: fadeUp 0.7s ease both;
}

/* 分区标题：花朵 + 标题 + 花朵 */
.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.head-flower {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
}

.head-flower svg { width: 100%; height: 100%; }

.section-title {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 4px;
  text-align: center;
  color: var(--ink);
  margin: 0;
}

/* 信息行 */
.info-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}

.info-row + .info-row {
  border-top: 1px dashed var(--line);
}

.info-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.4;
}

.info-label {
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.info-sub {
  font-size: 13px;
  color: var(--ink-sub);
  margin-top: 2px;
}

/* ---------------- 时间线 ---------------- */
.timeline {
  list-style: none;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 52px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
}

.timeline-time {
  width: 40px;
  flex-shrink: 0;
  text-align: right;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--gold-deep);
  font-weight: 600;
  padding-top: 1px;
}

.timeline-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--gold);
  position: relative;
  z-index: 1;
}

.timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.timeline-desc {
  font-size: 12px;
  color: var(--ink-sub);
  margin-top: 1px;
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(185, 145, 80, 0.35);
}

.btn-primary:active { box-shadow: 0 4px 12px rgba(185, 145, 80, 0.3); }

.btn-ghost {
  background: var(--card);
  color: var(--gold-deep);
  border: 1px solid var(--gold);
  box-shadow: none;
}

.btn-block {
  width: 100%;
  padding: 15px;
}

.map-btn {
  margin: -4px 0 16px;
  font-size: 14px;
}

/* ---------------- 回执入口 ---------------- */
.rsvp-entry {
  text-align: center;
  padding: 10px 0 0;
}

.rsvp-hint {
  font-size: 12px;
  color: var(--ink-sub);
  margin-bottom: 16px;
}

.rsvp-entry .btn {
  display: flex;
  width: 100%;
}

/* ---------------- 底部 ---------------- */
.footer {
  text-align: center;
  padding: 34px 0 10px;
}

.footer-flower {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 14px;
}

.footer-flower svg {
  width: 16px;
  height: 16px;
}

.footer-flower .heart-s {
  width: 14px;
  height: 14px;
}

.footer p {
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--ink-light);
  letter-spacing: 2px;
}

/* ---------------- 回执页 ---------------- */
.rsvp-header {
  padding: 34px 0 6px;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-sub);
  text-decoration: none;
  margin-bottom: 18px;
}

.rsvp-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rsvp-title-row .head-flower {
  width: 18px;
  height: 18px;
}

.rsvp-title {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: 6px;
  color: var(--ink);
}

.rsvp-sub {
  font-size: 13px;
  color: var(--ink-sub);
  margin-top: 6px;
}

.rsvp-form {
  padding: 14px 0 30px;
}

.field {
  display: block;
  margin-bottom: 20px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.req {
  color: var(--gold-deep);
  font-style: normal;
}

.field-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--ink-light);
  letter-spacing: 0;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="password"],
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.field textarea { resize: none; }

.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.15);
}

/* 出席/婉辞 单选 */
.attend-group {
  display: flex;
  gap: 12px;
}

.attend-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.attend-option input { display: none; }

.attend-box {
  font-size: 26px;
  line-height: 1;
}

.attend-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sub);
}

.attend-option.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.15);
}

.attend-option.is-active .attend-text { color: var(--gold-deep); }

/* 出席人数 */
.count-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.count-btn {
  flex: 1;
  min-width: 52px;
  padding: 11px 0;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--ink-sub);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.count-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(185, 145, 80, 0.3);
}

/* 提示 */
.flash {
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.flash-success { background: #e8f5ee; color: var(--success); }
.flash-error { background: #fbecec; color: var(--danger); }

/* ---------------- 成功态 ---------------- */
.success-wrap {
  text-align: center;
  padding: 80px 0;
  animation: fadeUp 0.6s ease both;
}

.success-flower {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 18px;
}

.success-flower svg {
  width: 16px;
  height: 16px;
}

.success-flower .success-heart {
  width: 14px;
  height: 14px;
}

.success-check {
  width: 78px;
  height: 78px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(185, 145, 80, 0.4);
}

.success-check svg {
  width: 42px;
  height: 42px;
}

.success-check path {
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: draw 0.5s 0.2s ease forwards;
}

.success-title {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 4px;
  color: var(--ink);
  margin-bottom: 14px;
}

.success-desc {
  font-size: 14px;
  color: var(--ink-sub);
  line-height: 2;
  margin-bottom: 30px;
}

/* ---------------- 动画 ---------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .petal, .ring-outer { animation: none !important; }
}

/* ---------------- 微信分享引导浮层 ---------------- */
.share-mask {
  position: fixed;
  inset: 0;
  background: rgba(40, 32, 22, 0.72);
  z-index: 10000;
  display: none;
  animation: fadeIn 0.3s ease;
}

.share-mask.is-show {
  display: block;
}

.share-arrow {
  position: absolute;
  top: 8px;
  right: 16px;
  width: 52px;
  height: 70px;
  animation: arrowNudge 1.6s ease-in-out infinite;
}

.share-tip {
  position: absolute;
  top: 88px;
  right: 12px;
  text-align: right;
  color: #fff;
}

.share-tip-main {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.share-tip-sub {
  font-size: 13px;
  opacity: 0.85;
  letter-spacing: 1px;
}

.share-close {
  position: absolute;
  left: 50%;
  bottom: 60px;
  transform: translateX(-50%);
  padding: 12px 34px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 2px;
}

.share-close:active {
  background: rgba(255, 255, 255, 0.28);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes arrowNudge {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4px, 4px); }
}
