/* Кабинет, модалки, SmartCaptcha — стиль ScenaAI (янтарь) */

.balance-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid var(--border-active);
    font-size: 0.85rem;
    white-space: nowrap;
    font-family: inherit;
    color: inherit;
    cursor: default;
}

.balance-widget--clickable { cursor: pointer; }
.balance-widget--clickable:hover {
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.balance-widget.guest {
    border-color: var(--border);
    background: var(--surface);
}

.balance-widget .balance-num {
    font-weight: 700;
    color: #fde68a;
}

.balance-widget.guest .balance-num { color: var(--muted); font-weight: 500; }

.input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
}

.input:focus {
    outline: none;
    border-color: var(--border-active);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

body.modal-open {
    overflow: hidden;
}

#authModal .modal {
    overflow-x: hidden;
    max-width: min(420px, calc(100vw - 32px));
}

#authStepEmail .btn-primary,
#authStepCode .btn-primary {
    width: 100%;
    margin-top: 10px;
}

#authStepCode .sub {
    margin-bottom: 10px;
}

#authModal .guest-captcha-block--auth {
    width: 100%;
    overflow: hidden;
}

#authModal .captcha-shell {
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

#authModal .captcha-shell__body {
    width: 100%;
    align-items: center;
}

#authModal .guest-captcha-block__hint {
    text-align: center;
    width: 100%;
}

#authModal .captcha-inline-alert {
    text-align: center;
}

#feedbackModal .guest-captcha-block--feedback {
    width: 100%;
    overflow: hidden;
}

#feedbackModal .captcha-shell {
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

#feedbackModal .captcha-shell__body {
    width: 100%;
    align-items: center;
}

#feedbackModal .guest-captcha-block__hint {
    text-align: center;
    width: 100%;
}

@media (max-width: 480px) {
    #authModal .modal {
        padding: 20px 16px;
    }

    #feedbackModal .captcha-widget-slot,
    #feedbackModal .smart-captcha-host {
        max-width: 100%;
    }

    #feedbackModal .captcha-shell {
        padding: 10px;
    }
}

.auth-welcome-bonus {
    font-size: 0.8125rem;
    color: #a7f3d0;
    margin: 0 0 12px;
    line-height: 1.4;
}

.guest-captcha-block--auth { width: 100%; overflow: hidden; margin-top: 12px; }

.captcha-shell {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.captcha-shell__body { flex: 1; min-width: 0; width: 100%; }

.guest-captcha-block__hint {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.guest-captcha-block__hint.is-ok { color: #86efac; }

.captcha-widget-slot,
.smart-captcha-host {
    width: 320px;
    max-width: 100%;
    height: 74px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    container-type: inline-size;
    container-name: captcha-box;
}

.smart-captcha-host > div { transform-origin: 0 0; }

.smart-captcha-host iframe { border-radius: 10px !important; }

@container captcha-box (max-width: 319px) {
    .captcha-widget-slot .smart-captcha-host,
    .smart-captcha-host {
        width: 100%;
        height: calc(74px * 100cqi / 320px);
    }
    .captcha-widget-slot .smart-captcha-host > div,
    .smart-captcha-host > div {
        transform: scale(calc(100cqi / 320px));
    }
}

    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(251, 113, 133, 0.12);
    color: #fda4af;
}

.captcha-inline-alert.is-ok {
    background: rgba(52, 211, 153, 0.12);
    color: #86efac;
}

.captcha-inline-alert[hidden] { display: none !important; }

.cabinet-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.cabinet-header h1 { font-size: 1.5rem; margin-bottom: 6px; }

.payment-wait-banner {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.92rem;
    line-height: 1.45;
    border: 1px solid var(--border);
    background: rgba(255, 193, 7, 0.08);
    color: var(--text);
}

.payment-wait-banner--success {
    border-color: rgba(76, 175, 80, 0.45);
    background: rgba(76, 175, 80, 0.1);
}

.payment-wait-banner--error {
    border-color: rgba(244, 67, 54, 0.45);
    background: rgba(244, 67, 54, 0.08);
}

.payment-wait-banner[hidden] { display: none !important; }

.payment-retry-btn {
    margin-top: 10px;
    font-size: 0.88rem;
    padding: 6px 12px;
}

.payment-retry-btn[hidden] { display: none !important; }

.cabinet-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: start;
}

.sidebar { position: sticky; top: 16px; }

.sidebar > section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.sidebar h2 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 14px;
}

.folder-list { list-style: none; }

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 6px;
    border: 1px solid transparent;
}

.folder-item:hover,
.folder-item.active {
    background: var(--bg-elevated);
    border-color: var(--border-active);
}

.folder-create { display: flex; gap: 8px; margin-top: 10px; align-items: center; }

.folder-create__input { flex: 1; min-width: 0; }

.folder-action-btn {
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 0;
    flex-shrink: 0;
}

.folder-create__add {
    font-size: 0;
    position: relative;
    color: #0c0a09;
}

.folder-create__add::before,
.folder-create__add::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    background: currentColor;
    border-radius: 1px;
    transform: translate(-50%, -50%);
}

.folder-create__add::before {
    width: 14px;
    height: 2px;
}

.folder-create__add::after {
    width: 2px;
    height: 14px;
}

.storage-quota {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.storage-quota__head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.78rem;
}

.storage-quota__value { color: #fde68a; font-weight: 600; }

.storage-quota__track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}

.storage-quota__fill {
    height: 100%;
    background: linear-gradient(90deg, #d97706, #f59e0b);
    transition: width 0.3s;
}

.storage-quota.is-full .storage-quota__fill {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.storage-quota__hint { font-size: 0.74rem; color: var(--muted); margin-top: 8px; }

.cabinet-promo-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 24px;
}

.cabinet-promo-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.cabinet-promo-panel__intro { font-size: 0.88rem; color: var(--muted); margin-top: 6px; }

.cabinet-promo-panel__close {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.cabinet-promo-panel__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.24);
}

.cabinet-promo-panel__close:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.55);
    outline-offset: 2px;
}

.cabinet-promo-panel__close svg {
    display: block;
    flex-shrink: 0;
}

.packages-promo {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.packages-promo__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}

.packages-promo__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    align-items: center;
}

.packages-promo__input {
    flex: 1;
    min-width: 140px;
    max-width: 220px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.packages-promo__hint {
    font-size: 0.8rem;
    color: #f87171;
    margin: 8px 0 0;
}

.packages-promo__hint.is-ok { color: #4ade80; }

.pkg-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.pkg-price__old {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 0.88em;
    font-weight: 600;
}

.pkg-price__new { color: var(--accent); }

.welcome-promo-code {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 8px;
    align-items: stretch;
}

.welcome-promo-code__value {
    flex: 1;
    min-width: 120px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px dashed var(--border-active);
    border-radius: var(--radius-sm);
    text-align: center;
}

.welcome-promo-note { margin-top: 0; }

.packages-grid--tariffs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.packages-grid--tariffs .package-card {
    position: relative;
    min-width: 0;
    min-height: 100%;
    padding: 18px 16px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.2s, transform 0.2s;
}

.packages-grid--tariffs .package-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.packages-grid--tariffs .package-card.is-hit,
.packages-grid--tariffs .package-card.is-value {
    border-color: var(--border-active);
    box-shadow: 0 0 0 1px var(--accent-soft);
}

.packages-grid--tariffs .package-card.is-value {
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.12);
}

.packages-grid--tariffs .package-card.is-value .pkg-badge {
    background: rgba(52, 211, 153, 0.18);
    color: #86efac;
}

.packages-grid--tariffs .pkg-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
    line-height: 1.2;
}

.packages-grid--tariffs .pkg-name {
    font-weight: 700;
    font-size: 1.12rem;
    line-height: 1.2;
    margin-bottom: 4px;
    padding-right: 52px;
}

.packages-grid--tariffs .pkg-scenes {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.packages-grid--tariffs .pkg-price {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.packages-grid--tariffs .pkg-tagline {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
    margin: 0 0 12px;
    flex: 1;
    min-height: 2.6em;
}

.packages-grid--tariffs .package-card__buy {
    width: 100%;
    margin-top: auto;
    padding: 12px 16px;
}

@media (max-width: 1100px) {
    .packages-grid--tariffs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .packages-grid--tariffs {
        grid-template-columns: 1fr;
    }

    .packages-grid--tariffs .pkg-name {
        padding-right: 0;
    }

    .packages-grid--tariffs .pkg-tagline {
        min-height: 0;
    }
}

.muted { color: var(--muted); }

.btn-sm {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.btn-secondary {
    color: #fde68a;
    background: var(--bg-elevated);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.btn-secondary:hover:not(.is-disabled) {
    border-color: var(--border-active);
    background: var(--accent-soft);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    filter: brightness(1.08);
}

.btn-danger:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.folder-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.folder-section__head h2 {
    margin: 0;
    font-size: 1rem;
}

.folder-section__tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.08);
}

.bulk-toolbar__select-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
}

.bulk-toolbar__select-all input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.bulk-toolbar__count {
    font-size: 0.82rem;
    color: var(--muted);
    margin-right: auto;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scene-card {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.scene-card.is-selected {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.22);
}

.scene-card__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.scene-card__select {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding-top: 2px;
    cursor: pointer;
}

.scene-card__checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.scene-card__head-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.scene-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: #fde68a;
}

.scene-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.scene-card__date {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
}

.scene-card__status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
}

.scene-card__status--ok {
    color: #86efac;
    border-color: rgba(52, 211, 153, 0.35);
    background: rgba(52, 211, 153, 0.1);
}

.scene-card__status--wait {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.1);
}

.scene-card__status--err {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.1);
}

.scene-card__body {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.scene-card__preview-btn {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #0a0c10;
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.28),
        0 10px 28px rgba(0, 0, 0, 0.38);
    transition: box-shadow 0.2s, transform 0.15s;
}

.scene-card__preview-btn:not(:disabled):hover {
    box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.55),
        0 12px 32px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

.scene-card__preview-btn:disabled {
    cursor: default;
    opacity: 0.75;
}

.scene-card__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.scene-card__preview-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 50%,
        rgba(0, 0, 0, 0.55) 100%
    );
    pointer-events: none;
    transition: background 0.2s;
}

.scene-card__preview-btn:not(:disabled):hover .scene-card__preview-play {
    background: rgba(0, 0, 0, 0.42);
}

.scene-card__preview-play svg {
    width: 34px;
    height: 34px;
    color: #fde68a;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
}

.scene-card__thumb-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 1.25rem;
    font-weight: 600;
    background: linear-gradient(165deg, #141822, #0a0c12);
}

.scene-card__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100%;
}

.scene-card__preview {
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 14px;
    flex: 1;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scene-card__toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
}

.scene-card__toolbar .share-btn {
    width: 100%;
    min-width: 0;
    padding: 10px 8px;
    font-size: 0.82rem;
}

@media (min-width: 520px) {
    .scene-card__toolbar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.scene-card__btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
}

.scene-card__btn--danger:hover:not(:disabled) {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(220, 38, 38, 0.12);
    color: #fca5a5;
}

.scene-card__toolbar .btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* Папка на карточке сцены (как RechAI) */
.folder-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.folder-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.folder-pill:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--surface-hover);
}

.folder-pill.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(249, 115, 22, 0.14));
    border-color: var(--border-active);
    color: #fde68a;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.12);
}

.folder-pill__name {
    line-height: 1.2;
}

.folder-picker {
    position: relative;
    width: 100%;
}

.folder-picker__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-active);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.folder-picker__trigger:hover {
    background: var(--surface-hover);
    border-color: rgba(245, 158, 11, 0.45);
}

.folder-picker.is-open .folder-picker__trigger {
    border-color: var(--border-active);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.folder-picker__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-picker__chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.folder-picker__chevron::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #fde68a;
    border-bottom: 2px solid #fde68a;
    transform: rotate(45deg) translate(-1px, -2px);
}

.folder-picker.is-open .folder-picker__chevron {
    transform: rotate(180deg);
}

.folder-picker__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    padding: 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-active);
    background: var(--bg-elevated);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    max-height: 220px;
    overflow-y: auto;
}

.folder-picker__option {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.folder-picker__option:hover {
    background: var(--surface-hover);
}

.folder-picker__option.is-active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(249, 115, 22, 0.14));
    color: #fde68a;
    font-weight: 600;
}

.folder-move {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid rgba(245, 158, 11, 0.12);
}

.folder-move__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    flex-shrink: 0;
}

.folder-pills--compact {
    gap: 6px;
    flex: 1;
}

.folder-pills--compact .folder-pill {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.scene-card__folder-picker {
    display: none;
    flex: 1;
    min-width: 0;
}

.scene-card__folder-pills {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .folder-move {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .scene-card__folder-pills {
        display: none !important;
    }

    .scene-card__folder-picker {
        display: block !important;
        width: 100%;
    }
}

@media (min-width: 769px) {
    .scene-card__folder-picker {
        display: none !important;
    }
}

.empty-hint {
    text-align: center;
    color: var(--muted);
    padding: 32px 16px;
    font-size: 0.9rem;
}

.empty-hint a {
    color: #fde68a;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pagination__info {
    font-size: 0.82rem;
    color: var(--muted);
}

.pagination__controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.confirm-modal {
    padding: 22px 20px 18px;
}

.confirm-modal h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.confirm-modal .sub {
    margin: 0 0 18px;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.watch-modal {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    overflow: hidden;
}

.watch-modal--wide {
    width: min(720px, calc(100vw - 32px));
}

.watch-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.watch-modal__head h3 {
    margin: 0;
    font-size: 1rem;
}

.watch-modal__body {
    padding: 12px;
    background: #050608;
}

.watch-modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: min(70vh, 640px);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.watch-modal--wide .watch-modal__player {
    aspect-ratio: 16 / 9;
    max-height: min(60vh, 480px);
}

.watch-modal__player .scena-vplayer,
.watch-modal__player .scena-vplayer__root {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.watch-modal__player .scena-vplayer__root {
    display: block;
}

.watch-modal__player .scena-vplayer__screen {
    position: absolute;
    inset: 0;
    display: block;
}

.watch-modal__player .scena-vplayer__video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

.watch-modal__player .scena-vplayer__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    margin: 0;
    border: none;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.45) 38%, rgba(0, 0, 0, 0.88) 100%);
    padding: 28px 10px 10px;
}

.watch-modal__player .scena-vplayer__overlay-play {
    z-index: 4;
}

@media (max-width: 640px) {
    .folder-section__head {
        flex-direction: column;
        align-items: stretch;
    }

    .scene-card__body {
        grid-template-columns: 1fr;
    }

    .scene-card__preview-btn {
        max-width: 140px;
        margin: 0 auto;
    }

    .scene-card__toolbar {
        grid-template-columns: 1fr;
    }

    .bulk-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-toolbar__count {
        margin-right: 0;
    }
}

@media (max-width: 900px) {
    .cabinet-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}
