/* 기본 확대 방지 CSS */
/* === 공통 설정 === */
/*프리텐다드 폰트*/

:root { --vh: 1vh; }

/* 기본 확대 방지 + 터치 하이라이트 제거 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* 전체 페이지 설정 */
html, body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #250601;
  background: #e9e7e1;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* 상단 Wedding Invitation 글자 */
body::before {
    content: "Wedding Invitation 11 / 09";
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 300;
    color: rgba(37, 6, 1, 0.3);
    letter-spacing: 1px;
    z-index: 1000;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    width: max-content;
    padding: 6px 16px;
    background: rgba(233, 231, 225, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 20px;
}

/* 이미지 확대/드래그/길게누르기 방지 */
img {
  width: 100%;
  max-width: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* 라이트박스나 갤러리 이미지에선 예외 허용 */
.insta-gallery img {
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-drag: auto !important;
    touch-action: manipulation;
}

/* 오른쪽 클릭 방지 */
body, img, div, section {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 모바일 터치 하이라이트 제거 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 페이지 공통 스타일 */
.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(var(--vh) * 100);
    overflow: hidden;
    will-change: transform;
    transform: translateZ(0);
}

.page-inner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap; /* 줄바꿈 금지 */
}

.page-inner img {
    width: 100%;
    object-fit: cover;
    }

.section-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

:root {
  --vh: 100%;
}

/* 타이틀 아이콘 */
.section-title .title-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ------------- Page 0: 메인 페이지 ------------- */
.page0 {
    background-image: url('images/page0-background-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    flex-direction: column;
    text-align: center;
    position: relative;
}

.border-outer {
    width: 90%;
    max-width: 500px;
    aspect-ratio: 825 / 1100;
    border: 0.95px solid rgb(0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 60px auto 30px;
    box-sizing: border-box;
}

.border-inner {
    width: 94%;
    aspect-ratio: 700 / 950;
    border: 0.95px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

@keyframes fadeImageIn {
    0% {
        opacity: 0;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.page0-name {
    font-size: 1.3rem;
    color: #333;
    line-height: 1.4;
    font-family: 'Pretendard', sans-serif;
    font-weight: 100;
    word-break: keep-all;
    white-space: normal;
    letter-spacing: 5px;
}

.page0-name .amp {
    font-family: "Grandiflora One", sans-serif;
    font-weight: 300;
    font-size: 1.3rem;
}

/* ------------- Page 1: 결혼 날 ------------- */
.page1 {
    background-image: url('images/page1-background.jpg');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 190%;
    background-color: #e9e7e1;
    background-attachment: scroll;
    height: 90vh;
    height: calc(var(--vh, 1vh) * 90);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page1-inner {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.page1-inner.show {
    opacity: 1;
    transform: translateY(0);
}

.wedding-notice {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 1.5s ease, transform 1.5s ease;
    font-size: 1.7rem;
    font-weight: 300;
    color: #250601;
    text-align: center;
    letter-spacing: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.15);
    margin-bottom: 300px;
}

.wedding-notice.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wedding-date {
    font-size: 0.9rem;
    font-weight: 300;
    color: #250601;
    text-align: center;
    margin-top: 20px;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease 0.5s, transform 1.5s ease 0.5s;
}

.page1-inner.show .wedding-date {
    opacity: 1;
    transform: translateY(0);
}

/* ------------- Page 2: 인사말 및 가족 소개 ------------- */
.page2 {
    background: #e9e7e1;
    height: 80vh;
    height: calc(var(--vh, 1vh) * 80);
    display: flex;
    align-items: center;
    justify-content: center;
}

.greeting {
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: #250601;
    margin-bottom: 80px;
    white-space: nowrap;

}

.family-block {
    background: #e9e7e1;
    padding: 20px 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.family-line {
    margin: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transform: translateX(-17px);
    white-space: nowrap;
}

.prefix {
    width: 30px;
    font-size: 0.8rem;
    color: #250601;
}

.main-line {
    display: flex;
    align-items: center;
    gap: 5px;
}

.parents {
    font-size: 1rem;
    font-weight: 400;
}

.relation {
    font-size: 0.8rem;
    color: #666;
}

/* ------------- Page 3: 캘린더 ------------- */
.page3 {
    background: #250601;
    height: 80vh;
    height: calc(var(--vh, 1vh) * 80);
    display: flex;
    align-items: center;
    flex-direction: center;
    justify-content: center;
    padding: 30px 20px;
    color: #f8f6f1;
}

.page3 .page-inner {
    max-width: 340px;
    width: 100%;
}

.calendar-container {
    width: 100%;
}

.calendar-header {
    text-align: center;
    margin-bottom: 40px;
}

.month-year {
    font-size: 1.5rem;
    font-weight: 300;
    color: #f8f6f1;
    margin-bottom: 8px;
    letter-spacing: 1px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
}

.calendar th,
.calendar td {
    width: 14.28%;
    height: 42px;
    text-align: center;
    vertical-align: middle;
}

.calendar th {
    font-weight: 400;
    color: #f8f6f1;
    font-size: 0.8rem;
    opacity: 0.7;
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.calendar td {
    font-size: 0.9rem;
    color: #f8f6f1;
    font-weight: 300;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: default;
}

.other-month {
    color: #f8f6f1;
    opacity: 0.3;
}

.wedding-day {
    background: #4a2c1d;
    color: #f8f6f1;
    font-weight: 500;
    border: 1px solid #6b4429;
}

.wedding-details {
    text-align: center;
    margin-top: 60px;
    letter-spacing: 2px;
}

.wedding-details h3 {
    font-size: 1rem;
    font-weight: 400;
    color: #f8f6f1;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.wedding-details p {
    font-size: 0.85rem;
    color: #f8f6f1;
    opacity: 0.8;
    font-weight: 300;
    margin: 2px 0;
}

.highlight-date {
    color: #c4c2b9;
    font-weight: 350;
    letter-spacing: 2px;
}

.calendar-description {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 480px) {
    .page3 .page-inner {
        max-width: 300px;
    }

    .month-year {
        font-size: 1.3rem;
    }

    .calendar th,
    .calendar td {
        height: 38px;
        font-size: 0.8rem;
    }
}

/* ------------- Page 4: 오시는 길 ------------- */
.page4 {
    width: 100%;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: #f2f0ed;
}

.page4-wrapper {
    max-width: 800px;
    width: 100%;
    position: relative;
}

.page4 .section-title {
    font-size: 1.3rem;
    font-weight: 300;
    text-align: center;
    color: #250601;
    margin: 20px 0 30px 0;
    letter-spacing: 2px;
    position: relative;
}

.wedding-info {
    text-align: center;
    font-size: 0.9rem;
    color: #250601;
    margin: 0 20px 30px 20px;
    line-height: 1.8;
    font-weight: 300;
    position: relative;
    letter-spacing: 0.5px;
    padding: 30px 0;
}

.wedding-info::before,
.wedding-info::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: #d4d2cf;
}

.wedding-info::before {
    top: 0;
}

.wedding-info::after {
    bottom: 0;
}

.map-container {
    margin: 0 auto 30px auto;
    border: 1px solid #250601;
    position: relative;
}

#map {
    width: 100%;
    height: 400px;
    filter: grayscale(30%);
}

.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: #fff;
    color: #250601;
    font-size: 1rem;
    font-weight: 300;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-top: 1px solid #250601;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.route-section {
    padding: 0px 0;
}

.route-btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.route-btn {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #250601;
    background: #fff;
    color: #250601;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.route-btn:hover {
    background: #e4d3be;
    color: #250601;
}

.route-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #e4d3becd;
    transition: left 0.3s ease;
    z-index: 0;
}

.route-btn:hover::before {
    left: 0;
}

.route-btn span {
    position: relative;
    z-index: 1;
}

.bus-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 30px 20px;
    max-width: 100%;
    margin: 0 auto;
}

.bus-info h3 {
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

.bus-info p {
    margin: 8px;
    text-align: center;
    font-weight: 300;
    font-size: 0.9rem;
    word-break: keep-all;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .page4 .page-inner {
        padding: 30px 16px;
    }

    .page4 .section-title {
        font-size: 1.7rem;
        margin: 20px 0 20px 0;
        letter-spacing: 1px;
    }

    .wedding-info,
    .map-container,
    .route-section {
        margin-left: 10px;
        margin-right: 10px;
    }

    #map {
        height: 300px;
    }

    .route-btn-group {
        gap: 12px;
    }

    .route-btn {
        padding: 10px 15px;
        font-size: 0.75rem;
    }

    .bus-info {
        padding: 25px 15px;
    }

    .bus-info p {
        white-space: normal;
        letter-spacing: 0.5px;
    }
}

/* ------------- Page 5: 갤러리 ------------- */
.page5 {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f0ed;
}

.page5 .page-inner {
    max-width: 400px;
}

.section-title5 {
    font-weight: 100;
    font-size: 1.6rem;
    margin-bottom: 40px;
    text-align: center;
    font-family: 'Pretendard', sans-serif;
    letter-spacing: 3px;
}

.insta-gallery {
    display: grid;
    grid-template-columns: repeat(2, 150px);
    grid-template-rows: repeat(3, 150px);
    gap: 5px;
    touch-action: pan-y;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.insta-gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #250601;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: auto !important;
    user-select: auto !important;
    -webkit-user-drag: auto !important;
    touch-action: manipulation;
}

/* 라이트박스 전체 */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* 라이트박스 안 이미지 */
.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid #250601;
}

.lightbox.show {
    display: flex;
}

/* 닫기 버튼 */
.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 1.3rem;
    color: #250601;
    cursor: pointer;
    font-weight: 300;
    z-index: 1010;
}

@media (max-width: 480px) {
    .insta-gallery {
        grid-template-columns: repeat(2, 1frpx);
        grid-auto-rows: 1fr;
        gap: 5px;
        max-width: 320px;
        margin: 0 auto; }

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


/* ------------- Page 6: 마음 전할 곳 ------------- */
.page6 {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f2f0ed;
}

.page6 .page-inner {
    max-width: 400px;
    width: 100%;
}

.page6-wrapper {
    background: white;
    border-radius: 10px;
    padding: 48px 32px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    width: 100%;
}

.page6 .section-title {
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Pretendard', sans-serif;
    color: #250601;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.page6-note {
    text-align: center;
    color: #250601ca;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 300;
}

.account-box {
    border: 1px solid #c4c2b9;
    border-radius: 5px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.account-box:hover {
    border-color: #c4c2b9;
}

.page6-name {
    padding: 20px 50px 20px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #250601;
    cursor: pointer;
    display: block;
    text-align: center;
    position: relative;
    transition: background-color 0.2s ease;
}

.page6-name:hover {
    background-color: #f9fafb;
}

.page6-name::after {
    content: '+';
    font-size: 18px;
    color: #c4c2b9;
    transition: transform 0.2s ease;
    font-weight: 300;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.page6-name.active::after {
    transform: translateY(-50%) rotate(45deg);
}

.account-info {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f5f3f1;
    border-top: 1px solid #f5f3f1;
}

.account-info.active {
    max-height: 90px;
    padding: 15px;
}

.account-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.account-number {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    color: #1f2937;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.copy-btn {
    background-color: #250601;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
    min-width: 60px;
    box-shadow: 0 2px 4px rgba(37, 6, 1, 0.2);
}

.copy-btn:hover {
    background-color: #1a0400;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #1f2937;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
    .page6 {
        padding: 30px 15px;
    }

/* 모바일 대응 */
@media (max-width: 480px){
  .page-inner { max-width: 300px; }
  #map { height: 300px; }
    
    .page6-wrapper {
        padding: 40px 20px;
        margin: 0;
    }

    .account-details {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .copy-btn {
        align-self: center;
        padding: 8px 16px;
    }
}
}