/* =========================================================
   Mobile Wedding Invitation — "모먼트" style
   ========================================================= */

/* ---------- 0. 디자인 토큰 ---------- */
:root {
  /* color */
  --c-bg:        #fbfaf8;   /* 기본 배경 */
  --c-bg-tint:   #f1efec;   /* 톤다운 섹션 배경 */
  --c-cover:     #d6d4d1;   /* 커버 웜그레이 */
  --c-text:      #3c3835;
  --c-text-sub:  #918c87;
  --c-text-dim:  #b3aea9;
  --c-line:      #e3dfda;
  --c-point:     #c4a9a9;   /* 더스티 핑크 */
  --c-point-dk:  #ab8e8e;
  --c-sun:       #cc6b53;
  --c-white:     #ffffff;

  /* font */
  --f-display: "DM Serif Display", "Gowun Batang", serif;
  --f-en:      "Crimson Pro", "DM Serif Display", serif;
  --f-serif:   "Gowun Batang", "Nanum Myeongjo", serif;
  --f-sans:    "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  /* layout */
  --app-max: 430px;
  --pad-x:   32px;
  --sec-py:  76px;
  --radius:  4px;

  /* motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, ul, li, figure, blockquote { margin: 0; padding: 0; }
[hidden] { display: none !important; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
em { font-style: normal; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: #333;
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: -0.015em;
  word-break: keep-all;
}

/* ---------- 2. layout ---------- */
.app {
  max-width: var(--app-max);
  margin: 0 auto;
  background: var(--c-bg);
  overflow: hidden;
}

.sec {
  position: relative;
  padding: var(--sec-py) var(--pad-x);
  text-align: center;
  background: var(--c-bg);
}
.sec--tint { background: var(--c-bg-tint); }

.sec__label {
  font-family: var(--f-en);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--c-point-dk);
  margin-bottom: 10px;
}
.sec__title {
  font-family: var(--f-serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}

/* ---------- 3. 사진/지도 플레이스홀더 ---------- */
.ph {
  position: relative;
  display: grid;
  place-items: center;
  background-color: #eceae7;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, .022) 0 10px,
    transparent 10px 20px
  );
  border: 1px dashed #c9c5c0;
  border-radius: 2px;
  color: var(--c-text-dim);
}
.ph::after {
  content: attr(data-ph);
  font-family: var(--f-sans);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: pre-line;
}
.cover__photo {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 34px 0 40px;
  overflow: hidden;
}
.cover__photo img { width: 100%; height: 100%; object-fit: cover; }
.ph--square { aspect-ratio: 1 / 1; }

/* ---------- 4. COVER ---------- */
.sec--cover {
  background: var(--c-cover);
  padding-top: 64px;
  padding-bottom: 68px;
}
.cover__date {
  font-family: var(--f-display);
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #35322f;
}
.cover__date i {
  font-style: normal;
  margin: 0 12px;
  font-weight: 300;
  color: #6d6a67;
}
.cover__dow {
  font-family: var(--f-en);
  font-size: 15px;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: #4b4845;
  margin-top: 6px;
}
.cover__names {
  font-family: var(--f-serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #2f2c29;
}
.cover__names i {
  font-style: normal;
  font-weight: 300;
  color: #7b7875;
  margin: 0 16px;
}
.cover__info {
  margin-top: 14px;
  font-size: 14.5px;
  color: #55524f;
  letter-spacing: -0.01em;
}
.cover__info + .cover__info { margin-top: 4px; }

/* ---------- 5. 인용구 ---------- */
.sec--quote { padding-top: 72px; padding-bottom: 72px; }
.quote__text {
  font-family: var(--f-serif);
  font-size: 15.5px;
  line-height: 2.2;
  color: #4a4642;
}
.quote__by {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--c-text-dim);
  letter-spacing: 0.01em;
}

/* ---------- 6. 인사말 ---------- */
.greeting {
  font-family: var(--f-serif);
  font-size: 15.5px;
  line-height: 2.2;
  color: #4a4642;
}
.parents { margin-top: 40px; font-size: 15px; line-height: 2.2; }
.parents b { font-weight: 500; letter-spacing: 0.02em; }
.parents em { font-size: 13px; color: var(--c-text-sub); margin: 0 2px; }

/* ---------- 7. 캘린더 & D-day ---------- */
.cal__date {
  font-family: var(--f-en);
  font-size: 27px;
  letter-spacing: 0.1em;
  color: #4a4642;
}
.cal__time { font-size: 15px; color: #5c5854; margin-top: 2px; }

.cal {
  margin: 34px 0 30px;
  padding: 26px 0 20px;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 8px;
}
.cal__cell {
  position: relative;
  z-index: 0;
  font-size: 14.5px;
  line-height: 34px;
  color: #4a4642;
}
.cal__cell--head {
  font-size: 13.5px;
  color: #6b6763;
  margin-bottom: 10px;
}
.cal__cell--sun { color: var(--c-sun); }
.cal__cell--target { color: var(--c-white); font-weight: 500; }
.cal__cell--target::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  background: var(--c-point);
  border-radius: 50%;
  z-index: -1;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0;
}
.countdown li {
  position: relative;
  flex: 1;
  max-width: 76px;
}
.countdown li + li::before {
  content: ":";
  position: absolute;
  left: -3px; top: 4px;
  color: var(--c-text-dim);
  font-size: 16px;
}
.countdown strong {
  display: block;
  font-family: var(--f-en);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  color: #4a4642;
  font-variant-numeric: tabular-nums;
}
.countdown span {
  display: block;
  font-family: var(--f-en);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--c-text-sub);
  margin-top: 2px;
}
.dday { margin-top: 26px; font-size: 14px; color: #5c5854; }
.dday b { color: var(--c-point-dk); font-weight: 600; }

/* ---------- 8. 갤러리 ---------- */
.gal {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.gal__item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}
.gal__item img { width: 100%; height: 100%; object-fit: cover; }
.gal.is-collapsed .gal__item--extra { display: none; }

/* ---------- 9. 오시는 길 ---------- */
.map {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 26px 0 16px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 2px;
  background: #eceae7;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map__tile { position: absolute; width: 256px; height: 256px; max-width: none; }
.map__pin {
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -19px 0 0 -8px;
  background: var(--c-point-dk);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.map__credit {
  position: absolute;
  right: 3px; bottom: 2px;
  padding: 1px 5px;
  font-size: 9px;
  color: #5b5854;
  background: rgba(255, 255, 255, .75);
  border-radius: 2px;
}

.loc__hall { font-family: var(--f-serif); font-size: 17px; letter-spacing: -0.01em; }
.loc__addr { font-size: 14px; color: var(--c-text-sub); margin-top: 4px; }

.loc__navi { display: flex; gap: 6px; }
.loc__way { margin-top: 40px; text-align: left; }
.loc__way li { padding: 20px 2px; border-top: 1px solid var(--c-line); }
.loc__way li:last-child { border-bottom: 1px solid var(--c-line); }
.loc__way strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-point-dk);
  margin-bottom: 6px;
}
.loc__way p { font-size: 14px; line-height: 1.75; color: #55524f; }
.loc__way p + p { margin-top: 12px; }

/* ---------- 10. INFORMATION 탭 ---------- */
.tabs__nav {
  display: flex;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 30px;
}
.tabs__btn {
  flex: 1;
  padding: 13px 0;
  font-size: 14px;
  color: var(--c-text-sub);
  position: relative;
  transition: color .2s var(--ease);
}
.tabs__btn::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--c-point);
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.tabs__btn.is-active { color: var(--c-text); font-weight: 600; }
.tabs__btn.is-active::after { transform: scaleX(1); }

.tabs__panel { display: none; font-size: 15px; line-height: 2.1; color: #4a4642; }
.tabs__panel.is-active { display: block; animation: fadeIn .35s var(--ease); }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

/* ---------- 11. 계좌 아코디언 ---------- */
.acc { text-align: left; }
.acc__item { border-top: 1px solid var(--c-line); }
.acc__item:last-child { border-bottom: 1px solid var(--c-line); }
.acc__head {
  position: relative;
  width: 100%;
  padding: 20px 30px 20px 4px;
  font-size: 15px;
  text-align: left;
}
.acc__head::after {
  content: "";
  position: absolute;
  right: 8px; top: 50%;
  width: 7px; height: 7px;
  margin-top: -6px;
  border-right: 1.2px solid var(--c-text-sub);
  border-bottom: 1.2px solid var(--c-text-sub);
  transform: rotate(45deg);
  transition: transform .3s var(--ease), margin-top .3s var(--ease);
}
.acc__item.is-open .acc__head::after { transform: rotate(-135deg); margin-top: -2px; }

.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
}
.acc__body > * { overflow: hidden; }
.acc__item.is-open .acc__body { grid-template-rows: 1fr; }
.acc__inner { padding-bottom: 8px; }

.acc__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px;
}
.acc__row + .acc__row { border-top: 1px dashed var(--c-line); }
.acc__role { font-size: 12.5px; color: var(--c-text-sub); }
.acc__role b { color: var(--c-text); font-weight: 500; }
.acc__num { font-size: 14.5px; letter-spacing: -0.01em; }

/* ---------- 12. 방명록 ---------- */
.gb__list { text-align: left; }
.gb__list li { padding: 18px 2px; border-bottom: 1px solid var(--c-line); }
.gb__list li:first-child { border-top: 1px solid var(--c-line); }
.gb__head { display: flex; align-items: baseline; justify-content: space-between; }
.gb__name { font-size: 13.5px; font-weight: 600; color: var(--c-point-dk); }
.gb__date { font-size: 11.5px; color: var(--c-text-dim); }
.gb__msg  { font-size: 14.5px; line-height: 1.8; margin-top: 4px; white-space: pre-line; }
.gb__empty { font-size: 14px; color: var(--c-text-dim); padding: 30px 0; }

/* ---------- 13. 푸터 ---------- */
.sec--footer { background: var(--c-bg-tint); padding-bottom: 56px; }
.footer__msg { font-size: 14.5px; line-height: 2; color: #55524f; }
.footer__share { display: grid; gap: 8px; margin: 32px 0 34px; }
.footer__copy {
  font-family: var(--f-en);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--c-text-dim);
}

/* ---------- 14. 버튼 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  border-radius: var(--radius);
  transition: opacity .2s var(--ease), background-color .2s var(--ease);
}
.btn:active { opacity: .55; }

.btn--pill {
  margin-top: 36px;
  padding: 13px 34px;
  border: 1px solid var(--c-line);
  border-radius: 100px;
  background: var(--c-white);
  color: #55524f;
  font-size: 14px;
}
.btn--solid {
  width: 100%;
  margin-top: 32px;
  padding: 16px 0;
  background: var(--c-point);
  color: var(--c-white);
  font-size: 15px;
  border-radius: var(--radius);
}
.btn--navi {
  flex: 1;
  padding: 11px 0;
  font-size: 12.5px;
  border: 1px solid var(--c-line);
  border-radius: 100px;
  background: var(--c-white);
  color: #55524f;
  gap: 4px;
}
.btn--copy {
  flex: 0 0 auto;
  padding: 8px 15px;
  font-size: 12.5px;
  border: 1px solid var(--c-line);
  border-radius: 100px;
  background: var(--c-white);
  color: var(--c-text-sub);
}
.btn--share {
  width: 100%;
  padding: 15px 0;
  font-size: 14.5px;
  border: 1px solid var(--c-line);
  background: var(--c-white);
  border-radius: 100px;
}
.btn--kakao { background: #fee500; border-color: #fee500; color: #3c1e1e; }

/* ---------- 15. 아이콘 (CSS 도형) ---------- */
.ico {
  flex: 0 0 auto;
  display: inline-block;
  width: 15px; height: 15px;
  background: currentColor;
  opacity: .72;
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
}
.ico--pin   { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 00-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 00-7-7zm0 9.5A2.5 2.5 0 1112 6.5a2.5 2.5 0 010 5z'/%3E%3C/svg%3E"); }
.ico--plus  { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6z'/%3E%3C/svg%3E"); }
.ico--minus { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11h14v2H5z'/%3E%3C/svg%3E"); }
.ico--pen   { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.2V21h3.8L17.9 9.9l-3.8-3.8L3 17.2zM20.7 7.1a1 1 0 000-1.4l-2.4-2.4a1 1 0 00-1.4 0l-1.8 1.8 3.8 3.8 1.8-1.8z'/%3E%3C/svg%3E"); }
.ico--link  { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.9 12a3.1 3.1 0 013.1-3.1h4V7h-4a5 5 0 100 10h4v-1.9h-4A3.1 3.1 0 013.9 12zM8 13h8v-2H8v2zm9-6h-4v1.9h4a3.1 3.1 0 010 6.2h-4V17h4a5 5 0 000-10z'/%3E%3C/svg%3E"); }
.ico--kakao { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3C6.9 3 2.8 6.3 2.8 10.3c0 2.6 1.7 4.9 4.3 6.2l-1.1 4 4.3-2.6c.6.1 1.2.1 1.7.1 5.1 0 9.2-3.3 9.2-7.7S17.1 3 12 3z'/%3E%3C/svg%3E"); }

/* ---------- 16. 모달 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal__dim { position: absolute; inset: 0; background: rgba(20, 18, 17, .55); }

.modal__panel {
  position: relative;
  width: min(340px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  padding: 40px 26px 22px;
  background: var(--c-white);
  border-radius: 6px;
  text-align: center;
  animation: popIn .32s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }

.modal__x, .lb__x {
  position: absolute;
  top: 10px; right: 10px;
  width: 34px; height: 34px;
}
.modal__x::before, .modal__x::after,
.lb__x::before,    .lb__x::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 15px; height: 1.3px;
  background: currentColor;
  opacity: .65;
}
.modal__x::before, .lb__x::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal__x::after,  .lb__x::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.modal__panel { text-align: left; padding-top: 44px; }
.modal__title {
  font-family: var(--f-serif);
  font-size: 18px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 22px;
}

/* 폼 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--c-text-sub); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 14.5px;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--c-point); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.7; }

.radio-row { display: flex; gap: 8px; }
.radio-row label {
  flex: 1;
  padding: 11px 0;
  text-align: center;
  font-size: 14px;
  color: var(--c-text-sub);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.radio-row input { position: absolute; opacity: 0; pointer-events: none; }
.radio-row input:checked + span,
.radio-row label:has(input:checked) {
  border-color: var(--c-point);
  background: var(--c-point);
  color: var(--c-white);
}

/* ---------- 17. 라이트박스 ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(14, 13, 12, .94);
  color: #fff;
}
.lb[hidden] { display: none; }
.lb__stage { width: 100%; max-width: var(--app-max); padding: 0 44px; }
.lb__stage img { width: 100%; max-height: 78vh; object-fit: contain; margin: 0 auto; }
.lb__stage .ph { aspect-ratio: 3 / 4; background-color: #2a2827; border-color: #4a4745; }
.lb__nav {
  position: absolute;
  top: 50%;
  width: 44px; height: 44px;
  margin-top: -22px;
}
.lb__nav::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 11px;
  border-top: 1.4px solid #fff;
  border-right: 1.4px solid #fff;
  opacity: .8;
}
.lb__nav--prev { left: 2px; }
.lb__nav--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.lb__nav--next { right: 2px; }
.lb__nav--next::before { transform: translate(-70%, -50%) rotate(45deg); }
.lb__count {
  position: absolute;
  bottom: 34px; left: 0; right: 0;
  text-align: center;
  font-family: var(--f-en);
  font-size: 14px;
  letter-spacing: .1em;
  opacity: .75;
}

/* ---------- 18. 토스트 ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 46px;
  z-index: 200;
  transform: translate(-50%, 10px);
  padding: 12px 22px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(30, 27, 25, .88);
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 19. 스크롤 리빌 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tabs__panel.is-active, .modal__panel { animation: none; }
}

/* ---------- 20. 좁은 화면 대응 ---------- */
@media (max-width: 360px) {
  :root { --pad-x: 24px; --sec-py: 64px; }
  .cover__date { font-size: 30px; }
  .countdown strong { font-size: 23px; }
}
