/* ==========================================================================
   시안 1: 미니멀 화이트 (Minimal Pure)
   고요하고 절제된 호텔 예식 무드 · 순백 캔버스 + 먹색 세리프 + 헤어라인
   ========================================================================== */

:root {
  --bg-outer: #EFEFEA;
  --bg-page: #FFFFFF;
  --bg-tinted: #F8F8F6;
  --ink: #1E1E1D;
  --ink-soft: #595955;
  --ink-muted: #8C8C86;
  --line: #E7E7E2;
  --accent: #9A8870;
  --sun: #B5625A;
  --sat: #5C728A;
  --font-serif: 'Gowun Batang', Georgia, serif;
  --font-eng: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-outer);
  color: var(--ink);
  font-family: var(--font-serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button, input, textarea, select { font-family: var(--font-sans); }
a { color: inherit; text-decoration: none; }

.invitation-shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg-page);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  overflow-x: hidden;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dividers & Section chrome */
.hairline-divider {
  height: 1px;
  background: var(--line);
  margin: 0 28px;
}

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

.section-tinted {
  background: var(--bg-tinted);
}

.section-eng {
  display: block;
  font-family: var(--font-eng);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  margin: 0 0 28px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.section-sub {
  margin: -16px 0 28px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.section-hint {
  margin: -18px 0 24px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
}

.section-desc {
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
}

/* 1. HERO */
.hero {
  padding: 52px 32px 64px;
  text-align: center;
}

.eng-kicker {
  display: block;
  font-family: var(--font-eng);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.hero-date-numeral {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-eng);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 32px;
}

.hero-date-numeral .v-rule {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.hero-arch-frame {
  width: 100%;
  max-width: 310px;
  aspect-ratio: 3 / 4;
  margin: 0 auto 36px;
  border-radius: 170px 170px 0 0;
  overflow: hidden;
  background: #F1F1EE;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
}

.hero-arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-names {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-size: 21px;
  letter-spacing: 0.14em;
  margin-bottom: 18px;
}

.hero-names .name-sep {
  font-family: var(--font-eng);
  font-style: italic;
  font-size: 18px;
  color: var(--accent);
}

.hero-meta {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.85;
}
.hero-meta p { margin: 0; }

/* 2. GREETING & FAMILY */
.greeting-body {
  font-size: 14.5px;
  line-height: 2.05;
  color: var(--ink-soft);
  margin-bottom: 36px;
}
.greeting-body p { margin: 0 0 18px; }
.greeting-body p:last-child { margin-bottom: 0; }

.family-box {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.family-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  font-size: 14.5px;
  margin: 6px 0;
}
.family-row .relation {
  font-size: 12.5px;
  color: var(--ink-muted);
}
.family-row .child-name {
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: 0.06em;
}

/* Buttons */
.center-action {
  display: flex;
  justify-content: center;
}

.btn-outline,
.btn-solid,
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13.5px;
  letter-spacing: 0.04em;
}

.btn-outline {
  padding: 12px 28px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.btn-outline:hover { background: var(--ink); color: #FFF; }
.btn-outline.sm { padding: 10px 22px; font-size: 12.5px; }

.btn-solid {
  padding: 14px 32px;
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
  border-radius: 2px;
}
.btn-solid:hover { opacity: 0.88; }
.btn-solid:disabled { opacity: 0.5; cursor: wait; }
.btn-solid.full { width: 100%; }

.btn-ghost-sm {
  padding: 9px 18px;
  background: #FFFFFF;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
}
.btn-ghost-sm:hover { border-color: var(--ink); color: var(--ink); }

/* 3. CALENDAR & COUNTDOWN */
.calendar-wrap {
  padding: 20px 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px 2px;
  font-family: var(--font-sans);
}

.cal-head {
  font-size: 11px;
  color: var(--ink-muted);
  padding-bottom: 10px;
}
.cal-head.sun { color: var(--sun); }
.cal-head.sat { color: var(--sat); }

.cal-cell {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--ink);
}
.cal-cell.sun { color: var(--sun); }
.cal-cell.sat { color: var(--sat); }
.cal-cell.wedding-day span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.countdown-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.cd-unit {
  width: 56px;
  padding: 10px 0;
  background: #FFFFFF;
  border: 1px solid var(--line);
}
.cd-unit span {
  display: block;
  font-family: var(--font-eng);
  font-size: 24px;
  line-height: 1.1;
  color: var(--ink);
}
.cd-unit small {
  display: block;
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
  margin-top: 4px;
}
.cd-colon {
  font-family: var(--font-eng);
  color: var(--ink-muted);
}

.dday-summary {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.dday-summary strong { color: var(--accent); font-weight: 700; }

/* 4. GALLERY (Minimal 3-column grid) */
.gallery-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.gallery-cell {
  aspect-ratio: 1 / 1.18;
  padding: 0;
  border: 0;
  background: #F1F1EE;
  overflow: hidden;
  cursor: pointer;
}
.gallery-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.gallery-cell:hover img { transform: scale(1.04); }

/* 5. LOCATION & MAP */
.venue-header { margin-bottom: 22px; }
.venue-name {
  display: block;
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.venue-addr {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
}
.venue-sub-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
}
.text-link-btn {
  background: none;
  border: 0;
  padding: 2px 4px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font-size: 12px;
}

.map-frame {
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 12px;
  background: #EFEFEA;
}
.wedding-map {
  width: 100%;
  height: 230px;
}
.wedding-map .leaflet-tile-pane {
  filter: grayscale(85%) contrast(1.02);
}

.wedding-map-pin { text-align: center; }
.pin-dot {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.pin-label {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: #FFF;
  border: 1px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.map-fallback {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
}

.map-nav-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.nav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 6px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink);
}
.nav-chip:hover { border-color: var(--ink); }
.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.nav-dot.naver { background: #03C75A; }
.nav-dot.kakao { background: #FEE500; border: 1px solid #E0C500; }
.nav-dot.tmap { background: #3164F4; }

.transport-list { text-align: left; }
.transport-item {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.transport-item:last-child { border-bottom: 1px solid var(--line); }
.transport-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.transport-lines {
  margin: 0;
  padding-left: 16px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.75;
}

/* 6. ACCOUNTS ACCORDION */
.accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.accordion {
  border: 1px solid var(--line);
  background: #FFFFFF;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg-tinted);
  border: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.accordion-chevron { transition: transform 0.25s ease; }
.accordion.open .accordion-chevron { transform: rotate(180deg); }

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.accordion.open .accordion-panel { grid-template-rows: 1fr; }
.accordion-panel-inner { overflow: hidden; }

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-sans);
}
.account-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.account-role {
  font-size: 11px;
  color: var(--ink-muted);
}
.account-holder { font-size: 13.5px; font-weight: 600; }
.account-number { font-size: 12.5px; color: var(--ink-soft); }
.btn-copy-acc {
  flex-shrink: 0;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.btn-copy-acc:hover { border-color: var(--ink); }

/* 7. RSVP */
.rsvp-badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  background: #FFFFFF;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 12px;
}

/* 8. GUESTBOOK */
.gb-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
}

.gb-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.gb-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gb-form input,
.gb-form textarea,
.modal-body input[type="text"],
.modal-body input[type="tel"],
.modal-body input[type="password"],
.modal-body select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 13px;
  border-radius: 2px;
  outline: none;
}
.gb-form input:focus,
.gb-form textarea:focus,
.modal-body input:focus,
.modal-body select:focus {
  border-color: var(--ink);
}
.gb-form textarea { resize: vertical; min-height: 78px; }

.gb-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  margin-bottom: 18px;
}
.gb-card {
  padding: 16px 18px;
  background: var(--bg-tinted);
  border: 1px solid var(--line);
}
.gb-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-sans);
}
.gb-author { font-size: 13px; font-weight: 600; }
.gb-meta-right { display: flex; align-items: center; gap: 8px; }
.gb-date { font-size: 11px; color: var(--ink-muted); }
.gb-del-btn {
  background: none;
  border: 0;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.gb-del-btn:hover { color: var(--ink); }
.gb-message {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.gb-empty {
  padding: 30px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

/* 9. FOOTER */
.footer {
  padding: 40px 28px 56px;
  background: var(--ink);
  color: #FFFFFF;
  text-align: center;
}
.share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}
.share-btn {
  padding: 12px 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  font-size: 12.5px;
  cursor: pointer;
}
.share-btn:hover { background: rgba(255, 255, 255, 0.1); }
.footer-credit {
  margin: 0;
  font-family: var(--font-eng);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.55);
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1000;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal-sheet {
  width: 100%;
  max-width: 390px;
  max-height: 86vh;
  overflow-y: auto;
  background: #FFFFFF;
  color: var(--ink);
  border-radius: 3px;
}
.modal-sheet.compact { max-width: 330px; }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}
.modal-close {
  background: none;
  border: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}
.modal-body { padding: 20px; }
.modal-hint {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* Contact Modal */
.contact-group { margin-bottom: 18px; }
.contact-group:last-child { margin-bottom: 0; }
.contact-group-title {
  margin: 0 0 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans);
}
.contact-role { font-size: 11.5px; color: var(--ink-muted); margin-right: 8px; }
.contact-name { font-size: 14px; font-weight: 500; }
.contact-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.icon-btn:hover { background: var(--ink); color: #FFF; border-color: var(--ink); }

/* RSVP Form */
.rsvp-form { display: flex; flex-direction: column; gap: 14px; }
.field-group { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}
.seg-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.seg-group.three { grid-template-columns: repeat(3, 1fr); }
.seg-option { cursor: pointer; }
.seg-option input { display: none; }
.seg-option span {
  display: block;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.seg-option input:checked + span {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 12, 0.94);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 1200;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
}
.lb-close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: #FFF;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lb-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  overflow: hidden;
}
.lb-stage img {
  max-height: 76vh;
  max-width: 92vw;
  object-fit: contain;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #FFF;
  font-size: 24px;
  cursor: pointer;
}
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.lb-caption {
  text-align: center;
  padding: 14px 20px 24px;
  font-family: var(--font-eng);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.72);
}

/* TOAST */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  background: rgba(24, 24, 24, 0.92);
  color: #FFFFFF;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1500;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* MAP LOCK BUTTON & INFORMATION TABS & GALLERY MORE */
.map-lock-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 450;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.map-lock-btn.unlocked {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.info-tabs { text-align: left; }
.info-tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.info-tab-btn {
  padding: 12px 6px;
  background: var(--bg-tinted);
  border: 1px solid var(--line);
  border-bottom: 0;
  margin-right: -1px;
  font-size: 12.5px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.info-tab-btn.active {
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 600;
  border-top: 2px solid var(--ink);
}
.info-tab-panel {
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.info-tab-panel p { margin: 0 0 10px; }
.info-tab-panel p:last-child { margin-bottom: 0; }

.gallery-more-wrap { margin-top: 18px; text-align: center; }
.btn-gallery-more {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  cursor: pointer;
}
.btn-gallery-more:hover { border-color: var(--ink); }
