/* ========================================
   Wedding Invitation - Main Stylesheet
   ======================================== */

/* CSS Variables - 컬러 테마 */
:root {
    /* Blue Theme (기본) */
    --primary-color: #7eb6ff;
    --primary-dark: #4a9eff;
    --primary-light: #b3d9ff;
    --accent-color: #2e7fff;
    --bg-gradient-start: #f5f9ff;
    --bg-gradient-end: #e4f1ff;
    --text-primary: #2d2d2d;
    --text-secondary: #0e0e0e;
    --text-light: #999;
    --border-color: #f0f0f0;
    --shadow-sm: 0 2px 8px rgba(46, 127, 255, 0.08);
    --shadow-md: 0 4px 16px rgba(46, 127, 255, 0.12);
    --shadow-lg: 0 8px 32px rgba(46, 127, 255, 0.16);
}

/* Pink Theme */
body.type-pink {
    --primary-color: #ff9eb1;
    --primary-dark: #ff6b8a;
    --primary-light: #ffc9d6;
    --accent-color: #ff4d6d;
    --bg-gradient-start: #fff5f7;
    --bg-gradient-end: #ffe4eb;
    --shadow-sm: 0 2px 8px rgba(255, 77, 109, 0.08);
    --shadow-md: 0 4px 16px rgba(255, 77, 109, 0.12);
    --shadow-lg: 0 8px 32px rgba(255, 77, 109, 0.16);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.6s ease;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

.screen-out {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* ========================================
   Color Toggle Button
   ======================================== */
.color-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.btn-colorToggle {
    position: relative;
    width: 56px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    /*padding: 0 8px;*/
    font-size: 11px;
    font-weight: 600;
    color: white;
    overflow: hidden;
}

.btn-colorToggle::after {
    content: attr(data-text);
    position: absolute;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-colorToggle:not(.active)::after {
    content: 'Blue';
    right: 6px;
}

.btn-colorToggle.active::after {
    content: 'Pink';
    left: 6px;
}

.btn-colorToggle::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    left: 4px;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-colorToggle:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-lg);
}

.btn-colorToggle.active:hover {
    background: #ff6b8a;
}

.btn-colorToggle.active {
    background: #ff9eb1;
}

.btn-colorToggle.active::before {
    left: calc(100% - 24px);
}

.txt-toast {
    font-size: 12px;
    color: var(--text-light);
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.txt-toast.active {
    opacity: 1;
    transform: translateY(0);
}

.color-toggle.on .txt-toast {
    opacity: 0;
}

/* ========================================
   Audio Control
   ======================================== */

.cont-audio {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.btn-audio {
    width: 42px;
    height: 42px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-audio:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.ico-sound {
    width: 24px;
    height: 24px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/></svg>') center/contain no-repeat;
}

/* ========================================
   Navigation
   ======================================== */

.wrap-nav {
    position: fixed;
    bottom: 4.9vh !important;
    left: 50%;
    transform: translateX(-50%);
    width: 360px !important;
    margin: 0 auto;
    background: rgba(244, 244, 244, 0.6);
    z-index: 9999;
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(3px);
}

.list-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 0;
}

.list-nav li {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.btn-nav {
    position: relative;
    width: 80px;
    height: 65px;
    background-image: url('../images/img_folder_blue.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-nav.active {
    color: white;
}

.list-nav li::after {
    content: '';
    width: 6px;
    height: 6px;
    background: transparent;
    border-radius: 50%;
}

.list-nav li:has(.btn-nav.active)::after {
    background: #d0d0d0;
}

#scrollTop {
    width: 35px;
    height: 35px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: none !important;
    cursor: pointer;
    margin-bottom: 6px;
}

#scrollTop::before {
    content: "↑";
    color: white;
    font-size: 20px;
    font-weight: 700;
}

.list-nav li:last-child::after {
    display: none;
}

/* ========================================
   Common Section Styles
   ======================================== */

.cont-os {
    padding: 60px 24px;
    position: relative;
}

.group-tit {
    text-align: center;
    margin-bottom: 48px;
}

.txt-line {
    font-size: 22px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.txt-g {
    color: var(--accent-color);
    font-weight: 700;
}

.ico-os {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 1;
    margin: 0 2px;
    vertical-align: middle;
}

/* ========================================
   Cover Section
   ======================================== */

.cont-cover {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.top-cover {
    text-align: center;
    margin-bottom: 40px;
}

.tit-cover {
    font-size: 48px;
    font-weight: 300;
    color: var(--text-primary);
    display: block;
    margin-bottom: 12px;
    letter-spacing: 2px;
    font-family: 'Playfair Display', serif;
}

.txt-date {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.thumb-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    margin: 0 auto;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.wrap-message {
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    padding: 10px;
}

.bubble-top .box-bubble:nth-child(2) {
    max-width: 55%;
}

.box-bubble {
    position: relative;
    background: white;
    padding: 10px 14px;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    max-width: 70%;
}

.bubble-top, .bubble-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.bubble-bottom .box-bubble {
    align-self: flex-end;
    background: var(--primary-light);
}

.txt-profile {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.txt-bubble {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ========================================
   Profile Section
   ======================================== */

.inner-profile {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.box-profile {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 10px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease;
}

.box-profile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.thumb-profile {
    width: 100%;
    aspect-ratio: 3/4;
    margin: 0 auto 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.img-thumb {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.txt-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.tit-name {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.desc-txt {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   Common Button
   ======================================== */

.box-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.box-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ico-plus {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>') center/contain no-repeat;
}

.ico-message {
    width: 20px;
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/></svg>') center/contain no-repeat;
}

/* ========================================
   Calendar Section
   ======================================== */

.inner-calendar {
    max-width: 400px;
    margin: 0 auto;
}

.item-calendar {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.calendar-title {
    text-align: center;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-color);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    text-align: center;
    font-size: 14px;
    grid-auto-rows: 36px;
}

.calendar-grid .day {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
}

.calendar-grid .sun {
    color: #ff4d6d;
}

.calendar-grid .sat {
    color: #4a9eff;
}

.calendar-grid .wedding {
    background: var(--accent-color);
    width: 39px;
    height: 39px;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    aspect-ratio: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tit-time {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.txt-time {
    display: block;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.box-thumb .thumb-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   Location Section
   ======================================== */

.box-map {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    margin-left: 10px;
    margin-right: 10px;
}

#map {
    width: 100%;
    height: 300px;
}

.link-map {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.link-map:hover {
    background: #7eb6ff;
    color: white;
}

.inner-copy {
    padding: 9px 9px;
    background: var(--bg-gradient-start);
}

.txt-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.txt-copy:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.txt-copy:active {
    transform: scale(0.98);
}

.txt-copy svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.txt-copy:hover svg {
    opacity: 1;
}

.txt-place {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}


/* ========================================
   Information Section
   ======================================== */

.inner-tab {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.list-tab {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.list-tab li {
    flex: 1;
}

.btn-tab {
    width: 100%;
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.list-tab li.active .btn-tab,
.list-tab li.menu:hover .btn-tab {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.inner-box {
    position: relative;
}

.tab-box {
    display: none;
    padding: 32px 24px;
    text-align: center;
}

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

.tab-box .img-thumb {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1;
    margin: 0 auto 24px;
    display: block;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
}

.txt-info {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========================================
   Account Section
   ======================================== */

.tab-account .tab-box {
    padding: 24px;
}

.group-account {
    padding: 20px;
    background: var(--bg-gradient-start);
    border-radius: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.group-account:last-child {
    margin-bottom: 0;
}

.account-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

/*.account-right {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    gap: 8px;*/
/*    align-items: flex-end;*/
/*}*/

.item-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.item-account {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.txt-tag {
    padding: 6px 14px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.txt-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.link-phone {
    width: 22px;
    height: 22px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M20 15.5c-1.2 0-2.4-.2-3.6-.6-.3-.1-.7 0-1 .2l-2.2 2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c.3-.3.4-.7.2-1-.3-1.1-.5-2.3-.5-3.5 0-.6-.4-1-1-1H4c-.6 0-1 .4-1 1 0 9.4 7.6 17 17 17 .6 0 1-.4 1-1v-3.5c0-.6-.4-1-1-1z"/></svg>') center/contain no-repeat;
    display: inline-block;
    cursor: pointer;
    flex-shrink: 0;
}

.txt-account {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    /*flex: 1;*/
}

/* 카카오페이 & 계좌복사 버튼 */

.btn-kakaopay,
.btn-copy {
    padding: 10px 18px;
    border-radius: 10px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-kakaopay {
    width: 70px;
    height: 32px;
    flex-shrink: 0;
    background-image: url('../images/btn_kakaopay.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    border: none;
    text-indent: -9999px;
    overflow: hidden;
}

.btn-kakaopay:hover {
    opacity: 0.8;
}

.btn-copy {
    width: 32px;
    height: 32px;
    /*background: white;*/
    /*border: 1px solid var(--primary-color);*/
    /*border-radius: 50%;*/
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.btn-copy::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%237eb6ff" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.btn-copy:hover {
    background: var(--primary-light);
}

/* ========================================
   Footer Section
   ======================================== */

.cont-footer {
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 24px;
}

.cont-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

.box-frame {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.item-frame {
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 280px;
}

.txt-icon {
    font-size: 32px;
}

.txt-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.inner-footer {
    position: relative;
    text-align: center;
}

.logo-footer {
    display: block;
    width: 120px;
    height: 40px;
    margin: 0 auto 24px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 40" fill="white"><text x="10" y="28" font-family="Arial" font-size="24" font-weight="bold">REPOCU</text></svg>') center/contain no-repeat;
}

.list-sns {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.link-sns {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.link-sns:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.link-insta {
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23E4405F"><path d="M12 2.2c3.2 0 3.6 0 4.9.1 3.3.1 4.8 1.7 4.9 4.9.1 1.3.1 1.7.1 4.9s0 3.6-.1 4.9c-.1 3.2-1.6 4.8-4.9 4.9-1.3.1-1.7.1-4.9.1s-3.6 0-4.9-.1c-3.3-.1-4.8-1.7-4.9-4.9-.1-1.3-.1-1.7-.1-4.9s0-3.6.1-4.9c.1-3.2 1.7-4.8 4.9-4.9 1.3-.1 1.7-.1 4.9-.1zM12 0C8.7 0 8.3 0 7.1.1 2.7.3.3 2.7.1 7.1 0 8.3 0 8.7 0 12s0 3.7.1 4.9c.2 4.4 2.6 6.8 7 7 1.2.1 1.6.1 4.9.1s3.7 0 4.9-.1c4.4-.2 6.8-2.6 7-7 .1-1.2.1-1.6.1-4.9s0-3.7-.1-4.9c-.2-4.4-2.6-6.8-7-7C15.7 0 15.3 0 12 0zm0 5.8c-3.4 0-6.2 2.8-6.2 6.2s2.8 6.2 6.2 6.2 6.2-2.8 6.2-6.2-2.8-6.2-6.2-6.2zm0 10.2c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4zm6.4-11.8c-.8 0-1.4.6-1.4 1.4s.6 1.4 1.4 1.4 1.4-.6 1.4-1.4-.6-1.4-1.4-1.4z"/></svg>') center/20px no-repeat;
}

.link-share {
    background: white url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M18 16c-.8 0-1.4.3-2 .8l-7.1-4.2c.1-.2.1-.5.1-.8s0-.5-.1-.8L16 6.8c.5.5 1.2.8 2 .8 1.7 0 3-1.3 3-3s-1.3-3-3-3-3 1.3-3 3c0 .2 0 .5.1.8L8 9.6c-.5-.5-1.2-.8-2-.8-1.7 0-3 1.3-3 3s1.3 3 3 3c.8 0 1.4-.3 2-.8l7.1 4.2c-.1.2-.1.5-.1.8 0 1.7 1.3 3 3 3s3-1.3 3-3-1.3-3-3-3z"/></svg>') center/20px no-repeat;
}

/* ========================================
   방명록
   ======================================== */

.cont-gallery.active {
    top: 0;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top);
}

/* 상단 바 */

.cont-gallery .cont-head {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 50;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 16px;
}

/* 뒤로가기 버튼 */

.cont-gallery .cont-head .btn-prev {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: 0;
    background-color: transparent;
    display: grid;
    place-items: center;
}

.cont-gallery .cont-head .btn-photo {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    color: #111;
}

.cont-gallery .cont-head {
    left: auto;
    right: auto;
}

.cont-gallery .inner-gallery {
    padding-top: 12px;
}

.btn-prev {
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23666"><path d="M15.4 7.4L14 6l-6 6 6 6 1.4-1.4-4.6-4.6z"/></svg>') center/24px no-repeat;
}

.btn-letter,
.btn-photo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.inner-book {
    padding: 40px 24px;
}

.tit-guest {
    display: block;
    font-size: 32px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 8px;
    font-family: 'Playfair Display', serif;
}

.txt-guest {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
}

.group-guestbook {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ========================================
   갤러리
   ======================================== */

.cont-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background: white;
    z-index: 1001;
    overflow-y: auto;
}

.cont-gallery.active {
    display: block;
}

.inner-gallery {
    padding: 24px;
    padding-bottom: 120px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.inner-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.inner-gallery img:hover {
    transform: scale(1.05);
}

/* ========================================
   갤러리 로딩바 스타일
   ======================================== */

/* 갤러리 전체 로딩바 */

.gallery-loader {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.89);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    transition: opacity 0.3s ease;
}

.loader-content {
    text-align: center;
    padding: 40px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite !important;
}

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

.loader-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

/* 모달 이미지 로딩바 */

.modal-image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.modal-image-loader .loader-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
}

.modal-image-loader p {
    font-size: 14px;
    color: var(--text-light);
}

/* 이미지 페이드인 효과 */

.gallery-modal-body img {
    transition: opacity 0.3s ease;
}

/* ========================================
   Popup Styles
   ======================================== */

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.popup.active {
    display: flex;
}

.dim {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.inner-form {
    position: relative;
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 24px;
    padding: 15px 15px;
    box-shadow: var(--shadow-lg);
}

.popup-header {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 16px;
}

.popup-dots {
    position: absolute;
    left: 16px;
    display: flex;
    gap: 8px;
}

.popup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.popup-dot.dot-red {
    background: #ff5f57;
}

.popup-dot.dot-yellow {
    background: #febc2e;
}

.popup-dot.dot-green {
    background: #28c840;
}

.popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #111;
    margin: 0;
}

.popup-close {
    position: absolute;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.popup-close::before,
.popup-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 1.5px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 2px;
}

.popup-close::before {
    transform: rotate(45deg);
}

.popup-close::after {
    transform: rotate(-45deg);
}

/* 팝업 바디 */

.popup-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 56px);
}

.tit-g {
    display: block;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: var(--accent-color);
    font-family: 'Playfair Display', serif;
}

.form-body {
    margin-bottom: 0;
}

.item-story {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 10px 0;
}

.txt-story {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.txt-color {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.txt-blue {
    background: #e3f2fd;
    color: #1976d2;
}

.txt-yellow {
    background: #fff9c4;
    color: #f57f17;
}

.txt-pink {
    background: var(--primary-light);
    color: var(--accent-color);
}

.item-loca {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.tit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.txt-info {
    display: block;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.txt-info p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.txt-info p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.txt-info a {
    display: inline-block;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.txt-info a:hover {
    background: var(--primary-dark);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* ========================================
   Responsive
   ======================================== */
/* ========================================
   Responsive Design - Mobile First
   ======================================== */

/* 작은 모바일 (iPhone SE 등) */
@media (max-width: 360px) {
    .txt-line {
        font-size: 20px;
    }

    .tit-cover {
        font-size: 40px;
    }

    .inner-profile {
        flex-direction: column;
    }

    .thumb-profile {
        width: 130px;
        height: 130px;
    }

    .txt-date {
        font-size: 14px;
    }

    .wrap-nav {
        width: calc(100vw - 30px) !important;
        padding: 8px;
    }

    .btn-nav {
        font-size: 13px;
    }

    .wrap-message {
        top: 5px;
        padding: 8px;
    }

    .box-bubble {
        padding: 8px 12px;
        max-width: 75%;
    }

    .txt-profile {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .txt-bubble {
        font-size: 11px;
        line-height: 1.4;
    }

    .bubble-top, .bubble-bottom {
        gap: 8px;
        margin-bottom: 8px;
    }
}

/* 일반 모바일 (iPhone 12, Galaxy S21 등) */
@media (max-width: 480px) {
    .group-account {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 12px;
    }

    .account-left {
        gap: 10px;
    }

    .account-right {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        gap: 8px;
    }

    .btn-kakaopay,
    .btn-copy {
        flex: 0 0 auto;
    }

    .txt-account {
        font-size: 12px;
    }

    .thumb-cover {
        max-width: calc(100% - 40px);
        margin: 0 auto;
    }

    .wrap-message {
        padding: 10px;
    }

    .box-bubble {
        padding: 9px 13px;
        max-width: 72%;
    }

    .txt-profile {
        font-size: 10px;
    }

    .txt-bubble {
        font-size: 12px;
        line-height: 1.45;
    }

    .bubble-top, .bubble-bottom {
        gap: 10px;
        margin-bottom: 10px;
    }

    .gallery-modal {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .gallery-modal-thumb {
        width: 60px;
        height: 60px;
    }
}

/* 태블릿 */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 100%;
        border-radius: 0;
    }

    .thumb-cover {
        max-width: 500px;
    }

    .gallery-modal {
        max-width: 90vw;
    }
}

/* 데스크탑 */
@media (min-width: 769px) {
    .container {
        border-radius: 0;
    }

    .thumb-cover {
        max-width: 450px;
    }
}

/* 프린트 */
@media print {
    .color-toggle,
    .cont-audio,
    .wrap-nav,
    .box-btn,
    .popup {
        display: none !important;
    }
}

/* =========================
 * Gallery Modal (Photo Popup)
 * ========================= */

.gallery-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.gallery-modal {
    width: 100%;
    max-width: 480px;
    height: min(92dvh, 860px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-modal-header {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-modal-dots {
    position: absolute;
    left: 16px;
    display: flex;
    gap: 8px;
}

.gallery-modal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.gallery-modal-dot.dot-red {
    background: #ff5f57;
}

.gallery-modal-dot.dot-yellow {
    background: #febc2e;
}

.gallery-modal-dot.dot-green {
    background: #28c840;
}

.gallery-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #111;
    margin: 0;
}

.gallery-modal-close {
    position: absolute;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.gallery-modal-close::before,
.gallery-modal-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 1.5px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 2px;
}

.gallery-modal-close::before {
    transform: rotate(45deg);
}

.gallery-modal-close::after {
    transform: rotate(-45deg);
}

.gallery-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
    min-height: 0;
}

.gallery-modal-image-container {
    flex: 1;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f7f7f7;
    min-height: 0;
}

.gallery-modal-image-container > img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
    transition: opacity 0.3s ease;
}

/* 하단 썸네일 컨테이너 */

.gallery-modal-thumbnails {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    background: #f9f9f9;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    padding-top: 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.gallery-modal-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-modal-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-modal-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.gallery-modal-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    opacity: 0.6;
}

.gallery-modal-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-modal-thumb.active {
    border-color: var(--primary-color);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 360px) {
    .gallery-modal {
        height: 94vh;
        border-radius: 18px;
    }

    .gallery-modal-title {
        font-size: 16px;
    }

    .gallery-modal-thumb {
        width: 60px;
        height: 60px;
    }
}

/* 395px 이하 화면에서 계좌부분 */
@media (max-width: 395px) {
    .group-account {
        padding: 16px 12px;
    }

    .account-row {
        gap: 8px;
    }

    .txt-tag {
        padding: 4px 10px;
        font-size: 11px;
    }

    .txt-name {
        font-size: 15px;
    }

    .link-phone {
        width: 20px;
        height: 20px;
    }

    .txt-account {
        font-size: 11px;
        letter-spacing: 0.2px;
    }

    .btn-copy {
        width: 28px;
        height: 28px;
    }

    .btn-copy::before {
        width: 14px;
        height: 14px;
    }
}