:root {
  --bg: #111111;
  --bg-deep: #0b0b0b;
  --text: #bdb7ae;
  --title: #e6e1d9;
  --label: #6b6b6b;
  --muted: #8a857d;
  --line: #2a2a2a;
  --pill: #1c1c1c;
  --pill-line: #3a3a3a;
  --red: #9b2c42; /* 버건디 */
  --hero: #cfe5aa;
  --brown: #5a3a0e;
  --brown-2: #8a6a3c;
  --frame: 430px; /* PC에서도 휴대폰과 같은 폭으로 보이게 하는 화면 폭 */
  --serif: "Instrument Serif", "Times New Roman", serif;
  --serif-num: "Playfair Display", "Times New Roman", serif; /* 달력·카운트 숫자용 (정비율 숫자) */
  --sans-en: "Montserrat", sans-serif;
  --sans: "Pretendard", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; } /* 두 손가락 확대·두 번 탭 확대 막기 */
body {
  background: #050505;
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.page {
  max-width: var(--frame);
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,.6);
  container-type: inline-size;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  background: var(--hero);
  color: var(--brown);
  padding: 20px 0 56px;
  text-align: center;
  isolation: isolate;
}
.hero::before {           /* 종이 질감 */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--noise); opacity: .16; mix-blend-mode: multiply;
}
.hero__bar { display: flex; justify-content: flex-end; align-items: center; padding: 0 22px; }
.menu-btn { width: 30px; height: 24px; display: flex; flex-direction: column; justify-content: space-between; padding: 3px 0; }
.menu-btn span { display: block; height: 1.5px; background: var(--brown-2); opacity: .8; }
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 13.2cqw, 68px); line-height: 1; letter-spacing: -.01em;
  margin: 34px 0 20px; white-space: nowrap;
}
.hero__names { font-family: var(--serif); font-size: clamp(34px, 10.5cqw, 50px); line-height: 1.1; }
.hero__info { margin-top: 22px; font-size: 15px; line-height: 1.8; color: var(--brown-2); font-weight: 400; }
.hero__photo { width: 63%; margin: 38px auto 0; aspect-ratio: 3 / 4; overflow: hidden; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- COMMON ---------- */
.section { padding: 110px 28px; text-align: center; }
.label {
  font-family: var(--sans-en); font-weight: 300;
  font-size: 13px; letter-spacing: .32em; text-indent: .32em;
  color: var(--label); margin-bottom: 44px;
}
.serif-title {
  font-family: var(--serif); font-weight: 400; color: var(--title);
  font-size: clamp(38px, 11.5cqw, 52px); line-height: 1.12;
}
.serif-title.small { font-size: 36px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- JOIN ---------- */
.join { padding-top: 60px; padding-bottom: 20px; }
/* 3열 그리드로 부모 이름·관계·이름의 시작점을 위아래로 맞춤, 故는 왼쪽 여백으로 내어씀 */
.parents {
  margin-top: 110px; display: grid; grid-template-columns: repeat(3, auto);
  justify-content: center; column-gap: 10px; row-gap: 18px; align-items: baseline;
  text-align: left; white-space: nowrap;
}
.parents p { display: contents; }
.p-name { position: relative; }
.late { position: absolute; right: 100%; margin-right: 6px; font-style: normal; font-weight: 500; }
.p-name, .c-name { color: var(--title); font-weight: 600; font-size: 16px; }
.c-name { font-size: 17px; }
.rel { font-size: 11.5px; color: var(--muted); }

/* ---------- INVITATION ---------- */
.invitation { padding-top: 60px; }
.letter { width: 88%; margin: 0 auto; }

/* ---------- CALENDAR ---------- */
.calendar { padding-top: 90px; }
.cal__date { font-family: var(--serif-num); color: var(--title); font-size: 38px; line-height: 1; letter-spacing: .01em; font-variant-numeric: lining-nums; }
.cal__time { margin-top: 14px; font-size: 17px; font-weight: 600; color: var(--muted); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 34px 0 30px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 6px; font-family: var(--serif-num); font-size: 15px; color: var(--text); font-variant-numeric: lining-nums tabular-nums; }
.cal .dow { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.cal .sun, .cal .holi { color: var(--red); }
.cal span { display: grid; place-items: center; aspect-ratio: 1; max-width: 100%; }
.cal .day-on { position: relative; color: #111; }
.cal .day-on::before {
  content: ""; position: absolute; width: 40px; height: 40px; border-radius: 50%;
  background: #aaa49b; z-index: 0;
}
.cal .day-on b { position: relative; font-weight: 400; color: #f4f1ec; }
.dday { margin-top: 60px; }
.dday__boxes { display: flex; justify-content: center; gap: 10px; }
.dday__boxes div {
  width: 64px; padding: 12px 0 8px; border: 1px solid var(--line); border-radius: 10px; background: #151515;
  display: flex; flex-direction: column; align-items: center;
}
.dday__boxes b { font-family: var(--serif-num); font-weight: 400; font-size: 24px; font-variant-numeric: lining-nums tabular-nums; line-height: 1.1; color: var(--title); }
.dday__boxes span { font-family: var(--sans-en); font-size: 9px; letter-spacing: .2em; color: var(--label); margin-top: 4px; }
.dday__msg { margin-top: 26px; font-size: 15px; }
.dday__msg em { font-style: normal; color: var(--red); font-weight: 500; }
.cal-add { display: grid; max-width: 300px; margin: 34px auto 0; }

/* ---------- GALLERY ---------- */
.gallery { padding-left: 12px; padding-right: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid button { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #222; }
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.grid button:active img { transform: scale(1.04); }
.grid .more::after {
  content: ""; position: absolute; inset: 0; background: rgba(40,40,40,.62);
}
.grid .more span {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  color: #fff; font-family: var(--sans-en); font-weight: 300;
}
.grid .more span b { font-weight: 300; font-size: 30px; line-height: 1.1; }
.grid .more span small { font-size: 15px; letter-spacing: .18em; text-indent: .18em; }

/* ---------- LOCATION ---------- */
.sub-title { font-size: 18px; color: var(--muted); margin: -20px 0 56px; }
.venue { color: var(--title); font-size: 24px; font-weight: 600; }
.venue-hall { margin-top: 6px; font-size: 17px; color: var(--text); font-weight: 500; }
.venue-sub { margin-top: 6px; font-size: 16px; color: var(--muted); line-height: 1.75; }
.map { position: relative; margin: 48px -6px 0; aspect-ratio: 1 / .78; overflow: hidden; border-radius: 4px; background: #161616; }
/* 카카오맵: 지도 타일만 어둡게 (핀은 그대로 색 유지) */
.map__canvas { width: 100%; height: 100%; touch-action: none; }
.map__canvas img { filter: grayscale(1) invert(.92) contrast(.9) brightness(.9); }
/* 확대·축소: 작은 회색 버튼 */
.map__zoom {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 28px;
  display: flex; flex-direction: column; align-items: center;
  background: rgba(28,28,28,.88); border: 1px solid #3a3a3a; border-radius: 8px; overflow: hidden;
}
.map__zoom button { width: 28px; height: 26px; font-size: 16px; line-height: 1; color: #cfc9c0; }
.map__zoom button:active { background: #333; }
.map__gauge { position: relative; width: 3px; height: 44px; margin: 2px 0; border-radius: 2px; background: #444; overflow: hidden; }
.map__gauge i { position: absolute; left: 0; right: 0; bottom: 0; background: #9a958d; transition: height .2s; }
.map__pin { position: relative; width: 30px; height: 40px; pointer-events: none; }
/* 구글 지도 대체 시: 핀 끝이 지도 정중앙(목적지 좌표)에 오도록 배치 */
.is-google .map__pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); }
.map__pin svg { position: relative; z-index: 1; width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); }
.map__pin path { fill: #5b2a8c; stroke: #fff; stroke-width: 1.5; }
.map__pin circle { fill: #fff; }
.map__tag {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 4px 10px; border-radius: 999px; background: #5b2a8c; color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.map__pulse {
  position: absolute; left: 50%; bottom: -7px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: rgba(124,72,180,.6); animation: pinPulse 1.8s ease-out infinite;
}
@keyframes pinPulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .map__pulse { animation: none; opacity: .5; } }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9) brightness(.9); }
.map-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 36px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; border-radius: 999px; border: 1.5px solid var(--pill-line); background: var(--pill);
  color: #c9c4bc; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .2s;
}
.pill:active { background: #262626; }
.pill i { font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
.how { margin-top: 60px; display: grid; gap: 40px; text-align: left; padding: 0 6px; }
.how h4 { display: flex; align-items: center; gap: 10px; color: #d5d0c8; font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.how h4 svg { width: 19px; height: 19px; flex: none; fill: #8a857d; }
.how ul { list-style: none; display: grid; gap: 8px; }
.how li { display: grid; grid-template-columns: 3.2em 1fr; gap: 6px; font-size: 15px; color: var(--muted); line-height: 1.6; }
.how li b { font-weight: 600; color: var(--text); }
.how p { font-size: 15px; color: var(--muted); line-height: 1.75; }

/* ---------- ACCOUNT ---------- */
.account { background: var(--bg-deep); position: relative; isolation: isolate; }
.account::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--noise); opacity: .05; }
.contact-label { margin-top: 110px; scroll-margin-top: 40px; }
.acc { border-bottom: 1px solid #1a1a1a; text-align: left; }
.acc__head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 24px 6px; font-size: 18px; font-weight: 600; color: #d5d0c8;
}
.chev { width: 11px; height: 11px; border-right: 1.8px solid #8f8a82; border-bottom: 1.8px solid #8f8a82; transform: rotate(45deg) translate(-3px,-3px); transition: transform .3s; }
.acc.open .chev { transform: rotate(-135deg) translate(-2px,-2px); }
.acc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.acc.open .acc__body { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: 0 0 12px; padding: 16px 18px; background: #151515; border-radius: 10px;
}
.acc__row:last-child { margin-bottom: 20px; }
.acc__who { font-size: 13px; color: var(--muted); }
.acc__who b { color: var(--title); font-weight: 500; font-size: 15px; margin-left: 6px; }
.acc__num { font-size: 15px; color: var(--text); margin-top: 2px; }
.tel-btns { display: flex; gap: 8px; flex: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--pill-line); display: grid; place-items: center; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: #c9c4bc; stroke-width: 1.6; stroke-linejoin: round; }
.icon-btn:active { background: #262626; }
.copy-btn { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--pill-line); font-size: 13px; color: #c9c4bc; }

/* ---------- GUESTBOOK ---------- */
.gb__intro { font-size: 15px; color: var(--muted); line-height: 1.8; margin-top: -30px; }
.gb__demo { margin-top: 18px; font-size: 12px; color: var(--label); }
.gb__list { list-style: none; display: grid; gap: 12px; margin-top: 44px; text-align: left; }
.gb__item { padding: 20px 20px 18px; background: #151515; border: 1px solid #1d1d1d; border-radius: 12px; }
.gb__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.gb__meta b { color: var(--title); font-weight: 600; font-size: 15px; }
.gb__meta time { font-family: var(--sans-en); font-size: 11px; letter-spacing: .08em; color: var(--label); }
.gb__item p { margin-top: 10px; font-size: 14.5px; line-height: 1.75; color: var(--text); overflow-wrap: anywhere; }
.gb__empty { margin-top: 44px; padding: 34px 0; font-size: 14px; color: var(--label); line-height: 1.8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gb__actions { display: grid; justify-items: center; gap: 20px; margin-top: 26px; }
.gb__actions .pill { width: 100%; max-width: 300px; }
.gb__more {
  font-family: var(--sans-en); font-size: 12px; letter-spacing: .25em; text-indent: .25em; color: var(--muted);
  padding: 8px 12px; border-bottom: 1px solid var(--pill-line);
}
.gb__form { text-align: left; display: grid; gap: 18px; }
.gb__form .sheet__title { text-align: center; margin-bottom: 4px; }
.field { display: grid; gap: 8px; }
.field span { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.field em { font-style: normal; font-family: var(--sans-en); font-size: 11px; color: var(--label); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; font-weight: 400; color: var(--title);
  background: #111; border: 1px solid var(--pill-line); border-radius: 10px; padding: 12px 14px; resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: #555; }
.field input:focus, .field textarea:focus { outline: none; border-color: #8a857d; }
.gb__err { min-height: 1em; font-size: 13px; color: var(--red); margin: -6px 0 -8px; }
.gb__submit { width: 100%; background: #d9d3c9; color: #111; border-color: #d9d3c9; }
.gb__submit:active { background: #c4bdb2; }
.gb__submit:disabled { opacity: .6; }

/* ---------- SHARE ---------- */
.share { padding-top: 90px; padding-bottom: 60px; }
.share-btns { display: grid; gap: 12px; margin: 44px auto 0; max-width: 300px; }
.share .copy { margin-top: 70px; font-family: var(--sans-en); font-size: 11px; letter-spacing: .15em; color: #444; }

/* ---------- MENU ---------- */
.menu {
  position: fixed; top: 0; bottom: 0; left: 50%; width: min(100%, var(--frame)); transform: translateX(-50%);
  z-index: 50; background: rgba(207,229,170,.97);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 22px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.menu.open { opacity: 1; pointer-events: auto; }
.menu a { font-family: var(--serif); font-size: 36px; color: var(--brown); line-height: 1.1; }
.menu__close { position: absolute; top: 18px; right: 22px; font-size: 22px; color: var(--brown-2); }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; top: 0; bottom: 0; left: 50%; width: min(100%, var(--frame)); transform: translateX(-50%);
  z-index: 60; background: rgba(0,0,0,.96);
  opacity: 0; pointer-events: none; transition: opacity .3s; overflow: hidden;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb__track { display: flex; height: 100%; transition: transform .35s ease; touch-action: pan-y; }
.lb__track figure { flex: 0 0 100%; height: 100%; display: grid; place-items: center; padding: 60px 0; }
.lb__track img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb__close { position: absolute; top: 14px; right: 18px; z-index: 2; font-size: 22px; color: #ddd; padding: 6px; }
.lb__count { position: absolute; top: 20px; left: 0; right: 0; text-align: center; font-family: var(--sans-en); font-size: 13px; letter-spacing: .15em; color: #999; z-index: 1; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; font-size: 40px; color: rgba(255,255,255,.6); padding: 10px 14px; }
.lb__nav.prev { left: 4px; } .lb__nav.next { right: 4px; }

/* ---------- BGM ---------- */
.bgm {
  position: fixed; top: 14px; right: max(14px, calc(50vw - var(--frame) / 2 + 14px)); z-index: 40;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(17,17,17,.55); color: #e6e1d9; backdrop-filter: blur(6px);
  transform: translateY(46px);
}
.bgm[hidden] { display: none; }
.bgm .mute { display: none; }
.bgm.off .wave { display: none; }
.bgm.off .mute { display: inline; }

/* ---------- CALENDAR SHEET ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 65; background: rgba(0,0,0,.6);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet__box {
  position: relative; width: 100%; max-width: var(--frame); background: #1a1a1a; border-radius: 18px 18px 0 0;
  padding: 34px 24px calc(28px + env(safe-area-inset-bottom, 0px)); text-align: center;
  transform: translateY(30px); transition: transform .3s;
}
.sheet.open .sheet__box { transform: none; }
.sheet__close { position: absolute; top: 12px; right: 16px; font-size: 18px; color: var(--muted); padding: 6px; }
.sheet__title { color: var(--title); font-size: 17px; font-weight: 600; line-height: 1.5; }
.sheet__desc { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.sheet__btns { display: grid; gap: 10px; margin-top: 24px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); z-index: 70;
  background: rgba(230,225,217,.95); color: #111; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 999px; opacity: 0; transition: .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
