:root {
    --bg: #050608;
    --bg-elevated: #0c0e14;
    --surface: #12151c;
    --surface-hover: #1a1f2a;
    --border: rgba(255, 255, 255, 0.07);
    --border-active: rgba(245, 158, 11, 0.45);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #f59e0b;
    --accent-2: #f97316;
    --accent-soft: rgba(245, 158, 11, 0.12);
    --accent-glow: rgba(251, 191, 36, 0.35);
    --cyan: #22d3ee;
    --rose: #fb7185;
    --success: #34d399;
    --radius: 18px;
    --radius-sm: 12px;
    --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 55% at 50% -15%, rgba(245, 158, 11, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 40% at 0% 60%, rgba(34, 211, 238, 0.06), transparent),
        radial-gradient(ellipse 45% 35% at 100% 70%, rgba(251, 113, 133, 0.07), transparent);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px clamp(16px, 4vw, 32px) 96px;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

@media (min-width: 777px) {
    body.scena-sticky-topbar {
        --topbar-stick: 16px;
        --studio-preview-gap: 22px;
        overflow-x: clip;
    }

    body.scena-sticky-topbar .topbar {
        position: sticky;
        top: var(--topbar-stick);
        z-index: 100;
    }

    body.scena-sticky-topbar .topbar.topbar--stuck {
        padding-top: 6px;
        border-bottom-color: transparent;
    }

    body.scena-sticky-topbar .topbar.topbar--stuck::before {
        content: '';
        position: absolute;
        top: calc(-1 * var(--topbar-stick));
        left: 50%;
        transform: translateX(-50%);
        width: 100vw;
        bottom: 0;
        background: rgba(5, 6, 8, 0.72);
        backdrop-filter: blur(20px) saturate(1.18);
        -webkit-backdrop-filter: blur(20px) saturate(1.18);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
        z-index: 0;
        pointer-events: none;
    }

    body.scena-sticky-topbar .topbar.topbar--stuck > .topbar-start,
    body.scena-sticky-topbar .topbar.topbar--stuck > .topbar-actions,
    body.scena-sticky-topbar .topbar.topbar--stuck > .legal-topnav {
        position: relative;
        z-index: 1;
    }
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.topbar-brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 800;
    color: #0a0a0a;
    box-shadow: 0 0 24px var(--accent-glow);
}

.topbar-brand__text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, #fff 0%, #fde68a 40%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.topbar-brand__tag {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    -webkit-text-fill-color: var(--muted);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-switch {
    display: flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.product-switch a {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.2s, background 0.2s;
}

.product-switch a.is-active {
    color: #0a0a0a;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.product-switch a:not(.is-active):hover {
    color: var(--text);
}

.topbar-actions {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-actions__track {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    color: #0c0a09;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #ea580c 100%);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 32px rgba(245, 158, 11, 0.5);
}

.btn-ghost {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--border-active);
    background: var(--accent-soft);
}

.oauth-row--secondary {
    margin-top: 0;
}

/* VK — виджет сообщений сообщества (Open API) */
#vk_community_messages {
    position: relative;
    z-index: 1500;
}

.btn-vk-auth {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #0077ff;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-vk-auth:hover {
    opacity: 0.92;
}

.btn-vk-auth:active {
    transform: scale(0.98);
}

.btn-vk-auth.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-vk-auth__icon {
    display: inline-flex;
    line-height: 0;
}

.auth-vk-block {
    width: 100%;
}

.auth-vk-hint {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}

/* Вход — OAuth (как RechAI) */
.oauth-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.oauth-row .btn,
a.oauth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none !important;
    color: var(--text) !important;
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.oauth-row .btn:hover,
a.oauth-btn:hover {
    border-color: var(--border-active);
    background: var(--surface-hover);
    color: var(--text) !important;
}

.oauth-row .btn:active,
a.oauth-btn:active {
    transform: scale(0.98);
}

.divider {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    margin: 16px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 48px;
}

.hero__badges {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 8px 16px;
    min-height: 38px;
    box-sizing: border-box;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-align: center;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.28);
    max-width: min(100%, 540px);
}

.hero__badge:first-child {
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.hero__badge strong {
    color: #fff;
    font-weight: 700;
}

.hero__badge-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero__title {
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    max-width: 18ch;
    margin-left: auto;
    margin-right: auto;
}

.hero__title span {
    background: linear-gradient(135deg, #fff 0%, #fde68a 35%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__lead {
    max-width: 520px;
    margin: 0 auto 28px;
    font-size: clamp(0.95rem, 2.5vw, 1.08rem);
    color: var(--muted);
    line-height: 1.6;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Showcase — bento gallery */
.showcase-section {
    margin-bottom: 56px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-head p {
    font-size: 0.88rem;
    color: var(--muted);
    max-width: 420px;
}

.showcase-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 28px;
    gap: 12px;
}

.showcase-tile {
    position: relative;
    grid-column: span var(--col, 4);
    grid-row: span var(--row, 10);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    min-height: 0;
}

.showcase-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(5, 6, 8, 0.92) 100%);
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s;
}

.showcase-tile:hover::before {
    opacity: 0.85;
}

.showcase-tile__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.showcase-tile:hover .showcase-tile__media,
.showcase-tile:hover .showcase-tile__video {
    transform: scale(1.06);
}

.showcase-tile__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.showcase-tile--has-promo .showcase-tile__fallback {
    display: none;
}

.showcase-tile--has-promo .showcase-tile__video {
    display: block;
}

.showcase-tile__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 3;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
}

.showcase-tile:hover .showcase-tile__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.showcase-tile__play svg {
    width: 20px;
    height: 20px;
    margin-left: 3px;
    fill: #fff;
}

.showcase-tile__meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 16px 18px;
}

.showcase-tile__label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.showcase-tile__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(248, 250, 252, 0.85);
    letter-spacing: 0.02em;
}

.tag--accent {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
}

.showcase-tile--hero { --col: 7; --row: 16; }
.showcase-tile--tall { --col: 5; --row: 16; }
.showcase-tile--wide { --col: 6; --row: 10; }
.showcase-tile--sq { --col: 3; --row: 10; }
.showcase-tile--mid { --col: 3; --row: 10; }

@media (max-width: 900px) {
    .showcase-bento {
        grid-template-columns: repeat(6, 1fr);
    }
    .showcase-tile--hero { --col: 6; --row: 12; }
    .showcase-tile--tall { --col: 6; --row: 12; }
    .showcase-tile--wide { --col: 6; --row: 9; }
    .showcase-tile--sq,
    .showcase-tile--mid { --col: 3; --row: 9; }
}

@media (max-width: 520px) {
    .showcase-bento { grid-template-columns: 1fr 1fr; }
    .showcase-tile { --col: 2 !important; --row: 9 !important; }
    .showcase-tile--hero { grid-column: span 2; --row: 11 !important; }
}

/* Studio */
.studio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 56px;
    align-items: start;
}

@media (max-width: 900px) {
    .studio { grid-template-columns: 1fr; }
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    min-width: 0;
}

.panel--studio-form {
    position: relative;
}

.studio-guest-gate {
    position: absolute;
    inset: 0;
    z-index: 30;
    border-radius: inherit;
    cursor: pointer;
    background: transparent;
}

body.scena-guest .panel--studio-form .studio-guest-gate:not([hidden]) {
    display: block;
}

.panel--preview {
    position: sticky;
    top: 80px;
}

@media (min-width: 777px) {
    body.scena-sticky-topbar .panel--preview {
        top: calc(var(--topbar-stick) + var(--topbar-height, 72px) + var(--studio-preview-gap));
    }
}

@media (max-width: 900px) {
    .panel--preview { position: static; }
}

.panel__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.panel__sub {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.upload-zone {
    border: 2px dashed rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-sm);
    padding: 36px 20px;
    text-align: center;
    background: rgba(245, 158, 11, 0.04);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.upload-zone--compact {
    padding: 18px 14px;
}

.upload-zone--compact .upload-zone__icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.upload-zone__hint {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--muted);
}

.upload-frame {
    position: relative;
}

.upload-frame.has-image .upload-zone {
    display: none;
}

.upload-preview {
    position: relative;
    text-align: center;
    max-height: 148px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.upload-preview[hidden] {
    display: none;
}

.upload-preview img {
    display: block;
    width: 100%;
    max-height: 148px;
    margin: 0 auto;
    object-fit: contain;
}

.upload-preview__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: rgba(5, 6, 10, 0.82);
    color: #f8fafc;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    z-index: 2;
}

.upload-preview__remove:hover {
    background: rgba(220, 38, 38, 0.85);
    border-color: rgba(248, 113, 113, 0.5);
    transform: scale(1.05);
}

.field--row-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.field--row-label label {
    margin-bottom: 0;
}

.tip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tip-i {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 1;
    cursor: help;
}

.tip-pop {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: min(260px, 70vw);
    padding: 10px 12px;
    border-radius: 8px;
    background: #1a1f2e;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    white-space: pre-line;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 20;
    pointer-events: none;
}

.tip-wrap:hover .tip-pop,
.tip-wrap:focus-within .tip-pop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.studio-note {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--muted);
}

.upload-zone:hover,
.upload-zone.is-dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.upload-zone__icon {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.upload-zone p {
    font-size: 0.9rem;
    color: var(--muted);
}

.upload-zone strong {
    color: var(--text);
}

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field textarea,
.field input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-family: inherit;
    font-size: 0.92rem;
    resize: vertical;
    min-height: 120px;
}

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

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

.chip {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.chip.is-active {
    border-color: var(--border-active);
    color: #fde68a;
    background: var(--accent-soft);
}

/* Studio: по 2 настройки в строку */
.studio-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}

.studio-options__row[hidden],
#klingOptionsRow[hidden],
#seedanceOptionsRow[hidden],
#lastFrameBlock[hidden],
.studio-option[hidden] {
    display: none !important;
}

.studio-options__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 20px;
    align-items: start;
}

.studio-options__row--solo {
    grid-template-columns: 1fr;
}

.studio-options__row:has(.studio-option--resolution[data-studio-ui="hidden"]),
.studio-options__row:has(.studio-option--speed[data-studio-ui="hidden"]) {
    grid-template-columns: 1fr;
}

.studio-options__row--model {
    grid-template-columns: 1fr;
}

.model-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.model-chip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.model-chip__label {
    line-height: 1.25;
}

.model-chip--premium:not(.is-active) {
    border-color: rgba(251, 191, 36, 0.14);
}

.model-chip--premium:not(.is-active):hover {
    border-color: rgba(251, 191, 36, 0.28);
}

.model-chip__inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
}

.model-chip__crown {
    width: calc(1em * 18 / 13);
    height: 1em;
    flex-shrink: 0;
    display: block;
    pointer-events: none;
    transition: filter 0.2s, transform 0.2s;
}

.model-chip--premium:hover .model-chip__crown {
    filter: brightness(1.08);
}

.model-chip--premium.is-active .model-chip__crown {
    filter: brightness(1.12) drop-shadow(0 0 4px rgba(251, 146, 60, 0.35));
}

.studio-option--model .model-picker .chip {
    width: 100%;
    min-width: 0;
}

@media (max-width: 720px) {
    .model-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.studio-option--pad {
    visibility: hidden;
    pointer-events: none;
    min-height: 1px;
}

@media (max-width: 560px) {
    .studio-options {
        gap: 12px;
    }

    .studio-options__row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .studio-option--pad {
        display: none;
    }
}

.studio-option label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.studio-option__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 26px;
    margin-bottom: 10px;
}

.studio-option__head label {
    margin-bottom: 0;
}

.studio-option .chip-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.studio-option .chip {
    width: 100%;
    min-width: 0;
    padding: 9px 8px;
    font-size: 0.78rem;
    text-align: center;
}

.studio-option--duration[data-studio-ui="grok"] .duration-hailuo,
.studio-option--duration[data-studio-ui="grok"] .duration-kling,
.studio-option--duration[data-studio-ui="hailuo"] .duration-grok,
.studio-option--duration[data-studio-ui="hailuo"] .duration-kling,
.studio-option--duration[data-studio-ui="premium"] .duration-hailuo,
.studio-option--duration[data-studio-ui="premium"] .duration-grok,
.studio-option--duration[data-studio-ui="kling"] .duration-hailuo,
.studio-option--duration[data-studio-ui="kling"] .duration-grok {
    display: none;
}

.studio-option--duration[data-studio-ui="hailuo"] .duration-hailuo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.studio-option--duration[data-studio-ui="grok"] .duration-grok,
.studio-option--duration[data-studio-ui="premium"] .duration-kling,
.studio-option--duration[data-studio-ui="kling"] .duration-kling {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 2px;
}

.studio-option--resolution[data-studio-ui="hidden"] {
    display: none;
}

.studio-option--speed[data-studio-ui="hidden"] {
    display: none;
}

.studio-option__note {
    margin: 6px 0 0;
    font-size: 0.72rem;
    color: var(--accent);
}

.label-muted {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.85em;
}

.upload-frame--last {
    margin-top: 12px;
}

.upload-frame--last.has-image .upload-zone {
    display: none;
}

.chip.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.duration-slider {
    width: 100%;
    height: 6px;
    margin: 0;
    appearance: none;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-soft), rgba(251, 191, 36, 0.15));
    outline: none;
    cursor: pointer;
}

.duration-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fde68a;
    background: #1a2030;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.duration-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fde68a;
    background: #1a2030;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.duration-grok__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.duration-grok__value {
    font-size: 1rem;
    font-weight: 700;
    color: #fde68a;
}

.duration-grok__hint {
    font-size: 0.72rem;
    color: var(--muted);
}

.duration-kling {
    display: none;
}

.scene-cost {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 4px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(15, 18, 28, 0.6));
}

.btn-generate {
    width: 100%;
    margin-top: 14px;
    padding: 14px;
}

.scene-cost__dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fde68a;
    box-shadow: 0 0 12px rgba(253, 230, 138, 0.55);
}

.scene-cost__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.scene-cost__label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scene-cost__value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fde68a;
}

.scene-cost__hint {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: right;
    max-width: 46%;
    line-height: 1.35;
}

@media (max-width: 520px) {
    .scene-cost {
        flex-wrap: wrap;
    }

    .scene-cost__hint {
        max-width: 100%;
        margin-left: 22px;
        text-align: left;
    }
}

.preview-box {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9 / 16;
    min-height: 360px;
    max-height: min(480px, 62vh);
    margin: 0 auto;
    border-radius: var(--radius-sm);
    background: #151a26;
    border: 1px solid var(--border);
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.preview-box__idle {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    margin: 0;
    padding: 0;
    background: linear-gradient(165deg, #151a26 0%, #1c2233 48%, #10141f 100%);
    overflow: hidden;
}

.preview-ph-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.preview-ph-bg__glow {
    position: absolute;
    left: 50%;
    top: 38%;
    width: 220px;
    height: 220px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, transparent 68%);
    animation: preview-ph-pulse 4s ease-in-out infinite;
}

.preview-ph-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(245, 158, 11, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.07) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 15%, transparent 72%);
}

.preview-ph-bg__frame {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 72%;
    height: 52%;
    transform: translate(-50%, -50%);
    border: 2px dashed rgba(245, 158, 11, 0.38);
    border-radius: 12px;
    box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.35);
}

.preview-ph-play {
    position: absolute;
    left: 50%;
    top: 42%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.65);
    background: rgba(245, 158, 11, 0.22);
    display: grid;
    place-items: center;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
    pointer-events: none;
}

.preview-ph-play::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(251, 191, 36, 0.45);
    border-right-color: rgba(245, 158, 11, 0.12);
    animation: preview-ph-orbit 3.5s linear infinite;
}

.preview-ph-play svg {
    display: block;
    width: 34px;
    height: 34px;
    color: #fde68a;
}

@keyframes preview-ph-orbit {
    to { transform: rotate(360deg); }
}

.preview-ph-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 14px 20px;
    background: linear-gradient(0deg, rgba(8, 10, 16, 0.92) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

@keyframes preview-ph-pulse {
    0%, 100% { opacity: 0.65; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

.preview-ph-label__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.preview-ph-label__sub {
    font-size: 0.76rem;
    line-height: 1.4;
    color: #94a3b8;
}

.preview-box:not(.has-video):not(.is-generating) #previewIdle {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.scena-player__logo {
    font-size: 1.4rem;
    color: #fde68a;
    margin-left: 3px;
}

.preview-box.is-generating .preview-box__idle,
.preview-box.has-video .preview-box__idle,
.preview-box.is-generating #previewIdle,
.preview-box.has-video #previewIdle {
    display: none !important;
}

.preview-box__gen {
    position: absolute;
    inset: 0;
    z-index: 3;
    overflow: hidden;
    background: #06080e;
}

.preview-box__gen[hidden] {
    display: none !important;
}

.preview-box__gen:not([hidden]) {
    display: block;
}

.gen-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gen-fx__grid {
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(245, 158, 11, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 42%, #000 20%, transparent 72%);
    animation: gen-grid-drift 14s linear infinite;
}

.gen-fx__ring {
    position: absolute;
    left: 50%;
    top: 40%;
    border-radius: 50%;
    border: 1px solid transparent;
}

.gen-fx__ring--a {
    width: 148px;
    height: 148px;
    transform: translate(-50%, -50%);
    border-top-color: rgba(251, 191, 36, 0.75);
    border-right-color: rgba(245, 158, 11, 0.15);
    animation: gen-spin 2.4s linear infinite;
    filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.35));
}

.gen-fx__ring--b {
    width: 104px;
    height: 104px;
    transform: translate(-50%, -50%);
    border-bottom-color: rgba(251, 191, 36, 0.45);
    border-left-color: rgba(245, 158, 11, 0.12);
    animation: gen-spin-rev 1.5s linear infinite;
    opacity: 0.9;
}

.gen-fx__core {
    position: absolute;
    left: 50%;
    top: 40%;
    width: 38px;
    height: 38px;
    transform: translate(-50%, -50%);
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.5);
    background: rgba(12, 14, 22, 0.9);
    overflow: hidden;
    box-shadow:
        0 0 28px rgba(245, 158, 11, 0.28),
        inset 0 0 16px rgba(245, 158, 11, 0.12);
}

.gen-fx__scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(251, 191, 36, 0.4), transparent);
    animation: gen-scan 1.9s ease-in-out infinite;
}

.preview-box__gen-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 14px 16px 16px;
    background: linear-gradient(0deg, rgba(5, 6, 10, 0.96) 0%, rgba(5, 6, 10, 0.5) 65%, transparent);
}

.gen-fx__badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(253, 230, 138, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    background: rgba(245, 158, 11, 0.06);
}

.preview-box__gen-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fde68a;
}

.preview-box__gen-sub {
    margin: 6px auto 0;
    font-size: 0.76rem;
    color: rgba(203, 213, 225, 0.92);
    max-width: 220px;
    line-height: 1.35;
}

.preview-box__gen-bar {
    width: 100%;
    max-width: 220px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin: 12px auto 0;
}

.preview-box__gen-bar span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d97706, #fbbf24, #fde68a);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.55);
    transition: width 0.4s ease;
}

@keyframes gen-grid-drift {
    to { background-position: 22px 22px; }
}

@keyframes gen-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gen-spin-rev {
    to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes gen-scan {
    0%, 100% { top: -50%; }
    50% { top: 110%; }
}

.scena-player {
    position: absolute;
    inset: 0;
    z-index: 2;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: #050608;
}

.scena-player[hidden] {
    display: none !important;
}

.preview-box.has-video .scena-player {
    z-index: 4;
    display: flex !important;
}

.preview-box.has-video .preview-box__gen {
    display: none !important;
}

.scena-player:not([hidden]) {
    display: flex;
}

.scena-player__viewport {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.scena-player__viewport video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.scena-player__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(8, 10, 14, 0.96);
    border-top: 1px solid rgba(245, 158, 11, 0.22);
}

.scena-player__play {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #0a0c10;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
}

.scena-player__meta {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.scena-player__brand {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fde68a;
    letter-spacing: 0.04em;
}

.scena-player__time {
    font-size: 0.68rem;
    color: var(--muted);
}

/* Preview actions (share / download) */
.preview-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 320px;
}

.preview-actions[hidden] {
    display: none !important;
}

.preview-actions .share-btn,
.preview-actions .preview-download-btn {
    flex: 0 1 auto;
    justify-content: center;
    min-height: 42px;
}

@media (max-width: 520px) {
    .preview-actions {
        max-width: none;
    }

    .preview-actions .share-btn,
    .preview-actions .preview-download-btn {
        flex: 1 1 100%;
        max-width: 320px;
    }
}

/* Cross-sell → Promt Studio (/smmcontent) */
.preview-smm {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 11px 12px 11px 11px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.22);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.10), transparent 55%),
        rgba(255, 255, 255, 0.02);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.preview-smm:hover {
    border-color: rgba(245, 158, 11, 0.48);
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 55%),
        rgba(255, 255, 255, 0.035);
    transform: translateY(-1px);
}

.preview-smm:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.preview-smm__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.preview-smm__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-smm__eyebrow {
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.2;
}

.preview-smm__title {
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.25;
    color: var(--text);
}

.preview-smm__models {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 4px;
}

.preview-smm__models span {
    font-size: 0.68rem;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.preview-smm__go {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
    transition: transform 0.2s ease, background 0.2s ease;
}

.preview-smm:hover .preview-smm__go {
    transform: translateX(2px);
    background: rgba(245, 158, 11, 0.18);
}

/* Share button — ScenaAI amber */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 55%, #ea580c 100%);
    color: #0a0c10;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    text-decoration: none;
}

.share-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 6px 22px rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn--done {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.35);
}

.share-btn svg,
.share-btn__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
}

.share-btn__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Branded video player (studio + share) */
.scena-vplayer {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.scena-vplayer__root {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #000;
}

.scena-vplayer__screen {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.scena-vplayer__video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: #000;
}

.scena-vplayer__root.is-portrait .scena-vplayer__video {
    object-fit: cover;
}

.scena-vplayer__root.is-landscape .scena-vplayer__video {
    object-fit: contain;
}

.scena-vplayer__overlay-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.92);
    color: #0a0c10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, opacity 0.15s ease;
    z-index: 2;
}

.scena-vplayer__overlay-play svg {
    width: 30px;
    height: 30px;
    display: block;
    flex-shrink: 0;
}

.scena-vplayer__overlay-play:hover {
    transform: scale(1.05);
}

.scena-vplayer__overlay-play[hidden],
.scena-vplayer.is-playing .scena-vplayer__overlay-play,
.scena-vplayer__root.is-playing .scena-vplayer__overlay-play {
    display: none !important;
    pointer-events: none;
}

.scena-vplayer.is-playing .scena-vplayer__overlay-play,
.scena-vplayer__root.is-playing .scena-vplayer__overlay-play {
    opacity: 0;
    visibility: hidden;
}

.scena-vplayer__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(8, 10, 14, 0.96);
    border-top: 1px solid rgba(245, 158, 11, 0.22);
}

.scena-vplayer__play {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #0a0c10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.scena-vplayer__play svg {
    width: 20px;
    height: 20px;
}

.scena-vplayer__mute {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    flex-shrink: 0;
    font: inherit;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.scena-vplayer__mute:hover {
    background: rgba(255, 255, 255, 0.08);
}

.scena-vplayer__mute.is-muted {
    padding: 0 10px 0 8px;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fde68a;
}

.scena-vplayer__mute.is-muted:hover {
    background: rgba(245, 158, 11, 0.3);
}

.scena-vplayer__mute:not(.is-muted) {
    width: 32px;
    padding: 0;
}

.scena-vplayer__volume {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
}

.scena-vplayer__vol {
    width: 72px;
    height: 4px;
    margin: 0;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
}

.scena-vplayer__vol::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.scena-vplayer__vol::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.scena-vplayer__vol::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.scena-vplayer__fs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    flex-shrink: 0;
    font: inherit;
    transition: color 0.15s ease, background 0.15s ease;
}

.scena-vplayer__fs svg {
    width: 16px;
    height: 16px;
    display: block;
}

.scena-vplayer__fs:hover {
    background: rgba(255, 255, 255, 0.08);
}

.scena-vplayer__root:fullscreen,
.scena-vplayer__root:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    background: #000;
}

.scena-vplayer__root:fullscreen .scena-vplayer__screen,
.scena-vplayer__root:-webkit-full-screen .scena-vplayer__screen {
    flex: 1 1 auto;
    min-height: 0;
}

.scena-vplayer__root:fullscreen .scena-vplayer__bar,
.scena-vplayer__root:-webkit-full-screen .scena-vplayer__bar {
    flex-shrink: 0;
}

.scena-vplayer__mute-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scena-vplayer__mute-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.scena-vplayer__mute-text {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.scena-vplayer__track {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.scena-vplayer__buffer,
.scena-vplayer__progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
}

.scena-vplayer__buffer {
    width: 0;
    background: rgba(255, 255, 255, 0.15);
}

.scena-vplayer__progress {
    width: 0;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.scena-vplayer__seek {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.scena-vplayer__time {
    font-size: 0.65rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 72px;
    text-align: right;
}

.scena-vplayer__brand {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fde68a;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.preview-box .scena-vplayer,
.preview-box .scena-vplayer__root {
    position: absolute;
    inset: 0;
}

.preview-box .scena-vplayer__root {
    display: block;
}

.preview-box .scena-vplayer__screen {
    position: absolute;
    inset: 0;
    display: block;
}

.preview-box .scena-vplayer__video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
}

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

.preview-box .scena-vplayer__overlay-play {
    z-index: 4;
}

@media (max-width: 420px) {
    .preview-box .scena-vplayer__vol {
        width: 52px;
    }
}

.scena-alert-modal--share .scena-alert-modal__icon {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.35);
}

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

.gen-status {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

.gen-status.is-error {
    color: #f87171;
}

.gen-status.is-ok {
    color: #34d399;
}

.coming-badge {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .features { grid-template-columns: 1fr; }
}

.feature-card {
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, var(--surface) 0%, rgba(12, 14, 20, 0.6) 100%);
}

.feature-card__icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.models-seo {
    margin-bottom: 48px;
}

.models-seo__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .models-seo__grid { grid-template-columns: 1fr; }
}

.models-seo__card {
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}

.models-seo__card--accent {
    border-color: rgba(245, 158, 11, 0.35);
    background: linear-gradient(160deg, rgba(245, 158, 11, 0.08) 0%, var(--surface) 100%);
}

.models-seo__card h3 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.models-seo__tier {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 10px;
}

.models-seo__card p:last-child {
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.55;
}

.models-seo__split {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.models-seo__model {
    margin: 0;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.55;
}

.models-seo__model strong:first-of-type {
    color: var(--text);
}

.models-seo__model-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
    color: var(--accent);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.models-seo__model-badge--premium {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.18);
}

.models-seo__offer {
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px dashed rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.06);
}

.faq-seo {
    margin-bottom: 48px;
}

.faq-seo__list {
    display: grid;
    gap: 10px;
}

.faq-seo__item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

.faq-seo__item summary {
    padding: 16px 18px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    list-style: none;
}

.faq-seo__item summary::-webkit-details-marker {
    display: none;
}

.faq-seo__item summary::after {
    content: "+";
    float: right;
    color: var(--accent);
    font-weight: 700;
}

.faq-seo__item[open] summary::after {
    content: "−";
}

.faq-seo__item p {
    padding: 0 18px 16px;
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.6;
}

@media (max-width: 772px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .topbar-start {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .topbar-brand__mark {
        width: 32px;
        height: 32px;
        font-size: 0.92rem;
    }

    .topbar-brand__text {
        font-size: 1.15rem;
    }

    .topbar-brand__tag {
        display: none;
    }

    .product-switch {
        flex-shrink: 0;
    }

    .product-switch a {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .topbar-actions {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    .topbar-actions__track {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    body.scena-auth .topbar-actions__track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-actions .btn,
    .topbar-actions .balance-widget {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding: 9px 8px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .topbar-actions .btn-primary {
        padding: 9px 10px;
    }

    .topbar-actions .balance-widget {
        padding: 8px 10px;
        font-size: 0.76rem;
    }
}

@media (min-width: 480px) and (max-width: 772px) {
    body.scena-auth .topbar-actions__track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .wrap {
        padding-top: 20px;
        padding-bottom: 72px;
    }
}

/* Footer (как RechAI) */
.site-footer {
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.site-footer__inner {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

.site-footer__inner--solo {
    max-width: 520px;
}

@media (min-width: 768px) {
    .site-footer__inner:not(.site-footer__inner--solo) {
        grid-template-columns: 1.2fr auto 1fr;
        align-items: start;
    }
}

.site-footer__logo {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fde68a;
    margin-bottom: 6px;
}

.site-footer__tagline {
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 300px;
    line-height: 1.45;
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s;
    text-decoration: none;
}

.site-footer__link:hover {
    color: #fde68a;
}

.site-footer__link::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.85;
    flex-shrink: 0;
}

.site-footer__link--plain::before {
    display: none;
}

.site-footer__credit {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
}

.site-footer__credit a {
    color: #fcd34d;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(252, 211, 77, 0.35);
}

.site-footer__credit a:hover {
    color: #fde68a;
    border-bottom-color: #fde68a;
}

.site-footer__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

@media (max-width: 767px) {
    .site-footer__aside {
        align-items: flex-start;
        text-align: left;
    }
}

.site-footer__legal {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

.site-footer__legal p {
    margin: 0 0 4px;
}

.site-footer__legal p:last-child {
    margin-bottom: 0;
}

.feedback-form label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin: 12px 0 4px;
}

.feedback-form label:first-child {
    margin-top: 0;
}

.feedback-form .input,
.feedback-form textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.feedback-form textarea {
    min-height: 120px;
    resize: vertical;
}

.feedback-form__check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px !important;
    font-size: 0.85rem !important;
    color: var(--text) !important;
    cursor: pointer;
}

.feedback-form__check input {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    accent-color: var(--accent);
}

.feedback-form__err {
    color: #fca5a5;
    font-size: 0.82rem;
    margin-top: 10px;
}

.feedback-form__err[hidden] {
    display: none !important;
}

.guest-captcha-block--feedback {
    margin-top: 14px;
}

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

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

/* Фирменный скролл ScenaAI (янтарь) */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.55) rgba(255, 255, 255, 0.04);
}

html::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

html::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

html::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.75), rgba(249, 115, 22, 0.5));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.65));
    background-clip: padding-box;
}

.scenaai-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.55) rgba(255, 255, 255, 0.05);
}

.scenaai-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scenaai-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    margin: 4px 0;
}

.scenaai-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.8), rgba(249, 115, 22, 0.55));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.scenaai-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.95), rgba(245, 158, 11, 0.7));
    background-clip: padding-box;
}

/* Модалки — как RechAI: карточка по центру, скролл внутри */
.modal-overlay,
.content-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.modal-overlay.open,
.content-modal-overlay.open {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    min-height: 100dvh;
}

.modal-overlay.open > .modal,
.modal-overlay.open > .content-modal,
.content-modal-overlay.open > .content-modal {
    flex-shrink: 0;
    margin: auto;
}

#authModal.open {
    z-index: 1600;
}

#feedbackModal.open {
    z-index: 1600;
}

.modal {
    width: min(480px, calc(100vw - 32px));
    max-height: min(88vh, 720px);
    overflow: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.modal h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.modal p.sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-overlay .modal::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-overlay .modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    margin: 4px 0;
}

.modal-overlay .modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.75), rgba(249, 115, 22, 0.5));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.modal-overlay .modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.65));
    background-clip: padding-box;
}

.content-modal {
    width: min(640px, calc(100vw - 28px));
    max-height: min(88vh, 680px);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
    margin: auto;
}

.content-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.content-modal__head h3 {
    margin: 0;
    font-size: 1.15rem;
}

.content-modal__sub {
    margin: 4px 0 0 !important;
    font-size: 0.82rem !important;
    color: var(--muted) !important;
}

.content-modal__body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 20px 22px;
    font-size: 0.88rem;
    line-height: 1.55;
}

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

.content-modal__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.24) !important;
}

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

.content-modal__close svg {
    display: block;
    flex-shrink: 0;
}

.content-modal__body h1 {
    font-size: 1.05rem;
    color: #fde68a;
    margin: 0 0 12px;
}

.content-modal__body h2 {
    font-size: 0.95rem;
    color: #fde68a;
    margin: 20px 0 8px;
}

.content-modal__body h4 {
    font-size: 0.95rem;
    color: #fde68a;
    margin: 18px 0 8px;
}

.content-modal__body p,
.content-modal__body li,
.content-modal__body dd {
    color: var(--text);
    margin-bottom: 10px;
}

.content-modal__body ul {
    padding-left: 1.2rem;
    margin-bottom: 12px;
}

.content-modal__body a {
    color: var(--accent);
}

.content-modal__body .legal-dl dt {
    color: var(--muted);
    font-weight: 600;
    margin-top: 8px;
}

.content-modal__body .legal-updated {
    font-size: 0.8rem;
    color: var(--muted);
}

.legal-modal-loading {
    color: var(--muted);
    padding: 24px 0;
}

@media (max-width: 600px) {
    .content-modal__body {
        padding: 14px 16px 18px;
    }

    .content-modal__head {
        padding: 14px 16px 10px;
    }
}

.lineup {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.prices-modal__intro {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 16px;
    line-height: 1.5;
}

#pricesModal .content-modal {
    width: min(960px, calc(100vw - 24px));
    max-height: min(90vh, 760px);
}

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

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

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

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

#pricesModal .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);
}

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

#pricesModal .packages-grid--tariffs .pkg-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    min-height: 2.4em;
}

#pricesModal .packages-grid--tariffs .pkg-badge {
    position: static;
    flex-shrink: 0;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 7px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
    line-height: 1.25;
    white-space: nowrap;
}

#pricesModal .packages-grid--tariffs .pkg-name {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.25;
    margin: 0;
    padding: 0;
    min-width: 0;
}

#pricesModal .packages-grid--tariffs .pkg-scenes {
    font-size: 0.84rem;
    color: var(--muted);
    margin-bottom: 4px;
}

#pricesModal .packages-grid--tariffs .pkg-price {
    font-size: 1.28rem;
    font-weight: 800;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

#pricesModal .packages-grid--tariffs .pkg-tagline {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.45;
    margin: 0 0 14px;
    flex: 1;
}

#pricesModal .packages-grid--tariffs .package-card__buy {
    width: 100%;
    margin-top: auto;
    padding: 11px 14px;
    font-size: 0.88rem;
}

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

@media (max-width: 520px) {
    #pricesModal .content-modal {
        width: calc(100vw - 16px);
        max-height: min(92vh, 800px);
    }

    #pricesModal .packages-grid--tariffs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #pricesModal .packages-grid--tariffs .pkg-card__top {
        min-height: 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: 4px;
    font-variant-numeric: tabular-nums;
}

.packages-grid--tariffs .pkg-price-note {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.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;
    }
}

/* Modal preview */
.scena-alert-overlay {
    z-index: 2000;
}

.scena-toast-host {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(12px);
    z-index: 2100;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.scena-toast-host.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.scena-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #1a1f2e;
    border: 1px solid rgba(52, 211, 153, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color: rgba(248, 250, 252, 0.95);
    font-size: 0.88rem;
    line-height: 1.4;
}

.scena-toast--error {
    border-color: rgba(248, 113, 113, 0.4);
}

.scena-toast__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.scena-toast--error .scena-toast__icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.scena-toast__text {
    flex: 1;
    min-width: 0;
}

.scena-alert-modal {
    position: relative;
    width: min(440px, calc(100vw - 32px));
    padding: 12px 22px 20px;
    text-align: center;
}

.scena-alert-modal__bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 36px;
    margin: 0 0 4px;
}

.scena-alert-modal__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
}

.scena-alert-modal--error .scena-alert-modal__icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.scena-alert-modal--success .scena-alert-modal__icon {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.scena-alert-modal--warning .scena-alert-modal__icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
}

.scena-alert-modal--info .scena-alert-modal__icon {
    background: rgba(148, 163, 184, 0.12);
    color: var(--muted);
}

.scena-alert-modal--wait .scena-alert-modal__icon {
    display: none;
}

.scena-alert-modal__spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid rgba(168, 85, 247, 0.2);
    border-top-color: var(--accent);
    animation: scena-alert-spin 0.85s linear infinite;
}

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

.scena-alert-modal__close {
    position: static;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    line-height: 1;
    font-size: 1.15rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.scena-alert-modal h3 {
    margin: 0 0 10px;
    font-size: 1.12rem;
}

.scena-alert-modal__message {
    margin: 0 0 20px !important;
    text-align: center;
    color: var(--text) !important;
}

.scena-alert-modal__actions {
    display: flex;
    justify-content: center;
}

.scena-alert-modal__actions .btn {
    min-width: 140px;
}

@media (max-width: 480px) {
    .scena-alert-modal {
        padding: 20px 16px 18px;
    }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5, 6, 8, 0.88);
    backdrop-filter: blur(16px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.is-open { display: flex; }

.lightbox__card {
    max-width: 480px;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}

.lightbox__card--wide {
    max-width: 720px;
}

.lightbox__media {
    position: relative;
    background: #000;
}

.lightbox__img {
    width: 100%;
    aspect-ratio: 9/16;
    object-fit: cover;
    display: block;
}

.lightbox__player-host {
    display: none;
    position: relative;
    overflow: hidden;
    background: #000;
    aspect-ratio: var(--lightbox-ar, 9 / 16);
    width: 100%;
}

.lightbox.is-video .lightbox__img {
    display: none;
}

.lightbox.is-video .lightbox__player-host {
    display: block;
}

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

.lightbox__player-host .scena-vplayer__root {
    display: block;
    background: #000;
}

.lightbox__player-host .scena-vplayer__screen {
    position: absolute;
    inset: 0;
    display: block;
    overflow: hidden;
}

.lightbox__player-host .scena-vplayer__video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-position: center;
}

.lightbox__player-host .scena-vplayer__root.is-portrait .scena-vplayer__video {
    object-fit: cover;
}

.lightbox__player-host .scena-vplayer__root.is-landscape .scena-vplayer__video {
    object-fit: contain;
}

.lightbox__player-host .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;
}

.lightbox__player-host .scena-vplayer__overlay-play {
    z-index: 4;
}

.lightbox__body { padding: 20px; }

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
}
