* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    overflow: hidden;
    min-height: 100vh;
}

/* 로딩 화면 → shared-ui.css .sui-loading 사용 */

/* 헤더 */
/* 상단 헤더 — 레이아웃은 .sui-header (shared-ui.css) 에서 처리 */
/* #header 고유 스타일만 유지 */

/* 메인 레이아웃 */
#main-container {
    display: flex;
    height: 100vh;
    padding-top: var(--sui-header-height, 52px);
}

/* 갤러리 사이드바 */
#gallery-sidebar {
    width: 200px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-right: 1px solid rgba(255,255,255,0.1);
    overflow-y: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.gallery-item {
    padding: 8px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    background: var(--sui-gold-bg, rgba(255,215,0,0.10));
    border-color: var(--sui-border, rgba(255,215,0,0.20));
}

.gallery-item.active {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
    border-color: var(--sui-gold, #ffd700);
}

.gallery-item-icon {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    overflow: hidden;
}

.gallery-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-item-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    text-align: center;
}

.gallery-item-period {
    font-size: 0.65rem;
    color: #888;
    text-align: center;
    margin-top: 2px;
}

/* 정보 패널 (뷰어 우측 하단) */
#info-panel {
    position: absolute;
    bottom: 70px;
    right: 20px;
    width: 320px;
    padding: 16px;
    background: rgba(10,10,26,0.82);
    border: 1px solid var(--sui-border, rgba(255,215,0,0.20));
    border-radius: var(--sui-radius-md, 10px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#info-panel.hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.info-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-title-group h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--sui-gold, #ffd700);
}

.info-title-group .period {
    font-size: 0.7rem;
    color: #888;
    margin-top: 1px;
}

.info-description {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 12px;
}

.info-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.detail-item {
    font-size: 0.75rem;
}

.detail-label {
    color: #888;
    margin-bottom: 2px;
}

.detail-value {
    color: var(--sui-gold, #ffd700);
}

/* 정보 패널 토글 */
.info-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sui-gold-bg, rgba(255,215,0,0.10));
    border: 1px solid var(--sui-border, rgba(255,215,0,0.20));
    border-radius: 50%;
    color: var(--sui-gold, #ffd700);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    margin-left: auto;
    transition: transform 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
}

.info-toggle:hover {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
}

.info-toggle.collapsed {
    transform: rotate(0deg);
}

.info-toggle:not(.collapsed) {
    transform: rotate(180deg);
}

.info-body {
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    margin-top: 10px;
}

.info-body.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

/* 3D 뷰어 */
#viewer-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

#canvas-container {
    flex: 1;
    position: relative;
}

/* 통합 컨트롤 툴바 */
#unified-toolbar {
    position: absolute;
    top: 10px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 100;
    padding: 5px 6px;
    background: rgba(10,10,26,0.82);
    border: 1px solid var(--sui-border-panel, rgba(255,215,0,0.12));
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 뷰 그룹과 셰이더 그룹 내부 래퍼 */
.toolbar-group {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
}

.toolbar-label {
    color: var(--sui-gold, #ffd700);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    background: var(--sui-gold-bg, rgba(255,215,0,0.10));
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.toolbar-divider {
    width: 2px;
    height: 24px;
    background: rgba(255,215,0,0.25);
    margin: 0 6px;
    flex-shrink: 0;
    border-radius: 1px;
}

/* 뷰/셰이딩 공통 버튼 (통합 툴바용) */
.view-btn {
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #888;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-btn:hover {
    background: var(--sui-gold-bg, rgba(255,215,0,0.10));
    border-color: var(--sui-border, rgba(255,215,0,0.20));
    color: var(--sui-gold, #ffd700);
}

.view-btn.active {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
    border-color: var(--sui-gold, #ffd700);
    color: var(--sui-gold, #ffd700);
}

.shader-btn {
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #888;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.shader-btn:hover {
    background: var(--sui-gold-bg, rgba(255,215,0,0.10));
    border-color: var(--sui-border, rgba(255,215,0,0.20));
    color: var(--sui-gold, #ffd700);
}

.shader-btn.active {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
    border-color: var(--sui-gold, #ffd700);
    color: var(--sui-gold, #ffd700);
}

/* 컨트롤 버튼 (하단 중앙) */
#controls {
    position: absolute;
    bottom: calc(var(--sui-footer-height, 28px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.control-btn {
    padding: 8px 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--sui-radius-pill, 999px);
    color: #888;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: var(--sui-font, 'Noto Sans KR', sans-serif);
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
    color: #ccc;
}

.control-btn.active {
    background: rgba(255, 215, 0, 0.25);
    border-color: var(--sui-gold, #ffd700);
    color: var(--sui-gold, #ffd700);
}

.control-btn.active:hover {
    background: rgba(255, 215, 0, 0.35);
}

/* 절단 컨트롤 패널 */
#clip-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 220px;
    padding: 15px;
    background: rgba(10,10,26,0.82);
    border: 1px solid var(--sui-border, rgba(255,215,0,0.20));
    border-radius: var(--sui-radius-md, 10px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    display: none;
}

#clip-panel.visible {
    display: block;
}

.clip-panel-title {
    font-size: 0.85rem;
    color: var(--sui-gold, #ffd700);
    margin-bottom: 12px;
    font-weight: 500;
}

.clip-mode-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.clip-mode-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #888;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clip-mode-btn:hover {
    background: var(--sui-gold-bg, rgba(255,215,0,0.10));
    border-color: var(--sui-border, rgba(255,215,0,0.20));
}

.clip-mode-btn.active {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
    border-color: var(--sui-gold, #ffd700);
    color: var(--sui-gold, #ffd700);
}

.clip-slider-group {
    margin-bottom: 10px;
}

.clip-slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 6px;
}

.clip-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    outline: none;
}

.clip-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--sui-gold, #ffd700);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clip-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.clip-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--sui-gold, #ffd700);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* 이미지 저장 버튼 (우측 상단) */
#btn-export {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: rgba(10,10,26,0.82);
    border: 1.5px solid var(--sui-border, rgba(255,215,0,0.20));
    border-radius: 50%;
    color: var(--sui-gold, #ffd700);
    cursor: pointer;
    z-index: 150;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0;
    line-height: 0;
}

#btn-export:hover {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
    border-color: var(--sui-gold, #ffd700);
    color: var(--sui-gold-bright, #ffe766);
    transform: scale(1.08);
}

#btn-export svg {
    display: block;
}

/* 튜토리얼 오버레이 */
#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 5000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.tutorial-card {
    background: rgba(10,10,26,0.95);
    border: 2px solid var(--sui-gold, #ffd700);
    border-radius: 20px;
    padding: 28px 32px;
    max-width: 360px;
    width: calc(100% - 40px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    pointer-events: none;
}

.tutorial-card-title {
    color: var(--sui-gold, #ffd700);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tutorial-section {
    margin-bottom: 20px;
}

.tutorial-section:last-child {
    margin-bottom: 0;
}

.tutorial-section-title {
    color: var(--sui-gold, #ffd700);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sui-border, rgba(255,215,0,0.20));
}

.tutorial-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #ccc;
    font-size: 0.85rem;
}

.tutorial-item-icon {
    font-size: 1.2rem;
    min-width: 28px;
    text-align: center;
}

.tutorial-item-text {
    flex: 1;
    line-height: 1.4;
}

.tutorial-dismiss {
    position: fixed;
    bottom: calc(var(--sui-footer-height, 28px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--sui-gold, #ffd700);
    color: #0a0a1a;
    padding: 12px 28px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 5003;
    box-shadow: 0 4px 15px rgba(255,215,0,0.4);
}

/* 모바일 토글 버튼 (뷰/셰이더) */
.mobile-toggle-btn {
    display: none;
    position: absolute;
    top: 10px;
    width: 44px;
    height: 44px;
    background: rgba(10,10,26,0.82);
    border: 1px solid var(--sui-border, rgba(255,215,0,0.20));
    border-radius: 50%;
    color: var(--sui-gold, #ffd700);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 150;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
}

.mobile-toggle-btn:hover,
.mobile-toggle-btn.active {
    background: var(--sui-gold-bg-hover, rgba(255,215,0,0.20));
    border-color: var(--sui-gold, #ffd700);
}

#mobile-view-toggle { right: 110px; }
#mobile-shader-toggle { right: 60px; }

/* 모바일 팝업 패널 */
.mobile-popup-panel {
    display: none;
    position: absolute;
    top: 60px;
    right: 10px;
    padding: 12px;
    background: rgba(10,10,26,0.90);
    border: 1px solid var(--sui-border, rgba(255,215,0,0.20));
    border-radius: var(--sui-radius-md, 10px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 140;
    width: 240px;
    max-width: calc(100vw - 20px);
}

.mobile-popup-panel.visible {
    display: block;
}

.mobile-settings-title {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-settings-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-settings-btns .view-btn,
.mobile-settings-btns .shader-btn {
    flex: 1;
    min-width: calc(50% - 4px);
    text-align: center;
    padding: 10px 8px;
    font-size: 0.8rem;
}

/* === 모바일 반응형 === */
@media (max-width: 900px) {
    #main-container {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }

    #gallery-sidebar {
        width: 100%;
        height: auto;
        max-height: 110px;
        padding: 8px 10px;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #gallery-sidebar::-webkit-scrollbar {
        display: none;
    }

    .gallery-title {
        display: none;
    }

    /* 모바일 정보 패널 */
    #info-panel {
        position: fixed;
        bottom: calc(var(--sui-footer-height, 28px) + 60px);
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 35vh;
        overflow-y: auto;
        z-index: 120;
        padding: 10px 12px;
    }

    .gallery-item {
        min-width: 70px;
        max-width: 70px;
        margin-bottom: 0;
        padding: 6px;
        flex-shrink: 0;
    }

    .gallery-item-icon {
        aspect-ratio: 2 / 1;
        margin-bottom: 3px;
    }

    .gallery-item-icon img {
        padding: 2px;
    }

    .gallery-item-name {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .gallery-item-period {
        display: none;
    }

    #viewer-container {
        flex: 1;
        min-height: 0;
        position: relative;
    }

    #canvas-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    /* 통합 툴바 숨기기 (모바일에서는 설정 패널 사용) */
    #unified-toolbar {
        display: none !important;
    }

    /* 모바일 토글 버튼 표시 */
    .mobile-toggle-btn {
        display: flex;
    }

    #controls {
        position: fixed;
        bottom: calc(var(--sui-footer-height, 28px) + 4px);
        left: 10px;
        right: 10px;
        transform: none;
        gap: 6px;
        z-index: 150;
        flex-wrap: nowrap;
        justify-content: center;
        padding: 5px 8px;
        background: rgba(10,10,26,0.85);
        border-radius: 20px;
        border: 1px solid var(--sui-border-panel, rgba(255,215,0,0.12));
    }

    .control-btn {
        padding: 6px 14px;
        font-size: 0.72rem;
        min-height: 32px;
        flex: 1;
    }

    #btn-fullscreen {
        display: none;
    }

    #btn-export {
        width: 44px;
        height: 44px;
        top: 10px;
        right: 10px;
    }

    #mobile-view-toggle { right: 110px; }
    #mobile-shader-toggle { right: 60px; }

    #clip-panel {
        top: auto;
        bottom: 120px;
        right: 10px;
        left: 10px;
        width: auto;
        z-index: 130;
    }

    .mobile-popup-panel {
        top: 60px;
        right: 10px;
    }

    /* 튜토리얼 모바일 */
    .tutorial-card {
        max-width: 320px;
        padding: 20px 24px;
    }

    .tutorial-card-title {
        font-size: 1.05rem;
        margin-bottom: 18px;
    }

    .tutorial-section-title {
        font-size: 0.8rem;
    }

    .tutorial-item {
        font-size: 0.8rem;
        gap: 10px;
        padding: 6px 0;
    }

    .tutorial-item-icon {
        font-size: 1.1rem;
        min-width: 24px;
    }

    .tutorial-dismiss {
        bottom: 20px;
        padding: 10px 22px;
        font-size: 0.85rem;
    }
}

@media (max-width: 500px) {
    #gallery-sidebar {
        max-height: 95px;
        padding: 6px 8px;
    }

    .gallery-item {
        min-width: 60px;
        max-width: 60px;
        padding: 5px;
    }

    .gallery-item-icon {
        aspect-ratio: 2 / 1;
    }

    .gallery-item-name {
        font-size: 0.6rem;
    }

    #info-panel {
        bottom: calc(var(--sui-footer-height, 28px) + 52px);
        padding: 8px 10px;
    }

    .info-icon {
        width: 36px;
        height: 36px;
    }

    .info-title-group h2 {
        font-size: 0.85rem;
    }

    #controls {
        gap: 4px;
        padding: 4px 6px;
    }

    .control-btn {
        padding: 5px 10px;
        font-size: 0.65rem;
        min-height: 30px;
    }

    .mobile-settings-btns .view-btn,
    .mobile-settings-btns .shader-btn {
        padding: 8px 6px;
        font-size: 0.7rem;
    }

    .mobile-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    #btn-export {
        width: 40px;
        height: 40px;
    }

    #btn-export svg {
        width: 18px;
        height: 18px;
    }

    .mobile-popup-panel {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
    }

    /* 튜토리얼 작은 화면 */
    .tutorial-card {
        max-width: 280px;
        padding: 16px 18px;
    }

    .tutorial-card-title {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    .tutorial-section {
        margin-bottom: 12px;
    }

    .tutorial-section-title {
        font-size: 0.7rem;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }

    .tutorial-item {
        font-size: 0.72rem;
        gap: 8px;
        padding: 4px 0;
    }

    .tutorial-item-icon {
        font-size: 0.95rem;
        min-width: 20px;
    }

    .tutorial-dismiss {
        bottom: calc(var(--sui-footer-height, 28px) + 6px);
        padding: 8px 18px;
        font-size: 0.75rem;
    }
}

/* 매우 작은 화면 (360px 이하) */
@media (max-width: 360px) {
    .tutorial-card {
        max-width: 260px;
        padding: 14px 16px;
    }

    .tutorial-card-title {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .tutorial-section-title {
        font-size: 0.65rem;
    }

    .tutorial-item {
        font-size: 0.68rem;
        gap: 6px;
        padding: 3px 0;
    }

    .tutorial-item-icon {
        font-size: 0.9rem;
        min-width: 18px;
    }

    .tutorial-dismiss {
        padding: 7px 16px;
        font-size: 0.7rem;
    }
}

/* 가로 모드 (Landscape) */
@media (max-width: 900px) and (orientation: landscape) {
    #main-container {
        flex-direction: row;
    }

    #gallery-sidebar {
        width: auto;
        max-width: 100px;
        height: 100%;
        max-height: none;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        border-right: 1px solid rgba(255,255,255,0.1);
        border-bottom: none;
    }

    .gallery-item {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    #info-panel {
        bottom: auto;
        top: 60px;
        left: 110px;
        right: auto;
        width: 260px;
        max-height: calc(100vh - 140px);
    }

    #controls {
        bottom: calc(var(--sui-footer-height, 28px) + 6px);
        left: auto;
        right: 10px;
        transform: none;
        flex-direction: column;
        max-width: 120px;
    }

    .control-btn {
        width: 100%;
    }

    #btn-export {
        right: 10px;
    }

    .mobile-toggle-btn {
        top: 60px;
    }

    #mobile-view-toggle { right: 60px; }
    #mobile-shader-toggle { right: 10px; }

    .mobile-popup-panel {
        top: 110px;
        right: 10px;
        width: 220px;
    }
}

@media (max-width: 700px) and (orientation: landscape) {
    #gallery-sidebar {
        max-width: 80px;
    }

    .gallery-item {
        padding: 4px;
    }

    .gallery-item-icon {
        aspect-ratio: 2 / 1;
    }

    .gallery-item-name {
        font-size: 0.55rem;
    }

    #controls {
        max-width: 100px;
    }

    .control-btn {
        padding: 6px 8px;
        font-size: 0.6rem;
    }
}

/* 언어 선택기 — shared-ui.css (.sui-lang) 에서 골드 테마로 통일 */

/* 토스트 메시지 */
.toast-message {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--sui-gold, #ffd700);
    color: #0a0a1a;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
