/* Auto-built: App.css (RSVP + calendar) + WeddingFlipCountdown.css + IntroEnvEnvelope.css */
/* 참석 여부 — `RsvpAttendanceSection.tsx` + 인트로와 동일 편지(静止). 카드형 면/테/그림자 없음(`#rsvp` 섹션 배경만 사용) */
.rsvp-attendance {
  margin: clamp(36px, 10vw, 72px) 0 clamp(10px, 3vw, 28px);
  padding: clamp(28px, 6vw, 38px) max(var(--section-pad-x), env(safe-area-inset-left)) clamp(28px, 6vw, 38px)
    max(var(--section-pad-x), env(safe-area-inset-right));
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

#rsvp .rsvp-attendance h2.rsvp-attendance__title,
.rsvp-attendance__title {
  margin: 0 0 12px;
  width: 100%;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: center;
}

/* RSVP 영문 워터마크 — 반투명 흰색, 그림자 없음 */
#rsvp .rsvp-attendance h2.rsvp-attendance__title[data-title-en]::before {
  color: rgb(255 255 255 / 0.48);
  opacity: 1;
  text-shadow: none;
}

.rsvp-attendance__trigger {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  line-height: 0;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.rsvp-attendance__trigger:focus-visible {
  outline: 2px solid rgb(255 255 255 / 0.92);
  outline-offset: 6px;
  border-radius: 12px;
}

.rsvp-envelope-figure {
  display: block;
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding-top: clamp(18px, 4.5vw, 34px);
  pointer-events: none;
  transform-origin: 50% 55%;
  animation: introEnvShake 2.6s ease-in-out infinite;
}

.rsvp-envelope-figure .intro-env {
  --intro-w: min(calc(252px * 0.29), calc(76vw * 0.29));
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-envelope-figure {
    animation: none;
  }
}

.rsvp-attendance__backdrop {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 14px;
  /* 백드롭에 주입된 `--body-palette-tone-en` 기준 — `.phone-shell`의 `--wcal-highlight`와 동일 믹스 */
  --rsvp-accent: color-mix(in srgb, var(--body-palette-tone-en, rgb(112 112 112)) 58%, rgb(42 38 34) 42%);
  --rsvp-accent-dark: color-mix(in srgb, var(--body-palette-tone-en, rgb(112 112 112)) 44%, rgb(24 22 20) 56%);
  background: rgb(0 0 0 / 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition:
    opacity 0.34s ease,
    backdrop-filter 0.34s ease;
}

.rsvp-attendance__backdrop--visible {
  opacity: 1;
}

.rsvp-attendance__dialog {
  position: relative;
  box-sizing: border-box;
  width: min(340px, calc(100vw - 44px), calc(var(--shell-max) - 52px));
  max-height: min(86vh, 500px);
  overflow: auto;
  padding: 18px 16px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 48px rgb(0 0 0 / 0.2);
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition:
    opacity 0.34s cubic-bezier(0.22, 1, 0.32, 1),
    transform 0.34s cubic-bezier(0.22, 1, 0.32, 1);
}

.rsvp-attendance__backdrop--visible .rsvp-attendance__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-attendance__backdrop,
  .rsvp-attendance__dialog {
    transition-duration: 0.12s;
  }
}

.rsvp-attendance__dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 5px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.rsvp-attendance__dialog-close:hover {
  color: var(--ink);
}

.rsvp-quiz-back {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rsvp-quiz-back:hover {
  color: var(--ink);
  background: rgb(0 0 0 / 0.05);
}

.rsvp-quiz-back:focus-visible {
  outline: 2px solid var(--rsvp-accent);
  outline-offset: 1px;
}

.rsvp-quiz-back__chev {
  display: block;
  margin-left: -2px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.rsvp-attendance__dialog-title {
  margin: 0 26px 10px 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rsvp-attendance__dialog-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  text-align: left;
}

.rsvp-attendance__dialog-body p {
  margin: 0 0 0.65em;
}

.rsvp-attendance__dialog-body p:last-child {
  margin-bottom: 0;
}

.rsvp-attendance__dialog-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
}

.rsvp-attendance__dialog-cta:hover {
  opacity: 0.92;
}

.rsvp-attendance__dialog-cta:focus-visible {
  outline: 2px solid var(--rsvp-accent);
  outline-offset: 2px;
}

.rsvp-attendance__dialog--form {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 340px;
  max-width: calc(100vw - 28px);
  height: 520px;
  max-height: min(520px, calc(100vh - 44px));
  min-height: unset;
  overflow: hidden;
  text-align: left;
}

.rsvp-attendance__dialog--form > .rsvp-attendance__form-root {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
}

.rsvp-attendance__dialog--success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 340px;
  max-width: calc(100vw - 28px);
  height: 520px;
  max-height: min(520px, calc(100vh - 44px));
  overflow: hidden;
  padding-top: 30px;
  padding-bottom: 24px;
}

.rsvp-attendance__dialog--success > .rsvp-success {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: auto;
}

.rsvp-attendance__dialog-title--form {
  text-align: center;
  margin-right: 0;
  padding-right: 24px;
  flex-shrink: 0;
}

.rsvp-attendance__dialog-title--with-quiz-back {
  padding-left: 30px;
}

/* RSVP 퀴즈 슬라이드 — 한 화면에 질문 하나, 선택 시 다음으로 이동 */
.rsvp-quiz-viewport {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  margin-top: 2px;
}

.rsvp-quiz-track {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  transition: transform 0.45s cubic-bezier(0.33, 1, 0.32, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-quiz-track {
    transition: none;
  }

  .rsvp-op {
    animation: none !important;
  }

  .rsvp-quiz-milestones__rail-fill {
    transition: none;
  }
}

.rsvp-quiz-milestones {
  flex-shrink: 0;
  width: 100%;
  margin-top: 0;
  padding-top: 10px;
  padding-bottom: 4px;
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.rsvp-quiz-milestones__rail {
  position: relative;
  height: 3px;
  margin: 0 10px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
  overflow: hidden;
}

.rsvp-quiz-milestones__rail-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rsvp-accent-dark), var(--rsvp-accent));
  transition: width 0.38s cubic-bezier(0.33, 1, 0.32, 1);
}

.rsvp-quiz-milestones__steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0 2px;
  margin: 0;
  padding: 0 2px;
  list-style: none;
}

.rsvp-quiz-milestones__step {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.rsvp-quiz-milestones__dot {
  display: block;
  box-sizing: border-box;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--muted) 55%, var(--line));
  background: var(--paper);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.rsvp-quiz-milestones__step--done .rsvp-quiz-milestones__dot {
  border-color: var(--rsvp-accent-dark);
  background: var(--rsvp-accent);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.06);
}

.rsvp-quiz-milestones__step--current .rsvp-quiz-milestones__dot {
  width: 11px;
  height: 11px;
  margin-top: -1px;
  border-width: 2px;
  border-color: var(--rsvp-accent-dark);
  background: color-mix(in srgb, var(--rsvp-accent) 72%, #fff);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--rsvp-accent) 32%, transparent),
    0 1px 2px rgb(0 0 0 / 0.12);
}

.rsvp-quiz-milestones__step--upcoming .rsvp-quiz-milestones__dot {
  opacity: 0.88;
}

.rsvp-quiz-slide {
  display: flex;
  flex: 0 0 calc(100% / 6);
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  width: calc(100% / 6);
  min-height: 0;
  padding: 4px 2px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rsvp-quiz-question {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(0.94rem, 3.15vw, 1.08rem);
  font-weight: 600;
  line-height: 1.32;
  text-align: center;
  color: var(--ink);
}

.rsvp-quiz-question::before {
  content: "Q. ";
  color: var(--rsvp-accent);
  font-weight: 700;
}

@keyframes rsvpOpWiggle {
  0%,
  100% {
    transform: rotate(-0.55deg);
  }

  22% {
    transform: rotate(0.5deg);
  }

  48% {
    transform: rotate(-0.35deg);
  }

  72% {
    transform: rotate(0.42deg);
  }
}

.rsvp-quiz-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 8px;
  width: 100%;
  max-width: min(288px, calc(100% - 4px));
  margin: 0 auto;
}

.rsvp-quiz-options--meal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: min(288px, calc(100% - 4px));
  margin: 0 auto;
}

.rsvp-quiz-options--meal .rsvp-op {
  width: 100%;
}

.rsvp-quiz-options--meal .rsvp-op--tr {
  margin-left: 0;
}

.rsvp-quiz-options--meal .rsvp-op--full {
  grid-column: 1 / -1;
}

.rsvp-privacy-detail-trigger {
  margin: 6px 0 2px;
  text-align: center;
}

.rsvp-quiz-options--privacy-agree {
  display: block;
  width: 100%;
  max-width: min(288px, calc(100% - 4px));
  margin: 12px auto 0;
}

.rsvp-quiz-options--privacy-agree .rsvp-op--privacy-agree {
  width: 100%;
}

.rsvp-op {
  box-sizing: border-box;
  width: calc((100% - 8px) / 2);
  margin: 0;
  padding: 0 8px;
  border: none;
  border-radius: 13px;
  background: var(--rsvp-accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 2.3rem;
  text-align: center;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.12);
  transform-origin: 50% 55%;
  animation: rsvpOpWiggle 2.9s ease-in-out infinite;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.rsvp-quiz-options > .rsvp-op:nth-child(1) {
  animation-duration: 2.72s;
  animation-delay: -0.35s;
}

.rsvp-quiz-options > .rsvp-op:nth-child(2) {
  animation-duration: 3.18s;
  animation-delay: -1.05s;
}

.rsvp-quiz-options > .rsvp-op:nth-child(3) {
  animation-duration: 3.05s;
  animation-delay: -0.62s;
}

.rsvp-op--tr {
  margin-left: auto;
}

.rsvp-op:hover {
  filter: brightness(1.06);
}

.rsvp-op:active {
  animation-play-state: paused;
  transform: scale(0.98) rotate(0deg);
}

.rsvp-op:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.rsvp-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgb(0 0 0 / 0.12);
  background: var(--paper);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
}

.rsvp-input--quiz {
  display: block;
  max-width: 248px;
  margin: 0 auto 12px;
}

.rsvp-quiz-next {
  display: block;
  width: 100%;
  max-width: 168px;
  margin: 0 auto;
  padding: 9px 12px;
  border: none;
  border-radius: 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--rsvp-accent);
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.rsvp-quiz-next:hover:not(:disabled) {
  filter: brightness(1.06);
}

.rsvp-quiz-next:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.rsvp-quiz-next:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.rsvp-quiz-privacy-lead {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.rsvp-quiz-summary-lead {
  margin: 12px 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.rsvp-quiz-summary {
  margin: 0 auto 2px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.rsvp-quiz-summary__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 12px;
  border: 1px solid rgb(0 0 0 / 0.08);
  background: rgb(255 255 255 / 0.72);
  overflow: hidden;
}

.rsvp-quiz-summary__item {
  display: grid;
  grid-template-columns: minmax(4.25rem, auto) 1fr;
  gap: 10px 14px;
  align-items: baseline;
  padding: 8px 10px;
  border-bottom: 1px solid rgb(0 0 0 / 0.06);
  font-size: 12px;
  line-height: 1.45;
}

.rsvp-quiz-summary__item:last-child {
  border-bottom: none;
}

.rsvp-quiz-summary__k {
  font-weight: 600;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.rsvp-quiz-summary__v {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: break-word;
}

.rsvp-privacy {
  margin: 12px 0 0;
}

.rsvp-privacy__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
}

.rsvp-privacy__check {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--ink);
}

.rsvp-privacy__detail-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.rsvp-privacy__detail-link:hover {
  color: var(--rsvp-accent-dark);
}

.rsvp-form__external {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}

.rsvp-form__error {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #b54a3c;
  text-align: center;
}

.rsvp-form__submit {
  width: 100%;
  margin-top: 8px;
  padding: 11px 14px;
  border: none;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--rsvp-accent-dark);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.rsvp-form__submit:hover:not(:disabled) {
  opacity: 0.94;
}

.rsvp-form__submit:focus-visible {
  outline: 2px solid var(--rsvp-accent);
  outline-offset: 2px;
}

.rsvp-form__submit:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.rsvp-form__submit:disabled:hover {
  opacity: 0.42;
}

.rsvp-privacy-sheet {
  position: absolute;
  inset: 0;
  z-index: 30;
  margin: 0;
  padding: 48px 18px 20px;
  border-radius: 14px;
  background: var(--paper);
  overflow: auto;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}

.rsvp-privacy-sheet__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.rsvp-privacy-sheet__close:hover {
  color: var(--ink);
}

.rsvp-privacy-sheet__title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.rsvp-privacy-sheet__list {
  margin: 0;
  padding: 0 0 0 1.1em;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
}

.rsvp-privacy-sheet__list li {
  margin: 0 0 0.65em;
}

.rsvp-privacy-sheet__list li:last-child {
  margin-bottom: 0;
}

.rsvp-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.rsvp-success__sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rsvp-success__envelope-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  pointer-events: none;
}

.rsvp-modal-envelope.intro-env {
  --intro-w: min(calc(252px * 0.52), calc(74vw * 0.52));
}

.rsvp-success__msg {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: rsvp-success-msg-in 0.55s ease 0.42s both;
}

.rsvp-success__close {
  position: static;
  align-self: center;
  margin: 28px 0 0;
  padding: 12px 32px;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: rsvp-success-msg-in 0.55s ease 0.52s both;
}

.rsvp-success__close:hover {
  opacity: 0.92;
}

.rsvp-success__close:focus-visible {
  outline: 2px solid var(--rsvp-accent);
  outline-offset: 3px;
}

@keyframes rsvp-success-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-success__msg,
  .rsvp-success__close {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .rsvp-modal-envelope .intro-env__flap,
  .rsvp-modal-envelope .intro-env__letter {
    transition: none !important;
  }

  .rsvp-modal-envelope.intro-env--open .intro-env__heart {
    animation: none !important;
    opacity: 0 !important;
  }
}
/* 히어로 — 혼주 연락 다음, `WeddingCalendar.tsx` (Unsplash·body 배경 없음) */
.wedding-calendar-wrap {
  width: 100%;
  max-width: min(475px, 100%);
  margin: var(--hero-block-gap) auto 0;
  overflow: visible;
}

/* `#wedding-date` 섹션으로 분리 후 상단 여백은 섹션 패딩에 맡김 */
#wedding-date .wedding-calendar-wrap {
  margin-top: 0;
}

/* 예식일 — 캘린더(월·그리드)·D-DAY 블록의 세로 패딩·블록 간격 통일 */
#wedding-date {
  --wd-item-pad-y: clamp(22px, 5.5vw, 30px);
  --wd-block-gap: clamp(22px, 5.5vw, 30px);
  --wd-inner-gap: clamp(18px, 4.5vw, 26px);
  --wd-cell-pad-y: 0.35em;
}

#wedding-date .wedding-section__content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--wd-block-gap);
}

#wedding-date .wedding-section__content > [data-scroll-reveal] {
  width: 100%;
}

/* 월·격자를 한 블록으로 — 바깥만 동일 세로 패딩(머리·몸통 이중 패딩 제거) */
#wedding-date .wedding-calendar {
  padding: var(--wd-item-pad-y) 24px;
  box-sizing: border-box;
}

#wedding-date .wedding-calendar__head {
  padding: 0 0 var(--wd-inner-gap);
  text-align: center;
}

#wedding-date .wedding-calendar__body {
  padding: 0;
}

#wedding-date .wedding-calendar__weekname {
  padding: var(--wd-cell-pad-y) 0;
}

#wedding-date .wedding-calendar__td {
  padding: var(--wd-cell-pad-y) 0;
}

#wedding-date .wfc-root {
  margin-top: 0;
  padding: var(--wd-item-pad-y) clamp(8px, 3vw, 16px);
}

#wedding-date .wfc-title {
  margin: var(--wd-inner-gap) 0;
}

#wedding-date .wfc-flip-clock {
  margin-top: 0;
}

.wedding-calendar-wrap__title {
  margin: 0 0 clamp(54px, 13vw, 80px);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-align: center;
}

.wedding-calendar {
  width: 100%;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.wedding-calendar__head {
  padding: 1em;
  text-align: center;
  background: transparent;
  border-bottom: none;
}

.wedding-calendar__month {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35em;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-calendar-day);
}

.wedding-calendar__body {
  padding: 1.75em 24px;
}

.wedding-calendar__table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  table-layout: fixed;
}

.wedding-calendar__weekname {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--color-calendar-muted);
  padding: 0.35em 0;
  letter-spacing: 0.05em;
}

.wedding-calendar__td {
  padding: 0.35em 0;
  vertical-align: middle;
}

.wedding-calendar__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  font-size: 0.95em;
  color: var(--color-calendar-day);
  border: 1px solid transparent;
  box-sizing: border-box;
  margin: 0 auto;
}

.wedding-calendar__day--wedding {
  background: var(--wcal-highlight);
  color: var(--color-text-on-contrast);
  font-weight: 600;
}
/* `WeddingFlipCountdown.tsx` — 플립 D-DAY (정답 로직 기반) */

.wfc-root {
  position: relative;
  margin-top: clamp(34px, 8vw, 48px);
  padding: clamp(26px, 6.5vw, 36px) clamp(8px, 3vw, 16px);
  text-align: center;
  overflow: visible;
}

.wfc-root::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(18rem, 72%);
  height: 1px;
  translate: -50% 0;
  background: rgb(190 190 190 / 0.42);
}

.wfc-root *,
.wfc-root *::before,
.wfc-root *::after {
  box-sizing: border-box;
}

.wfc-title {
  margin: 0 0 clamp(18px, 4.5vw, 26px);
  font-family: "Cinzel Decorative", "Bodoni Moda", var(--serif);
  font-size: clamp(0.95rem, 3.2vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.45;
}

.wfc-title__heart {
  color: var(--body-palette-tone-en, rgb(220 220 220));
  font-weight: 600;
}

.wfc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wfc-flip-clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 3vw, 14px);
  width: 100%;
  max-width: min(25rem, 100%);
  margin: 0 auto;
  perspective: none;
}

.wfc-piece {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: clamp(78px, 20vw, 108px);
  padding: clamp(11px, 3vw, 17px) 6px;
  border-radius: clamp(10px, 2.6vw, 16px);
  background: #fff;
  box-shadow:
    inset 0 12px 18px rgb(255 255 255 / 0.96),
    inset 0 -8px 18px rgb(235 235 235 / 0.2),
    0 -10px 22px rgb(215 215 215 / 0.22),
    0 18px 34px rgb(40 40 40 / 0.08);
}

.wfc-slot {
  display: block;
  margin-top: clamp(8px, 2vw, 12px);
  font-family: var(--serif);
  font-size: clamp(0.48rem, 1.45vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgb(176 176 176);
  text-transform: uppercase;
}

.wfc-card {
  display: block;
  position: relative;
  padding: 0;
  font-size: clamp(1rem, 4.2vw, 1.42rem);
  line-height: 1;
  filter: none;
}

.wfc-card__top,
.wfc-card__bottom,
.wfc-card__back::before,
.wfc-card__back::after {
  display: block;
  height: auto;
  color: rgb(64 64 64);
  background: transparent;
  padding: 0;
  border-radius: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  width: 100%;
  transform: translateZ(0);
  font-family: var(--serif);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.wfc-card__bottom {
  display: none;
}

.wfc-card__bottom::after {
  display: block;
  margin-top: -0.88em;
}

.wfc-card__back::before,
.wfc-card__bottom::after {
  content: attr(data-value);
}

.wfc-card__back {
  display: none;
}

.wfc-card__back::before {
  position: relative;
  z-index: -1;
  overflow: hidden;
}

.wfc-card--days .wfc-card__top,
.wfc-card--days .wfc-card__bottom,
.wfc-card--days .wfc-card__back::before,
.wfc-card--days .wfc-card__back::after {
  width: 100%;
}

.wfc-piece--flip .wfc-card__back::before {
  animation: none;
}

.wfc-piece--flip .wfc-card__back .wfc-card__bottom {
  animation: none;
}

@keyframes wfc-flip-top {
  0% {
    transform: rotateX(0deg);
    z-index: 2;
  }
  0%,
  99% {
    opacity: 0.99;
  }
  100% {
    transform: rotateX(-90deg);
    opacity: 0;
  }
}

@keyframes wfc-flip-bottom {
  0%,
  50% {
    z-index: -1;
    transform: rotateX(90deg);
    opacity: 0;
  }
  51% {
    opacity: 0.99;
  }
  100% {
    opacity: 0.99;
    transform: rotateX(0deg);
    z-index: 5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wfc-piece--flip .wfc-card__back::before,
  .wfc-piece--flip .wfc-card__back .wfc-card__bottom {
    animation: none;
  }
}
/* 삼각형 미니 봉투 — 히어로·RSVP 모달 등 */

/* CodePen식 삼각형 봉투 — 아이보리·크림 톤 */
.intro-env {
  --intro-w: min(calc(252px * 0.7), calc(84vw * 0.7));
  --intro-h: calc(var(--intro-w) * 180 / 280);
  --intro-heart-w: calc(20px * 0.7);
  /* 옆면·밑면·뚜껑 삼각 — 미묘한 단차로 입체 */
  --intro-env: #f2ebe1;
  --intro-env2: #dcd4c8;
  --intro-flap: #ebe6dc;
  /* 움직이는 삼각 뚜껑만 살짝 밝게 */
  --intro-flap-motion: #f3eee7;
  /*
   * z-index 위계
   * DOM 순서: pocket → flap → letter → hearts
   *
   * [닫힘] flap(3) > pocket(2) > letter(1) = hearts(1, DOM뒤로 letter 위)
   *   - 정면에서 본 봉투의 물리적 깊이: 뚜껑이 맨 앞
   *   - 편지·하트는 같은 "내용물" 레이어 (둘 다 주머니 뒤에 숨음)
   *
   * [열림] pocket(2) > letter(1) = hearts(1) > flap(0)
   *   - 뚜껑은 뒤로 젖혀져 맨 뒤
   *   - 주머니가 편지·하트보다 앞 → 둘 다 봉투 안에서 빠져나오는 느낌
   *   - 편지는 위로 슬라이드, 하트는 위로 떠오름 — 둘 다 윗부분이 봉투 윗선 위로 올라와야 보임
   */
  isolation: isolate;
  position: relative;
  width: var(--intro-w);
  height: var(--intro-h);
  margin: 0 auto;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  background-color: var(--intro-flap);
  box-shadow:
    0 10px 32px rgba(58, 48, 40, 0.14),
    0 2px 0 rgba(255, 255, 255, 0.35) inset;
  perspective: calc(880px * 0.7);
  transform-style: preserve-3d;
}

.intro-env__front {
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  translate: -50% 0;
  pointer-events: none;
}

.intro-env__pocket {
  bottom: 0;
  z-index: 2; /* 닫힘·열림 공통: 내용물(편지·하트)보다 앞 → 봉투 안에서 나오는 느낌 */
  border-left: calc(var(--intro-w) / 2) solid var(--intro-env);
  border-right: calc(var(--intro-w) / 2) solid var(--intro-env);
  border-bottom: calc(var(--intro-h) / 2) solid var(--intro-env2);
  border-top: calc(var(--intro-h) / 2) solid transparent;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.intro-env__flap {
  top: 0;
  z-index: 3; /* 닫힘: 맨 앞 뚜껑 */
  transform: rotateX(0deg);
  transform-origin: top center;
  border-left: calc(var(--intro-w) / 2) solid transparent;
  border-right: calc(var(--intro-w) / 2) solid transparent;
  border-bottom: calc(var(--intro-h) / 2 - (8px * 0.7)) solid transparent;
  border-top: calc(var(--intro-h) / 2 + (8px * 0.7)) solid var(--intro-flap-motion);
  transition: transform 0.48s ease;
}

.intro-env--open .intro-env__flap {
  transform: rotateX(180deg);
  z-index: 0; /* 열림: 젖힌 뚜껑은 맨 뒤 */
}

.intro-env__letter {
  position: absolute;
  left: 5%;
  right: 5%;
  top: 10%;
  width: 90%;
  height: 82%;
  z-index: 1; /* 닫힘·열림 공통: 주머니(2)보다 뒤 → 봉투 안에서 빼꼼 */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(4px, 2.5vw, 10px) clamp(6px, 3vw, 12px);
  border-radius: 6px;
  background: linear-gradient(165deg, #fffefa 0%, #f7f1e8 45%, #ede6dc 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 12px 26px rgba(58, 48, 40, 0.12);
  border: 1px solid rgba(88, 76, 64, 0.12);
  overflow: hidden;
}

.intro-env__letter-line {
  position: relative;
  z-index: 1; /* ::after 그라데이션 위 */
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.2em 0.35em;
  max-width: 100%;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(11px, calc(var(--intro-w) * 0.065), 17px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-align: center;
  color: #4a3d34;
}

.intro-env__letter-groom,
.intro-env__letter-bride {
  white-space: nowrap;
}

.intro-env__letter-heart {
  flex-shrink: 0;
  color: #a85a68;
  font-size: 0.88em;
  font-weight: 500;
  line-height: 1;
  translate: 0 0.06em;
}

.intro-env__letter::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  pointer-events: none;
  background-image: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 22%,
    rgba(236, 228, 216, 0.55) 52%,
    rgba(214, 204, 188, 0.45) 100%
  );
}

.intro-env--close .intro-env__letter {
  transform: translateY(0);
  transition: transform 0.45s ease;
}

.intro-env--open .intro-env__letter {
  /* 봉투 절반 정도까지 위로 슬라이드 — 윗부분이 봉투 윗선 위로 빼꼼 */
  transform: translateY(calc(-1 * var(--intro-h) / 2));
  transition: transform 0.5s ease 0.18s;
}

/* CodePen식: 열릴 때 하트가 위로 떠오르며 좌우로 흔들림 */
.intro-env__hearts {
  position: absolute;
  left: 0;
  right: 0;
  /* 봉투 바닥 근처에서 출발 — 떠오르는 동안 주머니에 가려졌다가 윗선 넘으면 보임 */
  top: 70%;
  z-index: 1; /* 닫힘·열림 공통: 편지와 같은 "내용물" 레이어, 주머니(2) 뒤 */
  height: 0;
  pointer-events: none;
}

.intro-env__heart {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.intro-env__heart::before,
.intro-env__heart::after {
  content: "";
  position: absolute;
  left: var(--intro-heart-w);
  top: 0;
  width: var(--intro-heart-w);
  height: calc(var(--intro-heart-w) * 1.6);
  background: #b86b76;
  border-radius: var(--intro-heart-w) var(--intro-heart-w) 0 0;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
  pointer-events: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.intro-env__heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.intro-env--close .intro-env__heart {
  opacity: 0;
  animation: none;
}

.intro-env--open .intro-env__heart--a1 {
  left: 18%;
  opacity: 1;
  animation:
    introHeartRise1 3.2s linear forwards,
    introHeartSideSway 2s ease-in-out 4 alternate;
  animation-delay: 0.22s;
}

.intro-env--open .intro-env__heart--a2 {
  left: 52%;
  opacity: 1;
  animation:
    introHeartRise2 3.8s linear forwards,
    introHeartSideSway 2.4s ease-in-out 3 alternate;
  animation-delay: 0.28s;
}

.intro-env--open .intro-env__heart--a3 {
  left: 8%;
  opacity: 1;
  animation:
    introHeartRise3 4.4s linear forwards,
    introHeartSideSway 2s ease-in-out 5 alternate;
  animation-delay: 0.18s;
}

@keyframes introHeartRise1 {
  from {
    transform: translateY(0) scale(0.65);
  }
  to {
    transform: translateY(min(calc(-260px * 0.7), calc(-40vh * 0.7))) scale(0.65);
  }
}

@keyframes introHeartRise2 {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(min(calc(-300px * 0.7), calc(-46vh * 0.7))) scale(1);
  }
}

@keyframes introHeartRise3 {
  from {
    transform: translateY(0) scale(0.82);
  }
  to {
    transform: translateY(min(calc(-280px * 0.7), calc(-44vh * 0.7))) scale(0.82);
  }
}

@keyframes introHeartSideSway {
  from {
    margin-inline-start: 0;
  }
  to {
    margin-inline-start: calc(22px * 0.7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-env__flap,
  .intro-env__letter {
    transition-duration: 0.2s;
    transition-delay: 0s !important;
  }

  .intro-env--open .intro-env__heart {
    animation: none !important;
    opacity: 0;
  }
}

/* 히어로「참석 여부」— 동일 봉투 마크업, 닫힌 모습만·애니·트랜지션 없음 */
.intro-env.intro-env--static-visual.intro-env--close .intro-env__flap {
  transition: none !important;
}

.intro-env.intro-env--static-visual.intro-env--close .intro-env__letter {
  transition: none !important;
  transform: none !important;
}

.intro-env.intro-env--static-visual .intro-env__heart {
  animation: none !important;
  opacity: 0 !important;
}
@keyframes introEnvShake { 0%,100%{ transform: rotate(0deg); } 25%{ transform: rotate(-2.2deg); } 50%{ transform: rotate(2deg); } 75%{ transform: rotate(-1.4deg); } }
