:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --white: #fffdfc;
  --ink: #2f3536;
  --olive: #657066;
  --blue: #aebbc2;
  --amber: #c9975b;
  --rule: #d8dcd3;
  --serif: "Wedding Letter Serif", "Batang", "바탕", "AppleMyungjo", serif;
  --sans: "Wedding Letter Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-family: var(--sans);
  font-size: 100%;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  word-break: keep-all;
  overflow-wrap: break-word;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--olive); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h2 { font-size: 1.4375rem; font-weight: 500; letter-spacing: -.005em; line-height: 1.6; text-wrap: balance; }
h3 { font-size: 1rem; font-weight: 600; }
h4 { font-size: .94rem; font-weight: 600; }
strong, b { font-weight: 600; }
.letter { max-width: 550px; margin-inline: auto; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
.eyebrow { color: var(--olive); font-size: .6875rem; letter-spacing: .18em; line-height: 1.6; font-weight: 500; }
.hero { position: relative; text-align: center; padding: 60px 0 42px; }
.hero-title { animation: appear .7s ease-out both; }
.hero-note { margin: 15px 16px 26px; font-family: var(--serif); font-size: .9375rem; line-height: 1.9; }
h1 { font-size: clamp(1.875rem, 8.3vw, 2.125rem); letter-spacing: .045em; line-height: 1.5; }
.name-dot { display: inline-block; margin-inline: .15em; color: var(--olive); }
.snowfield { width: 100%; margin: 20px auto 12px; aspect-ratio: 26 / 17; }
.hero-details { padding-inline: 24px; }
.date-line { font-family: var(--serif); font-size: .875rem; letter-spacing: .035em; }
.hero-venue { margin-top: 20px; font-size: 1rem; font-weight: 500; }
.hero-venue span { font-size: .9375rem; font-weight: 400; }
.hero-line { display: block; width: 1px; height: 32px; background: var(--blue); margin: 32px auto 0; }
.section { margin-inline: 28px; padding: 62px 0; text-align: center; border-bottom: 1px solid var(--rule); }
.section > .eyebrow { margin-bottom: 14px; }
.invitation { padding-top: 38px; }
.invitation-copy { margin-top: 34px; font-family: var(--serif); font-size: .9375rem; line-height: 2.1; letter-spacing: -.005em; text-wrap: balance; }
.invitation-copy p + p { margin-top: 25px; }
.branch { margin: 35px auto 28px; }
.families { font-size: .9375rem; line-height: 2.4; letter-spacing: 0; }
.families span { font-size: .8125rem; margin: 0 8px 0 4px; }
.families strong { font-weight: 500; font-size: 1rem; }
.calendar {
  --calendar-sunday: #9d5f5a;
  --calendar-saturday: #556f83;
  --calendar-wedding: #344f64;
  max-width: 340px;
  margin: 35px auto 30px;
}
.calendar-month { display: flex; align-items: center; justify-content: center; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--rule); }
.calendar-month > span:first-child { font: 400 2.6rem / 1.2 var(--serif); }
.calendar-year { font-size: .6875rem; font-weight: 500; letter-spacing: .16em; }
table { border-collapse: collapse; width: 100%; table-layout: fixed; font-variant-numeric: tabular-nums; }
th { height: 48px; font-size: .8125rem; font-weight: 400; color: var(--olive); }
td { height: 42px; font-size: .9375rem; }
.calendar th:first-child, .calendar td:first-child { color: var(--calendar-sunday); }
.calendar th:last-child, .calendar td:last-child { color: var(--calendar-saturday); }
.wedding-day { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--calendar-wedding); font-weight: 600; }
.wedding-day::before, .wedding-day::after { content: ""; position: absolute; inset: 0; border: 1.4px solid var(--olive); border-radius: 48% 53% 44% 56%; transform: rotate(-15deg); }
.wedding-day::after { inset: 2px -2px -1px 1px; opacity: .42; transform: rotate(13deg); border-width: .7px; }
.ceremony-date { margin-top: 28px; margin-bottom: 12px; font-size: .9375rem; font-weight: 500; }
.ceremony > p:not(.eyebrow) { font-size: .94rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 20px; border: 1px solid #a5ada3; border-radius: 2px; background: transparent; color: var(--ink); font-size: .9375rem; font-weight: 500; line-height: 1.7; max-width: 100%; }
.button svg { width: 17px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.button:hover { background: #eceee6; }
.calendar-save { margin-top: 26px; }
.teachers { text-align: center; padding: 28px 24px 22px; }
/* 투명 SVG를 페이지 바탕에 이어 붙이고, 로딩 전에도 같은 높이를 확보합니다. */
.teachers-school { width: 100%; max-width: 460px; aspect-ratio: 26 / 15; margin-inline: auto; }
.teachers p { font-family: var(--serif); font-size: .9375rem; line-height: 2.1; letter-spacing: -.005em; text-wrap: balance; margin-top: 18px; }
/* 기존 두 행은 보존하고, 좁은 화면에서는 각 문장 안의 추가 줄만 고르게 나눕니다. */
.teachers p > span { display: inline-block; max-width: 100%; text-wrap: balance; vertical-align: top; }
.directions { text-align: left; }
.directions > .eyebrow, .directions > h2 { text-align: center; }
.venue-block { margin-top: 34px; }
.venue-block > p { font-size: .9375rem; margin-top: 2px; }
address { font-style: normal; font-size: .90625rem; line-height: 1.8; margin-top: 16px; }
.venue-block .button { margin-top: 18px; }
.venue-map-block { margin-top: 32px; }
.venue-map-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.venue-map-heading p { color: var(--olive); font-size: .8125rem; text-align: right; }
.venue-map { position: relative; width: 100%; height: clamp(210px, 62vw, 280px); overflow: hidden; border: 1px solid var(--rule); background: #eeeee5; }
.venue-map-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.venue-map[data-map-state="ready"] .venue-map-fallback { visibility: hidden; }
.venue-map:not([data-map-state="ready"]) .venue-map-canvas { visibility: hidden; }
.venue-map-canvas { position: absolute; inset: 0; pointer-events: none; }
.venue-map[data-map-interactive="true"] .venue-map-canvas { pointer-events: auto; }
.venue-map-status { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: grid; place-items: center; padding: 6px 12px; color: var(--olive); background: rgba(255, 253, 252, .94); font-size: .79rem; line-height: 1.8; text-align: center; }
.venue-map-status[hidden] { display: none; }
.venue-map-interaction { position: absolute; z-index: 4; right: 10px; bottom: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid #a5ada3; border-radius: 2px; color: var(--ink); background: rgba(255, 253, 252, .94); font-size: .75rem; line-height: 1.4; }
.venue-map-interaction:hover { background: var(--white); }
.venue-map-note { margin-top: 9px; color: var(--olive); font-size: .8125rem; line-height: 1.75; }
.venue-map:not([data-map-state="ready"]) + .venue-map-note { visibility: hidden; }
.venue-map-label { display: block; padding: 6px 10px; border: 1px solid #a5ada3; border-radius: 2px; color: var(--ink); background: var(--white); font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.map-links { margin-top: 28px; border-top: 1px solid var(--rule); }
.map-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--rule); font-size: .9375rem; font-weight: 500; }
.map-links a:hover { color: var(--olive); }
.map-links span { color: var(--olive); }
.transport { margin-top: 32px; font-size: .9375rem; line-height: 1.8; }
.transport-label { margin-top: 10px; color: var(--olive); font-size: .875rem; }
.transport h4 { margin: 10px 0 12px; }
.transport ol { list-style: none; counter-reset: route; padding: 0; margin: 0; }
.transport li { counter-increment: route; position: relative; padding: 2px 0 10px 29px; }
.transport li::before { content: counter(route); position: absolute; left: 0; top: 5px; display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid var(--rule); border-radius: 50%; color: var(--olive); font-size: .65rem; background: var(--paper); }
.transport li:not(:last-child)::after { content: ""; position: absolute; top: 25px; bottom: 0; left: 9px; width: 1px; background: var(--rule); }
.bus { color: var(--olive); font-size: .875rem; margin: 4px 0 0 29px; }
.gifts-note { margin-top: 27px; margin-bottom: 32px; font-family: var(--serif); font-size: .9375rem; line-height: 2.1; letter-spacing: -.005em; text-wrap: balance; }
details { text-align: left; border-bottom: 1px solid var(--rule); }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; cursor: pointer; font-size: .9375rem; font-weight: 500; list-style: none; }
summary::-webkit-details-marker { display: none; }
.toggle-mark { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.toggle-mark::before, .toggle-mark::after { content: ""; position: absolute; background: var(--olive); top: 6px; left: 0; width: 14px; height: 1px; }
.toggle-mark::after { transform: rotate(90deg); }
details[open] .toggle-mark::after { display: none; }
.account-list { font-size: .9375rem; line-height: 1.8; }
.account-list > p { padding: 10px 0 22px; }
.account { position: relative; padding: 20px 0; border-top: 1px dashed var(--rule); }
.account-heading { font-size: .875rem; font-weight: 500; color: var(--olive); margin-bottom: 6px; }
.account-number { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; word-break: normal; font-size: .9375rem; }
.account-holder { font-size: .875rem; margin-top: 4px; }
.account .button { margin-top: 12px; min-height: 44px; padding: 8px 14px; font-size: .875rem; }
.small-note { font-size: .8rem; margin-top: 16px; }
.sharing { border: 0; padding-bottom: 25px; }
.sharing h2 { font-size: 1.25rem; margin-bottom: 24px; }
.button-filled { background: var(--olive); border-color: var(--olive); color: var(--white); }
.button-filled:hover { background: #535e54; }
.text-button { display: block; margin: 10px auto 0; min-height: 44px; padding: 8px 12px; border: 0; background: none; color: var(--olive); font-size: .875rem; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; }
.closing { text-align: center; padding: 0 0 calc(42px + env(safe-area-inset-bottom)); }
.closing > img { width: 100%; aspect-ratio: 26 / 15; }
.closing-message { font-family: var(--serif); font-size: .98rem; line-height: 2; margin-top: 5px; }
.closing-names { margin: 25px 0; font-family: var(--serif); font-size: 1.1875rem; letter-spacing: .045em; }
.closing-names span { font-size: .8rem; margin-inline: 12px; color: var(--olive); }
.closing > .eyebrow { font-size: .625rem; }
.personal-note { margin: 1.375rem 1.5rem 0; color: var(--olive); }
.signature-message { max-width: calc(100% - 2rem); margin-inline: auto; font-family: var(--serif); font-size: .78125rem; font-weight: 400; line-height: 1.8; }
/* 화면이 좁으면 두 구절 사이에서 먼저 줄바꿈하고, 큰 글자 설정에서는 구절 안도 줄바꿈합니다. */
.signature-phrase { display: inline-block; max-width: 100%; vertical-align: top; }
.signature-credit { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: .25em; margin-top: .125rem; font-family: var(--sans); font-size: .71875rem; font-weight: 400; line-height: 1.8; }
.signature-credit a { display: inline-block; max-width: 100%; min-height: 1.5rem; padding: .1875rem .25rem; color: var(--olive); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.status { position: fixed; z-index: 10; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); text-align: center; font-size: .85rem; color: var(--white); background: var(--ink); border-radius: 3px; box-shadow: 0 2px 10px #2f353618; }
.status:not(:empty) { padding: 12px 18px; }
.sr-only, .copy-fallback { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: 0; left: 10px; padding: 12px; background: var(--white); transform: translateY(-120%); }
.skip-link:focus { transform: translateY(0); }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 600px) { .hero { padding-top: 76px; } .section { margin-inline: 55px; padding-block: 72px; } .hero-note { margin-bottom: 30px; } }
@media (max-width: 350px) { .section { margin-inline: 20px; } .hero { padding-top: 40px; } .hero-note { margin-bottom: 20px; } .families span { margin-right: 4px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* 첫 사진은 본문을 막지 않으며 음악 버튼은 스크롤과 무관하게 표시합니다. */
.photo-intro { position: fixed; inset: 0; z-index: 20; background: var(--paper); pointer-events: none; transition: opacity 1.2s ease, filter 1.2s ease; }
.photo-intro[hidden], .music-toggle[hidden] { display: none; }
.photo-intro img { width: 100%; height: 100%; object-fit: contain; opacity: 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.photo-intro.is-ready img { opacity: 1; }
.photo-intro.is-leaving { opacity: 0; filter: blur(5px); }
.music-toggle { position: fixed; z-index: 30; top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); width: 44px; height: 44px; padding: 11px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; background: rgba(247,245,239,.94); color: var(--olive); box-shadow: 0 2px 9px rgba(47,53,54,.07); }
.music-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.music-toggle .music-stop-icon { display: none; }
.music-toggle[data-state="playing"] .music-stop-icon { display: block; }
.music-toggle[data-state="playing"] .music-play-icon { display: none; }
@media (prefers-reduced-motion: reduce) { .photo-intro { display: none; transition: none; } }

/* 사진은 자르지 않고 한 장씩 넘기며, 번호와 한 손가락 세로 스크롤을 유지합니다. */
.gallery-photos { position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; margin-top: 30px; border-radius: 10px; touch-action: pan-x pan-y; }
.gallery-photos::-webkit-scrollbar { display: none; }
.gallery-photo { flex: 0 0 100%; margin: 0; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.photo-frame { position: relative; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 10px; background: #eeece6; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.photo-frame img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.photo-frame.is-unavailable img { visibility: hidden; }
.photo-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; font-size: .8rem; color: var(--olive); }
.photo-error[hidden] { display: none; }
.gallery-hint { margin: 14px 0 0; color: var(--olive); font-size: .8125rem; }
.gallery-controls { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 10px; }
.gallery-controls[hidden] { display: none; }
.gallery-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--olive); }
.gallery-controls button:disabled { opacity: .3; cursor: default; }
.gallery-controls svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gallery-position { min-width: 64px; font: 400 .875rem / 1.85 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .04em; color: var(--olive); }

/* WEDDING-005: 작은 사진 목록은 자체 가로 스크롤만 사용합니다. */
.gallery-introduction { margin: 20px 0 0; font-family: var(--serif); font-size: .9375rem; line-height: 2.1; letter-spacing: -.005em; text-wrap: balance; }
.gallery .gallery-hint { margin-top: 9px; line-height: 1.8; }
.gallery-thumbnails { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin-top: 12px; padding: 3px 0; touch-action: pan-x pan-y; }
.gallery-thumbnails[hidden] { display: none; }
.gallery-thumbnails::-webkit-scrollbar { display: none; }
.gallery-thumbnail { --thumb-width: clamp(64px, 17.5vw, 72px); flex: 0 0 var(--thumb-width); width: var(--thumb-width); height: calc(var(--thumb-width) * 4 / 3); min-width: 0; padding: 2px; border: 2px solid transparent; border-radius: 6px; background: #eeece6; overflow: hidden; touch-action: pan-x pan-y; -webkit-touch-callout: none; user-select: none; }
.gallery-thumbnail[aria-current="true"] { border-color: var(--olive); }
.gallery-thumbnail:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.gallery-thumbnail img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.gallery-photo noscript img { display: block; }

.photo-frame img[hidden] { display: none; }
