/* =============================================================================
   드렉슬리 청첩장 키트 v1 — 공용 모양(모든 청첩장이 같이 씀)
   색은 invitation.config.js 의 design 값이 :root 변수로 들어옵니다.
   외부 라이브러리 0 — 순수 CSS
   ============================================================================= */
:root {
  --paper: #f3f1ec; --ink: #1b1b1a; --accent: #8a7866;
  --ink-2: color-mix(in srgb, var(--ink) 72%, var(--paper));
  --ink-3: color-mix(in srgb, var(--ink) 48%, var(--paper));
  --line: color-mix(in srgb, var(--ink) 14%, var(--paper));
  --card: color-mix(in srgb, #fff 62%, var(--paper));
  --sun: #b4544a;
  --col: 440px;
  --serif-ko: "Gowun Batang", "Nanum Myeongjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --latin: "Cormorant Garamond", "Times New Roman", serif;
  --didone: "Bodoni Moda", "Didot", serif;
  --script: "Pinyon Script", cursive;
  --hand: "Nanum Pen Script", "Gaegu", cursive;
  --brush: "Kaushan Script", cursive;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: color-mix(in srgb, var(--paper) 82%, #8d8780); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.inv { position: relative; max-width: var(--col); margin: 0 auto; background: var(--paper); min-height: 100vh; overflow: hidden; box-shadow: 0 0 60px rgba(0,0,0,.08); }

/* ---------- 등장 효과: 아래서 떠오름(줄마다 조금씩 늦게) ---------- */
.js [data-r] { opacity: 0; transform: translateY(28px); transition: opacity .95s var(--ease), transform .95s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js [data-r].in { opacity: 1; transform: none; }
.js [data-r="fade"] { transform: none; }
.js [data-r="zoom"] { transform: scale(1.04); }

/* ---------- 공용 구간 ---------- */
.sec { padding: 92px 28px; text-align: center; position: relative; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec.tint { background: color-mix(in srgb, var(--ink) 4.5%, var(--paper)); }
.label { margin: 0 0 10px; font: 500 12px/1 var(--latin); letter-spacing: .34em; text-transform: uppercase; color: var(--accent); }
.ttl { margin: 0 0 34px; font: 400 21px/1.4 var(--serif-ko); letter-spacing: -.01em; }
.sub { margin: -22px 0 30px; font-size: 13.5px; line-height: 1.75; color: var(--ink-3); white-space: pre-line; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 1px solid color-mix(in srgb, var(--ink) 26%, var(--paper)); border-radius: 999px; font-size: 14px; letter-spacing: -.01em; transition: background .25s, color .25s; }
.btn-line:active { background: var(--ink); color: var(--paper); }
.btn-solid { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 14px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 500; position: relative; overflow: hidden; }
.btn-solid::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%); transform: translateX(-100%); animation: shimmer 3.6s 1.2s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- 첫 화면 연출: 이름 손글씨 ---------- */
.intro { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(14, 14, 13, .84); transition: opacity 1s var(--ease), visibility 1s; }
.intro.out { opacity: 0; visibility: hidden; }
.intro svg { width: min(86vw, 380px); height: auto; overflow: visible; }
.intro text { font-family: var(--script); font-size: 64px; fill: rgba(255,255,255,0); stroke: #fff; stroke-width: .9; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; }
.intro.go text { animation: draw 2.6s cubic-bezier(.45,.05,.35,1) forwards, inkfill .9s 2.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes inkfill { to { fill: #fff; stroke-width: .2; } }
.intro .skip { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-size: 12px; color: rgba(255,255,255,.55); letter-spacing: .04em; padding: 10px 14px; }

/* ---------- 배경음악 단추 ---------- */
.bgm { position: fixed; z-index: 55; top: calc(12px + env(safe-area-inset-top)); right: max(12px, calc(50vw - var(--col) / 2 + 12px)); width: 38px; height: 38px; border-radius: 50%; background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.bgm .bars { display: flex; gap: 2px; align-items: flex-end; height: 13px; }
.bgm .bars i { width: 2px; height: 4px; background: var(--ink); border-radius: 1px; }
.bgm.on .bars i { animation: eq .9s ease-in-out infinite alternate; }
.bgm.on .bars i:nth-child(2) { animation-delay: .2s; } .bgm.on .bars i:nth-child(3) { animation-delay: .4s; } .bgm.on .bars i:nth-child(4) { animation-delay: .1s; }
@keyframes eq { from { height: 3px; } to { height: 13px; } }
.bgm .tip { position: absolute; right: 46px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; padding: 7px 11px; border-radius: 999px; background: rgba(24,24,23,.88); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .4s, transform .4s var(--ease); }
.bgm.hint .tip { opacity: 1; transform: translate(0, -50%); }
.bgm:not(.on)::after { content: ""; position: absolute; width: 22px; height: 1.5px; background: var(--ink); transform: rotate(-45deg); }

/* ---------- 알림 ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(34px + env(safe-area-inset-bottom)); transform: translate(-50%, 14px); max-width: calc(min(100vw, var(--col)) - 48px); padding: 12px 18px; border-radius: 999px; background: rgba(24,24,23,.9); color: #fff; font-size: 13.5px; opacity: 0; transition: opacity .35s, transform .35s var(--ease); pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 표지: 은염(흑백 에디토리얼) ---------- */
.cv { position: relative; min-height: 100svh; }
.cv-anim { opacity: 0; filter: blur(6px); transform: translateY(8px); transition: opacity 1.2s var(--ease), filter 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 150ms + 250ms); }
.ready .cv-anim { opacity: 1; filter: none; transform: none; }
.cv-eunyeom { display: flex; flex-direction: column; justify-content: center; padding: 54px 26px 38px; }
.cv-eunyeom .kicker { margin: 0; text-align: center; font: 500 11px/1 var(--latin); letter-spacing: .42em; color: var(--ink-2); }
.cv-eunyeom .stage { position: relative; width: 100%; aspect-ratio: .8; margin: 26px 0 0; }
.cv-eunyeom .ph-main { position: absolute; top: 0; right: 0; width: 77%; height: 86%; margin: 0; overflow: hidden; background: #d9d6d0; }
.cv-eunyeom .ph-main img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.09); transition: transform 7s cubic-bezier(.15,.6,.25,1); }
.ready .cv-eunyeom .ph-main img { transform: scale(1); }
.cv-eunyeom .ph-sub { position: absolute; left: 0; bottom: 0; width: 41%; aspect-ratio: 3 / 4; margin: 0; overflow: hidden; outline: 7px solid var(--paper); background: #d9d6d0; }
.cv-eunyeom .ph-sub img { width: 100%; height: 100%; object-fit: cover; }
.cv-eunyeom .num { position: absolute; font-family: var(--didone); font-weight: 400; font-variation-settings: "opsz" 96; font-size: clamp(92px, 30vw, 132px); line-height: .78; letter-spacing: -.04em; color: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 2; }
.cv-eunyeom .num-a { top: 7%; left: 1%; }
.cv-eunyeom .num-b { bottom: -2%; right: 2%; }
.cv-eunyeom .slash { position: absolute; top: 40%; left: 30%; width: 34%; height: 1px; background: #fff; mix-blend-mode: difference; transform: rotate(-58deg); transform-origin: left; z-index: 2; }
.cv-eunyeom .names { margin: 34px 0 0; display: flex; align-items: baseline; justify-content: center; gap: 14px; font: 400 30px/1.2 var(--serif-ko); letter-spacing: .02em; }
.cv-eunyeom .names i { font: italic 400 20px/1 var(--latin); color: var(--accent); }
.cv-eunyeom .latin { margin: 12px 0 0; text-align: center; font: 500 11px/1 var(--latin); letter-spacing: .38em; color: var(--ink-3); }
.cv-eunyeom .meta { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.6; color: var(--ink-2); text-align: left; }
.cv-eunyeom .meta b { display: block; font-weight: 500; color: var(--ink); }
.cv-eunyeom .meta .r { text-align: right; }
.cv-pcanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }
.scroll-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 1px; height: 28px; background: linear-gradient(var(--ink-3), transparent); animation: hint 2.2s ease-in-out infinite; }
@keyframes hint { 0%, 100% { opacity: .2; transform: translate(-50%, -4px); } 50% { opacity: .8; transform: translate(-50%, 4px); } }

/* ---------- 표지 공용: 사진 꽉 채움 ---------- */
.cv-full { color: #fff; }
.cv-full .bg { position: absolute; inset: 0; margin: 0; overflow: hidden; background: #333; }
.cv-full .bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 7s cubic-bezier(.15,.6,.25,1); }
.ready .cv-full .bg img { transform: scale(1); }
.cv-full .shade { position: absolute; inset: 0; }
.cv-full > *:not(.bg):not(.shade):not(canvas) { position: relative; z-index: 5; }
.intro.fade text { stroke: none; fill: rgba(255,255,255,0); }
.intro.fade.go text { animation: fadetxt 2s ease forwards; }
@keyframes fadetxt { 0% { fill: rgba(255,255,255,0); } 40%, 100% { fill: #fff; } }

/* 마주 — 두 사람 따로 사진 엇갈림 */
.cv-maju { display: flex; flex-direction: column; justify-content: center; padding: 50px 22px 36px; text-align: center; }
.cv-maju .kicker { margin: 0; font: 500 11px/1 var(--latin); letter-spacing: .4em; color: var(--accent); }
.cv-maju .pair { position: relative; aspect-ratio: .72; margin-top: 24px; }
.cv-maju figure { position: absolute; margin: 0; width: 57%; aspect-ratio: 3 / 4; overflow: hidden; box-shadow: 0 14px 34px rgba(70,50,30,.14); }
.cv-maju .pg { left: 0; top: 0; } .cv-maju .pb { right: 0; bottom: 0; }
.cv-maju figure img { width: 100%; height: 100%; object-fit: cover; }
.cv-maju .amp { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 400 120px/1 var(--script); color: var(--accent); z-index: 2; }
.ready .cv-maju .amp { transform: translate(-50%, -50%); }
.cv-maju .n1, .cv-maju .n2 { position: absolute; writing-mode: vertical-rl; font: 400 24px/1 var(--serif-ko); letter-spacing: .32em; }
.cv-maju .n1 { right: 7%; top: 6%; } .cv-maju .n2 { left: 7%; bottom: 6%; }
.cv-maju .date { margin: 28px 0 0; font: 500 13px/1 var(--latin); letter-spacing: .26em; }
.cv-maju .venue { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }

/* 오름 — 꽉 찬 어두운 사진 + 틈 있는 액자 선 */
.cv-oreum { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 34px 70px; text-align: center; }
.cv-oreum .shade { background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.05) 38%, rgba(0,0,0,.6)); }
.cv-oreum .frame { position: absolute !important; inset: 18px; border: 1px solid rgba(255,255,255,.72); border-top: 0; pointer-events: none; }
.cv-oreum .frame::before, .cv-oreum .frame::after { content: ""; position: absolute; top: 0; width: calc(50% - 82px); height: 1px; background: rgba(255,255,255,.72); }
.cv-oreum .frame::before { left: 0; } .cv-oreum .frame::after { right: 0; }
.cv-oreum .tag { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 500 10.5px/1 var(--latin); letter-spacing: .42em; }
.cv-oreum .phrase { margin: 0; font: 400 52px/1.1 var(--script); }
.cv-oreum .line { margin: 16px 0 0; display: flex; justify-content: center; align-items: center; gap: 10px; font: 500 11px/1 var(--latin); letter-spacing: .24em; }
.cv-oreum .line i { width: 1px; height: 11px; background: rgba(255,255,255,.7); }
.cv-oreum .venue { margin: 12px 0 0; font-size: 12.5px; opacity: .85; }

/* 윤슬 — 큰 기울임 제목 + 알약 모양 사진 */
.cv-yunseul { display: flex; flex-direction: column; justify-content: center; padding: 46px 30px 42px; text-align: center; }
.cv-yunseul .big { margin: 0; font: italic 400 66px/.92 var(--latin); letter-spacing: -.01em; }
.cv-yunseul .big span { display: block; } .cv-yunseul .big span + span { padding-left: 64px; }
.cv-yunseul .pill { margin: 24px auto 0; width: 76%; aspect-ratio: 3 / 4.3; border-radius: 999px; overflow: hidden; }
.cv-yunseul .pill img { width: 100%; height: 100%; object-fit: cover; }
.cv-yunseul .script { margin: -44px 0 0; position: relative; z-index: 2; font: 400 44px/1.2 var(--script); color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.cv-yunseul .names { margin: 26px 0 0; font: 400 18px/1.4 var(--serif-ko); letter-spacing: .06em; }
.cv-yunseul .names i { font-style: normal; color: var(--accent); }
.cv-yunseul .date { margin: 10px 0 0; font: 500 11.5px/1 var(--latin); letter-spacing: .26em; color: var(--ink-3); }

/* 다정 — 우표 테두리 사진 */
.cv-dajeong { display: flex; flex-direction: column; justify-content: center; padding: 48px 26px 40px; text-align: center; }
.cv-dajeong .kicker { margin: 0; font: 500 11px/1 var(--latin); letter-spacing: .42em; color: var(--accent); }
.cv-dajeong .stamp { position: relative; margin: 26px auto 0; width: 84%; padding: 14px; background: radial-gradient(circle, var(--paper) 5.5px, #fff 6px) -9px -9px / 18px 18px; filter: drop-shadow(0 8px 18px rgba(40,60,40,.14)); transform: rotate(-2deg); }
.cv-dajeong .stamp img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cv-dajeong .post { position: absolute; right: 26px; bottom: 26px; width: 68px; height: 68px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.85); color: #fff; display: grid; place-items: center; font: 500 15px/1 var(--latin); letter-spacing: .1em; transform: rotate(-12deg); }
.cv-dajeong .script { margin: 26px 0 0; font: 400 40px/1.2 var(--script); color: var(--accent); }
.cv-dajeong .names { margin: 14px 0 0; font: 400 19px/1.4 var(--serif-ko); }
.cv-dajeong .names i { font-style: normal; color: var(--accent); font-size: 14px; }
.cv-dajeong .date { margin: 12px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* 하늘빛 — 기울인 사진 카드 두 장 */
.cv-haneul { display: flex; flex-direction: column; justify-content: center; padding: 52px 26px 42px; text-align: center; }
.cv-haneul .top { margin: 0; font-size: 14px; color: var(--ink-2); display: flex; justify-content: center; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.cv-haneul .top b { font: 700 19px/1 var(--serif-ko); color: var(--ink); }
.cv-haneul .top span { margin: 0 6px; font: italic 400 15px/1 var(--latin); color: var(--accent); }
.cv-haneul .cards { position: relative; height: min(118vw, 520px); margin-top: 30px; }
.cv-haneul figure { position: absolute; margin: 0; background: #fff; padding: 10px 10px 40px; box-shadow: 0 16px 34px rgba(30,50,70,.16); }
.cv-haneul figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cv-haneul .c1 { left: 6%; top: 0; width: 70%; transform: rotate(-3.5deg); z-index: 2; }
.cv-haneul .c2 { right: 2%; top: 16%; width: 52%; transform: rotate(5deg); }
.cv-haneul figcaption { position: absolute; left: 0; right: 0; bottom: 10px; font: 400 20px/1 var(--hand); color: var(--ink-2); }
.cv-haneul .date { margin: 22px 0 0; font-size: 14px; color: var(--ink); }
.cv-haneul .venue { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }

/* 서명 — 정보 먼저 · 사진 위 서명 */
.cv-seomyeong { display: flex; flex-direction: column; justify-content: center; padding: 56px 26px 0; text-align: center; }
.cv-seomyeong .en { margin: 0; font: 500 20px/1.3 var(--latin); letter-spacing: .16em; }
.cv-seomyeong .rule { display: block; width: 46%; height: 1px; margin: 18px auto; background: var(--ink-3); }
.cv-seomyeong .when { margin: 0; font-size: 14px; color: var(--ink); }
.cv-seomyeong .where { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }
.cv-seomyeong .ph { position: relative; margin: 30px -26px 0; }
.cv-seomyeong .ph img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cv-seomyeong .sign { position: absolute; left: 0; right: 0; bottom: 6%; font: 400 58px/1 var(--script); color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.3); }

/* 편지 — 봉랍 찍은 편지지 */
.cv-pyeonji { display: flex; flex-direction: column; justify-content: center; padding: 50px 24px 40px; text-align: center; background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 14%, var(--paper)), color-mix(in srgb, var(--accent) 28%, var(--paper))); }
.cv-pyeonji .letter { position: relative; background: #fffdfa; padding: 46px 22px 26px; box-shadow: 0 18px 40px rgba(110,70,50,.16); background-image: repeating-linear-gradient(0deg, rgba(120,90,70,.025) 0 1px, transparent 1px 3px); }
.cv-pyeonji .seal { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 70%, #000)); color: #fff6ef; display: grid; place-items: center; font: italic 500 16px/1 var(--latin); letter-spacing: .04em; box-shadow: 0 4px 10px rgba(110,60,40,.3); }
.cv-pyeonji .to { margin: 0; font: italic 400 16px/1 var(--latin); color: var(--ink-3); }
.cv-pyeonji .ttl { margin: 12px 0 20px; font: italic 400 34px/1.15 var(--latin); }
.cv-pyeonji figure { margin: 0; } .cv-pyeonji figure img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; }
.cv-pyeonji .from { margin: 18px 0 0; font: italic 400 15px/1 var(--latin); color: var(--ink-3); }
.cv-pyeonji .from span { display: block; margin-top: 8px; font: 400 34px/1 var(--script); color: var(--accent); }
.cv-pyeonji .date { margin: 26px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* 단색 — 사진 없는 세로쓰기 이름 */
.cv-dansaek { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 60px 26px 50px; background: var(--accent); color: color-mix(in srgb, #fff 90%, var(--accent)); text-align: center; }
.cv-dansaek .top { margin: 0; font: 400 15px/1 var(--serif-ko); letter-spacing: .3em; opacity: .85; }
.cv-dansaek .vt { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 48px 0; }
.cv-dansaek .v { writing-mode: vertical-rl; font: 400 82px/1 var(--serif-ko); letter-spacing: .1em; }
.cv-dansaek .and { writing-mode: vertical-rl; font-size: 14px; letter-spacing: .4em; opacity: .75; }
.cv-dansaek .date { margin: 0; font-size: 14px; letter-spacing: .04em; }
.cv-dansaek .venue { margin: 8px 0 0; font-size: 13px; opacity: .8; }

/* 들녘 — 넓은 풍경 사진 + 왼쪽 아래 큰 이름 */
.cv-deulnyeok { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: 64px 26px 64px; }
.cv-deulnyeok .shade { background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 30%, transparent 55%, rgba(0,0,0,.55)); }
.cv-deulnyeok .tr { margin: 0; align-self: flex-end; text-align: right; font: 500 12px/1.7 var(--latin); letter-spacing: .24em; }
.cv-deulnyeok .names { margin: 0; font: 500 46px/1 var(--latin); letter-spacing: .06em; text-transform: uppercase; }
.cv-deulnyeok .names span { display: block; } .cv-deulnyeok .names span + span { margin-top: 6px; }
.cv-deulnyeok .ko { margin: 16px 0 0; font: 400 15px/1.5 var(--serif-ko); }
.cv-deulnyeok .venue { margin: 6px 0 0; font-size: 12.5px; opacity: .85; }

/* 타원 — 테두리 글자 이름 + 타원 사진 + 날짜 원 */
.cv-tawon { display: flex; flex-direction: column; justify-content: center; padding: 46px 22px 40px; text-align: center; }
.cv-tawon .o { margin: 0; position: relative; z-index: 3; font: 400 clamp(58px, 18vw, 78px)/.9 var(--didone); letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.cv-tawon .top { margin-bottom: -26px; } .cv-tawon .bot { margin-top: -28px; }
.cv-tawon .mid { position: relative; }
.cv-tawon .oval { margin: 0 auto; width: 66%; aspect-ratio: 3 / 4.3; border-radius: 50%; overflow: hidden; }
.cv-tawon .oval img { width: 100%; height: 100%; object-fit: cover; }
.cv-tawon .badge { position: absolute; right: 5%; top: 46%; width: 88px; height: 88px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-content: center; gap: 5px; transform: rotate(-9deg); z-index: 4; }
.cv-tawon .badge b { font: 400 22px/1 var(--didone); } .cv-tawon .badge span { font: 500 8.5px/1 var(--latin); letter-spacing: .16em; }
.cv-tawon .ko { margin: 22px 0 0; font: 400 17px/1.4 var(--serif-ko); }
.cv-tawon .venue { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); }

/* 손 — 위 사진 + 물결 + 아래 색 판 */
.cv-son { display: flex; flex-direction: column; }
.cv-son .ph { position: relative; margin: 0; height: 62svh; min-height: 380px; overflow: hidden; }
.cv-son .ph img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s cubic-bezier(.15,.6,.25,1); }
.ready .cv-son .ph img { transform: scale(1); }
.cv-son .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 34px; z-index: 5; }
.cv-son .wave path { fill: color-mix(in srgb, var(--accent) 22%, var(--paper)); }
.cv-son .panel { flex: 1; background: color-mix(in srgb, var(--accent) 22%, var(--paper)); padding: 18px 26px 46px; text-align: center; }
.cv-son .small { margin: 0; font: 500 10.5px/1 var(--latin); letter-spacing: .4em; color: var(--accent); }
.cv-son .names { margin: 16px 0 0; font: 400 24px/1.3 var(--serif-ko); }
.cv-son .names i { font: italic 400 20px/1 var(--latin); color: var(--accent); }
.cv-son .date { margin: 14px 0 0; font-size: 14px; } .cv-son .venue { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }

/* 도시 — 밤 사진 + 흰 필기체 */
.cv-dosi { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: 14vh 26px 64px; text-align: center; }
.cv-dosi .shade { background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 40%, rgba(0,0,0,.6)); }
.cv-dosi .script { margin: 0; font: 400 62px/1 var(--script); }
.cv-dosi .script span { display: block; } .cv-dosi .script span + span { margin-top: -2px; padding-left: 40px; }
.cv-dosi .names { margin: 0; font: 400 20px/1.4 var(--serif-ko); letter-spacing: .08em; }
.cv-dosi .invline { margin: 10px 0 0; font-size: 13px; opacity: .85; }
.cv-dosi .date { margin: 6px 0 0; font-size: 12.5px; opacity: .8; }

/* 화보 — 잡지 표지 */
.cv-hwabo { display: flex; flex-direction: column; background: var(--accent); color: #fff; }
.cv-hwabo .mast { padding: 44px 22px 6px; text-align: center; }
.cv-hwabo .vol, .cv-hwabo .issue { display: block; font: 500 10.5px/1 var(--latin); letter-spacing: .32em; opacity: .85; }
.cv-hwabo .mh { margin: 8px 0 6px; font: 400 112px/.85 var(--didone); letter-spacing: -.02em; }
.cv-hwabo .mh i { font-style: italic; font-size: 64px; margin: 0 6px; vertical-align: 18px; }
.cv-hwabo .ph { position: relative; margin: 14px 0 0; flex: 1; }
.cv-hwabo .ph img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.cv-hwabo figcaption { position: absolute; left: 20px; right: 20px; bottom: 22px; text-align: left; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.cv-hwabo figcaption b { display: block; font: 700 26px/1.25 var(--serif-ko); margin: 8px 0 10px; }
.cv-hwabo figcaption span { display: block; font-size: 12.5px; line-height: 1.6; }
.cv-hwabo .tag { display: inline-block !important; padding: 5px 8px; background: #fff; color: var(--ink); font: 600 10px/1 var(--latin) !important; letter-spacing: .2em; text-shadow: none; }

/* 여름 — 하늘 사진 + 굵은 붓글씨 */
.cv-yeoreum { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: 58px 24px 60px; }
.cv-yeoreum .shade { background: linear-gradient(180deg, rgba(0,0,0,.18), transparent 24%, transparent 60%, rgba(0,0,0,.42)); }
.cv-yeoreum .top { margin: 0; display: flex; justify-content: space-between; font: 600 12px/1 var(--latin); letter-spacing: .2em; }
.cv-yeoreum .brush { margin: 0; font: 400 58px/1.05 var(--brush); text-align: center; transform: rotate(-4deg); text-shadow: 0 3px 16px rgba(0,0,0,.25); }
.cv-yeoreum .names { margin: 18px 0 0; text-align: center; font: 400 18px/1.4 var(--serif-ko); }
.cv-yeoreum .venue { margin: 6px 0 0; text-align: center; font-size: 12.5px; opacity: .9; }

/* 그림 — 손그림 표지 */
.cv-geurim { display: flex; flex-direction: column; justify-content: center; padding: 48px 26px 40px; text-align: center; }
.cv-geurim .hand { margin: 0; font: 400 44px/1.1 var(--hand); color: var(--ink); }
.cv-geurim .frame { margin: 22px auto 0; width: 88%; padding: 12px; border: 2px dashed color-mix(in srgb, var(--ink) 55%, var(--paper)); border-radius: 22px; transform: rotate(-1.2deg); background: #fff; }
.cv-geurim .frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; }
.cv-geurim .nm { margin: 22px 0 0; font: 400 28px/1.2 var(--hand); }
.cv-geurim .nm i { font-style: normal; color: var(--accent); }
.cv-geurim .date { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* ---------- 초대 글 ---------- */
.poem p { margin: 0; font: 400 15.5px/2.05 var(--serif-ko); color: var(--ink-2); min-height: 1em; }
.poem p.gap { height: 18px; }
.mood { margin: 48px -28px 0; }
.mood img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- 양가 ---------- */
.fam { display: flex; align-items: baseline; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 15px; line-height: 2.1; }
.fam .p { color: var(--ink-2); }
.fam .of { font-size: 13px; color: var(--ink-3); margin-right: 6px; }
.fam strong { font: 700 17px/1 var(--serif-ko); }
.fam .role { font-size: 12.5px; color: var(--accent); margin-right: 2px; }
.fam-wrap { display: grid; gap: 6px; margin-bottom: 36px; }

/* ---------- 날짜·달력·남은 날 ---------- */
.bigdate { font-family: var(--didone); font-variation-settings: "opsz" 96; font-size: 82px; line-height: .9; letter-spacing: -.03em; display: flex; justify-content: center; align-items: center; gap: 6px; }
.bigdate i { font-style: normal; font-size: 46px; color: var(--accent); transform: translateY(-4px); }
.datetxt { margin: 22px 0 0; font-size: 14.5px; line-height: 1.8; color: var(--ink-2); }
.datetxt .en { font: italic 400 15px/1 var(--latin); color: var(--ink-3); }
.cal { margin: 44px auto 0; max-width: 320px; }
.cal .mh { font: 500 13px/1 var(--latin); letter-spacing: .3em; color: var(--ink-3); margin-bottom: 18px; }
.cal .grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 10px; font-size: 14px; }
.cal .wk { font-size: 12px; color: var(--ink-3); padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cal .d { height: 36px; display: grid; place-items: center; }
.cal .sun { color: var(--sun); }
.cal .on span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.cd { display: flex; justify-content: center; gap: 8px; margin: 40px 0 0; }
.cd div { width: 64px; padding: 12px 0 10px; border-radius: 12px; background: var(--card); }
.cd b { display: block; font: 400 26px/1 var(--didone); font-variant-numeric: tabular-nums; }
.cd small { display: block; margin-top: 6px; font: 500 10px/1 var(--latin); letter-spacing: .2em; color: var(--ink-3); }
.dday { margin: 22px 0 0; font-size: 14.5px; color: var(--ink-2); }
.dday b { color: var(--accent); font-weight: 600; }

/* ---------- 소개 ---------- */
.pf { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: left; }
.pf .card { background: var(--card); border-radius: 4px; overflow: hidden; }
.pf img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pf .body { padding: 14px 14px 16px; }
.pf .who { font-size: 12px; color: var(--accent); }
.pf .nm { font: 700 17px/1.4 var(--serif-ko); margin: 2px 0 8px; }
.pf p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }

/* ---------- 우리의 시간 ---------- */
.tl { position: relative; text-align: left; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-it { position: relative; padding-bottom: 40px; }
.tl-it:last-child { padding-bottom: 0; }
.tl-it::before { content: ""; position: absolute; left: -26px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 1px solid var(--accent); }
.tl-it:last-child::before { background: var(--accent); }
.tl-date { font: 500 12px/1 var(--latin); letter-spacing: .2em; color: var(--accent); }
.tl-ttl { margin: 8px 0 6px; font: 700 16px/1.4 var(--serif-ko); }
.tl-txt { margin: 0; font-size: 13.5px; line-height: 1.75; color: var(--ink-2); white-space: pre-line; }
.tl-it img { margin-top: 14px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }

/* ---------- 갤러리 ---------- */
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 -14px; }
.gal button { aspect-ratio: 1; overflow: hidden; background: #dcd9d3; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gal button:active img { transform: scale(1.05); }
.gal .more { margin-top: 22px; }
.viewer { position: fixed; inset: 0; z-index: 80; background: rgba(10,10,10,.96); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; touch-action: none; }
.viewer.open { opacity: 1; visibility: visible; }
.viewer .top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 20px; color: rgba(255,255,255,.8); font: 500 13px/1 var(--latin); letter-spacing: .14em; }
.viewer .x { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; }
.viewer .track { position: relative; overflow: hidden; }
.viewer .rail { display: flex; height: 100%; transition: transform .38s var(--ease); }
.viewer .slide { flex: 0 0 100%; display: grid; place-items: center; padding: 0 6px; }
.viewer .slide img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer .nav { display: flex; justify-content: center; gap: 28px; padding: 14px 0 calc(18px + env(safe-area-inset-bottom)); }
.viewer .nav button { width: 44px; height: 44px; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; }

/* 갤러리: 한 장씩 넘김 */
.gpg { position: relative; margin: 0 -28px; }
.gpg-rail, .gsw-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gpg-rail::-webkit-scrollbar, .gsw-rail::-webkit-scrollbar { display: none; }
.gpg-rail button { flex: 0 0 100%; scroll-snap-align: center; }
.gpg-rail img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gpg-n { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.45); color: #fff; font: 500 11px/1 var(--latin); letter-spacing: .12em; }
.sec-gallery .dots i { max-width: 16px; }
.sec-gallery .dots { flex-wrap: wrap; }
/* 갤러리: 옆으로 밀기 */
.gsw { margin: 0 -28px; }
.gsw-rail { gap: 10px; padding: 0 28px; scroll-padding: 0 28px; }
.gsw-rail button { flex: 0 0 78%; scroll-snap-align: start; border-radius: 4px; overflow: hidden; }
.gsw-rail img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.gsw-nav { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 18px; font: 500 12px/1 var(--latin); letter-spacing: .14em; color: var(--ink-3); }
.gsw-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
/* 갤러리: 큰 사진 + 작은 줄 */
.gfu { margin: 0 -28px; }
.gfu-big { display: block; width: 100%; }
.gfu-big img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .16s; }
.gfu-th { display: flex; gap: 4px; overflow-x: auto; padding: 4px 4px 0; scrollbar-width: none; }
.gfu-th::-webkit-scrollbar { display: none; }
.gfu-th button { flex: 0 0 64px; height: 64px; opacity: .5; transition: opacity .2s; }
.gfu-th button.on { opacity: 1; }
.gfu-th img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 오시는 길 ---------- */
.venue { font: 700 18px/1.5 var(--serif-ko); }
.venue small { display: block; font: 400 14px/1.6 var(--sans); color: var(--ink-2); }
.addr { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.addr button { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--ink-3); }
.tel { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.map { position: relative; display: block; margin: 28px -28px 0; height: 260px; overflow: hidden; background: #e4e1da; }
.map .map-open { position: absolute; inset: 0; display: block; }
.map .tiles { position: absolute; inset: 0; filter: grayscale(1) contrast(1.04) brightness(1.02); }
.map .tiles img { position: absolute; max-width: none; width: 256px; height: 256px; user-select: none; -webkit-user-drag: none; }
.map .pin { position: absolute; left: 50%; top: 50%; width: 30px; height: 42px; transform: translate(-50%, -100%); filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.map .pin path { fill: var(--ink); } .map .pin circle { fill: var(--paper); }
.map .osm { position: absolute; z-index: 2; right: 6px; bottom: 6px; font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,.8); color: #555; }
.map.nomap .tiles { background: repeating-linear-gradient(45deg, #e8e5df 0 12px, #e2dfd8 12px 24px); }
.navs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.navs a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 12px; background: var(--card); font-size: 13.5px; }
.navs i { width: 8px; height: 8px; border-radius: 2px; }
.trans { margin: 34px 0 0; text-align: left; border-top: 1px solid var(--line); }
.trans div { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 16px 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.7; }
.trans b { font-weight: 600; color: var(--accent); font-size: 13px; }

/* ---------- 안내 카드(옆으로 넘김) ---------- */
.ntc { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -28px; padding: 0 28px; scrollbar-width: none; }
.ntc::-webkit-scrollbar { display: none; }
.ntc .card { flex: 0 0 86%; scroll-snap-align: center; padding: 30px 22px; border-radius: 4px; background: var(--card); text-align: center; }
.ntc h3 { margin: 0 0 12px; font: 700 16px/1.4 var(--serif-ko); }
.ntc p { margin: 0; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); white-space: pre-line; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .3s, width .3s; }
.dots i.on { width: 16px; border-radius: 3px; background: var(--ink-3); }

/* ---------- 참석 의사 ---------- */
.rsvp-card { padding: 26px 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
.rsvp-card .who { font: 400 16px/1.5 var(--serif-ko); }
.rsvp-card .when { margin: 14px 0 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }

/* ---------- 마음 전하실 곳 ---------- */
.acc { text-align: left; display: grid; gap: 10px; }
.acc details { border-radius: 12px; background: var(--card); overflow: hidden; }
.acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 18px 18px; font-size: 14.5px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary svg { transition: transform .3s; }
.acc details[open] summary svg { transform: rotate(180deg); }
.acc .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.acc .row .t { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.acc .row .t b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.acc .row .bt { display: flex; gap: 6px; flex: none; }
.acc .row .bt button, .acc .row .bt a { font-size: 12px; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }

/* 손님 사이트에서 받는 곳이 없으면 구간째 숨김(견본은 늘 보임) */
.inv:not(.sample):not(.api-gb) .sec-guestbook, .inv:not(.sample):not(.api-rsvp) .sec-rsvp { display: none; }

/* ---------- 방명록 ---------- */
.gb { display: grid; gap: 10px; text-align: left; margin-bottom: 22px; }
.gb .it { position: relative; padding: 18px 18px 14px; border-radius: 4px; background: var(--card); }
.gb .it p { margin: 0; font-size: 14px; line-height: 1.75; white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere; }
.gb .it .by { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.gb-empty { margin: 0; padding: 26px 0; font-size: 13.5px; color: var(--ink-3); text-align: center; }
.gb .it .del { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--ink-3); }

/* ---------- 끝 인사 ---------- */
.end { position: relative; margin: 0; }
.end img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.end figcaption { position: absolute; inset: auto 0 0 0; padding: 120px 24px 44px; background: linear-gradient(transparent, rgba(0,0,0,.62)); color: #fff; text-align: center; }
.end figcaption p { margin: 0; font: 400 17px/1.9 var(--serif-ko); }
.shr { display: grid; gap: 10px; padding: 40px 28px 64px; }
.shr .btn-line { width: 100%; border-radius: 14px; }

/* ---------- 창(모달) ---------- */
.modal { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.42); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.modal.open { opacity: 1; visibility: visible; }
.sheet { width: 100%; max-width: var(--col); max-height: 88vh; overflow: auto; background: var(--paper); border-radius: 22px 22px 0 0; padding: 26px 24px calc(26px + env(safe-area-inset-bottom)); transform: translateY(40px); transition: transform .38s var(--ease); }
.modal.open .sheet { transform: none; }
.sheet h3 { margin: 0 0 20px; font: 700 18px/1.4 var(--serif-ko); text-align: center; }
.sheet .x { position: absolute; }
.fld { display: grid; gap: 8px; margin-bottom: 16px; text-align: left; }
.fld > span { font-size: 13px; color: var(--ink-2); }
.fld input, .fld textarea { width: 100%; font: inherit; font-size: 15px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
.fld textarea { min-height: 110px; resize: vertical; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 14px; transition: background .2s, color .2s; }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ct { display: grid; gap: 2px; }
.ct .row { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ct .row small { color: var(--accent); margin-right: 6px; }
.ct .row .bt { display: flex; gap: 8px; }
.ct .row .bt a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--card); }
.ct h4 { margin: 18px 0 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: .08em; }

/* ---------- 움직임 줄이기 ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-r], .cv-anim, .cv-eunyeom .ph-main img { transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .btn-solid::after, .scroll-hint { animation: none; display: none; }
}
