
    /* Prevent the modal bonus QR from being hidden when the main banner is closed */
    html[data-tg-bonus-closed="true"] #tgBonusBanner {
        display: none !important;
    }

    .create-workspace-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
        gap: clamp(14px, 2vw, 24px);
        align-items: start;
    }
    @media (max-width: 1024px) {
        .create-workspace-grid {
            grid-template-columns: 1fr;
            gap: 16px;
        }
    }
    .create-workspace__header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 0.875rem;
    }

    .create-workspace__title-group {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .create-header-title {
        margin: 0;
        text-align: left;
    }

    .create-workspace__header-actions {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .create-guide-text--mobile {
        display: none;
    }
    .create-guide-text--desktop {
        display: inline;
    }
    @media (max-width: 640px) {
        .create-guide-text--desktop {
            display: none !important;
        }
        .create-guide-text--mobile {
            display: inline !important;
        }
    }

    .create-layout-col {
        display: flex;
        flex-direction: column;
        gap: 16px;
        min-width: 0;
    }

    .tg-bonus-alert {
        position: relative;
        overflow: visible;
        z-index: 10; /* Должен быть выше соседних секций, но ниже глобального хедера */
    }

    .tg-bonus-alert__actions {
        position: relative;
        display: inline-block;
    }

    @media (max-width: 480px) {
        .tg-bonus-alert__actions.tg-bonus-btn-wrapper {
            display: flex;
            flex-direction: column;
            width: 100%;
            gap: 8px;
        }

        .tg-bonus-alert__actions .bonus-option {
            width: 100%;
        }

        .tg-bonus-alert__actions .bonus-option .ui-btn {
            width: 100%;
            margin-left: 0 !important;
        }
    }

    .tg-bonus-alert__inner {
        display: flex;
        justify-content: space-between;
        align-items: flex-end; /* Прижимаем элементы к нижнему краю */
        gap: 16px;
        width: 100%;
        padding-right: 32px; /* Уберегает текст от наложения на кнопку закрытия */
        flex-wrap: wrap; /* Если экран узкий, кнопка перейдет вниз */
    }
    
    .tg-bonus-alert__text {
        flex: 1;
        min-width: 200px;
    }
    
    .tg-bonus-alert__text p {
        margin-bottom: 0;
    }

    .tg-bonus-btn-wrapper {
        z-index: 50;
    }

    .tg-bonus-qr-popup {
        z-index: 2147483647 !important; /* Максимально возможный z-index */
    }

    .bonus-option {
        position: relative;
        display: inline-block;
    }

    .bonus-option:hover .tg-bonus-qr-popup {
        display: block !important;
        animation: qr-pop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
    }

    @keyframes qr-pop {
        from {
            opacity: 0;
            transform: translateX(-50%) scale(0.94) translateY(4px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) scale(1) translateY(0);
        }
    }

    .create-tools-toolbar {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .sounds-params-row {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: flex-start;
    }
    .sounds-param-tempo {
        flex: 0 0 130px;
        max-width: 140px;
    }
    .sounds-param-key {
        flex: 1;
        min-width: 220px;
    }
    .sounds-key-line {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }
    .sounds-key-input {
        width: 110px !important;
        flex: 0 0 110px;
    }
    @media (max-width: 600px) {
        .sounds-param-tempo {
            flex: 1 1 100%;
            max-width: 100%;
        }
        .sounds-key-input {
            width: 100% !important;
            flex: 1 1 100%;
        }
    }

    .lyrics-hint {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        margin: 12px 0 16px;
        border-radius: var(--radius-lg);
        background: var(--surface-glass-soft);
        border: 1px solid color-mix(in oklch, var(--color-premium-gold) 35%, transparent);
        box-shadow: var(--shadow-float-sm);
        flex-wrap: wrap;
    }
    .lyrics-hint__content {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1 1 200px;
    }
    .lyrics-hint__icon {
        color: var(--color-premium-gold);
        flex-shrink: 0;
    }
    .lyrics-hint .hint-text {
        margin: 0;
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--color-text-base);
        line-height: 1.4;
    }
    .lyrics-hint__btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .audio-upload-card{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 16px;margin:0 0 14px;border-radius: var(--radius-lg);background:var(--surface-glass-base);border:1px solid var(--border-subtle)}
    .audio-upload-card__meta{display:flex;flex-direction:column;gap:4px;min-width:0}.audio-upload-card__meta strong{font-size:15px;word-break:break-word}.audio-upload-card__meta span{font-size:12px;color:var(--color-text-muted)}
    .audio-upload-card__actions{display:flex;gap:8px;flex-wrap:wrap}
.audio-remix-panel{margin: 2px 0 18px;padding:16px 16px 14px;border-radius: var(--radius-xl);background:linear-gradient(180deg,var(--surface-glass-soft),transparent);border:1px solid var(--surface-glass-base);box-shadow:var(--shadow-float-md)}
    .audio-remix-panel__top{display:grid;grid-template-columns:auto minmax(240px,1fr);align-items:start;gap:14px 16px;margin-bottom:10px}
    .audio-remix-tabs{display:flex;flex-direction:column;gap:10px;align-self:start}
    .audio-remix-tab{min-width:112px;justify-content:flex-start;background:var(--color-surface-hover);color:var(--color-text-muted);border: var(--border-base);border-radius: var(--radius-pill);padding:11px 16px;font-size:14px;font-weight:800;letter-spacing:-.01em;cursor:pointer;transition:.18s ease}
.audio-remix-tab:hover{background:var(--surface-glass-base);border-color: var(--color-text-muted);color: var(--color-text-base)}
    .audio-remix-tab:active{transform:scale(0.96)}
.audio-remix-tab.active{background: linear-gradient(180deg,var(--surface-glass-hover),var(--surface-glass-base));color: var(--color-text-base);border-color: var(--color-text-muted);box-shadow:inset 0 1px 0 var(--surface-glass-soft)}
    .audio-remix-main{display:flex;flex-direction:column;gap:8px;min-width:0}
    .audio-remix-label{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color: var(--color-text-muted)}
    .audio-remix-label::before{content:'';width:8px;height:8px;border-radius: var(--radius-pill);background:var(--color-brand-secondary);box-shadow:0 0 0 4px color-mix(in oklch, var(--color-brand-secondary) 15%, transparent)}
    .audio-remix-select-wrap{position:relative}
    .audio-remix-select-wrap::after{content:'';position:absolute;right:18px;top:50%;width:9px;height:9px;border-right:2px solid var(--color-text-muted);border-bottom:2px solid var(--color-text-muted);transform:translateY(-65%) rotate(45deg);pointer-events:none;opacity:.95}
    .audio-remix-type{appearance:none;-webkit-appearance:none;width:100%;min-height:48px;background:var(--color-input-bg);color: var(--color-text-base);border:1px solid var(--color-input-border);border-radius: var(--radius-lg);padding:11px 44px 11px 16px;font-size:14px;font-weight:700;letter-spacing:0;box-shadow:inset 0 1px 0 var(--surface-glass-base);cursor:pointer;transition:.18s ease;color-scheme:dark}
.audio-remix-type:hover{background:var(--color-input-bg);border-color:var(--color-input-border-hover)}
.audio-remix-type:focus,.audio-remix-type:focus-visible{outline:none;border-color:var(--color-input-border-focus);box-shadow:var(--focus-ring)}
    .audio-remix-type option{background:var(--color-surface-2);color: var(--color-text-base)}
    .audio-remix-hint{font-size:13px;color:var(--color-text-muted);line-height:1.5;max-width:900px}

    @media (max-width: 860px){
        .audio-remix-panel__top{grid-template-columns:1fr}
        .audio-remix-tabs{flex-direction:row;flex-wrap:wrap}
        .audio-remix-tab{min-width:0;flex:1 1 140px;justify-content:center}
        .audio-remix-type{min-height:46px;font-size:14px;padding:11px 42px 11px 16px}
    }

    html[data-create-active-tab="simple"] #simpleTab,
    html[data-create-active-tab="custom"] #customTab {
        display: block;
    }

    html[data-create-active-tab="custom"] #simpleTab,
    html[data-create-active-tab="simple"] #customTab {
        display: none;
    }

    html[data-create-active-tab="simple"] #simpleTabButton,
    html[data-create-active-tab="custom"] #customTabButton {
        background: linear-gradient(180deg, var(--color-text-base) 0%, color-mix(in oklch, var(--color-text-base) 90%, black) 100%);
        color: var(--color-bg-base);
box-shadow:  0 10px 24px var(--surface-glass-hover);
    }

    html[data-create-active-tab="custom"] #simpleTabButton,
    html[data-create-active-tab="simple"] #customTabButton {
        color: var(--color-text-muted);
    }

    html[data-create-active-tab="custom"] #simpleTabButton:hover,
    html[data-create-active-tab="simple"] #customTabButton:hover {
        color: var(--color-text-base);
    }

    .style-presets-wrap {
        margin: 12px 0 14px;
    }

    .style-presets-switch__btn.is-active {
background:  linear-gradient(180deg, var(--surface-glass-hover), var(--surface-glass-base));
border-color:  var(--color-border-strong);
        color: var(--color-text-base);
    }

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

    #stylePresetGrid.style-presets {
        display: block;
    }

    .field-header-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        margin: 0 0 6px;
        gap: 8px;
    }

    .field-header-flex label {
        margin: 0;
    }

    .field-header-flex .control-row {
        margin: 0 !important;
        min-height: auto !important;
    }

    .control-row--style-tools {
        align-items: center;
    }

    .field-with-action {
        position: relative;
    }

    .field-with-action .field-action-btn {
        position: absolute;
        top: 12px;
        right: 12px;
        /* Выше ручки изменения размера. У неё тот же z-index, но в разметке
           она идёт позже и потому перекрывала кнопку: в невысоком поле
           ручка 56x56 накрывает её целиком, и нажатие уходило в ручку. */
        z-index: 4;
    }

    #customStyle,
    .style-textarea {
        min-height: 64px !important;
        height: 64px;
        padding: 10px 44px 10px 14px;
        font-size: 0.92rem;
        line-height: 1.45;
        box-sizing: border-box;
    }

    #styleClearBtn {
        display: none;
        top: 10px;
        right: 10px;
    }

    #styleClearBtn.is-visible {
        display: inline-flex;
    }

    .field-action-btn {
        visibility: hidden;
        min-width: 36px;
    }

    .field-action-btn.is-visible {
        visibility: visible;
    }

    .field-action-btn--undo {
        width: 36px;
        min-width: 36px;
        padding: 0;
    }

    @media (max-width: 768px) {
        .create-layout-col {
            gap: 12px;
        }

        .ui-form-group {
            margin-bottom: 12px;
            gap: 4px;
        }

        .field-header-flex {
            margin: 0 0 4px;
            gap: 6px;
        }

        .char-counter {
            margin-top: 2px;
            font-size: 0.72rem;
        }

        .lyrics-hint {
            margin: 8px 0 10px;
            padding: 8px 10px;
            gap: 8px;
        }

        .style-presets-wrap {
            margin: 8px 0 10px;
        }

        /* max-height — потолок роста: дальше поле прокручивается внутри.
           min-height не даёт ему стать ниже исходного вида, поэтому пустое
           поле остаётся таким же крупным, как раньше. */
        #simplePrompt {
            /* Нижняя граница — та высота, с которой поле открывается. */
            min-height: 96px;
            height: 96px;
            max-height: 40vh;
            overflow-y: auto;
        }

        #customLyrics {
            min-height: 120px;
            height: 120px;
            max-height: 45vh;
            overflow-y: auto;
        }

        #customStyle,
        .style-textarea {
            min-height: 52px !important;
            height: 52px;
            max-height: 116px;
            overflow-y: auto;
            padding: 8px 38px 8px 12px;
            font-size: 0.88rem;
            line-height: 1.4;
        }

        #customSoundsOptions {
            grid-template-columns: 1fr !important;
        }

        #customSoundsOptions > div,
        #customSoundsOptions > label {
            grid-column: 1 / -1 !important;
        }

        .style-presets {
            flex-wrap: nowrap;
            overflow-x: auto;
            overflow-y: hidden;
            gap: 10px;
            padding: 2px 2px 6px;
            scrollbar-width: thin;
            scroll-snap-type: x proximity;
        }

        .style-presets::-webkit-scrollbar {
            height: 6px;
        }

        .style-presets::-webkit-scrollbar-thumb {
background:  var(--surface-glass-hover);
            border-radius: var(--radius-pill);
        }

        .inspiration-tags {
            display: flex;
            flex-wrap: nowrap;
            gap: 8px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 2px 2px 4px;
            scrollbar-width: thin;
        }

        .inspiration-tags::-webkit-scrollbar {
            height: 6px;
        }

        .inspiration-tags::-webkit-scrollbar-thumb {
background:  var(--surface-glass-hover);
            border-radius: var(--radius-pill);
        }

        .inspiration-tags .tag {
            flex: 0 0 auto;
            white-space: nowrap;
            padding: 10px 14px;
        }
    }

    .style-preset-btn.is-active {
        background: linear-gradient(180deg, var(--border-base), var(--border-subtle));
border-color:  var(--color-border-strong);
        box-shadow: inset 0 1px 0 var(--border-subtle);
    }

    .style-preset-btn.is-active .style-preset-btn__badge {
background:  var(--surface-glass-hover);
        color: var(--color-text-base);
    }

    .inspiration-tags .tag.is-active {
background:  linear-gradient(180deg, var(--surface-glass-hover), var(--surface-glass-base));
border-color:  var(--color-border-strong);
        color: var(--color-text-base);
box-shadow:  inset 0 1px 0 var(--surface-glass-soft), var(--shadow-float-sm);
    }

    .audio-remix-field-label {
        display: block;
        margin: 0 0 6px;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--color-text-muted);
    }

    .audio-remix-input {
        width: 100%;
        max-width: 260px;
        min-height: 42px;
        background: var(--color-surface-3);
        color: var(--color-text-base);
        border: var(--border-strong);
        border-radius: var(--radius-md);
        padding: 9px 12px;
    }

    .audio-remix-hint-text {
        margin-top: 6px;
    }

    .audio-selected-note-style {
        margin-top: 8px;
        opacity: .9;
    }

    .textarea-resize-y {
        resize: vertical;
    }

    .flex-between-center {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .voice-verify-block {
        margin: 25px 0 15px;
        padding: 16px;
        border: 1px solid var(--color-brand-secondary);
        border-radius: var(--radius-lg);
        background: color-mix(in oklch, var(--color-brand-secondary) 5%, transparent);
    }

    .voice-verify-title {
        font-weight: bold;
        color: var(--color-brand-secondary);
        margin-bottom: 8px;
    }

    .voice-verify-desc {
        font-size: 13px;
        color: var(--color-text-muted);
        line-height: 1.45;
        margin-bottom: 12px;
    }

    .voice-verify-phrase-box {
background:  var(--surface-glass-soft);
        border: var(--border-base);
        padding: 14px;
        border-radius: var(--radius-md);
        font-size: 16px;
        font-weight: bold;
        color: var(--color-text-base);
        line-height: 1.4;
        text-align: center;
        margin-bottom: 14px;
    }

    .voice-verify-visualizer {
        margin-bottom: 12px;
    }

    .voice-verify-actions {
        display: flex;
        gap: 10px;
        margin-bottom: 14px;
    }

    .voice-verify-preview {
        flex-direction: column;
        gap: 12px;
        margin-top: 10px;
    }

    .voice-verify-audio {
        width: 100%;
    }

    .voice-save-status-card {
        margin-top: 25px;
    }

    .voice-save-close-hint-text {
        margin: 10px 0 0;
        font-size: 13px;
        color: var(--color-text-muted);
        line-height: 1.5;
    }

    .sound-mini-tag.is-active {
background:  linear-gradient(180deg, var(--surface-glass-hover), var(--surface-glass-base));
border-color:  var(--color-border-strong);
        color: var(--color-text-base);
box-shadow:  inset 0 1px 0 var(--surface-glass-soft), var(--shadow-float-sm);
    }

    .tag-button-inline {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .tag-button-inline .ti {
        font-size: 1em;
        line-height: 1;
    }

    #simpleGenerateBtn i,
    #customGenerateBtn i {
        display: inline-block;
        margin-right: 8px;
        vertical-align: middle;
    }

    #simpleGenerateBtn span,
    #customGenerateBtn span {
        display: inline-block;
        vertical-align: middle;
    }


.generation-status-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; list-style: none; margin: 16px 0 12px; padding: 0; }
.generation-status-step { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--color-text-muted); font-size: 13px; font-weight: 600; line-height: 1.3; }
.generation-status-step span { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid var(--border-base); border-radius: 50%; background: var(--color-surface-1); transition: all 0.3s ease; }
.generation-status-step.is-complete { color: var(--color-success); }
.generation-status-step.is-complete span { border-color: var(--color-success); background: color-mix(in oklch, var(--color-success) 15%, transparent); }
.generation-status-step.is-complete span::after { content: '✓'; font-size: 12px; color: var(--color-success); font-weight: 900; }
.generation-status-step.is-current { color: var(--color-text-base); font-weight: 800; }
.generation-status-step.is-current span { border-color: var(--color-premium-gold); background: color-mix(in oklch, var(--color-premium-gold) 15%, transparent); box-shadow: 0 0 10px color-mix(in oklch, var(--color-premium-gold) 30%, transparent); }
.generation-status-step.is-current span::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--color-premium-gold); box-shadow: 0 0 6px var(--color-premium-gold); }
#generationStatusCard[data-state="completed"] #generationStatusHint,
#generationStatusCard[data-state="failed"] #generationStatusHint,
#generationStatusCard[data-state="completed"] #generationSafeLeave,
#generationStatusCard[data-state="failed"] #generationSafeLeave { display: none !important; }
@media(max-width:620px){.generation-status-steps{grid-template-columns:1fr;gap:10px}.generation-status-step{font-size:12px}}@media(prefers-reduced-motion:reduce){.generation-status-step.is-current span{box-shadow:none}}
.voice-panel__add{background:var(--color-text-base);color:var(--color-bg-base);border:none;border-radius: var(--radius-pill);padding:10px 16px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:8px}
.voice-panel__add:disabled{opacity:.5;cursor:not-allowed}
.voice-beta-badge{display:inline-flex;align-items:center;justify-content:center;padding:2px 8px;border-radius: var(--radius-pill);background:var(--color-brand-secondary);color:var(--color-text-base);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.voice-beta-badge--modal{margin-left:8px;vertical-align:middle}
#voiceSaveConfirmModal{z-index:10020}
#voiceSaveConfirmModal .modal-content{position:relative;z-index:10021}
.voice-selected--empty{opacity:.85}
.advanced-details{margin-top:16px;border:var(--border-subtle);border-radius: var(--radius-xl);background:var(--surface-glass-soft);overflow:hidden;transition:border-color .22s ease,background .22s ease,box-shadow .22s ease;box-shadow:var(--shadow-float-sm)}
.advanced-details[open]{border-color:color-mix(in oklch, var(--color-premium-gold) 30%, transparent);background:var(--surface-glass-base);box-shadow:var(--shadow-float-md), var(--shadow-glow-gold)}
.advanced-details summary{display:flex;align-items:center;gap:12px;list-style:none;padding:16px 18px;cursor:pointer;user-select:none;font-weight:800;color:var(--color-text-base);transition:background .2s ease,color .2s ease}
.advanced-details summary:hover{background:var(--surface-glass-hover)}
.advanced-details[open] summary, .advanced-details[open] .advanced-summary{color:var(--color-premium-gold); border-bottom: 1px solid color-mix(in oklch, var(--color-premium-gold) 20%, transparent);}
.advanced-details summary::-webkit-details-marker{display:none}
.advanced-details[open] .advanced-summary-icon{background:var(--color-premium-gold); color:var(--color-bg-base); box-shadow:var(--shadow-glow-gold)}
.advanced-details.is-open .advanced-summary-icon svg{transform:rotate(90deg)}
.advanced-details[open] .advanced-details__content{opacity:1;transform:translateY(0)}
.advanced-details__body{padding:4px 18px 18px}
.modal-content--voice{max-width:860px;width:min(860px,calc(100vw - 32px));max-height:min(90vh,960px);display:flex;flex-direction:column;overflow:hidden}
.voice-modal-body{overflow-y:auto;max-height:calc(90vh - 88px);padding:20px}
.voice-modal-body::-webkit-scrollbar {width:6px}
.voice-modal-body::-webkit-scrollbar-track {background:transparent}
.voice-modal-body::-webkit-scrollbar-thumb {background:var(--surface-glass-hover);border-radius:var(--radius-pill)}
.voice-modal-body::-webkit-scrollbar-thumb:hover {background:var(--surface-glass-hover)}
.voice-source-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:14px 0}
.voice-source-card,.voice-item{background:var(--color-surface-2);color: var(--color-text-base);border:1px solid var(--border-subtle);border-radius: var(--radius-lg);padding:14px;text-align:left}
.voice-source-card{cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;text-align:center;font-weight:700}
.voice-source-card__icon{display:inline-flex;width:24px;justify-content:center;opacity:.85}
.voice-source-card__icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.voice-source-card:hover,.voice-item:hover{border-color: var(--color-text-muted)}
.voice-step__lead{color:var(--color-text-muted);line-height:1.5;margin-bottom:12px}
.voice-back{background:var(--surface-glass-base);border:1px solid var(--border-subtle);color: var(--color-text-base);cursor:pointer;margin-bottom:12px;padding:10px 14px;border-radius: var(--radius-md);display:inline-flex;align-items:center;gap:10px;font-weight:800;line-height:1}
.voice-back::before{content:'';width:18px;height:18px;display:block;background:currentColor;mask:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 6l-6 6 6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.5 12H21' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 6l-6 6 6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.5 12H21' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}
.voice-back:hover{background:var(--surface-glass-soft);border-color: var(--color-text-muted)}
.voice-recorder-actions,.voice-library-use{margin:12px 0}#voiceLibraryBlock{flex-direction:column;align-items:center;gap:12px}#voiceLibrarySongSelect{width:100%}.voice-library-use{display:inline-flex;align-items:center;justify-content:center;margin:12px auto 0;min-width:260px;max-width:100%;text-align:center}
.voice-library-block--compact .voice-step__lead,.voice-library-block--compact select,.voice-library-block--compact .voice-library-use{display:none}
.voice-record-toggle{width:100%;min-height:54px;font-size:18px;font-weight:700;border-radius:var(--radius-md)}
.voice-status-text{font-size:13px;color:var(--color-text-muted);margin-top:10px}
.voice-status-text--error{display:block;color:color-mix(in oklch, var(--color-danger) 85%, white);font-size:15px;font-weight:700;line-height:1.45;padding:10px 12px;border:1px solid color-mix(in oklch, var(--color-danger) 35%, transparent);border-radius: var(--radius-md);background:color-mix(in oklch, var(--color-danger) 8%, transparent)}
.voice-reactive-canvas{width: 100%;height:72px;display:block;margin-top:10px;border-radius: var(--radius-md);background:var(--surface-glass-soft)}
.voice-sample-preview{margin-top:16px;padding:14px;border:1px solid var(--border-subtle);border-radius: var(--radius-lg);display:flex;flex-direction:column;gap:14px}
.voice-sample-preview audio{display:block;width:100%;margin:0}
.voice-sample-preview .voice-status-text{margin-top:0;line-height:1.45;overflow-wrap:anywhere;word-break:break-word;text-align:left}
.voice-use-sample-btn{align-self:center;min-width:220px;max-width:100%;margin-top:0;display:inline-flex;align-items:center;justify-content:center;text-align:center}
.voice-dropzone{display: flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:120px;border:1px dashed var(--surface-glass-hover);border-radius: var(--radius-lg);background:var(--surface-glass-soft);cursor:pointer;padding:18px;text-align:center}
.voice-dropzone input{display:none}
.voice-dropzone--drag{border-color:var(--color-brand-secondary);background:color-mix(in oklch, var(--color-brand-secondary) 8%, transparent)}
.voice-save-btn{margin-top:12px;width:100%}
.voice-step__section-title{font-size:14px;font-weight:700;margin:18px 0 8px}
.voice-storage-note{font-size:12px;color:var(--color-text-muted);margin-bottom:10px}
.voice-profiles-list{display:grid;gap:12px;max-height:280px;overflow-y:auto;padding-right:6px}
.voice-profiles-list::-webkit-scrollbar {width:6px}
.voice-profiles-list::-webkit-scrollbar-track {background:transparent}
.voice-profiles-list::-webkit-scrollbar-thumb {background:var(--surface-glass-hover);border-radius:var(--radius-pill)}
.voice-profiles-list::-webkit-scrollbar-thumb:hover {background:var(--surface-glass-hover)}
.voice-item{padding:0}
.voice-item__layout{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;align-items:center;padding:18px 20px}
.voice-item--active{border-color: var(--color-text-base);background:var(--border-subtle)}
.voice-item__main{min-width:0}
.voice-item__main strong{font-size:16px;display:block;line-height:1.2;word-break:break-word}
.voice-item__meta{font-size:13px;color:var(--color-text-muted);margin-top:6px;line-height:1.4}
.voice-item__badge{display: inline-flex;align-items:center;justify-content:center;font-size:14px;color: var(--color-text-base);opacity:1;background:var(--surface-glass-soft);border:1px solid var(--border-base);padding:10px 14px;border-radius: var(--radius-md);white-space:nowrap;font-weight:700;min-width:120px;cursor:pointer;transition:.18s ease}
.voice-item__badge:hover{background:var(--surface-glass-hover);border-color: var(--color-text-muted)}
.voice-item__actions{display:flex;flex-direction:column;gap:8px;padding-right:2px}
.voice-mini-btn{background: transparent;border:1px solid var(--surface-glass-hover);color: var(--color-text-base);border-radius: var(--radius-md);padding:10px 14px;font-size:13px;cursor:pointer;font-weight:700;min-width:150px}
.voice-mini-btn--danger{border-color:color-mix(in oklch, var(--color-danger) 35%, transparent);color:color-mix(in oklch, var(--color-danger) 85%, white)}
.voice-empty{padding: 12px;color:var(--color-text-muted);border:1px dashed var(--surface-glass-hover);border-radius:var(--radius-md)}
.voice-visualizer{display: flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border-subtle);border-radius: var(--radius-lg);background:var(--surface-glass-soft);margin-bottom:12px}
.voice-visualizer__dot{width:12px;height:12px;border-radius: var(--radius-pill);background:var(--color-danger);box-shadow:0 0 0 color-mix(in oklch, var(--color-danger) 50%, transparent);animation:voicePulse 1.2s infinite}
.voice-visualizer__time{font-weight:700;min-width:46px}
@keyframes voiceBar{0%,100%{height:8px;opacity:.6}50%{height:28px;opacity:1}}
@keyframes voicePulse{0%{box-shadow:0 0 0 0 color-mix(in oklch, var(--color-danger) 55%, transparent)}70%{box-shadow:0 0 0 12px color-mix(in oklch, var(--color-danger) 0%, transparent)}100%{box-shadow:0 0 0 0 color-mix(in oklch, var(--color-danger) 0%, transparent)}}
@media (max-width:768px){.voice-source-grid{grid-template-columns:1fr}.voice-item__layout{grid-template-columns:1fr;padding:18px}.voice-item__actions{padding:0}.voice-mini-btn{min-width:0;width:100%}.voice-item__badge{min-width:0;width:100%}}

/* Create View Specific Utils */
.u-mb-8 { margin-bottom: 8px !important; }
.u-mt-4 { margin-top: 4px !important; }
.u-mt-8 { margin-top: 8px !important; }
.u-gap-10 { gap: 10px !important; }
.u-gap-12 { gap: 12px !important; }
.u-gap-16 { gap: 16px !important; }
.flex-wrap { flex-wrap: wrap !important; }
.u-w-full { width: 100% !important; }
.u-cursor-pointer { cursor: pointer !important; }

/* Custom TTS layout */

/* Custom Sounds layout */

/* Audio Remix specific layout */
.audio-remix-main-flex { display: flex; flex-direction: column; gap: 10px; }

/* Simon Says Mini-Game Styles */
.simon-game-panel {
    margin: 16px 0 24px;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--color-surface-1);
    border: 1px solid var(--border-base);
    box-shadow: var(--shadow-float-md);
    display: none;
    text-align: center;
}
.simon-game-panel__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-base);
    margin-bottom: 12px;
}
.simon-game-panel__btn-open {
    display: none;
}
.simon-game-panel--collapsed { 
    display:flex !important; 
    align-items:center; 
    justify-content:center; 
    padding: 0 !important; 
    background: transparent !important; 
    border: none !important; 
    box-shadow: none !important; 
    margin-bottom: 8px;
}
.simon-game-panel--collapsed .simon-game-panel__title { display:none !important; }
.simon-game-panel--collapsed .simon-game-panel__intro,
.simon-game-panel--collapsed .simon-game-panel__btn-start,
.simon-game-panel--collapsed .simon-game-board,
.simon-game-panel--collapsed .simon-game-status-text,
.simon-game-panel--collapsed .simon-game-score-board,
.simon-game-panel--collapsed .simon-game-final-msg { display:none !important; }
.simon-game-panel__intro {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}
.simon-game-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 220px;
    margin: 16px auto;
}
.simon-pad {
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    cursor: pointer;
    position: relative;
border: var(--border-subtle);
    transition: transform 0.1s ease, filter 0.15s ease, box-shadow 0.15s ease;
    filter: brightness(0.6);
}
.simon-pad:active {
    transform: scale(0.95);
}
.simon-pad.active {
    filter: brightness(1.5) contrast(1.2);
}
.simon-pad--green {
    background: var(--color-success);
}
.simon-pad--green.active {
    box-shadow: 0 0 20px var(--color-success);
}
.simon-pad--red {
    background: var(--color-danger);
}
.simon-pad--red.active {
    box-shadow: 0 0 20px var(--color-danger);
}
.simon-pad--yellow {
    background: var(--color-brand-yellow);
}
.simon-pad--yellow.active {
    box-shadow: 0 0 20px var(--color-brand-yellow);
}
.simon-pad--blue {
    background: var(--color-brand-primary);
}
.simon-pad--blue.active {
    box-shadow: 0 0 20px var(--color-brand-primary);
}
.simon-game-status-text {
    font-size: 13px;
    color: var(--color-brand-yellow);
    margin-top: 10px;
    min-height: 20px;
    font-weight: 600;
}
.simon-game-score-board {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 12px;
    color: var(--color-text-subtle);
    margin-top: 8px;
    font-weight: 700;
}
.simon-game-score-board span {
    color: var(--color-text-base);
}
.simon-game-final-msg {
    margin-top: 14px;
    padding-top: 12px;
border-top:  1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--color-success);
    font-weight: 700;
    line-height: 1.4;
}
.simon-game-final-msg--error {
    color: var(--color-danger);
}


/* Prevent FOUC for Tabs */
html[data-create-active-tab="custom"] #simpleTab { display: none !important; }
html[data-create-active-tab="custom"] #customTab { display: block !important; }
html[data-create-active-tab="simple"] #customTab { display: none !important; }
html[data-create-active-tab="simple"] #simpleTab { display: block !important; }

/* Payment Option Card Active State */
.payment-option.selected {
    border-color: var(--color-premium-gold) !important;
    background: var(--color-surface-2) !important;
    box-shadow: var(--shadow-float-sm) !important;
    transform: scale(0.98);
}

/* Voice Consent Error Shake */
.oauth-consent-group {
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}
.oauth-consent-label {
    user-select: none;
    line-height: 1.45;
}
.checkbox-group--error {
    padding: 8px 10px !important;
    border: 1px solid color-mix(in oklch, var(--color-danger) 60%, transparent) !important;
    border-radius: var(--radius-lg) !important;
    background: color-mix(in oklch, var(--color-danger) 14%, transparent) !important;
    box-shadow: 0 0 0 2px color-mix(in oklch, var(--color-danger) 30%, transparent) !important;
    animation: uiErrorShake 0.4s ease-in-out !important;
}
.checkbox-group--error .oauth-consent-label {
    color: color-mix(in oklch, var(--color-danger) 95%, white) !important;
}
.checkbox-group--error .ui-checkbox__box {
    border-color: var(--color-danger) !important;
    background: color-mix(in oklch, var(--color-danger) 25%, var(--color-surface-2)) !important;
    box-shadow: 0 0 14px color-mix(in oklch, var(--color-danger) 60%, transparent) !important;
}
@keyframes uiErrorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Custom UI Kit extensions for Modal Payment Cards */
.modal-pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
}

.modal-pricing-card {
    padding: 12px;
    cursor: pointer;
    text-align: left;
}

.modal-pricing-card .ui-pricing-card__header {
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.modal-pricing-card .ui-pricing-card__title {
    font-size: 1rem;
}

.modal-pricing-card .ui-pricing-card__sub {
    font-size: 0.75rem;
    margin: 0;
}

.modal-pricing-card .ui-pricing-card__price-box {
    margin-bottom: 0;
}

.modal-pricing-card .ui-pricing-card__amount {
    font-size: 1.1rem;
}

.modal-pricing-card .ui-badge {
    right: 8px;
    top: -10px;
    font-size: 10px;
}

.create-file-card {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.create-upsell {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.create-upsell__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    border: var(--border-subtle);
    background: var(--surface-glass-soft);
}

.create-upsell__header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    min-width: 0;
}

.create-upsell__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font-size: 18px;
}

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

.create-upsell__copy strong {
    font-size: var(--text-sm);
    color: var(--color-text-strong);
}

.create-upsell__copy span {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.create-upsell__actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.create-upsell__video-buttons {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 8px);
    flex-wrap: wrap;
}

.create-upsell__example {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-decoration: underline;
    white-space: nowrap;
    cursor: pointer;
}

@media (max-width: 480px) {
    .create-upsell__item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-3);
    }

    .create-upsell__actions {
        justify-content: space-between;
    }
}

@media (min-width: 769px) {
    .video-example-modal .ui-modal__dialog {
        width: fit-content;
        max-width: min(90vw, 900px);
    }
}

.video-example-modal__body {
    padding: var(--space-4);
    display: flex;
    justify-content: center;
}

.video-example-modal__video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-md);
    background: var(--color-bg-base);
}

/* Теги жанров под полем стиля. Не строка с прокруткой, а перенос по словам:
   при прокрутке часть тегов остаётся за краем, и человек про них не узнает,
   а так все восемнадцать видны сразу и занимают две строки. */
.style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-tag {
    appearance: none;
    -webkit-appearance: none;
    padding: 7px 13px;
    border: 1px solid var(--border-base);
    border-radius: var(--radius-pill);
    background: var(--surface-glass-base);
    color: var(--color-text-subtle);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.style-tag:hover {
    border-color: color-mix(in oklch, var(--color-premium-gold) 45%, transparent);
    color: var(--color-text-base);
}

/* Выбранный тег виден не только цветом: у него ещё и заметно плотнее рамка. */
.style-tag--active {
    border-color: var(--color-premium-gold);
    border-width: 2px;
    padding: 6px 12px;
    background: color-mix(in oklch, var(--color-premium-gold) 14%, transparent);
    color: var(--color-text-base);
}
