
:root {
  --bg: #fff7fb;
  --card: rgba(255, 255, 255, 0.86);
  --text: #5f3a47;
  --muted: #9f7785;
  --accent: #c93f68;
  --accent-dark: #8f2d50;
  --accent-soft: #ffe4ee;
  --line: #f4d4e2;
  --gold: #f5d38a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 50% 20%, #4a2c3e 0%, #2f1c2f 45%, #160f1b 100%);
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

body.opened-theme {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 225, 237, 0.8) 0, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(255, 234, 242, 0.75) 0, transparent 38%),
    linear-gradient(180deg, #fff0f6 0%, var(--bg) 46%, #fff 100%);
}

.opening {
  position: fixed;
  inset: 0;
  z-index: 20;
  /* 背景单独一层，避免把爪印压在不可见层级 */
  background: radial-gradient(circle at 50% 20%, #4a2c3e 0%, #2f1c2f 45%, #160f1b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity .7s ease, visibility .7s ease;
  isolation: isolate;
}

/* 封面层：漂浮爪印（在背景之上、卡片之下） */
.opening-cat-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.opening-cat-paw {
  position: absolute;
  font-size: clamp(26px, 7vw, 44px);
  opacity: 0.32;
  color: rgba(255, 210, 225, 0.95);
  text-shadow: 0 0 18px rgba(255, 160, 190, 0.55);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  user-select: none;
  line-height: 1;
}

.opening-cat-paw.p1 { top: 14%; left: 6%; transform: rotate(-16deg); }
.opening-cat-paw.p2 { top: 20%; right: 7%; transform: rotate(14deg); }
.opening-cat-paw.p3 { bottom: 24%; left: 9%; transform: rotate(10deg); }
.opening-cat-paw.p4 { bottom: 16%; right: 6%; transform: rotate(-12deg); }

.opening-card-paws {
  margin: 6px 0 2px;
  font-size: 14px;
  letter-spacing: 0.35em;
  opacity: 0.55;
  color: #ffd6e5;
  text-shadow: 0 0 10px rgba(255, 140, 170, 0.35);
  user-select: none;
}

.opening-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.opening-flank-paw {
  font-size: clamp(22px, 6vw, 30px);
  opacity: 0.5;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 180, 200, 0.45));
}

.opening.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-card {
  position: relative;
  z-index: 2;
  max-width: 460px;
  width: 100%;
  text-align: center;
  background: rgba(53, 33, 51, 0.78);
  border: 1px solid #7b4e67;
  border-radius: 18px;
  padding: 24px 18px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
}

.opening-title {
  font-size: 30px;
  color: #ffd99f;
  margin: 0;
  letter-spacing: 2px;
}

.opening-sub {
  margin: 10px 0 0;
  color: #e3c7d2;
  line-height: 1.7;
  font-size: 14px;
}

.open-btn {
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  background: linear-gradient(90deg, #cb4e62, #b73d51);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(177, 51, 76, 0.3);
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 14px 14px 38px;
  position: relative;
}

.wrap.hidden {
  opacity: 0;
  transform: translateY(16px);
}

.wrap.reveal {
  animation: revealWrap .8s ease forwards;
}

@keyframes revealWrap {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.8), transparent 35%),
    linear-gradient(140deg, #ffdbe8 0%, #ffcfe0 45%, #fbc7da 100%);
  border-radius: 22px;
  padding: 26px 16px 22px;
  text-align: center;
  box-shadow: 0 14px 34px rgba(196, 62, 104, 0.24);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent);
  border: 1px solid #ffd4df;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

h1 {
  margin: 14px 0 6px;
  font-size: 31px;
  line-height: 1.25;
  color: #8f3345;
}

.subtitle {
  margin: 0;
  color: #92545d;
  font-size: 14px;
}

.music-btn {
  margin-top: 14px;
  border: 1px solid #efafc3;
  background: linear-gradient(180deg, #fff, #fff8fb);
  color: #9f3f5a;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(196, 62, 104, 0.14);
}

.hero::before,
.hero::after {
  content: "❤";
  position: absolute;
  font-size: 20px;
  opacity: 0.25;
  color: #c5475b;
}

.hero::before { top: 12px; left: 14px; }
.hero::after { right: 14px; bottom: 12px; }

.slider {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #f1ccda;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #fbe8ed;
  box-shadow: 0 10px 24px rgba(130, 72, 99, 0.14);
}

.slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 10px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
  font-size: 13px;
  font-weight: 600;
}

/* 竖图在手机上的安全裁切：按人物主体调整焦点位置 */
.slide.focus-top { background-position: center 22%; }
.slide.focus-mid { background-position: center 40%; }
.slide.focus-low { background-position: center 56%; }
.slide.focus-couple { background-position: center 48%; }
/* 最后一张竖图：略下移裁切锚点，让人物更靠画面中间 */
.slide.focus-sunset-end { background-position: center 54%; }
.slide.no-crop {
  position: relative;
  isolation: isolate;
  background: none;
}

/* 无裁切图：两侧模糊补边 + 中间完整原图 */
.slide.no-crop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--slide-url);
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(0.95);
  opacity: 0.62;
  z-index: -2;
  transform: scale(1.08);
  pointer-events: none;
}

.slide.no-crop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--slide-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  z-index: -1;
  pointer-events: none;
}

.slide.show { opacity: 1; }

.dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.dot.active { background: #fff; }

.card {
  margin-top: 12px;
  background: var(--card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 22px rgba(124, 70, 95, 0.1);
}

.title {
  margin: 0 0 10px;
  font-size: 17px;
  color: #913454;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 标题两侧：简洁大气渐变线（无猫爪） */
.title::before,
.title::after {
  content: "";
  height: 1px;
  flex: 1;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(145, 52, 84, 0.08) 22%,
    rgba(201, 63, 104, 0.42) 50%,
    rgba(145, 52, 84, 0.08) 78%,
    transparent 100%
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.cat-nest {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #efbfd0;
  text-align: center;
}

.cat-nest-badge {
  display: inline-block;
  font-size: 22px;
  letter-spacing: 0.35em;
  margin-bottom: 6px;
  opacity: 0.55;
}

.cat-nest h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #8f3345;
  letter-spacing: 0.2em;
}

.cat-nest-desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: #8a6670;
  line-height: 1.65;
}

.cat-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.cat-photo-slot {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px dashed #e8b8c8;
  background: linear-gradient(145deg, #fff9fc, #ffeef4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: #a87888;
  overflow: hidden;
}

.cat-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cat-photo-slot .paw-mini {
  font-size: 18px;
  opacity: 0.5;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cell {
  border: 1px dashed var(--line);
  background: #fffafb;
  border-radius: 12px;
  padding: 10px;
}

.k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.v {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: #704248;
}

.address-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.address-row .v {
  margin: 0;
}

.date-time-inline {
  margin-left: 0.35em;
  font-weight: 700;
  color: #8a5a68;
}

.venue-street {
  margin-bottom: 8px;
}

.inline-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.countdown {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.count-item {
  flex: 1;
  text-align: center;
  background: linear-gradient(180deg, #ffecf3, #ffe4ee);
  border: 1px solid #f8cad9;
  border-radius: 10px;
  padding: 9px 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.count-item .n {
  font-size: 21px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.count-item .t {
  margin-top: 3px;
  font-size: 11px;
  color: #a95f70;
}

.quote {
  background: linear-gradient(180deg, #fff8fb, #fff2f7);
  border: 1px dashed #efbfd0;
  border-radius: 12px;
  padding: 12px;
  color: #7e575d;
  line-height: 1.7;
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 8px;
}

.tl-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: start;
}

.time {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.event {
  border-left: 2px solid #ffd1dc;
  padding-left: 10px;
  color: #735255;
}

.btns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

button, .link-btn {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 11px 10px;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.primary {
  background: linear-gradient(135deg, #d54872, #b7355e);
  color: #fff;
  box-shadow: 0 6px 14px rgba(184, 45, 88, 0.24);
}

.primary.link-btn {
  display: inline-block;
}

.ghost {
  background: linear-gradient(180deg, #fff, #fff8fb);
  border: 1px solid #f1bfd0;
  color: #a44862;
}

.danger {
  background: linear-gradient(135deg, #df355f, #c62c54);
  color: #fff;
  box-shadow: 0 6px 14px rgba(216, 59, 83, 0.3);
}

.petal {
  position: fixed;
  top: -20px;
  width: 14px;
  height: 10px;
  background: rgba(219, 119, 140, 0.34);
  border-radius: 12px 12px 12px 2px;
  transform: rotate(20deg);
  pointer-events: none;
  animation: fall linear forwards;
  z-index: 4;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0.2;
  }
}

.note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.wechat-safe-tip {
  margin-top: 12px;
  border: 1px dashed #efbfd0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff8fb;
  color: #8b6771;
  font-size: 12px;
  line-height: 1.5;
}

.float-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(77, 31, 46, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 60;
}

.float-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.rsvp-desc {
  margin: 0;
  color: #79575c;
  font-size: 13px;
  white-space: nowrap;
}

.tips-list {
  margin: 0;
  padding-left: 18px;
  color: #735255;
  line-height: 1.7;
  font-size: 14px;
}

.footer {
  text-align: center;
  margin-top: 14px;
  color: #b0888d;
  font-size: 12px;
}

@media (max-width: 440px) {
  h1 { font-size: 27px; }
  .grid2 { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 70px 1fr; }
  .btns { flex-direction: column; }
  .address-row {
    grid-template-columns: 1fr auto;
  }
  .inline-nav-btn {
    padding: 6px 9px;
    font-size: 11px;
  }
}
  