@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

:root {
    --primary-color: #0f172a;
    --primary-hover: #1f2937;
    --bg-color: #ffffff;
    --card-bg: #f2f4f8;
    --text-color: #0f172a;
    --text-muted: #6b7280;
    --border-color: #e2e8f0;
    --radius: 10px;
    --transition: 0.3s ease;
    --brand-color: #4A1215;
    --brand-hover: #631a1e;
    --spinner-track: rgba(43, 43, 43, 0.16);
    --spinner-accent: #2b2b2b;
    --spinner-size: 48px;
    --spinner-stroke: 3px;
    --spinner-speed: 0.85s;
}

html {
    font-size: 80%;
}

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

body {
    font-family: 'Outfit', 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif !important;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    padding-bottom: 30rem;
}

body[data-page="home"] .drop-zone {
    border: 1px solid #b6b6b6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body[data-page="home"] .drop-zone:hover {
    border-color: #363636;
    background: #ffffff;
}

body[data-page="home"] .dark-input {
    background: #ffffff;
    border-color: #b6b6b6;
    color: #363636;
}

body[data-page="home"] .dark-input:focus {
    background: #ffffff;
    border-color: #b6b6b6;
    box-shadow: inset 0 0 0 0.25px rgba(15, 23, 42, 0.12);
}

body[data-page="home"] .dark-input:hover {
    border-color: #363636;
    background: #ffffff;
}

body[data-page="home"] .dark-input::placeholder {
    color: #363636;
    opacity: 0.6;
}

body[data-page="home"] .input-label {
    color: #363636;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: none;
}

body[data-page="home"] .drop-zone p {
    color: #363636;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 400;
}

body[data-page="home"] .drop-zone .home-upload-title,
body[data-page="home"] .furniture-item-drop-zone .home-upload-title {
    color: #363636;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
}

body[data-page="home"] .drop-zone .home-upload-sub {
    color: #363636;
    font-size: 0.8rem;
    font-weight: 400;
}

body[data-page="home"] .drop-zone .home-upload-browse {
    color: #363636;
    text-decoration: none;
    font-weight: 700;
}

body[data-page="home"] .drop-zone .is-upload-icon,
body[data-page="home"] .furniture-item-drop-zone .is-upload-icon {
    color: #363636;
    font-size: 2rem;
    opacity: 0.8;
}

/* [기본 레이아웃] 메인 페이지 등 일반 페이지용 (최대폭 제한) */
.container {
    width: 100%;
    max-width: 1200px;
    /* 기본값 복구 */
}

/* [중요] Video Studio 페이지(.vs-page)일 때만 넓게 확장 */
.vs-page .container {
    /* 여기에 원하는 최대 픽셀 값을 입력하세요 (예: 1600px, 1800px 등) */
    max-width: 1800px !important;

    /* 화면이 작을 때는 95%를 유지 */
    width: 95% !important;
}

.vs-page .layout {
    width: 100%;
    display: flex;
    justify-content: center;
}

header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.logo {
    width: 250px;
    height: 250px;
    object-fit: contain;
    display: block;
    margin: 0 auto -2rem;
}
.logo-wordmark {
    width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: -4rem auto 6rem;
}

body[data-page="home"] .logo,
body[data-page="home"] .logo-wordmark {
    filter: invert(1);
}



















header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.subtitle-sub {
    font-size: 0.7rem;
    opacity: 0.6;
    font-weight: 400;
}

.subtitle-sub:last-of-type {
    margin-bottom: 40px;
    /* 담당자 외 배포 금지 아래 간격 */
}

/* --- Buttons --- */
button,
.action-btn,
.style-btn,
.detail-upscale-btn {
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    margin: 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    min-width: 140px;
    background-color: #4A1215;
    color: white;
    font-family: inherit;
}

.action-btn:hover {
    background-color: #631a1e;
    transform: translateY(-2px);
}

.action-btn:disabled {
    background-color: #333333 !important;
    color: #777777 !important;
    cursor: default;
    transform: none !important;
}

.action-btn.secondary {
    background-color: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-weight: 400;
}

body[data-page="home"] .action-btn.secondary,
#moodboard-upload-container .action-btn.secondary {
    border-color: #111111;
    color: #111111;
}

#open-mb-gen-btn {
    border-width: 1px;
    font-weight: 400;
    text-transform: none;
}

#open-mb-gen-btn:hover {
    background-color: transparent;
    color: inherit;
    transform: none;
}

.action-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#moodboard-generator-modal .action-btn.secondary {
    border-color: #444444;
    color: #444444;
}

#moodboard-generator-modal .action-btn.secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.button-group {
    display: flex;
    flex-direction: column;
    /* 세로 배치 */
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* --- Fixed Side Navigation --- */
.side-nav {
    position: fixed !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    padding: 15px 0;
    /* 좌우 패딩 제거하여 수치 계산 단순화 */
    background: #ffffff;
    /* 좀 더 어둡게 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #595959;
    border-radius: 33px;
    z-index: 99999 !important;
    /* 압도적 우선순위 */
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    width: 64px;
    /* 기본 너비 */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
}

.side-nav:hover {
    width: 190px !important;
    /* 호버 시 확장 */
}

.nav-item {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    color: #858593;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    color: #18181b;
    font-weight: 600;
}

.nav-item:hover .material-symbols-outlined {
    color: #18181b;
}

.nav-item.active {
    color: #18181b;
    font-weight: 700;
}

.side-nav:hover .nav-label {
    opacity: 1;
    pointer-events: auto;
}

.nav-item .material-symbols-outlined {
    width: 64px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    color: #858593;
}

.nav-item.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
    color: #18181b;
}

.nav-label {
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.nav-item.active .nav-label {
    font-weight: 700;
}


/* --- Upload Section --- */
.upload-section {
    margin-bottom: 3rem;
}

/* Modern Glow Button */
@keyframes button-glow {
    0% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 0 1px rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.35), 0 0 5px rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.6);
    }

    100% {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 0 1px rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.2);
    }
}

@keyframes button-glow-burgundy {
    0% {
        box-shadow: 0 0 10px rgba(74, 18, 21, 0.3), 0 0 1px rgba(74, 18, 21, 0.4);
        border-color: rgba(150, 50, 50, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(139, 0, 0, 0.6), 0 0 8px rgba(139, 0, 0, 0.5);
        border-color: rgba(255, 100, 100, 0.8);
    }

    100% {
        box-shadow: 0 0 10px rgba(74, 18, 21, 0.3), 0 0 1px rgba(74, 18, 21, 0.4);
        border-color: rgba(150, 50, 50, 0.4);
    }
}

.glow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #383633;
    border: 1px solid #b6b6b6;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: not-allowed;
    transition: all 0.3s ease;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
    min-width: 260px;
    /* ?????? ????? ?????????? ????? ?????? ????????????? */
}


.glow-btn:not(:disabled) {
    color: #ffffff;
    cursor: pointer;
}


.glow-btn.burgundy:not(:disabled) {
    background: #39131A;
    border-color: #e2e8f0;
}

.glow-btn.burgundy:not(:disabled):hover {
    background: #39131A;
    border-color: #e2e8f0;
}

.glow-btn:not(:disabled):hover {
    background: #383633;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: #e2e8f0;
}


.glow-btn:disabled {
    background: #383633;
    opacity: 1;
    color: #ffffff;
    cursor: default;
    border-color: #e2e8f0;
    box-shadow: none;
    transform: none;
}


.glow-btn .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 20;
    color: #ffffff;
}

.detail-upscale-btn .material-symbols-outlined {
    font-size: 16px;
    /* 작은 버튼용 아이콘 크기 축소 */
}

.drop-zone {
    width: 100%;
    max-width: 1000px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    /* Step 3 드랍박스 기준 너비 통일 */
    margin: 0 auto;
    /* 중앙 정렬 */
    background-color: var(--card-bg);
    border: 1px dashed var(--border-color);
    /* 점선 테두리 통일 */
    border-radius: var(--radius);
    padding: 4rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary-color);
    background-color: #1a1a1a;
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.drop-zone strong {
    color: #000000;
    text-decoration: none;
}

#preview-container {
    position: relative;
    margin-top: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#image-preview {
    width: 100%;
    display: block;
}

.icon-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 100;
}

.icon-btn:hover {
    background: rgba(255, 0, 0, 0.6);
    transform: scale(1.1);
}

#close-result-btn {
    top: 20px;
    right: 20px;
    z-index: 110;
    width: 44px;
    height: 44px;
    font-size: 28px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#close-result-btn:hover {
    background: rgba(255, 50, 50, 0.8);
}



/* --- Style Selection --- */
.style-section {
    margin-bottom: 3rem;
}

.style-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #18181b;
    text-align: center;
}

.style-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding-bottom: 1rem;
    overflow-x: visible;
}

.style-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    max-width: 260px;
    flex: 0 0 auto;
    background-color: #ffffff;
    border: 1px solid #b6b6b6;
    color: #363636;
    padding: 0.85rem 1.6rem;
    height: auto;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 400;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.style-btn:hover {
    border-color: #363636;
    color: #363636;
    font-weight: 400;
}

.style-btn.active {
    background-color: #ffffff;
    border: 1px solid #363636;
    color: #363636;
    font-weight: 400;
}

/* --- Variant Grid --- */
#variant-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    justify-content: center;
    align-items: center;
}

.variant-img-btn {
    width: 100%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 10px;
}

.variant-img-btn img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    border: 1px solid var(--text-muted);
    background-color: #222;
    image-rendering: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: transform 0.6s;
}

.variant-img-btn:hover img {
    transform: scale(1.08);
}

.variant-label {
    width: 100%;
    padding: 0.5rem 0;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
}

.variant-img-btn.active img {
    border: 1px solid var(--primary-color);
    box-shadow: none;
}

.variant-img-btn.active .variant-label {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 400;
}

/* --- Furniture Items --- */
#furniture-items-section {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem auto 2.5rem;
}

.furniture-items-header {
    margin-bottom: 1rem;
}

.furniture-items-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #18181b;
    margin-bottom: 0.25rem;
}

.furniture-items-header p {
    font-size: 0.9rem;
    color: #6b7280;
}

#furniture-items-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.furniture-item-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #b6b6b6;
    border-radius: 16px;
    padding: 0.875rem;
    box-shadow: inset 0 0 0 0.25px rgba(15, 23, 42, 0.08);
    text-align: left;
}

.furniture-item-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.furniture-item-card__header > div {
    flex: 1;
    text-align: left;
}

.furniture-item-card__eyebrow {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.furniture-item-card h4 {
    color: #18181b;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    text-align: left;
}

.furniture-item-remove-btn,
.furniture-item-preview-remove {
    top: 0.9rem;
    right: 0.9rem;
}

.furniture-item-media {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 132px;
}

.furniture-item-drop-zone {
    border: 1px dashed #b6b6b6;
    border-radius: 12px;
    padding: 0.875rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 150px;
}

.furniture-item-drop-zone:hover {
    border-color: #363636;
    background: #ffffff;
}

.furniture-item-upload-icon {
    color: #363636;
    font-size: 2rem;
}

.furniture-item-preview {
    position: relative;
    overflow: hidden;
    border: 1px solid #b6b6b6;
    border-radius: 12px;
    background: #ffffff;
    height: 150px;
}

.furniture-item-preview-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.furniture-item-fields {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.furniture-item-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}

.furniture-item-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

body[data-page="home"] .furniture-item-card .input-label {
    margin-bottom: 2px;
}

body[data-page="home"] .furniture-item-card .dark-input {
    min-height: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 0.85rem;
    line-height: 1.2;
}

body[data-page="home"] .furniture-item-card .furniture-item-drop-zone .home-upload-title,
body[data-page="home"] .furniture-item-card .furniture-item-upload-icon {
    color: #363636 !important;
}

#add-furniture-item-btn {
    margin: 1rem auto 0;
    display: inline-flex;
    min-width: 180px;
}

#furniture-item-template {
    display: none;
}

@media (max-width: 1200px) {
    #furniture-items-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    #furniture-items-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    #furniture-items-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .furniture-item-card {
        padding: 1rem;
    }

    .furniture-item-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Moodboard Preview --- */
#moodboard-upload-container {
    width: 100%;
    max-width: 1000px;
    margin: 1rem auto;
}

#moodboard-preview-container {
    position: relative;
    margin-top: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

#moodboard-preview {
    width: 100%;
    height: auto;
    display: block;
    object-fit: unset;
}

.action-area {
    text-align: center;
    margin-bottom: 4rem;
    margin-top: 2rem;
}



/* --- Result Section --- */
.result-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.comparison-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 0 auto 2rem auto;
    background-color: #222;
    border: 1px solid var(--border-color);
}

/* Direct Upload Mode (No Slider) */
.comparison-container.direct-mode .label,
.comparison-container.direct-mode .slider-wrapper {
    display: none !important;
}

.comparison-container.direct-mode .image-wrapper.before {
    width: 0 !important;
    border-right: none !important;
    /* 흰색 선 제거 */
}

.comparison-container.direct-mode .image-wrapper.after {
    width: 100% !important;
}

.image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-wrapper.before {
    z-index: 2;
    border-right: 2px solid #ffffff;
    width: 50%;
}

.image-wrapper.after {
    z-index: 1;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.label {
    position: absolute;
    top: 20px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    z-index: 100;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
}

.label-before {
    left: 20px;
}

.label-after {
    right: 20px;
}

.slider-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    margin: 0;
    z-index: 10;
    pointer-events: auto;
    cursor: col-resize;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0;
    height: 0;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 11;
}

.slider-handle::after {
    content: none;
}

#thumbnailContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#thumbnailContainer .thumb-card {
    position: relative;
    width: 19%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
}

#thumbnailContainer .thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    transition: transform 0.6s;
}

#thumbnailContainer .thumb-card:hover img {
    transform: scale(1.08);
}

#thumbnailContainer .thumb-card .thumb-check {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    font-size: 16px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

#thumbnailContainer .thumb-card.is-selected img {
    filter: none;
    opacity: 1;
}

#thumbnailContainer .thumb-card.is-selected .thumb-check {
    opacity: 1;
    transform: scale(1);
}

#thumbnailContainer .thumb-card.is-selected::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.download-area {
    text-align: center;
    margin-top: 30px;
}

.button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* --- Detail View --- */
#detail-section {
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    width: 100%;
}

#detail-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.detail-grid-landscape {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px;
    width: 100%;
    margin-bottom: 30px;
}

.detail-grid-portrait {
    display: grid;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 15px;
    width: 100%;
}

.detail-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s;
    background-color: transparent;
}

.detail-card:hover {
    border-color: var(--border-color);
}

.detail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s;
}

.detail-card:hover img {
    transform: scale(1.08);
}

.detail-retry-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.2s;
}

.detail-retry-btn:hover {
    background-color: #000000;
    color: #000;
}

.detail-upscale-btn {
    width: 180px;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    /* 정확한 중앙 정렬 */
    z-index: 10;
    padding: 6px 12px;
    font-size: 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    /* 텍스트 줄바꿈 방지 */
}

.detail-upscale-btn:hover {
    transform: translateX(-50%) translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#detail-section .detail-upscale-btn {
    width: 234px;
    min-width: 234px;
    padding: 14px 24px;
    font-size: 0.9rem;
    border-radius: 10px;
    font-weight: 400;
    border: none;
    transform: translateX(-50%) scale(0.7);
    outline: none;
    box-shadow: none;
}

#detail-section .detail-upscale-btn:hover {
    transform: translateX(-50%) translateY(-2px) scale(0.7) !important;
    box-shadow: 0 0 0 2px rgba(39, 13, 18, 0.7) !important;
}

#detail-section .detail-upscale-btn .material-symbols-outlined {
    font-size: 20px;
}

/* --- Modals & Loading --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.spinner,
.mini-spinner,
.vs-spinner {
    display: inline-block;
    flex: 0 0 auto;
    box-sizing: border-box;
    position: relative;
    background: none;
    -webkit-mask: none;
    mask: none;
}

.spinner {
    width: var(--spinner-size);
    height: var(--spinner-size);
    margin: 0 auto 1.5rem;
}

.spinner::before,
.spinner::after,
.mini-spinner::before,
.mini-spinner::after,
.vs-spinner::before,
.vs-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    border-radius: 50%;
}

.spinner::before,
.mini-spinner::before,
.vs-spinner::before {
    border: var(--spinner-stroke) solid var(--spinner-track);
}

.spinner::after,
.mini-spinner::after,
.vs-spinner::after {
    border: var(--spinner-stroke) solid transparent;
    border-top-color: var(--spinner-accent);
    animation: spin var(--spinner-speed) linear infinite;
}

.loading-title {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#loading-status {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

#timer {
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
    color: var(--text-color);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

/* Lightbox & Modal Common */
.lightbox {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    width: 63vw;
    height: 63vh;
    max-width: 63vw;
    max-height: 63vh;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #111111;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
}

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.modal-content {
    background-color: #1a1a1a;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    max-width: 400px;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-content h3 {
    margin: 0;
    padding: 1.5rem;
    background: #1a1a1a;
    font-size: 1.5rem;
    color: var(--text-color);
    flex-shrink: 0;
}

.modal-content p {
    color: var(--text-muted);
    margin: 0;
}

#moodboard-generator-modal .modal-content {
    background-color: #ffffff;
    color: #333333;
}

#moodboard-generator-modal .modal-content h3 {
    background: #ffffff;
    color: #2b2b2b;
}

#moodboard-generator-modal .modal-content p {
    color: #666666;
}

.modal-buttons {
    padding: 1.2rem;
    background: #1a1a1a;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: row !important;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.modal-buttons button {
    padding: 12px 24px;
    min-width: 100px;
}

#global-modal {
    background: rgba(0, 0, 0, 0.65);
}

#global-modal .modal-content {
    background: #ffffff;
    color: #111111;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

#global-modal .modal-content h3 {
    background: transparent;
    color: #111111;
    font-size: 1.4rem;
    margin: 0 0 10px 0;
    padding: 0;
}

#global-modal .modal-content p {
    color: #333333;
    margin-bottom: 18px;
}

#global-modal .modal-buttons {
    background: transparent;
    border-top: none;
    padding: 0;
    justify-content: center;
}

#global-modal #modal-ok-btn {
    background: #111111;
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
}

#global-modal #modal-ok-btn:hover {
    background: #000000;
}

#global-modal #modal-cancel-btn {
    background: transparent;
    color: #111111;
    border: 1px solid #111111;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: none;
}

#global-modal #modal-cancel-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Floor Plan Modal Layout */
.fp-modal-split {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fp-left-panel {
    flex: 1;
    border-right: 1px solid #333;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.fp-right-panel {
    flex: 1.2;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    overflow-y: auto;
}

.fp-section-title {
    color: #ccc;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: left;
}

#fp-plan-drop-zone,
#fp-ref-drop-zone {
    padding: 1rem;
    min-height: auto;
    border-style: dashed;
}

.unified-preview {
    height: 100px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #ffffff;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#mb-gen-grid,
#fp-gen-grid {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    overflow-y: auto;
    width: 100%;
    padding-bottom: 1rem;
    flex: 1;
}

#mb-gen-grid .detail-card,
#fp-gen-grid .detail-card {
    width: calc(33.333% - 10px);
    min-width: 150px;
    aspect-ratio: 16 / 9;
}

@media (max-width: 1024px) {
    #variant-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .detail-grid-landscape {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .fp-modal-split {
        flex-direction: column;
        overflow-y: auto;
    }

    .fp-left-panel {
        border-right: none;
        border-bottom: 1px solid #333;
        overflow-y: visible;
        flex: none;
    }

    #mb-gen-grid .detail-card,
    #fp-gen-grid .detail-card {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    #variant-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid-portrait {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .button-group {
        flex-direction: column;
    }
}

.detail-card-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
    --spinner-track: rgba(255, 255, 255, 0.22);
    --spinner-accent: #ffffff;
}

.mini-spinner {
    width: 24px;
    height: 24px;
    --spinner-stroke: 2.5px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================================
   Video Studio Styles (Fixed & Final Version)
   ========================================================= */

.video-studio {
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

/* Components */
.vs-shell {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
    width: 100%;
    box-sizing: border-box;
}

.vs-page .vs-shell {
    width: 100% !important;
    max-width: 100% !important;
}

.vs-header {
    margin-bottom: 20px;
}

.vs-card {
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    padding: 18px;
}

.vs-card-head h2 {
    margin: 0;
    font-size: 20px;
}

.vs-card-head .muted {
    margin: 8px 0 0;
}

.vs-page .vs-card-head p,
.vs-page .vs-card-head .muted {
    margin-bottom: 40px !important;
    display: block;
}

/* --- 2-Column Grid Layout --- */
.vs-editor-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 15px;
    height: calc(100vh - 120px);
    min-height: 600px;
}

/* Left Panel */
.area-source-manager {
    background: #1e1e1e;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 15px;
}

.vs-dropzone-compact {
    border: 1px dashed #555;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 15px;
    transition: 0.2s;
}

.vs-dropzone-compact:hover {
    border-color: #0f172a;
    background: rgba(255, 255, 255, 0.05);
}

.vs-dropzone-compact p {
    margin: 5px 0 0;
    font-size: 12px;
    color: #aaa;
}

.vs-dropzone-compact .material-symbols-outlined {
    font-size: 24px;
    color: #777;
}

.vs-clip-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding-right: 5px;
}

.vs-source-item {
    display: flex;
    gap: 10px;
    background: #252525;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    align-items: center;
}

.vs-source-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #000;
}

.vs-source-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.vs-select-mini {
    background: #111;
    border: 1px solid #444;
    color: #ccc;
    font-size: 11px;
    padding: 4px;
    border-radius: 4px;
}

/* Right Panel Group */
.area-right-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: hidden;
}

.area-preview {
    flex: 1.5;
    background: #000;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.preview-stage {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
    position: relative;
    overflow: hidden;
}

#previewImage,
#previewVideo,
#resultVideo {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block;
    pointer-events: none;
}

.panel-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    color: #aaa;
    z-index: 5;
}

#resultOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.vs-btn-download {
    position: absolute;
    bottom: 20px;
    background: #39131A;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    pointer-events: auto;
}

.vs-btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #000000;
    font-size: 24px;
    cursor: pointer;
    pointer-events: auto;
}

/* Timeline */
.area-timeline {
    flex: 1;
    background: #181818;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.timeline-toolbar {
    height: 30px;
    background: #222;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
}

.timeline-title {
    font-size: 11px;
    color: #0f172a;
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-controls-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.icon-btn-play {
    background: transparent;
    border: none;
    color: #000000;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-play:hover {
    color: #00E5FF;
}

/* Timeline Container */
.timeline-container {
    flex: 1;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    background: #121212;
    cursor: text;
}

.timeline-ruler {
    height: 24px;
    background: #252525;
    border-bottom: 1px solid #444;
    position: relative;
    min-width: 100%;
}

.timeline-track-area {
    padding: 30px 0 10px 0;
    /* 패딩 제거 (눈금 오차 해결) */
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
}

/* Playhead (Scrubber) */
.timeline-playhead {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background-color: #000000;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: left 0.05s linear;
}

.timeline-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid #fff;
}

/* Timeline Clip Block */
.timeline-block {
    height: 70px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    position: relative;
    margin: 0;
    /* 간격 제거 */
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
    /* 테두리 포함 */
    z-index: 1;
}

.timeline-block.selected {
    border: 2px solid #00E5FF;
    z-index: 10;
}

.timeline-block-thumbs {
    display: flex;
    height: 100%;
    width: 100%;
    opacity: 1;
    /* 마스크 제거 */
}

.timeline-block-thumbs img {
    height: 100%;
    flex: 1;
    object-fit: cover;
    pointer-events: none;
    min-width: 0;
}

.timeline-block-info {
    position: absolute;
    bottom: 2px;
    left: 4px;
    font-size: 10px;
    color: #000000;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 3px;
    border-radius: 2px;
    pointer-events: none;
}

/* Timeline Properties & Bottom Actions */
.timeline-properties {
    height: 40px;
    background: #222;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 20px;
}

.prop-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #aaa;
}

.vs-input-small {
    width: 50px;
    background: #111;
    border: 1px solid #444;
    color: #000000;
    padding: 2px 5px;
}

.vs-select-small {
    background: #111;
    border: 1px solid #444;
    color: #000000;
    padding: 2px 5px;
}

/* 버튼 중앙 정렬 */
.vs-actions-right {
    padding: 15px;
    background: #1e1e1e;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vs-status-text {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    margin-top: 5px;
}

.hidden {
    display: none !important;
}

/* [FIX] 로딩 스피너 (회색) */
.vs-spinner {
    width: 18px;
    height: 18px;
    --spinner-stroke: 2px;
    vertical-align: middle;
}

/* Mobile */
@media (max-width: 1024px) {
    .vs-editor-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* ==========================================================================
   Image Studio - Workspace UI (Refined Style)
   ========================================================================== */

/* 전체 워크스페이스 컨테이너 */
.is-workspace {
    display: none;
    /* 기본 숨김 */
    flex-direction: column;
    height: 100vh;
    background-color: #ffffff;
}

/* 상단 네비게이션 (Back 버튼 등) */
.workspace-header {
    padding: 20px 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-back-menu {
    background: transparent;
    border: none;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    padding: 0;
    transition: color 0.2s;
}

.btn-back-menu:hover {
    color: #000000;
}

/* 메인 스플릿 레이아웃 (카드 형태의 컨테이너 안에서 좌우 분할) */
.is-workspace-card {
    flex: 1;
    margin: 0 40px 40px 40px;
    /* 화면 가장자리 여백 */
    background-color: #ffffff;
    /* 카드 배경색 */
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    display: flex;
    /* 좌우 분할 */
    overflow: hidden;
    /* 내부 스크롤 제어 */
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Image Studio hard light overrides */
body[data-page="image-studio"] .is-workspace,
body[data-page="image-studio"] .is-workspace-card,
body[data-page="image-studio"] .is-panel-left {
    background: #ffffff !important;
    color: #0f172a !important;
}

body[data-page="image-studio"] .is-panel-right {
    background: #f5f5f5 !important;
    color: #363636 !important;
}

body[data-page="image-studio"] .is-panel-right .placeholder-preview-box,
body[data-page="image-studio"] .is-panel-right .preview-image-slot,
body[data-page="image-studio"] .is-panel-right .preview-arrow,
body[data-page="image-studio"] .is-panel-right .placeholder-title,
body[data-page="image-studio"] .is-panel-right .placeholder-desc,
body[data-page="image-studio"] .is-panel-right .material-symbols-outlined {
    color: #363636 !important;
    filter: grayscale(1) !important;
}

body[data-page="image-studio"] .is-panel-right .preview-image-slot {
    background: #ffffff !important;
    border-color: #b6b6b6 !important;
}

body[data-page="image-studio"] .is-upload-box {
    background: #ffffff !important;
    border-color: #b6b6b6 !important;
    border-style: solid !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    gap: 6px !important;
    min-height: 200px !important;
}

body[data-page="image-studio"] .is-upload-box:hover {
    border-color: #363636 !important;
    background: #ffffff !important;
}

body[data-page="image-studio"] .is-upload-box.dragover {
    border-color: #363636 !important;
    background: #ffffff !important;
}

body[data-page="image-studio"] .is-upload-box.has-preview {
    padding: 0 !important;
}

body[data-page="image-studio"] .is-upload-box.has-preview .is-internal-preview {
    border: none !important;
}

body[data-page="image-studio"] .is-upload-icon {
    color: #363636 !important;
    font-size: 2rem !important;
    margin-bottom: 0 !important;
}

body[data-page="image-studio"] .is-upload-label {
    color: #363636 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

body[data-page="image-studio"] .is-upload-sub {
    color: #363636 !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
}

body[data-page="image-studio"] .is-instruction-upload .is-upload-icon {
    color: #363636 !important;
    font-size: 2rem !important;
    margin-bottom: 0 !important;
}

body[data-page="image-studio"] .is-instruction-upload .upload-title {
    color: #363636 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
}

body[data-page="image-studio"] .is-instruction-upload small {
    color: #363636 !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
}

body[data-page="image-studio"] .is-instruction-upload {
    height: 90px !important;
    min-height: 90px !important;
    padding: 8px 12px !important;
    gap: 4px !important;
}

body[data-page="image-studio"] .dark-input {
    background: #ffffff !important;
    border-color: #b6b6b6 !important;
    color: #363636 !important;
}

body[data-page="image-studio"] .dark-input:hover {
    border-color: #363636 !important;
    background: #ffffff !important;
}

body[data-page="image-studio"] .dark-input:focus {
    background: #ffffff !important;
    border-color: #b6b6b6 !important;
    box-shadow: inset 0 0 0 0.25px rgba(15, 23, 42, 0.12) !important;
}

body[data-page="image-studio"] .dark-input::placeholder {
    color: #363636 !important;
    opacity: 0.6;
}

body[data-page="image-studio"] .input-label {
    color: #363636 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-transform: none !important;
}

body[data-page="image-studio"] .is-file-item {
    background: #ffffff;
}

body[data-page="video-studio"] .vs-dropzone-compact {
    border-color: #b6b6b6;
    border-style: solid;
    border-radius: 12px;
    background: #ffffff;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body[data-page="video-studio"] .vs-dropzone-compact:hover {
    border-color: #363636;
    background: #ffffff;
}

body[data-page="video-studio"] .vs-dropzone-compact p {
    color: #363636;
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0;
}

body[data-page="video-studio"] .vs-dropzone-compact .material-symbols-outlined {
    color: #363636;
    font-size: 2rem;
}
body[data-page="image-studio"] .detail-upscale-btn {
    width: 234px;
    min-width: 234px;
    padding: 14px 24px;
    font-size: 0.9rem;
    border-radius: 10px;
    font-weight: 400;
    border: none;
    transform: translateX(-50%) scale(0.7);
    color: #ffffff;
}

body[data-page="image-studio"] .detail-upscale-btn .material-symbols-outlined {
    font-size: 20px;
    color: #ffffff !important;
    opacity: 1 !important;
}

body[data-page="image-studio"] .detail-upscale-btn:hover {
    transform: translateX(-50%) translateY(-2px) scale(0.7) !important;
}

/* [왼쪽] 입력 패널 */
.is-panel-left {
    flex: 0 0 450px;
    /* 너비 고정 (약 450px) */
    border-right: 1px solid #222;
    padding: 40px;
    display: flex;
    flex-direction: column;
    background-color: #161616;
    /* 왼쪽만 살짝 밝게 하거나 동일하게 */
    overflow-y: auto;
}

/* [오른쪽] 결과 패널 */
.is-panel-right {
    flex: 1;
    /* 나머지 공간 채움 */
    background-color: #0e0e0e;
    /* 더 어두운 배경 (프리뷰 강조) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

/* 타이틀 스타일 */
.is-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.is-section-desc {
    color: #0f172a;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

/* 업로드 박스 스타일 (레퍼런스 이미지와 유사하게) */
.is-upload-box {
    border: 1px dashed #444;
    border-radius: 16px;
    background-color: transparent;
    min-height: 250px;
    /* 높이 확보 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    position: relative;
}

.is-upload-box:hover {
    border-color: #666;
    background-color: rgba(255, 255, 255, 0.02);
}

.is-upload-box.dragover {
    border-color: #000000;
    background-color: rgba(255, 255, 255, 0.05);
}

.is-upload-icon {
    font-size: 3rem;
    color: #000000;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.is-upload-label {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.is-upload-sub {
    font-size: 0.8rem;
    color: #666;
}

/* 하단 생성 버튼 */
.is-generate-btn {
    margin-top: auto;
    /* 바닥에 붙이기 */
    width: 100%;
    padding: 18px;
    background-color: #222;
    color: #555;
    border: none;
    border-radius: 10px;
    /* 둥근 버튼 */
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.is-generate-btn:not(:disabled) {
    background-color: #383633;
    /* ????? ??????? ?????? */
    color: #ffffff;
    /* ????? ?????*/
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.is-generate-btn:not(:disabled):hover {
    background-color: #44423f;
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(255, 255, 255, 0.3);
}

.is-generate-btn .material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 20;
}

/* 파일 리스트 (업로드 박스 아래에 작게 표시) */
.is-file-list {
    margin-bottom: 20px;
    max-height: 150px;
    overflow-y: auto;
}

.is-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #222;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
}

.is-file-name {
    font-size: 0.85rem;
    color: #ccc;
}

.is-file-remove {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.is-file-remove:hover {
    color: #000000;
}

/* 오른쪽 결과 플레이스홀더 */
.is-placeholder {
    text-align: center;
    color: #333;
}

.is-placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.2;
}

/* --- Inputs for Spatial Constraints --- */
.dark-input {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-color);
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 0.25px rgba(15, 23, 42, 0.08);
}

.dark-input:focus {
    background: var(--card-bg);
    border-color: #cbd5e1;
    box-shadow: inset 0 0 0 0.25px rgba(15, 23, 42, 0.12);
}






.input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 8px;
    text-align: left;
    letter-spacing: 0.5px;
}

/* Global update banner */
.update-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: #111111;
    color: #ffffff;
    padding: 10px 16px;
    font-size: 0.9rem;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.update-banner__inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.update-banner__title {
    font-weight: 600;
}

.update-banner__text {
    opacity: 0.9;
}

/* Strong update overlay */
.update-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000000 !important;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.update-modal {
    background: #ffffff;
    color: #111111;
    border-radius: 16px;
    padding: 28px 32px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.update-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.update-text {
    font-size: 1rem;
    color: #333333;
    margin-bottom: 18px;
    line-height: 1.5;
}

.update-btn {
    background: #e6e6e6;
    color: #363636;
    border: 1px solid #d2d2d2;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.update-btn:hover {
    background: #dcdcdc;
}

/* Global page radius standard: all UI corners use 5px */
body[data-page] {
    --radius: 5px;
}

body[data-page] *:not(.spinner):not(.mini-spinner):not(.vs-spinner),
body[data-page] *:not(.spinner):not(.mini-spinner):not(.vs-spinner)::before,
body[data-page] *:not(.spinner):not(.mini-spinner):not(.vs-spinner)::after {
    border-radius: 5px !important;
}
