:root {
  color-scheme: light;
  --paper: #faf7f2;
  --ink: #463c35;
  --muted: #74675b;
  --line: #ded4c7;
  --accent: #856748;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: #eae5dd;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.invitation { width: 100%; max-width: 520px; margin-inline: auto; background: var(--paper); }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1; padding: 12px 18px; color: var(--ink); background: white; }
.skip-link:focus { top: 16px; outline: 2px solid var(--accent); outline-offset: 3px; }
.opening { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 22px; font-size: 10px; font-weight: 600; letter-spacing: .24em; color: var(--accent); }
.opening-date { margin: 0 0 22px; font-family: Georgia, serif; font-size: 15px; letter-spacing: .18em; }
h1, h2 { font-family: "AppleMyungjo", "Batang", "Nanum Myeongjo", serif; font-weight: 400; }
h1 { margin: 0; font-size: clamp(30px, 8vw, 39px); line-height: 1.65; letter-spacing: .07em; }
h1 span { font-size: .84em; }
.fine-rule { height: 30px; width: 1px; background: var(--line); margin: 26px auto 20px; }
.opening-caption { font-size: 13px; letter-spacing: .1em; margin: 0 20px 30px; color: var(--muted); }
.hero { margin: 0; }
/* 원본 비율 유지: 고정 높이, 크롭, 필터, 이미지 위 오버레이를 사용하지 않습니다. */
.hero img { display: block; width: 100%; height: auto; max-height: 100vh; max-height: 100svh; object-fit: contain; }
.photo-placeholder { min-height: 340px; padding: 48px 24px; margin: 0 24px; border: 1px solid var(--line); background: #f3eee6; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; font-size: 15px; }
.placeholder-mark { font: 44px Georgia, serif; color: var(--accent); margin-bottom: 14px; }
.placeholder-note { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.event-summary { margin: 30px 20px 0; font-size: 14px; line-height: 2; }
.section { margin-inline: 28px; padding: 64px 0; text-align: center; }
.section .eyebrow { margin-bottom: 14px; }
h2 { font-size: 25px; margin: 0 0 28px; letter-spacing: .02em; }
.body-copy { font-size: 16px; line-height: 2.2; margin: 0; }
.quiet-placeholder { margin-top: 28px; padding: 32px 20px; background: #f2ede5; color: var(--muted); font-size: 14px; }
.quiet-placeholder p { margin: 0; }
.date-display { font-family: Georgia, serif; font-size: 46px; letter-spacing: .04em; margin: 0 0 18px; line-height: 1.3; }
.date-display span { color: var(--accent); font-size: 30px; padding-inline: 10px; }
.future-slot { color: var(--muted); font-size: 13px; margin: 26px 0 0; }
.future-slot p { margin: 0; }
.venue { font-size: 18px; margin: 0 0 12px; }
.venue span { font-size: 16px; }
address { font-style: normal; font-size: 14px; color: var(--muted); }
.share-section { border-bottom: 0; }
footer { text-align: center; background: #f0e9df; padding: 32px 24px 36px; padding-bottom: max(36px, env(safe-area-inset-bottom)); font-size: 13px; }
footer > span { color: var(--accent); }
footer p { margin: 12px 0 0; }
.footer-date { font-family: Georgia, serif; letter-spacing: .12em; font-size: 11px; }
.no-script { margin: 20px; font-size: 13px; color: var(--muted); }
@media (min-width: 768px) {
  body { padding: 40px 24px; }
  .invitation { box-shadow: 0 16px 60px #463c3512; }
  .section { margin-inline: 40px; padding-block: 72px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 인사말: 원본 사진 아래의 조용한 편지 영역 */
.greeting { margin-inline: 0; padding: 64px 24px 76px; background: linear-gradient(#fff9ed, var(--paper) 100px); }
.greeting h2 { font-size: 29px; margin-bottom: 36px; }
.greeting-copy { font-family: "AppleMyungjo", "Batang", "Nanum Myeongjo", serif; font-size: clamp(15px, 3.85vw, 17px); line-height: 2.2; letter-spacing: -.035em; }
.greeting-copy p { margin: 0; }
.greeting-copy p + p { margin-top: 28px; color: var(--muted); font-size: .94em; }
.greeting-lead { font-size: .88em; color: var(--muted); }
.greeting-copy strong { font-weight: 600; color: var(--ink); }
.greeting-end { display: block; width: 24px; height: 1px; background: var(--line); margin: 38px auto 0; }
.reveal-pending { opacity: 0; transform: translateY(16px); }
.reveal-ready { transition: opacity 800ms ease, transform 800ms ease; }
.gallery-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 2; }
.gallery-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px 12px; align-items: start; }
/* DOM 순서를 유지하면서 큰 사진과 여백이 있는 사진을 번갈아 배치합니다. */
.gallery-item { min-width: 0; grid-column: span 7; transition: opacity 650ms ease, transform 650ms ease; }
.gallery-position-0 { grid-column: 1 / -1; }
.gallery-position-2 { grid-column: span 5; margin-top: 40px; }
.gallery-position-3 { grid-column: 3 / -1; }
.gallery-item.gallery-layout-inset { grid-column: 2 / 12; margin-top: 0; }
.gallery-item.gallery-layout-small { grid-column: 5 / -1; margin-top: 12px; }
.gallery-item.gallery-landscape, .gallery-item.gallery-layout-wide { grid-column: 1 / -1; margin-top: 0; }
/* 연속된 사진을 짝지어 배치하되 높이는 각 사진의 원본 비율로 둡니다. */
.gallery-item[data-composition] { margin-top: 0; }
.gallery-item[data-composition="feature"] { grid-column: 1 / -1; }
.gallery-item[data-composition="pair"] { grid-column: span 6; }
.gallery-item[data-composition="inset"] { grid-column: 2 / 12; }
.gallery-chapter { grid-column: 1 / -1; padding: 36px 0 8px; border-top: 1px solid var(--line); margin-top: 24px; }
.gallery-chapter:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
.gallery-chapter .eyebrow { display: block; margin: 0 0 10px; }
.gallery-chapter h3 { margin: 0; font: 400 21px/1.7 "AppleMyungjo", "Batang", serif; }
.gallery-reveal-pending { opacity: 0; transform: translateY(12px); }
@media (prefers-reduced-motion: reduce) {
  .gallery-item { transition: none; }
  .gallery-reveal-pending { opacity: 1; transform: none; }
}
.gallery-photo { display: block; width: 100%; border: 0; padding: 0; background: transparent; color: inherit; cursor: zoom-in; }
.gallery-photo img { display: block; width: 100%; height: auto; object-fit: contain; }
.gallery-number { display: block; margin-top: 7px; font: 11px Georgia, serif; letter-spacing: .08em; color: var(--muted); }
button { font: inherit; touch-action: manipulation; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
body.viewer-open { overflow: hidden; }
.photo-viewer { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #201e1b; color: #faf7f2; }
.photo-viewer::backdrop { background: #201e1b; }
.viewer-shell { height: 100%; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; }
.viewer-toolbar h2 { font-size: 15px; margin: 0; }
.photo-viewer button { min-width: 48px; min-height: 48px; border: 1px solid #77716b; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.photo-viewer button:focus-visible { outline-color: #faf7f2; }
.photo-viewer button:disabled { opacity: .35; cursor: default; }
#viewer-close { padding: 0 12px; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin-block: 16px; touch-action: pan-y pinch-zoom; }
.viewer-stage img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; }
.viewer-error { text-align: center; font-size: 14px; }
.viewer-controls { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 12px; align-items: center; flex-shrink: 0; }
#viewer-caption { margin: 0; text-align: center; font-size: 13px; max-height: 5.4em; overflow-y: auto; }
.viewer-hint { margin: 12px 0 0; text-align: center; color: #c5beb5; font-size: 11px; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal-pending { opacity: 1; transform: none; }
  .reveal-ready { transition: none; }
}

/* 섹션별 정렬과 여백으로 만드는 차분한 리듬 */
#gallery { text-align: left; border-top: 1px solid var(--line); padding-top: 40px; padding-bottom: 64px; }
#gallery h2 { font-size: 26px; margin-bottom: 24px; }
#gallery .gallery-note { border-left: 1px solid var(--line); padding: 4px 0 4px 18px; font-size: 13px; line-height: 2.1; }
.gallery-number { text-align: left; }
#date { margin-inline: 0; padding: 52px 28px; background: #f1ebe2; }
#date h2 { font-size: 23px; margin-bottom: 24px; }
.date-display { font-size: 58px; letter-spacing: .015em; margin-bottom: 20px; }
.date-display span { font-size: 28px; font-weight: 400; }
#date .body-copy { font-size: 15px; line-height: 2; }
/* 행사 달력은 일정 영역 안에서만 스타일을 적용합니다. */
.event-calendar { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.event-calendar table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.event-calendar caption { padding-bottom: 18px; font-size: 16px; letter-spacing: .04em; }
.event-calendar th { height: 38px; font-size: 14px; font-weight: 500; color: var(--muted); }
.event-calendar td { height: 44px; padding: 0; text-align: center; }
.event-calendar th:first-child, .event-calendar td:first-child { color: #986052; }
.event-day { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--paper); font-weight: 600; }
.event-countdown { margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.9; }
.countdown-value { display: block; font-family: Georgia, serif; font-size: 26px; letter-spacing: .06em; color: var(--accent); }
.countdown-note { font-size: 13px; color: var(--muted); }
#location { text-align: left; padding-block: 58px; }
#location h2 { margin-bottom: 30px; }
.venue { font-size: 20px; font-weight: 500; line-height: 1.9; }
.venue span { font-size: 16px; font-weight: 400; }
.quiet-placeholder { padding: 24px; border-left: 2px solid var(--line); }
.share-section { padding-block: 38px 52px; border-top: 1px solid var(--line); text-align: left; }
.share-section h2 { font-size: 22px; margin-bottom: 18px; }
.share-section .future-slot { margin-top: 0; line-height: 2; }
footer { padding-top: 28px; }
@media (min-width: 768px) {
  .greeting { padding-inline: 40px; padding-top: 72px; }
  #date { padding-inline: 40px; }
}

/* 장소 안내: 기존 색상과 여백을 유지하며 터치 영역을 확보합니다. */
.address-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.location-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--ink); font-size: 14px; text-decoration: none; cursor: pointer; }
.location-button:hover { background: #f0e9df; }
#location a:focus-visible, #copy-address-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.copy-status { min-height: 1.8em; margin: 8px 0 16px; color: var(--muted); font-size: 13px; }
#manual-copy { margin-bottom: 20px; font-size: 13px; color: var(--muted); }
#copy-address-text { display: block; width: 100%; min-width: 0; margin-top: 8px; padding: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; }
.venue-map iframe { display: block; width: 100%; height: 250px; border: 1px solid var(--line); background: #f2ede5; }
.map-credit { margin: 6px 0 18px; font-size: 11px; color: var(--muted); }
.map-credit a { color: inherit; text-underline-offset: 3px; }
.map-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.map-note { margin: 14px 0 0; font-size: 12px; line-height: 1.9; color: var(--muted); }

/* 공유: 카카오 버튼은 브랜드 색상, 나머지는 기존 브라운 계열 */
.share-intro { margin: 0 0 22px; font-size: 14px; color: var(--muted); }
.share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.share-button { min-height: 48px; min-width: 44px; border: 1px solid var(--line); border-radius: 4px; padding: 12px 8px; font-size: 14px; color: var(--ink); background: transparent; cursor: pointer; }
.kakao-button { grid-column: 1 / -1; background: #fee500; border-color: #fee500; color: #191919; font-weight: 600; }
.share-button:disabled { opacity: .65; cursor: wait; }
.share-status { min-height: 3.8em; margin: 14px 0 0; font-size: 13px; line-height: 1.9; color: var(--muted); }
#share-manual { margin-top: 12px; font-size: 13px; }
#share-link-text { display: block; width: 100%; min-width: 0; margin-top: 8px; padding: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 16px; }
#share-link-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
