:root {
  --bg: #fdfbf7;
  --bg-alt: #f7f1e8;
  --ink: #3f3a36;
  --ink-soft: #7a726a;
  --accent: #b98a7f;
  --accent-deep: #9c6b60;
  --line: #e5dcd0;
  --white: #ffffff;
  --serif: "Gowun Batang", serif;
  --sans: "Noto Sans KR", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: #efe9df;
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.section {
  padding: 72px 28px;
  text-align: center;
}

.section-label {
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}

.divider {
  width: 36px;
  height: 1px;
  background: var(--accent);
  margin: 22px auto 30px;
}

/* ---------- 커버 ---------- */
.cover {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(185, 138, 127, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(185, 138, 127, 0.12), transparent 50%),
    var(--bg);
}

.cover-eyebrow {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 6px;
  color: var(--accent);
  margin-bottom: 28px;
}

.cover-photo {
  width: 230px;
  height: 300px;
  border-radius: 115px 115px 8px 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 34px;
}

.cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-illust { width: 130px; height: 130px; }

.cover-names {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cover-names .amp {
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
}

.cover-date {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-soft);
}

.cover-venue {
  font-size: 14px;
  color: var(--ink-soft);
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  opacity: 0.7;
}

.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.status-message {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink-soft);
  white-space: pre-line;
  line-height: 2;
}

/* ---------- 인사말 ---------- */
.greeting-message {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink);
  white-space: pre-line;
  margin-bottom: 40px;
}

.parents {
  font-size: 15px;
  display: grid;
  gap: 8px;
  margin-bottom: 36px;
}

.parents-names { color: var(--ink-soft); }

.parents-relation {
  font-size: 12px;
  color: var(--accent);
  margin: 0 4px;
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-deep);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn:active { background: var(--accent); color: var(--white); }

/* ---------- 달력 ---------- */
.calendar-section { background: var(--bg-alt); }

.calendar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 18px;
  max-width: 320px;
  margin: 0 auto 36px;
}

.calendar-head {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
}

.calendar-weekdays, .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px 0;
}

.calendar-weekdays span {
  font-size: 12px;
  color: var(--ink-soft);
  padding-bottom: 8px;
}

.calendar-weekdays .sun { color: #c96b5f; }
.calendar-weekdays .sat { color: #6b8bc9; }

.calendar-grid span {
  font-size: 14px;
  padding: 7px 0;
  position: relative;
}

.calendar-grid .sun { color: #c96b5f; }
.calendar-grid .sat { color: #6b8bc9; }

.calendar-grid .wedding-day {
  color: var(--white);
  font-weight: 700;
}

.calendar-grid .wedding-day::before {
  content: "";
  position: absolute;
  inset: 2px 50% 2px 50%;
  width: 32px;
  height: 32px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  border-radius: 50%;
  z-index: -1;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.count-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 66px;
  padding: 12px 0 10px;
  display: flex;
  flex-direction: column;
}

.count-num {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-deep);
}

.count-label { font-size: 11px; color: var(--ink-soft); }

.countdown-caption { font-size: 14px; color: var(--ink-soft); }

.countdown-caption strong { color: var(--accent-deep); }

/* ---------- 갤러리 ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-grid .gallery-item {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--bg-alt);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:active img { transform: scale(1.04); }

/* ---------- 오시는 길 ---------- */
.location-section { background: var(--bg-alt); }

.venue-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

.venue-address {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.venue-tel { margin: 6px 0 24px; }

.venue-tel a {
  font-size: 13px;
  color: var(--accent-deep);
  text-decoration: none;
}

.map-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 34px;
}

.btn-map {
  font-size: 13px;
  padding: 10px 18px;
  background: var(--white);
}

.directions {
  text-align: left;
  display: grid;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 20px;
}

.direction-item { display: flex; gap: 12px; font-size: 14px; }

.direction-label {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--accent-deep);
  width: 48px;
}

.direction-detail { color: var(--ink-soft); }

/* ---------- 계좌 ---------- */
.accounts-caption {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 30px;
}

.accounts { display: grid; gap: 12px; }

.account-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
}

.account-toggle {
  width: 100%;
  border: none;
  background: var(--bg-alt);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-toggle .arrow { transition: transform 0.25s; color: var(--accent); }

.account-group.open .arrow { transform: rotate(180deg); }

.account-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.account-group.open .account-body { max-height: 400px; }

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.account-info { font-size: 13px; }

.account-info .holder { font-weight: 500; }

.account-info .number { color: var(--ink-soft); font-size: 13px; }

.btn-copy {
  flex-shrink: 0;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
}

.btn-copy:active { background: var(--accent); color: var(--white); border-color: var(--accent); }

/* ---------- 푸터 ---------- */
.footer-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  padding-bottom: 56px;
}

.footer-illust { color: var(--accent); margin-bottom: 14px; }

.footer-illust svg { width: 72px; }

.footer-names {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-thanks {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

.footer-copy {
  margin-top: 40px;
  font-size: 11px;
  letter-spacing: 1px;
  color: #b6ada2;
}

/* ---------- 모달 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal.show { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 34, 30, 0.5);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 34px;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-family: var(--serif);
  font-size: 18px;
  text-align: center;
  margin-bottom: 20px;
}

.contact-groups { display: grid; gap: 18px; margin-bottom: 22px; }

.contact-group-title {
  font-size: 13px;
  color: var(--accent-deep);
  font-weight: 700;
  margin-bottom: 8px;
  text-align: left;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.contact-row .who { color: var(--ink); }

.contact-actions { display: flex; gap: 8px; }

.contact-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  padding: 7px 0;
  border-radius: 8px;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
}

.modal-close { width: 100%; }

/* ---------- 라이트박스 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.show { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.92);
}

.lightbox-img {
  position: relative;
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  padding: 16px 12px;
  cursor: pointer;
  z-index: 1;
}

.lightbox-nav.prev { left: 4px; }
.lightbox-nav.next { right: 4px; }

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 1;
}

/* ---------- 토스트 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  background: rgba(50, 42, 38, 0.92);
  color: #fff;
  font-size: 13px;
  padding: 11px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 120;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 스크롤 페이드인 ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
