/* ═══════════════════════════════════════════
   Nature Green Wedding Invitation
   Korean Mobile 청첩장 - Styles
   ═══════════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  --color-sage: #8B9E7E;
  --color-sage-light: #a8b89e;
  --color-sage-lighter: #c5d2bc;
  --color-forest: #4A5E3B;
  --color-forest-dark: #3a4b2e;
  --color-cream: #F5F2E8;
  --color-warm-white: #FAFAF5;
  --color-brown: #8B7355;
  --color-brown-light: #a89578;

  --color-bg: var(--color-warm-white);
  --color-bg-warm: var(--color-cream);
  --color-bg-card: #ffffff;
  --color-text: #3d3d32;
  --color-text-light: #6b6b5e;
  --color-text-muted: #9a9a8a;
  --color-accent: var(--color-sage);
  --color-accent-light: var(--color-sage-light);
  --color-accent-dark: var(--color-forest);
  --color-border: #ddd8cc;
  --color-divider: #ccc7b8;
  --color-overlay: rgba(58, 64, 50, 0.6);
  --color-kakao: #fee500;
  --color-naver: #03c75a;
  --color-white: #ffffff;
  --color-toast-bg: rgba(74, 94, 59, 0.92);

  --font-serif: 'Noto Serif KR', 'Georgia', serif;
  --font-sans: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-square: 'NanumSquare', 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* ── Fluid scale (360px Galaxy S ~ 440px iPhone Pro Max) ──
     vw 기반 clamp로 기기별 분기 없이 폭에 맞춰 자연스럽게 확대/축소 */
  --gutter: clamp(1.25rem, 5.6vw, 1.75rem);
  --section-pad: clamp(4.5rem, 22vw, 6rem);
  --fs-body: clamp(0.875rem, 3.9vw, 0.9375rem);
  --fs-hero-names: clamp(1.625rem, 7.3vw, 2rem);
  --ls-hero-names: clamp(4px, 1.8vw, 8px);
  --fs-countdown: clamp(1.625rem, 8.2vw, 2rem);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: only light;
  background-color: var(--color-forest-dark);
}

/* 안전 영역(노치/다이내믹 아일랜드/홈 인디케이터)은 body가 아닌
   각 섹션에서 처리 → 히어로 사진이 화면 끝까지 꽉 차고 흰 띠가 생기지 않음 */
body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: keep-all;
}

/* 스크롤 잠금: top 값은 script.js가 현재 스크롤 위치로 지정 (열고 닫을 때 위치 유지) */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}

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

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

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

/* ─── Utility ─── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════
   Curtain Opening Animation
   ═══════════════════════════════════════════ */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.curtain__left,
.curtain__right {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.18, 1);
  will-change: transform;
}

.curtain__left {
  left: 0;
  background: linear-gradient(135deg, #3a4b2e 0%, #4A5E3B 40%, #5a6e4b 100%);
}

.curtain__right {
  right: 0;
  background: linear-gradient(225deg, #3a4b2e 0%, #4A5E3B 40%, #5a6e4b 100%);
}

/* Botanical texture on curtain panels */
.curtain__left::after,
.curtain__right::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80px 120px at 30% 20%, rgba(139,158,126,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60px 90px at 70% 60%, rgba(139,158,126,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 100px 60px at 50% 85%, rgba(139,158,126,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.curtain.is-open .curtain__left {
  transform: translateX(-100%);
}

.curtain.is-open .curtain__right {
  transform: translateX(100%);
}

.curtain.is-open .curtain__content {
  opacity: 0;
  transform: scale(0.9);
}

.curtain.is-hidden {
  display: none;
}

.curtain__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.curtain__leaf-icon {
  margin-bottom: var(--spacing-md);
  opacity: 0.6;
}

.curtain__subtitle {
  font-family: var(--font-square);
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: var(--spacing-md);
  opacity: 0.75;
}

.curtain__names {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: 6px;
  margin-bottom: var(--spacing-lg);
}

.curtain__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--color-white);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  letter-spacing: 3px;
  background: rgba(255, 255, 255, 0.05);
  transition: var(--transition);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.curtain__btn:hover,
.curtain__btn:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ═══════════════════════════════════════════
   Falling Leaves Canvas
   ═══════════════════════════════════════════ */
.leaf-canvas {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ═══════════════════════════════════════════
   Toast
   ═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(2rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-toast-bg);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 2 * var(--gutter));
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ═══════════════════════════════════════════
   Photo Modal
   ═══════════════════════════════════════════ */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.photo-modal__close {
  position: absolute;
  top: calc(1rem + var(--safe-top));
  right: calc(1rem + var(--safe-right));
  color: var(--color-white);
  font-size: 2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.photo-modal__close:hover {
  opacity: 1;
}

.photo-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-white);
  font-size: 2.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.photo-modal__nav:hover {
  opacity: 1;
}

.photo-modal__nav--prev {
  left: calc(0.5rem + var(--safe-left));
}

.photo-modal__nav--next {
  right: calc(0.5rem + var(--safe-right));
}

.photo-modal__container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(3.5rem + var(--safe-top))
    calc(2.5rem + var(--safe-right))
    calc(3.5rem + var(--safe-bottom))
    calc(2.5rem + var(--safe-left));
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.photo-modal__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.photo-modal__counter {
  position: absolute;
  bottom: calc(1.5rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════
   Main Content
   ═══════════════════════════════════════════ */
.main-content {
  max-width: 100%;
  overflow: hidden;
}

/* ─── Section Base ─── */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section__inner {
  max-width: 640px;
  margin: 0 auto;
  padding-left: calc(var(--gutter) + var(--safe-left));
  padding-right: calc(var(--gutter) + var(--safe-right));
  text-align: center;
}

.section__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: var(--spacing-lg);
  color: var(--color-forest);
}

/* ─── Botanical Ornaments ─── */
.botanical-ornament {
  margin-bottom: var(--spacing-md);
  display: flex;
  justify-content: center;
}

/* ─── Leaf Dividers between sections ─── */
.leaf-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-sm) 0;
  background: linear-gradient(180deg, var(--color-warm-white) 0%, var(--color-cream) 50%, var(--color-warm-white) 100%);
}

.leaf-divider svg {
  width: 120px;
  height: auto;
}

/* ═══════════════════════════════════════════
   Hero Section
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  /* svh: 주소창이 보이는 상태 기준 높이 → 스크롤 시 높이가 출렁이지 않음 */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  overflow: hidden;
  background-color: var(--color-forest-dark);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 35%,
    rgba(58, 75, 46, 0.2) 75%,
    rgba(58, 75, 46, 0.55) 85%,
    rgba(58, 75, 46, 0.85) 100%
  );
  z-index: 1;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding:
    var(--spacing-lg)
    calc(var(--gutter) + var(--safe-right))
    calc(var(--spacing-lg) + var(--safe-bottom))
    calc(var(--gutter) + var(--safe-left));
  width: 100%;
}

/* 상단 좌·우 작은 문구 */
.hero__top {
  position: absolute;
  top: calc(1rem + var(--safe-top));
  left: calc(var(--gutter) + var(--safe-left));
  right: calc(var(--gutter) + var(--safe-right));
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-square);
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1.4;
  color: var(--color-white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  /* 스크롤 감지(IntersectionObserver) 대신 로드 시 바로 나타나는 애니메이션.
     화면 맨 위에 붙어 있어 감지 방식은 기기에 따라 끝까지 안 보일 수 있음 */
  animation: hero-top-in 0.8s ease 0.2s both;
}

@keyframes hero-top-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__top { animation: none; }
}

.hero__names {
  font-family: var(--font-square);
  font-size: var(--fs-hero-names);
  font-weight: 300;   /* 나눔스퀘어 Light (200 굵기는 없음) */
  letter-spacing: var(--ls-hero-names);
  line-height: 1.4;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}


/* ─── Countdown ─── */
/* 예식 일정 섹션의 달력 아래에 표시 (밝은 배경용 색) */
.countdown {
  margin-top: var(--spacing-lg);
  text-align: center;
  color: var(--color-forest);
}

.countdown__label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-sm);
}

.countdown__timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.25rem, 1.6vw, 0.5rem);
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(3rem, 14vw, 3.5rem);
}

.countdown__number {
  font-family: var(--font-sans);
  font-size: var(--fs-countdown);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 2px;
}

.countdown__unit {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.countdown__sep {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-sage-light);
  margin-top: -1rem;
}

/* ═══════════════════════════════════════════
   Greeting Section
   ═══════════════════════════════════════════ */
.greeting {
  background:
    radial-gradient(ellipse 300px 200px at 10% 20%, rgba(139,158,126,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 250px 180px at 90% 80%, rgba(139,158,126,0.06) 0%, transparent 70%),
    var(--color-warm-white);
}

.greeting__text {
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 2;
  color: var(--color-text-light);
  white-space: pre-line;
  margin-bottom: var(--spacing-xl);
}

.greeting__parents {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 2.2;
  color: var(--color-text);
  letter-spacing: 1px;
}

.greeting__parents .parent-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.greeting__parents .parent-dot {
  color: var(--color-sage);
  font-size: 0.5rem;
}

.greeting__parents .child-name {
  font-weight: 500;
  color: var(--color-forest);
}

.greeting__parents .deceased::before {
  content: "故 ";
  font-size: 0.75em;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════
   Gallery Section
   ═══════════════════════════════════════════ */
.gallery {
  background:
    radial-gradient(ellipse 200px 200px at 15% 50%, rgba(139,158,126,0.05) 0%, transparent 70%),
    var(--color-warm-white);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.gallery__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery__item:hover img {
  transform: scale(1.08);
}

/* 갤러리 '더 보기' 버튼 (지도 버튼과 같은 톤) */
.gallery__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 10rem;
  min-height: 44px;
  margin-top: var(--spacing-md);
  padding: 0 1.5rem;
  font-family: var(--font-square);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--color-forest);
  background: var(--color-bg-card);
  border: 1px solid rgba(139, 158, 126, 0.35);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(74, 94, 59, 0.06);
  transition: var(--transition);
}

.gallery__more svg {
  transition: transform var(--transition);
}

/* 펼친 상태: 화살표를 위로 */
.gallery__more.is-expanded svg {
  transform: rotate(180deg);
}

/* 누르는 동안에만 색 변경 (모바일에서 :hover가 남아 색이 유지되는 문제 방지) */
.gallery__more:active {
  background: var(--color-forest);
  border-color: var(--color-forest);
  color: var(--color-white);
}

@media (hover: hover) {
  .gallery__more:hover {
    background: var(--color-forest);
    border-color: var(--color-forest);
    color: var(--color-white);
  }
}

/* ═══════════════════════════════════════════
   Location Section
   ═══════════════════════════════════════════ */
.location {
  background:
    radial-gradient(ellipse 300px 200px at 80% 20%, rgba(139,158,126,0.06) 0%, transparent 70%),
    var(--color-warm-white);
}

.location__info {
  margin-bottom: var(--spacing-md);
}

.location__venue {
  font-size: 1.0625rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  letter-spacing: 1px;
  color: var(--color-forest);
}

.location__hall {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-xs);
}

.location__address {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.location__tel {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.location__copy {
  margin-bottom: var(--spacing-lg);
}

.location__map {
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(74, 94, 59, 0.1);
}

.location__map-img {
  display: block;
  width: 100%;
  height: auto;   /* 약도 원본 비율 그대로 (잘림 없음) */
}

.location__links {
  display: flex;
  gap: clamp(0.5rem, 2.5vw, 1rem);
  justify-content: center;
  flex-wrap: wrap;
}

.location__links .btn {
  flex: 1 1 0;
  max-width: 10rem;
  min-height: 44px;
  /* 청첩장 톤(세이지·포레스트)에 맞춘 지도 버튼 */
  background: var(--color-bg-card);
  color: var(--color-forest);
  border: 1px solid rgba(139, 158, 126, 0.35);
  border-radius: var(--radius-md);
  font-family: var(--font-square);
  font-weight: 400;
  box-shadow: 0 2px 12px rgba(74, 94, 59, 0.06);
  filter: none;
}

.location__links .btn:active {
  background: var(--color-forest);
  border-color: var(--color-forest);
  color: var(--color-white);
  filter: none;
}

@media (hover: hover) {
  .location__links .btn:hover {
    background: var(--color-forest);
    border-color: var(--color-forest);
    color: var(--color-white);
    filter: none;
  }
}

/* ─── Calendar (inline in location) ─── */
/* ═══════════════════════════════════════════
   Schedule Section (예식 일정)
   ═══════════════════════════════════════════ */
.schedule .section__title {
  margin-bottom: var(--spacing-sm);
}

/* 예식 날짜·시간 (히어로에서 이동) */
.schedule__date {
  font-family: var(--font-square);
  font-size: var(--fs-body);
  font-weight: 400;
  letter-spacing: 1px;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: var(--spacing-lg);
}

.schedule {
  background:
    radial-gradient(ellipse 250px 200px at 15% 25%, rgba(139,158,126,0.06) 0%, transparent 70%),
    var(--color-warm-white);
}

.calendar {
  max-width: 360px;
  margin: 0 auto;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 4.5vw, 1.5rem);
  box-shadow: 0 2px 20px rgba(74, 94, 59, 0.06);
  border: 1px solid rgba(139, 158, 126, 0.15);
}

.calendar__header {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-sm);
  color: var(--color-forest);
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-bottom: 0.25rem;
}

.calendar__weekday {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.5rem 0;
}

.calendar__weekday:first-child {
  color: #c97070;
}

.calendar__weekday:last-child {
  color: #6a8caf;
}

.calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.calendar__day {
  text-align: center;
  padding: 0.5rem 0;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--color-text-light);
  position: relative;
}

.calendar__day:nth-child(7n+1) {
  color: #c97070;
}

.calendar__day:nth-child(7n) {
  color: #6a8caf;
}

.calendar__day.is-empty {
  visibility: hidden;
}

.calendar__day.is-today {
  font-weight: 700;
  color: #fff;
  background: var(--color-sage);
  border-radius: 50%;
}

/* ═══════════════════════════════════════════
   Account Section (축의금)
   ═══════════════════════════════════════════ */
.account {
  background:
    radial-gradient(ellipse 250px 200px at 20% 30%, rgba(139,158,126,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 200px 150px at 80% 70%, rgba(139,158,126,0.04) 0%, transparent 70%),
    var(--color-warm-white);
}

.account__desc {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

/* ─── Accordion ─── */
.accordion {
  max-width: 400px;
  margin: 0 auto var(--spacing-sm);
  border: 1px solid rgba(139, 158, 126, 0.25);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-card);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 1rem clamp(1rem, 4vw, 1.25rem);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 1px;
  transition: background var(--transition);
}

.accordion__trigger:hover {
  background: rgba(139, 158, 126, 0.06);
}

.accordion__trigger span:nth-child(2) {
  flex: 1;
  text-align: left;
  margin-left: 0.5rem;
}

.accordion__icon {
  color: var(--color-sage);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
}

.accordion__arrow {
  transition: transform var(--transition);
  flex-shrink: 0;
  color: var(--color-sage);
}

.accordion__trigger[aria-expanded="true"] .accordion__arrow {
  transform: rotate(180deg);
}

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion__panel-inner {
  padding: 0 clamp(1rem, 4vw, 1.25rem) 1rem;
}

.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.account-item:last-child {
  border-bottom: none;
}

.account-item__info {
  text-align: left;
  min-width: 0;
  flex: 1 1 auto;
}

.account-item__role {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 1px;
}

.account-item__detail {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--color-text);
  margin-top: 0.125rem;
}

.account-item__name {
  font-weight: 400;
}

.account-item__copy {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-forest);
  border: 1px solid var(--color-sage-light);
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 36px;
}

.account-item__copy:hover {
  background: var(--color-sage);
  color: var(--color-white);
  border-color: var(--color-sage);
}

/* ═══════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 1px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  line-height: 1;
}

.btn--outline {
  border: 1px solid rgba(139, 158, 126, 0.3);
  color: var(--color-text-light);
  background: var(--color-bg-card);
}

.btn--outline:hover {
  border-color: var(--color-sage);
  color: var(--color-forest);
  background: rgba(139, 158, 126, 0.06);
}

.btn--text {
  color: var(--color-forest);
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn--text:hover {
  color: var(--color-sage);
}

.btn--kakao {
  background: var(--color-kakao);
  color: #3a1d1d;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 400;
}

.btn--kakao:hover {
  filter: brightness(0.95);
}

.btn--naver {
  background: var(--color-naver);
  color: var(--color-white);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 400;
}

.btn--naver:hover {
  filter: brightness(0.9);
}

/* ═══════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════ */
.footer {
  padding:
    var(--spacing-lg)
    calc(var(--gutter) + var(--safe-right))
    calc(var(--spacing-lg) + var(--safe-bottom))
    calc(var(--gutter) + var(--safe-left));
  text-align: center;
  background:
    linear-gradient(180deg, var(--color-warm-white) 0%, rgba(139,158,126,0.08) 100%);
  border-top: 1px solid rgba(139, 158, 126, 0.15);
}

.footer__leaf {
  margin-bottom: var(--spacing-sm);
  display: flex;
  justify-content: center;
  opacity: 0.6;
}

.footer__text {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-text-muted);
  letter-spacing: 2px;
}

/* ═══════════════════════════════════════════
   Loading Placeholder
   ═══════════════════════════════════════════ */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--spacing-lg) 0;
}

.loading-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-sage-light);
  animation: loadingPulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingPulse {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  40% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ═══════════════════════════════════════════
   Scroll Animations
   ═══════════════════════════════════════════ */
.animate-item {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.animate-item[data-animate="fade-up"] {
  transform: translateY(30px);
}

.animate-item[data-animate="fade-down"] {
  transform: translateY(-30px);
}

.animate-item[data-animate="fade-in"] {
  transform: none;
}

.animate-item[data-animate="scale-in"] {
  transform: scale(0.92);
}

.animate-item.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ═══════════════════════════════════════════
   Responsive - Tablet (768px+)
   ═══════════════════════════════════════════ */
@media (min-width: 768px) {
  .section__inner {
    max-width: 720px;
    padding: 0 var(--spacing-lg);
  }

  .hero__names {
    font-size: 2.5rem;
    letter-spacing: 12px;
  }

  .countdown__number {
    font-size: 2.5rem;
  }

  .countdown__item {
    min-width: 4.5rem;
  }

  .gallery__grid {
    gap: 4px;
  }

  .section__title {
    font-size: 1.375rem;
  }

  .leaf-divider svg {
    width: 160px;
  }
}

/* ═══════════════════════════════════════════
   Responsive - Desktop (1024px+)
   ═══════════════════════════════════════════ */
@media (min-width: 1024px) {
  .main-content {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 60px rgba(74, 94, 59, 0.08);
    min-height: 100vh;
  }

  .hero {
    min-height: 100vh;
  }

  .section__inner {
    max-width: 440px;
  }

  .photo-modal__container {
    padding: 4rem;
  }

  .leaf-divider svg {
    width: 180px;
  }
}

/* ═══════════════════════════════════════════
   Bottom Action Bar (Upload)
   ═══════════════════════════════════════════ */
[hidden] {
  display: none !important;
}

:root {
  --action-bar-h: 4.875rem;
}

body.has-action-bar .footer {
  padding-bottom: calc(var(--spacing-lg) + var(--action-bar-h) + var(--safe-bottom));
}

body.has-action-bar .toast {
  bottom: calc(1rem + var(--action-bar-h) + var(--safe-bottom));
}

.action-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  display: flex;
  justify-content: center;
  padding: 0.5rem calc(0.75rem + var(--safe-right)) calc(0.5rem + var(--safe-bottom)) calc(0.75rem + var(--safe-left));
  /* 바 영역은 투명 → 뒤 사진/내용이 그대로 보이고 버튼 묶음만 떠 있음 */
  background: transparent;
  pointer-events: none;
}

/* 버튼 묶음: 반투명 연한 크림색 */
.action-bar__dock {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  gap: 0.125rem;
  width: 100%;
  max-width: 26rem;
  padding: 0.25rem;
  background: rgba(250, 250, 245, 0.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid rgba(139, 158, 126, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(58, 75, 46, 0.12);
}

/* 첫 화면(히어로)에서는 하단 메뉴를 숨기고, 스크롤해 내려가면 나타남 */
.action-bar {
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0s linear 0s;
}

.action-bar.is-concealed {
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;   /* 숨김 상태에서는 터치·포커스도 안 되게 */
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0s linear 0.35s;
}

.action-bar__tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  padding: 0.25rem 0.125rem;
  font-family: var(--font-square);
  font-size: clamp(0.625rem, 2.8vw, 0.6875rem);
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--color-forest);
  border-radius: calc(var(--radius-lg) - 0.25rem);
  transition: background var(--transition), color var(--transition);
}

.action-bar__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.action-bar__tab:active {
  background: rgba(139, 158, 126, 0.12);
}

/* 지금 보고 있는 섹션 */
.action-bar__tab.is-active {
  color: var(--color-forest);
  font-weight: 700;
}

/* 업로드 버튼: 글자가 길어 폭만 조금 넓게 (모양은 다른 버튼과 동일) */
.action-bar__tab--upload {
  flex-grow: 1.2;
}

.action-bar__tab.is-disabled {
  opacity: 0.55;
}

/* ═══════════════════════════════════════════
   Bottom Sheet (Upload)
   ═══════════════════════════════════════════ */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 36, 26, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sheet__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  max-height: 90svh;
  display: flex;
  flex-direction: column;
  background: var(--color-warm-white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sheet.is-open .sheet__backdrop {
  opacity: 1;
}

.sheet.is-open .sheet__panel {
  transform: translateY(0);
}

.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.75rem 0.5rem 1.5rem;
  flex-shrink: 0;
}

.sheet__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--color-forest);
}

.sheet__close {
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-text-muted);
}

.sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 calc(1.5rem + var(--safe-right)) calc(1.5rem + var(--safe-bottom)) calc(1.5rem + var(--safe-left));
}

/* ─── Form ─── */
.form {
  font-family: var(--font-sans);
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.form__desc {
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: 1.25rem;
}

.form__row {
  border: 0;
  margin: 0 0 1.125rem;
  padding: 0;
  min-width: 0;
}

.form__label {
  display: block;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text);
}

.form__label small {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-text-muted);
}

/* 16px 이상이어야 iOS Safari가 입력 시 화면을 확대하지 않음 */
.form__input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--transition);
}

.form__input:focus {
  outline: none;
  border-color: var(--color-sage);
}

.form__submit {
  width: 100%;
  min-height: 52px;
  margin-top: 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--color-white);
  background: var(--color-forest);
  border-radius: var(--radius-md);
  transition: background var(--transition), opacity var(--transition);
}

.form__submit:active {
  background: var(--color-forest-dark);
}

.form__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ─── Upload progress ─── */
.upload {
  margin-top: 1.25rem;
}

.upload__summary {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.upload__bar {
  height: 6px;
  background: var(--color-border);
  border-radius: 100px;
  overflow: hidden;
}

.upload__bar-fill {
  width: 0;
  height: 100%;
  background: var(--color-sage);
  border-radius: inherit;
  transition: width 0.2s linear;
}

.upload__list {
  list-style: none;
  margin-top: 0.75rem;
  max-height: 14rem;
  overflow-y: auto;
}

.upload__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.75rem;
  font-weight: 300;
  border-bottom: 1px solid var(--color-border);
}

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

.upload__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
}

.upload__state {
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.upload__item.is-done .upload__state {
  color: var(--color-forest);
}

.upload__item.is-error .upload__state {
  color: #c97070;
}

.upload__notice {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--color-text-muted);
  text-align: center;
}

.upload__retry {
  width: 100%;
  margin-top: 0.75rem;
  min-height: 44px;
}

/* ═══════════════════════════════════════════
   Phone Landscape (높이 500px 이하 = 모든 iPhone/Galaxy 가로 모드)
   ═══════════════════════════════════════════ */
@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --action-bar-h: 3.875rem;
    --fs-hero-names: 1.75rem;
  }

  .hero__photo {
    object-position: center 25%;
  }

  .hero__content {
    padding-top: var(--spacing-md);
  }

  /* 가로 폭이 768px을 넘어 태블릿 규칙이 적용되므로 직접 덮어씀 */
  .hero__names {
    font-size: 1.75rem;
    letter-spacing: 6px;
  }

  .action-bar {
    padding-top: 0.375rem;
    padding-bottom: calc(0.375rem + var(--safe-bottom));
  }

  /* 가로 모드: 아이콘과 글자를 한 줄로 */
  .action-bar__dock {
    max-width: 40rem;
  }

  .action-bar__tab {
    flex-direction: row;
    gap: 0.375rem;
    min-height: 40px;
    font-size: 0.75rem;
  }

  .action-bar__icon {
    width: 18px;
    height: 18px;
  }

  .photo-modal__container {
    padding-top: calc(1rem + var(--safe-top));
    padding-bottom: calc(2.5rem + var(--safe-bottom));
  }

  .sheet__panel {
    max-height: 100vh;
    max-height: 100svh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (min-width: 1024px) {
  .action-bar {
    left: 50%;
    right: auto;
    width: 480px;
    transform: translateX(-50%);
  }

  .action-bar.is-concealed {
    transform: translate(-50%, 110%);
  }
}

/* ═══════════════════════════════════════════
   Print (hide interactive elements)
   ═══════════════════════════════════════════ */
@media print {
  .curtain,
  .leaf-canvas,
  .photo-modal,
  .toast,
  .countdown,
  .location__links,
  .location__copy,
  .account-item__copy,
  .leaf-divider {
    display: none !important;
  }

  .animate-item {
    opacity: 1 !important;
    transform: none !important;
  }
}
