@font-face {
    font-family: 'MaruBuri';
    src: url('assets/fonts/MaruBuri-ExtraLight.ttf') format('truetype');
    font-weight: 200;
}

@font-face {
    font-family: 'MaruBuri';
    src: url('assets/fonts/MaruBuri-Light.ttf') format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: 'MaruBuri';
    src: url('assets/fonts/MaruBuri-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'MaruBuri';
    src: url('assets/fonts/MaruBuri-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'MaruBuri';
    src: url('assets/fonts/MaruBuri-Bold.ttf') format('truetype');
    font-weight: 700;
}

body {
    font-family: 'MaruBuri', serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    font-weight: 200;
}

.floating-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
}

.main-image-stack {
    position: relative;
}

.main-image {
    width: 100%;
    display: block;
}

.date-text, .location-text {
    font-size: 18px;
}

.location-text {
    font-weight: bold;
    margin-top: 16px;
}

.invitation-text-section {
    padding: 32px 0 10px;
    text-align: center;
    font-size: 17px;
    line-height: 1.8;
}

.centered-text {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 24px;
}

.bold {
    font-weight: bold;
}

.large {
    font-size: 18px;
}

.family-info-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 40px;
    font-size: 16px;
}

.family-names {
    text-align: right;
    margin-right: 24px;
}

.bride-groom-names p {
    margin: 4px 0;
}


.divider {
    height: 1px;
    width: 100px;
    background-color: #eee;
    margin: 0 auto;
}

.gallery-section {
    padding: 40px 0;
    text-align: center;
}

h2 {
    text-align: center;
    margin-bottom: 24px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 8px;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    cursor: pointer;
}

.image-grid img.hidden {
    display: none;
}

.load-more-btn {
    display: block;
    margin: 24px auto 0;
    padding: 12px 40px;
    font-size: 16px;
    font-family: 'MaruBuri', serif;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: #f9f9f9;
}

.calendar-section {
    padding: 32px 0;
}

#d-day-counter {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #ff69b4;
    margin-bottom: 24px;
}

.calendar-header h2,
.map-section h2,
.contact-section h2,
.account-section h2 {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 24px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 14px;
}

.calendar-body div {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
}

.wedding-day {
    color: white;
    font-weight: bold;
    z-index: 1;
}

.wedding-day::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 37px;
    height: 37px;
    background-color: lightpink;
    z-index: -1;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.map-section {
    padding: 40px 0;
}

/* Overlay */
#gallery-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.gallery-thumbnail {
    width: 100%;           /* 그리드 칸 너비에 맞춤 */
    aspect-ratio: 1 / 1;

    /* 비율 유지하며 꽉 채우기 */
    object-fit: cover;

    /* 핵심: 가로는 중앙(center), 세로는 위쪽(top) 기준 */
    object-position: center top;

    position: relative;
    z-index: 10;
    pointer-events: auto !important;
}

#gallery-overlay.hidden {
    display: none;
}

.image-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
}

.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 32px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 10;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    cursor: pointer;
    user-select: none;
    z-index: 10;
}

.prev-btn {
    left: 16px;
}

.next-btn {
    right: 16px;
}

/* Tab Container Styles */
.tab-container {
    width: 100%;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 24px;
}

.tab-button {
    flex: 1;
    padding: 12px 0;
    text-align: center;
    font-size: 16px;
    font-family: 'MaruBuri', serif;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #888;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #333;
    font-weight: bold;
    border-bottom-color: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.map-buttons-container {
    display: flex;
    gap: 8px;
    padding: 24px 24px 0;
}

.map-link-btn {
    flex: 1;
    display: block;
    padding: 10px 0;
    text-align: center;
    text-decoration: none;
    color: #000;
    background-color: transparent;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 16px;
    font-weight: normal;
    transition: background-color 0.3s ease;
}

.map-link-btn:hover {
    background-color: #f9f9f9;
}

.shuttle-info {
    font-size: 15px;
    color: #555;
    margin-top: 24px;
    padding: 0 24px;
    text-align: left;
}

.shuttle-info strong {
    font-weight: bold;
}

.shuttle-info ul {
    list-style: disc;
    padding-left: 20px;
    margin-top: 8px;
}

.shuttle-info li {
    font-weight: bold;
    margin-bottom: 4px;
}

.shuttle-interval {
    font-weight: bold;
    margin-top: 8px;
}

/* Contact Section Styles */
.contact-section {
    padding: 40px 32px;
}

/* 각 행(신랑, 신부, 부모님) 사이의 간격 */
.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

/* 신랑측 시작 전 여백: 신부측 가족과 신랑측 사이를 더 멂 */
.contact-row[data-contact="groom"] {
    margin-top: 30px;
}

/* 라벨(신부측/신랑측)과 이름 사이의 간격 */
.contact-label {
    margin-bottom: 2px;
    font-size: 14px;
    color: #888;
}

.contact-group {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-size: 16px;
    font-weight: normal;
    margin-top: 4px;
}

.contact-buttons {
    display: flex;
    gap: 4px;
}

.contact-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.contact-btn:hover {
    background-color: #f9f9f9;
}

.contact-btn .icon {
    width: 20px;
    height: 20px;
    fill: lightpink;
}

/* Account Section Styles */
.account-section {
    padding: 40px 24px;
}

.account-group {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.account-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    font-weight: normal;
}

.arrow-icon {
    width: 24px;
    height: 24px;
    fill: #888;
    transition: transform 0.3s ease;
}

.account-toggle.active .arrow-icon {
    transform: rotate(180deg);
}

.account-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    background-color: transparent;
    padding: 0 16px;
}

.account-details.active {
    max-height: 500px; /* 충분히 큰 값 */
    padding: 16px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.account-row:not(:last-child) {
    margin-bottom: 12px;
}

.account-row[data-account="bride_mother"],
.account-row[data-account="groom_mother"] {
    margin-bottom: 8px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-actions {
    display: flex;
    align-items: center;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.copy-btn .icon {
    width: 18px;
    height: 18px;
    fill: lightpink;
}

.share-section {
    padding: 40px 24px;
    display: flex;
    gap: 8px;
}

.share-btn {
    flex: 1;
    padding: 12px 0;
    font-size: 14px;
    font-family: 'MaruBuri', serif;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.share-btn:hover {
    background-color: #f9f9f9;
}

.no-download {
    pointer-events: none; /* 클릭/우클릭 무시 */
    -webkit-touch-callout: none; /* iOS 롱탭 저장 방지 */
    user-select: none; /* 텍스트/이미지 선택 방지 */
}
