/* ===================================================================
   Base Reset & Theme Variables
   =================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --card-max: 480px;

  /* Cover timings */
  --cover-delay: 3s;   /* 보여줄 시간 */
  --cover-dur:   1s;   /* 페이드아웃 시간 */

  /* Very light sky palette */
  --sky-0: #ffffff;    /* pure white */
  --sky-1: #f5fbff;    /* 거의 흰색의 스카이 */ 
  --sky-2: #eef5fa;    /* 아주 연한 하늘색 (카드 배경) */
  --sky-3: #96d2f8;    /* hover/포인트 보조 */
  --sky-accent: #2aa7ff; /* 메인 포인트 블루 */
}

/* ===================================================================
   Global Typography & Layout
   =================================================================== */
@font-face {
  font-family: 'GowoonDodum';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_twelve@1.0/RIDIBatang.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MyWeddingFont';
  src: url('./fonts/Eulyoo1945-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'titleFont';
  src: url('./fonts/Parisienne-Regular.ttf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}


body {
  font-family: 'GowoonDodum', serif;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-1) 50%, var(--sky-1) 100%);
  color: #5a5a5a;
  line-height: 1.6;
}

.container{
  position: relative;
  max-width: var(--card-max);
  margin: 0 auto;
  background: var(--sky-2);
  border-radius: 16px;
  overflow: hidden;           /* 둥근 모서리 밖 잘라내기 */
  box-shadow: 0 0 30px rgba(0,0,0,.1);
}

/* ===================================================================
   BGM Floating Button
   - 카드 좌측 여백을 계산해 안전영역까지 고려하여 배치
   =================================================================== */
.bgm-btn {
  position: fixed;
  top: 12px;
  left: calc(
          (100vw - min(100vw, var(--card-max))) / 2
          + max(12px, env(safe-area-inset-left))
  );
  z-index: 10002;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 18px;
  border: 1px solid #e74c3c;
  background: #fff;
  color: #c94444;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.bgm-btn:hover { transform: translateY(-1px); background: var(--sky-3); color: #fff; }
.bgm-btn.is-playing { background: var(--sky-3); color: #fff; }
#bgmToggle {
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* 나타날 때 */
#bgmToggle.show {
  opacity: 1;
}
/* ===================================================================
   Header (Hero)
   =================================================================== */
.header {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--card-max);
  height: 100vh;
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  padding: 520px 20px 80px;
  background: url('./images/background.jpg') center/cover no-repeat;
  color: #fff;
}
.header::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.35); /* 텍스트 대비용 오버레이 */
  z-index: 0;
}
.header > * { position: relative; z-index: 1; }

.header h1 {
  font-size: 14px; letter-spacing: 8px;
  color: #0066ff; margin-bottom: 30px; font-weight: 300;
}

.main-image {
  width: 280px; height: 280px; margin: 0 auto 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #99ccff 0%, #f8c3c3 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.names { font-size: 32px; color: #3a3a3a; margin: 20px 0; font-weight: 400; }
.names span { display: inline-block; margin: 0 10px; }
.date { font-size: 16px; color: #f0f0f0; margin: 15px 0; }

/* ===================================================================
   Sections & Common Blocks
   =================================================================== */
.section { padding: 40px 30px; }
.section-title {
  text-align: center;
  font-size: 36px;
  color: #4f7ec8;
  margin-bottom: 25px;
  font-weight: 400;
  font-family: 'titleFont', sans-serif; /* ✅ 추가 */
}

.section-title-ko {
  text-align: center;
  font-size: 24px;
  color: #4f7ec8;
  margin-bottom: 25px;
  font-weight: 400;
  font-family: 'GowoonDodum', sans-serif; /* ✅ 추가 */
}

.d-day{
  margin-top: 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--sky-accent);
  line-height: 1.6;
}

/* 숫자 폭 고정 (흔들림 방지) */
.d-day .dday-days,
.d-day .dday-hh,
.d-day .dday-mm,
.d-day .dday-ss{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.d-day .dday-label{ opacity: .85; margin-right: 2px; }
.d-day .dday-sep  { margin: 0 4px; opacity: .8; }
.d-day .dday-time { font-weight: 800; }
.heart-title{
  display: block;
  margin-bottom: 15px;
}

#accounts + .contact-trigger {
  text-align: center;
  padding: 40px 0;
}

.message { text-align: center; font-size: 15px; line-height: 1.9; color: #6a6a6a; padding: 0 10px; }

/* 썸네일 이미지 채우기 */
.gallery-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: #eee;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 갤러리 전체를 감싸는 컨테이너 */
.gallery-container {
  position: relative;
}

/* 더보기 버튼을 그라데이션 오버레이로 변경 */
.gallery-more {
  /* 기존 스타일 제거 */
  margin: 0;
  text-align: initial;
}

summary.more-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35%; /* 마지막 한 줄을 덮을 높이 */
  cursor: pointer;
  background: linear-gradient(to top, var(--sky-2) 15%, transparent 100%);
  list-style: none; /* Firefox 등에서 마커 제거 */
  text-indent: -9999px; /* 텍스트 숨기기 */
}

summary.more-btn::-webkit-details-marker {
  display: none; /* Safari, Chrome 마커 제거 */
}

/* '더보기' 아이콘 추가 */
summary.more-btn::after {
  content: '더보기';
  text-indent: 0; /* 아이콘 텍스트는 다시 보이게 */
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* 펼쳤을 때 오버레이(summary) 숨기기 */
.gallery-more[open] > summary.more-btn {
  display: none;
}

/* 추가 갤러리 상단 간격을 그리드 갭과 동일하게 조정 */
.gallery--more {
  margin-top: 8px;
}

/* CSS-only Lightbox (iframe) */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10010;
  padding: 0;                      /* ✅ 여백 제거 */
}
.lightbox:target { display: flex; }

/* 프레임을 뷰포트 꽉 채우기 (모바일 대응) */
.lightbox__frame {
  width: 100vw;
  height: 100svh;                  /* ✅ 모바일 주소창 대비 svh */
  max-width: 100vw;
  max-height: 100svh;
  border: 0;
  background: #000;
}

/* 라이트박스 레이아웃 살짝 여백 */
.lightbox {
  padding: 16px; /* 양옆 여백 조금 */
}

/* 좌우 네비 화살표 */
.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10011;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.lightbox__prev { left: max(12px, env(safe-area-inset-left)); }
.lightbox__next { right: max(12px, env(safe-area-inset-right)); }
.lightbox__nav:active { background: rgba(0,0,0,.5); }

/* 프레임 → 이미지로 변경: 카드 폭(컨테이너)과 화면 세로에 맞게 */
.lightbox__img {
  /* 가로: 카드 최대폭(var(--card-max))을 넘지 않되, 화면 좌우 여백(32px) 고려 */
  width: min(var(--card-max), calc(100vw - 32px));
  max-width: 100%;
  height: auto;

  /* 세로: 상단 닫기/네비 여유를 두고 화면 높이 내로 */
  max-height: calc(100svh - 96px);
  object-fit: contain;      /* 이미지 비율 유지 */
  display: block;
  border-radius: 8px;
  background: #000;         /* 로딩 시 배경 */
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

@supports not (height: 100svh) {
  .lightbox__frame { height: 100vh; max-height: 100vh; } /* 폴백 */
}

/* 닫기 버튼 (그대로 사용 가능) */
.lightbox__close {
  position: fixed;
  top: 12px; right: 16px;
  color: #fff;
  text-decoration: none;
  font-size: 32px;
  line-height: 1;
}


/* ===== Info Box (세로형 블록 스타일로 변경) ===== */


.info-box {
  background: var(--sky-2);
  padding: 24px;
  border-radius: 12px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
}

.info-item {
  display: block; /* 수직 쌓이기 */
  border: none;   /* 구분선 제거 */
}

.info-label {
  font-weight: 600;
  font-size: 16px;
  color: #4f7ec8;
  margin-bottom: 8px;
  display: block; /* 줄바꿈 강제 */
}

.info-icon {
  width: 20px;            /* 🔹 아이콘 크기 줄이기 */
  height: 20px;
  object-fit: contain;
  vertical-align: middle; /* 세로 정렬 자연스럽게 */
  opacity: 0.9;           /* 살짝 부드럽게 */
}

.info-value {
  font-size: 15px;
  line-height: 1.7;
  color: #5a5a5a;
  padding-left: 4px;
  white-space: pre-line; /* 개행(\n) 유지 */
}

.subline {
  display: flex;
  align-items: center;
  gap: 10px;                 /* 텍스트–선 간격 */
  margin: 18px 0 18px;       /* 위아래 여백 */
}

.subline-title {
  font: 500 15px/1.2 'GowoonDodum', serif; /* 필요시 14~16px 조절 */
  color: #2b3a4a;
  letter-spacing: 0.5px;
}

.subline::after {
  content: "";
  flex: 1 1 auto;           /* 남은 폭 채움 */
  height: 1px;
  background: linear-gradient(
          90deg,
          var(--sky-3) 0%,
          var(--sky-accent) 100%
  );
  opacity: .6;              /* 너무 진하면 .45~.7 사이로 */
  transform: translateY(0.5px); /* 라인 시각적 중앙 보정 */
  border-radius: 1px;
}


/* ===== 세련된 Parking Info 스타일 ===== */
.location-info {
  position: relative;
  border-radius: 10px;
  padding: 16px 18px;
  color: #445566;
  background: #ffffff;
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact { display: flex; justify-content: space-around; margin: 20px 0; }
.contact-title {  text-align: center;  font-size: 20px;  color: #333;  margin-bottom: 4px; }
.contact-subtitle {  text-align: center;  font-size: 14px;  color: var(--sky-accent); /* 파란색 (#2aa7ff) */  margin-bottom: 16px;  font-weight: 500; }
.contact-item { text-align: center; }
.contact-name { font-size: 14px; color: #5a5a5a; margin-bottom: 10px; }
.contact-buttons { display: flex; gap: 8px; }
.line2{ color: #33a23d; /* 2호선 – 서울 지하철 초록색 */ font-weight: 600; }
.line6 { color: #b5500b; /* 6호선 – 갈색/주황톤 */  font-weight: 600; }
.btn {
  padding: 8px 16px;
  border: 1px solid #9bd4ff;   /* sky 톤으로 보정 */
  background: #fff;
  color: #0b74c1;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: #d8efff; color: #095a94; }

.map-box {
  background: #f5f5f5; height: 250px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #999; margin: 20px 0;
}

.footer { text-align: center; padding: 40px 20px; background: #fafafa; color: #999; font-size: 13px; }

/* ===================================================================
   Reveal / Fade-in on scroll
   =================================================================== */
.fade-in { opacity: 0; transform: translateY(80px); transition: opacity 1s ease-out, transform 1s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===================================================================
   Gallery
   =================================================================== */
.divider { text-align: center; margin: 30px 0; color: #99ccff; font-size: 20px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.gallery-item {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #fde8e8 0%, #99ccff 100%);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}

/* ===================================================================
   Cover (Intro overlay) + Scroll Lock
   =================================================================== */
/* 커버 기본 */
#cover { opacity: 1; transition: opacity 1.2s ease; }

/* 사르르 사라지기 */
#cover.fade-out {
  opacity: 0;
  pointer-events: none;     /* 사라진 뒤 클릭 막힘 */
}

.wedding-title {
  font: 500 15px/1.2 'titleFont', serif; /* 필요시 14~16px 조절 */
  font-size: clamp(28px, 6vw, 64px);
  color: #a0dcff;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(18px);
  /* 한 번만 재생하고 상태 유지 */
  animation: title-seq 8.5s ease-in-out forwards;
}

/* 0~25%: 부드럽게 등장 / 25~85%: 충분히 머무름 / 85~100%: 서서히 사라짐 */
@keyframes title-seq {
  0%   { opacity: 0; transform: translateY(18px); }
  25%  { opacity: 1; transform: translateY(0); }
  85%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* 모션 민감 사용자 배려(선택) */
@media (prefers-reduced-motion: reduce) {
  .wedding-title { animation: none; opacity: 1; transform: none; }
}

@keyframes fadeInWrite {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    text-shadow: 0 0 15px rgba(200, 155, 123, 0.5);
  }
}

.cover{
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--card-max); height: 100svh;
  border-radius: 16px; overflow: hidden;
  background: url('./images/cover.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  animation: coverFadeOut var(--cover-dur) var(--cover-delay) ease-out forwards;
}
@supports not (height: 100svh){ .cover{ height: 100dvh; } }
@keyframes coverFadeOut{ from{ opacity: 1; visibility: visible; } to{ opacity: 0; visibility: hidden; } }
.cover::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 0; }
.cover-content { position: relative; z-index: 1; color: #fff; text-align: center; }
.cover h2 { font-size: 16px; letter-spacing: 10px; color: #0066ff; margin-bottom: 40px; font-weight: 300; }
.cover .cover-names { font-size: 42px; color: #fafafa; margin: 30px 0; font-weight: 400; }
.cover .cover-names span { display: inline-block; margin: 0 15px; }
.cover .cover-date { font-size: 18px; color: #8a8a8a; margin-top: 30px; letter-spacing: 2px; }

html.is-cover-open, body.is-cover-open { overflow: hidden; height: 100%; overscroll-behavior: none; }
body.is-cover-open { position: fixed; inset: 0; width: 100%; }

/* ===================================================================
   Calendar / Location bits
   =================================================================== */
.calendar { text-align: center; margin-bottom: 20px; padding: 0 10px; }
.calendar-header { margin-bottom: 15px; display: flex; justify-content: center; align-items: baseline; }
.calendar-month { font-size: 28px; font-weight: 500; color: #333; margin-left: 10px; }
.calendar-year { font-size: 16px; color: #777; }
.location { font-size: 16px; color: #777; text-align: center; }
.location-sub { font-size: 14px; color: #999; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-name, .day { padding: 8px; font-size: 14px; }
.day-name { font-weight: 500; color: #4f7ec8; }
.day { color: #555; }
.wedding-day { position: relative; color: #555; }
.wedding-day-icon {
  position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: circle(0% at 50% 100%); -webkit-clip-path: circle(0% at 50% 100%);
  animation: reveal-circle 1.5s .5s forwards;
}
@keyframes reveal-circle { to { clip-path: circle(142% at 50% 50%); -webkit-clip-path: circle(142% at 50% 50%); } }

.map-buttons { text-align: center; margin-top: 15px; display: flex; justify-content: center; gap: 10px; }
.map-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; text-decoration: none; }
.btn-icon { width: 20px; height: 20px; }
.parking-info { white-space: pre-wrap; text-align: left; }

.flower-icon { width: 20px; height: 20px; margin-bottom: 2px;}

/* ===== Parents Section (복구) ===== */
.parents-section {  text-align: center;  font-size: 16px;  color: #5a5a5a; }
.parents-info {  display: flex;  justify-content: center;  align-items: center;  margin: 12px 0; }
.parents-info > span,
.parents-info > strong {  margin: 0 4px; /* 요소 사이 여백 */}
.parent-name {  font-weight: 500; }
.dot {  color: #000000;  font-weight: 200; }
.child-relation {  font-size: 15px;  margin-left: 10px; /* 관계 앞 여백 */  color: #6a6a6a; }
.child-name {  font-weight: 700;  font-size: 18px; } 
/* ===================================================================
   Snowfall (Decorative)
   =================================================================== */
.snow-container {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2; overflow: hidden;
}
@keyframes snowfall { 0% { transform: translateY(0); } 100% { transform: translateY(200vh); } }
.snow-container::before,
.snow-container::after {
  content: ''; position: absolute; top: -100vh; left: 0; background: transparent;
  animation: snowfall linear infinite;
}
.snow-container::before {
  width: 1px; height: 1px;
  /* 50개 점 눈송이 (작은 레이어) */
  box-shadow: 185px 186px #fff, 213px 133px #fff, 103px 10px #fff, 333px 352px #fff, 41px 493px #fff, 344px 23px #fff, 156px 452px #fff, 183px 33px #fff, 32px 259px #fff, 45px 138px #fff, 332px 18px #fff, 12px 309px #fff, 25px 499px #fff, 125px 233px #fff, 229px 430px #fff, 342px 329px #fff, 435px 180px #fff, 234px 369px #fff, 335px 471px #fff, 442px 23px #fff, 12px 12px #fff, 42px 322px #fff, 172px 432px #fff, 252px 200px #fff, 312px 122px #fff, 432px 433px #fff, 192px 4px #fff, 82px 183px #fff, 152px 333px #fff, 282px 144px #fff, 352px 44px #fff, 412px 300px #fff, 62px 222px #fff, 132px 42px #fff, 262px 332px #fff, 382px 212px #fff, 482px 492px #fff, 22px 52px #fff, 92px 272px #fff, 142px 482px #fff, 292px 312px #fff, 362px 102px #fff, 452px 242px #fff, 2px 412px #fff, 112px 12px #fff, 242px 222px #fff, 372px 422px #fff, 492px 342px #fff, 322px 42px #fff;
  animation-duration: 25s;
}
.snow-container::after {
  width: 2px; height: 2px;
  /* 50개 점 눈송이 (중간 레이어) */
  box-shadow: 383px 33px #fff, 21px 437px #fff, 159px 403px #fff, 39px 29px #fff, 439px 229px #fff, 133px 179px #fff, 339px 339px #fff, 239px 439px #fff, 49px 159px #fff, 199px 259px #fff, 349px 459px #fff, 49px 109px #fff, 199px 209px #fff, 349px 409px #fff, 499px 119px #fff, 99px 219px #fff, 249px 419px #fff, 399px 129px #fff, 449px 329px #fff, 99px 439px #fff, 29px 149px #fff, 299px 349px #fff, 449px 49px #fff, 99px 159px #fff, 149px 359px #fff, 299px 59px #fff, 399px 259px #fff, 499px 459px #fff, 89px 109px #fff, 189px 309px #fff, 289px 209px #fff, 389px 409px #fff, 489px 119px #fff, 79px 219px #fff, 179px 419px #fff, 279px 129px #fff, 379px 329px #fff, 479px 439px #fff, 19px 49px #fff, 219px 249px #fff, 419px 449px #fff, 19px 199px #fff, 219px 399px #fff, 419px 99px #fff, 119px 299px #fff, 319px 499px #fff, 419px 199px #fff, 119px 499px #fff;
  animation-duration: 15s;
}
/* 커버에서 눈을 즉시 흐르게 */
.snow-container--cover::before { animation-delay: -15s; }
.snow-container--cover::after  { animation-delay: -10s; }

/* ===== Accounts (계좌 안내) ===== */
.account-note{
  text-align: center;
  color: #6a6a6a;
  font-size: 14px;
  margin-bottom: 8px;
}

/* 아코디언 안 계좌 표기 라인 */
.acc-bank{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.bank-line{
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  font-size: 14px;
  color: #334e68;
}

.bank-name{
  grid-column: 2;           /* 은행 배지 */
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef6ff;
  border: 1px solid #cfe8ff;
  color: #2563a8;
  font-weight: 600;
  font-size: 12px;
}

.bank-number{
  grid-column: 2;           /* 배지 바로 뒤 */
  justify-self: start;
  margin-left: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;      /* 110-123-456789 줄바꿈 방지 */
  word-break: keep-all;
}

.bank-holder{
  grid-column: 3;           /* 예금주 */
  justify-self: start;
  color: #637a8f;
  white-space: nowrap;      /* 줄바꿈 방지 */
}

.acc-row--bank .btn-copy{
  grid-column: 4;           /* 복사 버튼은 맨 우측 */
  justify-self: end;
}

/* 복사 버튼 변형 */
.btn-copy{
  white-space: nowrap;
}

.acc-row--bank *{
  overflow-wrap: normal;
  word-break: keep-all;
}

/* 간단 계좌 한 줄형 */
.bank-simple {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 10px;
  text-align: center;
  font-size: 15px;
  color: #334e68;
}

.bank-simple span {
  white-space: nowrap;
}

/* 은행 배지 */
.bank-name {
  background: #eef6ff;
  border: 1px solid #cfe8ff;
  color: #2563a8;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 13px;
}

/* 계좌번호 */
.bank-number {
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* 예금주 이름 */
.bank-holder {
  color: #637a8f;
}

/* 복사 버튼 */
.bank-simple .btn-copy {
  border: 1px solid #9bd4ff;
  background: #fff;
  color: #0b74c1;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  transition: all 0.25s ease;
}
.bank-simple .btn-copy:hover {
  background: #d8efff;
  color: #095a94;
}


@media (max-width: 380px){
  .acc-row--bank{
    grid-template-columns: 62px 1fr auto; /* [라벨][은행/번호][복사] */
    gap: 8px 10px;
  }
  .bank-name{ grid-column: 2; }
  .bank-number{ grid-column: 2; margin-left: 6px; }
  .bank-holder{
    grid-column: 2 / 4;     /* 아래 줄로 내려와 전체 폭 사용 */
    justify-self: start;
    margin-top: 2px;
  }
}

/* 토스트 */
#toast{
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  z-index: 10020;
  transition: opacity .25s ease, transform .25s ease;
}
#toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}



/* ===================================================================
   Modal (Centered) + Tabs + Accordion
   =================================================================== */

/* 모달 백드롭: 가운데 정렬 컨테이너 */
.modal {
  display: none;                 /* 기본 숨김 */
  position: fixed; inset: 0;
  z-index: 10003;                /* BGM 버튼보다 위 */
  background: rgba(0,0,0,.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;           /* 중앙 정렬(수직) */
  justify-content: center;       /* 중앙 정렬(수평) */
  padding: max(16px, env(safe-area-inset-top))
  max(16px, env(safe-area-inset-right))
  max(16px, env(safe-area-inset-bottom))
  max(16px, env(safe-area-inset-left));
}
.modal.is-open { display: flex; } /* JS가 .is-open 토글 */

/* 실제 팝업 박스 */
.modal-content {
  background: #fefefe;
  width: min(400px, 90vw);
  max-height: min(80vh, 680px);
  overflow: auto;
  padding: 24px;
  border-radius: 12px;
  position: relative;

  /* 뜨는 애니메이션 (사용자 환경설정에 따라 축소) */
  transform: translateY(6px) scale(0.98);
  opacity: 0;
  animation: pop-in 0.28s ease-out forwards;
}
@keyframes pop-in { to { transform: translateY(0) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .modal-content { animation: none; opacity: 1; transform: none; }
}

/* 닫기 버튼은 탭보다 한 단계 위 */
.close-button {
  position: absolute; right: 12px; top: 10px;
  z-index: 11;
  color: #aaa; font-size: 28px; font-weight: bold; line-height: 1;
  background: transparent; border: 0; cursor: pointer;
}
.close-button:hover, .close-button:focus { color: #000; }

/* Tabs (신랑측 / 신부측) */
.tabs {
  position: sticky; top: 0; z-index: 10;   /* 항상 클릭 가능하게 탭을 최상단에 */
  background: #fff;                        /* 스크롤 시 탭 뒤 내용 가림 방지 */
  display: grid; grid-auto-flow: column; gap: 8px;
  margin: 10px 0 14px;
}
.tab {
  appearance: none;
  border: 1px solid #cfe8ff;
  background: #f3faff;
  color: #2563a8;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}
.tab[aria-selected="true"] { background: var(--sky-accent); border-color: var(--sky-accent); color: #fff; }
.tab:focus-visible { outline: 2px solid #87c7ff; outline-offset: 2px; }

/* Tab panels: .active만 보이게 */
.tab-panel { display: block; }
.tab-panel:not(.active), .tab-panel[hidden] { display: none !important; }

/* Accordion */
.accordion { display: grid; gap: 10px; margin-top: 8px; }

.acc-item {
  border: 1px solid #e8f2ff;
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}

.btn-call {
  background: #2aa7ff;      /* 하늘색 배경 */
  color: #fff;              /* 흰 글씨 */
  border-color: #2aa7ff;
  text-decoration: none;
}

.btn-message {
  background: #fff;      /* 하늘색 배경 */
  color: #000;              /* 흰 글씨 */
  border-color: #2aa7ff;
  text-decoration: none;
  
}

.btn-call:hover {
  background: #0773d3;      /* hover 시 조금 진한 톤 */
  border-color: #0773d3;
  text-decoration: none;
}
.btn-message:hover {
  background: #98c8f8;      /* hover 시 조금 진한 톤 */
  border-color: #1c7fd6;
  text-decoration: none;
}

/* ===== 아코디언 인물 표기 ===== */
.acc-person {
  display: flex;
  align-items: baseline;
  gap: 6px;                  /* 이름과 역할 사이 여백 */
}

.acc-person-name {
  font-size: 16px;
  font-weight: 600;
  color: #334e68;
}

.acc-person-role {
  font-size: 13px;
  color: #9ab3c9;
  font-weight: 400;
}

/* summary 버튼(헤더) */
.acc-summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px;
  user-select: none;
}

.acc-summary::-webkit-details-marker { display: none; } /* 기본 삼각형 제거 */
.acc-summary:hover { background: #f3faff; }
.acc-summary:focus-visible { outline: 2px solid #87c7ff; outline-offset: 2px; border-radius: 6px; }

.acc-name { font-size: 15px; color: #334e68; }
.acc-caret { transition: transform .2s ease; color: #7aa9d6; font-size: 16px; }
.acc-item[open] .acc-caret { transform: rotate(180deg); }
.acc-item[open] .acc-summary { background: #f3faff; }
.acc-item[open] .acc-panel { max-height: none !important; }

.acc-row--bank{
  display: grid;
  grid-template-columns: 72px auto 1fr auto; /* [계좌 라벨][은행/번호][예금주][복사] */
  align-items: center;
  gap: 10px 14px;
}

.acc-row--bank .acc-bank{ display: contents; }
.acc-row--bank .bank-line{ display: contents; }  /* bank-name / number / holder를 직접 grid 자식으로 */


/* 패널 (슬라이드 애니메이션을 위한 기본값)
   - 실제 열림/닫힘 시 JS가 max-height: 0 <-> scrollHeight px 또는 none 으로 전환 */
.acc-panel {
  position: relative; z-index: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s ease;
  will-change: max-height;
}

/* 패널 내 행 */
.acc-row {
  display: grid; grid-template-columns: 80px 1fr;
  align-items: center; gap: 10px;
  padding: 12px 14px 14px;       /* 패널 내부 여백 */
  border-top: 1px solid #e3f0ff; /* summary와 패널 구분선 */
}
.acc-label { font-size: 13px; color: #6d8dad; }
.acc-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ===== D-Day: 기존 마크업 유지 + 카드형 4칸 ===== */
#dDay{
  margin-top: 20px;
  text-align: center;
  color: #334e68;
}

/* 라벨은 한 줄 위에 */
#dDay .dday-label{
  display: block;
  margin-bottom: 10px;
  color: var(--sky-accent);
  font-weight: 600;
  font-size: 15px;
}

/* "일" 구분자 숨김 (카드에 단위 출력할거라) */
#dDay .dday-sep{ display: none; }

/* 시/분/초 뒤의 일반 텍스트(‘시간’, ‘분’, ‘초 남았어요!’) 숨기기용:
   컨테이너만 font-size:0으로 만들고, 자식 span에만 폰트 재지정 */
#dDay .dday-time{
  display: inline-flex;
  gap: 10px;
  font-size: 0;                /* 텍스트노드 숨김 */
  align-items: stretch;
}

/* 숫자 카드 공통 */
#dDay .dday-days,
#dDay .dday-hh,
#dDay .dday-mm,
#dDay .dday-ss{
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 62px;
  padding: 10px 12px;
  margin: 0 5px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  font-size: 20px;             /* 자식 span만 다시 보이도록 */
  font-weight: 700;
  color: #2aa7ff;
  font-variant-numeric: tabular-nums;
}

/* 각 카드 하단 단위 라벨 */
#dDay .dday-days::after{
  content: "일";
  margin-top: 2px;
  font-size: 12px; color: #6a7a89; font-weight: 500;
}
#dDay .dday-hh::after{
  content: "시간";
  margin-top: 2px;
  font-size: 12px; color: #6a7a89; font-weight: 500;
}
#dDay .dday-mm::after{
  content: "분";
  margin-top: 2px;
  font-size: 12px; color: #6a7a89; font-weight: 500;
}
#dDay .dday-ss::after{
  content: "초";
  margin-top: 2px;
  font-size: 12px; color: #6a7a89; font-weight: 500;
}

/* 작은 화면 최적화 */
@media (max-width: 380px){
  #dDay .dday-days,
  #dDay .dday-hh,
  #dDay .dday-mm,
  #dDay .dday-ss{
    min-width: 54px;
    padding: 8px 10px;
    font-size: 18px;
  }
  #dDay .dday-time{ gap: 8px; }
}

/* 숫자 줄 전체에서 인라인 공백 제거 */
#dDay{
  font-size: 0; /* .dday-label은 아래에서 다시 폰트 크기 지정 */
}

/* 라벨은 원래 크기로 */
#dDay .dday-label{
  display: block;
  margin-bottom: 10px;
  font-size: 15px;         /* 리셋 */
  color: var(--sky-accent);
  font-weight: 600;
}

/* '일' 카드와 '시/분/초' 묶음의 간격을 gap과 동일하게 */
#dDay .dday-time{
  display: inline-flex;
  align-items: stretch;
  gap: 5px;               /* 카드 간 간격 */
  font-size: 0;            /* 내부 텍스트(시간/분/초/남았어요) 숨김 유지 */
}

/* 카드들: margin 제거하고 gap만 사용 */
#dDay .dday-days,
#dDay .dday-hh,
#dDay .dday-mm,
#dDay .dday-ss{
  margin: 0;               /* ✅ 기존 margin: 0 5px; 제거 */
}

/* '일' 카드 오른쪽 간격을 gap과 동일하게 맞춤 */
#dDay .dday-days{
  display: inline-flex;
  margin-right: 10px;      /* ✅ .dday-time의 gap과 동일한 값 */
}

#kakaoShare {
  display: block;
  margin: 0 auto;
}

.thankyou-message {
  position: fixed;
  bottom: 80px; /* 버튼 위로 띄우기 */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  z-index: 999;
}

/* 텍스트 선택/롱프레스 메뉴/탭 하이라이트 제거 */
html, body {
  -webkit-touch-callout: none;  /* iOS 길게 눌러 저장/복사 메뉴 차단 */
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;    /* 상하단 바운스/뒤로가기 제스처 억제 약간 도움 */
}

/* 더블탭 확대 방지에 도움(클릭 요소) */
button, a, [role="button"] {
  touch-action: manipulation;
}

/* 이미지/아이콘 드래그 방지 */
img, svg, a img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* 필요시: 이미지 길게 눌러 저장 막고 싶으면 */
img {
  -webkit-touch-callout: none;
}

/* (선택) 전체 페이지 스와이프만 허용하고 핀치 제한 강화하고 싶을 때
 * 너무 강하면 스크롤도 막히므로 기본값은 비권장
 * body { touch-action: pan-y; } 
 */