/* (202610181105_중복 수정완료) */
/* ========================================================
   🎬 추억 시네마 앨범 3단 스튜디오 레이아웃 (좌측: 비디오 플레이어 | 중앙: 컷 편집창 | 우측: 사진 보관함)
   ======================================================== */

:root {
    --pb-primary: #10B981;
    --pb-primary-glow: rgba(16, 185, 129, 0.35);
    --pb-gold: #F59E0B;
    --pb-bg: #0B0D14;
    --pb-card: #141722;
    --pb-border: rgba(255, 255, 255, 0.1);
    --pb-left-sidebar-width: 450px;
    --pb-right-sidebar-width: 200px;
}

body {
    background-color: var(--pb-bg);
    color: #E2E8F0;
}

/* 🌟 메인 3단 스튜디오 레이아웃 (좌측: 비디오 플레이어 | 중앙: 컷 편집창 | 우측: 사진 보관함) */
.pb-workspace-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}

.pb-left-sidebar-workspace {
    box-sizing: border-box;
    width: var(--pb-left-sidebar-width, 450px);
    min-width: 165px;
    max-width: 50%;
    min-height: 100%;
    flex: 0 0 var(--pb-left-sidebar-width, 450px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 76px;
    max-height: none;
    overflow: visible;
    padding-right: 4px;
}

.pb-left-sidebar-resizer {
    align-self: stretch;
    flex: 0 0 12px;
    min-height: 120px;
    margin: 0 -18px;
    position: relative;
    z-index: 2;
    cursor: col-resize;
    touch-action: none;
    outline: none;
}

.pb-left-sidebar-resizer::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 2px;
    border-radius: 2px;
    background: rgba(16, 185, 129, 0.35);
    transition: background 0.15s, width 0.15s, left 0.15s;
}

.pb-left-sidebar-resizer:hover::after,
.pb-left-sidebar-resizer:focus-visible::after,
.pb-left-sidebar-resizer.pb-resizing::after {
    left: 4px;
    width: 4px;
    background: #10B981;
}

body.pb-sidebar-resizing {
    cursor: col-resize;
    user-select: none;
}

.pb-main-workspace {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    max-width: none;
}

.pb-sidebar-workspace {
    box-sizing: border-box;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    padding-right: 2px;
}

.pb-workspace-grid.hide-right-sidebar .pb-sidebar-workspace,
.pb-sidebar-workspace.is-hidden {
    display: none !important;
}

/* 🌟 [감상 전용 모드]: 컷 편집창과 우측 보관함을 숨기고 플레이어를 중앙에 넓고 쾌적하게 배치 */
.pb-workspace-grid.no-editor .pb-main-workspace,
.pb-workspace-grid.no-editor .pb-sidebar-workspace,
.pb-workspace-grid.no-editor .pb-left-sidebar-resizer {
    display: none !important;
}

.pb-workspace-grid.no-editor .pb-left-sidebar-workspace {
    width: 100% !important;
    max-width: 960px !important;
    margin: 0 auto !important;
    flex: 0 0 100% !important;
}

.pb-left-sidebar-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(17, 20, 32, 0.98) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.28);
    border-radius: 14px;
    padding: 15px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.pb-left-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
    color: #E2E8F0;
}

.pb-left-list li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}

.pb-left-list li .mini-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.18);
    color: #6EE7B7;
    font-size: 8.5px;
    font-weight: 900;
    flex-shrink: 0;
}

/* 📘 우측 최상단: 간단 사용법 요약 카드 */
.pb-sidebar-guide-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(30, 41, 59, 0.5) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    padding: 10px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.pb-guide-title {
    font-size: 13.5px;
    font-weight: 900;
    color: #6EE7B7;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.pb-guide-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pb-guide-steps li {
    font-size: 12px;
    color: #E2E8F0;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.pb-guide-steps li .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10B981;
    color: #064E3B;
    font-weight: 900;
    font-size: 10.5px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* 📸 우측: 현재 탑재된 사진 모아보기 */
.pb-active-photos-card {
    background: #111420;
    border: 1.5px solid rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    padding: 10px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.pb-active-photos-card.dragover {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.5) !important;
}

#activePhotosEmptyNotice:hover {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.pb-active-photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pb-active-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
}

.pb-active-thumb-card {
    background: #161822;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pb-active-thumb-card:hover {
    border-color: #10B981;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.pb-active-thumb-card img {
    width: 100%;
    height: 64px;
    object-fit: cover;
    display: block;
}

.pb-active-badge {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(0, 0, 0, 0.78);
    color: #FCD34D;
    font-size: 8.5px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* 🎬 일체형 시네마 비디오 플레이어 */
.pb-player-container {
    position: relative;
    width: 100%;
    background: #0B0D14;
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--pb-player-radius, 10px);
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    transition: border-radius 0.2s ease;
    container-type: inline-size;
    container-name: pbplayer;
}

.pb-mini-slide-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #090B10;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: var(--pb-player-radius, 10px);
    border-top-right-radius: var(--pb-player-radius, 10px);
    transition: border-radius 0.2s ease;
    container-type: inline-size;
    container-name: pbviewport;
}

.pb-mini-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    cursor: grab;
    transition: background-image 0.25s ease, border-color 0.15s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.pb-mini-slide-bg:hover,
.pb-mini-slide-bg.is-active-focus {
    border-color: #10B981;
}

.pb-mini-slide-bg.is-panning {
    cursor: grabbing;
    border-color: #F59E0B;
}

.pb-mini-no-image {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    font-size: 13px;
    font-weight: 800;
    background: radial-gradient(circle, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.98) 100%);
}

/* ========================================================
   🎯 1. 비디오 플레이어 이미지 영역 (완벽한 배경 레이어로 격리)
   - 사용자 원칙: 이미지를 순수 배경(z-index: 1)으로 완전히 가두어
     모든 이미지 레이어와 리사이즈 핸들이 자막(z-index: 9999) 아래에 항상 머물도록 설정
   ======================================================== */
.pb-mini-slide-img-box,
#pbMiniSlideImgBox {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 1 !important; /* 이미지 영역 전체를 배경(z-index: 1)으로 확정 */
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

/* 단일 이미지 배경 레이어 */
.pb-mini-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1 !important;
}

/* 다중 이미지 스택 레이어 */
.pb-stacked-img-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    overflow: visible;
}

.pb-stacked-img-layer:hover,
.pb-stacked-img-layer.is-active-focus {
    border-color: #10B981;
}

.pb-stacked-img-layer.is-panning {
    cursor: grabbing;
    border-color: #F59E0B;
}

.pb-stacked-img-layer img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    pointer-events: none;
}

/* ========================================================
   🌟 2. 비디오 플레이어 이미지 리사이즈 핸들 & 조작 툴바
   - 배경 이미지 박스(z-index: 1) 내부에서만 작동하므로 자막 위를 침범하지 않음
   ======================================================== */
/* 개별 이미지 윤곽선 조절 핸들 프레임 */
.pb-layer-resize-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid transparent;
    transition: border-color 0.15s ease;
    z-index: 20;
}

.pb-stacked-img-layer:hover .pb-layer-resize-frame,
.pb-mini-slide-bg:hover .pb-layer-resize-frame,
.pb-layer-resize-frame.active {
    border-color: #10B981;
}

/* 3. 4개 변(엣지) 핸들: 가로(폭) 및 세로(높이) 독립 조절 */
.pb-layer-edge {
    position: absolute;
    pointer-events: auto;
    z-index: 25;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
    box-sizing: border-box;
}

.pb-stacked-img-layer:hover .pb-layer-edge,
.pb-mini-slide-bg:hover .pb-layer-edge,
.pb-layer-edge:hover,
.pb-layer-edge.dragging {
    opacity: 1;
    background: rgba(16, 185, 129, 0.35);
}

.pb-layer-edge.edge-t { top: 0; left: 20px; right: 20px; height: 14px; cursor: ns-resize; }
.pb-layer-edge.edge-b { bottom: 0; left: 20px; right: 20px; height: 14px; cursor: ns-resize; }
.pb-layer-edge.edge-l { left: 0; top: 20px; bottom: 20px; width: 14px; cursor: ew-resize; }
.pb-layer-edge.edge-r { right: 0; top: 20px; bottom: 20px; width: 14px; cursor: ew-resize; }

/* 4. 4개 모서리(코너) 핸들: 가로세로 비율 유지 크기 조절 */
.pb-layer-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #10B981;
    border: 2px solid #FFFFFF;
    border-radius: 4px;
    pointer-events: auto;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
    box-sizing: border-box;
}

.pb-stacked-img-layer:hover .pb-layer-handle,
.pb-mini-slide-bg:hover .pb-layer-handle,
.pb-layer-handle:hover,
.pb-layer-handle.dragging {
    opacity: 1;
    transform: scale(1.25);
    background: #F59E0B;
}

.pb-layer-handle.handle-nw { top: 2px; left: 2px; cursor: nwse-resize; }
.pb-layer-handle.handle-ne { top: 2px; right: 2px; cursor: nesw-resize; }
.pb-layer-handle.handle-sw { bottom: 2px; left: 2px; cursor: nesw-resize; }
.pb-layer-handle.handle-se { bottom: 2px; right: 2px; cursor: nwse-resize; }

/* 5. 상단 중앙 플로팅 리사이즈 툴바 */
.pb-image-resize-toolbar {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 3px;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 14px;
    padding: 2px 6px;
    pointer-events: auto;
    backdrop-filter: blur(6px);
    z-index: 50;
    opacity: 0.85;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.pb-mini-slide-viewport:hover .pb-image-resize-toolbar,
.pb-image-resize-toolbar:hover {
    opacity: 1;
    border-color: #10B981;
}

.pb-resize-zoom-badge {
    font-size: 10.5px;
    font-weight: 800;
    color: #6EE7B7;
    padding: 0 3px;
    min-width: 34px;
    text-align: center;
    font-family: monospace;
    letter-spacing: -0.5px;
}

.pb-resize-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pb-resize-btn:hover {
    background: #10B981;
    color: #000;
    border-color: #10B981;
}

.pb-resize-btn.reset-btn {
    width: auto;
    border-radius: 8px;
    padding: 0 4px;
    font-size: 9.5px;
}

.pb-resize-btn.reset-btn:hover {
    background: #F59E0B;
    color: #000;
    border-color: #F59E0B;
}

.pb-resize-btn.apply-all-btn {
    width: auto;
    border-radius: 8px;
    padding: 0 6px;
    font-size: 9.5px;
    font-weight: 800;
    color: #6EE7B7;
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid rgba(16, 185, 129, 0.5);
    white-space: nowrap;
}

.pb-resize-btn.apply-all-btn:hover {
    background: #10B981;
    color: #000;
    border-color: #10B981;
}

/* 6. 재생 중에는 핸들 숨김 */
.pb-mini-slide-viewport.is-playing .pb-layer-resize-frame,
.pb-mini-slide-viewport.is-playing .pb-layer-handle,
.pb-mini-slide-viewport.is-playing .pb-layer-edge {
    display: none !important;
}

/* ========================================================
   🌟 자막 (문자): 비디오 플레이어 및 시네마 모달에서 모든 이미지, 프레임, 핸들보다 절대적 최상단
   (문자가 항상 제일 위로 절대적)
   ======================================================== */
.pb-mini-subtitle,
#pbMiniSubtitle,
.pb-mini-subtitle.custom-positioned,
.pb-mini-subtitle.is-dragging,
.cinema-subtitle-bar,
#cinemaSubtitle,
.cinema-subtitle-bar.custom-positioned {
    z-index: 9999 !important;
}

.pb-mini-subtitle {
    position: absolute;
    bottom: var(--pb-sub-bottom-cqw, var(--pb-sub-bottom-cqi, calc(var(--pb-mini-sub-bottom, 0px) * var(--pb-player-ratio, 1))));
    left: 0;
    right: 0;
    background: transparent;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.9);
    backdrop-filter: blur(4px);
    color: #FFFFFF;
    font-size: var(--pb-sub-cqw, var(--pb-sub-cqi, calc(var(--pb-mini-sub-font-size, 15px) * var(--pb-player-ratio, 1))));
    font-weight: 700;
    font-family: var(--font-myeongjo, 'Nanum Myeongjo', serif);
    text-align: center;
    padding: 4px 10px;
    line-height: 1.25;
    border: 1.5px dashed transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-height: 85%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: visible;
    display: block;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    cursor: grab;
    user-select: text;
    box-sizing: border-box;
}

.pb-mini-subtitle span:not([data-custom-size]),
#pbMiniSubtitle span:not([data-custom-size]) {
    font-size: inherit !important;
}

.pb-mini-subtitle:hover {
    border-color: rgba(245, 158, 11, 0.85);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.pb-mini-subtitle.is-dragging {
    cursor: grabbing !important;
    border-color: #F59E0B !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.7) !important;
    user-select: none !important;
}

.pb-mini-subtitle.custom-positioned {
    bottom: auto !important;
    right: auto !important;
    width: max-content;
    max-width: 92%;
    border-radius: 6px;
    background: transparent;
    backdrop-filter: none;
    border: 1.5px dashed transparent;
    box-shadow: none;
    transform: translate(-50%, -50%);
}

.pb-mini-subtitle.custom-positioned:hover {
    border-color: #F59E0B !important;
    border-style: dashed;
}

.cinema-subtitle-bar.custom-positioned {
    bottom: auto !important;
    right: auto !important;
    width: max-content;
    max-width: 92%;
    border-radius: 8px;
    background: transparent;
    backdrop-filter: none;
    border: 1.5px dashed transparent;
    box-shadow: none;
    transform: translate(-50%, -50%);
}

.pb-player-center-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pb-mini-slide-viewport:hover .pb-player-center-overlay {
    opacity: 1;
}

.pb-player-play-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 17px;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.5);
    transition: transform 0.15s ease;
    pointer-events: auto;
    cursor: pointer;
}

.pb-player-play-circle:hover {
    transform: scale(1.08);
}

.pb-player-controls-bar {
    background: #121522;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 8px 8px 8px;
}

.pb-player-progress-wrap {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    margin-bottom: 6px;
    overflow: visible;
    touch-action: none;
    user-select: none;
    transition: height 0.15s ease;
}

.pb-player-progress-wrap:hover,
.pb-player-progress-wrap.is-scrubbing {
    height: 5px;
}

.pb-player-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    border-radius: 4px;
    position: relative;
    pointer-events: none;
}

.pb-player-progress-thumb {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    background: #FFFFFF;
    border: 2.5px solid #10B981;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 6px #10B981;
    opacity: 0.85;
    pointer-events: none;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.pb-player-progress-wrap:hover .pb-player-progress-thumb,
.pb-player-progress-wrap.is-scrubbing .pb-player-progress-thumb {
    opacity: 1;
    transform: translateY(-50%) scale(1.3);
    background: #A7F3D0;
}

.pb-player-btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pb-player-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #E2E8F0;
    width: 28px;
    height: 26px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pb-player-btn:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10B981;
    color: #6EE7B7;
}

.pb-player-time {
    font-size: 10.5px;
    font-weight: 800;
    color: #FCD34D;
    font-family: monospace;
    margin-left: 4px;
}

/* 상단 액션 툴바 */
.pb-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pb-card);
    border: 1px solid var(--pb-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

/* CSS Grid 기반 컷 테이블 */
.pb-grid-header {
    display: grid;
    grid-template-columns: 36px 96px 54px 1fr;
    gap: 6px;
    align-items: center;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 800;
    color: #94A3B8;
    text-align: center;
}

.rte-emoji-btn {
    font-size: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 0;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
}

.rte-emoji-btn:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10B981;
    transform: scale(1.25);
    z-index: 5;
}

#pbCutsContainer {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pb-cut-row {
    display: grid;
    grid-template-columns: 36px 96px 54px 1fr;
    gap: 6px;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px solid var(--pb-border);
    border-radius: 10px;
    padding: 4px 6px;
    margin-bottom: 4px;
    transition: all 0.2s;
    cursor: grab;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.pb-cut-row:hover {
    border-color: rgba(16, 185, 129, 0.65);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
    background: rgba(255, 255, 255, 0.035);
}

.pb-cut-row:active {
    cursor: grabbing;
}

.pb-col-text,
.pb-col-text textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text !important;
}

.pb-cut-row :is(button, input, select) {
    cursor: pointer;
}

.pb-cut-row.pb-row-dragging {
    opacity: 0.35;
    border: 2px dashed #10B981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    cursor: grabbing !important;
}

#pbCutsContainer.pb-is-dragging-row .pb-cut-row * {
    pointer-events: none !important;
}

.pb-cut-row.pb-drop-above {
    border-top: 3px solid #10B981 !important;
    box-shadow: 0 -4px 16px rgba(16, 185, 129, 0.6) !important;
}

.pb-cut-row.pb-drop-below {
    border-bottom: 3px solid #10B981 !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.6) !important;
}

.pb-cut-row.pb-cut-selected {
    border: 2px solid #10B981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.35) !important;
}

.pb-cut-row.pb-cut-selected .pb-cut-badge {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10B981 !important;
    color: #6EE7B7 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.pb-col-num {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pb-cut-badge {
    font-size: 10.5px;
    font-weight: 900;
    color: #FCD34D;
    background: rgba(245, 158, 11, 0.12);
    border: 1.5px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
    transition: all 0.15s ease;
}

.pb-cut-badge:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: #F59E0B !important;
    transform: scale(1.06);
}

.pb-cut-badge:active {
    cursor: grabbing;
}

.pb-col-img {
    display: flex;
    align-items: stretch;
    justify-content: center;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.pb-thumb-box {
    width: 96px;
    height: 100%;
    min-height: 54px;
    max-height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #0B0D14;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pb-thumb-box:hover {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

.pb-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.pb-col-text {
    display: flex;
    align-items: stretch;
    height: 100%;
}

.pb-col-text textarea,
.pb-cut-editor {
    width: 100%;
    min-height: 56px;
    background: #0B0D14;
    border: 1.5px solid var(--pb-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: #FFF;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
    resize: none;
    overflow-y: auto;
    outline: none;
    word-break: break-word;
    white-space: pre-wrap;
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: text !important;
    transition: border-color 0.2s, background-color 0.15s ease-out;
}

.pb-col-text textarea:focus,
.pb-cut-editor:focus {
    border-color: #10B981;
    background-color: rgba(16, 185, 129, 0.04);
}

.pb-cut-editor:empty::before {
    content: attr(data-placeholder);
    color: #64748B;
    pointer-events: none;
    display: block;
}

.pb-cut-context-menu {
    position: fixed;
    z-index: 11000;
    display: none;
    min-width: 170px;
    padding: 5px;
    background: #141722;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.pb-cut-context-menu button {
    width: 100%;
    padding: 5px 8px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #E2E8F0;
    text-align: left;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.pb-cut-context-menu button:hover,
.pb-cut-context-menu button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.pb-cut-context-menu button:disabled {
    color: #64748B;
    cursor: not-allowed;
}

.pb-context-menu-separator {
    height: 1px;
    margin: 4px 5px;
    background: rgba(255, 255, 255, 0.12);
}

.pb-cut-context-menu button[data-action="delete"] {
    color: #FCA5A5;
}

.pb-cut-context-menu button[data-action="delete"]:hover,
.pb-cut-context-menu button[data-action="delete"]:focus-visible {
    background: rgba(239, 68, 68, 0.14);
}

.pb-cut-context-menu button[data-action="delete"]:disabled {
    color: #64748B;
}

/* ☀️ Light Mode Context Menu Styles */
html[data-theme="light"] .pb-cut-context-menu {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15) !important;
}

html[data-theme="light"] .pb-cut-context-menu button {
    color: #1E293B !important;
}

html[data-theme="light"] .pb-cut-context-menu button:hover,
html[data-theme="light"] .pb-cut-context-menu button:focus-visible {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

html[data-theme="light"] .pb-cut-context-menu button:disabled {
    color: #94A3B8 !important;
}

html[data-theme="light"] .pb-context-menu-separator {
    background: #E2E8F0 !important;
}

html[data-theme="light"] .pb-cut-context-menu button[data-action="delete"],
html[data-theme="light"] .pb-cut-context-menu button[data-action="delete-standby"] {
    color: #DC2626 !important;
}

html[data-theme="light"] .pb-cut-context-menu button[data-action="delete"]:hover,
html[data-theme="light"] .pb-cut-context-menu button[data-action="delete-standby"]:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

.pb-btn-action {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s;
}

/* 🌟 우측 사이드바: 드래그 앤 드롭 사진 추가 구역 */
.pb-sidebar-drop-card {
    background: #111420;
    border: 2px dashed #10B981;
    border-radius: 14px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.pb-sidebar-drop-card:hover,
.pb-sidebar-drop-card.dragover {
    background: rgba(16, 185, 129, 0.12);
    border-color: #34D399;
    transform: translateY(-2px);
}

/* 📁 우측 사이드바: 제외된 사진 보관함 */
.pb-standby-sidebar-card {
    background: #111420;
    border: 1.5px solid rgba(59, 130, 246, 0.35);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.pb-standby-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pb-standby-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 2px;
}

.pb-standby-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #161822;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.pb-standby-card:hover {
    border-color: #3B82F6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.pb-standby-card img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.pb-standby-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pb-standby-card:hover .pb-standby-overlay {
    opacity: 1;
}

/* 📱 반응형 (960px 이하에서 세로 스택) */
@media (max-width: 960px) {
    .pb-workspace-grid {
        flex-direction: column;
    }

    .pb-left-sidebar-workspace {
        box-sizing: border-box;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .pb-sidebar-workspace {
        box-sizing: border-box;
        width: 200px;
        min-width: 200px;
        max-width: 200px;
        flex: 0 0 200px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        position: sticky;
        top: 76px;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        padding-right: 4px;
    }

    .pb-left-sidebar-resizer {
        display: none;
    }

    .pb-standby-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        max-height: 260px;
    }
}

@media (max-width: 768px) {
    .pb-grid-header {
    display: grid;
    grid-template-columns: 36px 96px 54px 1fr;
        gap: 6px;
    }

    .pb-cut-row {
        display: grid !important;
        grid-template-columns: 36px 88px 50px 1fr !important;
        grid-template-areas: none !important;
        gap: 6px !important;
        padding: 4px 6px !important;
    }

    .pb-col-num { grid-area: auto !important; }
    .pb-col-img { grid-area: auto !important; }
    .pb-thumb-box { width: 96px !important; height: 54px !important; }
    .pb-col-text { grid-area: auto !important; width: 100% !important; }
    .pb-col-text textarea { min-height: 54px !important; font-size: 13px !important; resize: none !important; overflow: hidden !important; }
}

/* 🪄 사진 교정 & 보정 스튜디오 모달 스타일 */
#photoCalibratorModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.calib-modal-dialog {
    background: #141724;
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    border-radius: 16px;
    width: 92vw;
    max-width: 740px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calib-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #0E1018;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calib-stage {
    height: 310px;
    background: #0B0D14;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.calib-stage img {
    max-width: 88%;
    max-height: 88%;
    transition: transform 0.2s ease, filter 0.2s ease;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.calib-controls {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #141724;
}

.calib-btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.calib-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #E2E8F0;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.calib-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    color: #6EE7B7;
}

.calib-btn.active {
    background: #10B981;
    border-color: #10B981;
    color: #FFF;
    font-weight: 800;
}

/* 시네마 모달 플레이어 */
#cinemaModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cinema-viewport {
    position: relative;
    width: 90vw;
    max-width: 1000px;
    height: 60vh;
    max-height: 600px;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.cinema-bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

.ken-burns-anim {
    animation: kenBurns 12s infinite alternate ease-in-out;
}

@keyframes kenBurns {
    0% { transform: scale(1.0); }
    100% { transform: scale(1.12); }
}

/* 🌟 시네마 영상 모션 효과들 (문장 길이에 맞춰 동적 지속시간 연동) */
.pb-motion-zoom-in {
    animation: motionZoomIn linear forwards;
}
@keyframes motionZoomIn {
    0% { transform: scale(1.0); }
    100% { transform: scale(1.16); }
}

.pb-motion-zoom-out {
    animation: motionZoomOut linear forwards;
}
@keyframes motionZoomOut {
    0% { transform: scale(1.18); }
    100% { transform: scale(1.0); }
}

.pb-motion-pan-right {
    animation: motionPanRight linear forwards;
}
@keyframes motionPanRight {
    0% { transform: scale(1.14) translate(-3%, 0); }
    100% { transform: scale(1.14) translate(3%, 0); }
}

.pb-motion-pan-left {
    animation: motionPanLeft linear forwards;
}
@keyframes motionPanLeft {
    0% { transform: scale(1.14) translate(3%, 0); }
    100% { transform: scale(1.14) translate(-3%, 0); }
}

.pb-motion-tilt-up {
    animation: motionTiltUp linear forwards;
}
@keyframes motionTiltUp {
    0% { transform: scale(1.14) translate(0, 3%); }
    100% { transform: scale(1.14) translate(0, -3%); }
}

.pb-motion-tilt-down {
    animation: motionTiltDown linear forwards;
}
@keyframes motionTiltDown {
    0% { transform: scale(1.14) translate(0, -3%); }
    100% { transform: scale(1.14) translate(0, 3%); }
}

.pb-motion-bw-color {
    animation: motionBwColor ease-in-out forwards;
}
@keyframes motionBwColor {
    0% { filter: grayscale(100%); transform: scale(1.0); }
    50% { filter: grayscale(50%); }
    100% { filter: grayscale(0%); transform: scale(1.09); }
}

.pb-motion-static {
    transform: scale(1.0) !important;
    filter: none !important;
    animation: none !important;
}

.cinema-subtitle-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px 20px 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.88) 100%);
    text-align: center;
    color: #FFF;
    font-family: 'Nanum Myeongjo', serif;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    transition: font-size 0.2s;
}

/* 🎨 자막 배경색 빠른 색상 선택 팔레트 */
.quick-colors {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-colors button {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #999;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.quick-colors button:hover {
    transform: scale(1.15);
}

/* 투명 색상 표시 (8px 격자무늬 체커보드 패턴) */
.color-transparent {
    border: 1.5px solid #10B981 !important;
    background:
        linear-gradient(45deg, #ccc 25%, transparent 25%),
        linear-gradient(-45deg, #ccc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #ccc 75%),
        linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

/* 🌟 포토북 이미지 썸네일 선택 강조 스타일 */
.pb-thumb-box.pb-thumb-selected {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.75) !important;
}

/* 🌟 사진 드래그 오버 시 이미지 세로 쌍선 하이라이트 표시 */
.pb-thumb-box.pb-photo-dragover,
.pb-cut-row.pb-photo-dragover .pb-thumb-box {
    position: relative !important;
}

.pb-thumb-box.pb-photo-dragover::after,
.pb-cut-row.pb-photo-dragover .pb-thumb-box::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-left: 6px double #10B981 !important;
    border-right: 6px double #10B981 !important;
    border-top: 2px solid rgba(16, 185, 129, 0.5) !important;
    border-bottom: 2px solid rgba(16, 185, 129, 0.5) !important;
    background: rgba(16, 185, 129, 0.28) !important;
    box-shadow: inset 0 0 16px rgba(16, 185, 129, 0.6), 0 0 12px rgba(16, 185, 129, 0.8) !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    border-radius: 6px !important;
}

.pb-cut-row.pb-photo-dragover {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

/* 🌟 타임라인 연결 구간 (중간 컷 세로 쌍선 표시) */
.pb-timeline-middle-box {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.06);
    border: 1.5px dashed rgba(16, 185, 129, 0.45);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.15s ease;
}

.pb-timeline-middle-box:hover {
    background: rgba(16, 185, 129, 0.14);
    border-color: #10B981;
}

/* 🌟 타임라인 트위닝 배경 은은한 미리보기 */
.pb-timeline-tween-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: blur(0.5px);
    pointer-events: none;
    z-index: 1;
}

/* 🌟 좌측 정렬 세로 쌍선 (타임라인) */
.pb-timeline-vertical-double-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    width: 5px;
    border-left: 1px solid #10B981;
    border-right: 1px solid #10B981;
    background: rgba(16, 185, 129, 0.1);
    pointer-events: none;
}

.pb-timeline-badge {
    position: relative;
    z-index: 3;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6EE7B7;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.pb-timeline-start-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 5;
    background: rgba(16, 185, 129, 0.9);
    color: #FFFFFF;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.pb-timeline-end-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    z-index: 5;
    background: rgba(16, 185, 129, 0.9);
    color: #FFFFFF;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

/* 🌟 드래그 중 타임라인 스팬 실시간 하이라이트 */
.pb-cut-row.pb-drag-span-start {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
}

.pb-cut-row.pb-drag-span-start .pb-thumb-box {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.7) !important;
    border-color: #10B981 !important;
}

.pb-cut-row.pb-drag-span-end {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.12) !important;
}

.pb-cut-row.pb-drag-span-end .pb-thumb-box {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.7) !important;
    border-color: #10B981 !important;
}

.pb-cut-row.pb-drag-span-middle {
    border-color: rgba(16, 185, 129, 0.5) !important;
    background: rgba(16, 185, 129, 0.06) !important;
}

.pb-cut-row.pb-drag-span-middle .pb-thumb-box {
    position: relative !important;
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px dashed #10B981 !important;
}

.pb-cut-row.pb-drag-span-middle .pb-thumb-box::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 10px !important;
    transform: none !important;
    width: 5px !important;
    border-left: 1px solid #10B981 !important;
    border-right: 1px solid #10B981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    box-shadow: none !important;
    z-index: 1000 !important;
    pointer-events: none !important;
}

/* 🌟 포토북 멀티 이미지 썸네일 그리드 분할 스타일 (2분할/4분할/6분할/9분할) */
.pb-thumb-single {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.pb-thumb-single img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.pb-thumb-grid {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    display: grid;
    gap: 1.5px;
    background: #000;
}

/* 2분할 (가로 2개) */
.pb-thumb-grid.pb-thumb-grid-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

/* 4분할 (2x2) */
.pb-thumb-grid.pb-thumb-grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* 6분할 (가로 3열 x 세로 2행) */
.pb-thumb-grid.pb-thumb-grid-6 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

/* 9분할 (3x3) */
.pb-thumb-grid.pb-thumb-grid-9 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.pb-thumb-tile {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0B0E17;
}

.pb-thumb-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
    pointer-events: none;
}

.pb-thumb-tile-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.96);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 25;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s ease, background 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* ?? ?? ?? ?? 25px x 25px ? ??? ?? */
.pb-thumb-tile-remove::after {
    content: '';
    position: absolute;
    top: -2.5px;
    right: -2.5px;
    bottom: -2.5px;
    left: -2.5px;
    cursor: pointer;
    z-index: 26;
}

.pb-thumb-tile-remove:hover {
    transform: scale(1.15);
    background: #dc2626;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.8);
}

.pb-thumb-tile:hover .pb-thumb-tile-remove,
.pb-thumb-single:hover .pb-thumb-tile-remove {
    display: flex;
}

/* ?? ?? ?? ? ?? ?? 25px x 25px ?? ??? ?? */
.pb-thumb-single .pb-thumb-tile-remove {
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    font-size: 13px;
}

.pb-thumb-single .pb-thumb-tile-remove::after {
    top: -2.5px;
    right: -2.5px;
    bottom: -2.5px;
    left: -2.5px;
}

.pb-thumb-count-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(15, 23, 42, 0.9);
    color: #34D399;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 3.5px;
    border-radius: 3px;
    border: 1px solid rgba(16, 185, 129, 0.5);
    pointer-events: none;
    z-index: 5;
    line-height: 1.1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* 🌟 비디오 플레이어 멀티 이미지 그리드 */
.pb-video-multi-grid {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 2px;
    background: #000;
}

.pb-video-multi-grid.pb-video-grid-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.pb-video-multi-grid.pb-video-grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.pb-video-multi-grid.pb-video-grid-6 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.pb-video-multi-grid.pb-video-grid-9 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

.pb-video-tile {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #050505;
}

.pb-video-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================================
   🌟 모션 효과 static 설정: transform을 강제로 1.0으로 고정하지 않고 커스텀 변형을 허용
   ======================================================== */
.pb-motion-static {
    transform: none !important;
    animation: none !important;
}
/* 🌟 전용 성우 선택 필드 컬럼 스타일 */
.pb-col-voice {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-width: 0;
    height: 100%;
}

.pb-voice-field-btn {
    width: 100%;
    height: 100%;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 3px 2px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.pb-voice-field-btn:hover {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.22) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}


/* ========================================================
   🌟 [일체형 비디오 플레이어] 화면 내부 타임라인 & 3.5초 자동 숨김 오버레이
/* ========================================================
   🎬 추억 시네마 플레이어: 편집 모드(하단 분리형) & 전체화면(내부 오버레이 & 3.5초 숨김)
   ======================================================== */
.pb-player-container {
    position: relative;
    overflow: hidden;
    background: #0B0E17;
    border: 1.5px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.pb-mini-slide-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}

/* 🌟 편집 모드: 16:9 이미지 화면 밖 아래에 배치되는 독립 컨트롤 바 */
.pb-player-controls-bar {
    position: relative;
    width: 100%;
    background: #111422;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px 10px 8px 10px;
    z-index: 10;
    box-sizing: border-box;
    pointer-events: auto;
}

.pb-fullscreen-top-toolbar {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001 !important;
    background: linear-gradient(to bottom, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.7) 70%, transparent 100%);
    padding: 10px 16px 16px 16px;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

/* 기본 자막 위치: 16:9 이미지 하단에 깔끔하게 배치 (컨트롤이 이미지 밖으로 나와 간섭 없음) */
.pb-mini-subtitle:not(.custom-positioned) {
    bottom: 8px !important;
}

/* 🌟 전체화면 극장 모드 */
body.pb-player-fullscreen-active {
    overflow: hidden !important;
}

body.pb-player-fullscreen-active .pb-left-sidebar-workspace {
    position: static !important;
    z-index: 2147483646 !important;
}

body.pb-player-fullscreen-active .pb-main-workspace,
body.pb-player-fullscreen-active .pb-sidebar-workspace,
body.pb-player-fullscreen-active .pb-left-sidebar-resizer,
body.pb-player-fullscreen-active .lit-header,
body.pb-player-fullscreen-active header,
body.pb-player-fullscreen-active nav {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.pb-player-container.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 2147483647 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.pb-player-container.is-fullscreen .pb-mini-slide-viewport {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 177.78vh !important;
    max-height: 56.25vw !important;
    aspect-ratio: 16 / 9 !important;
    margin: auto !important;
    border-radius: 0 !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95) !important;
}

.pb-player-container.is-fullscreen .pb-fullscreen-top-toolbar {
    display: flex !important;
}

/* 🌟 [편집창이 없을 때]: 전체화면 또는 no-editor(감상 모드)에서는 컨트롤 바가 이미지 안으로 오버레이! */
.pb-player-container.is-fullscreen .pb-player-controls-bar,
.pb-workspace-grid.no-editor .pb-player-controls-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(to top, rgba(11, 15, 25, 0.96) 0%, rgba(11, 15, 25, 0.65) 65%, transparent 100%) !important;
    border-top: none !important;
    padding: 22px 20px 16px 20px !important;
    z-index: 10000 !important;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* 🌟 편집창이 없을 때 마우스 3.5초 정지 시 부드러운 자동 숨김 (Fade Out) */
.pb-player-container.is-fullscreen.controls-hidden .pb-player-controls-bar,
.pb-workspace-grid.no-editor .pb-player-container.controls-hidden .pb-player-controls-bar {
    opacity: 0 !important;
    transform: translateY(100%) !important;
    pointer-events: none !important;
}
.pb-player-container.is-fullscreen.controls-hidden .pb-image-resize-toolbar,
.pb-workspace-grid.no-editor .pb-player-container.controls-hidden .pb-image-resize-toolbar {
    opacity: 0 !important;
    pointer-events: none !important;
}
.pb-player-container.is-fullscreen.controls-hidden,
.pb-workspace-grid.no-editor .pb-player-container.controls-hidden {
    cursor: none !important;
}
.pb-player-container.is-fullscreen.controls-hidden .pb-fullscreen-top-toolbar {
    opacity: 0 !important;
    transform: translateY(-100%) !important;
    pointer-events: none !important;
}


/* 🌟 미니 볼륨 슬라이더 (타임라인과 동일하게 가느다란 3px 세련된 디자인) */
.pb-volume-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pb-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 50px;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    vertical-align: middle;
    transition: opacity 0.15s ease, background 0.15s ease;
    margin: 0;
    padding: 0;
    border: none;
}

.pb-volume-slider:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Chrome, Safari, Edge Thumb */
.pb-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10B981;
    border: 1.5px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: transform 0.1s ease, background 0.1s ease;
}

.pb-volume-slider:hover::-webkit-slider-thumb {
    transform: scale(1.2);
    background: #34D399;
}

/* Firefox Track & Thumb */
.pb-volume-slider::-moz-range-track {
    height: 3px !important;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    border: none;
}

.pb-volume-slider::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10B981;
    border: 1.5px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    cursor: pointer;
}
