/* ── 컬러 토큰 (기본: 갈색 / 한지 클래식) ── */
:root,
html[data-theme="brown"] {
  --paper: #F5F1EA;
  --paper-2: #ece4d6;
  --ink: #2c2620;
  --ink-soft: #6a6157;
  --line: #d8cdba;
  --accent: #8c6b4f;
  --accent-text: #ffffff;
  --card-bg: #fbf8f2;
  --white: #fbf8f2;
  --hero-fade-from: rgba(245, 241, 234, 0);
  --hero-fade-to: #F5F1EA;
  --header-bg: rgba(245, 241, 234, 0.92);
  --header-border: rgba(216, 205, 186, 0.8);
  --btn-nav-bg: #ffffff;
  --btn-nav-color: #191919;
  --btn-nav-border: #d8cdba;
  --btn-nav-hover: #ece4d6;

  --fs-body: 18px;
  --lh-body: 2.05;
  --btn-h: 56px;

  --maxw: 460px;
  font-family: "Nanum Myeongjo", serif;
}

/* ── 흰색 테마 (Modern Clean White) ── */
html[data-theme="white"] {
  --paper: #ffffff;
  --paper-2: #f6f7f9;
  --ink: #1f2328;
  --ink-soft: #656d76;
  --line: #e1e4e8;
  --accent: #8c6b4f;
  --accent-text: #ffffff;
  --card-bg: #ffffff;
  --white: #ffffff;
  --hero-fade-from: rgba(255, 255, 255, 0);
  --hero-fade-to: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.92);
  --header-border: rgba(225, 228, 232, 0.9);
  --btn-nav-bg: #ffffff;
  --btn-nav-color: #1f2328;
  --btn-nav-border: #e1e4e8;
  --btn-nav-hover: #f3f4f6;
}

/* ── 검은색 테마 (Luxury Monochrome Dark) ── */
html[data-theme="black"] {
  --paper: #121212;
  --paper-2: #1c1c1e;
  --ink: #f0f0f2;
  --ink-soft: #9e9ea4;
  --line: #2c2c2e;
  --accent: #ffffff;
  --accent-text: #121212;
  --card-bg: #1c1c1e;
  --white: #242426;
  --hero-fade-from: rgba(18, 18, 18, 0);
  --hero-fade-to: #121212;
  --header-bg: rgba(18, 18, 18, 0.92);
  --header-border: rgba(44, 44, 46, 0.9);
  --btn-nav-bg: #222224;
  --btn-nav-color: #e5e5e7;
  --btn-nav-border: #333336;
  --btn-nav-hover: #2c2c2f;
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ── 상단 테마 선택 바 ── */
.theme-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 10px 16px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--header-border);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.theme-bar__inner {
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.theme-bar__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: color 0.35s ease;
}

.theme-bar__buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--paper-2);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--line);
  transition: background-color 0.35s ease, border-color 0.35s ease;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.theme-btn:hover {
  color: var(--ink);
}

.theme-btn.is-active {
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

html[data-theme="black"] .theme-btn.is-active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.theme-dot--brown {
  background: #c5a880;
  border-color: #a88d67;
}

.theme-dot--white {
  background: #ffffff;
  border-color: #d1d5db;
}

.theme-dot--black {
  background: #1e1e1e;
  border-color: #4b5563;
}

body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0;
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
}

section {
  padding: 84px 22px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
section:last-child { border-bottom: none; }

.sec__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 36px;
  color: var(--ink);
}

/* ── 스크롤 연출 ──
   섹션(.reveal) 자체는 움직이지 않는다 — transform이 남으면 그 안의
   position:fixed 기준이 섹션이 된다. app.js가 섹션의 직계 자식에 .rv와
   등장 딜레이(--d, 한 프레임에 같이 들어오면 200ms씩 밀린다)를 붙이고, 화면 안이면 .is-in /
   위로 지나가면 .is-above 를 토글한다. 딜레이는 들어올 때만 — 빠질 땐 바로.
   html.motion 은 app.js가 연출 가능할 때만 붙인다(JS 없음·모션 줄이기면 전부 보임). */
.motion .rv {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.motion .rv.is-above { transform: translateY(-24px); }
.motion-init .rv, .motion-init .gallery__item { transition: none !important; }

/* 인사말은 한 줄씩 — 부모(.greeting__body)의 is-in 을 따라가고, 줄마다 0.35s 씩 밀린다 */
.greeting__line { display: block; }
.motion .greeting__line {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.motion .rv.is-in .greeting__line {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--d, 0s) + var(--l, 0) * 0.35s);
}
.motion-init .greeting__line { transition: none !important; }
.motion .rv.is-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: var(--d, 0s);
}

/* 히어로 인트로 — 배경은 살짝 줌아웃, 문구는 순서대로 떠오른다.
   from 만 둔다: 끝값은 각 요소 원래 값(.hero__subtitle 의 opacity .9 등)을 따른다.
   스크롤 패럴랙스는 app.js가 개별 속성(translate·opacity)으로 얹는다 — transform/scale 과 안 겹친다. */
.hero__bg { animation: hero-zoom 3.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__content > * { animation: hero-rise 1.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__content > :nth-child(1) { animation-delay: 0.3s; }
.hero__content > :nth-child(2) { animation-delay: 0.5s; }
.hero__content > :nth-child(3) { animation-delay: 3.0s; }
.hero__content > :nth-child(4) { animation-delay: 3.3s; }
@keyframes hero-zoom { from { scale: 1.12; } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(16px); } }

/* 이름: 신랑은 왼쪽, 신부는 오른쪽에서 미끄러져 들어온 뒤 가운데 하트가 선으로 그려지고 채워진다.
   이동 거리는 짧게 — 화면 밖에서 날아오면 가로 스크롤이 생긴다. */
.hero__content > .hero__names { animation: none; }
.hero__name { display: inline-block; }
.hero__name--groom { animation: name-from-left 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }
.hero__name--bride { animation: name-from-right 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both; }
.hero__heart path {
  stroke-dasharray: 1;
  animation: heart-draw 1.4s ease-in-out 1.6s both, heart-fill 0.8s ease 2.9s both;
}
@keyframes name-from-left  { from { opacity: 0; transform: translateX(-40px); } }
@keyframes name-from-right { from { opacity: 0; transform: translateX(40px); } }
@keyframes heart-draw { from { stroke-dashoffset: 1; } }
@keyframes heart-fill { from { fill-opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero__bg, .hero__content > *, .hero__name, .hero__heart path { animation: none; }
}

/* ── 1. 히어로 인트로 ── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 0 24px calc(env(safe-area-inset-bottom, 0px) + 140px);
  text-align: center;
  color: #ffffff;
  border-bottom: none;
}
.hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100lvh;
  background-size: cover;
  background-position: 52% 15%;
  background-repeat: no-repeat;
  z-index: 1;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.75) 100%);
  z-index: 2;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  background: linear-gradient(to bottom, var(--hero-fade-from) 0%, var(--hero-fade-to) 100%);
  z-index: 3;
  pointer-events: none;
  transition: background 0.35s ease;
}
.hero__content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__subtitle {
  font-size: 13px;
  letter-spacing: .35em;
  font-weight: 700;
  margin-bottom: 8px;
  opacity: 0.9;
}
.hero__names {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: .06em;
  margin-bottom: 16px;
  color: #ffffff;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.hero__heart {
  width: 0.62em;
  height: 0.55em;
  flex: 0 0 auto;
  overflow: visible;
}
.hero__heart path {
  fill: #ffffff;
  fill-opacity: 0.9;
  stroke: #ffffff;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.hero__date-line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  margin-bottom: 20px;
}
.hero__date-line .line-decor {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}
.hero__date-text {
  font-size: 12.5px;
  letter-spacing: .05em;
  font-weight: 700;
  white-space: nowrap;
}

/* ── 2. 인사말 ── */
.greeting__body {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  white-space: pre-line;
  color: var(--ink);
}
.greeting__sign {
  margin-top: 36px; font-size: 15px; color: var(--ink-soft); line-height: 1.9;
  white-space: pre-line;
  display: flex;
  justify-content: center;
}

.greeting__sign-grid {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.greeting__sign-row {
  display: grid;
  grid-template-columns: auto auto 2.4em auto;
  column-gap: 6px;
  align-items: center;
}

.greeting__parents {
  text-align: right;
  white-space: nowrap;
}

.greeting__of {
  text-align: center;
  white-space: nowrap;
}

.greeting__relation {
  text-align: right;
  white-space: nowrap;
}

.greeting__name {
  text-align: left;
  white-space: nowrap;
  font-weight: 700;
  color: var(--ink);
}

/* ── 4. 예식 안내 (캘린더 & 카운트다운) ── */
.event__date { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.event__place { font-size: 15px; color: var(--ink-soft); margin-bottom: 22px; }

.calendar {
  margin: 32px auto;
  width: 100%;
  max-width: 320px;
}
.calendar__header {
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 20px;
  letter-spacing: .02em;
}
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 20px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
}
.calendar__wday {
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.calendar__day {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar__day.sun, .calendar__wday.sun {
  color: #c85a53;
}
.calendar__day--target {
  z-index: 1;
}
.calendar__day--target .day-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.calendar__day--target .day-time {
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.countdown {
  width: 100%;
  margin-top: 12px;
}
.countdown__timer {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.countdown__card {
  flex: 1;
  height: 72px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.countdown__card .num {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.1;
}
.countdown__card .label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 700;
  margin-top: 3px;
}
.countdown__expired {
  font-size: 15px;
  color: #ffffff !important;
  font-weight: 700;
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  width: 100%;
}

.calendar-sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.calendar-sheet__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: none;
  background: rgba(20,17,13,.6);
  cursor: pointer;
}
.calendar-sheet__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  padding: 28px 22px 24px;
  border-radius: 14px;
  background: var(--card-bg, var(--paper));
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  box-sizing: border-box;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.calendar-sheet__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.calendar-sheet__title {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}
.calendar-sheet__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.calendar-sheet__link {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

/* ── 5. 오시는 길 ── */
.location__tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.location__tab-btn {
  background: transparent;
  border: none;
  padding: 10px 24px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.3s;
}
.location__tab-btn.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
}
.location__map-container {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin-bottom: 24px;
  background: var(--paper-2);
  overflow: hidden;
  position: relative;
  transition: height 0.3s ease;
}
.location__map-container.is-image-active {
  height: auto;
  background: #ffffff;
}
.location__map {
  width: 100%;
  height: 100%;
}
.location__image-map {
  width: 100%;
  height: auto;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.location__image-map img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.location__addr { font-size: var(--fs-body); line-height: 1.8; margin-bottom: 16px; }
.location__nav { display: flex; gap: 10px; justify-content: center; margin: 28px 0 24px; }
.location__info {
  margin-top: 36px;
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.location__info-group {
  margin-bottom: 24px;
}
.location__info-group:last-child {
  margin-bottom: 0;
}
.location__info-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}
.location__info-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
  padding-left: 22px;
  margin: 0;
  white-space: pre-line;
}

/* ── 6. 갤러리 (3x3 그리드) ── */
.gallery {
  padding-left: 0;
  padding-right: 0;
}
.gallery .sec__title {
  padding-left: 22px;
  padding-right: 22px;
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 100%;
}

.gallery__item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-2);
  cursor: pointer;
}
.motion .gallery__item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s cubic-bezier(0.215, 0.61, 0.355, 1),
              transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.motion .gallery.is-in .gallery__item {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(0.05s + var(--i, 0) * 0.09s);
}

.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 7. 계좌 (아코디언) ── */
.acc {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.acc__head {
  width: 100%; height: var(--btn-h);
  background: var(--card-bg); border: none; cursor: pointer;
  font-family: inherit; font-size: 16px; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.acc__head::after { content: "＋"; color: var(--accent); }
.acc.is-open .acc__head::after { content: "－"; }
.acc__body {
  height: 0;
  overflow: hidden;
  opacity: 0;
  background: var(--paper-2);
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, background-color 0.3s ease;
}
.acc.is-open .acc__body {
  opacity: 1;
}
.acc__inner {
  padding: 4px 18px 16px;
}
.acc__item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); text-align: left;
  transition: border-color 0.3s ease;
}
.acc__item:first-child { border-top: none; }
.acc__who {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.acc__person {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.acc__role {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 400;
}
.acc__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.acc__account {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  word-break: break-all;
}

/* ── 버튼 공통 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--btn-h);
  padding: 0 22px;
  font-family: inherit; font-size: 16px;
  background: var(--ink); color: var(--paper);
  border: none; border-radius: 6px; cursor: pointer;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn--sm { height: 46px; padding: 0 14px; font-size: 14px; flex: 1; }

/* 내비게이션 버튼 그룹 - 브랜드 아이콘 시그니처 조화 */
.location__nav .btn {
  background-color: var(--btn-nav-bg);
  color: var(--btn-nav-color);
  border: 1px solid var(--btn-nav-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 13.5px;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.1s ease;
}
.location__nav .btn:hover {
  background-color: var(--btn-nav-hover);
  border-color: var(--line);
}
.location__nav .btn:active {
  transform: scale(0.98);
}

.btn__icon {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain;
  flex-shrink: 0;
}
#calBtn, #copyAddrBtn { margin-top: 6px; width: 100%; max-width: 320px; }

/* ── 9. 공유 ── */
.share {
  padding: 56px 0 64px;
}
.share__divider {
  width: 36px;
  height: 1px;
  background: var(--line);
  margin: 0 auto 24px;
}
.share__tag {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #c29d4c;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.share__title {
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.5;
  margin-bottom: 32px;
}
.share__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
}
.share__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.share__icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e6e1d7;
  color: #554e45;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.share__item:hover .share__icon-wrap {
  background: #ded7cb;
  transform: translateY(-2px);
}
.share__item:active .share__icon-wrap {
  transform: scale(0.94);
  background: #d5cdbf;
}
.share__label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  color: #6e6457;
  text-transform: uppercase;
}

/* ── 전체화면 뷰어 ── */
[hidden] { display: none !important; }
.viewer {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20,17,13,.94);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.viewer.is-active {
  opacity: 1;
  pointer-events: auto;
}
.viewer__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.viewer__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 44px 24px;
  position: relative;
  user-select: none;
}
.viewer__slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.viewer.is-active .viewer__slide img {
  transform: scale(1);
}
.viewer__close {
  position: absolute; top: 14px; right: 16px;
  z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; border: none;
  font-size: 26px; cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
  transition-delay: 0.1s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.viewer__close:hover {
  background: rgba(0, 0, 0, 0.65);
}
.viewer.is-active .viewer__close {
  opacity: 1;
  transform: scale(1);
}

.viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45); color: #fff; border: none;
  font-size: 28px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 3px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  transition-delay: 0.1s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.viewer__nav:hover {
  background: rgba(0, 0, 0, 0.65);
}
.viewer__nav--prev { left: 12px; }
.viewer__nav--next { right: 12px; }
.viewer.is-active .viewer__nav {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.viewer__counter {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.85);
  font-size: 13px; letter-spacing: .08em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  transition: opacity 0.3s ease;
  transition-delay: 0.1s;
}
.viewer.is-active .viewer__counter { opacity: 1; }

/* ── 토스트 ── */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  z-index: 60;
  background: rgba(20,17,13,.92); color: #fff;
  padding: 12px 20px; border-radius: 24px; font-size: 14px;
  max-width: 88vw; text-align: center;
  animation: toast-in .2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── 강조 버튼 (방명록 등) ── */
.btn--accent {
  background: var(--accent);
  color: var(--accent-text, #ffffff);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn--accent:hover {
  opacity: 0.92;
}

/* ── 7.8 연애 카운트업 타이머 ── */
.love-timer {
  text-align: center;
  margin-top: 36px;
  margin-bottom: 48px;
}
.love-timer .sec__title {
  margin-bottom: 12px;
}
.love-timer__counter {
  font-size: 17px;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.love-timer__photos {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.love-timer__photo-box {
  position: relative;
  width: 100%;
  line-height: 0;
}
.love-timer__img,
.love-timer__video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.love-timer__msg {
  margin-top: 20px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
  white-space: pre-line;
}

/* ── 7.9 방명록 (축하 메시지) ── */
.guestbook__desc {
  text-align: center; font-size: 15px; color: var(--ink-soft);
  line-height: 1.8; margin-bottom: 22px;
}
.guestbook__form { margin-bottom: 26px; }
.guestbook__row { display: flex; gap: 10px; margin-bottom: 10px; }
.guestbook__input {
  flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); color: var(--ink);
  font-size: 15px; font-family: inherit; box-sizing: border-box;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.guestbook__input--pw { flex: 0 0 130px; }
.guestbook__textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper); color: var(--ink);
  font-size: 15px; font-family: inherit; line-height: 1.7;
  resize: vertical; margin-bottom: 12px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.guestbook__input::placeholder, .guestbook__textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}
.guestbook__input:focus, .guestbook__textarea:focus { outline: none; border-color: var(--accent); }
.guestbook__list {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 55vh;                 /* 많아지면 박스 안에서 스크롤 (조정 가능) */
  overflow-y: auto;
  overscroll-behavior: contain;     /* 박스 끝에서 페이지로 스크롤이 넘어가지 않게 */
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;               /* 스크롤바가 카드에 겹치지 않게 */
}
.guestbook__list::-webkit-scrollbar { width: 6px; }
.guestbook__list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.gb-card {
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--paper-2); padding: 14px 16px; text-align: left;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.gb-card__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.gb-card__name { font-weight: 700; color: var(--ink); font-size: 15px; }
.gb-card__date { font-size: 12px; color: var(--ink-soft); }
.gb-card__del {
  margin-left: auto; border: none; background: none; color: var(--ink-soft);
  font-size: 12px; cursor: pointer; padding: 2px 4px; font-family: inherit;
}
.gb-card__body {
  font-size: 15px; color: var(--ink); line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.gb-empty, .guestbook__note {
  text-align: center; color: var(--ink-soft); font-size: 14px; padding: 24px 0;
}
.gb-retry { display: flex; justify-content: center; padding: 8px 0 2px; }
.gb-retry .btn { width: auto; }

#gbOpen { margin-bottom: 22px; }

.gb-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;   /* 짧은 화면(키보드/가로)에서 폼 전체에 도달 */
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.gb-modal.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.gb-modal__backdrop { position: absolute; inset: 0; background: rgba(20,17,13,.6); }
.gb-modal__card {
  position: relative; z-index: 1;
  margin: auto;   /* 남으면 세로 가운데, 넘치면 오버레이가 스크롤(위 잘림 없음) */
  width: 100%; max-width: 420px; box-sizing: border-box;
  background: var(--card-bg, var(--paper)); border-radius: 10px;
  border: 1px solid var(--line);
  padding: 26px 20px 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  transform: translateY(12px) scale(.98);
  transition: transform .25s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.gb-modal.is-active .gb-modal__card { transform: translateY(0) scale(1); }
.gb-modal__card .guestbook__form { margin-bottom: 0; }
.gb-modal__close {
  position: absolute; top: 8px; right: 10px;
  width: 36px; height: 36px; border: none; background: none;
  color: var(--ink-soft); font-size: 26px; line-height: 1; cursor: pointer; font-family: inherit;
}
.gb-modal__title { text-align: center; font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 18px; }

/* ── 배경음악 토글 버튼 ──
   화면 우상단, 콘텐츠 열(--maxw) 오른쪽 끝에 붙는다. 넓은 화면에서도 청첩장 폭 안에 머문다.
   z-index 40: 뷰어·모달(50~60)이 열리면 그 아래로 숨는다. */
.bgm-btn {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(14px, calc((100vw - var(--maxw)) / 2 + 14px));
  z-index: 40;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border-radius: 50%;
  border: 1px solid var(--header-border);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.35s ease;
  animation: bgm-in 0.6s ease 0.4s both;
}
.bgm-btn:active { transform: scale(0.92); }
.bgm-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 정지 상태: 음표 + 사선 / 재생 상태: 이퀄라이저 막대 */
.bgm-btn__note { display: block; }
.bgm-btn__slash {
  position: absolute; width: 22px; height: 1.5px;
  background: currentColor; border-radius: 1px;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 1.5px var(--paper);
}
.bgm-btn__bars { display: none; align-items: flex-end; gap: 3px; height: 16px; }
.bgm-btn__bars i {
  display: block; width: 3px; height: 100%;
  background: currentColor; border-radius: 2px;
  transform-origin: bottom;
  animation: bgm-bar 1s ease-in-out infinite;
}
.bgm-btn__bars i:nth-child(2) { animation-delay: -0.35s; animation-duration: 0.85s; }
.bgm-btn__bars i:nth-child(3) { animation-delay: -0.6s;  animation-duration: 1.15s; }

.bgm-btn.is-playing .bgm-btn__note,
.bgm-btn.is-playing .bgm-btn__slash { display: none; }
.bgm-btn.is-playing .bgm-btn__bars { display: flex; }

@keyframes bgm-bar {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(1); }
}
@keyframes bgm-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bgm-btn { animation: none; }
  .bgm-btn__bars i { animation: none; transform: scaleY(0.7); }
  .bgm-btn__bars i:nth-child(2) { transform: scaleY(1); }
}
