/* 婚礼请柬 — 手机视口壳 + 左右平移封面 */

:root {
  --void: #0c0a0f;
  --void-mid: #141018;
  /* 请柬主色 */
  --invite-primary: #4a0105;
  --wine-deep: #4a0105;
  --wine: #6e1218;
  --crimson: #8f242e;
  --envelope-rose: #b3525a;
  --champagne: #f7f3eb;
  --ivory: #fffcf9;
  --paper: #faf6f0;
  --gold: #b8956c;
  --gold-dim: rgba(184, 149, 108, 0.45);
  --ink: #2a2224;
  --ink-muted: rgba(42, 34, 36, 0.68);
  --seal-size: clamp(5.35rem, 21vw, 8rem);
  /* 直角：避免左右封面平移时被圆角 overflow 裁出缺口 */
  --radius-card: 0;
  --radius-soft: 0.875rem;
  --radius-pill: 999px;
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-header-en: "Cormorant Garamond", "Noto Serif SC", "Times New Roman", serif;
  --font-our-wedding: "Playfair Display", "Noto Serif SC", "Times New Roman", serif;
  --font-kicker: "Ma Shan Zheng", "KaiTi", "STKaiti", serif;
  --shadow-elevated:
    0 0 0 1px rgba(74, 1, 5, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.15),
    0 20px 50px -12px rgba(0, 0, 0, 0.55),
    0 28px 56px -16px rgba(0, 0, 0, 0.38);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --seal-fade-ms: 0.2s;
  --cover-slide-ms: 0.52s;
  /* 提示叠在封面底部内侧，与底边留白 */
  --hint-below-gap: 0.85rem;
  /* PC：请柬区域不要纵向撑满屏 */
  --shell-max-height-desktop: 800px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  font-family: var(--font-sans);
  color: var(--champagne);
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(74, 1, 5, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 110% 40%, rgba(184, 149, 108, 0.08), transparent 50%),
    radial-gradient(ellipse 55% 45% at -15% 85%, rgba(74, 1, 5, 0.22), transparent 45%),
    linear-gradient(180deg, var(--void-mid) 0%, var(--void) 40%, #08060a 100%);
  overflow-x: hidden;
  overflow-y: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(184, 149, 108, 0.12);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.04), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255, 255, 255, 0.03), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(255, 255, 255, 0.025), transparent);
  background-size: 120px 120px, 180px 180px, 200px 200px;
  z-index: 0;
  opacity: 0.7;
}

/* ========== 手机宽度壳 + 全高请柬 ========== */
.viewport-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* 顶/左右随刘海；底边不留白，请柬背景延至屏幕底（含手势条背后） */
  padding: var(--safe-top) var(--safe-right) 0 var(--safe-left);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    min-height: 100svh;
  }

  .viewport-shell {
    min-height: 0;
    flex: 0 0 auto;
    height: min(88dvh, var(--shell-max-height-desktop));
    max-height: min(88dvh, var(--shell-max-height-desktop));
  }
}

.invite-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  background: var(--invite-primary);
  isolation: isolate;
}

.invite-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

.invite-content {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: var(--radius-card);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(255, 255, 255, 0.65) 0%, transparent 50%),
    linear-gradient(168deg, var(--ivory) 0%, var(--paper) 42%, #ebe3d8 100%);
  color: var(--ink);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65), inset 0 0 60px rgba(184, 149, 108, 0.06);
}

.invite-content__scroll {
  --inner-pad: clamp(1.15rem, 4.5vw, 1.5rem);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  /* 左右不留白：头图可真正贴齐内页两侧；侧栏距交给子元素 */
  padding: 0;
  padding-bottom: calc(2rem + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.invite-content__scroll > *:not(.invite-header) {
  padding-left: var(--inner-pad);
  padding-right: var(--inner-pad);
}

.invite-content__scroll::-webkit-scrollbar {
  width: 3px;
}

.invite-content__scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-dim), transparent);
  border-radius: var(--radius-pill);
}

/* ========== 左右封面（平移）：纯色布面 + 左盖右缘投影 ========== */
.cover {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: var(--radius-card);
  pointer-events: none;
  transition: transform var(--cover-slide-ms) cubic-bezier(0.34, 1, 0.32, 1), opacity 0.2s ease;
  background: var(--invite-primary);
  /* 极淡顶边高光，略像布面 */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.cover--left {
  left: 0;
  width: 70%;
  z-index: 3;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  transform: translateX(0);
  /* 右缘窄阴影叠在右盖上，做出折页层次（参考实物） */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    4px 0 10px rgba(0, 0, 0, 0.22),
    7px 0 18px rgba(0, 0, 0, 0.14);
}

.cover--right {
  right: 0;
  width: 30%;
  z-index: 2;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  transform: translateX(0);
}

.invite-stage.is-open .cover--left {
  transform: translateX(-100%);
  /* 移出后去掉右缘外阴影，避免叠在内页左侧像一条脏边 */
  box-shadow: none;
}

.invite-stage.is-open .cover--right {
  transform: translateX(100%);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .cover {
    transition-duration: 0.01ms;
  }

  .invite-stage.is-open .cover--left,
  .invite-stage.is-open .cover--right {
    transform: none;
    opacity: 0;
    box-shadow: none;
  }
}

/* ========== 火漆 ========== */
.seal-btn {
  position: absolute;
  left: 70%;
  top: 60%;
  z-index: 4;
  width: var(--seal-size);
  height: var(--seal-size);
  min-width: 4.25rem;
  min-height: 4.25rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: opacity var(--seal-fade-ms) ease, transform 0.2s ease;
}

/* 开启态或合上动画期间：火漆隐藏，避免合上瞬间闪一下 */
.invite-stage.is-open .seal-btn,
.invite-stage.seal-off .seal-btn {
  opacity: 0;
  pointer-events: none;
}

.seal-btn__plate {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* drop-shadow 已关，便于看抠图是否干净；要恢复见 hover/active 旁注释 */
  transition: filter 0.2s ease;
}

.seal-btn__plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.seal-btn:hover .seal-btn__plate,
.seal-btn:focus-visible .seal-btn__plate {
  filter: brightness(1.05);
}

.seal-btn:hover,
.seal-btn:focus-visible {
  transform: translate(-50%, -50%) scale(1.04);
  outline: none;
}

.seal-btn:focus-visible {
  outline: 2px solid rgba(212, 184, 150, 0.85);
  outline-offset: 6px;
  border-radius: 50%;
}

.seal-btn:active {
  transform: translate(-50%, -48%) scale(0.97);
}

.seal-btn:active .seal-btn__plate {
  filter: brightness(0.96);
}

/* 叠在封面上（非文档流上下排列），低于火漆层级以免挡点击 */
.hint-below {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--hint-below-gap) + var(--safe-bottom));
  margin: 0;
  padding: 0.25rem 0.65rem;
  text-align: center;
  font-size: clamp(0.75rem, 2.6vw, 0.8125rem);
  color: rgba(247, 243, 235, 0.62);
  letter-spacing: 0.12em;
  font-weight: 500;
  line-height: 1.45;
  pointer-events: none;
  z-index: 3;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.65);
  transition: opacity var(--seal-fade-ms) ease, visibility 0s linear var(--seal-fade-ms);
}

.hint-below.hint-below--off {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--seal-fade-ms) ease, visibility 0s linear var(--seal-fade-ms);
}

/* ========== 内页头部（主视觉图 + 杂志风标题栈） ========== */
.invite-header {
  width: 100%;
  max-width: none;
  margin: 0 0 1.15rem;
  min-height: min(100svh, 100dvh);
  display: flex;
  flex-direction: column;
}

.invite-header__hero {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  background: transparent;
  overflow: visible;
}

/* 中文 + 英文主标题（与头图上下分开） */
.invite-header__hero-preface {
  flex-shrink: 0;
  padding: clamp(1.05rem, 4.2vw, 1.75rem) var(--inner-pad) clamp(0.85rem, 3.2vw, 1.25rem);
  text-align: center;
  line-height: normal;
}

/* 头图容器：两行引用整体叠在照片上缘，与图略有交叠 */
.invite-header__hero-visual {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 背景图主视觉：部分环境下可减弱长按存图菜单（非绝对防护） */
.invite-header__hero-bg {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 1440 / 1500;
  background-image: url("../assets/header.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.invite-header__text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.95rem, 3.8vw, 1.65rem);
  text-align: center;
  padding: clamp(1.45rem, 5.5vw, 2.65rem) var(--inner-pad) clamp(1.25rem, 4.5vw, 2.35rem);
}

.invite-header__kicker {
  font-family: var(--font-kicker);
  font-size: clamp(1.95rem, 8.2vw, 3rem);
  color: var(--wine);
  margin: 0 0 clamp(1.05rem, 4.5vw, 1.75rem);
  letter-spacing: 0.12em;
  font-weight: 400;
}

.invite-header__en {
  font-family: var(--font-our-wedding);
  font-size: clamp(1.72rem, 6.8vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  margin: 0 0 clamp(1.05rem, 4.2vw, 1.85rem);
  text-transform: uppercase;
  line-height: 1.15;
  background: linear-gradient(120deg, #c4a35a 0%, #f0e6c8 38%, #b8944a 72%, #d4bc7a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.invite-header__hero-visual .invite-header__quote {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  transform: translate(-50%, -42%);
  width: min(22rem, calc(100% - 2 * var(--inner-pad)));
  margin: 0;
  text-align: center;
  font-family: var(--font-header-en);
  font-size: clamp(0.72rem, 2.4vw, 0.8125rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: 0.02em;
  color: rgba(42, 34, 36, 0.52);
  pointer-events: none;
}

.invite-header__couple {
  width: min(100%, 22rem);
  margin: 0 auto;
}

.invite-header__title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(0.45rem, 2.8vw, 0.75rem);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5.6vw, 2.1rem);
  font-weight: 600;
  margin: 0 0 clamp(0.65rem, 2.8vw, 1.15rem);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.invite-header__name--groom {
  text-align: right;
}

.invite-header__name--bride {
  text-align: left;
}

.invite-header__heart {
  flex-shrink: 0;
  font-size: 0.72em;
  line-height: 1;
  color: var(--crimson);
  text-shadow: 0 0 12px rgba(184, 149, 108, 0.35);
}

.invite-header__roles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(0.45rem, 2.8vw, 0.75rem);
  margin: 0;
  width: 100%;
}

.invite-header__roles-gap {
  width: clamp(2rem, 6.5vw, 3rem);
}

.invite-header__role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  font-family: var(--font-header-en);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #b8944a;
}

.invite-header__role--groom {
  justify-self: end;
  text-align: center;
}

.invite-header__role--bride {
  justify-self: start;
  text-align: center;
}

.invite-header__role-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--ink-muted);
  text-transform: none;
}

.invite-header__motto {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  margin: 0;
  letter-spacing: 0.08em;
  line-height: 1.85;
  max-width: 22rem;
}

.invite-header__blurb {
  font-size: 0.875rem;
  line-height: 1.88;
  color: var(--ink-muted);
  margin: 0;
  letter-spacing: 0.04em;
  max-width: 26rem;
}

.invite-header__blurb:last-of-type {
  margin-bottom: 0;
}

.divider-floral {
  height: 1.35rem;
  margin: 0.35rem auto 1.15rem;
  display: block;
  opacity: 0.95;
}

.divider-floral__stem {
  stroke: var(--gold);
}

.divider-floral__gem {
  stroke: var(--crimson);
  opacity: 0.85;
}

.divider-floral__fade {
  stroke: var(--ink);
  opacity: 0.18;
}

.section {
  margin-bottom: 1.5rem;
}

.section h2 {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(1.5rem, 5.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--wine);
  margin: 0 0 0.65rem;
  padding-bottom: 0.45rem;
  text-align: center;
  position: relative;
}

.section h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 2px;
  margin: 0.4rem auto 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.85;
}

.venue-welcome {
  position: relative;
  margin: 0 calc(-1 * var(--inner-pad)) 0.9rem;
  width: calc(100% + 2 * var(--inner-pad));
  aspect-ratio: 1440 / 1358;
  border-radius: 0;
  overflow: hidden;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.venue-welcome__bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/welcome.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.section__date-lead {
  text-align: center;
}

.section p,
.section li {
  font-size: 0.875rem;
  line-height: 1.72;
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.45rem;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-soft);
  border: 1px solid rgba(184, 149, 108, 0.14);
  box-shadow: 0 1px 2px rgba(42, 34, 36, 0.04);
}

.timeline li:last-child {
  margin-bottom: 0;
}

.timeline time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--wine);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.photo-carousel {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.photo-carousel__viewport {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-soft);
  background: linear-gradient(145deg, #ebe4dc 0%, #d8cfc4 50%, #cbc0b2 100%);
  border: 1px solid rgba(184, 149, 108, 0.15);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.photo-carousel__scroller {
  display: flex;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  outline: none;
}

.photo-carousel__scroller::-webkit-scrollbar {
  display: none;
}

.photo-carousel__slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.photo-carousel__media {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.photo-carousel__media--1 {
  background-image: url("../assets/photo1.webp");
}

.photo-carousel__media--2 {
  background-image: url("../assets/photo2.webp");
}

.photo-carousel__media--3 {
  background-image: url("../assets/photo3.webp");
}

.photo-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.photo-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(184, 149, 108, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.photo-carousel__dot.is-active {
  background: var(--wine);
  transform: scale(1.2);
}

.photo-carousel__dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .photo-carousel__scroller {
    scroll-behavior: auto;
  }
}

.address-block {
  font-size: 0.8125rem;
  line-height: 1.65;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-soft);
  border: 1px solid rgba(184, 149, 108, 0.2);
  box-shadow: 0 2px 12px rgba(42, 34, 36, 0.04);
  color: var(--ink-muted);
}

.address-block strong {
  color: var(--ink);
  font-weight: 600;
}

/* 地图 + 玻璃导航钮 */
.map-embed-wrap {
  position: relative;
  margin-top: 0.75rem;
  border-radius: calc(var(--radius-soft) + 2px);
  overflow: hidden;
  border: 1px solid rgba(184, 149, 108, 0.22);
  background: linear-gradient(180deg, #e8e2da 0%, #ddd6cc 100%);
  box-shadow: 0 4px 20px rgba(42, 34, 36, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  /* 整块不拦截触摸，纵向滑动交给外层 .invite-content__scroll，避免高德吃掉滚动手势 */
  pointer-events: none;
}

.map-nav-fab {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 50;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  min-height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--wine);
  background: rgba(255, 252, 247, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 24px rgba(74, 1, 5, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.08);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-nav-fab:hover,
.map-nav-fab:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 1) inset,
    0 12px 32px rgba(74, 1, 5, 0.38),
    0 4px 12px rgba(0, 0, 0, 0.1);
  outline: none;
}

.map-nav-fab:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.map-nav-fab:active {
  transform: translateY(0) scale(0.98);
}

.map-nav-fab__icon {
  display: flex;
  line-height: 0;
  color: var(--crimson);
}

.map-nav-fab__icon svg {
  display: block;
}

.map-nav-root[hidden] {
  display: none !important;
}

.map-nav-root:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.map-nav-root__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(12, 10, 15, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.map-nav-root__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  max-height: min(72vh, 24rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 max(0.5rem, var(--safe-bottom));
  background: rgba(255, 252, 247, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  animation: mapNavPanelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mapNavPanelIn {
  from {
    transform: translateY(100%);
    opacity: 0.9;
  }

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

.map-nav-root__handle {
  width: 2.5rem;
  height: 0.3rem;
  margin: 0.65rem auto 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(42, 34, 36, 0.12);
}

.map-nav-root__title {
  margin: 0 1.25rem 0.85rem;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.08em;
}

.map-nav-root__item {
  display: block;
  width: calc(100% - 1.75rem);
  margin: 0 0.875rem;
  padding: 0.95rem 1rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-soft);
  background: rgba(255, 255, 255, 0.85);
  color: var(--wine);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(42, 34, 36, 0.05);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.12s ease;
}

.map-nav-root__item + .map-nav-root__item {
  margin-top: 0.4rem;
}

.map-nav-root__item--secondary {
  background: transparent;
  color: var(--ink-muted);
  box-shadow: none;
  border: 1px dashed rgba(184, 149, 108, 0.35);
  font-weight: 400;
}

.map-nav-root__item:hover,
.map-nav-root__item:focus-visible {
  background: rgba(184, 149, 108, 0.1);
  outline: none;
}

.map-nav-root__item--secondary:hover,
.map-nav-root__item--secondary:focus-visible {
  background: rgba(184, 149, 108, 0.06);
}

.map-nav-root__item:active {
  transform: scale(0.99);
}

.map-nav-root__dismiss {
  display: block;
  width: calc(100% - 1.75rem);
  margin: 0.75rem 0.875rem 0;
  padding: 0.8rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(42, 34, 36, 0.42);
  background: transparent;
  border: none;
  border-radius: var(--radius-soft);
  cursor: pointer;
  touch-action: manipulation;
}

.map-copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(2rem, calc(var(--safe-bottom) + 1.25rem));
  z-index: 10001;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.6rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--champagne);
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-deep) 100%);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(74, 1, 5, 0.4);
  pointer-events: none;
  letter-spacing: 0.04em;
}

.map-copy-toast:not([hidden]) {
  animation: mapToastIn 0.22s ease;
}

@keyframes mapToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-nav-root__panel {
    animation: none;
  }

  .map-copy-toast:not([hidden]) {
    animation: none;
  }
}

.map-embed-canvas {
  width: 100%;
  height: 200px;
  min-height: 180px;
}

/* 高德容器内部仍会抢事件，统一关掉；预览仅展示，缩放/拖拽地图请用「导航」外链 */
.map-embed-canvas:not(.map-embed-canvas--fallback),
.map-embed-canvas:not(.map-embed-canvas--fallback) * {
  pointer-events: none !important;
}

.map-embed-canvas--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  pointer-events: auto !important;
}

.map-embed-canvas--fallback * {
  pointer-events: auto !important;
}

.map-embed-fallback {
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(42, 34, 36, 0.5);
  text-align: center;
  padding: 1rem 0.85rem;
}

.map-embed-canvas .amap-maps img,
.map-embed-canvas .amap-container img {
  max-width: none !important;
}

.reclose-wrap {
  text-align: center;
  margin-top: 1.35rem;
  padding-top: 0.5rem;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  background: transparent;
  border: none;
  color: rgba(42, 34, 36, 0.38);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  cursor: pointer;
  font-family: var(--font-sans);
  border-radius: var(--radius-pill);
  transition: color 0.2s ease, background 0.2s ease;
}

.btn-text:hover,
.btn-text:focus-visible {
  color: var(--wine);
  background: rgba(184, 149, 108, 0.08);
  outline: none;
}

@media (max-width: 480px) {
  .invite-header__kicker {
    font-size: clamp(1.85rem, 9vw, 2.75rem);
  }

  .invite-header__title {
    font-size: clamp(1.42rem, 6.2vw, 1.95rem);
  }

  .invite-header__motto,
  .invite-header__blurb,
  .section p,
  .section li {
    font-size: 0.9375rem;
  }

  .section h2 {
    font-size: clamp(1.4rem, 5.5vw, 1.85rem);
  }

  .address-block {
    font-size: 0.875rem;
  }

  .map-nav-fab {
    right: 0.5rem;
    bottom: 0.5rem;
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
  }

  .timeline li {
    grid-template-columns: 4.75rem 1fr;
    padding: 0.7rem 0.9rem;
  }

  .map-embed-canvas {
    height: 220px;
    min-height: 200px;
  }
}
