/* ═══════════════════════════════════════════════
   보경 ♥ 신랑 웨딩 청첩장
   팔레트: 크림 · 잉크 · 로즈 · 골드
   ═══════════════════════════════════════════════ */

:root {
  --bg: #faf7f1;
  --bg-tint: #f4ede3;
  --ink: #3b352f;
  --ink-soft: #7a7166;
  --rose: #b76e79;
  --rose-deep: #9a5560;
  --gold: #c2a05e;
  --line: #e3dacc;
  --card: #fffdf9;
  --shadow: 0 12px 40px rgba(59, 53, 47, 0.1);
  /* 스크롤에 따라 JS가 갱신 — 새벽 → 노을 */
  --sky-hue: 36;
}

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

/* display 지정된 요소도 hidden 속성이 항상 이기도록 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: "Gowun Batang", "Noto Serif KR", serif;
  color: var(--ink);
  background: linear-gradient(
    180deg,
    hsl(var(--sky-hue), 42%, 96%) 0%,
    var(--bg) 45%,
    hsl(var(--sky-hue), 38%, 94%) 100%
  );
  transition: background 0.8s ease;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rose); color: #fff; }

/* ─────────── 인트로 봉투 ─────────── */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    radial-gradient(ellipse at 50% 30%, #fdf9f2 0%, #efe6d8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  transition: opacity 1.1s ease, visibility 1.1s;
}
#intro-overlay.opened { opacity: 0; visibility: hidden; pointer-events: none; }

.envelope {
  position: relative;
  width: min(320px, 82vw);
  aspect-ratio: 1.45 / 1;
  perspective: 900px;
  filter: drop-shadow(0 24px 40px rgba(59, 53, 47, 0.22));
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #f6efe3, #eee2cd);
  border-radius: 8px;
  z-index: 3;
  /* 봉투 아랫면 접힘 */
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(194, 160, 94, 0.25);
}

.envelope-flap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 52%;
  background: linear-gradient(180deg, #efe4d0, #e7d8bd);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 8px 8px 0 0;
  transform-origin: top center;
  transition: transform 1s cubic-bezier(0.6, 0, 0.3, 1);
  z-index: 5;
  box-shadow: inset 0 -1px 0 rgba(194, 160, 94, 0.3);
}
.envelope.open .envelope-flap { transform: rotateX(180deg); z-index: 1; }

.envelope-card {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 9%;
  bottom: 9%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 1.1s cubic-bezier(0.5, 0, 0.2, 1) 0.55s;
}
.envelope.open .envelope-card { transform: translateY(-58%); z-index: 4; }

.env-card-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.35em;
  color: var(--gold);
}
.env-card-names { font-size: 1.35rem; font-weight: 700; }
.env-card-names span { color: var(--rose); font-weight: 400; margin: 0 0.2em; }
.env-card-date { font-size: 0.75rem; color: var(--ink-soft); letter-spacing: 0.15em; }

.wax-seal {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 6;
  background:
    radial-gradient(circle at 32% 28%, #d98b95, #a34a57 58%, #7e3540 100%);
  box-shadow:
    0 6px 14px rgba(126, 53, 64, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.25);
  animation: seal-pulse 2.4s ease-in-out infinite;
  transition: transform 0.5s, opacity 0.5s;
}
.envelope.open .wax-seal { transform: translate(-50%, -50%) scale(0); opacity: 0; }

.wax-seal-inner {
  font-family: "Gowun Batang", serif;
  color: #f9e8e4;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.wax-seal-inner small { font-size: 0.6rem; vertical-align: middle; margin: 0 1px; }

@keyframes seal-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.07); }
}

.intro-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  animation: hint-fade 2.4s ease-in-out infinite;
}
@keyframes hint-fade { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ─────────── 공용 레이어 ─────────── */
#petal-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  z-index: 50;
}

#content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}
#content.visible { opacity: 1; }

.section { padding: 5.5rem 1.6rem; text-align: center; }
.section-tinted {
  background: linear-gradient(180deg, transparent, rgba(183, 110, 121, 0.055), transparent);
}

.section-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 2.2rem;
}

/* 스크롤 리빌 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ─────────── 히어로 (화보 에디토리얼) ─────────── */
#hero {
  padding: 1.4rem 1.2rem 5rem;
  position: relative;
}

.ed-grid {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 0.7rem;
  align-items: start;
}
.ed-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding-top: 2.4rem;
}
.ed-vert {
  writing-mode: vertical-rl;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5em;
}
.ed-vert .ch {
  opacity: 0;
  transform: translateY(0.5em) rotate(4deg);
  animation: ch-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes ch-in { to { opacity: 1; transform: none; } }
.ed-leaf { font-size: 0.85rem; }

figure.ed-photo.ph {
  aspect-ratio: 3 / 4.4;
  border-radius: 16px;
  background: linear-gradient(160deg, #e3d0c0, #a98f7c);
}

/* 회전 스탬프 */
.ed-stamp {
  position: relative;
  width: 106px;
  height: 106px;
  margin: -56px 0 0 1.2rem;
  z-index: 3;
  filter: drop-shadow(0 6px 16px rgba(59, 53, 47, 0.18));
}
.ed-stamp::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #ece4d2;
}
.ed-stamp svg {
  position: absolute;
  inset: 0;
  animation: stamp-spin 20s linear infinite;
}
.ed-stamp svg text {
  font-family: "Cormorant Garamond", serif;
  font-size: 8px;
  letter-spacing: 1.5px;
  fill: var(--ink-soft);
}
@keyframes stamp-spin { to { transform: rotate(360deg); } }
.ed-stamp-date {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
  color: var(--ink);
}
.ed-stamp-date i { font-style: normal; color: var(--gold); margin: 0 2px; font-size: 1.15rem; }

/* Save the Date 타이포 */
.savedate { text-align: center; margin-top: 2.8rem; }
.sd-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.5rem, 12.5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.sd-title em { font-style: italic; color: var(--rose); }
.sd-date { margin-top: 1.1rem; font-size: 0.95rem; }
.sd-venue { margin-top: 0.25rem; font-size: 0.8rem; color: var(--ink-soft); }

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--ink-soft);
  border-radius: 12px;
  opacity: 0.55;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink-soft);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* 하트 파티클 */
.tap-heart {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  font-size: 1.1rem;
  animation: heart-float 1.4s ease-out forwards;
}
.tap-heart.big { font-size: 3.2rem; color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); }
@keyframes heart-float {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(-50%, -220%) scale(1.25) rotate(var(--rot, 12deg)); opacity: 0; }
}

/* ─────────── 모시는 글 ─────────── */
.invitation-letter p { margin-bottom: 1.6rem; font-size: 0.95rem; }
.invitation-letter p:last-child { margin-bottom: 0; }

.family-lines { margin-top: 2.8rem; font-size: 0.9rem; display: grid; gap: 0.5rem; }
.family-lines .accent { color: var(--rose-deep); font-size: 1.02em; }

.contact-buttons { display: flex; gap: 0.7rem; justify-content: center; margin-top: 2.2rem; flex-wrap: wrap; }

.btn-outline {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  border: 1px solid var(--rose);
  color: var(--rose-deep);
  background: transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}
.btn-outline:active { transform: scale(0.96); }
.btn-outline:hover { background: var(--rose); color: #fff; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(183, 110, 121, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:active { transform: scale(0.96); }
.btn-geo-icon { animation: seal-pulse 2s infinite; display: inline-block; }

/* ─────────── 달력 · 카운트다운 ─────────── */
.calendar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.1rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem 0;
  font-size: 0.85rem;
}
.calendar .dow { font-size: 0.68rem; color: var(--ink-soft); padding-bottom: 0.5rem; letter-spacing: 0.05em; }
.calendar .dow.sun, .calendar .day.sun { color: #c26565; }
.calendar .day { padding: 0.42rem 0; position: relative; }
.calendar .day.dim { opacity: 0; }
.calendar .day.wedding {
  color: #fff;
  font-weight: 700;
  position: relative;
  z-index: 1; /* ::before 원이 카드 뒤로 숨지 않도록 쌓임 맥락 생성 */
}
.calendar .day.wedding::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 2em; height: 2em;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #d98b95, var(--rose-deep));
  border-radius: 50%;
  z-index: -1; /* 숫자(셀 내용)보다 뒤, 카드보다 앞 */
  animation: seal-pulse 2.2s infinite;
}
.calendar .day.wedding::after {
  content: "♥";
  position: absolute;
  top: -0.5em; left: 50%;
  transform: translateX(-50%);
  font-size: 0.6em;
  color: var(--rose);
}

.countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 2.4rem;
}
.cd-unit {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow);
}
.cd-num { font-size: 1.5rem; font-weight: 700; color: var(--rose-deep); font-variant-numeric: tabular-nums; }
.cd-num.tick { animation: num-tick 0.4s ease; }
@keyframes num-tick { 0% { transform: translateY(-6px); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
.cd-label { font-size: 0.56rem; letter-spacing: 0.2em; color: var(--ink-soft); margin-top: 0.2rem; }
.cd-sep { color: var(--rose); font-weight: 700; }

.countdown-msg { margin-top: 1.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.countdown-msg strong { color: var(--rose-deep); }

/* ─────────── 갤러리 (매거진 피드) ─────────── */
.ph {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  transition: box-shadow 0.35s;
  box-shadow: 0 6px 18px rgba(59, 53, 47, 0.12);
}
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-hint { margin-top: 1.4rem; font-size: 0.72rem; color: var(--ink-soft); }

.mag-feed { display: flex; flex-direction: column; }
.mag-feed > * { margin-bottom: 2rem; }
.mag-feed > *:last-child { margin-bottom: 0; }

.mag-photo {
  position: relative;
  border-radius: 18px;
  aspect-ratio: 3 / 3.6;
  margin: 0 1.2rem;
}
.mag-photo.tall { aspect-ratio: 3 / 4.6; }
.mag-photo.wide { aspect-ratio: 3 / 2.1; }
/* 본문 칼럼(#content) 폭을 꽉 채움 — 100vw를 쓰면 데스크톱에서 칼럼 밖으로 넘쳐 거대해짐 */
.mag-photo.full {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0;
  aspect-ratio: 4 / 5;
}
.mag-photo.full.wide { aspect-ratio: 3 / 2.1; }

/* 자리표시 톤 (실제 사진 넣으면 자연히 가려짐) */
.mag-photo.tone-1 .mag-parallax { background: linear-gradient(140deg, #d9a5ad, #b76e79); }
.mag-photo.tone-2 .mag-parallax { background: linear-gradient(140deg, #cbb287, #a68a55); }
.mag-photo.tone-3 .mag-parallax { background: linear-gradient(140deg, #a9b8a4, #7f947a); }
.mag-photo.tone-4 .mag-parallax { background: linear-gradient(140deg, #b3a8c9, #8a7aa8); }
.mag-photo.tone-5 .mag-parallax { background: linear-gradient(140deg, #d9bfa5, #bb9573); }
.mag-photo.tone-6 .mag-parallax { background: linear-gradient(140deg, #a5c2d9, #7a9cb7); }
.mag-photo.tone-7 .mag-parallax { background: linear-gradient(140deg, #e0b8c3, #c98a9c); }
.mag-photo.tone-8 .mag-parallax { background: linear-gradient(140deg, #c9c2a5, #a39c72); }

/* 패럴랙스 레이어 — 프레임보다 조금 크게 두고 스크롤에 따라 이동 */
.mag-parallax {
  position: absolute;
  inset: -9% -9%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}
.mag-parallax img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* 좋아요 배지 (두 번 탭하면 표시) */
.mag-like-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.3, 1.6, 0.4, 1);
  pointer-events: none;
  z-index: 1;
}
.mag-photo.liked .mag-like-badge {
  opacity: 1;
  transform: scale(1);
  color: var(--rose-deep);
  background: rgba(255, 253, 249, 0.92);
}

/* 켄번즈 리빌 — 줌인 + 블러 해제 */
.mag-photo.reveal {
  opacity: 0;
  transform: translateY(34px) scale(1.07);
  filter: blur(7px);
  transition: opacity 1s ease, transform 1.15s cubic-bezier(0.16, 0.8, 0.24, 1), filter 1s ease;
}
.mag-photo.reveal.in { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

/* 가로 스와이프 스프레드 */
.mag-spread {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 1.2rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
}
.mag-spread::-webkit-scrollbar { display: none; }
.mag-spread .mag-photo {
  flex: 0 0 76%;
  margin: 0;
  scroll-snap-align: center;
  aspect-ratio: 3 / 4;
}

/* 라이트박스 */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(30, 26, 23, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox[hidden] { display: none; }
#lb-stage {
  width: min(88vw, 720px);
  height: min(70vh, 720px);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  transition: opacity 0.25s;
}
#lb-stage img { max-width: 100%; max-height: 100%; border-radius: 14px; object-fit: contain; }
#lb-close, #lb-prev, #lb-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#lb-close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
#lb-prev { left: 0.6rem; top: 50%; transform: translateY(-50%); }
#lb-next { right: 0.6rem; top: 50%; transform: translateY(-50%); }

/* ─────────── 오시는 길 ─────────── */
.venue-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}
.venue-name { font-weight: 700; font-size: 1.05rem; }
.venue-address { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.3rem; }
.venue-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1rem; }

.chip {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}
.chip:hover { border-color: var(--rose); color: var(--rose-deep); }

#map {
  height: 300px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 2; /* leaflet 내부 z-index 하 라이트박스보다 아래 유지 */
}

/* Leaflet 커스텀 마커 */
.marker-venue, .marker-shuttle {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-8deg);
  box-shadow: 0 4px 10px rgba(59, 53, 47, 0.35);
  font-size: 15px;
  border: 2px solid #fff;
}
.marker-venue { background: var(--rose-deep); }
.marker-shuttle { background: #f0b400; border-radius: 8px; transform: none; font-size: 13px; }
.marker-shuttle.nearest { background: #2e7d4f; animation: seal-pulse 1.6s infinite; }
.marker-me { font-size: 20px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

/* 내 위치 패널 */
.geo-panel { margin: 1.6rem 0 2.2rem; }
.geo-result {
  margin-top: 1.1rem;
  background: var(--card);
  border: 1px dashed var(--rose);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  font-size: 0.85rem;
  text-align: left;
  display: grid;
  gap: 0.4rem;
}
.geo-result strong { color: var(--rose-deep); }
.geo-error { margin-top: 0.9rem; font-size: 0.78rem; color: #b05252; }

/* 이동 수단 탭 */
.transport-tabs {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1.4rem;
}
.tab {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}
.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tab-panel { text-align: left; }
.shuttle-lead { font-size: 0.83rem; color: var(--ink-soft); text-align: center; margin-bottom: 1.2rem; }

/* 셔틀 탑승지 = 버스 티켓 스타일 */
.shuttle-list { display: grid; gap: 0.8rem; }
.shuttle-ticket {
  position: relative;
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: 0 4px 14px rgba(59, 53, 47, 0.08);
}
.shuttle-ticket:active { transform: scale(0.98); }
.shuttle-ticket.nearest { border-color: #2e7d4f; box-shadow: 0 6px 20px rgba(46, 125, 79, 0.22); }
.shuttle-ticket .stub {
  flex: 0 0 64px;
  background: linear-gradient(160deg, #ffd84d, #f0b400);
  color: #5a4300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  gap: 0.15rem;
  /* 절취선 */
  border-right: 2px dashed rgba(90, 67, 0, 0.4);
}
.shuttle-ticket.nearest .stub { background: linear-gradient(160deg, #3e9367, #2e7d4f); }
.shuttle-ticket .stub small { font-size: 0.52rem; letter-spacing: 0.15em; }
.shuttle-ticket .body { padding: 0.8rem 1rem; flex: 1; }
.shuttle-ticket .stop-name { font-weight: 700; font-size: 0.92rem; }
.shuttle-ticket .stop-desc { font-size: 0.74rem; color: var(--ink-soft); margin-top: 0.2rem; }
.shuttle-ticket .stop-dist {
  font-size: 0.72rem;
  color: #2e7d4f;
  font-weight: 700;
  margin-top: 0.3rem;
  display: none;
}
.shuttle-ticket .stop-dist.show { display: block; }
.shuttle-ticket .badge {
  position: absolute;
  top: 0.55rem; right: 0.65rem;
  background: #2e7d4f;
  color: #fff;
  font-size: 0.58rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  letter-spacing: 0.08em;
  display: none;
}
.shuttle-ticket.nearest .badge { display: block; }

.shuttle-note { margin-top: 1.1rem; font-size: 0.74rem; color: var(--ink-soft); display: grid; gap: 0.2rem; }

.transit-list { list-style: none; display: grid; gap: 0.8rem; font-size: 0.85rem; }
.transit-list strong { color: var(--rose-deep); margin-right: 0.4rem; }

/* 내비 버튼 */
.navi-buttons { display: flex; gap: 0.55rem; justify-content: center; margin-top: 1.8rem; flex-wrap: wrap; }
.navi-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(59, 53, 47, 0.08);
  transition: transform 0.2s;
}
.navi-btn:active { transform: scale(0.95); }
.navi-dot { width: 10px; height: 10px; border-radius: 3px; }
.navi-dot.kakao { background: #fee500; }
.navi-dot.naver { background: #03c75a; }
.navi-dot.tmap { background: #e0397a; }

/* ─────────── 마음 전하실 곳 ─────────── */
.gift-lead { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.8rem; }

.accordion { display: grid; gap: 0.7rem; text-align: left; }
.acc-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.acc-head {
  width: 100%;
  padding: 1rem 1.2rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.acc-head .arrow { transition: transform 0.35s; color: var(--ink-soft); font-size: 0.75rem; }
.acc-item.open .acc-head .arrow { transform: rotate(180deg); }
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}
.acc-row .holder { color: var(--ink-soft); font-size: 0.74rem; }
.acc-row .num { font-variant-numeric: tabular-nums; }

/* ─────────── 푸터 ─────────── */
#footer {
  padding: 5rem 1.6rem calc(4.5rem + env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(194, 160, 94, 0.09));
}
.footer-thanks { font-size: 1rem; margin-bottom: 2rem; }
.share-buttons { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.footer-sign { margin-top: 2.6rem; font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.18em; }

/* ─────────── 토스트 ─────────── */
#toast {
  position: fixed;
  bottom: calc(2rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
  z-index: 95;
  max-width: 86vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ─────────── 신랑 · 신부 소개 (플립 카드) ─────────── */
.couple-hint { font-size: 0.72rem; color: var(--ink-soft); margin: -1.2rem 0 1.6rem; }

.couple-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
.flip-card { perspective: 900px; aspect-ratio: 3 / 4.2; cursor: pointer; }
.flip-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
}
.flip-front { background: var(--card); }
.flip-front .avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  margin-bottom: 0.4rem;
}
.flip-card.groom .avatar { background: linear-gradient(140deg, #c4d2e4, #8fa9c7); }
.flip-card.bride .avatar { background: linear-gradient(140deg, #ecc8cd, #d49aa3); }
.flip-front .role { font-size: 0.6rem; letter-spacing: 0.3em; color: var(--gold); }
.flip-front .name { font-size: 1.1rem; font-weight: 700; }
.flip-front .flip-cue { font-size: 0.62rem; color: var(--ink-soft); margin-top: 0.5rem; }
.flip-back {
  background: linear-gradient(160deg, var(--card), #f7efe2);
  transform: rotateY(180deg);
  text-align: center;
}
.flip-back .tags { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; }
.flip-back .tag {
  font-size: 0.62rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(183, 110, 121, 0.12);
  color: var(--rose-deep);
}
.flip-back .word { font-size: 0.76rem; color: var(--ink-soft); margin-top: 0.6rem; line-height: 1.6; }
.flip-back .word strong { color: var(--ink); }

/* ─────────── 타임라인 ─────────── */
.timeline-track {
  position: relative;
  text-align: left;
  padding-left: 2.2rem;
}
.timeline-track::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--line), var(--rose), var(--gold));
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 1.9rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .dot {
  position: absolute;
  left: -2.2rem;
  top: 0;
  width: 1.5rem; height: 1.5rem;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--rose);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  box-shadow: 0 2px 8px rgba(183, 110, 121, 0.25);
}
.tl-item:last-child .dot { background: var(--rose); }
.tl-item .tl-date { font-size: 0.66rem; letter-spacing: 0.12em; color: var(--gold); }
.tl-item .tl-title { font-weight: 700; font-size: 0.95rem; margin-top: 0.1rem; }
.tl-item .tl-desc { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* ─────────── 인터뷰 (채팅 스타일) ─────────── */
.chat-wrap { display: grid; gap: 1.6rem; text-align: left; }
.chat-q {
  justify-self: center;
  font-size: 0.78rem;
  color: var(--rose-deep);
  background: rgba(183, 110, 121, 0.1);
  border: 1px solid rgba(183, 110, 121, 0.25);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  text-align: center;
}
.chat-row { display: flex; gap: 0.55rem; align-items: flex-end; }
.chat-row.right { flex-direction: row-reverse; }
.chat-face {
  width: 34px; height: 34px;
  border-radius: 50%;
  flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.chat-row.left .chat-face { background: linear-gradient(140deg, #c4d2e4, #8fa9c7); }
.chat-row.right .chat-face { background: linear-gradient(140deg, #ecc8cd, #d49aa3); }
.chat-bubble {
  max-width: 76%;
  padding: 0.7rem 0.95rem;
  font-size: 0.82rem;
  line-height: 1.65;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 3px 10px rgba(59, 53, 47, 0.06);
}
.chat-row.left .chat-bubble { border-radius: 14px 14px 14px 4px; }
.chat-row.right .chat-bubble { border-radius: 14px 14px 4px 14px; background: #fdf3f4; border-color: #ecd4d8; }
.chat-name { font-size: 0.6rem; color: var(--ink-soft); margin-bottom: 0.25rem; letter-spacing: 0.08em; }

/* ─────────── 캘린더 일정 추가 ─────────── */
.cal-add-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

/* ─────────── RSVP ─────────── */
.rsvp-lead { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.8rem; }
.rsvp-form { display: grid; gap: 0.8rem; text-align: left; }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}
.seg-btn {
  border: none;
  background: transparent;
  padding: 0.6rem 0.4rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.25s;
}
.seg-btn.active {
  background: var(--card);
  color: var(--rose-deep);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(59, 53, 47, 0.12);
}

.field {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.12); }
textarea.field { resize: none; line-height: 1.6; }

.field-label { font-size: 0.72rem; color: var(--ink-soft); display: grid; gap: 0.35rem; }
.rsvp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.rsvp-row.hidden { display: none; }
.rsvp-submit { justify-content: center; margin-top: 0.4rem; }
.rsvp-note { font-size: 0.68rem; color: var(--ink-soft); text-align: center; }

/* ─────────── 답례품 ─────────── */
.favor-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.2rem 1.6rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.favor-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(194, 160, 94, 0.45);
  border-radius: 12px;
  pointer-events: none;
}
.favor-icon { font-size: 2.4rem; animation: favor-sway 3s ease-in-out infinite; display: inline-block; }
@keyframes favor-sway { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
.favor-title { font-weight: 700; font-size: 1rem; margin: 0.8rem 0 0.7rem; }
.favor-desc { font-size: 0.85rem; color: var(--ink-soft); }
.favor-desc strong { color: var(--rose-deep); }

/* ─────────── 방명록 ─────────── */
.gb-form { display: grid; gap: 0.7rem; margin-bottom: 2rem; }
.gb-form .btn-primary { justify-content: center; }

.gb-list { display: grid; gap: 0.8rem; text-align: left; }
.gb-note {
  position: relative;
  background: #fffdf5;
  border: 1px solid #efe3c8;
  border-radius: 4px 14px 14px 14px;
  padding: 1rem 1.1rem 0.85rem;
  box-shadow: 0 4px 12px rgba(59, 53, 47, 0.08);
  transform: rotate(var(--tilt, 0deg));
  animation: gb-in 0.5s cubic-bezier(0.3, 0.7, 0.3, 1.2);
}
@keyframes gb-in { from { opacity: 0; transform: translateY(14px) rotate(var(--tilt, 0deg)) scale(0.96); } }
.gb-note::before {
  /* 마스킹 테이프 */
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 54px; height: 14px;
  background: rgba(183, 110, 121, 0.28);
  border-radius: 2px;
}
.gb-note:nth-child(odd)::before { background: rgba(194, 160, 94, 0.32); transform: translateX(-50%) rotate(2deg); }
.gb-msg-text { font-size: 0.85rem; line-height: 1.65; word-break: break-all; }
.gb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.55rem;
  font-size: 0.68rem;
  color: var(--ink-soft);
}
.gb-del {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 0.66rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  opacity: 0.7;
}
.gb-empty { font-size: 0.8rem; color: var(--ink-soft); }
.gb-empty.hidden { display: none; }

/* ─────────── 하단 고정 메뉴바 ─────────── */
#content { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }

#bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 120%);
  width: 100%;
  max-width: 520px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom));
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.7s;
}
body.opened #bottom-bar { transform: translate(-50%, 0); }

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.24rem;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.25s, transform 0.15s;
}
.bar-item svg { width: 20px; height: 20px; }
.bar-item:active { transform: scale(0.9); }
.bar-item:hover { color: var(--rose-deep); }

.bar-cta {
  flex: 0 0 auto;
  margin-left: 0.2rem;
  padding: 0.7rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(183, 110, 121, 0.35);
  transition: transform 0.15s;
}
.bar-cta:active { transform: scale(0.95); }

/* ─────────── 바텀시트 ─────────── */
#sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(30, 26, 23, 0.5);
  opacity: 0;
  transition: opacity 0.35s;
}
#sheet-backdrop.show { opacity: 1; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 105%);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  max-height: 88svh;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  z-index: 75;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 44px rgba(59, 53, 47, 0.28);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.3, 1);
}
.sheet[hidden] { display: none; }
.sheet.show { transform: translate(-50%, 0); }

.sheet-handle {
  flex: 0 0 auto;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0.7rem auto 0;
}
.sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.4rem 0.65rem;
  border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-size: 1rem; font-weight: 700; }
.sheet-close {
  border: none;
  background: var(--bg-tint);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
}
.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: calc(0.8rem + env(safe-area-inset-bottom));
}
.sheet .section { padding: 1.9rem 1.5rem 2.4rem; }
.sheet .section-tinted { background: none; }
.sheet #favor { padding-top: 0; }

.info-summary {
  display: grid;
  gap: 0.45rem;
  padding: 1.3rem 1.7rem 0;
  text-align: left;
}
.info-line { font-size: 0.88rem; }
.info-line span {
  color: var(--gold);
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  margin-right: 0.7rem;
}

/* ─────────── 데스크톱 보정 ─────────── */
@media (min-width: 720px) {
  #content { max-width: 520px; }
  body::before {
    /* 데스크톱에선 양옆 여백에 은은한 패턴 */
    content: "";
    position: fixed;
    inset: 0;
    background:
      radial-gradient(circle at 12% 20%, rgba(183, 110, 121, 0.06), transparent 32%),
      radial-gradient(circle at 88% 70%, rgba(194, 160, 94, 0.07), transparent 32%);
    pointer-events: none;
  }
  .gallery-grid { grid-auto-rows: 150px; }

  /* 사진이 한 화면 높이를 넘지 않도록: 비율은 유지하고 폭을 줄여 가운데 정렬 */
  figure.ed-photo.ph { width: min(100%, calc(78vh * 3 / 4.4)); }
  .mag-feed > .mag-photo { margin-left: auto; margin-right: auto; }
  .mag-photo.full { width: min(100%, calc(78vh * 4 / 5)); border-radius: 18px; }
  .mag-photo.full.wide { width: min(100%, calc(78vh * 3 / 2.1)); }
  .mag-photo.inset { width: min(calc(100% - 2.4rem), calc(78vh * 3 / 3.6)); }
  .mag-photo.tall.inset { width: min(calc(100% - 2.4rem), calc(78vh * 3 / 4.6)); }
  .mag-spread .mag-photo { flex-basis: min(76%, calc(70vh * 3 / 4)); }
}

/* ─────────── 모션 최소화 존중 ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
