/* ==========================================================================
   Wedding Invitation – 준혁 & 미진
   모바일 최적화 / 한국 청첩장 우아한 감성
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors – 따뜻한 아이보리 베이스 + 깊은 그린 액센트 */
  --bg: #f5f1ea;
  --bg-alt: #ebe5da;
  --paper: #fbf8f3;
  --ink: #2b2b27;
  --ink-soft: #5c5a52;
  --ink-muted: #8a8678;
  --accent: #4a5d4a;
  --accent-light: #7a8a72;
  --gold: #a08a5a;
  --line: #d8d0c0;
  --sun: #c44a3a;

  /* Type */
  --font-display: 'Cormorant Garamond', 'Noto Serif KR', serif;
  --font-serif: 'Noto Serif KR', 'Gowun Batang', serif;
  --font-body: 'Gowun Batang', 'Noto Serif KR', serif;

  /* Layout */
  --max-w: 460px;
  --pad: 28px;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;

  /* 모바일 컨테이너 시뮬레이션 (데스크탑에서 봤을 때) */
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.06);
  position: relative;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   1. COVER (첫 페이지)
   ========================================================================== */
.cover {
  padding: 70px var(--pad) 60px;
  text-align: center;
  background:
    radial-gradient(ellipse at top, rgba(74, 93, 74, 0.04), transparent 60%),
    var(--paper);
  position: relative;
}

.cover__ornament {
  width: 120px;
  height: 24px;
  margin: 0 auto 36px;
  color: var(--accent);
  opacity: 0.7;
}

.cover__date-eng {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--ink-soft);
  margin-bottom: 28px;
  font-weight: 300;
}

.cover__names {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 56px;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.cover__name {
  display: inline-block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 44px;
}

.cover__amp {
  display: inline-block;
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
  margin: 0 8px;
  font-size: 48px;
}

.cover__korean {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 17px;
  color: var(--ink-soft);
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  margin-bottom: 32px;
}

.cover__divider {
  width: 1px;
  height: 40px;
  background: var(--line);
  margin: 0 auto 32px;
}

/* 핵심 정보 카드 */
.cover__keyinfo {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px 20px;
  margin-bottom: 24px;
  text-align: center;
}

.keyinfo__row {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}

.keyinfo__row:last-child {
  border-bottom: none;
}

.keyinfo__label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.keyinfo__value {
  display: block;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
}

.keyinfo__sub {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 400;
}

/* 첫 페이지 약도 미리보기 */
.cover__map {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 14px;
  margin-bottom: 24px;
  position: relative;
}

.cover__map img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
}

.map__more {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* 첫 페이지 계좌 (접힘) */
.cover__account {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 2px;
  margin-bottom: 32px;
  overflow: hidden;
}

.cover__account summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.05em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cover__account summary::-webkit-details-marker {
  display: none;
}

.account__chevron {
  font-size: 14px;
  color: var(--accent);
  transition: transform 0.3s ease;
  font-weight: 300;
}

.cover__account[open] .account__chevron {
  transform: rotate(45deg);
}

.account__panel {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.account__card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 14px 16px;
  border-radius: 2px;
}

.account__role {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.account__bank {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.account__number {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.03em;
}

.account__copy {
  font-size: 11px;
  background: var(--accent);
  color: #fff;
  padding: 5px 12px;
  border-radius: 14px;
  letter-spacing: 0.05em;
  font-weight: 500;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.account__copy:active {
  background: var(--ink);
}

/* 스크롤 표시 */
.cover__scroll {
  width: 1px;
  height: 50px;
  margin: 0 auto;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.cover__scroll span {
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollDown 2.4s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -50px; }
  100% { top: 100px; }
}

/* ==========================================================================
   COMMON SECTION
   ========================================================================== */
.section {
  padding: 80px var(--pad) 60px;
  text-align: center;
}

.section__eng {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--accent);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.section__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: 0.2em;
  padding-left: 0.2em;
}

.section__line {
  width: 30px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 36px;
}

/* ==========================================================================
   2. GREETING
   ========================================================================== */
.greeting {
  background: var(--paper);
}

.greeting__body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2;
  margin-bottom: 28px;
}

.greeting__families {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink);
  line-height: 2.2;
}

.greeting__families p {
  margin-bottom: 4px;
}

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

.family__name {
  font-weight: 600;
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   3. GALLERY (4x4 썸네일 그리드 + 라이트박스)
   ========================================================================== */
.gallery {
  background: var(--bg);
}

.gallery__hint {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: -22px;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}

/* 썸네일 그리드 - 4열 */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.grid__item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
  border-radius: 2px;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s, transform 0.15s;
}

.grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.grid__item:active {
  transform: scale(0.96);
}

@media (hover: hover) {
  .grid__item:hover {
    opacity: 0.85;
  }
}

/* 그리드 placeholder */
.grid__item--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e0d0 0%, #d4cabc 100%);
  cursor: default;
}

.grid__item--placeholder svg {
  width: 36%;
  height: 36%;
  color: var(--accent);
  opacity: 0.35;
}

/* ==========================================================================
   3-2. LIGHTBOX (전체화면 사진 보기 - 무한 반복)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 19, 16, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.lightbox--open {
  display: flex;
  animation: lbFade 0.25s ease;
}

@keyframes lbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__stage {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.lightbox__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.lightbox__track--no-transition {
  transition: none !important;
}

.lightbox__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox__slide--placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.1em;
}

/* 닫기 버튼 */
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s;
}

.lightbox__close:active {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__close svg {
  width: 22px;
  height: 22px;
}

/* 좌우 버튼 */
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, transform 0.15s;
}

.lightbox__btn:active {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(0.92);
}

.lightbox__btn--prev { left: 14px; }
.lightbox__btn--next { right: 14px; }

.lightbox__btn svg {
  width: 24px;
  height: 24px;
}

/* 카운터 */
.lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 16px;
  border-radius: 18px;
}

.lightbox__counter-sep {
  margin: 0 5px;
  opacity: 0.6;
}


/* ==========================================================================
   4. CALENDAR
   ========================================================================== */
.calendar-section {
  background: var(--paper);
}

.calendar {
  max-width: 340px;
  margin: 0 auto;
}

.calendar__month {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--ink);
  margin-bottom: 20px;
  font-weight: 400;
}

.calendar__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-display);
}

.calendar__table th {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  font-weight: 400;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.calendar__table td {
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink);
  text-align: center;
  font-weight: 400;
}

.cal--sun { color: var(--sun); }

.cal--day {
  position: relative;
}

.cal--day span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 500;
  font-family: var(--font-serif);
  font-size: 14px;
}

.calendar__time {
  margin-top: 24px;
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.countdown {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.6;
}

.countdown strong {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

/* ==========================================================================
   5. LOCATION
   ========================================================================== */
.location {
  background: var(--bg);
  padding-left: 0;
  padding-right: 0;
}

.location .section__eng,
.location .section__title,
.location .section__line {
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.location__map {
  margin: 0 var(--pad) 16px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.location__map img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.location__info {
  padding: 0 var(--pad);
  margin-bottom: 30px;
}

.location__venue {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.location__address {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  line-height: 1.7;
}

.location__tel a {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}

.location__nav {
  display: flex;
  gap: 8px;
  margin: 24px var(--pad) 0;
  justify-content: center;
}

.nav__btn {
  flex: 1;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  text-align: center;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav__btn:active {
  background: var(--bg-alt);
  border-color: var(--accent);
}

/* 교통 정보 */
.transport {
  padding: 36px var(--pad) 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: left;
}

.transport__item {
  padding-bottom: 22px;
  border-bottom: 1px dashed var(--line);
}

.transport__item:last-child { border-bottom: none; }

.transport__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.transport__icon {
  font-size: 16px;
}

.transport__body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.8;
}

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

.transport__sub {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ==========================================================================
   6. ACCOUNT SECTION (상세)
   ========================================================================== */
.account-section {
  background: var(--paper);
}

.account-section__intro {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.9;
  margin-bottom: 32px;
}

.account__grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account__card--full {
  padding: 20px 22px;
  text-align: left;
}

.account__card--full .account__role { margin-bottom: 6px; }
.account__card--full .account__bank { font-size: 14px; margin-bottom: 6px; }
.account__card--full .account__number { font-size: 17px; }

/* 양가 아코디언 그룹 (신랑측 / 신부측) */
.account__groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account__group {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.account__group summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.08em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.account__group summary::-webkit-details-marker {
  display: none;
}

.account__group[open] .account__chevron {
  transform: rotate(45deg);
}

.account__group-panel {
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideDown 0.4s ease;
}

/* 첫 페이지 부모님 안내 문구 */
.account__note {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.6;
  padding: 4px 4px 0;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
  background: var(--accent);
  color: var(--paper);
  padding: 60px var(--pad);
  text-align: center;
}

.footer__names {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.3em;
  font-weight: 300;
  margin-bottom: 10px;
}

.footer__date {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.4em;
  opacity: 0.85;
  margin-bottom: 28px;
}

.footer__share {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 12px 32px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.15em;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.footer__share:active {
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   TOAST
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(43, 43, 39, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.05em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  max-width: 90%;
  text-align: center;
}

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

/* ==========================================================================
   Responsive (작은 모바일)
   ========================================================================== */
@media (max-width: 360px) {
  :root {
    --pad: 22px;
  }

  .cover__names { font-size: 48px; }
  .cover__name { font-size: 38px; }
  .cover__amp { font-size: 42px; }
  .section__title { font-size: 19px; }
}

/* 데스크탑에서 외부 배경 */
@media (min-width: 500px) {
  html {
    background:
      radial-gradient(ellipse at top, #e8e0d0, transparent 70%),
      #d8d0c0;
    min-height: 100vh;
  }
}


/* 카카오맵 (정적 지도) */
.location__kakao {
  display: block;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.location__kakao-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  text-align: center;
}

/* 손그림 약도 (펼침/접힘) */
.location__sketch {
  margin: 0 var(--pad) 28px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.location__sketch summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.location__sketch summary::-webkit-details-marker { display: none; }
.location__sketch[open] .account__chevron { transform: rotate(45deg); }
.location__sketch-img {
  padding: 0 14px 14px;
  background: #fff;
}
.location__sketch-img img {
  width: 100%;
  border-radius: 2px;
  margin-top: 12px;
}
