/* 공통 뼈대. 색·글꼴은 각 시안의 theme.css 가 변수로 덮어쓴다 */
:root {
  --bg: #f6f4f0;          /* 화면 바깥(PC) */
  --paper: #fffdf9;       /* 카드 바탕 */
  --paper2: #f7f3ec;      /* 번갈아 깔리는 바탕 */
  --ink: #3a3430;
  --sub: #8b817a;
  --line: #e6dfd5;
  --accent: #b9897c;
  --accent-ink: #fff;
  --title: 'Gowun Batang', serif;
  --body: 'Gowun Batang', serif;
  --en: 'Cormorant Garamond', serif;
  --script: 'Pinyon Script', cursive;
  --radius: 14px;
  --w: 440px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
html.is-lock, html.is-intro { overflow: hidden; }
body { font: 15px/1.85 var(--body); color: var(--ink); background: var(--bg); word-break: keep-all; overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

#app { max-width: var(--w); margin: 0 auto; background: var(--paper); min-height: 100vh; overflow: hidden; position: relative; box-shadow: 0 0 40px rgba(0,0,0,.06); }

/* ── 섹션 ── */
.sec { padding: 88px 28px; text-align: center; position: relative; }
.sec:nth-of-type(even) { background: var(--paper2); }
.sec__head { margin-bottom: 40px; }
.sec__no { display: block; font: 500 13px var(--en); color: var(--accent); letter-spacing: .1em; margin-bottom: 6px; }
.eyebrow { font: 500 12px/1 var(--en); letter-spacing: .32em; color: var(--accent); margin-bottom: 14px; }
.sec__title { font: 400 21px/1.4 var(--title); letter-spacing: .06em; }
.lead { color: var(--sub); font-size: 14px; margin-bottom: 30px; }

/* 스크롤 등장 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 0 26px; border-radius: 999px; font-size: 14px; letter-spacing: .02em; }
.btn--line { border: 1px solid var(--line); background: var(--paper); }
.btn--fill { background: var(--accent); color: var(--accent-ink); width: 100%; max-width: 300px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--sub); vertical-align: middle; margin-left: 4px; background: var(--paper); text-decoration: none; }

/* ── 인사말 ── */
.greeting__body { font-size: 15.5px; line-height: 2.15; margin-bottom: 44px; }
.parents { display: inline-grid; gap: 10px; font-size: 15px; margin-bottom: 30px; }
.parents p { display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.parents__p { letter-spacing: .02em; }
.parents__rel { color: var(--sub); font-size: 13px; margin-right: 10px; }
.parents b { font-size: 17px; font-weight: 600; letter-spacing: .08em; }

/* ── 큰 사진 ── */
.sec--photo { padding: 0; background: var(--paper) !important; }
.feature img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.feature__cap { padding: 28px; font: italic 400 18px var(--en); color: var(--sub); }

/* ── 달력 ── */
.when { font-size: 16px; margin-bottom: 34px; }
.when small { color: var(--sub); font-size: 14px; }
.cal { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 6px; margin-bottom: 36px; }
.cal__month { font: 500 20px var(--en); margin-bottom: 18px; letter-spacing: .08em; }
.cal__month small { font-size: 14px; color: var(--sub); margin-left: 4px; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal__dow span { font-size: 12px; color: var(--sub); padding-bottom: 10px; }
.cal__grid span { height: 40px; display: grid; place-items: center; font: 400 15px var(--en); }
.cal .is-sun { color: #c26a5a; }
.cal__grid .is-day { position: relative; color: var(--accent-ink); font-weight: 600; }
.cal__grid .is-day::before { content: ''; position: absolute; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); z-index: -1; }
.cal__grid span { position: relative; z-index: 0; }
.count { display: flex; justify-content: center; align-items: flex-start; gap: 6px; margin-bottom: 26px; }
.count div { min-width: 58px; padding: 10px 0 8px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.count b { display: block; font: 500 24px/1.1 var(--en); }
.count small { font: 500 10px var(--en); letter-spacing: .12em; color: var(--sub); }
.count i { font-style: normal; padding-top: 12px; color: var(--sub); }
.dday { font-size: 14.5px; }
.dday b, .heart { color: var(--accent); }

/* ── 오시는 길 ── */
.venue { font-size: 15px; margin-bottom: 8px; }
.venue b { font-size: 18px; font-weight: 600; }
.venue__addr { font-size: 13.5px; color: var(--sub); margin-bottom: 22px; }
.map { height: 240px; margin: 0 -28px 0; background: var(--paper2) repeating-linear-gradient(45deg, transparent 0 18px, rgba(0,0,0,.025) 18px 19px); display: grid; place-items: center; color: var(--sub); font-size: 13px; }
.map.is-live { display: block; }
.maplinks { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -28px 36px; border-bottom: 1px solid var(--line); }
.maplinks button { padding: 15px 0; font-size: 13.5px; border-right: 1px solid var(--line); background: var(--paper); }
.maplinks button:last-child { border-right: 0; }
.ways { text-align: left; display: grid; gap: 26px; }
.ways h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.ways h3 svg { color: var(--accent); width: 19px; height: 19px; }
.ways ul { list-style: none; font-size: 14px; color: var(--sub); }
.ways li { padding-left: 12px; position: relative; margin-bottom: 4px; }
.ways li::before { content: ''; position: absolute; left: 0; top: .85em; width: 4px; height: 1px; background: var(--sub); }

/* ── 갤러리 ── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0 -14px; }
.grid button { aspect-ratio: 2/3; overflow: hidden; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.grid .is-more { display: none; }
.more { margin-top: 26px; }
.grid--masonry { display: block; columns: 2; column-gap: 6px; }
.grid--masonry button { display: block; width: 100%; aspect-ratio: auto; margin-bottom: 6px; break-inside: avoid; }
.grid--masonry button:nth-child(3n+1) img { aspect-ratio: 3/4; }
.grid--masonry button:nth-child(3n+2) img { aspect-ratio: 2/3; }
.grid--masonry button:nth-child(3n) img { aspect-ratio: 4/5; }

.slide { margin: 0 -28px; }
.slide__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slide__track::-webkit-scrollbar { display: none; }
.slide__item { flex: 0 0 100%; scroll-snap-align: center; }
.slide__item img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.slide__nav { display: flex; justify-content: center; align-items: center; gap: 22px; padding-top: 16px; font: 500 14px var(--en); color: var(--sub); }
.slide__nav button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }

/* ── 안내 ── */
.notice { display: grid; gap: 12px; }
.notice__item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.notice__item h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: var(--accent); }
.notice__item p { font-size: 14px; color: var(--sub); }

/* ── 계좌 ── */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 10px; overflow: hidden; text-align: left; }
.acc__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 17px 20px; font-size: 15px; }
.acc__btn svg { transition: transform .3s; color: var(--sub); }
.acc.open .acc__btn svg { transform: rotate(180deg); }
.acc__body { display: none; border-top: 1px solid var(--line); }
.acc.open .acc__body { display: block; }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; }
.acct:last-child { border-bottom: 0; }
.acct small { color: var(--sub); }
.acct span { color: var(--sub); font-size: 13px; }

/* ── RSVP · 방명록 ── */
.rsvp-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; background: var(--paper); }
.rsvp-card p { font: 400 20px var(--title); margin-bottom: 6px; }
.rsvp-card small { color: var(--sub); font-size: 13px; }
.gb { list-style: none; display: grid; gap: 10px; margin-bottom: 24px; text-align: left; }
.gb li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; }
.gb small { color: var(--sub); font-size: 12px; }

/* ── 마무리 ── */
.closing { font-size: 15px; margin-bottom: 28px; }
.share { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 40px; }
.sign { font: italic 400 15px var(--en); color: var(--sub); letter-spacing: .06em; }

/* ── 인트로 ── */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--paper); transition: opacity .9s ease, visibility .9s; }
.intro.is-out { opacity: 0; visibility: hidden; }
.intro__in { max-width: var(--w); padding: 24px; text-align: center; }

/* ── 모달 ── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,16,14,.5); display: grid; place-items: end center; opacity: 0; transition: opacity .3s; }
.modal.on { opacity: 1; }
.modal__box { width: 100%; max-width: var(--w); background: var(--paper); border-radius: 22px 22px 0 0; padding: 30px 24px calc(28px + env(safe-area-inset-bottom)); position: relative; transform: translateY(30px); transition: transform .3s; max-height: 88vh; overflow: auto; }
.modal.on .modal__box { transform: none; }
.modal__x { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; color: var(--sub); }
.modal__t { font: 400 19px var(--title); text-align: center; margin-bottom: 22px; }
.modal__side { font-size: 13px; color: var(--accent); margin: 14px 0 4px; }
.form { display: grid; gap: 14px; }
.form .btn { justify-self: center; margin-top: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 12px 0; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.field span { display: block; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.field input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.modal--lb { background: rgba(0,0,0,.92); place-items: center; }
.modal--lb .modal__box { background: transparent; padding: 0; border-radius: 0; max-height: none; transform: none; }
.modal--lb .modal__x { color: #fff; position: fixed; z-index: 2; }
.lb img { width: 100%; max-height: 82vh; object-fit: contain; }
.lb__nav { display: flex; justify-content: center; align-items: center; gap: 24px; color: #fff; padding-top: 14px; font: 500 14px var(--en); }
.lb__nav button { color: #fff; font-size: 22px; padding: 8px; }

.toast { position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: rgba(30,26,24,.88); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 13.5px; opacity: 0; transition: .3s; z-index: 70; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── 시안 비교 띠 ── */
.pv { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; background: rgba(20,18,16,.72); color: #fff; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 500 12.5px 'Pretendard', sans-serif; } .pv span, .pv a { white-space: nowrap; }
.pv a { color: #fff; text-decoration: none; display: grid; place-items: center; height: 34px; padding: 0 12px; }
.pv__name { border-left: 1px solid rgba(255,255,255,.2); border-right: 1px solid rgba(255,255,255,.2); }
