/* ============ 글꼴 (네이버 마루부리, CDN) ============ */
@font-face { font-family: 'Maru'; font-weight: 400; font-display: swap; src: url(https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Regular.woff2) format('woff2'); }
@font-face { font-family: 'Maru'; font-weight: 600; font-display: swap; src: url(https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-SemiBold.woff2) format('woff2'); }
@font-face { font-family: 'Maru'; font-weight: 700; font-display: swap; src: url(https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Bold.woff2) format('woff2'); }

/* ============ 기본 ============ */
:root {
  --bg: #ffffff;          /* 기본 흰색 */
  --paper: #ffffff;
  --ink: #333030;
  --ink-2: #5f5955;
  --ink-3: #9b948f;
  --line: #ebe6e2;
  --serif: 'Maru', 'Nanum Myeongjo', serif;
  --script: 'Pinyon Script', cursive;
  --en: 'Bodoni Moda', serif;
  --fs: 16px;              /* 본문(큰 글씨 모드에서 커짐) */
  --phone: 430px;
  --bar-h: 56px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
/* ============ 포인트 색 테마 (data.js 의 theme 으로 고름) ============ */
:root, html[data-theme='blush'] {   /* 연핑크 */
  --accent: #e3a3ab; --accent-strong: #b5737e; --accent-soft: #fbf0f1;
  --btn: #f9e9eb; --btn-ink: #9a5a66; --pick: #e8b4bb; --section: #fcfafa;
  --ribbon-filter: none;
}
html[data-theme='sage'] {           /* 세이지 그린 */
  --accent: #a3b5a1; --accent-strong: #63785f; --accent-soft: #f1f5ef;
  --btn: #e9efe7; --btn-ink: #4f6a4c; --pick: #b3c4b0; --section: #fafbf9;
  --ribbon-filter: hue-rotate(118deg) saturate(.55) brightness(1.02);
}
html[data-theme='mocha'] {          /* 모카 베이지 */
  --accent: #c8ae96; --accent-strong: #8b6e57; --accent-soft: #f7f2ed;
  --btn: #f0e8df; --btn-ink: #775a44; --pick: #d4bfaa; --section: #fbfaf8;
  --ribbon-filter: hue-rotate(28deg) saturate(.55) brightness(1.02);
}
html[data-theme='blue'] {           /* 더스티 블루 */
  --accent: #a4b5c9; --accent-strong: #5e7491; --accent-soft: #f0f3f7;
  --btn: #e6ecf3; --btn-ink: #4c6383; --pick: #b5c4d6; --section: #f9fafc;
  --ribbon-filter: hue-rotate(205deg) saturate(.5) brightness(1.03);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* display를 준 레이어도 hidden이면 확실히 숨김 */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--serif); color: var(--ink); background: #f6f5f3;
  font-size: var(--fs); line-height: 1.85; letter-spacing: -.02em;
  word-break: keep-all; -webkit-font-smoothing: antialiased;
}
html.big { --fs: 18.5px; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
ul { list-style: none; }
.ico { width: 22px; height: 22px; flex: none; }
.ico--lg { width: 52px; height: 52px; color: var(--accent); }
body.lock { overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* PC: 가운데 모바일 폭 */
.phone {
  position: relative; max-width: var(--phone); margin: 0 auto; min-height: 100vh;
  background: var(--bg) url(../images/paper.jpg) 0 0 / 320px; background-blend-mode: multiply;
  overflow-x: clip; padding-bottom: var(--bar-h);
}
@media (min-width: 700px) {
  body { background: radial-gradient(circle at 50% 0, #fbfaf9, #eeebe7 75%); }
  .phone { box-shadow: 0 0 50px rgba(70, 60, 55, .14); }
}

/* ============ 오프닝(인트로) 공통 ============ */
/* 종류: editorial · lettering · polaroid · ribbon  (data.js intro.style) */
.opening {
  position: fixed; inset: 0; z-index: 90; margin: 0 auto; max-width: var(--phone);
  overflow: hidden; cursor: pointer;
}
.opening__paper {
  position: absolute; inset: 0;
  background: #fff url(../images/paper.jpg) 0 0 / 320px; background-blend-mode: multiply;
  transition: opacity .7s var(--ease);
}
.opening__stage { position: absolute; inset: 0; }
.opening .hero__petals { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.opening__skip {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 5;
  padding: 7px 18px; border-radius: 99px; background: rgba(255, 255, 255, .85); color: var(--ink-2); font-size: 15px;
  box-shadow: 0 1px 6px rgba(70, 60, 55, .12); transition: opacity .3s;
}
.opening.expand .opening__skip { opacity: 0; }
.opening.expand { pointer-events: none; }
.opening.is-gone { display: none; }
/* 마지막에 메인 사진과 똑같아지는 사진 */
.op-full, .op-photo { position: absolute; overflow: hidden; }
.op-full img, .op-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.op-shade::after { /* 메인과 같은 그림자 막 */
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .9s; pointer-events: none;
  background: linear-gradient(rgba(0,0,0,.18), transparent 26%, transparent 62%, rgba(0,0,0,.28));
}
.opening.expand .op-shade::after { opacity: 1; }
/* 사진이 커지는 종류는 종이가 사라짐(뒤에 같은 메인 사진이 있음) */
.opening[data-style='ribbon'].expand .opening__paper,
.opening[data-style='polaroid'].expand .opening__paper { opacity: 0; transition-delay: .2s; }
.op-line { display: block; overflow: hidden; }
.op-line > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); }
.opening.play .op-line > span { transform: none; }

/* ── 1) 에디토리얼: 이름이 줄마다 올라옴 → 가운데 틈이 열리며 사진 ── */
.ed {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-bottom: 4vh; transition: opacity .35s;
}
.ed__eyebrow { font-family: var(--en); font-size: 11.5px; letter-spacing: .44em; color: var(--ink-3); margin-bottom: 26px; }
.ed__names { font-family: var(--en); font-style: italic; font-weight: 400; font-size: 60px; line-height: 1.04; color: var(--ink); }
.ed__names .amp { color: var(--accent-strong); font-size: 34px; line-height: 1.5; }
.amp-en { font-family: var(--en); font-style: italic; font-size: .62em; color: var(--accent-strong); vertical-align: .08em; padding: 0 .08em; }
.ed__names .amp-en { font-size: 1em; }
.ed__rule { display: block; width: 54px; height: 1px; margin: 28px auto 18px; background: var(--accent); transform: scaleX(0); transition: transform .9s .75s var(--ease); }
.opening.play .ed__rule { transform: scaleX(1); }
.ed__date { font-family: var(--en); font-size: 13px; letter-spacing: .34em; color: var(--ink-2); }
.ed .op-line:nth-child(1) > span { transition-delay: .05s; }
.ed__names .op-line:nth-child(1) > span { transition-delay: .2s; }
.ed__names .op-line:nth-child(2) > span { transition-delay: .33s; }
.ed__names .op-line:nth-child(3) > span { transition-delay: .46s; }
.ed__date.op-line > span { transition-delay: .9s; }
.opening[data-style='editorial'] .op-full { clip-path: inset(0 50% 0 50%); transition: clip-path 1.1s cubic-bezier(.75, 0, .2, 1); }
.opening[data-style='editorial'].expand .op-full { clip-path: inset(0 0 0 0); }
.opening[data-style='editorial'].expand .ed { opacity: 0; }

/* ── 2) 레터링: 손글씨가 써지듯 → 흐린 사진이 선명해짐 ── */
.lt {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px 4vh; transition: opacity .6s;
}
.lt__names {
  font-family: var(--script); font-size: 56px; line-height: 1.25; color: var(--accent-strong);
  -webkit-mask: linear-gradient(90deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat;
          mask: linear-gradient(90deg, #000 40%, transparent 60%) 100% 0 / 250% 100% no-repeat;
  transition: -webkit-mask-position 1.7s cubic-bezier(.45, .1, .35, 1), mask-position 1.7s cubic-bezier(.45, .1, .35, 1);
}
.opening.play .lt__names { -webkit-mask-position: 0 0; mask-position: 0 0; }
.lt__sub { margin-top: 18px; font-family: var(--en); font-size: 12.5px; letter-spacing: .36em; color: var(--ink-3); }
.lt__sub.op-line > span { transition-delay: 1.2s; }
.lt__sub--date { margin-top: 6px; }
.lt__sub--date.op-line > span { transition-delay: 1.35s; }
.opening[data-style='lettering'] .op-full { opacity: 0; transform: scale(1.08); filter: blur(14px); transition: opacity 1s, transform 1.4s var(--ease), filter 1.1s; }
.opening[data-style='lettering'].expand .op-full { opacity: 1; transform: none; filter: none; }
.opening[data-style='lettering'].expand .lt { opacity: 0; }

/* ── 3) 폴라로이드: 사진이 차례로 쌓임 → 맨 위 사진이 화면 가득 ── */
.pl {
  position: absolute; padding: 8px 8px 40px; background: #fff; opacity: 0;
  box-shadow: 0 16px 30px -14px rgba(70, 60, 55, .45);
  transform: translateY(-80px) rotate(calc(var(--r) + 14deg)) scale(1.06);
  transition: opacity .5s, transform .8s cubic-bezier(.2, .9, .3, 1.15);
}
.pl img { width: 100%; height: 100%; object-fit: cover; display: block; }
.opening.play .pl { opacity: 1; transform: rotate(var(--r)); }
.pl--1 { --r: -9deg; transition-delay: 0s; }
.pl--2 { --r: 7deg; transition-delay: .32s; }
.pl--main { --r: -1.5deg; transition-delay: .64s; z-index: 2; }
.pl__cap {
  position: absolute; left: 0; right: 0; text-align: center; font-family: var(--script); font-size: 40px; color: var(--accent-strong);
  opacity: 0; transform: translateY(8px); transition: opacity .8s 1.2s, transform .8s 1.2s;
}
.opening.play .pl__cap { opacity: 1; transform: none; }
.opening[data-style='polaroid'].expand .pl--main {
  padding: 0; transform: none; box-shadow: none;
  transition: left .95s var(--ease), top .95s var(--ease), width .95s var(--ease), height .95s var(--ease), padding .6s, transform .8s var(--ease), box-shadow .4s;
  transition-delay: 0s;
}
.opening[data-style='polaroid'].expand .pl--1, .opening[data-style='polaroid'].expand .pl--2,
.opening[data-style='polaroid'].expand .pl__cap { opacity: 0; transition: opacity .35s; }

/* ── 4) 리본 ── */
.opening__col { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 8vh; }
.opening__col::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.75), rgba(255,255,255,0) 62%); }
.opening__eyebrow, .opening__names, .opening__date, .opening__slot { position: relative; transition: opacity .4s; }
.opening__eyebrow { font-family: var(--en); font-style: italic; font-size: 15px; letter-spacing: .14em; color: var(--accent); }
.opening__names { font-family: var(--script); font-size: 46px; line-height: 1.3; color: var(--accent-strong); margin-top: 2px; }
.opening__date { font-family: var(--en); font-size: 13px; letter-spacing: .34em; color: var(--ink-2); margin-top: 4px; }
.opening__slot { width: 62%; max-width: 270px; aspect-ratio: 3 / 4; margin-top: 4vh; flex: none; }
.opening__arch {
  z-index: 1; border-radius: 200px 200px 14px 14px; border: 6px solid #fff;
  box-shadow: 0 12px 30px -10px rgba(70, 60, 55, .3); background: #f0eeeb;
}
.opening.expand .opening__arch {
  border-radius: 0; border-width: 0; box-shadow: none;
  transition: left .95s var(--ease), top .95s var(--ease), width .95s var(--ease), height .95s var(--ease),
              border-radius .95s var(--ease), border-width .5s, box-shadow .5s;
}
.opening__ribbon { position: absolute; left: 0; right: 0; height: 30px; transform: translateY(-50%); z-index: 2; pointer-events: none; filter: var(--ribbon-filter); }
.rb-band {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(#d6a5a7, #efd0d2 22%, #fbeaeb 44%, #f1d2d4 62%, #dcaeb0 86%, #c99598);
  box-shadow: 0 3px 8px -2px rgba(70, 60, 55, .25);
  transition: transform .6s cubic-bezier(.6, 0, .3, 1);
}
.rb-band--l { left: 0; } .rb-band--r { right: 0; }
.rb-bow {
  position: absolute; left: 50%; top: 50%; width: 44%; max-width: 190px;
  transform: translate(-50%, -21%); transform-origin: 50% 21%;
  filter: drop-shadow(0 6px 8px rgba(70, 60, 55, .22));
  animation: bowIdle 3s ease-in-out infinite;
  transition: transform .45s var(--ease), opacity .4s;
}
.opening__hint {
  position: absolute; left: 0; right: 0; bottom: 80px; text-align: center; font-size: 15px; color: var(--ink-3);
  animation: blink 2.4s infinite; transition: opacity .3s;
}
.opening.untie .rb-bow { animation: none; transform: translate(-50%, -21%) scale(1.2); opacity: 0; }
.opening.untie .rb-band--l { transform: translateX(-102%); }
.opening.untie .rb-band--r { transform: translateX(102%); }
.opening.untie .opening__hint, .opening.untie .opening__eyebrow, .opening.untie .opening__names, .opening.untie .opening__date { opacity: 0; }
@keyframes blink { 50% { opacity: .4; } }
@keyframes bowIdle { 50% { transform: translate(-50%, -21%) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .opening * { transition: none !important; animation: none !important; } }

/* 배경음악 안내 */
.bgm-toast {
  position: fixed; top: 14px; left: 50%; z-index: 95; transform: translate(-50%, -80px);
  display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px;
  background: rgba(255, 255, 255, .92); box-shadow: 0 2px 12px rgba(0, 0, 0, .08); font-size: 15px; white-space: nowrap;
  transition: transform .6s var(--ease);
}
.bgm-toast .ico { width: 18px; height: 18px; }
.bgm-toast.show { transform: translate(-50%, 0); }

/* ============ 메인 ============ */
.hero { position: relative; height: 100svh; min-height: 600px; max-height: 920px; overflow: hidden; background: #ddd8d0; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 3.2s var(--ease); }
.hero.on .hero__img { transform: scale(1); }
.hero.no-zoom .hero__img { transform: none; transition: none; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.18), transparent 26%, transparent 62%, rgba(0,0,0,.28)); pointer-events: none; }
.hero__petals { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.hero__top { position: absolute; top: 7%; left: 0; right: 0; z-index: 3; text-align: center; color: #fff; }
.hero__tagline { font-family: var(--en); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; opacity: .9; }
.hero__date { font-family: var(--en); font-weight: 400; font-style: italic; font-size: 28px; line-height: 1.3; }
.hero__name {
  position: absolute; z-index: 3; font-family: var(--script); font-size: 40px; line-height: 1; color: #2b2323;
  -webkit-text-stroke: .4px #2b2323;
  text-shadow: 0 0 4px #fff, 0 0 10px rgba(255,255,255,.95), 0 0 18px rgba(255,255,255,.8);
  opacity: 0; transition: opacity 1s 1.2s, transform 1s 1.2s;
}
.hero__name::after { /* 손그림 화살표 */
  content: ''; position: absolute; width: 26px; height: 28px; top: 100%;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 28' fill='none' stroke='%233a332d' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M4 2c2 8 6 13 12 17 2 1 4-1 2-3-2-2-5 1-3 4 2 3 5 4 8 4'/%3E%3Cpath d='M17 25l6-1-2-5'/%3E%3C/svg%3E");
}
.hero__name--g { left: 7%; top: 30%; transform: translateY(8px); }
.hero__name--g::after { left: 30%; }
.hero__name--b { right: 7%; top: 24%; transform: translateY(8px); }
.hero__name--b::after { right: 30%; transform: scaleX(-1); }
.hero.on .hero__name { opacity: 1; transform: none; }
.hero__lettering {
  position: absolute; left: 0; right: 0; bottom: 10%; z-index: 3; padding: 0 16px;
  font-family: var(--script); font-weight: 400; font-size: 50px; line-height: 1.2; text-align: center; color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .18);
}
.hero__lettering .w { display: inline-block; white-space: nowrap; }
.hero__lettering .w span { display: inline-block; opacity: 0; transform: translateY(10px); filter: blur(4px); transition: opacity .6s, transform .6s, filter .6s; }
.hero.on .hero__lettering .w span { opacity: 1; transform: none; filter: none; }
.hero__scroll { position: absolute; left: 50%; bottom: 3%; z-index: 3; width: 1px; height: 34px; background: rgba(255,255,255,.7); overflow: hidden; }
.hero__scroll::after { content: ''; position: absolute; left: 0; top: -34px; width: 1px; height: 34px; background: #fff; animation: drip 2s infinite; }
@keyframes drip { to { top: 34px; } }

/* ============ 공통 섹션 ============ */
.sec { position: relative; padding: 88px 28px; text-align: center; }
.sec--gray { background: var(--section) url(../images/paper.jpg) 0 0 / 320px; background-blend-mode: multiply; }
.sec--wave { /* 위쪽을 물결 모양으로 잘라냄(덧칠 없이 → 종이 질감이 끊기지 않음) */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 26' preserveAspectRatio='none'%3E%3Cpath d='M0 14C70 2 140 2 215 12S360 22 430 8V26H0Z'/%3E%3C/svg%3E") top / 100% 26px no-repeat, linear-gradient(#000 0 0) 0 25px / 100% calc(100% - 25px) no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 26' preserveAspectRatio='none'%3E%3Cpath d='M0 14C70 2 140 2 215 12S360 22 430 8V26H0Z'/%3E%3C/svg%3E") top / 100% 26px no-repeat, linear-gradient(#000 0 0) 0 25px / 100% calc(100% - 25px) no-repeat;
}
.label { font-family: var(--en); font-style: italic; font-size: 21px; letter-spacing: .03em; color: var(--accent); text-transform: capitalize; margin-bottom: 2px; }
.title { font-size: 1.28em; font-weight: 700; line-height: 1.55; margin-bottom: 30px; }
.title::after { content: ''; display: block; width: 46px; height: 14px; margin: 14px auto 0; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 14' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M1 7h14M31 7h14'/%3E%3Cpath d='M23 2.5c1.6-2 4.6-.4 3.2 1.8L23 8 19.8 4.3C18.4 2.1 21.4.5 23 2.5z' fill='%23000' fill-opacity='.35'/%3E%3Ccircle cx='23' cy='11.5' r='.9' fill='%23000' stroke='none'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 14' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M1 7h14M31 7h14'/%3E%3Cpath d='M23 2.5c1.6-2 4.6-.4 3.2 1.8L23 8 19.8 4.3C18.4 2.1 21.4.5 23 2.5z' fill='%23000' fill-opacity='.35'/%3E%3Ccircle cx='23' cy='11.5' r='.9' fill='%23000' stroke='none'/%3E%3C/svg%3E") center/contain no-repeat; }
.text { color: var(--ink-2); line-height: 2; }
.text p:empty, .quote p:empty, .greeting p:empty { height: 1em; }
.sprig { width: 44px; height: 44px; color: var(--accent); margin: 0 auto 22px; display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 26px; margin-top: 32px; border-radius: 8px; font-size: 1em; transition: background .2s, color .2s;
}
.btn--line { background: var(--paper); border: 1px solid var(--line); border-radius: 99px; color: var(--ink); }
.btn--line:active { background: var(--section); }
.btn--dark { background: var(--btn); color: var(--btn-ink); min-width: 220px; border-radius: 99px; font-weight: 600; box-shadow: 0 6px 16px -10px rgba(70, 60, 55, .35); }
.btn--dark:active { background: var(--pick); }
.btn--full { width: 100%; }
.btn--chip { min-height: 36px; padding: 0 14px; margin: 0; font-size: 15px; border-radius: 6px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.btn-text { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; padding: 6px; font-size: 15px; color: var(--ink-3); }
.btn-text .ico { width: 17px; height: 17px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; margin-top: 8px; min-width: 0; }

/* 스크롤 등장 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero__img, .hero__lettering span, .hero__name { transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ============ 글귀 + 사진 ============ */
.sec--quote { padding-bottom: 56px; }
.quote p { line-height: 2.3; color: var(--ink-2); background: linear-gradient(transparent calc(100% - 1px), var(--line) 0); display: table; margin: 0 auto; padding: 0 10px; }
.quote p:empty { background: none; }
.quote cite { display: block; margin-top: 18px; font-style: normal; font-size: 15px; color: var(--ink-3); }
.polaroid { margin: 0 28px; padding: 10px 10px 54px; background: #fff; box-shadow: 0 16px 30px -14px rgba(70, 60, 55, .45); transform: rotate(-1.2deg); }
.polaroid.in { transform: rotate(-1.2deg); }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ============ 인사말 ============ */
.greeting p { line-height: 2.1; }
.parents { margin-top: 44px; display: grid; gap: 10px; justify-content: center; }
.parents__row { display: grid; grid-template-columns: auto auto auto; gap: 8px; align-items: baseline; justify-content: center; }
.parents__p { text-align: right; color: var(--ink-2); }
.parents__rel { font-size: 15px; color: var(--ink-3); }
.parents__me { font-weight: 700; font-size: 1.12em; text-align: left; }
.deceased::before { content: '故 '; font-size: .85em; color: var(--ink-3); }

/* ============ 신랑·신부 ============ */
.couple { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 6px; align-items: start; }
.couple__heart { align-self: center; margin-top: -90px; color: var(--accent); }
.couple__heart .ico { width: 18px; height: 18px; fill: var(--accent); stroke: none; }
.couple__photo { aspect-ratio: 4 / 5; border-radius: 999px 999px 12px 12px; overflow: hidden; background: #f2f0ee; border: 4px solid #fff; box-shadow: 0 8px 20px -10px rgba(70, 60, 55, .4); }
.couple__photo img { width: 100%; height: 100%; object-fit: cover; }
.couple__who { margin-top: 16px; font-weight: 700; }
.couple__who em { font-style: normal; font-weight: 400; margin-right: 4px; }
.couple__who--g em { color: #7d93b8; }
.couple__who--b em { color: var(--accent); }
.couple__info { font-size: 15px; color: var(--ink-2); line-height: 1.9; }

/* ============ 달력 ============ */
.cal-when { font-size: 1.12em; font-weight: 700; line-height: 1.7; margin: 14px 0 32px; }
.cal-when span { display: block; font-weight: 400; font-size: .9em; color: var(--ink-2); }
.cal { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; padding: 6px 6px 10px; border-radius: 16px; background: #fff; box-shadow: 0 8px 26px -14px rgba(70, 60, 55, .35); }
.cal th { padding: 16px 0 10px; font-weight: 700; font-size: 15px; }
.cal td { height: 48px; vertical-align: top; padding-top: 6px; font-size: 15px; }
.cal th:first-child, .cal td:first-child { color: var(--accent); }
.cal td.is-day { position: relative; color: #fff !important; }
.cal td.is-day b { position: relative; z-index: 1; font-weight: 700; }
.cal td.is-day::before { content: ''; position: absolute; left: 50%; top: 1px; width: 36px; height: 36px; transform: translateX(-50%); border-radius: 50%; background: var(--accent); }
.cal td.is-day small { position: absolute; left: 50%; transform: translateX(-50%); top: 38px; font-size: 11.5px; color: var(--accent); white-space: nowrap; }
.cal td.is-day:last-child small { left: auto; right: -4px; transform: none; }   /* 토요일: 표 밖으로 안 나가게 */
.cal td.is-day:first-child small { left: -4px; transform: none; }              /* 일요일 */
.countdown { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 36px 0 26px; }
.countdown__box { width: 62px; padding: 10px 0 6px; border-radius: 12px; background: var(--accent-soft); }
.countdown__box b { display: block; font-family: var(--en); font-size: 24px; font-weight: 500; line-height: 1.1; color: var(--accent-strong); }
.countdown__box small { font-family: var(--en); font-style: italic; font-size: 14px; color: var(--ink-3); }
.countdown__sep { color: var(--ink-3); }
.dday { line-height: 2.1; }
.dday .ico { width: 15px; height: 15px; vertical-align: -2px; fill: var(--accent); stroke: none; }
.dday b { color: var(--accent); }
.hl { background: linear-gradient(transparent 58%, var(--accent-soft) 0); background-size: 0 100%; background-repeat: no-repeat; transition: background-size 1.2s .4s var(--ease); }
.in .hl, .dday.in .hl { background-size: 100% 100%; }

/* ============ 갤러리 ============ */
.sec--gallery { padding-left: 0; padding-right: 0; }
.gallery { position: relative; }
.gallery__track {
  display: grid; grid-template-rows: 230px 190px; grid-auto-flow: column dense; grid-auto-columns: 168px; gap: 8px;
  padding: 12px 20px 4px; scroll-padding: 0 20px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__item { border-radius: 10px; overflow: hidden; scroll-snap-align: start; background: #eee; padding: 0; }
.gallery__item:nth-child(3n+1) { grid-row: span 2; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery__item:active img { transform: scale(1.04); }
.gallery__hint {
  position: absolute; right: 12px; top: 26px; padding: 4px 12px; border-radius: 99px; background: rgba(40, 36, 32, .55);
  color: #fff; font-size: 14px; pointer-events: none; transition: opacity .4s;
}
.gallery__hint b { font-weight: 400; letter-spacing: -.1em; animation: nudge 1.4s infinite; display: inline-block; }
.gallery__hint.hide { opacity: 0; }
.gallery__track.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.gallery__track.dragging .gallery__item { pointer-events: none; }
.gallery__arrow { display: none; }
@media (hover: hover) and (pointer: fine) {
  .gallery__track { cursor: grab; }
  .gallery__arrow {
    display: grid; place-items: center; position: absolute; top: calc(50% + 4px); transform: translateY(-50%); z-index: 2;
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(0,0,0,.15); color: var(--ink); transition: opacity .3s;
  }
  .gallery__arrow--prev { left: 10px; } .gallery__arrow--next { right: 10px; }
  .gallery__arrow:disabled { opacity: 0; pointer-events: none; }
}
@keyframes nudge { 50% { transform: translateX(4px); } }

/* ============ 오시는 길 ============ */
.loc { line-height: 2; }
.loc__name { font-weight: 700; }
.loc a { color: inherit; text-decoration: none; }
.loc .btn { margin-top: 18px; min-height: 40px; font-size: 15px; }
.map-wrap { position: relative; margin: 36px -28px 0; }
.map-wrap__sketch { position: absolute; right: 16px; top: -48px; }
.map { position: relative; height: 260px; background: #e9e6e0; overflow: hidden; }
.map--ph { background:
  linear-gradient(90deg, transparent 47%, #fff 47% 53%, transparent 53%) 0 0/100% 100%,
  linear-gradient(transparent 61%, #fff 61% 66%, transparent 66%) 0 0/100% 100%,
  linear-gradient(28deg, transparent 49%, #f7f5f1 49% 51.5%, transparent 51.5%) 0 0/100% 100%,
  repeating-linear-gradient(0deg, #ece8e4 0 1px, transparent 1px 34px),
  repeating-linear-gradient(90deg, #ece8e4 0 1px, transparent 1px 34px), #f6f4f1; }
.map__pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--accent); filter: drop-shadow(0 3px 4px rgba(0,0,0,.2)); }
.map__pin .ico { width: 40px; height: 40px; fill: #fff; }
.map__tag { position: absolute; left: 50%; top: calc(50% + 6px); transform: translateX(-50%); padding: 3px 10px; border-radius: 4px; background: #fff; font-size: 14px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.map__note { position: absolute; left: 10px; bottom: 8px; font-size: 13px; color: var(--ink-3); background: rgba(255,255,255,.85); padding: 1px 8px; border-radius: 4px; }
.navi { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -28px; background: #fff; border-bottom: 1px solid var(--line); }
.navi a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 52px; font-size: 15px; color: inherit; text-decoration: none; }
.navi a + a { border-left: 1px solid var(--line); }
.navi img { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.transport { text-align: left; margin-top: 8px; }
.tr { padding: 28px 2px; border-bottom: 1px solid var(--line); }
.tr:last-child { border-bottom: 0; }
.tr__h { display: flex; align-items: center; gap: 10px; font-size: 1.1em; font-weight: 700; margin-bottom: 12px; }
.tr__h .ico { width: 24px; height: 24px; color: var(--ink-2); }
.tr__row { line-height: 1.9; color: var(--ink); }
.tr__row + .tr__row { margin-top: 2px; }
.tr__row strong { font-weight: 700; }
.tr__note { color: var(--ink-3); font-size: 15px; }
.tag { font-weight: 700; margin-right: 6px; }
.tag--blue { color: #3d6fd6; } .tag--green { color: #3d9a4f; } .tag--red { color: #d0533f; } .tag--gold { color: #b8892c; }
.tr__sub { margin-top: 18px; padding: 18px; border-radius: 10px; background: #fff; }
.tr__sub h4 { font-size: 1em; margin-bottom: 6px; }
.tr__sub p { color: var(--ink-2); font-size: 15px; line-height: 1.8; }
.tr__sub dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin-top: 12px; font-size: 15px; }
.tr__sub dt { color: var(--ink-3); }
.tr__sub a[href^='tel'] { color: inherit; }
.tr__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 15px; color: inherit; text-decoration: none; }
.tr__link img { width: 20px; height: 20px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }

/* ============ 사진·영상 공유 ============ */
.moments-ico { width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--accent); }
.moments-ico .ico { width: 30px; height: 30px; }

/* ============ 계좌 ============ */
.acc { margin-top: 34px; display: grid; gap: 10px; text-align: left; }
.acc__grp { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.acc__head { width: 100%; display: flex; align-items: center; justify-content: space-between; height: 54px; padding: 0 18px; font-weight: 700; }
.acc__head .ico { transition: transform .3s; color: var(--ink-3); }
.acc__grp.open .acc__head .ico { transform: rotate(180deg); }
.acc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.acc__grp.open .acc__body { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__item { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--line); }
.acc__txt { flex: 1; min-width: 0; font-size: 15px; line-height: 1.7; }
.acc__txt b { font-weight: 700; }
.acc__txt span { color: var(--ink-3); }
.acc__btns { display: flex; flex-direction: column; gap: 6px; }
.copy { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: #fff; white-space: nowrap; transition: .2s; }
.copy.done { background: var(--pick); border-color: var(--pick); color: #fff; }
.kpay { min-height: 36px; padding: 0 10px; border-radius: 6px; font-size: 13px; font-weight: 700; background: #fee500; color: #3c1e1e; text-decoration: none; display: grid; place-items: center; }

/* ============ 방명록 ============ */
.gb { margin-top: 30px; display: grid; gap: 10px; text-align: left; }
.gb__item { padding: 18px 18px 14px; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px -10px rgba(70, 60, 55, .35); }
.gb__top { display: flex; justify-content: space-between; align-items: center; }
.gb__name { font-weight: 700; }
.gb__edit { font-size: 14px; color: var(--ink-3); padding: 4px 6px; }
.gb__msg { margin-top: 6px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.gb__date { display: block; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.gb__empty { padding: 30px 0; color: var(--ink-3); text-align: center; }
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 22px; }
.pager button { width: 36px; height: 36px; border-radius: 50%; font-size: 15px; color: var(--ink-3); }
.pager button[aria-current='page'] { background: var(--pick); color: #fff; }

/* ============ 맺음말 ============ */
.sec--closing { padding-bottom: 70px; }
.closing-sign { margin-top: 22px; font-weight: 700; }
.foot { padding: 26px 0 34px; text-align: center; font-family: var(--en); font-size: 13px; color: var(--ink-3); letter-spacing: .06em; }

/* ============ 떠 있는 버튼 · 아래 메뉴 ============ */
.floating {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 12px + env(safe-area-inset-bottom)); z-index: 40;
  width: 100%; max-width: var(--phone); transform: translateX(-50%); display: flex; justify-content: space-between;
  padding: 0 16px; pointer-events: none; transition: opacity .4s, transform .4s;
}
.floating.hide { opacity: 0; transform: translate(-50%, 16px); }
.floating.hide .pill { pointer-events: none; }
.pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 16px; border-radius: 99px; background: rgba(255,255,255,.96); box-shadow: 0 2px 12px rgba(0,0,0,.12); font-size: 15px; }
.pill .ico { width: 17px; height: 17px; }
.pill sup { font-size: 10px; margin-right: 2px; }
.pill[aria-pressed='true'] { background: var(--pick); color: #fff; }
.bar {
  position: fixed; left: 50%; bottom: 0; z-index: 41; width: 100%; max-width: var(--phone); transform: translateX(-50%);
  height: calc(var(--bar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; justify-content: center; align-items: center; background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
}
.bar button { width: 64px; height: 44px; display: grid; place-items: center; color: var(--ink-2); position: relative; }
.bar button + button::before { content: ''; position: absolute; left: 0; top: 14px; height: 16px; border-left: 1px solid var(--line); }
.bar button[aria-pressed='true'] { color: var(--accent); }

/* ============ 레이어 ============ */
.dim { position: fixed; inset: 0; z-index: 60; background: rgba(30, 26, 22, .5); opacity: 0; transition: opacity .3s; }
.dim.show { opacity: 1; }
.modal {
  position: fixed; left: 50%; top: 50%; z-index: 61; width: calc(100% - 40px); max-width: 380px; max-height: 86vh; overflow-y: auto;
  padding: 34px 22px 18px; border-radius: 14px; background: #fff; text-align: center;
  transform: translate(-50%, -46%); opacity: 0; transition: transform .35s var(--ease), opacity .3s;
}
.modal.show { transform: translate(-50%, -50%); opacity: 1; }
.modal__t { font-size: 1.12em; margin-bottom: 18px; }
.modal__x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-3); }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 61; width: 100%; max-width: var(--phone); max-height: 90vh; overflow-y: auto;
  padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: #fff;
  transform: translate(-50%, 100%); transition: transform .4s var(--ease);
}
.sheet.show { transform: translate(-50%, 0); }
.sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: -12px auto 18px; }
.sheet .modal__t { text-align: center; }
.info-list { margin: 20px 0 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; display: grid; gap: 10px; }
.info-list li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.info-list .ico { width: 20px; height: 20px; color: var(--ink-2); }
.info-list + .btn { margin-top: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent-strong); }

/* 폼 */
.field { border: 0; margin-bottom: 18px; text-align: left; position: relative; }
.field > label, .field legend { display: block; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.field small { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.field input[type=text], .field input[type=password], .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px;
}
.field textarea { resize: none; line-height: 1.7; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink-2); }
.count { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--ink-3); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg--3 { grid-template-columns: repeat(3, 1fr); }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; place-items: center; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; cursor: pointer; transition: .2s; }
.seg input:checked + span { border-color: var(--pick); background: var(--btn); color: var(--btn-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: 160px; }
.stepper button { width: 48px; height: 46px; font-size: 20px; color: var(--ink-2); }
.stepper input { flex: 1; width: 0; border: 0; text-align: center; font-size: 16px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
[data-attend-only].off { display: none; }
.form-err { min-height: 0; color: #c0453a; font-size: 14px; margin: -6px 0 10px; text-align: left; }
.form-err:empty { display: none; }
.done { text-align: center; padding: 10px 0; }
.done p { margin: 14px 0 0; line-height: 1.9; }

/* 연락하기 */
.contact h4 { font-size: 15px; color: var(--ink-3); font-weight: 400; margin: 6px 0 6px; text-align: left; }
.contact ul { margin-bottom: 14px; }
.contact li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.contact li:last-child { border-bottom: 0; }
.contact li span { flex: 1; }
.contact li span em { font-style: normal; font-size: 14px; color: var(--ink-3); margin-right: 6px; }
.contact a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--section); color: var(--ink-2); }
.contact a .ico { width: 19px; height: 19px; }

/* 메뉴·공유 */
.menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-list button { width: 100%; min-height: 50px; border-radius: 8px; background: var(--section); font-size: 15px; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 0 4px; }
.share-grid button { display: grid; justify-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
.share-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--section); color: var(--ink); }
.share-ico--img { overflow: hidden; background: none; }
.share-ico--img img { width: 100%; height: 100%; object-fit: cover; }

/* 크게 보기 */
.viewer { position: fixed; inset: 0; z-index: 80; background: #111; color: #fff; display: flex; flex-direction: column; opacity: 0; transition: opacity .3s; }
.viewer.show { opacity: 1; }
.viewer__top { display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 8px 0 20px; font-family: var(--en); font-size: 16px; letter-spacing: .1em; }
.viewer__top button { width: 44px; height: 44px; display: grid; place-items: center; }
.viewer__track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__slide { flex: 0 0 100%; display: grid; place-items: center; scroll-snap-align: center; padding: 0 0 56px; }
.viewer__slide img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.viewer__nav { position: absolute; top: 50%; width: 48px; height: 64px; display: grid; place-items: center; transform: translateY(-50%); color: rgba(255,255,255,.85); }
.viewer__nav--prev { left: 4px; } .viewer__nav--next { right: 4px; }
.viewer__nav:disabled { opacity: .2; }
@media (min-width: 700px) { .viewer__nav--prev { left: calc(50% - 300px); } .viewer__nav--next { right: calc(50% - 300px); } }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 70px); z-index: 99; max-width: calc(100% - 40px);
  padding: 11px 20px; border-radius: 99px; background: rgba(40, 36, 32, .92); color: #fff; font-size: 15px; text-align: center;
  transform: translate(-50%, 10px); opacity: 0; pointer-events: none; transition: .3s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
