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

@font-face {
    font-family: 'PlayfairDisplay';
    src: url('/assets/PlayfairDisplay-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

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

@font-face {
    font-family: 'PlayfairDisplay';
    src: url('/assets/PlayfairDisplay-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'PlayfairDisplay';
    src: url('/assets/PlayfairDisplay-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

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

@font-face {
    font-family: 'AritaBuriKR';
    src: url('/assets/AritaBuriKR-HairLine.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

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

@font-face {
    font-family: 'AritaBuriKR';
    src: url('/assets/AritaBuriKR-Medium.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

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

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

html {
    overflow-x: hidden;
    overflow-y: auto;
}

html.home-page-scroll-disabled {
    overflow-y: hidden;
    height: 100vh;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'AritaBuriKR', sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    color: #000;
    display: flex;
    position: relative;
}

a {
    color: #001b31;
}

.exhibit-title {
    font-size: 1.2rem;
    font-weight: 500;
    /* margin-bottom: 10px; */
}
.meta {
    font-size: 0.9rem;
    color: #666;
}

.journey-video {
    width: 100%;
    height: auto;
    display: block;
    margin: 16px auto;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.journey-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.exhibit{
    margin-bottom: 10px;
}

.sidebar {
    width: auto;
    min-width: 280px;
    background: #fff;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    border: 1px solid #e6e6e6;
    border-top: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    pointer-events: none;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.sidebar.open.scrolled,
.sidebar.scrolled {
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    pointer-events: none;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

.artist-info {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0;
    color: #000;
    letter-spacing: -0.5px;
}

.sidebar-title {
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.4;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    margin-bottom: 0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    width: 100%;
}

.sidebar-nav li { 
    margin-bottom: 0; 
}

.sidebar-nav a { 
    color: #000; 
    text-decoration: none; 
    font-size: 1rem;
    font-weight: 400;
    transition: none;
}

.sidebar-nav a:hover { 
    text-decoration: underline; 
}

.sidebar-nav a.active {
    font-weight: 400;
}

/* Sidebar icons */
.sidebar-icons {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: center;
}

.sidebar-icon {
    color: #000;
    text-decoration: none;
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.sidebar-icon:hover {
    color: #000;
    text-decoration: none;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: relative;
    background: transparent;
    border: 1px solid #000000;
    border-radius: 2px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000;
    padding: 0;
    box-shadow: none;
}

.sidebar-toggle:hover {
    border-color: #000000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 버튼은 항상 보임 */
.sidebar-toggle {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-toggle:active {
    background: rgba(0, 0, 0, 0.05);
}

/* Infinity 아이콘 스타일 */
.sidebar-toggle svg {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
}

.sidebar-toggle svg path {
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: none;
    z-index: 1002;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.top-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, #cfcfcf, #949494, #cfcfcf);
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #000;
    letter-spacing: -0.5px;
    text-decoration: none;
    transition: none;
}

.header-title:hover {
    text-decoration: underline;
}

/* Conversation History Container */
.conversation-history-container {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e0e0e0;
    z-index: 1001;
    overflow: hidden;
    white-space: nowrap;
}

.conversation-scroll-wrapper {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.conversation-items {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    gap: 30px;
    will-change: transform;
}

.conversation-scroll-wrapper .conversation-items:not(:empty) {
    animation: scroll-left 80s linear infinite;
}

.conversation-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #333;
    white-space: nowrap;
}

.conversation-item .user-label {
    font-weight: 600;
    color: #006005;
}

.conversation-item .user-message {
    color: #000;
}

.conversation-item .alice-label {
    font-weight: 600;
    color: #f10000;
}

.conversation-item .alice-message {
    color: #000000;
    font-style: bold;
}

.conversation-item .separator {
    color: #ccc;
    margin: 0 5px;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 사이드바 컨테이너 */
.sidebar-container {
    position: relative;
    z-index: 1001;
}

.sidebar-wrapper {
    position: fixed;
    top: 60px;
    right: 0;
    /* 메뉴가 대화 기록 바(.conversation-history-container) 위에 보이도록
       z-index를 더 높게 설정 */
    z-index: 1002;
}

/* JavaScript로 제어되는 hover/click 상태 */
.sidebar-wrapper.active .sidebar {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* 버튼 클릭/활성화 시 버튼이 네모로 변함 */
.sidebar-wrapper.active .sidebar-toggle {
    border-radius: 0;
    background: #000;
    border-color: #000;
}

.sidebar-wrapper.active .sidebar-toggle svg {
    transform: scale(0.6);
}

.sidebar-wrapper.active .sidebar-toggle svg path {
    opacity: 0;
    transform: scale(0);
}

.main-content {
    flex: 1;
    padding: 32px;
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100%);
    min-width: 0;
    overflow-x: hidden;
    overflow-y: visible;
    border-left: 1px solid #e6e6e6;
    min-height: 100vh;
    transition: padding-top 0.3s ease;
    padding-top: calc(60px + 32px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

/* Home page - full width, no side margins */
body.home-page {
    overflow-y: hidden;
    height: 100vh;
    /* 키보드가 올라와서 생기는 하단 흰 여백을 줄이기 위해
       홈 배경을 이미지를 이어가는 듯한 그라데이션으로 처리 */
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #fbf5f0 40%,
        #ffffff 100%
    );
}

body.home-page .main-content {
    padding: 0;
    padding-top: 0px;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-left: none;
    width: 100%;
    overflow-y: hidden;
    height: calc(100vh - 60px);
}

/* Journeys page - beige background for better readability */
body.journeys-page {
    background: #fbf5f0;
}

body.journeys-page .main-content {
    background: #fbf5f0;
    /* Journeys 페이지는 중앙 컬럼 폭을 넓게 사용 */
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    border-left: none;
}

body.journeys-page .journey-description {
    background: #fbf5f0;
}

body.journeys-page .sidebar {
    background: #fbf5f0;
    border-color: #e6e6e6;
}

body.journeys-page .top-header {
    background: #fbf5f0;
}

/* Journeys page - Typography */
body.journeys-page h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 0 20px 0;
    color: #5a2d0c;
}


/* Journeys Table Styles */
.journeys-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: transparent;
}

.journeys-table thead {
    border-bottom: 1px solid #8b4513;
}

.journeys-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #8b4513;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journeys-table tbody tr {
    border-bottom: 1px solid #d4a574;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.journeys-table tbody tr:hover {
    background-color: rgba(212, 165, 116, 0.1);
}

.journeys-table td {
    padding: 16px;
    font-size: 0.95rem;
    color: #5a2d0c;
    vertical-align: top;
}

.journeys-table td:first-child {
    font-weight: 500;
}

.journeys-table td:last-child {
    color: #8b6f47;
    line-height: 1.5;
}

/* Journey Detail Modal */
.journey-detail-modal {
    display: none;
    position: fixed;
    z-index: 1004;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(24, 24, 24, 0.85);
    overflow-y: auto;
    padding: 40px 20px;
    box-sizing: border-box;
    align-items: flex-start;
    justify-content: center;
}

.journey-detail-modal.active {
    display: flex;
}

.journey-detail-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: #fbf5f0;
    padding: 0;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.journey-detail-close {
    position: relative;
    width: 100%;
    padding: 16px 0;
    border: none;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #f5eae2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 400;
    color: #000;
    transition: opacity 0.2s ease;
    z-index: 1005;
    text-align: center;
    flex-shrink: 0;
}

.journey-detail-close:hover {
    opacity: 0.6;
}

.journey-detail-toggle {
    display: none;
}

.journey-detail-body {
    background-color: #fbf5f0;
    display: flex;
    flex-direction: row;
    gap: 40px;
    flex: 1;
    overflow: hidden;
}

.journey-detail-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 40px;
}

.journey-detail-media {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 40px;
    background: rgba(0, 0, 0, 0.02);
}

.journey-detail-header {
    margin-bottom: 30px;
    flex-shrink: 0;
}

.journey-detail-first-image {
    display: none;
}

.journey-detail-title {
    font-size: 2rem;
    font-weight: 400;
    color: #5a2d0c;
    margin: 0 0 8px 0;
}

.journey-detail-subtitle {
    font-size: 1.1rem;
    color: #8b6f47;
    margin: 0;
}

.journey-detail-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #5a2d0c;
    margin-bottom: 0;
    white-space: pre-line;
    flex: 1;
}

.journey-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.journey-detail-gallery-item {
    flex-shrink: 0;
    cursor: pointer;
}

.journey-detail-gallery-item {
    width: 100%;
}

.journey-detail-gallery-item img,
.journey-detail-gallery-item video {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.journey-detail-gallery-item:hover img,
.journey-detail-gallery-item:hover video {
    transform: scale(1.01);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .journeys-table {
        font-size: 0.85rem;
    }
    
    .journeys-table th:nth-child(4),
    .journeys-table td:nth-child(4) {
        display: none;
    }
    
    .journeys-table th,
    .journeys-table td {
        padding: 12px 6px;
    }
    
    .journeys-table th:first-child,
    .journeys-table td:first-child {
        padding-left: 0;
    }
    
    .journeys-table th:last-child,
    .journeys-table td:last-child {
        padding-right: 0;
    }
    
    .journey-detail-modal {
        padding: 20px 10px;
    }
    
    .journey-detail-content {
        max-width: 95%;
        max-height: calc(100vh - 40px);
    }
    
    .journey-detail-close {
        padding: 12px 0;
        font-size: 0.9rem;
    }
    
    .journey-detail-toggle {
        display: flex;
        width: 100%;
        border-bottom: 1px solid #000;
        background: #f5eae2;
        flex-shrink: 0;
    }
    
    .journey-toggle-btn {
        flex: 1;
        padding: 12px 0;
        border: none;
        background: transparent;
        font-size: 0.9rem;
        font-weight: 400;
        color: #000;
        cursor: pointer;
        transition: opacity 0.2s ease, background-color 0.2s ease;
        border-right: 1px solid #000;
    }
    
    .journey-toggle-btn:last-child {
        border-right: none;
    }
    
    .journey-toggle-btn:hover {
        opacity: 0.6;
    }
    
    .journey-toggle-btn.active {
        background: #fbf5f0;
        font-weight: 500;
    }
    
    .journey-detail-body {
        flex-direction: column;
        gap: 0;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    
    .journey-detail-text {
        padding: 20px;
        flex: 1;
        min-height: 0;
        box-sizing: border-box;
        overflow-y: auto;
        display: none;
    }
    
    .journey-detail-text.show {
        display: flex;
        flex-direction: column;
    }
    
    .journey-detail-media {
        padding: 20px;
        flex: 1;
        min-height: 0;
        box-sizing: border-box;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    
    .journey-detail-media.hide {
        display: none;
    }
    
    .journey-detail-header {
        margin-bottom: 20px;
    }
    
    .journey-detail-first-image {
        display: block;
        margin-bottom: 20px;
        width: 100%;
    }
    
    .journey-detail-first-image-item {
        width: 100%;
        cursor: pointer;
    }
    
    .journey-detail-first-image-item img,
    .journey-detail-first-image-item video {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 2px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        display: block;
    }
    
    .journey-detail-first-image-item:hover img,
    .journey-detail-first-image-item:hover video {
        transform: scale(1.01);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }
    
    .journey-detail-gallery {
        gap: 15px;
    }
    
    .journey-detail-gallery {
        flex-direction: column;
        align-items: center;
    }
    
    .journey-detail-gallery-item img,
    .journey-detail-gallery-item video {
        max-width: 100%;
        width: 100%;
    }
}

/* Exhibitions page - compact layout with side margins */
/* On screens > 1200px, content stays 960px fixed, only margins adjust */
body.exhibitions-page .main-content {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    border-left: none;
    padding-left: 0;
    padding-right: 0;
    /* padding-left: clamp(16px, 4vw, max(32px, calc((100vw - 960px) / 2))); */
    /* padding-right: clamp(16px, 4vw, max(32px, calc((100vw - 960px) / 2))); */
}

/* Contact page - similar margins to Journeys/Exhibitions page */
body.contact-page .main-content {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    border-left: none;
}

/* Works page - navigation spacing */
body.works-page .main-content {
    padding-top: calc(60px + 53px + 32px);
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    border-left: none;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-open .main-content {
    padding-top: 32px;
}

.video-container {
    /* width: 100vw; */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    max-width: 960px;
}

/* Home page - full width video */
body.home-page .video-container {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.hero-title {
    font-size: 2rem;
    margin: 0 0 6px 0;
}
.hero-subtitle { margin: 0 0 20px 0; color: #444; }
.hero-image { width: 50%; max-width: 700px; display: block; margin: 24px 0; }

#content-area { 
    transition: opacity .25s ease;
    position: relative;
    min-height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

body.home-page #content-area {
    overflow-y: hidden;
    height: 100vh;
    /* padding-top: 100px; top-header (60px) + conversation-history (40px) */
}

/* Navigation Layers */
.nav-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
}

.nav-layer-1 {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-layer-0 {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.nav-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: 200;
    text-decoration: none;
    pointer-events: auto;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}

.nav-button-1 {
    top: 20%;
    color: #000;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.3);
}

.nav-button-0 {
    bottom: 20%;
    color: #fff;
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-button:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 12px 48px;
}

.nav-button-1:hover {
    box-shadow: 0 12px 48px rgba(255, 255, 255, 0.5);
}

.nav-button-0:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

/* Smooth page enter animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: fadeInUp .28s ease both; }

/* Back link pressable styling */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 14px;
    background: #ffefe3;
    color: #000000;
    text-decoration: none;
    border-radius: 6px;
    /* box-shadow: 0 2px 0 #ccc; */
    transition: background-color .2s ease, transform .06s ease, box-shadow .06s ease;
}
.back-link:hover { background: #ffcc85; }
.back-link:active { transform: translateY(2px); box-shadow: 0 0 0 #ccc; }
.back-link:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,0.1); }

/* Journey Images */
/* Journey Gallery - Horizontal Scroll */
.journey-gallery-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 10px 0;
    justify-content: center;
    max-width: 100%;
    box-sizing: border-box;
}

.journey-gallery-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    scroll-snap-type: x proximity;
    box-sizing: border-box;
}

/* Desktop: Show all videos without scroll if they fit */
@media (min-width: 1024px) {
    .journey-gallery-container {
        overflow-x: visible;
    }
    
    .journey-gallery-wrapper {
        justify-content: center;
    }
    
    .journey-gallery {
        justify-content: center;
        width: 100%;
    }
}

.journey-gallery-container::-webkit-scrollbar {
    height: 8px;
}

.journey-gallery-container::-webkit-scrollbar-track {
    background: transparent;
}

.journey-gallery-container::-webkit-scrollbar-thumb {
    background: #d0d0d0;
}

.journey-gallery-container::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.journey-gallery {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: fit-content;
    padding: 0;
    margin: 0;
}

.journey-gallery-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    scroll-snap-align: center;
}

.journey-gallery-item video,
.journey-gallery-item img {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    pointer-events: auto;
}

.journey-gallery-item:hover img,
.journey-gallery-item:hover video {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: scale(1.02);
}

/* Legacy styles for backward compatibility */
.journey-images {
    display: grid;
    grid-template-columns: 250px 250px 250px;
    gap: 15px;
    margin: 10px auto;
    justify-content: center;
}

/* Andong specific layout */
.andong-images {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    margin: 10px auto;
    max-width: 800px;
}

.shinhan-images {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: 1fr ;
    gap: 15px;
    margin: 10px auto;
    max-width: 800px;
}

.shinhan-images img:first-child {
    grid-row: 1 / 2;
    height: 335px;
}
.shinhan-images img:last-child {
    grid-row: 1 / 2;
    height: 335px;
}

.andong-images img:first-child {
    grid-row: 1 / 3;
    height: 335px;
}

.andong-images .journey-preview-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.journey-preview-img {
    width: 250px;
    height: 160px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.journey-preview-img:hover {
    /* transform: translateY(-3px); */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Journey Title and Link Container */
.journey-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
    margin-top: 5px;
}

.journey-title {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 5px;
    margin-top: 5px;
}

.journey-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-block-start: 0em;
    margin-block-end: 0em;
    margin-bottom: 10px;
    margin-top: 5px;
    background-color: #ffffff;
    color: #1b1b1b;
    padding: 0px;
}

/* Journey Link Styling - same as back-link */
.journey-link {
    display: inline-block;
    padding: 8px 14px;
    background: #f7f7f7;
    color: #2b2b2b;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background-color .2s ease, transform .06s ease, box-shadow .06s ease;
    flex-shrink: 0;
}

.journey-link:hover {
    background: #eee;
}

.journey-link:active {
    transform: translateY(2px);
    box-shadow: 0 0 0 #ccc;
}

.journey-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

/* Always maintain fixed layout regardless of screen size */
body { 
    overflow-x: hidden;
}

.sidebar { 
    flex-shrink: 0;
}

.main-content { 
    flex-shrink: 0;
}

/* Language content visibility */
.lang-content {
    display: none;
    max-width: 800px;
    margin: 0 auto;
}

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

/* Contact page - show lang-content by default if no language is set */
body.contact-page .lang-content[data-lang="en"] {
    display: block;
}

/* Journeys page - show lang-content by default */
body.journeys-page .lang-content[data-lang="en"] {
    display: block;
}

/* Journeys page - lang-content should use full width, not max-width */
body.journeys-page .lang-content {
    max-width: 100%;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Journeys page - ensure all text content wraps properly */
body.journeys-page .lang-content p,
body.journeys-page .lang-content div:not(.journey-gallery-wrapper):not(.journey-gallery-container):not(.journey-gallery),
body.journeys-page .lang-content span,
body.journeys-page .lang-content a,
body.journeys-page .lang-content li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* Journeys page - ensure regular images are responsive */
body.journeys-page .lang-content img:not(.journey-gallery-item img):not(.journey-preview-img) {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

/* Contact page refinements */
.contact-wrap { 
    max-width: 600px; 
    margin: 0 auto;
}
.page-title { margin: 0 0 40px 0; font-size: 1.5rem; font-weight: 400; color: #000; }

/* Contact grid layout */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Individual contact cards */
.contact-card {
    background: #fff;
    border: none;
    border-bottom: 1px solid #000;
    border-radius: 0;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: none;
    box-shadow: none;
    position: relative;
}

.contact-card:last-child {
    border-bottom: none;
}

.contact-card:hover {
    transform: none;
    box-shadow: none;
    border-color: #000;
}

/* Contact icon styling */
.contact-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: none;
}

.contact-card:hover .contact-icon {
    background: none;
    color: #000;
    transform: none;
}

/* Contact content */
.contact-content {
    flex: 1;
    min-width: 0;
}

.contact-title {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    letter-spacing: 0;
    text-transform: uppercase;
}

.contact-link {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    transition: none;
    word-break: break-all;
    font-weight: 400;
}

.contact-link:hover {
    color: #000;
    text-decoration: underline;
}

/* Remove specific card styling for minimal look */
.email-card .contact-icon,
.instagram-card .contact-icon {
    background: none;
}

.email-card:hover .contact-icon,
.instagram-card:hover .contact-icon {
    background: none;
}

/* Art Sections */
.art-section {
    /* margin-bottom: 60px; */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/* Scroll to top section */
.scroll-to-top-section {
    align-items: center;
    justify-content: center;
    padding: 0px 0;
}

.scroll-to-top-section .section-title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top-btn {
    background: transparent;
    border: 1px solid #000;
    border-radius: 2px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000;
    padding: 0;
    margin: 0 auto;
}

.scroll-to-top-btn:hover {
    background: #000;
    color: #fff;
}

.scroll-to-top-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* Home page - full width art sections */
body.home-page .art-section {
    width: 100%;
    justify-content: flex-start;
    padding: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 0px 0;
    color: #000;
    letter-spacing: 1px;
    width: 100%;
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
}

/* Works slider page: bold section titles */
.works-slider-page .section-title {
    font-weight: 500;
}

.section-title::before {
    content: '';
    position: absolute;
    left: -32px;
    right: -32px;
    top: 0;
    height: 1px;
    background: #000000;
}

.section-title::after {
    content: '';
    position: absolute;
    left: -32px;
    right: -32px;
    bottom: 0;
    height: 1px;
    background: #000000;
}

.section-title::before {
    top: 0;
}

.section-title::after {
    bottom: 0;
}

/* Gallery Slider */
.gallery-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    justify-content: flex-start;
}

.gallery-container {
    flex: 1;
    overflow: visible;
    position: relative;
    width: 100%;
}

/* Works slider page: enable horizontal scroll */
.works-slider-page .gallery-container {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}


/* Journey video gallery - flex layout for horizontal scroll */
.journey-video-gallery {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    padding: 0;
    margin: 10px 0;
    box-sizing: border-box;
    position: relative;
}

.journey-video-gallery::-webkit-scrollbar {
    height: 8px;
}

.journey-video-gallery::-webkit-scrollbar-track {
    background: transparent;
}

.journey-video-gallery::-webkit-scrollbar-thumb {
    background: #d0d0d0;
}

.journey-video-gallery::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.journey-video-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.journey-video-item video {
    width: 400px;
    max-width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    display: block;
    box-sizing: border-box;
}

.journey-video-item:hover video {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transform: scale(1.02);
}

.gallery-container::-webkit-scrollbar {
    height: 8px;
}

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

.gallery-container::-webkit-scrollbar-thumb {
    background: #d0d0d0;
}

.gallery-container::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Default art-works-grid: grid layout (multiple rows) */
.art-works-grid {
    display: grid;
    grid-template-columns: repeat(6, 280px);
    gap: 0;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* Art works grid - add borders between cards */
.art-works-grid .gallery-card {
    border-right: 1px solid #000000;
    margin-right: 0;
}

/* Remove right border from last column (every 6th item) */
.art-works-grid .gallery-card:nth-child(6n) {
    border-right: none;
}

/* Works slider page: horizontal scroll layout */
.works-slider-page .art-works-grid {
    display: flex;
    flex-direction: row;
    gap: 0;
    width: fit-content;
    min-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Works slider page - borders for horizontal layout */
.works-slider-page .art-works-grid .gallery-card {
    border-right: 1px solid #000000;
    margin-right: 0;
    flex-shrink: 0;
}

/* Remove right border from last card in slider */
.works-slider-page .art-works-grid .gallery-card:last-child {
    border-right: none;
}

/* 모바일에서 gallery(works slider)에서는 한 화면에 최소 3개가 보이도록 카드 크기 조정 */
@media (max-width: 768px) {
    .works-slider-page .art-works-grid .gallery-card {
        width: calc((100vw - 48px) / 3); /* 좌우 여백과 카드 간격을 감안한 3열 */
        height: auto;
        padding: 8px;
    }

    .works-slider-page .art-works-grid .card-inner {
        height: auto;
        min-height: 0;
        aspect-ratio: 3 / 4; /* 세로형 비율 유지 */
    }

    .works-slider-page .art-works-grid .card-front img,
    .works-slider-page .art-works-grid .card-front video {
        object-fit: cover;
    }
}

/* Exhibition Grid - 3 columns layout */
.exhibition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
    max-width: none;
    transition: none;
}

.exhibition-grid .gallery-card {
    width: 100%;
    max-width: none;
    margin-right: 0;
    position: relative;
    overflow: visible;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

/* Remove right border from last column (every 3rd item) */
.exhibition-grid .gallery-card:nth-child(3n) {
    border-right: none;
}

/* Remove bottom border from items in the last row */
.exhibition-grid .gallery-card:nth-last-child(-n+3) {
    border-bottom: none;
}

/* Exhibitions page layout */
.exhibitions-layout {
    display: flex;
    flex-direction: column;
    gap: clamp(32px, 4vw, 72px);
    align-items: flex-start;
    /* padding-block: clamp(32px, 5vw, 96px); */
    padding-left: calc((100% - 1024px) / 2);
    padding-right: calc((100% - 1024px) / 2);
}

.exhibitions-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    width: 100%;
    position: static;
}

.exhibitions-copy h1 {
    font-size: 40px;
    margin-bottom: 8px;
}

.exhibitions-copy h2 {
    margin-top: 32px;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.exhibitions-copy .exhibit {
    padding-block: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.exhibitions-gallery {
    width: 100%;
    pointer-events: auto;
}

.masonry-grid {
    position: relative;
    width: 100%;
    column-count: 3;
    column-gap: clamp(12px, 1.5vw, 18px);
    pointer-events: auto;
}

.masonry-card {
    display: block;
    width: 100%;
    margin: 0 0 clamp(16px, 2vw, 24px) 0;
    padding: 0;
    border: none;
    background: transparent;
    position: relative;
    break-inside: avoid;
    page-break-inside: avoid;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.masonry-card:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
}

.masonry-card-media {
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    background: #f8f8f8;
    width: 100%;
}

.masonry-card-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 220ms ease-out;
}

.masonry-card:hover .masonry-card-media img {
    transform: scale(1.03);
}

.exhibitions-gallery .gallery-chip {
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 2px 6px;
    border-radius: 0px;
    background: rgba(15, 15, 15, 0.6);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    pointer-events: none;
    text-transform: uppercase;
    animation: chip-label-cycle 2.4s ease-in-out infinite;
}

.exhibitions-gallery .gallery-chip:empty {
    display: none;
}

.exhibitions-gallery .gallery-chip::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(255, 225, 120, 0.3) 0%,
        rgba(255, 255, 255, 0.25) 45%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0.7;
    mix-blend-mode: screen;
    animation: chip-highlight-shift 2.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes chip-label-cycle {
    0%,
    100% {
        color: #fff6c2;
    }
    50% {
        color: #ffffff;
    }
}

@keyframes chip-highlight-shift {
    0% {
        transform: translate(-6%, -6%);
        opacity: 0.4;
    }
    50% {
        transform: translate(4%, 4%);
        opacity: 0.85;
    }
    100% {
        transform: translate(-6%, -6%);
        opacity: 0.4;
    }
}

.gallery-status {
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.6);
}

.hoover-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 5vw, 72px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 2000;
}

@media (max-width: 768px) {
    .hoover-overlay {
        -webkit-overflow-scrolling: touch;
    }
}

.hoover-toggle {
    display: none;
}

.hoover-slide-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hoover-overlay.is-visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.hoover-dialog {
    width: min(1040px, 95vw);
    background: transparent;
    border-radius: 0;
    border: none;
    position: relative;
    box-shadow: none;
    max-height: 90vh;
    backdrop-filter: none;
    overflow: hidden;
    cursor: default;
    user-select: none;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .hoover-dialog {
        cursor: grab;
    }

    .hoover-dialog:active {
        cursor: grabbing;
    }
}

.hoover-slider-container {
    display: flex;
    align-items: stretch;
    width: 100%;
    flex: 1;
    min-height: clamp(400px, 60vh, 600px);
    position: relative;
    overflow: hidden;
}

.hoover-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(10px, 3vw, 20px);
    padding: clamp(10px, 3vw, 20px);
    opacity: 0.3;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: rgb(255, 255, 255); 
    pointer-events: auto;
    cursor: pointer;
    box-sizing: border-box;
}

.hoover-slide-item.hoover-slide-current {
    opacity: 1;
    z-index: 2;
    transform: translateX(0);
}

.hoover-slide-item.hoover-slide-prev {
    transform: translateX(-100%);
    z-index: 1;
}

.hoover-slide-item.hoover-slide-next {
    transform: translateX(100%);
    z-index: 1;
}

@media (min-width: 769px) {
    .hoover-slide-item.hoover-slide-prev,
    .hoover-slide-item.hoover-slide-next {
        display: none;
    }

    .hoover-slide-item.hoover-slide-prev:hover,
    .hoover-slide-item.hoover-slide-next:hover {
        opacity: 0.3;
    }
}

.hoover-slide-item:hover {
    opacity: 0.6;
}

.hoover-slide-item.hoover-slide-current:hover {
    opacity: 1;
}

.hoover-slide-media {
    min-height: clamp(220px, 35vh, 420px);
    max-height: 60vh;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 1.2vw, 16px);
}

.hoover-slide-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.hoover-slide-prev .hoover-slide-media img,
.hoover-slide-next .hoover-slide-media img {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

.hoover-slide-prev:hover .hoover-slide-media img,
.hoover-slide-next:hover .hoover-slide-media img {
    filter: blur(1px);
}

.hoover-slide-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.hoover-indicators {
    display: none;
}

.hoover-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #999;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.hoover-indicator:hover {
    background: #666;
    transform: scale(1.2);
}

.hoover-indicator.active {
    background: #000;
    transform: scale(1.3);
}

.hoover-copy {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.hoover-chip {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(17, 17, 17, 0.7);
    margin: 0;
}

.hoover-description {
    font-size: 16px;
    margin: 0;
    color: rgba(17, 17, 17, 0.75);
    font-weight: 600;
}

.hoover-details {
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    color: rgba(17, 17, 17, 0.85);
}

.hoover-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border-radius: 2px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 150ms ease;
    z-index: 10;
    color: #000;
}

.hoover-close:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
}

.hoover-close:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
}

.hoover-close-top {
    position: relative;
    width: 100%;
    padding: 16px 0;
    border: none;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    background: #f5eae2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 400;
    color: #000;
    text-align: center;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
    font-family: inherit;
}

/* Exhibitions modal: white background for close button */
#exhibition-hoover .hoover-close-top {
    background: #ffffff;
}

.hoover-close-top:hover {
    opacity: 0.6;
}


body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    body.modal-open {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 900px) {
    .exhibitions-layout {
        gap: 40px;
    }

    .exhibitions-copy {
        position: static;
        max-width: none;
    }

    .masonry-grid {
        column-count: 2;
        column-gap: clamp(12px, 1.5vw, 18px);
    }
    
    .masonry-card {
        margin-bottom: clamp(16px, 2vw, 24px);
        break-inside: avoid;
    }

    .hoover-dialog {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
        column-gap: clamp(8px, 2vw, 12px);
    }
    
    .masonry-card {
        margin-bottom: clamp(12px, 2vw, 16px);
    }

    .hoover-dialog {
        padding: 0;
        max-height: 85vh;
        height: 85vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .hoover-slider-container {
        min-height: calc(85vh - 60px); /* Account for close button */
        flex: 1 1 auto;
        position: relative;
        overflow: hidden;
        height: calc(85vh - 60px);
    }

    .hoover-close-top {
        padding: 12px 0;
        font-size: 0.9rem;
    }

    .hoover-toggle {
        display: none; /* Hide toggle on mobile */
    }

    .hoover-toggle-btn {
        flex: 1;
        padding: 12px 0;
        border: none;
        background: transparent;
        font-size: 0.9rem;
        font-weight: 400;
        color: #000;
        cursor: pointer;
        transition: opacity 0.2s ease, background-color 0.2s ease;
        border-right: 1px solid #000;
        font-family: inherit;
    }

    .hoover-toggle-btn:last-child {
        border-right: none;
    }

    .hoover-toggle-btn:hover {
        opacity: 0.6;
    }

    .hoover-toggle-btn.active {
        background: #fbf5f0;
        font-weight: 500;
    }

    /* On mobile, only show current slide and use relative positioning */
    .hoover-slide-item.hoover-slide-prev,
    .hoover-slide-item.hoover-slide-next {
        display: none !important;
    }

    .hoover-slide-item.hoover-slide-current {
        position: relative;
        transform: none !important;
        opacity: 1 !important;
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure buttons and clickable elements work on mobile */
    .masonry-card {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        pointer-events: auto;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .masonry-card-media,
    .masonry-card-media img {
        pointer-events: none;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
    
    .hoover-close-top,
    button,
    a {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    /* Title section - show first (chip + title only) */
    .hoover-slide-item.hoover-slide-current .hoover-slide-text {
        display: flex !important;
        flex-direction: column;
        padding: 20px 20px 0 20px;
        min-height: 0;
        box-sizing: border-box;
        order: 1;
        position: relative;
        z-index: 2;
        flex-shrink: 0;
    }

    /* Hide description and details from title section */
    .hoover-slide-item.hoover-slide-current .hoover-slide-text .hoover-description,
    .hoover-slide-item.hoover-slide-current .hoover-slide-text .hoover-details {
        display: none !important;
    }

    /* Image section - show second */
    .hoover-slide-item.hoover-slide-current .hoover-slide-media {
        display: flex !important;
        flex-direction: column;
        padding: 20px;
        background: rgba(0, 0, 0, 0.02);
        min-height: clamp(220px, 35vh, 420px);
        max-height: none;
        box-sizing: border-box;
        order: 2;
        position: relative;
        z-index: 1;
        flex-shrink: 0;
    }

    /* Description section created by JavaScript - show third */
    .hoover-slide-item.hoover-slide-current .hoover-mobile-description-section {
        order: 3;
        padding: 0 20px 20px 20px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .hoover-mobile-description-section .hoover-description {
        font-size: 16px;
        margin: 0;
        color: rgba(17, 17, 17, 0.75);
        font-weight: 600;
    }

    .hoover-mobile-description-section .hoover-details {
        font-size: 15px;
        line-height: 1.7;
        margin: 0;
        color: rgba(17, 17, 17, 0.85);
    }

    .hoover-slide-copy {
        max-height: none;
        overflow-y: visible;
    }

}

/* Byeongpoong Book Container */
.byeongpoong-book-container {
    display: flex;
    flex-direction: column;
    width: calc(100% + 64px);
    margin-left: -32px;
    margin-right: -32px;
    padding: 0px 0;
    box-sizing: border-box;
}

.byeongpoong-book-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 0px 0;
    letter-spacing: 1px;
    color: #000;
    text-align: center;
    position: relative;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 100%;
}

.byeongpoong-book-title::before {
    content: '';
    position: absolute;
    left: -32px;
    right: -32px;
    top: 0;
    height: 1px;
    background: #000000;
}

.byeongpoong-book-title::after {
    content: '';
    position: absolute;
    left: -32px;
    right: -32px;
    bottom: 0;
    height: 1px;
    background: #000000;
}

/* Byeongpoong Book Grid - 2 columns layout */
.byeongpoong-book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

.byeongpoong-book-grid .gallery-card {
    width: 100%;
    max-width: none;
    margin-right: 0;
    position: relative;
    overflow: hidden;
    border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    display: flex;
    flex-direction: column;
    padding: 12px;
    padding-bottom: 0;
    box-sizing: border-box;
}

/* Remove right border from last column (2nd item) */
.byeongpoong-book-grid .gallery-card:nth-child(2n) {
    border-right: none;
}

/* Remove bottom border from items in the last row */
.byeongpoong-book-grid .gallery-card:nth-last-child(-n+2) {
    border-bottom: none;
}

.gallery-slide-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.gallery-slide-btn:hover {
    border-color: #000;
    background: rgba(0, 0, 0, 0.02);
}

.gallery-slide-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

.gallery-slide-btn svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    fill: none;
    transition: stroke 0.2s ease;
}

.gallery-slide-btn:hover svg {
    stroke: #000;
}

.gallery-slide-btn:disabled {
    border-color: #f0f0f0;
    background: transparent;
    cursor: not-allowed;
}

.gallery-slide-btn:disabled:hover {
    border-color: #f0f0f0;
    background: transparent;
}

.gallery-slide-btn:disabled svg {
    stroke: #ccc;
}

/* Responsive Design for Main Content */
/* On large screens (>1200px), exhibitions page content fixed at 960px, margins adjust */
@media (min-width: 1201px) {
    body.exhibitions-page .main-content {
        width: 960px;
        max-width: 960px;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }
    
    body.works-page .main-content {
        width: 960px;
        max-width: 960px;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }
}

@media (max-width: 1800px) {
    .art-works-grid {
        grid-template-columns: repeat(5, 280px);
        width: fit-content;
        max-width: 100%;
    }
    
    .art-works-grid .gallery-card:nth-child(5n) {
        border-right: none;
    }
}

@media (max-width: 1200px) {
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    /* Exhibition page maintains 960px, only padding adjusts */
    body.exhibitions-page .main-content {
        max-width: 960px;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));

    }
    
    /* Works page maintains 960px, only padding adjusts */
    body.works-page .main-content {
        max-width: 960px;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }
    
    .art-works-grid {
        grid-template-columns: repeat(4, 280px);
        width: fit-content;
        max-width: 100%;
    }
    
    .art-works-grid .gallery-card:nth-child(5n) {
        border-right: 1px solid #000000;
    }
    
    .art-works-grid .gallery-card:nth-child(4n) {
        border-right: none;
    }
    
    
}

@media (max-width: 900px) {
    .main-content {
        /* max-width: calc(100% - 360px); */
        max-width: 960px;
    }
    
    /* Exhibition page always maintains 960px max-width with responsive padding */
    body.exhibitions-page .main-content {
        max-width: 960px !important;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }
    
    /* Works page always maintains 960px max-width with responsive padding */
    body.works-page .main-content {
        max-width: 960px !important;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }
    
    .art-works-grid {
        grid-template-columns: repeat(3, 280px);
        width: fit-content;
        max-width: 100%;
    }
    
    .art-works-grid .gallery-card:nth-child(4n) {
        border-right: 1px solid #000000;
    }
    
    .art-works-grid .gallery-card:nth-child(3n) {
        border-right: none;
    }
    
    
    .art-works-grid .gallery-card:nth-last-child(-n+3) {
        border-bottom: none;
    }
    
    .gallery-card {
        width: 280px;
    }
    
    .gallery-slide-btn {
        width: 36px;
        height: 36px;
    }
    
    .gallery-slide-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .gallery-wrapper {
        gap: 0;
    }
}

@media (max-width: 768px) {
    /* 홈을 제외한 페이지는 모바일에서 헤더 높이만큼 여백을 두고, 좌우 여백만 두고 전체 폭 사용 */
    body:not(.home-page):not(.exhibitions-page):not(.works-page) .main-content {
        max-width: 100%;
        padding: calc(60px + 16px) 16px 24px; /* 위: 헤더(60px) + 16, 좌우: 16, 아래: 24 */
        border-left: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Exhibition page maintains 960px on mobile, only padding adjusts */
    body.exhibitions-page .main-content {
        max-width: 960px;
        padding-top: calc(60px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }
    
    /* Works page maintains 960px on mobile, only padding adjusts */
    body.works-page .main-content {
        max-width: 960px;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }

    /* Journeys page - Mobile responsive */
    body.journeys-page .main-content {
        max-width: 100%;
        padding: calc(60px + 16px) 16px 24px;
        border-left: none;
        margin-left: 0;
        margin-right: 0;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Journeys page - lang-content mobile optimization */
    body.journeys-page .lang-content {
        max-width: 100%;
        margin: 0;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
        overflow-x: hidden;
    }

    /* Allow gallery to scroll even if parent has overflow hidden */
    body.journeys-page .lang-content > .journey-video-gallery,
    body.journeys-page .lang-content .journey-video-gallery {
        overflow-x: auto;
        overflow-y: hidden;
        width: calc(100% + 32px);
        max-width: calc(100% + 32px);
        margin-left: -16px;
        margin-right: -16px;
    }

    /* Journeys page - ensure all text content wraps properly */
    body.journeys-page .lang-content p,
    body.journeys-page .lang-content div:not(.gallery-wrapper):not(.gallery-container):not(.journey-video-gallery):not(.journey-video-item),
    body.journeys-page .lang-content span:not(.journey-video-item *),
    body.journeys-page .lang-content a:not(.journey-video-item *),
    body.journeys-page .lang-content li,
    body.journeys-page .lang-content h1,
    body.journeys-page .lang-content h2,
    body.journeys-page .lang-content h3,
    body.journeys-page .lang-content h4,
    body.journeys-page .lang-content h5,
    body.journeys-page .lang-content h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Journeys page - ensure images don't overflow on mobile */
    body.journeys-page .lang-content img:not(.journey-gallery-item img) {
        max-width: 100%;
        height: auto;
        display: block;
        box-sizing: border-box;
    }

    /* Gallery wrapper and container for journeys page - Mobile responsive */
    body.journeys-page .gallery-wrapper {
        margin: 10px 0;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        box-sizing: border-box;
    }

    body.journeys-page .gallery-container {
        scroll-padding: 16px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        will-change: scroll-position;
    }

    /* Journey video gallery - Mobile responsive */
    body.journeys-page .journey-video-gallery {
        gap: 12px;
        padding: 0 16px;
        scroll-padding: 16px;
        width: calc(100% + 32px);
        max-width: calc(100% + 32px);
        min-width: 0;
        margin-left: -16px;
        margin-right: -16px;
        box-sizing: content-box;
    }

    .journey-video-item {
        flex-shrink: 0;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .journey-video-item video {
        width: min(280px, calc(100vw - 64px));
        max-width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        display: block;
        touch-action: pan-x pinch-zoom;
    }

    /* Journey text - Mobile responsive */
    body.journeys-page h1 {
        font-size: 1.5rem;
    }

    body.journeys-page h2.journey-title,
    body.journeys-page h3.journey-title {
        font-size: inherit;
        font-weight: inherit;
        margin: 0;
        line-height: inherit;
    }

    .journey-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .journey-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .journey-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Legacy - Journeys 등 이미지 그리드를 한 컬럼으로 정리해서 화면 안에 딱 맞게 */
    .journey-images {
        grid-template-columns: 1fr;
        justify-content: stretch;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .journey-preview-img,
    .journey-images video {
        width: 100%;
        height: auto;
    }
    
    .art-works-grid {
        grid-template-columns: repeat(2, 250px);
        gap: 0;
        width: fit-content;
        max-width: 100%;
    }
    
    .art-works-grid .gallery-card:nth-child(3n) {
        border-right: 1px solid #000000;
    }
    
    .art-works-grid .gallery-card:nth-child(2n) {
        border-right: none;
    }
    
    
    .gallery-card {
        width: 250px;
    }
    
    .art-works-grid .gallery-card {
        width: 250px;
        margin: 0;
    }
    
    .gallery-slide-btn {
        width: 32px;
        height: 32px;
    }
    
    .gallery-slide-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .gallery-wrapper {
        gap: 0;
    }
}

@media (max-width: 480px) {
    /* 더 작은 화면에서는 여백을 줄이고 거의 풀폭으로, 헤더 높이만큼 상단 여백 유지 */
    body:not(.home-page):not(.exhibitions-page):not(.works-page) .main-content {
        max-width: 100%;
        padding: calc(60px + 8px) 12px 16px; /* 위: 헤더(60px) + 8, 좌우: 12, 아래: 16 */
        border-left: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Exhibition page maintains 960px even on small screens with responsive padding */
    body.exhibitions-page .main-content {
        max-width: 960px !important;
        padding-top: calc(60px + 32px);
        padding-bottom: 32px;
        padding-left: clamp(12px, 2.5vw, 32px);
        padding-right: clamp(12px, 2.5vw, 32px);
    }
    
    /* Works page maintains 960px even on small screens with responsive padding */
    body.works-page .main-content {
        max-width: 960px !important;
        padding-top: calc(60px + 53px + 32px);
        padding-bottom: 32px;
        padding-left: max(32px, calc((100vw - 960px) / 2));
        padding-right: max(32px, calc((100vw - 960px) / 2));
    }

    /* 작은 화면에서 masonry grid는 1열로 */
    .masonry-grid {
        column-count: 1;
        column-gap: 0;
    }
    
    .masonry-card {
        margin-bottom: clamp(12px, 2vw, 16px);
    }

    /* Journeys page - Small mobile responsive */
    body.journeys-page .main-content {
        padding: calc(60px + 8px) 12px 16px;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Journeys page - lang-content small mobile optimization */
    body.journeys-page .lang-content {
        max-width: 100%;
        margin: 0;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Journeys page - ensure all text content wraps properly on small mobile */
    body.journeys-page .lang-content p,
    body.journeys-page .lang-content div:not(.gallery-wrapper):not(.gallery-container):not(.journey-video-gallery):not(.journey-video-item),
    body.journeys-page .lang-content span:not(.journey-video-item *),
    body.journeys-page .lang-content a:not(.journey-video-item *),
    body.journeys-page .lang-content li,
    body.journeys-page .lang-content h1,
    body.journeys-page .lang-content h2,
    body.journeys-page .lang-content h3,
    body.journeys-page .lang-content h4,
    body.journeys-page .lang-content h5,
    body.journeys-page .lang-content h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    /* Journeys page - ensure images don't overflow on small mobile */
    body.journeys-page .lang-content img:not(.journey-gallery-item img) {
        max-width: 100%;
        height: auto;
        display: block;
        box-sizing: border-box;
    }

    /* Gallery wrapper and container for journeys page - Small mobile responsive */
    body.journeys-page .gallery-wrapper {
        margin: 10px 0;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        box-sizing: border-box;
    }

    body.journeys-page .gallery-container {
        scroll-padding: 12px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        touch-action: pan-x;
        position: relative;
        -ms-overflow-style: -ms-autohiding-scrollbar;
    }

    .journey-gallery {
        gap: 10px;
        padding: 0 12px;
        width: fit-content;
        display: flex;
    }

    /* Journey video gallery - Small mobile responsive */
    body.journeys-page .journey-video-gallery {
        gap: 10px;
        padding: 0 12px;
        scroll-padding: 12px;
        width: calc(100% + 24px);
        max-width: calc(100% + 24px);
        min-width: 0;
        margin-left: -12px;
        margin-right: -12px;
        box-sizing: content-box;
    }

    /* Allow gallery to scroll even if parent has overflow hidden on small mobile */
    body.journeys-page .lang-content > .journey-video-gallery,
    body.journeys-page .lang-content .journey-video-gallery {
        overflow-x: auto;
        overflow-y: hidden;
        width: calc(100% + 24px);
        max-width: calc(100% + 24px);
        margin-left: -12px;
        margin-right: -12px;
    }

    .journey-video-item video {
        width: min(260px, calc(100vw - 48px));
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        display: block;
        touch-action: pan-x pinch-zoom;
    }

    /* Journey text - Small mobile responsive */
    body.journeys-page h1 {
        font-size: 1.3rem;
    }

    body.journeys-page h2.journey-title,
    body.journeys-page h3.journey-title {
        font-size: inherit;
        font-weight: inherit;
        margin: 0;
        line-height: inherit;
    }

    .journey-title {
        font-size: 1rem;
    }

    .journey-description {
        font-size: 0.85rem;
    }

    /* 작은 화면에서도 그리드는 한 컬럼 유지 */
    .journey-images {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .journey-preview-img,
    .journey-images video {
        width: 100%;
    }
    
    .art-works-grid {
        grid-template-columns: repeat(1, 220px);
        gap: 0;
        width: fit-content;
        max-width: 100%;
    }
    
    .art-works-grid .gallery-card:nth-child(2n) {
        border-right: 1px solid #000000;
    }
    
    .art-works-grid .gallery-card {
        border-right: none;
    }
    
    
    .gallery-card {
        width: 220px;
    }
    
    .art-works-grid .gallery-card {
        width: 220px;
        margin: 0;
    }
    
    .gallery-slide-btn {
        width: 28px;
        height: 28px;
    }
    
    .gallery-slide-btn svg {
        width: 10px;
        height: 10px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .gallery-wrapper {
        gap: 0;
    }
}

.gallery-card {
    position: relative;
    padding: 12px;
    padding-bottom: 0;
    border-radius: 0px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 280px;
    height: auto;
    background: transparent;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
}

/* Art works grid - fixed card size */
.art-works-grid .gallery-card {
    width: 280px;
    height: 420px;
    margin: 0;
    padding: 12px;
    padding-bottom: 0;
    box-sizing: border-box;
}


/* Remove the ::after divider for art-works-grid, use border instead */
.art-works-grid .gallery-card:not(:last-child)::after {
    display: none;
}

/* Override for exhibition-grid cards - remove the default divider */
.exhibition-grid .gallery-card:not(:last-child)::after {
    display: none;
}

.gallery-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    /* transform: translateY(-2px); */
    border-color: #d0d0d0;
}

.card-inner {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: 0;
}

.art-works-grid .card-inner {
    height: 320px;
    flex: none;
    min-height: 320px;
}

.byeongpoong-book-grid .card-inner {
    height: auto;
    min-height: 0;
    flex: 1;
    aspect-ratio: 1.5;
    max-height: 400px;
    overflow: hidden;
}

.card-front {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: 1px solid #f5f5f5;
    border-radius: 1px;
}

.byeongpoong-book-grid .card-front img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-back {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.8s ease;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1px;
}

.gallery-card:hover .card-back,
.gallery-card:active .card-back {
    opacity: 1;
}

.card-back h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c2c2c;
    text-align: center;
    letter-spacing: 0.3px;
}

.card-back p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    text-align: center;
    letter-spacing: 0.2px;
    padding-bottom: 12px;
}

/* 모바일에서는 gallery 카드의 텍스트를 더 작게 / 간결하게 */
@media (max-width: 768px) {
    .gallery-card .card-title {
        display: none; /* 미리보기에서는 제목 텍스트 숨김 */
    }

    .gallery-card .card-back h3 {
        font-size: 0.95rem;
    }

    .gallery-card .card-back p {
        font-size: 0.8rem;
    }

    /* 카드 뒷면 설명도 모바일 프리뷰에서는 숨기고, 확대 모달에서만 보이도록 */
    .gallery-card .card-back {
        display: none;
    }
}

.expand-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 모바일에서는 갤러리 카드의 확대 버튼 숨기기 */
@media (max-width: 768px) {
    .expand-button {
        display: none;
    }
}

.expand-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.2);
}

.expand-button svg {
    width: 18px;
    height: 18px;
    stroke: #333;
    fill: none;
}

/* Card title below the image */
.card-title {
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 400;
    color: #000;
    border-top: 1px solid #e0e0e0;
    margin-top: 12px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

/* Mobile touch support */
@media (hover: none) and (pointer: coarse) {
    .gallery-card:active .card-back {
        opacity: 1;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px 20px;
}

/* Ensure image modal appears above journey detail modal - must come after .modal */
#imageModal.modal {
    z-index: 10000 !important;
}

/* Force override for imageModal - highest priority */
div#imageModal.modal {
    z-index: 10000 !important;
}

/* Even more specific selector for journeys page */
body.journeys-page #imageModal.modal,
body.journeys-page div#imageModal.modal {
    z-index: 10000 !important;
}

/* ImageModal Close button - white background, match image/video width */
#imageModal .journey-detail-close {
    background: #ffffff;
    width: 30%;
    max-width: 50vw;
    padding: 16px 16px;
    margin-top: 10px;
    height: 10px;
    align-self: center;
    border: 1px solid #cccccce3;
    border-radius: 0px;
}

/* 전체 화면 느낌을 위한 모달 전체화면 상태 */
html.modal-fullscreen-active,
body.modal-fullscreen-active {
    height: 100%;
    overflow: hidden;
}

/* 모바일에서는 주소창이 스크롤로 숨겨지는 효과를 내기 위해
   모달이 열릴 때 페이지 자체를 더 길게 만들어 살짝 스크롤할 수 있게 함 */
@media (max-width: 768px) {
    html.modal-fullscreen-active,
    body.modal-fullscreen-active {
        height: auto;
        min-height: 200vh;
        overflow-y: scroll;
        overflow-x: hidden;
    }
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 100%;
    max-width: 90vw;
    z-index: 10000 !important;
    text-align: center;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 80px);
    /* 확대 시 부드러운 느낌을 위한 기본 상태 */
    transform-origin: center center;
}

.modal-content img {
    max-width: 90vw;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0px;
    display: block;
}

.modal-content video {
    max-width: 90vw;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0px;
    display: block;
}

.modal-content h3 {
    color: rgb(0, 0, 0);
    margin: 2px 0 2px 0;
    font-size: 1.5rem;
    font-weight: 400;
    flex-shrink: 0;
}

.modal-content p {
    color: rgb(0, 0, 0);
    margin: 0;
    font-size: 0.9rem;
    font-weight: 300;
    flex-shrink: 0;
    line-height: 1.4;
}

.close {
    position: relative;
    margin-top: 20px;
    color: rgb(0, 0, 0);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background: rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.close:hover {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.8);
}

.close:focus {
    outline: none;
}

/* 확대 모달의 자연스러운 등장 애니메이션 */
@keyframes modalZoomIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content.modal-animate-in {
    animation: modalZoomIn 220ms ease-out;
}

/* 모바일에서 모달 닫기 버튼이 항상 화면 상단에 보이도록 조정 */
@media (max-width: 768px) {
    /* 모바일에서 주소창(위/아래)을 고려한 안전 여백 처리 */
    .modal {
        padding: calc(24px + env(safe-area-inset-top, 0px))
                 12px
                 calc(24px + env(safe-area-inset-bottom, 0px));
        align-items: center;
        justify-content: center;
    }

    .modal-content {
        align-items: center;
        justify-content: flex-start;
        padding-top: 8px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px);
    }

    .modal-content img,
    .modal-content video {
        /* 위의 주소창과 아래 툴바 영역을 피해, 설명 텍스트가 가려지지 않도록 여유를 둠 */
        max-height: 60vh;
    }

    /* 설명 텍스트가 하단 툴바에 가려지지 않도록 별도 스크롤 영역 부여 */
    #modalDescription {
        margin-top: 8px;
        margin-bottom: 0;
        max-height: 20vh;
        overflow-y: auto;
    }

    /* 모바일에서는 모달 내부의 닫기 버튼은 숨기고,
       배경 탭으로만 닫히도록 (이미 modal 배경 탭 시 closeModal 호출됨) */
    .close {
        display: none;
    }
}

/* Custom Scrollbar - Simple Style */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d0d0d0;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #ffffff transparent;
}

/* Works Navigation Links */
.works-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    border-bottom: 1px solid #e2e2e2;
    border-left: 1px solid #e2e2e2;
    border-right: 1px solid #e2e2e2;
    padding-top: 1px;
    padding-bottom: 1px;
    margin-bottom: 0;
    background: #fff;
    z-index: 1;
}

.works-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100% - 640px);
    padding-left: 32px;
    padding-right: 32px;
}

.works-nav-button {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: none;
    padding: 4px 12px;
    border: 1px solid transparent;
    display: inline-block;
}

.works-nav-button:hover {
    text-decoration: underline;
}

.works-nav-button-script {
    font-family: 'Lucida Handwriting', 'Comic Sans MS', cursive, serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.2rem;
}

.works-nav-button-tech {
    font-family:  'Monaco', 'Menlo', 'Consolas', monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.2rem;
}

/* News Section */
.news-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.news-item {
    width: 100%;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.news-item:not(:last-child) {
    padding-bottom: 60px;
    border-bottom: 1px solid #e0e0e0;
}

/* Byeongpoong Hero Container */
.byeongpoong-hero-container {
    position: relative;
    width: 100%;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 홈 화면에서 전체 영역을 채우도록 */
    height: 100%;
    min-height: 100%;
}

.byeongpoong-background {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* 가로·세로 모두 채우되 비율 유지 */
    /* 아이패드 등에서 하단 흰 여백이 보일 때 이미지를 아래쪽으로 반사시켜 자연스럽게 이어지도록 */
    -webkit-box-reflect: below 0
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.2) 40%,
            rgba(255, 255, 255, 0.8) 100%
        );
}

.nar-sticker-wrapper {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    pointer-events: none;
}

.nar-sticker-btn {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 터치 디바이스에서도 확실하게 보이도록 JS에서 붙이는 클래스 (기본 확대 효과) */
.nar-sticker-btn.touch-active {
    transform: scale(1.1);
}

/* 마우스가 있는 데스크탑에서만 hover/active 효과 적용 */
@media (hover: hover) and (pointer: fine) {
    .nar-sticker-btn:hover {
        transform: scale(1.1);
    }

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

.nar-sticker-img {
    width: auto;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.heart-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
    color: #000;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.heart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #e63946;
    animation: wingFlap 0.8s ease-in-out;
}

.heart-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(230, 57, 70, 0.3));
}

@keyframes wingFlap {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    50% {
        transform: scale(1.2) rotate(0deg);
    }
    75% {
        transform: scale(1.15) rotate(5deg);
    }
}

@keyframes wingFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-3px) rotate(2deg);
    }
}

.heart-icon.animate {
    animation: wingFlap 0.8s ease-in-out;
}

.heart-counter:hover .heart-icon {
    animation: wingFloat 2s ease-in-out infinite;
}

#heart-count {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Speech Bubble */
.speech-bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 12px 18px;
    min-width: 200px;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(255, 242, 0, 0.572);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: none;
    z-index: 10;
}

.speech-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.speech-bubble-content {
    position: relative;
    z-index: 1;
}

.speech-bubble-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #000;
    font-weight: 400;
    word-wrap: break-word;
}

.speech-bubble-tail {
    position: absolute;
    bottom: -8px;
    left: 30%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Model Selector Container */
.model-selector-container {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.model-select-label {
    font-size: 0.85rem;
    font-family: 'AritaBuriKR', sans-serif;
    color: #666;
    white-space: nowrap;
}

.model-select {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    font-family: 'AritaBuriKR', sans-serif;
    color: #000;
    cursor: pointer;
    padding: 2px 4px;
}

.model-select:focus {
    outline: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Chat Input Container */
.chat-input-container {
    position: absolute;
    /* 홈 화면 하단에서 조금 더 위로 띄워서 (아이패드 포함) 여유 공간 확보 */
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    min-width: 300px;
    max-width: 500px;
    z-index: 10;
}

/* 모바일/태블릿에서 주소창/홈 인디케이터에 가리지 않도록 아래 여백 확보
   (아이패드까지 포함하기 위해 폭 1024px 이하 + 터치 디바이스를 대상으로 적용) */
@media (max-width: 1024px) and (pointer: coarse) {
    /* 가로 스크롤 방지 및 위아래만 스크롤 */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
        touch-action: pan-y;
    }

    /* 홈 페이지는 키보드 등장 시에도 레이아웃이 밀리지 않도록 고정 */
    body.home-page {
        height: 100vh;
        height: 100dvh; /* 동적 뷰포트 높이 지원 */
        overflow: hidden;
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }

    body.home-page #content-area,
    body.home-page .main-content {
        height: 100vh;
        height: 100dvh; /* 동적 뷰포트 높이 지원 */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }

    .chat-input-container {
        position: fixed; /* 뷰포트 기준으로 고정 */
        /* 하단 주소창/홈 인디케이터에 가리지 않도록 여유를 조금 더 줌 */
        bottom: calc(32px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 400px;
        padding: 8px 12px;
        gap: 8px;
        z-index: 1100;
    }

    /* 모바일에서 입력 요소 글자 크기는 최소 16px 이상으로 유지해서 확대(줌) 현상 방지 */
    input,
    textarea,
    select,
    .chat-input {
        font-size: 1rem; /* 약 16px */
    }

    .chat-send-btn svg {
        width: 18px;
        height: 18px;
    }
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    font-family: 'AritaBuriKR', sans-serif;
    color: #000;
    padding: 0;
}

.chat-input::placeholder {
    color: #999;
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    color: #333;
}

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

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* Symbol Buttons Container */
.symbol-buttons-container {
    position: absolute;
    bottom: 150px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.symbol-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.symbol-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.symbol-btn:active {
    transform: scale(0.95);
    background: rgba(0, 0, 0, 0.1);
}

.symbol-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* FormingFigure Card Styles */
.forming-figure-card {
    background: #ffffff;
}

.forming-figure-front {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forming-figure-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #000000;
    font-size: 1.2rem;
    font-weight: 400;
    font-family: 'AritaBuriKR', sans-serif;
}

.forming-text {
    color: #000000;
}

.forming-dots {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.forming-dots .dot {
    color: #000000;
    animation: dotPulse 1.4s ease-in-out infinite;
    display: inline-block;
}

.forming-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.forming-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.forming-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

