/* =========================================================================
   ✏️ Stream Vault 자막 실시간 싱크 에디터 & 스타일 설정 드로어 공용 스타일
   ========================================================================= */
.sub-sync-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    height: 100vh;
    height: 100dvh;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 200000;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.85);
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
.sub-sync-drawer.open {
    display: flex !important;
}
.sub-sync-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.98);
}
.sub-sync-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.sub-sync-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}
.sub-sync-toolbar {
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sub-sync-mode-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.sub-sync-chip {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sub-sync-chip.active {
    background: rgba(168, 85, 247, 0.25);
    border-color: #a855f7;
    color: #f3e8ff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}
.btn-sub-offset {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-sub-offset:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.sub-sync-list-container {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 0;
}
.sub-sync-row {
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.sub-sync-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateX(2px);
}
.sub-sync-row:active {
    transform: scale(0.99);
}
.sub-sync-row:hover .sub-row-play-badge {
    background: #a855f7 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}
.sub-sync-row.selected {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.55);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.3);
}
.sub-sync-row.playing-active {
    border-left: 4px solid #38bdf8 !important;
    background: rgba(56, 189, 248, 0.12) !important;
}
.sub-sync-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #94a3b8;
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', Consolas, monospace;
}
.sub-sync-row-text {
    font-size: 0.88rem;
    color: #f1f5f9;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-all;
}
.sub-sync-text-container {
    flex: 1 1 auto;
    padding: 10px;
    display: flex;
    min-height: 0;
}
.sub-sync-text-container textarea {
    flex: 1;
    width: 100%;
    background: #020617;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f8fafc;
    font-family: 'JetBrains Mono', Consolas, monospace;
    font-size: 0.84rem;
    line-height: 1.5;
    padding: 10px;
    resize: none;
    outline: none;
    white-space: pre;
}
.sub-sync-footer {
    flex-shrink: 0;
    padding: 10px 14px;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 10;
}
.btn-sub-reset {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-sub-reset:hover {
    background: rgba(239, 68, 68, 0.22);
}
.btn-sub-cancel {
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}
.btn-sub-save {
    padding: 9px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-weight: 800;
    font-size: 0.86rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.45);
    transition: all 0.15s;
}
.btn-sub-save:hover {
    filter: brightness(1.15);
}
.mobile-sub-sync-two-handed-wrap {
    display: none;
}
@media (max-width: 768px) {
    .sub-sync-drawer {
        width: 100vw !important;
        height: 88dvh !important;
        top: auto !important;
        bottom: 0 !important;
        border-radius: 20px 20px 0 0 !important;
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    .mobile-sub-sync-two-handed-wrap {
        display: block !important;
    }
    .mobile-sub-sync-left-controls {
        position: absolute;
        left: 14px;
        bottom: 74px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        z-index: 1000;
        user-select: none;
        -webkit-user-select: none;
    }
    .mobile-sub-nav-btn {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: rgba(30, 41, 59, 0.94);
        border: 2px solid rgba(148, 163, 184, 0.5);
        color: #f1f5f9;
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
        transition: transform 0.1s, background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-sub-nav-btn:active {
        transform: scale(0.88);
        background: rgba(168, 85, 247, 0.35);
        border-color: #c084fc;
    }
    .mobile-sub-sync-right-controls {
        position: absolute;
        right: 16px;
        bottom: 74px;
        z-index: 1000;
        user-select: none;
        -webkit-user-select: none;
    }
    .mobile-sub-stamp-btn {
        width: 74px;
        height: 74px;
        border-radius: 50%;
        background: linear-gradient(135deg, #a855f7, #7c3aed);
        border: 3px solid rgba(255, 255, 255, 0.65);
        color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        cursor: pointer;
        box-shadow: 0 8px 28px rgba(168, 85, 247, 0.7), 0 3px 10px rgba(0, 0, 0, 0.5);
        transition: transform 0.1s, filter 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-sub-stamp-btn:active {
        transform: scale(0.88);
        filter: brightness(1.3);
    }
}
