/* ══════════════════════════════════════════════════════════════
   decart-live-style.css — Create AI Style 라이브 영상 변환(Decart) UI
   v1.1.1
   ══════════════════════════════════════════════════════════════ */

/* ── 모드 토글: 드롭다운(44px)과 동일 높이·톤, 한 줄 맨 앞 ── */
.top-mode-control {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
}

.style-mode-switch {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
    padding: 3px !important;
    margin: 0 !important;
    border-radius: 22px !important;
    background: rgba(49, 36, 80, 0.35) !important;
    border: solid 1px rgba(183, 78, 145, 0.25) !important;
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    box-shadow: none !important;
    flex-shrink: 0 !important;
    overflow: hidden;
}

.style-mode-switch__btn {
    appearance: none !important;
    border: none !important;
    background: transparent !important;
    color: rgba(233, 226, 255, 0.75) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.01em !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 19px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.style-mode-switch__btn i {
    font-size: 0.78rem !important;
    line-height: 1 !important;
}

.style-mode-switch__btn:hover {
    color: #fff !important;
}

.style-mode-switch__btn.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
    box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35) !important;
}

.style-mode-switch__btn[data-mode="live"] .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff5470;
    display: inline-block;
    flex-shrink: 0;
}
.style-mode-switch__btn[data-mode="live"].is-active .live-dot {
    background: #fff;
    animation: decartLiveDot 1.4s ease-out infinite;
}
@keyframes decartLiveDot {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
    70%  { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* 토글 포함 시 한 줄 유지 (모바일 column 스택 예외) */
.top-controls-wrapper:has(.top-mode-control) {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.55rem !important;
}
.top-controls-wrapper:has(.top-mode-control) .top-left-control,
.top-controls-wrapper:has(.top-mode-control) .top-center-control {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}
/* 아바타: 이미지 모드에서는 center(라이브 2단용) 숨겨 기존 1드롭다운 레이아웃 유지 */
body[data-decart-page="avatar"]:not(.style-live-active) .top-center-control {
    display: none !important;
}
body[data-decart-page="avatar"].style-live-active .top-center-control {
    display: block !important;
}
.top-controls-wrapper:has(.top-mode-control) .top-right-control {
    /* CREATE AVATAR + 크레딧 칩이 잘리지 않도록 콘텐츠 폭에 맞춤 */
    flex: 0 0 auto !important;
    min-width: max-content !important;
    max-width: none !important;
    width: auto !important;
}
.top-controls-wrapper:has(.top-mode-control) .style-dropdown-top,
.top-controls-wrapper:has(.top-mode-control) .btn-create-top {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    box-sizing: border-box !important;
}
.top-controls-wrapper:has(.top-mode-control) .btn-create-top {
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    padding: 0 0.85rem !important;
    gap: 0.4rem !important;
    overflow: visible !important;
    flex-wrap: nowrap !important;
}
.top-controls-wrapper:has(.top-mode-control) .btn-create-top .credit-cost-hint {
    margin-left: 4px !important;
    padding: 2px 8px !important;
    flex-shrink: 0 !important;
}

.style-mode-switch-wrap { display: none !important; }

/* ── 라이브 오버레이 ───────────────────────────────────────── */
.decart-live-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 6 !important;
    display: none;
    border-radius: inherit;
    overflow: hidden !important;
    /* 검은 보이드 대신 서비스 톤(보라/핑크) 대기 배경 */
    background:
        radial-gradient(ellipse 80% 60% at 50% 35%, rgba(236, 72, 153, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 70% 80%, rgba(139, 92, 246, 0.28), transparent 50%),
        linear-gradient(165deg, #2a1f3d 0%, #3d2a5c 48%, #4a2858 100%);
}
body.style-live-active .decart-live-overlay { display: block !important; }

body.style-live-active .style-image-wrapper .background-img,
body.style-live-active .avatar-image-wrapper .background-img {
    /* 갤러리 video(controls) 인라인 visible/display !important 를 이기려면 display:none + 크기 0 */
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
}
body.style-live-active .style-image-wrapper video.background-img::-webkit-media-controls,
body.style-live-active .avatar-image-wrapper video.background-img::-webkit-media-controls {
    display: none !important;
}

/* 아바타: 라이브 중 참조 오버레이 숨김 */
body[data-decart-page="avatar"].style-live-active .avatar-image-wrapper .reference-image-overlay {
    visibility: hidden !important;
}

/* 스타일 라이브: Lucy처럼 선택 아이템(레퍼런스)은 좌측 하단, PIP는 우측 하단
   — display 는 JS가 제어(레퍼런스 있을 때만). !important 로 강제 표시하지 않음. */
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay {
    visibility: visible;
    left: 12px !important;
    right: auto !important;
    bottom: 12px !important;
    z-index: 60 !important;
    pointer-events: auto;
    width: 168px !important;
    max-width: 168px !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    align-items: stretch !important;
    background: rgba(20, 16, 28, 0.92) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45),
                0 0 0 1.5px rgba(183, 78, 145, 0.55) !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay[style*="display: none"],
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay[style*="display:none"] {
    display: none !important;
    visibility: hidden !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay.is-live-ref-visible {
    display: flex !important;
    visibility: visible !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-image-header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 7px 10px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-label {
    font-size: 0.68rem !important;
    letter-spacing: 0.04em !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    line-height: 1.2 !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .btn-remove-reference {
    display: none !important; /* 라이브: X로 수동 닫기 제거 — STOP 시 자동 숨김 */
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    font-size: 0.65rem !important;
    flex-shrink: 0 !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-image-body {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    background: #1a1524 !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-image-body img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    background: #1a1524 !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-image-body img[src=""],
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-image-body img:not([src]) {
    opacity: 0 !important;
}
body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .decart-live-ref-tip {
    display: block !important;
    padding: 6px 10px 8px !important;
    font-size: 0.58rem !important;
    line-height: 1.25 !important;
    letter-spacing: 0.02em !important;
    color: rgba(255, 255, 255, 0.72) !important;
    background: transparent !important;
    border: 0 !important;
    flex-shrink: 0 !important;
}
body[data-decart-page="style"]:not(.style-live-active) .decart-live-ref-tip {
    display: none !important;
}
@media (max-width: 520px) {
    body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay {
        width: 140px !important;
        max-width: 140px !important;
        bottom: 10px;
        left: 10px;
    }
    body[data-decart-page="style"].style-live-active .style-image-wrapper > .reference-image-overlay .reference-label {
        font-size: 0.58rem !important;
        letter-spacing: 0.02em !important;
    }
}

/* getstyle.css video height:100% 가 PIP를 깨뜨림 → 더 높은 특이도로 강제 */
.style-image-wrapper > .decart-live-overlay,
.avatar-image-wrapper > .decart-live-overlay {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 12 !important;
    overflow: hidden !important;
    background:
        radial-gradient(ellipse 80% 60% at 50% 35%, rgba(236, 72, 153, 0.22), transparent 55%),
        radial-gradient(ellipse 70% 50% at 70% 80%, rgba(139, 92, 246, 0.28), transparent 50%),
        linear-gradient(165deg, #2a1f3d 0%, #3d2a5c 48%, #4a2858 100%) !important;
    border-radius: inherit !important;
}

.style-image-wrapper .decart-live-overlay__main,
.avatar-image-wrapper .decart-live-overlay__main,
.style-image-wrapper video.decart-live-overlay__main,
.avatar-image-wrapper video.decart-live-overlay__main {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
    pointer-events: none;
}
.style-image-wrapper .decart-live-overlay__main.is-local-preview,
.avatar-image-wrapper .decart-live-overlay__main.is-local-preview {
    transform: scaleX(-1);
}

/* 원격 변환 레이어 — 실제(비검정) 프레임 전까지 투명 */
.style-image-wrapper .decart-live-overlay__remote,
.avatar-image-wrapper .decart-live-overlay__remote,
.style-image-wrapper video.decart-live-overlay__remote,
.avatar-image-wrapper video.decart-live-overlay__remote {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    background: transparent !important;
    border-radius: 0 !important;
    display: block !important;
    z-index: 2 !important;
    pointer-events: none;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.22s ease;
}
.style-image-wrapper video.decart-live-overlay__remote.is-ready,
.avatar-image-wrapper video.decart-live-overlay__remote.is-ready {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 연결 브릿지: 마지막 카메라 프레임 + 브랜드 베일 (검은 화면 대체) */
.decart-live-overlay__bridge {
    position: absolute !important;
    inset: 0 !important;
    z-index: 3 !important;
    display: none;
    pointer-events: none;
    overflow: hidden;
}
.decart-live-overlay__bridge.is-visible {
    display: block !important;
}
.decart-live-overlay__bridge-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transform: scaleX(-1);
    filter: saturate(1.08) contrast(1.02);
}
.decart-live-overlay__bridge-veil {
    position: absolute !important;
    inset: 0 !important;
    background:
        linear-gradient(180deg, rgba(42, 31, 61, 0.15) 0%, rgba(94, 66, 166, 0.28) 45%, rgba(236, 72, 153, 0.32) 100%),
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.12), transparent 55%);
    animation: decartBridgeShimmer 2.2s ease-in-out infinite;
}
.decart-live-overlay__bridge-copy {
    position: absolute !important;
    left: 50% !important;
    top: 52% !important;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 16px rgba(42, 31, 61, 0.55);
    width: min(86%, 280px);
}
.decart-live-overlay__bridge-copy strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}
.decart-live-overlay__bridge-copy span {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255, 245, 255, 0.88);
    line-height: 1.45;
}
@keyframes decartBridgeShimmer {
    0%, 100% { opacity: 0.82; }
    50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .decart-live-overlay__bridge-veil { animation: none; }
}

.style-image-wrapper .decart-live-overlay__pip-wrap,
.avatar-image-wrapper .decart-live-overlay__pip-wrap {
    position: absolute !important;
    right: 12px !important;
    bottom: 12px !important;
    z-index: 7 !important;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    width: 30% !important;
    max-width: 148px !important;
    min-width: 96px !important;
    height: auto !important;
}
body.style-live-active .style-image-wrapper .decart-live-overlay__pip-wrap.is-visible,
body.style-live-active .avatar-image-wrapper .decart-live-overlay__pip-wrap.is-visible {
    display: flex !important;
}

.style-image-wrapper video.decart-live-overlay__pip,
.avatar-image-wrapper video.decart-live-overlay__pip,
.style-image-wrapper .decart-live-overlay__pip,
.avatar-image-wrapper .decart-live-overlay__pip {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 72px !important;
    aspect-ratio: 3 / 4 !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    background: #111 !important;
    transform: scaleX(-1);
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.decart-live-overlay__pip-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.45);
    padding: 2px 7px;
    border-radius: 6px;
    pointer-events: none;
}

.decart-live-overlay__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
    background: rgba(255, 84, 112, 0.85);
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(255, 84, 112, 0.4);
}
.decart-live-overlay__badge .live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #fff; animation: decartLiveDot 1.4s ease-out infinite;
}

/* 상태 배너 — 콘텐츠 높이만큼만, 재시도 버튼 위 과다 여백 방지 */
.decart-live-overlay__status {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 72px;
    top: auto;
    height: auto !important;
    max-height: none;
    z-index: 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 14px 16px;
    text-align: center;
    color: #f0ebff;
    background: rgba(12, 8, 24, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
    box-sizing: border-box;
}
.decart-live-overlay__status[hidden] { display: none !important; }
.decart-live-overlay__status--no-spinner {
    gap: 6px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.decart-live-overlay__status--no-spinner .decart-live-overlay__spinner {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}
.decart-live-overlay__retry { pointer-events: auto; }
.decart-live-overlay__spinner {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ec4899;
    animation: decartSpin 0.9s linear infinite;
    flex-shrink: 0;
}
@keyframes decartSpin { to { transform: rotate(360deg); } }
.decart-live-overlay__status-text {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    max-width: 280px;
    margin: 0;
}
.decart-live-overlay__status-sub {
    font-size: 0.78rem;
    color: rgba(233, 226, 255, 0.7);
    max-width: 280px;
    margin: 0;
    line-height: 1.35;
}
.decart-live-overlay__retry {
    margin-top: 2px !important;
    margin-bottom: 0 !important;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1.2;
}
.decart-live-overlay__retry:hover { background: rgba(255, 255, 255, 0.18); }

/* 라이브 시 우측 세로 아이콘 메뉴 숨김 (이미지 모드에서 복원) */
body.style-live-active .main-image-stage > .icon-menu-container,
body.style-live-active .icon-menu-container {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 라이브 모드: 메인 하단 저장/공유/삭제(소셜) 숨김 — 이미지 모드에서만 사용 */
body.style-live-active .social-share-wrapper {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.style-live-controls { display: none; }
body.style-live-active .style-live-controls { display: block; width: 100%; }

/* 아바타: 라이브 시 이미지 스타일 셀렉트 숨기고 LIVE 프리셋 사용 */
body[data-decart-page="avatar"].style-live-active .top-left-control > #avatarStyleSelect {
    display: none !important;
}

/* 스타일: 라이브에서도 Choose Category / Select Item 유지 (LIVE 전용 드롭다운 숨김) */
body[data-decart-page="style"].style-live-active .style-live-controls {
    display: none !important;
}
body[data-decart-page="style"].style-live-active .top-left-control > #styleCategorySelect,
body[data-decart-page="style"].style-live-active .top-center-control > #styleOptionSelect {
    display: block !important;
}

body.style-live-active .btn-create-top .btn-create-label-image { display: none; }
.btn-create-label-live { display: none; }
body.style-live-active .btn-create-top .btn-create-label-live { display: inline; }

@media (max-width: 520px) {
    .style-mode-switch__btn { padding: 0 10px !important; font-size: 0.72rem !important; }
    .decart-live-overlay__pip-wrap { min-width: 84px !important; max-width: 120px !important; }
}

/*
 * v144 · 좁은 화면(Z Fold 커버 등 ≤640) 상단 툴바 — 상업·심플
 * 결정: 모드=글래스 세그먼트+짧은 라벨 / Create=짧은 한글 CTA+절제된 브랜드
 * 웹·펼침(>640)·live-fullscreen 시트는 기존 규칙 유지
 */
@media (max-width: 640px) {
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 0.32rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 !important;
    }
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control)::-webkit-scrollbar {
        display: none;
    }

    body:not(.live-fullscreen) .top-mode-control {
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }

    /* 모드: 웹과 동일 톤(글래스 트랙 + 보라 그라데이션 액티브) · 라벨만 짧게 */
    body:not(.live-fullscreen) .style-mode-switch {
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 2px !important;
        border-radius: 18px !important;
        background: rgba(49, 36, 80, 0.35) !important;
        border: solid 1px rgba(183, 78, 145, 0.25) !important;
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
        box-shadow: none !important;
    }
    body:not(.live-fullscreen) .style-mode-switch__btn {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 9px !important;
        gap: 0 !important;
        border-radius: 16px !important;
        font-size: 0.62rem !important;
        font-weight: 700 !important;
        letter-spacing: -0.02em !important;
        color: rgba(233, 226, 255, 0.62) !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    body:not(.live-fullscreen) .style-mode-switch__btn i,
    body:not(.live-fullscreen) .style-mode-switch__btn .live-dot {
        display: none !important;
    }
    body:not(.live-fullscreen) .style-mode-switch__btn > span:not(.live-dot) {
        display: inline !important;
        font-size: inherit !important;
    }
    body:not(.live-fullscreen) .style-mode-switch__btn.is-active {
        /* 웹·넓은 화면과 동일: 보라→핑크 그라데이션 액티브 */
        color: #fff !important;
        background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
        box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35) !important;
    }

    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .top-left-control,
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .top-center-control {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .style-dropdown-top {
        width: 100% !important;
        min-width: 0 !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        font-size: 0.68rem !important;
        padding: 0 1.25rem 0 0.5rem !important;
        text-overflow: ellipsis !important;
        border-radius: 12px !important;
    }

    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .top-right-control {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        width: auto !important;
    }

    /* Create: 짧은 한글 CTA — 빈 그라데이션 사각 대신 상업적 액션 버튼 */
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .btn-create-top {
        width: auto !important;
        min-width: 52px !important;
        max-width: none !important;
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
        padding: 0 12px !important;
        gap: 0 !important;
        border-radius: 18px !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        letter-spacing: -0.02em !important;
        justify-content: center !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #6b46c1 0%, #9d4edd 48%, #b84d94 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.12) inset,
            0 4px 14px rgba(107, 70, 193, 0.28) !important;
        transform: none !important;
    }
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .btn-create-top:active {
        transform: scale(0.97) !important;
        opacity: 0.92 !important;
    }
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .btn-create-top i,
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .btn-create-top .credit-cost-hint {
        display: none !important;
    }
    /* 좁은 화면: i18n 라벨(만들기/Create · 시작/Start) 그대로 표시 — CSS content 하드코딩 금지 */
    body:not(.live-fullscreen):not(.style-live-active) .top-controls-wrapper:has(.top-mode-control) .btn-create-top .btn-create-label-image {
        display: inline !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        letter-spacing: -0.02em !important;
        color: #fff !important;
    }
    body:not(.live-fullscreen).style-live-active .top-controls-wrapper:has(.top-mode-control) .btn-create-top .btn-create-label-live {
        display: inline !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        letter-spacing: -0.02em !important;
        color: #fff !important;
    }
    body:not(.live-fullscreen).style-live-active .top-controls-wrapper:has(.top-mode-control) .btn-create-top .btn-create-label-image {
        display: none !important;
    }
}

/* 초협폭(커버 ~360): 라벨 더 압축 */
@media (max-width: 380px) {
    body:not(.live-fullscreen) .style-mode-switch__btn {
        padding: 0 7px !important;
        font-size: 0.58rem !important;
    }
    body:not(.live-fullscreen) .top-controls-wrapper:has(.top-mode-control) .btn-create-top {
        padding: 0 10px !important;
        min-width: 48px !important;
    }
    body:not(.live-fullscreen):not(.style-live-active) .top-controls-wrapper:has(.top-mode-control) .btn-create-top .btn-create-label-image,
    body:not(.live-fullscreen).style-live-active .top-controls-wrapper:has(.top-mode-control) .btn-create-top .btn-create-label-live {
        font-size: 0.68rem !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   v136+ · 모바일 풀스크린 라이브 UX (BTK-FE-STYLE-004 §9)
   트리거: body.live-fullscreen (≤640px 또는 앱 btk-native-app + style-live-active).
   Z Fold 펼침(앱)도 풀스크린. 데스크탑 웹(>640)·이미지모드 = 기존 3:4.
   ══════════════════════════════════════════════════════════════ */
body.live-fullscreen .decart-live-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  border-radius: 0 !important;
}
body.live-fullscreen .decart-live-overlay__main,
body.live-fullscreen .decart-live-overlay__remote { object-fit: cover !important; }

/* 원본 셀프뷰 PiP · 레퍼런스 숨김 (앱·모바일 풀스크린) — PC 웹은 live-fullscreen 없음 */
body.live-fullscreen .style-image-wrapper .decart-live-overlay__pip-wrap.is-visible,
body.live-fullscreen .avatar-image-wrapper .decart-live-overlay__pip-wrap.is-visible,
body.live-fullscreen .decart-live-overlay__pip-wrap { display: none !important; }
body.live-fullscreen .style-image-wrapper > .reference-image-overlay,
body.live-fullscreen .avatar-image-wrapper > .reference-image-overlay { display: none !important; }

/* 상태 배너 — 풀스크린에서도 최상단 노출 */
body.live-fullscreen .decart-live-overlay__status {
  z-index: 2147483005 !important;
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  bottom: calc(env(safe-area-inset-bottom, 16px) + 160px) !important;
}

/* 상단 크롬 트랜지션 */
body.live-fullscreen .decart-live-overlay__badge,
body.live-fullscreen .decart-live-close,
body.live-fullscreen .top-controls-wrapper {
  transition: opacity .28s ease, transform .28s ease;
}

/* LIVE 배지 → 상단 좌측 (닫기 X 와 분리) */
body.live-fullscreen .decart-live-overlay__badge {
  top: calc(env(safe-area-inset-top, 14px) + 12px) !important;
  left: calc(16px + env(safe-area-inset-left, 0px)) !important;
  right: auto !important;
  transform: none !important;
  z-index: 2147483003 !important;
}

/* 닫기 버튼 (JS가 오버레이에 추가) — 상단 우측 X · 정원 + X 중앙 */
.decart-live-close { display: none; }
body.live-fullscreen .decart-live-close {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 14px) + 12px) !important;
  left: auto !important;
  right: calc(16px + env(safe-area-inset-right, 0px)) !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 40px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(255, 255, 255, .18) !important;
  background: rgba(20, 14, 30, .55) !important;
  color: #fff !important;
  font-size: 0 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 0 !important;
  text-transform: none !important;
  text-indent: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 2147483004 !important;
  cursor: pointer;
}
/* main.css button::after 글래스 오버레이 제거 */
body.live-fullscreen .decart-live-close::before,
body.live-fullscreen .decart-live-close::after {
  content: none !important;
  display: none !important;
}
/* CSS로 그린 X — FA 글리프 사이드베어링/letter-spacing 편차 제거 */
body.live-fullscreen .decart-live-close__x {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  pointer-events: none;
}
body.live-fullscreen .decart-live-close__x::before,
body.live-fullscreen .decart-live-close__x::after {
  content: '' !important;
  display: block !important;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  margin: 0;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center;
}
body.live-fullscreen .decart-live-close__x::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
body.live-fullscreen .decart-live-close__x::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
body.live-fullscreen .decart-live-close:active { transform: scale(.94); }

/* 하단 글래스 시트 = top-controls-wrapper 재배치 */
body.live-fullscreen .top-controls-wrapper {
  position: fixed !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
  width: auto !important; max-width: none !important; margin: 0 !important;
  z-index: 2147483002 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 22px 16px calc(env(safe-area-inset-bottom, 16px) + 18px) !important;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, rgba(30,22,48,.35), rgba(16,11,26,.88));
  -webkit-backdrop-filter: blur(30px) saturate(140%); backdrop-filter: blur(30px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -18px 50px rgba(0,0,0,.5);
}
body.live-fullscreen .top-controls-wrapper::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 38px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.3);
}
body.live-fullscreen .top-mode-control { display: none !important; }
body.live-fullscreen .top-left-control { grid-column: 1 !important; min-width: 0 !important; max-width: none !important; }
body.live-fullscreen .top-center-control { grid-column: 2 !important; min-width: 0 !important; max-width: none !important; }
body.live-fullscreen .top-right-control { grid-column: 1 / -1 !important; min-width: 0 !important; max-width: none !important; }
body.live-fullscreen .btn-create-top {
  width: 100% !important; min-height: 54px !important;
  font-size: 1rem !important; font-weight: 800 !important; border-radius: 16px !important;
}
body.live-fullscreen .style-dropdown-top { min-height: 46px !important; border-radius: 13px !important; }

/* 컨트롤 자동숨김 */
body.live-fullscreen.live-chrome-hidden .top-controls-wrapper {
  opacity: 0; transform: translateY(22px); pointer-events: none;
}
body.live-fullscreen.live-chrome-hidden .decart-live-close,
body.live-fullscreen.live-chrome-hidden .decart-live-overlay__badge {
  opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  body.live-fullscreen .decart-live-overlay__badge,
  body.live-fullscreen .decart-live-close,
  body.live-fullscreen .top-controls-wrapper { transition: none !important; }
}

/* v136 · 풀스크린 START/STOP 버튼 풀폭 (모바일 :has 아이콘화 무력화) */
body.live-fullscreen .top-controls-wrapper .top-right-control .btn-create-top {
  width: 100% !important; min-width: 0 !important; max-width: none !important;
  height: auto !important; min-height: 54px !important;
  padding: 0 18px !important; gap: 8px !important;
  font-size: 1rem !important; font-weight: 800 !important;
  border-radius: 16px !important; overflow: visible !important;
  justify-content: center !important;
}
body.live-fullscreen .top-controls-wrapper .btn-create-top .btn-create-label-live {
  display: inline-flex !important; align-items: center; gap: 8px;
}
body.live-fullscreen .top-controls-wrapper .btn-create-top .btn-create-label-image,
body.live-fullscreen .top-controls-wrapper .btn-create-top .credit-cost-hint {
  display: none !important;
}
body.live-fullscreen .top-controls-wrapper .btn-create-top i { font-size: 1rem !important; }

/* v152 · 닫기 버튼 정원 재확인 (네이티브 min-height:44 / main button 간섭) */
body.live-fullscreen .decart-live-close {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  letter-spacing: 0 !important;
  line-height: 0 !important;
  border-radius: 50% !important;
  flex: 0 0 40px !important;
}

/* v141 · 레퍼런스 선택 패널을 풀스크린 라이브 위로 (style-reference-panel.css 와 동기) */
body.live-fullscreen .style-ref-overlay { z-index: 2147483010 !important; }
body.live-fullscreen .style-ref-panel { z-index: 2147483011 !important; }

/* v143 · 웹과 동일: 캠 라이브 위에 반투명 Creating Your Style */
body.live-fullscreen #decartLiveLoadingOverlay,
.decart-live-overlay > #decartLiveLoadingOverlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 30 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
  background: rgba(49, 36, 80, 0.75) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 0 !important;
  pointer-events: none;
}
body.live-fullscreen #decartLiveLoadingOverlay.is-visible,
.decart-live-overlay > #decartLiveLoadingOverlay.is-visible,
body.live-fullscreen #decartLiveLoadingOverlay[style*="display: flex"],
body.live-fullscreen #decartLiveLoadingOverlay[style*="display:flex"],
.decart-live-overlay > #decartLiveLoadingOverlay[style*="display: flex"],
.decart-live-overlay > #decartLiveLoadingOverlay[style*="display:flex"] {
  display: flex !important;
}
/* 숨김이 보이기 규칙보다 우선 — 프로그레스 고착 방지 */
body.live-fullscreen #decartLiveLoadingOverlay:not(.is-visible),
.decart-live-overlay > #decartLiveLoadingOverlay:not(.is-visible) {
  display: none !important;
}

