:root {
  --paper: #fbf8f3;
  --paper-2: #f4eee6;
  --ink: #2e2925;
  --ink-2: #5c534c;
  --muted: #968c84;
  --line: #e6ded4;
  --accent: #a8705c;
  --accent-soft: #f3e8e1;
  --sun: #c0563f;
  --sat: #5b7a99;
  --outside: #ece6de;
  --serif: "Gowun Batang", "Nanum Myeongjo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--outside);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }

.card {
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 0 48px rgba(70, 50, 40, .07);
}
section { padding: 88px 28px; }
section + section { border-top: 1px solid var(--line); }
.center { text-align: center; }

.sec-head { text-align: center; margin-bottom: 40px; }
.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .34em;
  color: var(--accent);
}
.sec-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .02em;
}
.sec-sub { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: background-color .15s, border-color .15s;
}
.btn:active { background: var(--paper-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:active { background: #93604e; }
.chip {
  margin-left: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--ink-2);
  vertical-align: 1px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 표지 */
.cover { padding: 64px 28px 80px; text-align: center; border-top: 0; }
.cover-date {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: .1em;
}
.cover-day { margin: 2px 0 0; font-size: 11px; letter-spacing: .4em; color: var(--muted); }
.arch {
  margin: 36px auto 0;
  aspect-ratio: 3 / 4;
  border-radius: 50% 50% 0 0 / 37.5% 37.5% 0 0;
  overflow: hidden;
  background: var(--paper-2);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.names {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 40px 0 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .06em;
}
.names .and { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.cover-meta { margin: 16px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.9; }

/* 인사말 */
.greeting-body p {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.1;
  text-align: center;
  white-space: pre-line;
}
.parents {
  display: grid;
  gap: 10px;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 15px;
}
.parents p { margin: 0; }
.parents .rel { margin: 0 6px; font-size: 13px; color: var(--muted); }
.parents b { font-weight: 600; }

/* 달력 */
.calendar { background: var(--paper-2); }
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  padding: 20px 8px 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
}
.cal .wk { font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.cal .d { display: grid; place-items: center; height: 38px; }
.cal .sun { color: var(--sun); }
.cal .sat { color: var(--sat); }
.cal .on span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 36px 0 0;
  text-align: center;
}
.countdown div { padding: 12px 0 10px; border-radius: 8px; background: var(--paper); }
.countdown b {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.countdown span { font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.dday { margin: 24px 0 28px; text-align: center; font-size: 15px; }
.dday b { color: var(--accent); font-weight: 600; }

/* 갤러리 */
.gallery { padding-left: 16px; padding-right: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.grid button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 1;
  background: var(--paper-2);
  overflow: hidden;
}
.grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.grid button:active img { transform: scale(1.03); }
#moreBtn { margin-top: 28px; }

/* 오시는 길 */
.place { text-align: center; }
.place-name { margin: 0; font-family: var(--serif); font-size: 18px; }
.place-addr { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.place-tel { display: inline-block; margin-top: 4px; font-size: 14px; color: var(--muted); text-decoration: none; }
.map { margin: 28px -28px 0; }
.map img { width: 100%; }
.map-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.map-links .btn { padding: 0 8px; }
.transport { margin-top: 40px; }
.transport div { padding: 18px 0; border-top: 1px solid var(--line); }
.transport div:last-child { border-bottom: 1px solid var(--line); }
.transport dt { margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
.transport dd { font-size: 14px; color: var(--ink-2); }

/* 계좌 */
.acc { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.acc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .2s;
}
.acc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.acc li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.acc .who { font-size: 13px; color: var(--muted); }
.acc .who b { margin-left: 4px; font-weight: 600; color: var(--ink); }
.acc .num { margin-top: 2px; font-size: 14px; font-variant-numeric: tabular-nums; }

/* 맺음말 */
.closing { text-align: center; padding-top: 0; }
.closing-photo { margin: 0 -28px 48px; }
.closing-photo img { width: 100%; }
.closing-text { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 2; }
.closing-sign { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.share { display: grid; gap: 8px; margin-top: 40px; }
.foot { padding: 28px 0 40px; text-align: center; font-size: 11px; letter-spacing: .2em; color: var(--muted); }

/* 사진 크게 보기 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(22, 18, 16, .96);
  color: #fff;
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(8px, env(safe-area-inset-top)) 8px 8px 20px;
}
.lb-count { font-size: 13px; letter-spacing: .1em; opacity: .75; }
.lb-stage { flex: 1; display: grid; place-items: center; min-height: 0; padding: 0 0 max(24px, env(safe-area-inset-bottom)); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #fff;
}
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); opacity: .8; }
.lb-prev { left: 0; }
.lb-next { right: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(32px, env(safe-area-inset-bottom));
  z-index: 60;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(46, 41, 37, .92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 나타나기 */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity .3s; }
  .grid img, .toast { transition: none; }
}
