/* uinvited — 초대장 뷰어 */

.invite {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--surface);
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(47, 42, 36, .10);
  overflow: hidden;
}

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

.cover {
  position: relative;
  padding: 56px 28px 44px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.cover__frame {
  border: 1px solid var(--accent);
  outline: 4px solid var(--surface);
  padding: 34px 20px;
  border-radius: 3px;
}
.cover__kind {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 0 0 14px;
}
.cover__title {
  font-family: var(--font-display);
  font-size: 27px; line-height: 1.45; margin: 0 0 16px; font-weight: 700;
  word-break: keep-all;
}
.cover__hosts { font-size: 15px; color: var(--ink-2); margin: 0 0 18px; word-break: keep-all; }
.cover__date { font-size: 14px; font-weight: 600; margin: 0; }
.cover__place { font-size: 13.5px; color: var(--ink-2); margin: 4px 0 0; word-break: keep-all; }

.font-sans .cover__title, .font-sans .section__title { font-family: var(--font-body); }

/* ---------- 섹션 ---------- */

.section { padding: 34px 26px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section__label {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; text-align: center; margin: 0 0 12px;
}
.section__title {
  font-family: var(--font-display); font-size: 19px; text-align: center;
  margin: 0 0 18px; font-weight: 700;
}

.message { white-space: pre-wrap; text-align: center; font-size: 15px; color: var(--ink-2); line-height: 1.95; word-break: keep-all; margin: 0; }

/* ---------- 일정 ---------- */

.when { text-align: center; }
.when__date { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; }
.when__sub { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }

.dday {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--bg); border: 1px solid var(--line);
  padding: 9px 18px; border-radius: 999px; font-size: 14px; margin-bottom: 18px;
}
.dday b { font-size: 19px; color: var(--accent); font-family: var(--font-display); }

.calendar { width: 100%; border-collapse: collapse; margin: 4px 0 18px; }
.calendar th {
  font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding: 6px 0;
}
.calendar td { padding: 7px 0; font-size: 13.5px; text-align: center; color: var(--ink-2); }
.calendar th:first-child, .calendar td:first-child { color: #c25252; }
.calendar .is-day {
  position: relative; color: var(--accent-ink); font-weight: 700;
}
.calendar .is-day span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
}

/* ---------- 지도 ---------- */

.place__name { font-size: 16px; font-weight: 700; text-align: center; margin: 0 0 4px; }
.place__addr { font-size: 13.5px; color: var(--ink-2); text-align: center; margin: 0 0 4px; word-break: keep-all; }
.place__detail { font-size: 13px; color: var(--ink-3); text-align: center; margin: 0 0 16px; white-space: pre-wrap; }

.map {
  width: 100%; height: 220px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 12px; background: var(--bg);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map__fallback {
  height: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: var(--ink-3); font-size: 13px;
}

.linkrow { display: flex; gap: 8px; }
.linkrow .btn { flex: 1; padding: 10px 6px; font-size: 13.5px; }

/* ---------- 연락처 / 계좌 ---------- */

.contacts { display: flex; flex-direction: column; gap: 8px; }
.contact {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; background: var(--bg);
}
.contact__role { font-size: 12.5px; color: var(--ink-3); flex: none; min-width: 52px; }
.contact__name { font-size: 14.5px; font-weight: 600; flex: 1; }
.contact__actions { display: flex; gap: 6px; flex: none; }
.contact__actions a {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface);
  text-decoration: none; font-size: 15px;
}

.account { display: flex; flex-direction: column; gap: 8px; }
.account__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; background: var(--bg); font-size: 14px;
}
.account__item > span { min-width: 0; overflow-wrap: anywhere; }
.account__item .btn { flex: none; white-space: nowrap; }

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

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.gallery img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; width: 100%; }

/* ---------- 하단 ---------- */

.invite__foot { padding: 26px; text-align: center; }
.invite__foot .btn { margin-bottom: 10px; }
.brandline { font-size: 12px; color: var(--ink-3); }
.brandline a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- 오프닝(봉투) 효과 ---------- */

.opening {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.opening[hidden] { display: none; }
.opening.is-gone { animation: opening-out .7s ease forwards; }
@keyframes opening-out { to { opacity: 0; visibility: hidden; } }

.envelope {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 3 / 2;
  cursor: pointer; border: 0; background: none; padding: 0;
  perspective: 900px;
}
.envelope__body {
  position: absolute; inset: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.envelope__body::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(45deg, transparent 49.4%, var(--line) 49.4% 50.6%, transparent 50.6%),
    linear-gradient(-45deg, transparent 49.4%, var(--line) 49.4% 50.6%, transparent 50.6%);
}
.envelope__flap {
  position: absolute; left: 0; right: 0; top: 0; height: 50%;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.6, -0.2, .4, 1.3);
  z-index: 3;
}
.envelope__seal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; z-index: 4;
  transition: opacity .3s ease .1s;
}
.envelope__card {
  position: absolute; left: 8%; right: 8%; bottom: 6%; top: 22%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  z-index: 2; display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 16px;
  font-family: var(--font-display); font-size: 15px; color: var(--ink-2);
  transition: transform .75s cubic-bezier(.2, .8, .3, 1) .35s;
}
.envelope.is-open .envelope__flap { transform: rotateX(-180deg); }
.envelope.is-open .envelope__seal { opacity: 0; }
.envelope.is-open .envelope__card { transform: translateY(-42%) scale(1.04); }

.opening__hint {
  position: absolute; left: 0; right: 0; bottom: 12%;
  text-align: center; font-size: 13.5px; color: var(--ink-2);
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-5px); } }

/* 커튼 스타일 */
.curtain { position: absolute; inset: 0; display: flex; }
.curtain__half {
  flex: 1; background: var(--accent);
  transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.curtain.is-open .curtain__half:first-child { transform: translateX(-101%); }
.curtain.is-open .curtain__half:last-child { transform: translateX(101%); }

/* 페이드 스타일 */
.fadein { position: absolute; inset: 0; background: var(--bg); display: flex;
  align-items: center; justify-content: center; transition: opacity .9s ease; }
.fadein__word { font-family: var(--font-display); font-size: 21px; color: var(--accent); }
.fadein.is-open { opacity: 0; }

/* 본문 등장 */
.invite.is-entering > * { animation: rise .7s cubic-bezier(.2,.8,.3,1) backwards; }
.invite.is-entering > *:nth-child(2) { animation-delay: .08s; }
.invite.is-entering > *:nth-child(3) { animation-delay: .16s; }
.invite.is-entering > *:nth-child(4) { animation-delay: .24s; }
.invite.is-entering > *:nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- 잠금 안내 ---------- */

.locknote {
  position: absolute; left: 0; right: 0; bottom: 4%;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.locknote .btn { font-size: 13px; }

/* ---------- 상태 화면 ---------- */

.state {
  min-height: 70vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; text-align: center;
}
.state h2 { font-family: var(--font-display); margin: 0; font-size: 20px; }
.state p { margin: 0; color: var(--ink-2); font-size: 14px; }
