/* ============================================================
   西式婚礼邀请函 · 香槟金 / 象牙白 / 浅玫瑰金主题
   ============================================================ */

:root {
  --ivory:      #fbf6ec;
  --silk:       #f3ead8;
  --champagne:  #e8c987;
  --gold:       #d4af37;
  --gold-deep:  #9c6b26;
  --gold-light: #f0d68a;
  --gold-pale:  #fff3d0;
  --rose-gold:  #e3b1a0;
  --rose-pink:  #e8c4c0;
  --blush:      #f7e4e0;
  --warm:       #fff0e2;
  --dark:       #2a2218;
  --dark-soft:  #3a2e22;

  --font-serif: "Cinzel","Playfair Display","Cormorant Garamond","Bodoni MT",Georgia,"Times New Roman","Noto Serif SC","Source Han Serif SC","Songti SC",serif;
  --font-body: "Playfair Display",Georgia,"Times New Roman","Noto Serif SC","Source Han Serif SC","Songti SC","STSong","SimSun",serif;
  --font-hand: "Segoe Script","Brush Script MT","Lucida Handwriting","Snell Roundhand","KaiTi","STKaiti","楷体",cursive;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #f7eede 0%, #e9d6c0 45%, #d9c8ac 100%);
  color: var(--dark);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
}

#world-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 42%, rgba(0,0,0,0) 56%, rgba(40,30,20,0.3) 100%),
    linear-gradient(to bottom, rgba(255,230,180,0.06), rgba(0,0,0,0) 22%);
}

#load-fallback {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem;
  background: var(--dark);
  color: var(--gold-light);
  text-align: center; padding: 2rem;
  font-size: 1rem; letter-spacing: .1em;
}
#load-fallback[hidden] { display: none; }
#load-retry {
  font-family: inherit; font-size: .95rem; letter-spacing: .25em;
  color: var(--gold-light); background: transparent;
  border: 1px solid var(--gold); border-radius: 2px;
  padding: .6rem 2rem; cursor: pointer;
  transition: background .3s, color .3s, box-shadow .3s;
}
#load-retry:hover { background: var(--gold); color: var(--dark); box-shadow: 0 0 18px rgba(212,175,55,.45); }

/* ================= 流金文字 ================= */
.gold-text {
  background: linear-gradient(100deg, #8a5a1e 0%, #d4af37 22%, #fff6d8 38%, #f0d68a 50%, #b8862f 64%, #f5d98b 80%, #8a5a1e 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: gold-flow 7s linear infinite;
}
@keyframes gold-flow { 0% { background-position: 0% 50%; } 100% { background-position: -220% 50%; } }

/* ================= 章节内容层 ================= */
#layers { position: fixed; inset: 0; z-index: 3; pointer-events: none; }

.invite-section {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 1.2rem) 1.4rem calc(env(safe-area-inset-bottom) + 3.4rem);
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
}
.invite-section.active { opacity: 1; pointer-events: auto; }
.invite-section.active .text-card,
.invite-section.active .invite-card {
  animation: card-in 1.1s cubic-bezier(.22,.8,.26,1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(2.2rem); }
  to { opacity: 1; transform: translateY(0); }
}

.invite-section.align-left { justify-content: flex-start; padding-left: max(4vw, 3.2rem); }
.invite-section.align-right { justify-content: flex-end; padding-right: max(4vw, 3.2rem); }

.text-card {
  max-width: 32rem;
  text-align: center;
  pointer-events: auto;
  /* 毛玻璃底板：衬托文字，增强可读性与高级感 */
  padding: clamp(1.4rem, 4.5vw, 2.6rem) clamp(1.3rem, 5vw, 3rem);
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,246,216,.5), rgba(251,246,236,.32) 55%, rgba(243,234,216,.18));
  border: 1px solid rgba(212,175,55,.28);
  box-shadow:
    0 18px 60px rgba(60,44,24,.22),
    inset 0 0 42px rgba(255,246,216,.35);
  backdrop-filter: blur(7px) saturate(1.08);
  -webkit-backdrop-filter: blur(7px) saturate(1.08);
}
.align-left .text-card { text-align: left; }
.align-right .text-card { text-align: right; }

.kicker {
  font-family: var(--font-serif);
  font-size: .82rem;
  letter-spacing: .42em;
  text-indent: .42em;
  color: var(--gold-deep);
  opacity: .85;
  margin-bottom: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---------- 逐字淡入上浮 ---------- */
.fade-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(.5em);
}
.in .fade-char {
  animation: char-in .55s cubic-bezier(.3,.8,.3,1) both;
  animation-delay: calc(var(--i) * 50ms);
}
@keyframes char-in {
  0% { opacity: 0; transform: translateY(.5em) scale(1.06); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 新人姓名 ---------- */
.names {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(.6rem, 3vw, 1.8rem);
  margin: .4rem 0 1.2rem;
  font-family: var(--font-serif);
}
.names .name {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-style: italic;
  font-weight: 800;
  background: linear-gradient(120deg, #9c6b26, #d4af37 40%, #fff6d8 55%, #d4af37 70%, #8a5a1e);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px rgba(90,60,20,.35)) drop-shadow(0 0 22px rgba(240,214,138,.75));
  animation: gold-flow 7s linear infinite;
}
.name-amp {
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--rose-gold);
  text-shadow: 0 0 14px rgba(227,177,160,.6), 0 0 4px var(--gold);
  animation: amp-pulse 3.2s ease-in-out infinite;
}
@keyframes amp-pulse { 0%,100% { opacity:.75; transform:scale(1); } 50% { opacity:1; transform:scale(1.1); } }

.date-roman {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  letter-spacing: .3em;
  color: var(--gold-deep);
  margin-top: .6rem;
}

/* ---------- 标题 ---------- */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-style: italic;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #9c6b26, #d4af37 40%, #fff6d8 55%, #d4af37 70%, #8a5a1e);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px rgba(90,60,20,.3)) drop-shadow(0 0 18px rgba(240,214,138,.6));
  animation: gold-flow 7s linear infinite;
}

/* ---------- 正文 ---------- */
.body-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  color: var(--dark-soft);
  line-height: 2;
  letter-spacing: .06em;
  white-space: pre-line;
  text-shadow: 0 1px 2px rgba(255,248,230,.75), 0 0 10px rgba(255,240,210,.35);
}
.sub-text {
  font-size: clamp(.92rem, 2.4vw, 1.08rem);
  color: rgba(58,46,34,.78);
  margin-top: .9rem;
  letter-spacing: .04em;
  text-shadow: 0 1px 2px rgba(255,248,230,.7);
}
.info-label, .rsvp-field label, .kicker {
  text-shadow: 0 1px 2px rgba(255,248,230,.6);
}

/* ---------- 金边卡片 ---------- */
.gold-frame {
  position: relative;
  border: 1px solid rgba(212,175,55,.55);
  background: linear-gradient(160deg, rgba(251,246,236,.92), rgba(243,234,216,.88));
  box-shadow: 0 0 0 1px rgba(40,34,24,.3), 0 18px 60px rgba(40,34,24,.25), inset 0 0 38px rgba(212,175,55,.08);
  backdrop-filter: blur(3px);
}
.gold-frame::before {
  content: "";
  position: absolute; inset: 5px;
  border: 1px solid rgba(212,175,55,.35);
  pointer-events: none;
}
.card-corner {
  position: absolute; width: 26px; height: 26px;
  pointer-events: none; opacity: .9;
}
.card-corner::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat;
  color: var(--gold);
}
.card-corner::after {
  content: ""; position: absolute; width: 7px; height: 7px;
  background: var(--rose-gold); transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(227,177,160,.8);
}
.card-corner.tl { top: -7px; left: -7px; }
.card-corner.tr { top: -7px; right: -7px; transform: scaleX(-1); }
.card-corner.bl { bottom: -7px; left: -7px; transform: scaleY(-1); }
.card-corner.br { bottom: -7px; right: -7px; transform: scale(-1); }
.card-corner.tl::after, .card-corner.tr::after { top: 2px; left: 2px; }
.card-corner.bl::after, .card-corner.br::after { bottom: 2px; left: 2px; }

.invite-card {
  padding: clamp(1.8rem, 5vw, 3rem) clamp(1.6rem, 6vw, 3.6rem);
  border-radius: 4px;
  text-align: center;
  max-width: 34rem;
  color: var(--dark);
}
.invite-card .kicker { font-size: 1.05rem; letter-spacing: .8em; text-indent: .8em; margin-bottom: .6rem; }

.info-card { max-width: 30rem; padding: clamp(1.6rem, 4.5vw, 2.6rem); }
.info-list { list-style: none; margin-top: 1.4rem; text-align: left; }
.info-list li {
  display: flex; align-items: baseline; gap: 1.2rem;
  padding: .6rem 0;
  border-bottom: 1px dashed rgba(212,175,55,.28);
}
.info-list li:last-child { border-bottom: none; }
.info-label {
  flex: 0 0 4em;
  color: var(--gold-deep);
  font-size: .9rem;
  letter-spacing: .2em;
  text-indent: .2em;
  font-weight: 700;
  text-transform: uppercase;
}
.info-list .sub-text { margin-top: 0; text-align: left; }

.media-hint {
  margin-top: 1.3rem;
  font-size: .82rem;
  letter-spacing: .18em;
  color: rgba(156,107,38,.7);
}

/* ---------- 封面 ---------- */
#open-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 6rem);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4.6vw, 1.95rem); /* 放大约 1.5 倍 */
  font-weight: 700;
  letter-spacing: .38em;
  text-indent: .38em;
  color: var(--gold-deep);
  text-shadow:
    0 1px 1px rgba(255,246,216,.7),
    0 0 26px rgba(240,214,138,.85),
    0 0 8px rgba(212,175,55,.6);
  animation: hint-breathe 2.4s ease-in-out infinite;
}
@keyframes hint-breathe {
  0%,100% { opacity:.45; transform: scale(.96); text-shadow: 0 0 10px rgba(240,214,138,.4); }
  50%     { opacity:1;   transform: scale(1.06); text-shadow: 0 1px 1px rgba(255,246,216,.8), 0 0 34px rgba(240,214,138,.95), 0 0 12px rgba(212,175,55,.7); }
}

/* ---------- 结尾 ---------- */
.ending-names {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 9vw, 4rem);
  font-style: italic;
  background: linear-gradient(120deg, #9c6b26, #d4af37 40%, #fff6d8 55%, #d4af37 70%, #8a5a1e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(212,175,55,.45));
  margin-bottom: .4rem;
}
.ending-thanks {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: .3em;
  color: var(--gold-deep);
}
.signature {
  margin-top: 1.6rem;
  font-size: 1.05rem;
  letter-spacing: .25em;
  color: var(--gold-deep);
  font-family: var(--font-serif);
}

/* data-animate 通用淡入 */
.invite-section [data-animate] {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity .9s ease .25s, transform .9s cubic-bezier(.22,.8,.26,1) .25s;
}
.invite-section.in [data-animate], .invite-section.active [data-animate] { opacity: 1; transform: none; }

/* ================= 按钮 ================= */
.icon-btn {
  width: 2.7rem; height: 2.7rem;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,.6);
  background: linear-gradient(160deg, rgba(251,246,236,.9), rgba(233,214,192,.95));
  color: var(--gold-deep);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(40,34,24,.2), inset 0 0 12px rgba(212,175,55,.12);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden;
}
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.icon-btn:active { transform: scale(.92); }
.icon-btn.tiny { width: 2.3rem; height: 2.3rem; background: rgba(243,234,216,.85); }

.chip-btn {
  font-family: var(--font-serif);
  font-size: .92rem;
  letter-spacing: .2em;
  text-indent: .2em;
  color: var(--gold-deep);
  background: linear-gradient(160deg, rgba(251,246,236,.92), rgba(233,214,192,.95));
  border: 1px solid rgba(212,175,55,.65);
  border-radius: 999px;
  padding: .62rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(40,34,24,.2), inset 0 0 14px rgba(212,175,55,.1);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden;
}
.chip-btn:active { transform: scale(.95); }
.chip-btn.accent {
  color: var(--dark);
  background: linear-gradient(160deg, #f5d98b, #d4af37 55%, #b8862f);
  border-color: #f0d68a;
  font-weight: 700;
}
.chip-btn.outline { background: transparent; }

/* 涟漪 */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(245,217,139,.35);
  transform: scale(0); pointer-events: none;
  animation: ripple-anim .6s ease-out forwards;
}
@keyframes ripple-anim { to { transform: scale(2.4); opacity: 0; } }

/* ================= HUD ================= */
.hud {
  position: fixed;
  top: calc(env(safe-area-inset-top) + .9rem);
  right: calc(env(safe-area-inset-right) + .9rem);
  z-index: 20;
  display: flex; flex-direction: column; gap: .65rem;
  align-items: center;
}
.music-main .music-ring {
  position: absolute; inset: -5px;
  border-radius: 50%;
  border: 1px dashed rgba(212,175,55,.55);
  animation: ring-spin 9s linear infinite;
}
.music-main.paused .music-ring { animation-play-state: paused; opacity: .4; }
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* ================= 导航圆点 ================= */
#nav-dots {
  position: fixed;
  right: calc(env(safe-area-inset-right) + .75rem);
  top: 50%; transform: translateY(-50%);
  z-index: 20;
  display: flex; flex-direction: column; gap: .9rem;
  align-items: flex-end;
  opacity: 0; transition: opacity .8s ease .4s;
}
body.opened #nav-dots { opacity: 1; }
.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(212,175,55,.15);
  cursor: pointer; padding: 0; position: relative;
  transition: background .3s ease, transform .3s ease;
}
.dot.active { background: var(--gold); box-shadow: 0 0 10px rgba(240,214,138,.8); transform: scale(1.25); }
.dot-label {
  position: absolute; right: 1.4rem; top: 50%; transform: translateY(-50%);
  font-size: .72rem; letter-spacing: .25em; color: var(--gold-deep);
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  background: rgba(251,246,236,.8); padding: .15rem .55rem; border-radius: 3px;
}
.dot:hover .dot-label, .dot.active .dot-label { opacity: .9; }

/* ================= 滚动提示 ================= */
#scroll-hint {
  position: fixed;
  left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1.3rem);
  transform: translateX(-50%);
  z-index: 15;
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
  color: var(--gold-deep);
  font-family: var(--font-serif);
  font-size: .78rem; letter-spacing: .35em; text-indent: .35em;
  opacity: .85;
  animation: hint-breathe 2.8s ease-in-out infinite;
  pointer-events: none;
}
#scroll-hint[hidden] { display: none; }
#scroll-hint svg { width: 1.1rem; height: 1.1rem; animation: hint-chevron 1.8s ease-in-out infinite; }
@keyframes hint-chevron { 0%,100% { transform: translateY(-2px); opacity:.6; } 50% { transform: translateY(3px); opacity:1; } }

/* ================= 灯箱 ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: 1.2rem;
  background: rgba(30,24,16,.88);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-frame {
  padding: .7rem; border-radius: 4px;
  max-width: min(92vw, 60vh);
  background: linear-gradient(160deg, rgba(251,246,236,.92), rgba(233,214,192,.95));
}
.lb-frame img {
  display: block; width: 100%; max-height: 74vh;
  object-fit: contain;
  border: 1px solid rgba(212,175,55,.3);
}
.lb-frame figcaption {
  text-align: center; margin-top: .55rem;
  font-size: .8rem; letter-spacing: .3em; text-indent: .3em;
  color: var(--gold-deep); font-family: var(--font-serif);
}
.lb-close { position: absolute; top: calc(env(safe-area-inset-top) + 1rem); right: 1.2rem; }

/* ================= 弹窗 ================= */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
  background: rgba(30,24,16,.72);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: min(92vw, 26rem);
  max-height: 86vh; overflow-y: auto;
  background: linear-gradient(165deg, #fbf6ec, #e9d6c0);
  border: 1px solid rgba(212,175,55,.6);
  border-radius: 6px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 24px 80px rgba(40,34,24,.3), inset 0 0 40px rgba(212,175,55,.07);
  transform: translateY(1.2rem) scale(.97);
  transition: transform .35s cubic-bezier(.22,.8,.26,1);
}
.modal.open .modal-card { transform: none; }
.modal-card h3 {
  font-family: var(--font-serif);
  color: var(--gold-deep);
  font-size: 1.5rem; letter-spacing: .15em;
  text-align: center; margin-bottom: .3rem;
}
.modal-tip { text-align: center; font-size: .75rem; color: rgba(156,107,38,.6); letter-spacing: .1em; margin-bottom: 1rem; }
.field-label { display: block; margin: .8rem 0 .3rem; font-size: .82rem; letter-spacing: .2em; color: var(--gold-deep); }
.text-input {
  width: 100%; font-family: var(--font-body); font-size: .98rem;
  color: var(--dark); background: rgba(251,246,236,.6);
  border: 1px solid rgba(212,175,55,.4); border-radius: 4px;
  padding: .6rem .8rem; outline: none; letter-spacing: .04em;
}
.text-input:focus { border-color: var(--gold-light); box-shadow: 0 0 0 2px rgba(212,175,55,.18); }
.text-input::placeholder { color: rgba(58,46,34,.35); }
textarea.text-input { resize: vertical; min-height: 6.4em; line-height: 1.75; }
.modal-actions { display: flex; justify-content: center; gap: .8rem; margin-top: 1.4rem; }

/* ================= RSVP 表单 ================= */
.rsvp-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.rsvp-field { display: flex; flex-direction: column; gap: .3rem; }
.rsvp-field label { font-size: .82rem; letter-spacing: .15em; color: var(--gold-deep); font-family: var(--font-serif); }
.rsvp-submit { position: relative; margin-top: .5rem; }
.rsvp-submit.submitted { pointer-events: none; }
.rsvp-submit.submitted::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 1.4rem; height: .7rem;
  border-left: 3px solid var(--dark); border-bottom: 3px solid var(--dark);
  transform: translate(-50%,-50%) rotate(-45deg) scale(0);
  animation: check-draw .5s ease forwards .15s;
}
@keyframes check-draw { to { transform: translate(-50%,-50%) rotate(-45deg) scale(1); } }

/* ================= 地图浮层 ================= */
.map-overlay {
  position: fixed; inset: 0; z-index: 55;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(30,24,16,.82);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.map-overlay.open { opacity: 1; pointer-events: auto; }
.map-card {
  width: min(92vw, 30rem);
  background: linear-gradient(165deg, #fbf6ec, #e9d6c0);
  border: 1px solid rgba(212,175,55,.6);
  border-radius: 8px; padding: 1.2rem;
  box-shadow: 0 24px 80px rgba(40,34,24,.3);
}
.map-card h3 { font-family: var(--font-serif); color: var(--gold-deep); text-align: center; margin-bottom: .8rem; }
.map-card img { width: 100%; border-radius: 4px; border: 1px solid rgba(212,175,55,.3); }
.map-address { text-align: center; margin-top: .8rem; font-size: .88rem; color: var(--dark-soft); line-height: 1.6; }
.map-close { position: absolute; top: calc(env(safe-area-inset-top) + 1rem); right: 1.2rem; }

/* ================= Toast ================= */
#toast-wrap {
  position: fixed; left: 50%; top: 18%;
  transform: translateX(-50%); z-index: 80;
  display: flex; flex-direction: column; gap: .5rem; align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(251,246,236,.95);
  border: 1px solid rgba(212,175,55,.5);
  color: var(--gold-deep);
  font-size: .88rem; letter-spacing: .12em;
  padding: .6rem 1.3rem; border-radius: 999px;
  box-shadow: 0 10px 30px rgba(40,34,24,.2);
  animation: toast-in .35s ease both;
}
.toast.out { animation: toast-out .4s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-.6rem); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-.6rem); } }

/* ================= 响应式 ================= */
@media (max-width: 760px) {
  .invite-section { padding-left: 1.1rem; padding-right: 1.1rem; }
  .invite-section.align-left, .invite-section.align-right {
    justify-content: center; align-items: flex-end;
    padding-bottom: calc(env(safe-area-inset-bottom) + 4.6rem);
    padding-left: 1.1rem; padding-right: 1.1rem;
  }
  .align-left .text-card, .align-right .text-card { text-align: center; }
  .text-card { max-width: 24rem; }
  .media-hint { display: none; }
  #nav-dots {
    top: auto; bottom: calc(env(safe-area-inset-bottom) + .55rem);
    left: 50%; right: auto; transform: translateX(-50%);
    flex-direction: row; gap: 1.1rem; align-items: center;
  }
  .dot-label { display: none; }
  .hud { right: .7rem; top: calc(env(safe-area-inset-top) + .7rem); gap: .5rem; }
  .icon-btn { width: 2.4rem; height: 2.4rem; }
  .info-list li { gap: .8rem; }
  .info-label { flex: 0 0 3em; font-size: .82rem; }
}
@media (min-width: 1100px) {
  .text-card { max-width: 32rem; }
  .invite-card { max-width: 38rem; }
}

/* ============================================================
   顶部祝福飘屏（弹幕）
   ============================================================ */
.danmaku-layer {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 30vh;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.danmaku-row {
  position: absolute;
  left: 0; right: 0;
  height: 2.2rem;
  overflow: hidden;
}
.danmaku-item {
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  font-size: clamp(1.05rem, 3.4vw, 1.5rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: .03em;
  line-height: 2.2rem;
  padding: .1rem .35rem;
  text-shadow:
    0 1px 2px rgba(255,246,216,.85),
    0 0 14px rgba(240,214,138,.45);
  will-change: transform, opacity;
}

/* ============================================================
   画廊章节：无遮罩卡片 · 顶部精致小标签 + 底部小字幕
   ============================================================ */
body.on-ring #scroll-hint { display: none; }  /* 圆环章节用专属底部字幕，避免重复 */

.gallery-section { pointer-events: none; }

.gallery-top-label {
  position: absolute;
  top: calc(env(safe-area-inset-top) + .9rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: 12px;                 /* 极小标识，不超过 12px */
  font-weight: 200;                /* 极细 */
  letter-spacing: .32em;
  text-indent: .32em;
  color: rgba(214,186,120,.55);    /* 淡金，半透明 */
  opacity: .5;
  text-shadow: none;
  pointer-events: none;
}

.gallery-bottom-hint {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 1.2rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: .18rem;
  font-family: var(--font-serif);
  text-align: center;
  pointer-events: none;
  opacity: .55;                    /* 极淡，不抢照片风头 */
}
.gallery-bottom-hint span {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 200;
  letter-spacing: .22em;
  text-indent: .22em;
  color: rgba(160,140,105,.7);
  text-shadow: none;
}
.gallery-bottom-hint .hint-arrow {
  width: .9rem; height: .9rem;
  color: rgba(160,140,105,.6);
  animation: hint-chevron 2.2s ease-in-out infinite;
}

@media (max-width: 640px) {
  .gallery-top-label { top: calc(env(safe-area-inset-top) + .7rem); }
  .gallery-bottom-hint { bottom: calc(env(safe-area-inset-bottom) + .9rem); }
}
/* data-animate 淡入结束会 transform:none / opacity:1，需保持标签居中和极低存在感 */
.gallery-section.active .gallery-top-label,
.gallery-section.in .gallery-top-label { transform: translateX(-50%); opacity: .5; }
.gallery-section.active .gallery-bottom-hint,
.gallery-section.in .gallery-bottom-hint { transform: translateX(-50%); opacity: .55; }
