:root {
  /* Primary (기존 main 계열 대체) */
  --main: #999999;        /* 메인 버튼 / 핵심 액션 */
  --main-soft: #EEEEEE;   /* 서브 버튼 / hover 배경 */
  --main-dark: #777777;   /* active / 강조 (999 기반) */

  /* Gray System */
  --gray-bg: #F2F2F2;     /* 전체 배경 */
  --gray-line: var(--gray-line);DDD;   /* 구분선 유지 */

  /* Text */
  --text-main: #111111;   /* 본문 */
  --text-sub: #666666;    /* 설명 / 보조 */
}


/* [수정] 여백 및 스크롤 문제 해결을 위한 최상단 보정 */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden; /* 가로 스크롤/여백 방지 */
    overflow-y: auto;   /* 세로 스크롤 허용 */
   
    -webkit-user-drag: none;
    
    font-family: 'Pretendard';

}



img {
    -webkit-touch-callout: none;
    user-select: none;
}

/* ===== 팝업 전체 (원본 유지) ===== */
.attendIp_pop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.attendIp_pop .bottom_pop {
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: 100px;
}

.attendIp_pop .btn_close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
}

.attendIp_pop .title h2 {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ===== 탭 (원본 유지) ===== */
.attendIp_pop .tab_menu {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.attendIp_pop .tab_btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: none;
    font-size: 15px;
    color: #999;
}

.attendIp_pop .tab_btn.active {
    color: var(--text-main);
    font-weight: 600;
    border-bottom: 2px solid var(--main);;
}

/* ===== 폼 (원본 유지) ===== */
.attendIp_pop .form_list ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.attendIp_pop .form_list li span {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
}

.attendIp_pop .inp {
    width: 100%;
    height: 44px;
    border: 1px solid var(--gray-line);;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    box-sizing: border-box;
}

.attendIp_pop .inp:focus {
    outline: none;
    border-color: var(--main);;
}

/* ===== 버튼 그룹 (원본 유지) ===== */
.attendIp_pop .btn_box {
    display: flex;
    gap: 8px;
}

.attendIp_pop .btn_box .btn {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--gray-line);;
    background: #f9f9f9;
    font-size: 13px;
}

.attendIp_pop .btn_box .btn.active {
    background: var(--main);
    border-color: var(--main);;
    color: #fff;
}

.attendIp_pop .example {
    margin-top: 20px;
    padding: 14px;
    background: var(--gray-bg);;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.5;
}

/* ===== 하단 고정 버튼 (원본 유지) ===== */
.attendIp_pop .bottom_box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px;
    border-top: 1px solid #eee;
}

.attendIp_pop .bottom_box .btn {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
}

.attendIp_pop .btn.purple {
    background: var(--main);
    color: #fff;
}

.spot-section {
  min-height: 245px;
  background: var(--main);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.spot-icon { margin-bottom: 20px; }
.spot-title { font-size: 28px; color: #fff; }
.spot-text p { margin-top: 10px; }

.spot-btn {
  margin-top :20px;
  width: 100%;
  max-width: 320px;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: #fff;
  color : #333;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}

.spot-btn:hover { filter: brightness(95%); }
.spot-btn:active { transform: scale(0.98); }

.rsvp-section {
  min-height: 120px;
  text-align: center;
  color: var(--text-main);
}

.rsvp-icon { margin-bottom: 20px; }
.rsvp-title {
  font-size: 36px;
  letter-spacing: .15em;
  margin-bottom: 24px;
  opacity: .9;
}

.rsvp-desc p { margin-top: 8px; }
.rsvp-desc .sub { opacity: .5; white-space: pre-wrap; }

.rsvp-card {
  padding: 32px;
  border-radius: 8px;
  background: #var(--main-soft);;
}

.rsvp-names {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.rsvp-names .heart { color: #444; }
.rsvp-line { height: 1px; background: #D6ECEA; margin: 24px 0; }
.rsvp-info { color: var(--text-sub); }
.rsvp-info p { margin-top: 6px; }
.rsvp-info .place { padding: 16px 0; word-break: keep-all; }

.rsvp-btn {
  width: 100%;
  height: 48px;
  background: var(--main);
  color: #fff;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  margin-top : 25px;
}

.rsvp-btn:hover { filter: brightness(95%); }
.rsvp-btn:active { transform: scale(0.98); }

.location-section { text-align: center; }
.location-title { font-size: 28px; letter-spacing: .15em; margin-bottom: 32px; color: var(--text-main); }
.location-card { border-radius: 14px; padding: 28px 22px 32px; }
.hall-name { font-size: 18px; font-weight: 600; }
.hall-name span { font-size: 14px; opacity: .6; margin-left: 6px; }
.address { margin-top: 10px; color: var(--text-sub); line-height: 1.4; }
.tel { margin-top: 6px; color: var(--text-sub); }

.map-wrap {
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

.map-wrap iframe { width: 100%; height: 260px; border: 0; }
.location-buttons { display: flex; gap: 10px; margin-top: 20px; }
.location-buttons a { flex: 1; height: 44px; line-height: 44px; border-radius: 10px; background: var(--main); color: #fff; text-decoration: none; font-size: 14px; }
.nav-buttons { display: flex; gap: 8px; margin-top: 16px; }
.nav-buttons a { flex: 1; height: 38px; line-height: 38px; border-radius: 8px; background: #var(--main-soft);; color: #444; font-size: 13px; text-decoration: none; }

.wdx-wrap { background: #f8f8f8; width: 100%; border-radius: 0; }
.wdx-inner { max-width: 420px; margin: 0 auto; padding: 30px 24px; text-align: center; }
.wdx-title { font-size:32px; letter-spacing:0.2em; margin-bottom:20px; font-weight:400; }
.wdx-date-main { font-size:15px; margin-bottom:6px; }
.wdx-date-sub { font-size:13px; color:#999; margin-bottom:30px; }
.wdx-calendar { margin:30px 0; }
.wdx-cal-header, .wdx-cal-body { display:grid; grid-template-columns:repeat(7,1fr); gap:14px; font-size:14px; }
.wdx-cal-header { margin-bottom:12px; }
.wdx-sun { color:#e74c3c; }
.wdx-cal-body div { height:30px; line-height:30px; color:#555; }
.wdx-today { background:var(--main);; color:#fff !important; border-radius:999px; }
.wdx-dday { margin-top:30px; font-size:14px; }
.wdx-dday span { color:var(--main);; font-weight:600; }

.bgm-wrap { position: sticky; top: 12px; z-index: 50; display: flex; justify-content: center; }
.bgm-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; cursor: pointer; }
.bgm-toast { position: absolute; top: -36px; padding: 6px 14px; font-size: 12px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; opacity: 0; transform: translateY(-10px); transition: all .4s ease; white-space: nowrap; }
.bgm-toast.show { opacity: 1; transform: translateY(0); }

/* ===== 커버 영역 (원본 유지) ===== */
.wedding-cover {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

section, .wedding-cover, .main-visual {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


.wedding-cover-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.wedding-cover-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

.wedding-cover-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.wedding-cover-top {
    position: absolute;
    top: 50px;
    left: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 10;
}

.wedding-cover-message {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 2.5rem;
    font-family: serif;
    text-shadow: 0 0 15px rgba(0,0,0,0.5);
    z-index: 10;
}

.wedding-cover-names {
    position: absolute;
    bottom: 50px;
    left: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    box-sizing: border-box;
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 10;
}

/* [수정] invite-card: 너비 보정 및 여백 제거 */
.invite-card {
    position: relative;
    max-width: 400px;
    width: 100%;
    margin: 0 auto; /* 가로 여백 방지 */
    background: #fff;
    box-shadow: 0 20px 25px rgba(0,0,0,0.15);
    min-height: 100vh;
    font-size: 0.95em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden; /* 내부 요소가 밖으로 나가지 않게 함 */
}

.invite-bg { background: var(--main); }

/* ===== 갤러리 (원본 유지) ===== */
.wdx-gallery { padding: 3px 20px; background: #fff; text-align: center; }
.wdx-gallery-title { font-size: 32px; letter-spacing: 0.25em; margin-bottom: 40px; color: var(--text-main); font-family: 'Pretendard','Apple SD Gothic Neo',sans-serif; }
.wdx-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; max-width: 420px; margin: 0 auto; }
.wdx-gallery-item { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #eee; }
.wdx-gallery-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    cursor: zoom-out;
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 500px;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    animation: zoom 0.3s;
}

@keyframes zoom { from {transform: translateY(-50%) scale(0)} to {transform: translateY(-50%) scale(1)} }
.close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; }

/* ===== RSVP 팝업 (원본 유지) ===== */
.pop_wrap.attend_pop {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    justify-content: center;
    align-items: flex-end;
}

.bottom_pop.rsvp {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 30px 20px 20px;
    position: relative;
    box-sizing: border-box;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.btn_close { position: absolute; top: 15px; right: 15px; background: none; border: none; cursor: pointer; }
.btn_close img { width: 24px; opacity: 0.5; }
.rsvp .title h2 { font-size: 20px; color: #333; text-align: center; margin-bottom: 20px; font-weight: 700; }
.rsvp .contents .txt { text-align: center; line-height: 1.6; color: var(--text-sub); font-size: 14px; margin-bottom: 25px; }
.rsvp .list { background: #f9f9f9; border-radius: 12px; padding: 20px; margin-bottom: 25px; }
.rsvp .list ul { list-style: none; padding: 0; margin: 0; }
.rsvp .list li { display: flex; margin-bottom: 12px; font-size: 14px; }
.rsvp .list li span { width: 70px; color: #999; font-weight: 500; }
.rsvp .list li p { flex: 1; color: #333; margin: 0; }

.btn.purple {
    width: 100%; height: 54px;
    background: var(--main);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.rsvp .close { display: flex; justify-content: center; gap: 20px; }
.rsvp .close a { font-size: 13px; color: #bbb; text-decoration: none; border-bottom: 1px solid #eee; padding-bottom: 2px; }

.rsvp_form_area { padding: 15px 0; display: flex; flex-direction: column; gap: 12px; }
.rsvp_form_area input {
    width: 100%; height: 50px; padding: 0 15px;
    border: 1px solid #e0e0e0; border-radius: 8px; font-size: 15px;
    background-color: #fdfdfd; box-sizing: border-box; transition: all 0.3s ease;
    outline: none; -webkit-appearance: none;
}

.rsvp_form_area input:focus { border-color: #8e7dbe; background-color: #fff; box-shadow: 0 0 5px rgba(142, 125, 190, 0.2); }
.side_btn { text-align: center; padding: 12px; border: 1px solid #eee; border-radius: 8px; background: #f9f9f9; color: #999; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.side_btn.active { border-color: #8e7dbe; background: #f4f2fa; color: #8e7dbe; font-weight: bold; }

/* ===== 모달 보정 (중앙 정렬) ===== */
#imageModal {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0,0,0,0.95); 
    z-index: 1000000; /* 최상단 */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    touch-action: none; /* 브라우저 기본 스크롤 방지 */
}

#modalImg {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.2s ease-out; /* 전환 시 미세한 효과 */
}

.modal_counter {
    margin-top: 20px;
    color: #fff;
    font-size: 14px;
}
.modal_close { position: absolute; top: 10%; right: 5%; color: white; font-size: 40px; cursor: pointer; }

/* [수정] 메인 비주얼: 여백 제거 및 스크롤 고정 해제 */
.main-visual {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    z-index: 1;
}

.visual-bg, .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.slide { opacity: 0; transition: opacity 1.2s ease-in-out; z-index: 1; }
.slide.active { opacity: 1; z-index: 2; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

/* [수정] 텍스트 레이어: 스크롤 방해 금지 추가 */
.visual-text {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px 30px;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    pointer-events: none; /* 이 코드가 없으면 모바일에서 터치가 텍스트에 막혀 스크롤이 안 됩니다 */
}

.top-row { display: flex; justify-content: space-between; font-size: 1.1rem; }
.mid-row { text-align: center; font-size: 2.5rem; font-family: serif; margin-top: 20vh; }
.bottom-row { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: bold; }

.wedding-intro-text {
    padding: 50px 20px;
    text-align: center;
    /* 1. 따뜻하고 부드러운 베이지/아이보리 배경색 */
    background-color: #f9f7f2; 
    position: relative;
    overflow: hidden;
}


.intro-inner {
    position: relative;
    z-index: 1; /* 글자가 하이라이트보다 위에 오도록 */
    max-width: 320px;
    margin: 0 auto;
}


.intro-inner2 {
    z-index: 1; /* 글자가 하이라이트보다 위에 오도록 */
    max-width: 320px;
    border-radius: 25px;
    border: none;
  background: #EEEEEE;
  padding: 30px 35px;
    margin: 0 auto;
}

.intro-paragraph {
    line-height: 1.6;  /* 줄간격을 더 넉넉하게 */
    color: #333;       /* 글자색을 더 진하게 하여 대비 상승 */
    margin: 0;
    word-break: keep-all;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5); /* 글자 뒤 미세한 광택 */
}

.intro-flower {
    color: #b59d82;    /* 배경과 어울리는 차분한 브라운 톤 */
    font-size: 1.3rem;
    letter-spacing: 5px;
}

.main-visual .slide {
    cursor: pointer;
}

/* 확대 모달이 열렸을 때 메인 슬라이드가 위에 보이지 않도록 z-index 확인 */
#imageModal {
    z-index: 999999;
}

/* 두 모달 공통 스타일 */
#imageModal, #imageModal2 {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    touch-action: none; /* 스크롤 방지 */
}

#modalImg, #modalImg2 {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

/* 부모님 정보 섹션 */
.family-info {
    padding: 10px 0 20px 0;
    text-align: center;
}

.family-row {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #444;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.family-row:last-child {
    margin-bottom: 0;
}

.parents {
    font-weight: 500;
    color: #333;
}

.relation {
	margin: 0 3px 0 -5px;
    font-size: 0.85rem;
    color: #888;
}

.groom-name, .bride-name {
    font-weight: 600;
    color: #000;
    font-size: 1.05rem;
}

/* 기존 rsvp-line 간격 조정 */
.rsvp-line {
    width: 100%;
    height: 1px;
    background-color: #eee;
    margin: 20px 0;
}


.rsvp-info {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* D-Day 뱃지 스타일 */
.rsvp-dday-badge {
    background: #fdf2f2; /* 연한 핑크/베이지 */
    color: #e88b8b;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.info-item p {
    margin: 0;
    font-size: 1.05rem;
    color: #333;
    letter-spacing: -0.5px;
}

.info-item .place {
    font-weight: 600;
}

/* 보조 버튼 스타일 */
.rsvp-sub-btns {
    display: flex;
    gap: 10px;
    margin: 15px 0 25px 0;
}

.rsvp-sub-btns button {
    background: none;
    border: 1px solid var(--gray-line);;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: var(--text-sub);
    cursor: pointer;
}

/* 공유 섹션 */
.share-section {
    padding: 40px 20px;
    background: #fff;
}

.share-card {
    max-width: 360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    border: none;
    padding: 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn.kakao {
    background: #FCE777;
    color: #222;
}

.share-btn.copy {
    background: #999;
    color: #fff;
}

.share-btn:hover {
    filter: brightness(96%);
}

.share-btn:active {
    transform: scale(0.98);
}
