* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  word-break: keep-all;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

body {
  font-family: "Gowun Batang", "Apple SD Gothic Neo", "Malgun Gothic", serif;
  background: #eef2f4;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 16px;
  line-height: 1.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.invitation {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #fff;
  text-align: center;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* 1. Hero */
.hero {
  padding: 40px 12px 50px;
}

.hero__photo {
  position: relative;
  width: calc(100% + 24px);
  aspect-ratio: 9 / 16;
  margin: -40px -12px 28px;
  background: #dde6ea;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__names {
  font-family: "Nanum Myeongjo", "Gowun Batang", serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.hero__names span {
  color: #8fb4c9;
  margin: 0 6px;
}

.hero__date {
  font-family: "Lora", "Gowun Batang", serif;
  font-size: 17px;
  letter-spacing: 0.5px;
  color: #777;
}

.hero__venue {
  font-size: 14px;
  color: #777;
}

/* 2. BGM */
.bgm {
  position: fixed;
  /* 카드 너비(최대 480px)가 뷰포트 중앙에 고정되므로, 뷰포트 폭에 따라
     카드의 우측 모서리를 따라가도록 계산해 PC에서도 카드 안쪽에 보이게 한다. */
  right: max(40px, calc(50vw - 216px));
  bottom: 24px;
  z-index: 20;
}

.bgm__toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bgm__toggle::before,
.bgm__toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid #4a7a96;
  opacity: 0;
}

.bgm.is-playing .bgm__toggle::before,
.bgm.is-playing .bgm__toggle::after {
  animation: bgm-wave 2.4s ease-out infinite;
}

.bgm.is-playing .bgm__toggle::after {
  animation-delay: 1.2s;
}

@keyframes bgm-wave {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.bgm__icon {
  display: block;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  color: #555;
}

.bgm.is-playing .bgm__icon {
  color: #4a7a96;
  animation: bgm-bounce 1s ease-in-out infinite;
}

@keyframes bgm-bounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(-12deg);
  }
}

/* Card sections (공통 포맷: eyebrow + title + body) */
.card {
  border-top: 1px solid #eee;
  padding: 48px 24px;
}

.card:nth-of-type(even) {
  background: #eaf3f7;
}

.card:last-of-type {
  padding-bottom: 90px;
}

.card__header {
  margin-bottom: 28px;
}

.card__title {
  font-family: "Nanum Myeongjo", "Gowun Batang", serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
}

.card__desc {
  font-size: 14px;
  color: #777;
  margin-bottom: 24px;
}

/* 3. 인사말 */
.greeting__text {
  font-size: 15px;
  margin-bottom: 32px;
}

.family__row {
  font-size: 14px;
}

.family__row + .family__row {
  margin-top: 6px;
}

.family__rel {
  color: #999;
  margin: 0 8px;
}

.family__self {
  font-weight: 600;
}

/* 5. 캘린더 */
.calendar__month {
  font-family: "Lora", "Gowun Batang", serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.calendar__table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 20px;
}

.calendar__table th,
.calendar__table td {
  padding: 8px 0;
  text-align: center;
  color: #555;
}

.calendar__table th {
  font-weight: 400;
  color: #999;
  font-size: 12px;
}

.calendar__sun {
  color: #d98a8a;
}

.calendar__day--wedding span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #8fb4c9;
  color: #fff;
  font-weight: 600;
}

.calendar__dday {
  font-size: 14px;
  color: #777;
}

.calendar__dday strong {
  color: #8fb4c9;
}

/* 6. 갤러리 */
[data-section="gallery"] .card__header {
  margin-bottom: 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.gallery__item {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #dde6ea;
  border: none;
  border-radius: 2px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 갤러리 라이트박스 */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 32px;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox__nav--prev {
  left: 4px;
}

.lightbox__nav--next {
  right: 4px;
}

.lightbox__count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: #fff;
}

/* 7. 오시는 길 */
.location__venue {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.location__hall {
  font-size: 14px;
  font-weight: 600;
  color: #5e7d8e;
  margin-bottom: 8px;
}

.location__address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: #777;
  margin-bottom: 14px;
}

.location__copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  color: #999;
  cursor: pointer;
}

.location__copy.is-copied {
  color: #8fb4c9;
}

.location__copy-icon {
  width: 14px;
  height: 14px;
}

.location__tel-btn {
  display: inline-block;
  font-size: 13px;
  color: #777;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 18px;
  margin-bottom: 20px;
}

.location__map {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 4px;
}

.location__shortcut {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.location__shortcut-btn {
  flex: 1;
  max-width: 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: 20px;
  padding: 10px 0;
  color: #333;
}

.location__shortcut-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.location__shortcut-btn--kakao {
  background: #fae100;
}

.location__shortcut-btn--naver {
  background: #03c75a;
  color: #fff;
}

.location__nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

.location__nav-btn {
  font-size: 12px;
  color: #777;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
}

.location__transport {
  text-align: left;
  font-size: 13px;
  color: #777;
}

.location__transport h3 {
  font-size: 13px;
  color: #333;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 4px;
}

.location__transport h3:first-child {
  margin-top: 0;
}

/* 8. 안내 말씀 */
.notice__list {
  text-align: left;
  list-style: disc;
  font-size: 13px;
  color: #777;
  padding-left: 18px;
}

.notice__list li {
  margin-bottom: 10px;
}

.notice__list li:last-child {
  margin-bottom: 0;
}

/* 9. 계좌번호 */
.bank__group {
  margin-bottom: 24px;
}

.bank__group:last-child {
  margin-bottom: 0;
}

.bank__group-title {
  font-size: 13px;
  color: #999;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.bank__list {
  list-style: none;
}

.bank__item {
  border-top: 1px solid #f0eeec;
}

.bank__item:first-child {
  border-top: none;
}

.bank__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: inherit;
  font-size: 14px;
  padding: 14px 4px;
  border: none;
  background: none;
  cursor: pointer;
  color: #333;
}

.bank__arrow {
  width: 8px;
  height: 8px;
  border-right: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.bank__item.is-open .bank__arrow {
  transform: rotate(-135deg);
}

.bank__detail {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 14px;
  font-size: 13px;
  color: #555;
}

.bank__item.is-open .bank__detail {
  display: flex;
}

.bank__copy {
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  padding: 6px 14px;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}

/* 10. 공유 */
.share__buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.share__btn {
  font: inherit;
  font-size: 13px;
  padding: 12px 22px;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  color: #fff;
}

.share__btn--kakao {
  background: #f7e000;
  color: #3c1e1e;
}

.share__btn--link {
  background: #7d99a8;
}
