/* ============================================================
   모바일 청첩장 · style.css
   팔레트: 크림 #FAF7F4 / 모브 #B8929A / 차콜 #2F2A28
   ============================================================ */

:root {
  --cream: #FAF7F4;
  --cream-deep: #F4EEE9;
  --mauve: #B8929A;
  --mauve-soft: #C8A8AE;
  --ink: #2F2A28;
  --ink-soft: #5A514C;
  --ink-mute: #7A6F6A;
  --line: #E8DFD9;
  --serif-en: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-ko: "Gowun Batang", "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #E9E3DD;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img { display: block; max-width: 100%; }

.frame {
  max-width: 430px;
  margin: 0 auto;
  background: var(--cream);
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}

@media (min-width: 640px) {
  .frame {
    box-shadow: 0 30px 90px rgba(60, 45, 40, .12);
    min-height: 100vh;
  }
}

/* ---------------- 공통 ---------------- */

.section { padding: 58px 30px 60px; text-align: center; }

.eyebrow {
  margin: 0 0 20px;
  font-family: var(--serif-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .46em;
  text-indent: .46em;
  text-transform: uppercase;
  color: var(--mauve);
}

.heading {
  margin: 0 0 26px;
  font-family: var(--serif-ko);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .01em;
  color: var(--ink);
}

.body-text {
  margin: 0 auto;
  max-width: 320px;
  font-size: 14px;
  line-height: 2.1;
  letter-spacing: -.01em;
  color: var(--ink-soft);
}

.body-text p { margin: 0 0 14px; }
.body-text p:last-child { margin-bottom: 0; }
.body-text.small { font-size: 13px; line-height: 2; color: var(--ink-mute); }

.rule { height: 1px; margin: 0 34px; background: var(--line); }

.note {
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: -.01em;
  color: #A99C95;
}

/* ---------------- 표지 ---------------- */

.hero { position: relative; }

.hero-photo {
  position: relative;
  aspect-ratio: 3 / 3.9;
  max-height: 82vh;
  overflow: hidden;
  background: #EFE6DF;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}

.hero-photo-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(47, 42, 40, .06) 0%, rgba(47, 42, 40, 0) 35%);
}

.photo-note {
  position: absolute;
  top: 18px;
  right: 18px;
  margin: 0;
  padding: 5px 10px;
  font-family: var(--serif-en);
  font-size: 9px;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  backdrop-filter: blur(2px);
}

.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 44%;
  pointer-events: none;
}

.wave svg { width: 100%; height: 100%; display: block; }
.wave path { fill: var(--cream); }

.hero-copy {
  position: relative;
  z-index: 3;
  margin-top: -74px;
  padding: 0 0 4px;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: var(--serif-en);
  font-weight: 300;
  font-size: clamp(68px, 22.5vw, 98px);
  line-height: .92;
  letter-spacing: -.01em;
  color: var(--mauve);
}

.hero-names {
  display: flex;
  justify-content: space-between;
  margin: 22px 34px 0;
  font-family: var(--serif-en);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .3em;
  color: var(--ink-mute);
}

/* ---------------- 초대 ---------------- */

.invite { padding-top: 46px; }

.invite .heading { margin-bottom: 28px; }

.parents {
  margin: 34px auto 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  max-width: 300px;
}

.parents-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-mute);
  text-align: left;
}

.parents-role {
  flex: 0 0 34px;
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--mauve);
}

.parents-line strong {
  font-family: var(--serif-ko);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-left: 2px;
}

/* ---------------- 예식일 ---------------- */

.day { padding-top: 54px; }

.day-date {
  margin: 0;
  font-family: var(--serif-en);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: .05em;
  color: var(--ink);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.day-time {
  margin: 8px 0 0;
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--mauve);
}

.day-time .dot { margin: 0 8px; color: #D3C1C4; }

.venue-block { margin-top: 30px; }

.venue-name {
  margin: 0 0 8px;
  font-family: var(--serif-ko);
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--ink);
}

.venue-addr {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-mute);
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 30px;
}

/* ---------------- 버튼 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: -.01em;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-solid { background: var(--mauve); color: #fff; }
.btn-solid:active { opacity: .82; }

.btn-line { background: #fff; color: var(--ink-soft); border-color: #DCCACB; }
.btn-line:active { background: #FBF5F4; }

.btn.wide { width: 100%; padding: 14px; margin-top: 22px; }

/* ---------------- 달력 + 카운트다운 ---------------- */

.count { padding-top: 6px; padding-bottom: 64px; }

.month { max-width: 300px; margin: 0 auto; }

.month-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--serif-en);
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--ink-mute);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.month-head .m-year { color: var(--mauve); }

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 4px;
}

.month-grid .dow {
  font-family: var(--serif-en);
  font-size: 9px;
  letter-spacing: .1em;
  color: #B4A8A2;
  padding-bottom: 6px;
}

.month-grid .dow.sun { color: var(--mauve-soft); }

.month-grid .day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  font-family: var(--serif-en);
  font-size: 12.5px;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.month-grid .day-cell.sun { color: #C2A3A8; }
.month-grid .day-cell.mute { color: #D8CFC9; }

.month-grid .day-cell.mark {
  position: relative;
  color: #fff;
  font-weight: 500;
}

.month-grid .day-cell.mark::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mauve);
  z-index: -1;
}

.month-grid .day-cell.mark { z-index: 1; }

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.cd-cell { display: flex; flex-direction: column; align-items: center; min-width: 46px; }

.cd-num {
  font-family: var(--serif-en);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--ink);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.cd-label {
  margin-top: 2px;
  font-family: var(--serif-en);
  font-size: 8px;
  letter-spacing: .26em;
  color: #A99C95;
}

.cd-colon {
  font-family: var(--serif-en);
  font-size: 18px;
  color: #CDBFC0;
  padding-top: 4px;
}

.count-sentence {
  margin: 22px 0 0;
  font-size: 12px;
  letter-spacing: -.01em;
  color: var(--ink-mute);
}

/* ---------------- 갤러리 ---------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 4px -6px 0;
}

.g-item {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(148deg, #F5EDE7 0%, #EBE0D8 52%, #E3D6CE 100%);
  -webkit-tap-highlight-color: transparent;
}

.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.g-item:active img { transform: scale(1.04); }

.g-item.ph::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(184, 146, 154, .28);
}

.g-item .g-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  font-family: var(--serif-en);
  font-size: 7.5px;
  letter-spacing: .24em;
  color: #B09A96;
}

/* ---------------- 오시는 길 ---------------- */

.place-card {
  padding: 24px 20px;
  background: var(--cream-deep);
  border-radius: 2px;
}

.place-card-name {
  margin: 0 0 8px;
  font-family: var(--serif-ko);
  font-size: 15px;
  color: var(--ink);
}

.place-card-addr {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--ink-mute);
}

.place-tel {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--serif-en);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--mauve);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 146, 154, .35);
  padding-bottom: 2px;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.nav-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 4px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: -.02em;
  color: var(--ink-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-btn:active { background: #FBF6F4; }

.nav-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.nav-ico-naver { background: #03C75A; }
.nav-ico-kakao { background: #FEE500; color: #3C1E1E; }
.nav-ico-tmap { background: #1E4FFF; }

.transit { margin: 26px 0 0; text-align: left; }

.transit > div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.transit > div:last-child { border-bottom: 1px solid var(--line); }

.transit dt {
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--mauve);
  padding-top: 2px;
}

.transit dd {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-mute);
}

/* ---------------- 계좌 ---------------- */

.account .body-text { margin-bottom: 26px; }

.accordion { text-align: left; border-top: 1px solid var(--line); }

.acc-item { border-bottom: 1px solid var(--line); }

.acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px 4px;
  background: none;
  border: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.acc-head .acc-mark {
  position: relative;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.acc-head .acc-mark::before,
.acc-head .acc-mark::after {
  content: "";
  position: absolute;
  background: var(--mauve);
  transition: transform .25s ease, opacity .25s ease;
}

.acc-head .acc-mark::before { top: 5.5px; left: 0; width: 12px; height: 1px; }
.acc-head .acc-mark::after { left: 5.5px; top: 0; width: 1px; height: 12px; }

.acc-item.open .acc-mark::after { transform: rotate(90deg); opacity: 0; }

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}

.acc-item.open .acc-body { max-height: 460px; }

.acc-inner { padding: 2px 4px 16px; }

.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed #EFE6E0;
}

.acc-row:first-child { border-top: 0; }

.acc-who {
  display: block;
  font-size: 10px;
  letter-spacing: .1em;
  color: #B0A29B;
  margin-bottom: 3px;
}

.acc-num { font-size: 12.5px; color: var(--ink-soft); letter-spacing: -.01em; }
.acc-num .bank { color: var(--ink); margin-right: 5px; }
.acc-num .holder { margin-left: 6px; color: #9C8F88; }

.copy-btn {
  flex: 0 0 auto;
  padding: 7px 11px;
  background: #fff;
  border: 1px solid #DCCACB;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 10.5px;
  color: var(--mauve);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.copy-btn:active { background: #FBF3F3; }

/* ---------------- 축하 사진 ---------------- */

.capture { padding-top: 10px; }

.capture-box {
  padding: 38px 22px 34px;
  background: linear-gradient(180deg, #FBF7F4 0%, #F5EDE8 100%);
  border: 1px solid #EADFD8;
}

.capture-box .heading { margin-bottom: 20px; }

.capture-when {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: -.01em;
  color: var(--mauve);
}

.capture .note { color: #AC9E97; }

/* ---------------- 푸터 ---------------- */

.footer {
  padding: 8px 30px 56px;
  text-align: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  background: none;
  border: 1px solid #DCCACB;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.share-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

.footer-sign {
  margin: 30px 0 6px;
  font-family: var(--serif-ko);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink-mute);
}

.footer-draft {
  margin: 0;
  font-size: 10px;
  letter-spacing: .06em;
  color: #BDB0A9;
}

/* ---------------- 라이트박스 ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #F8F3EF;
  padding: 20px;
}

.lightbox[hidden] { display: none; }

.lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: var(--ink-soft);
  font-size: 15px;
  cursor: pointer;
  z-index: 3;
}

.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lb-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lb-stage .lb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 340px);
  aspect-ratio: 1 / 1.15;
  background: linear-gradient(148deg, #F5EDE7 0%, #EBE0D8 52%, #E3D6CE 100%);
  border: 1px solid rgba(184, 146, 154, .3);
  font-family: var(--serif-en);
  font-size: 10px;
  letter-spacing: .3em;
  color: #B09A96;
}

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.lb-nav {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  font-family: var(--serif-en);
  font-size: 26px;
  color: var(--mauve);
  cursor: pointer;
}

.lb-caption {
  font-family: var(--serif-en);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--ink-mute);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

/* ---------------- 업로드 모달 ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  background: rgba(47, 42, 40, .45);
}

.modal[hidden] { display: none; }

.modal-sheet {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 22px calc(24px + env(safe-area-inset-bottom));
  background: #FBF8F5;
  border-radius: 16px 16px 0 0;
  animation: sheet-up .28s ease;
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: .6; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  margin: 0;
  font-family: var(--serif-ko);
  font-size: 16px;
  color: var(--ink);
}

.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  font-size: 14px;
  color: #A99C95;
  cursor: pointer;
}

.modal-desc {
  margin: 12px 0 18px;
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-mute);
}

.pick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed #D6C2C3;
  border-radius: 2px;
  background: #fff;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

.pick-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.preview-grid:empty { margin-top: 0; }

.preview-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #EFE6DF;
}

.preview-item img { width: 100%; height: 100%; object-fit: cover; }

.modal-note {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: #A99C95;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}

.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------------- 토스트 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 12px);
  z-index: 200;
  max-width: 86vw;
  padding: 11px 20px;
  background: rgba(47, 42, 40, .93);
  color: #fff;
  font-size: 12.5px;
  letter-spacing: -.01em;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 안전영역 ---------------- */

@supports (padding: max(0px)) {
  .footer { padding-bottom: max(56px, calc(36px + env(safe-area-inset-bottom))); }
}
