:root {
  --brown: #426B85;
  --brown-deep: #2B475D;
  --gold: #466E88;
  --ivory: #F5FBFF;
  --paper: #EDF7FD;
  --paper-2: #EDF7FD;
  --card: #F7FCFF;
  --card-2: #DCEEF8;
  --ink: #304658;
  --ink-soft: #566D7E;
  --line: rgba(65, 105, 135, .22);
  --red: #A54E40;
  --serif-ko: 'Noto Serif KR', serif;
  --serif-en: 'Cormorant Garamond', 'Noto Serif KR', serif;
  --sans: 'Pretendard', -apple-system, 'Apple SD Gothic Neo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #DFEDF5;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  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: 430px;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
}

/* ============ 커버 ============ */
.cover {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  padding: 0 20px 34px;
  background: #2B2B2B;
  color: #fff;
  isolation: isolate;
  font-family: 'Poppins', var(--sans);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}
.cover-photo { position: absolute; inset: 0; z-index: -2; }
.cover-photo > img,
.cover-photo.is-empty::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: grayscale(1);
}
.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(0, 0, 0, .45));
}
.cover-photo.is-empty::after {
  content: '커버 사진을 업로드해 주세요';
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3A3A3A;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}
.cover-caption { display: flex; flex-direction: column; align-items: center; }
.cover-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 8px 18px;
  border-radius: 12px;
  background: rgba(60, 60, 60, .82);
  font-size: 15px;
  line-height: 1.4;
}
.cover-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom: 0;
  border-top-color: rgba(60, 60, 60, .82);
}
.cover-heart { display: inline-flex; animation: heartbeat 1.6s ease-in-out infinite; }
.cover-heart svg { width: 16px; height: 15px; fill: #FF8FB1; filter: drop-shadow(0 0 4px rgba(255, 143, 177, .55)); }
@keyframes heartbeat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.2); } }
.cover-names { font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.cover-select {
  position: relative;
  display: inline-block;
  padding: 4px 6px;
  background: rgba(240, 205, 70, .42);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}
.cover-select::before,
.cover-select::after {
  content: '';
  position: absolute;
  width: 2px;
  background: #F2C94C;
}
.cover-select::before { left: 0; top: -2px; bottom: 0; }
.cover-select::after { right: 0; top: 0; bottom: -2px; }
.cover-select > span:first-child::before,
.cover-select > span:last-child::after {
  content: '';
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #F2C94C;
}
.cover-select > span:first-child::before { left: -4.5px; top: -9px; }
.cover-select > span:last-child::after { right: -4.5px; bottom: -9px; }
.cover-when {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}

/* ============ 공통 섹션 ============ */
.section {
  --serif-ko: var(--sans);
  --serif-en: var(--sans);
  padding: 56px 24px;
  text-align: center;
}
.section + .section { border-top: 1px solid var(--line); }
.section.light { background: var(--paper); }
.section.ivory { background: var(--paper-2); }
.eyebrow {
  font-family: var(--serif-en);
  font-size: 11px;
  letter-spacing: .36em;
  color: var(--gold);
  margin-bottom: 6px;
}
.title {
  font-family: var(--serif-ko);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.sub { font-size: 13px; color: var(--ink-soft); margin: -10px 0 20px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ 인사말 / 혼주 ============ */
.greeting {
  font-family: var(--serif-ko);
  font-size: 14px;
  line-height: 2;
  color: var(--ink);
}
.family {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 2.1;
}
.family em { font-style: normal; font-size: 12px; color: var(--ink-soft); margin: 0 10px 0 4px; }
.family strong { font-weight: 600; }

/* ============ 캘린더 ============ */
.calendar-date {
  font-size: clamp(13px, 4.1vw, 16px);
  white-space: nowrap;
}
.calendar {
  max-width: 320px;
  margin: 0 auto;
  padding: 18px 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.cal-month { font-family: var(--serif-en); font-size: 16px; letter-spacing: .12em; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.cal-grid span {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.cal-head span { font-size: 11px; color: var(--ink-soft); }
.cal-grid .sun { color: var(--red); }
.cal-grid .sat { color: #456789; }
.cal-grid .is-day {
  position: relative;
  color: #fff;
  font-weight: 600;
}
.cal-grid .is-day::before {
  content: '';
  position: absolute;
  width: 34px;
  height: 31px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath fill='%23C98476' d='M12 21.6 10.3 20C4.2 14.5.2 10.9.2 6.5.2 2.9 3 .2 6.6.2c2 0 4 .9 5.4 2.4C13.4 1.1 15.4.2 17.4.2c3.6 0 6.4 2.7 6.4 6.3 0 4.4-4 8-10.1 13.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  z-index: 0;
}
.cal-grid .is-day b { position: relative; z-index: 1; top: -2px; font-weight: 600; font-size: 12px; }

.countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}
.countdown div {
  width: 56px;
  padding: 6px 0 4px;
  background: var(--card);
  border: 1px solid var(--line);
}
.countdown b { display: block; font-family: var(--serif-en); font-size: 20px; font-weight: 500; line-height: 1.3; }
.countdown small { font-size: 9px; letter-spacing: .15em; color: var(--ink-soft); }
.dday-text { margin-top: 14px; font-size: 13px; }
.dday-text b { color: var(--red); font-weight: 600; }

/* ============ 갤러리 ============ */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gallery button {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--card);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .4s ease; }
.gallery button:active img { transform: scale(1.04); }
.gallery:not(.is-expanded) .is-more { display: none; }
.more-btn {
  margin-top: 16px;
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(65, 105, 135, .5);
  color: var(--gold);
  font-size: 13px;
  letter-spacing: .04em;
}
.more-btn[hidden] { display: none; }
.more-arrow {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .3s ease;
}
.more-btn[aria-expanded="true"] .more-arrow { transform: translateY(2px) rotate(-135deg); }
.gallery .is-empty::after {
  content: attr(data-no);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-en);
  font-size: 18px;
  color: var(--ink-soft);
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(20, 15, 12, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.viewer[hidden] { display: none; }
.viewer img { max-width: 100%; max-height: 82vh; object-fit: contain; user-select: none; }
.viewer-close { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; color: #fff; font-size: 22px; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; color: #fff; font-size: 40px; opacity: .7; }
.viewer-nav.prev { left: 4px; }
.viewer-nav.next { right: 4px; }
.viewer-count { position: absolute; bottom: 24px; color: rgba(255,255,255,.7); font-size: 14px; letter-spacing: .1em; }

/* ============ 오시는 길 ============ */
.venue-name { font-family: var(--serif-ko); font-size: 16px; font-weight: 600; }
.venue-hall { font-size: 14px; margin-top: 0; }
.venue-addr { margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }
.link-btn {
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--gold);
  border-color: rgba(65, 105, 135, .5);
}
.map {
  position: relative;
  margin: 18px -24px 0;
  height: 240px;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--card);
}
.map-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 배경음악 버튼 (모바일 폭 430px 안쪽 우측 상단에 고정) */
.bgm-btn {
  position: fixed;
  top: 16px;
  right: max(16px, calc(50% - 215px + 16px));
  z-index: 50;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(65, 105, 135, .55);
  background: rgba(255, 248, 217, .95);
  color: var(--gold);
  backdrop-filter: blur(4px);
}
.bgm-btn[hidden] { display: none; }
.bgm-btn svg { width: 18px; height: 18px; }
.bgm-btn::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 1.5px;
  background: var(--gold);
  transform: rotate(-45deg);
}
.bgm-btn.is-playing::after { display: none; }
.bgm-btn.is-playing svg { animation: bgmSpin 4s linear infinite; }
@keyframes bgmSpin { to { transform: rotate(360deg); } }
.map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink);
}
.map-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: #03C75A;
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.map-pin::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  margin: 10px;
  border-radius: 50%;
  background: #fff;
}
.nav-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 -24px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.nav-btns a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}
.nav-btns a + a { border-left: 1px solid var(--line); }
.nav-btns i {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  color: #fff;
}
.ic-naver { background: #03C75A; }
.ic-kakao { background: #FEE500; color: #3A1D1D !important; }
.ic-tmap { background: #1C6BFF; }

.transport { list-style: none; margin-top: 20px; text-align: left; }
.transport li { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.transport li:first-child { border-top: 1px solid var(--line); }
.transport .t-icon { font-size: 16px; line-height: 1.5; }
.transport h3 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.transport p { font-size: 13px; color: var(--ink-soft); line-height: 1.65; }
.transport .hl { font-style: normal; color: var(--red); }

/* ============ 마음 전하실 곳 ============ */
.accordion { margin-bottom: 8px; border: 1px solid var(--line); background: var(--card); text-align: left; }
.acc-head {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  background: var(--card-2);
}
.acc-arrow {
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: translateY(-3px) rotate(45deg);
  transition: transform .3s ease;
}
.acc-head[aria-expanded="true"] .acc-arrow { transform: translateY(2px) rotate(-135deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s ease; }
.accordion.is-open .acc-body { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }

.person { padding: 14px 18px; border-top: 1px solid var(--line); }
.person-top { display: flex; align-items: center; justify-content: space-between; }
.person-name { font-size: 14px; }
.person-name small { font-size: 12px; color: var(--ink-soft); margin-right: 8px; }
.person-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(65, 105, 135, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}
.icon-btn svg { width: 16px; height: 16px; }
.person-account {
  margin-top: 10px;
  padding: 8px 8px 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--paper);
  font-size: 13px;
  line-height: 1.5;
}
.person-account span { color: var(--ink-soft); font-size: 12px; }
.copy-btn {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--ivory);
  font-weight: 600;
  font-size: 12px;
}

/* ============ 축하 화환 ============ */
.flower-card {
  position: relative;
  width: 100%;
  margin-top: 28px;
  min-height: 92px;
  padding: 20px 110px 20px 20px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  text-align: left;
}
.flower-text strong { display: block; font-size: 14px; font-weight: 600; }
.flower-text small { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
.flower-img {
  position: absolute;
  right: 18px;
  bottom: -26px;
  width: 84px;
  height: auto;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 15, 12, .72);
}
.modal[hidden] { display: none; }
.modal-box {
  --serif-ko: var(--sans);
  --serif-en: var(--sans);
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 34px 24px 24px;
  border-radius: 14px;
  background: var(--ivory);
  color: var(--ink);
  text-align: center;
  animation: fadeUp .3s ease both;
}
.modal-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  font-size: 18px;
  color: var(--ink-soft);
}
.modal-title { font-family: var(--serif-ko); font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.modal-lead { font-size: 13px; line-height: 1.85; color: var(--ink-soft); }
.modal-info {
  list-style: none;
  margin: 20px 0 22px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  text-align: left;
}
.modal-info li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 4px; font-size: 13.5px; line-height: 1.5; }
.modal-info svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--ink-soft); }
.modal-sub-btn,
.modal-main-btn {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}
.modal-sub-btn { margin-bottom: 8px; border: 1px solid var(--line); color: var(--ink-soft); }
.modal-main-btn { background: var(--brown); color: var(--ivory); }
.modal-main-btn[hidden] { display: none; }

/* ============ 마무리 ============ */
.dark-end { background: var(--paper); color: var(--ink); padding: 44px 24px 52px; }
.share-btn {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(65, 105, 135, .7);
  color: var(--gold);
  font-size: 14px;
  letter-spacing: .04em;
}
.thanks { margin-top: 24px; font-family: var(--serif-ko); font-size: 13px; line-height: 2; opacity: .8; }

.personal-share-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 20px auto 0;
  padding: 12px;
  color: var(--gold);
  font-size: 13px;
}
.personal-share-open svg { width: 26px; height: 26px; }
.personal-share { max-height: calc(100vh - 48px); overflow-y: auto; }
.personal-share-open, .platform-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.personal-share form { margin-top: 20px; }
.personal-share label { display: block; text-align: left; font-size: 12px; margin-bottom: 6px; }
.personal-share input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(58, 42, 34, .35);
  border-radius: 6px;
  background: #fffaf2;
  color: #3A2A22;
  font: inherit;
  font-size: 16px;
}
.share-step[hidden], .platform-btn[hidden] { display: none; }
.platform-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 20px 0 8px;
}
.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px;
  border: 1px solid rgba(58, 42, 34, .15);
  border-radius: 10px;
  background: #fffaf2;
  color: #3A2A22;
  font-size: 13px;
}
.platform-btn:active { background: #f3e8d8; }
.platform-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e7ddd0;
  color: #3A2A22;
}
.platform-icon svg { width: 24px; height: 24px; }
.platform-icon.kakao { background: #FEE500; color: #191919; }
.platform-icon.sms { background: #34C759; color: #fff; }
.platform-icon.other { background: #5A4A3F; color: #fff; }
.platform-icon.copy { background: #C2A06A; color: #fff; }
.personal-share .modal-sub-btn { margin: 8px 0 16px; }
.recipient-error { color: #9b3028; font-size: 12px; text-align: left; }
#personalShareStatus { margin: 8px 0; }
.personal-share button:disabled { opacity: .6; cursor: wait; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 60;
  padding: 12px 22px;
  border-radius: 24px;
  background: rgba(243, 235, 223, .95);
  color: var(--brown-deep);
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes photoIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0) rotate(45deg); }
  50% { transform: translate(-50%, 6px) rotate(45deg); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


.letter { display: none; }
.has-letter, .has-letter body { overflow: hidden; }
.has-letter .letter {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 28px 20px 34px;
  overflow-y: auto;
  background: radial-gradient(120% 90% at 50% 30%, #5A4134 0%, #3A2A21 60%, #2A1F19 100%);
  font-family: var(--sans);
  transition: opacity .7s ease, visibility .7s ease;
}
.letter.is-hidden { opacity: 0; visibility: hidden; }

.env {
  position: relative; width: min(84vw, 340px);
  padding-top: 16px;
}
.env::before {
  content: ""; position: absolute; left: 0; right: 0; top: 34%; bottom: 0;
  background: #DCC9AA; border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.env::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(34% - 70px); height: 72px;
  background: #CFBA97;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}
.env-pocket {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: 2;
  background: #E6D6BB; border-radius: 0 0 6px 6px;
  clip-path: polygon(0 0, 50% 34%, 100% 0, 100% 100%, 0 100%);
}
.letter-card {
  position: relative; z-index: 1;
  width: 88%; margin: 0 auto 18px;
  padding: 22px 18px 20px;
  background: #F7F0E3; color: #4A3328;
  border-radius: 4px; text-align: center;
  transform: rotate(-1.5deg);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  animation: letterIn .9s cubic-bezier(.2,.8,.2,1) both;
  transition: transform .6s cubic-bezier(.4,0,.2,1), opacity .5s ease;
}
@keyframes letterIn { from { transform: translateY(40px) rotate(-1.5deg); opacity: 0; } }
.letter.is-opening .letter-card { transform: translateY(-46px) rotate(0deg) scale(1.03); }

.letter-to {
  font-size: 34px; font-weight: 700; line-height: 1.1; margin: 0;
  word-break: keep-all; overflow-wrap: anywhere;
}
.letter.is-long .letter-to { font-size: 26px; }
.letter-invited { font-size: 24px; margin: 2px 0 0; color: #7A5A47; }
.letter-heart { display: block; color: #E59A8B; font-size: 20px; margin: 4px 0 10px; }
.letter-photo {
  position: relative; margin: 0 auto 14px; width: 86%;
  padding: 7px 7px 22px; background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  transform: rotate(2deg);
}
.letter-photo::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 18px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(240,168,180,.78);
}
.letter-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.letter-couple { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: .04em; }
.letter-couple small { display: block; font-size: 17px; font-weight: 400; color: #7A5A47; letter-spacing: 0; }
.letter-when { font-size: 17px; margin: 8px 0 0; }
.letter-where { font-size: 16px; margin: 0; color: #7A5A47; }

.letter-open {
  position: relative; z-index: 3;
  font-family: var(--sans); font-size: 20px; font-weight: 700;
  letter-spacing: .08em; color: #F3EBDF;
  background: transparent; border: 1.5px solid #C2A06A; border-radius: 50%;
  padding: 12px 30px; cursor: pointer;
  animation: letterPulse 2.4s ease-in-out infinite;
}
.letter-open span { color: #E59A8B; margin-left: 6px; }
.letter-open:focus-visible { outline: 2px dashed #C2A06A; outline-offset: 4px; }
@keyframes letterPulse { 50% { transform: scale(1.05); } }

@media (max-height: 640px) {
  .has-letter .letter { justify-content: flex-start; gap: 18px; }
  .letter-photo { width: 70%; }
  .letter-to { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .letter-card, .letter-open { animation: none; }
}
