/**
 * Студия + кабинет.
 * Базовые тёмные правила ниже переопределяются .studio-gen-skin (белый сайт).
 */

html:has(body.studio-body),
body.studio-body {
    color-scheme: dark;
    background-color: #0b1020 !important;
    background-image: url("/assets/bg.jpg") !important;
    background-size: cover !important;
    background-repeat: repeat !important;
    color: #dbe8ff !important;
}

body.studio-body .site-main,
body.studio-body .container--gallery,
body.studio-body .gallery-layout,
body.studio-body .gallery-main,
body.studio-body .studio-account {
    background: transparent !important;
}

body.studio-body .studio-history-empty {
    grid-column: 1 / -1;
}

/* Логотип: PNG с чёрным фоном — убираем видимую «рамку» */
body.studio-body .site-brand,
body.studio-body .site-brand-logo {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

body.studio-body .site-brand-logo {
    mix-blend-mode: lighten;
}

/* —— Кабинет: белая тема сайта —— */
body.studio-body.cab-skin,
body.studio-body.studio-gen-skin:has(.cab-page),
body.studio-body:has(.cab-page) {
    --cab-accent: var(--home-accent, #0179cd);
    --cab-accent-soft: var(--home-accent-soft, #e6f3fb);
    --cab-glass: #ffffff;
    --cab-glass-soft: var(--home-surface-soft, #f8fafc);
    --cab-line: var(--home-line, #e4e8ee);
    --cab-line-hot: var(--home-accent, #0179cd);
    --cab-text: var(--home-ink, #12151c);
    --cab-muted: var(--home-muted, #5b6472);
    --cab-active: var(--home-accent-soft, #e6f3fb);
    --cab-primary: var(--home-accent, #0179cd);
}

body.studio-body.studio-gen-skin .cab-page {
    position: relative;
    z-index: 1;
}

body.studio-body.studio-gen-skin .cab-page > .container--gallery {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 24px 16px 48px !important;
    box-sizing: border-box;
}

body.studio-body.studio-gen-skin .cab-layout.gallery-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    min-height: 0 !important;
}

body.studio-body .cab-layout {
    gap: 20px;
}

body.studio-body.studio-gen-skin .cab-sidebar.gallery-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    height: auto !important;
    max-height: none;
    overflow: visible;
    padding: 0 !important;
    z-index: 1;
    background: #fff !important;
    border: 1px solid var(--cab-line) !important;
    border-radius: 7px !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.studio-body .cab-sidebar {
    background: #fff !important;
    border: 1px solid var(--cab-line);
    border-radius: 7px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.studio-body.studio-gen-skin .cab-sidebar__inner.gallery-sidebar-nav {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 20px 16px 22px !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.studio-body .cab-sidebar__inner {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    padding: 20px 16px 22px !important;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.studio-body .cab-sidebar__profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    text-align: center;
}

body.studio-body .cab-sidebar__avatar {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--cab-line);
    box-shadow: none;
    background: var(--cab-accent-soft);
}

body.studio-body .cab-sidebar__avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    background: var(--cab-primary);
    border-color: var(--cab-accent);
}

body.studio-body .cab-sidebar__meta {
    min-width: 0;
    width: 100%;
}

body.studio-body .cab-sidebar__name {
    margin: 0;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--cab-text);
    word-break: break-word;
}

body.studio-body .cab-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.studio-body .cab-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--cab-text);
    background: #fff;
    border: 1px solid var(--cab-line);
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body.studio-body .cab-nav__link svg {
    flex: 0 0 auto;
    color: var(--cab-accent);
    opacity: 0.95;
}

body.studio-body .cab-nav__link:hover {
    border-color: var(--cab-accent);
    background: var(--cab-accent-soft);
    color: var(--cab-accent);
}

body.studio-body .cab-nav__link.is-active {
    color: var(--cab-accent);
    border-color: var(--cab-accent);
    background: var(--cab-active);
    box-shadow: none;
}

body.studio-body .cab-nav__link--studio {
    margin-top: 8px;
    border: 0;
    background: var(--cab-primary);
    color: #fff;
    box-shadow: none;
}

/**
 * Пункт «Бонусная программа» у неподтверждённого пользователя:
 * сама программа закрыта, но заявку на подтверждение подать надо,
 * поэтому пункт остаётся кликабельным и ведёт на форму заявки.
 */
body.studio-body .cab-nav__link--locked {
    color: var(--cab-muted, #5b6472);
    border-style: dashed;
}

body.studio-body .cab-nav__link--locked svg {
    color: var(--cab-muted, #5b6472);
    opacity: 0.75;
}

body.studio-body .cab-nav__link--locked:hover {
    color: var(--cab-accent);
    border-color: var(--cab-accent);
    background: var(--cab-accent-soft);
}

body.studio-body .cab-nav__link--locked.is-active {
    color: var(--cab-accent);
    border-color: var(--cab-accent);
    border-style: solid;
    background: var(--cab-active);
}

body.studio-body .cab-nav__link--studio svg {
    color: #fff;
}

body.studio-body .cab-nav__link--studio:hover {
    filter: none;
    background: #015fa3;
    border: 0;
    color: #fff;
}

body.studio-body.studio-gen-skin .cab-main.gallery-main {
    padding: 22px 20px 24px !important;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--home-line, #e4e8ee);
    border-radius: var(--radius-lg, 7px);
    box-shadow: none;
    box-sizing: border-box;
    overflow: hidden;
}

body.studio-body .cab-head {
    margin: 0 0 18px;
}

body.studio-body .cab-head__title {
    margin: 0 0 8px;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    color: var(--cab-text);
    line-height: 1.15;
}

body.studio-body .cab-head__lead {
    margin: 0;
    color: var(--cab-muted);
    font-size: 14px;
    line-height: 1.5;
}

body.studio-body .cab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 5px;
    border: 1px solid transparent;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.studio-body .cab-btn--primary {
    background: var(--cab-primary);
    color: #fff;
    border: 0;
    box-shadow: none;
}

body.studio-body .cab-btn--primary:hover {
    filter: none;
    background: #015fa3;
    color: #fff;
}

body.studio-body .cab-btn--ghost {
    background: #fff;
    color: var(--cab-text);
    border-color: var(--cab-line);
}

body.studio-body .cab-btn--ghost:hover {
    background: var(--cab-accent-soft);
    border-color: var(--cab-accent);
    color: var(--cab-accent);
}

body.studio-body .cab-btn--block {
    width: 100%;
}

body.studio-body .cab-balance-card {
    padding: 22px 20px;
    border-radius: 7px;
    border: 1px solid var(--cab-line);
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

body.studio-body .cab-balance-card--empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

body.studio-body .cab-balance-card__label {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--cab-accent);
    font-weight: 700;
}

body.studio-body .cab-balance-card__value {
    margin: 0 0 18px;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    line-height: 1;
    color: var(--cab-text);
}

body.studio-body .cab-balance-card__value span {
    font-size: 0.38em;
    color: var(--cab-muted);
    margin-left: 0.2em;
}

body.studio-body .cab-balance-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.studio-body .cab-tariffs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

body.studio-body .cab-tariff {
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 16px 16px;
    border-radius: 7px;
    border: 1px solid var(--cab-line);
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    text-align: center;
}

body.studio-body .cab-tariff__neural {
    display: none;
}

body.studio-body .cab-tariff__icon {
    display: block;
    width: 72px;
    height: auto;
    margin: 0 auto 4px;
    object-fit: contain;
}

body.studio-body .cab-tariff__title {
    margin: 0;
    padding-right: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cab-text);
    text-align: center;
}

body.studio-body .cab-tariff__desc {
    margin: 0;
    color: var(--cab-muted);
    font-size: 13px;
    line-height: 1.4;
    min-height: 1.4em;
    text-align: center;
}

body.studio-body .cab-tariff__price {
    margin: 6px 0 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--cab-accent);
    letter-spacing: -0.02em;
    text-align: center;
}

body.studio-body .cab-tariff__credits {
    margin: 0;
    color: var(--cab-muted);
    font-size: 14px;
    text-align: center;
}

body.studio-body .cab-tariff__form {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}

body.studio-body .cab-tariff__form .cab-check {
    align-self: stretch;
    text-align: left;
}

body.studio-body .cab-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--cab-muted);
    cursor: pointer;
    text-align: left;
}

body.studio-body .cab-check input {
    margin-top: 2px;
    accent-color: var(--cab-accent);
}

body.studio-body .cab-check a {
    color: var(--cab-accent);
}

body.studio-body .cab-check__tip {
    position: relative;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    cursor: help;
}

body.studio-body .cab-check__tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 40;
    width: min(260px, 70vw);
    padding: 10px 12px;
    border: 1px solid var(--cab-line, #e4e8ee);
    border-radius: 5px;
    background: #fff;
    color: var(--cab-text, #12151c);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

body.studio-body .cab-check__tip:hover::after,
body.studio-body .cab-check__tip:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

body.studio-body .cab-section-title {
    margin: 28px 0 12px;
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--cab-text);
}

body.studio-body .cab-table-wrap {
    overflow-x: auto;
    border-radius: 7px;
    border: 1px solid var(--cab-line);
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.studio-body .cab-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--cab-text);
    font-size: 14px;
}

body.studio-body .cab-table th,
body.studio-body .cab-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--cab-line);
    vertical-align: middle;
}

body.studio-body .cab-table th {
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cab-muted);
    font-weight: 700;
    background: #f8fafc;
}

body.studio-body .cab-table tr:last-child td {
    border-bottom: 0;
}

body.studio-body .cab-table tbody tr:hover {
    background: var(--cab-accent-soft);
}

body.studio-body .cab-table__muted {
    color: var(--cab-muted);
    white-space: nowrap;
}

body.studio-body .cab-table .is-plus { color: #0f7a4a; font-weight: 700; }
body.studio-body .cab-table .is-minus { color: #b42318; font-weight: 700; }

/* Постраничная навигация по истории операций. */
body.studio-body .cab-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

body.studio-body .cab-pager__count {
    margin: 0;
    color: var(--cab-muted);
    font-size: 13px;
}

body.studio-body .cab-pager__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.studio-body .cab-pager__btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--cab-line);
    border-radius: 999px;
    background: #fff;
    color: var(--cab-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

body.studio-body .cab-pager__btn:hover {
    border-color: var(--cab-accent);
    color: var(--cab-accent);
    background: var(--cab-accent-soft);
}

body.studio-body .cab-pager__btn.is-disabled {
    color: var(--cab-muted);
    opacity: 0.55;
    cursor: default;
}

body.studio-body .cab-pager__page {
    color: var(--cab-muted);
    font-size: 13px;
    white-space: nowrap;
}

body.studio-body .cab-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}

body.studio-body .cab-status--ok {
    background: #ecfdf3;
    color: #067647;
}

body.studio-body .cab-status--wait {
    background: #fffaeb;
    color: #b54708;
}

body.studio-body .cab-status--muted {
    background: #f3f4f6;
    color: #4b5563;
}

body.studio-body .cab-empty {
    margin: 0;
    color: var(--cab-muted);
    font-size: 14px;
}

body.studio-body.studio-gen-skin .studio-flash {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 5px;
    border: 1px solid var(--cab-line);
    background: #fff !important;
    color: var(--cab-text) !important;
    font-size: 14px;
}

body.studio-body.studio-gen-skin .studio-flash--success {
    border-color: #abefc6 !important;
    background: #ecfdf3 !important;
    color: #067647 !important;
}

body.studio-body.studio-gen-skin .studio-flash--error {
    border-color: #fecdca !important;
    background: #fef3f2 !important;
    color: #b42318 !important;
}

body.studio-body.studio-gen-skin .studio-flash--warn {
    border-color: #fedf89 !important;
    background: #fffaeb !important;
    color: #b54708 !important;
}

body.studio-body.studio-gen-skin .site-bottombar-legal a {
    color: #374151 !important;
    text-decoration: none !important;
    font-size: 13px;
}

body.studio-body.studio-gen-skin .site-bottombar-legal a:hover {
    color: var(--home-accent, #0179cd) !important;
    text-decoration: none !important;
}

body.studio-body.studio-gen-skin .site-topnav-link.is-active::after {
    background: var(--home-accent, #0179cd) !important;
    bottom: 2px;
    border-radius: var(--radius-sm, 3px);
}

body.studio-body.studio-gen-skin .studio-history-empty {
    color: var(--home-muted, #5b6472) !important;
}

@media (max-width: 960px) {
    body.studio-body.studio-gen-skin .cab-layout.gallery-layout {
        grid-template-columns: 1fr;
        min-height: 0 !important;
    }

    body.studio-body.studio-gen-skin .cab-sidebar.gallery-sidebar {
        position: static;
        height: auto !important;
    }

    body.studio-body.studio-gen-skin .cab-main.gallery-main {
        padding: 18px 16px 20px !important;
    }

    body.studio-body .cab-sidebar__profile {
        margin-bottom: 16px;
    }

    body.studio-body .cab-nav {
        margin-top: 8px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    body.studio-body .cab-nav__link {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
    }

    body.studio-body .cab-nav__link--studio {
        margin-top: 0;
        flex-basis: 100%;
    }

    body.studio-body .cab-tariffs {
        grid-template-columns: 1fr;
    }

    /* Мобильное меню студии: подменю раскрывается по клику и встаёт
       в поток, чтобы не перекрывать соседние пункты меню. */
    body.studio-body.studio-gen-skin .site-nav-drop {
        position: static;
    }

    body.studio-body.studio-gen-skin .site-nav-drop::after {
        display: none;
    }

    body.studio-body.studio-gen-skin .site-nav-drop__menu {
        position: static;
        transform: none;
        left: auto;
        min-width: 0;
        max-height: none;
        overflow: visible;
        padding: 0 0 6px 12px;
        margin: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.studio-body.studio-gen-skin .site-nav-drop__item {
        padding: 9px 8px;
        border-bottom: 1px solid #f3f4f6;
        white-space: normal;
    }

    body.studio-body.studio-gen-skin .site-topbar.is-nav-open .site-nav-drop__menu {
        display: none;
    }

    body.studio-body.studio-gen-skin .site-topbar.is-nav-open .site-nav-drop.is-open .site-nav-drop__menu {
        display: block;
    }
}

/* —— White generation UI —— */
body.studio-body.studio-gen-skin,
body.studio-body.studio-gen-skin .site-main {
	background: transparent !important;
	background-image: none !important;
	color: #12151c !important;
	color-scheme: light;
}

body.studio-body .cab-btn,
body.studio-body .studio-btn,
body.studio-body .studio-btn--generate,
body.studio-body .studio-btn--ghost,
body.studio-body a.studio-btn--generate,
body.studio-body button[type="submit"],
body.studio-body button[type="button"],
body.studio-body .studio-res-btn,
body.studio-body .studio-aspect__btn,
body.studio-body .studio-model-card,
body.studio-body .studio-model-card__name,
body.studio-body .studio-model-card__cost {
    font-family: "Roboto Condensed", Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
}

/* Override dark studio chrome from style.css / studio.css base */
html:has(body.studio-body.studio-gen-skin),
body.gallery-body.studio-body.studio-gen-skin,
body.studio-body.studio-gen-skin {
	color-scheme: light !important;
	background-color: #ffffff !important;
	background-image: none !important;
	color: #12151c !important;
}

body.studio-body.studio-gen-skin .site-brand-logo {
	filter: none !important;
	mix-blend-mode: normal !important;
}

body.studio-body.studio-gen-skin .studio-gen__wrap {
	width: 100%;
	max-width: 1200px !important;
	margin-left: auto;
	margin-right: auto;
	padding: 24px 16px 48px;
	box-sizing: border-box;
}

body.studio-body.studio-gen-skin .studio-page-hero {
	margin: 0 0 20px;
	text-align: center;
}

body.studio-body.studio-gen-skin .studio-page-hero__title {
	margin: 0 0 8px;
	color: #0f172a;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: clamp(1.55rem, 2.4vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
}

body.studio-body.studio-gen-skin .studio-page-hero__lead {
	margin: 0 auto;
	max-width: 36rem;
	color: #475569;
	font-size: 1rem;
	line-height: 1.5;
}

body.studio-body.studio-gen-skin .studio-page-hero__howto {
	margin: 12px 0 0;
}

body.studio-body.studio-gen-skin .container--gallery.site-main {
	width: 100%;
	max-width: 1200px !important;
	margin-left: auto;
	margin-right: auto;
}

.studio-gen-title {
	margin: 0 0 6px;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: clamp(1.8rem, 3vw, 2.4rem);
	font-weight: 800;
	color: var(--home-ink, #12151c);
	text-align: center;
}

.studio-gen-lead {
	margin: 0 0 18px;
	color: var(--home-muted, #5b6472);
	text-align: center;
}

.studio-gen-gift {
	margin: -8px auto 18px;
	max-width: 36rem;
	padding: 10px 14px;
	border: 1px solid #cfe8ff;
	border-radius: 8px;
	background: #f0f8ff;
	color: #0b5f9a;
	font-size: 0.95rem;
	font-weight: 600;
	text-align: center;
	line-height: 1.35;
}

.studio-model-rail {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 22px;
}

.studio-model-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	width: 150px;
	max-width: 150px;
	min-width: 0;
	padding: 10px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: var(--radius-lg, 7px);
	background: #fff;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-model-card.is-active {
	border-color: var(--home-accent, #0179cd);
	box-shadow: 0 0 0 1px var(--home-accent, #0179cd);
}

.studio-model-card__logo {
	width: 100%;
	height: 100%;
	border-radius: 6px;
	object-fit: contain;
}

.studio-model-card__name {
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.25;
	color: var(--home-ink, #12151c);
	word-break: break-word;
}

.studio-model-card__cost {
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.25;
	color: var(--home-muted, #5b6472);
}

.studio-gen-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.75fr);
	gap: 16px;
	align-items: start;
}

.studio-gen-label,
.studio-side-title {
	display: block;
	margin: 0 0 8px;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--home-ink, #12151c);
}

.studio-prompt-box {
	width: 100%;
	min-height: 280px;
	padding: 16px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: var(--radius-lg, 7px);
	background: #fff;
	color: var(--home-ink, #12151c);
	font-family: var(--font-accent);
	font-size: 1rem;
	line-height: 1.5;
	resize: vertical;
	box-sizing: border-box;
}

.studio-prompt-box:focus {
	outline: 2px solid rgba(1, 121, 205, 0.35);
	border-color: var(--home-accent, #0179cd);
}

.studio-gen-hint {
	margin: 8px 0 10px;
	font-size: 0.86rem;
	color: var(--home-muted, #5b6472);
}

.studio-gen-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.studio-side-block {
	padding: 14px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: var(--radius-lg, 7px);
	background: #fff;
}

.studio-res-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.studio-res-btn {
	min-height: 36px;
	padding: 6px 12px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: var(--radius, 5px);
	background: #fff;
	color: var(--home-ink, #12151c);
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 600;
	cursor: pointer;
}

.studio-res-btn.is-active {
	background: var(--home-accent, #0179cd);
	border-color: var(--home-accent, #0179cd);
	color: #fff;
}

body.studio-body.studio-gen-skin .studio-aspect {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
	gap: 8px !important;
}

body.studio-body.studio-gen-skin .studio-aspect__btn {
	display: grid !important;
	place-items: center;
	gap: 4px;
	min-width: 0;
	min-height: 52px;
	padding: 8px 4px;
	border: 1px solid var(--home-line, #e4e8ee) !important;
	border-radius: var(--radius, 5px) !important;
	background: #fff !important;
	color: var(--home-muted, #5b6472) !important;
	box-shadow: none !important;
	cursor: pointer;
	font-family: "Roboto Condensed", Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.25 !important;
}

body.studio-body.studio-gen-skin .studio-aspect__label {
	font-family: "Roboto Condensed", Arial, sans-serif !important;
	font-size: 14px !important;
	line-height: 1.25 !important;
}

body.studio-body.studio-gen-skin .studio-aspect__btn:hover {
	border-color: #0179cd !important;
	background: #f0f8fd !important;
	color: #0179cd !important;
}

body.studio-body.studio-gen-skin .studio-aspect__btn.is-active {
	border-color: var(--home-accent, #0179cd) !important;
	color: var(--home-accent, #0179cd) !important;
	background: #e6f3fb !important;
	box-shadow: none !important;
}

body.studio-body.studio-gen-skin .studio-upload {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	min-height: 140px !important;
	padding: 16px !important;
	border: 1px dashed #cbd5e1 !important;
	border-radius: var(--radius, 5px) !important;
	background: #f8fafc !important;
	cursor: pointer;
	text-align: center;
	color: var(--home-muted, #5b6472) !important;
}

body.studio-body.studio-gen-skin .studio-upload.is-dragover {
	border-color: var(--home-accent, #0179cd) !important;
	background: #e6f3fb !important;
	color: var(--home-accent, #0179cd) !important;
}

body.studio-body.studio-gen-skin .studio-upload__preview {
	max-width: 100%;
	max-height: 160px;
	border-radius: var(--radius, 5px);
}

.studio-gen-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 22px 0 28px;
	text-align: center;
}

.studio-gen-actions__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
	justify-content: center;
	color: var(--home-muted, #5b6472);
	font-size: 0.92rem;
}

body.studio-body.studio-gen-skin .studio-btn--generate,
body.studio-body.studio-gen-skin a.studio-btn--generate {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	min-width: min(420px, 100%);
	min-height: 48px;
	padding: 10px 28px 8px;
	border: 0;
	border-radius: var(--radius, 5px);
	background: var(--home-accent, #0179cd) !important;
	color: #fff !important;
	font-family: "Roboto Condensed", Arial, sans-serif !important;
	font-weight: 700;
	font-size: 14px !important;
	line-height: 1.25 !important;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none !important;
}

body.studio-body.studio-gen-skin .studio-btn--generate[hidden],
body.studio-body.studio-gen-skin button.studio-btn--generate[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-btn--generate:hover {
	background: #015fa3;
}

body.studio-body.studio-gen-skin .studio-btn--generate:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.studio-gen-topup {
	color: var(--home-accent, #0179cd);
	font-weight: 600;
	text-decoration: none;
}

.studio-gen-history {
	margin-top: 28px;
	padding: 20px 18px 18px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: var(--radius-lg, 7px);
	background: #fff;
	box-sizing: border-box;
}

body.studio-body.studio-gen-skin .studio-gen-history .studio-side-title {
	margin: 0;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--home-ink, #12151c);
}

body.studio-body.studio-gen-skin .studio-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

body.studio-body.studio-gen-skin .studio-search,
body.studio-body.studio-gen-skin .studio-toolbar .studio-search {
	flex: 0 1 280px;
	width: auto;
	min-width: min(220px, 100%);
	height: 40px;
	padding: 0 12px !important;
	border: 1px solid var(--home-line, #e4e8ee) !important;
	border-radius: var(--radius, 5px) !important;
	background: #fff !important;
	color: var(--home-ink, #12151c) !important;
	font-family: "Roboto Condensed", Arial, sans-serif !important;
	font-size: 14px !important;
	box-shadow: none !important;
}

body.studio-body.studio-gen-skin .studio-search::placeholder {
	color: var(--home-muted, #5b6472) !important;
}

body.studio-body.studio-gen-skin .studio-search:focus {
	outline: none !important;
	border-color: var(--home-accent, #0179cd) !important;
	box-shadow: 0 0 0 2px rgba(1, 121, 205, 0.18) !important;
}

body.studio-body.studio-gen-skin .studio-history-grid.gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
	margin: 0;
}

body.studio-body.studio-gen-skin .studio-history-card,
body.studio-body.studio-gen-skin .studio-history-card.card {
	position: relative;
	aspect-ratio: 1;
	margin: 0;
	border: 1px solid var(--home-line, #e4e8ee) !important;
	border-radius: var(--radius-lg, 7px) !important;
	overflow: hidden;
	background: #f8fafc !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-history-card:hover,
body.studio-body.studio-gen-skin .studio-history-card.card:hover {
	border-color: var(--home-accent, #0179cd) !important;
	box-shadow: 0 0 0 1px rgba(1, 121, 205, 0.2) !important;
	transform: none;
}

body.studio-body.studio-gen-skin .studio-history-card:focus-visible {
	outline: 2px solid var(--home-accent, #0179cd);
	outline-offset: 2px;
}

body.studio-body.studio-gen-skin .studio-history-card__img,
body.studio-body.studio-gen-skin .studio-history-card.card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
}

body.studio-body.studio-gen-skin .studio-history-card__actions {
	position: absolute;
	right: 8px;
	bottom: 8px;
	display: flex;
	gap: 6px;
	opacity: 0;
	transition: opacity 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-history-card:hover .studio-history-card__actions,
body.studio-body.studio-gen-skin .studio-history-card:focus-within .studio-history-card__actions {
	opacity: 1;
}

body.studio-body.studio-gen-skin .studio-history-card__btn {
	width: 32px;
	height: 32px;
	border-radius: 5px !important;
	border: 1px solid var(--home-line, #e4e8ee) !important;
	background: #fff !important;
	color: var(--home-ink, #12151c) !important;
	display: grid;
	place-items: center;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-history-card__btn:hover {
	border-color: var(--home-accent, #0179cd) !important;
	color: var(--home-accent, #0179cd) !important;
	background: var(--home-accent-soft, #e6f3fb) !important;
}

body.studio-body.studio-gen-skin .studio-history-card__btn--fav.is-active {
	color: #d97706 !important;
	border-color: #fbbf24 !important;
	background: #fffbeb !important;
}

body.studio-body.studio-gen-skin .studio-history-empty,
body.studio-body.studio-gen-skin .empty-state {
	grid-column: 1 / -1;
	margin: 0;
	padding: 28px 16px;
	border: 1px dashed var(--home-line, #e4e8ee);
	border-radius: var(--radius, 5px);
	background: #f8fafc;
	color: var(--home-muted, #5b6472) !important;
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}

body.studio-body.studio-gen-skin .studio-controls__meta {
	color: var(--home-muted, #5b6472);
}

body.studio-body.studio-gen-skin .studio-status {
	color: var(--home-muted, #5b6472);
	min-height: 1.2em;
}

body.studio-body.studio-gen-skin .studio-flash--warn {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #9a3412;
	border-radius: 5px;
	padding: 0.75rem 0.9rem;
	font-size: 0.9rem;
}

body.studio-body.studio-gen-skin .studio-history-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 1200 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-sizing: border-box;
}

body.studio-body.studio-gen-skin .studio-history-modal[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin.studio-history-modal-open {
	overflow: hidden;
}

body.studio-body.studio-gen-skin .studio-history-modal__dialog {
	background: #fff !important;
	border: 1px solid var(--home-line, #e4e8ee) !important;
	border-radius: 7px !important;
	color: #12151c !important;
	box-shadow: 0 18px 48px rgba(17, 24, 39, 0.16) !important;
}

body.studio-body.studio-gen-skin .studio-history-modal__backdrop {
	background: rgba(17, 24, 39, 0.45) !important;
}

body.studio-body.studio-gen-skin .studio-history-modal__title,
body.studio-body.studio-gen-skin .studio-history-modal__value,
body.studio-body.studio-gen-skin .studio-history-modal__prompt {
	color: #12151c !important;
}

body.studio-body.studio-gen-skin .studio-history-modal__label {
	color: #5b6472 !important;
}

body.studio-body.studio-gen-skin .studio-history-modal__close {
	color: #12151c !important;
	background: #f3f4f6 !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 5px !important;
}

body.studio-body.studio-gen-skin .studio-history-modal__download.studio-btn--ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 10px 16px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: 5px;
	background: #fff;
	color: var(--home-ink, #12151c);
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

body.studio-body.studio-gen-skin .studio-history-modal__download.studio-btn--ghost:hover {
	border-color: var(--home-accent, #0179cd);
	color: var(--home-accent, #0179cd);
	background: var(--home-accent-soft, #e6f3fb);
}

@media (max-width: 900px) {
	.studio-gen-workspace {
		grid-template-columns: 1fr;
	}

	body.studio-body.studio-gen-skin .studio-history-grid.gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	body.studio-body.studio-gen-skin .studio-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	body.studio-body.studio-gen-skin .studio-search,
	body.studio-body.studio-gen-skin .studio-toolbar .studio-search {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}
}

/* —— Studio board: settings left / result right / history below —— */
body.studio-body.studio-gen-skin .studio-gen__wrap {
	max-width: 1280px !important;
}

body.studio-body.studio-gen-skin .studio-board {
	display: grid;
	grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
	gap: 16px;
	align-items: stretch;
}

body.studio-body.studio-gen-skin .studio-panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 18px 18px 16px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
}

body.studio-body.studio-gen-skin .studio-panel__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

body.studio-body.studio-gen-skin .studio-panel__title {
	margin: 0;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 1.35rem;
	font-weight: 800;
	font-style: italic;
	letter-spacing: 0.02em;
	color: var(--home-ink, #12151c);
	text-align: left;
}

body.studio-body.studio-gen-skin .studio-panel__balance {
	margin: 0;
	font-size: 0.88rem;
	color: var(--home-muted, #5b6472);
	white-space: nowrap;
}

body.studio-body.studio-gen-skin .studio-gen-gift {
	margin: 0 0 14px;
	max-width: none;
	text-align: left;
}

/*
 * Блок «бесплатная генерация в Nano Banana 2.1».
 *
 * Стоит прямо над списком моделей: человек должен увидеть связь между
 * подпиской и моделью, а не две разрозненные плашки.
 */
body.studio-body.studio-gen-skin .studio-freegen {
	position: relative;
	overflow: hidden;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-areas:
		"body actions"
		"status status";
	align-items: center;
	gap: 10px 16px;
	margin: 0 0 14px;
	padding: 14px 16px;
	border: 1px solid rgba(1, 121, 205, 0.28);
	border-radius: 14px;
	background:
		linear-gradient(120deg, rgba(1, 121, 205, 0.08) 0%, rgba(37, 184, 245, 0.12) 100%),
		#fff;
	box-shadow: 0 8px 24px rgba(4, 45, 74, 0.08);
}

body.studio-body.studio-gen-skin .studio-freegen.is-active {
	border-color: rgba(16, 185, 129, 0.42);
	background:
		linear-gradient(120deg, rgba(4, 120, 87, 0.09) 0%, rgba(16, 185, 129, 0.14) 100%),
		#fff;
}

/*
 * Подарок израсходован: блок остаётся на месте (человек должен видеть,
 * что акция была и что она закончилась), но выглядит спокойнее —
 * без зелёного «свечения» активного предложения.
 */
body.studio-body.studio-gen-skin .studio-freegen.is-used {
	border-color: rgba(120, 135, 150, 0.28);
	background:
		linear-gradient(120deg, rgba(120, 135, 150, 0.06) 0%, rgba(120, 135, 150, 0.1) 100%),
		#fff;
}

body.studio-body.studio-gen-skin .studio-freegen.is-used .studio-freegen__glow {
	background: radial-gradient(circle, rgba(120, 135, 150, 0.16) 0%, rgba(120, 135, 150, 0) 70%);
}

.studio-freegen__glow {
	position: absolute;
	top: -60px;
	right: -40px;
	width: 200px;
	height: 200px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(37, 184, 245, 0.28) 0%, rgba(37, 184, 245, 0) 70%);
	pointer-events: none;
}

.studio-freegen.is-active .studio-freegen__glow {
	background: radial-gradient(circle, rgba(16, 185, 129, 0.26) 0%, rgba(16, 185, 129, 0) 70%);
}

.studio-freegen__body {
	grid-area: body;
	position: relative;
	min-width: 0;
}

.studio-freegen__kicker {
	margin: 0 0 2px;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: #0179cd;
}

.studio-freegen.is-active .studio-freegen__kicker {
	color: #047857;
}

.studio-freegen__title {
	margin: 0 0 4px;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 1.2rem;
	font-weight: 800;
	line-height: 1.2;
	color: var(--home-ink, #12151c);
}

.studio-freegen__text {
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.45;
	color: var(--home-muted, #5b6472);
}

.studio-freegen__actions {
	grid-area: actions;
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.studio-freegen__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 40px;
	padding: 9px 18px;
	border: 0;
	border-radius: 10px;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.studio-freegen__btn--model {
	background: linear-gradient(105deg, #075fb2 0%, #0179cd 60%, #25b8f5 100%);
	box-shadow: 0 6px 16px rgba(1, 95, 163, 0.28);
	color: #fff;
}

.studio-freegen__btn--vk {
	background: #fff;
	border: 1px solid rgba(1, 121, 205, 0.35);
	box-shadow: 0 4px 12px rgba(4, 45, 74, 0.12);
	color: #0179cd;
}

.studio-freegen__btn img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.studio-freegen__btn:hover {
	transform: translateY(-1px);
}

.studio-freegen__btn--model:hover {
	box-shadow: 0 9px 20px rgba(1, 95, 163, 0.34);
}

.studio-freegen__btn--vk:hover {
	box-shadow: 0 7px 16px rgba(4, 45, 74, 0.18);
}

.studio-freegen__btn:focus-visible {
	outline: 3px solid rgba(1, 121, 205, 0.4);
	outline-offset: 2px;
}

.studio-freegen__status {
	grid-area: status;
	position: relative;
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.35;
	color: var(--home-muted, #5b6472);
}

.studio-freegen__status:empty {
	display: none;
}

.studio-freegen__status.is-ok {
	color: #047857;
	font-weight: 700;
}

.studio-freegen__status.is-error {
	color: #b91c1c;
	font-weight: 600;
}

.studio-freegen__status.is-pending {
	color: #0179cd;
	font-weight: 600;
}

@media (max-width: 720px) {
	body.studio-body.studio-gen-skin .studio-freegen {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"body"
			"actions"
			"status";
		gap: 10px;
		padding: 13px 14px;
	}

	.studio-freegen__actions {
		width: 100%;
	}

	.studio-freegen__btn {
		flex: 1 1 0;
		min-height: 38px;
		padding: 8px 12px;
	}
}

/* Акция «подписка на группу VK»: полноширинный верхний алерт */
.studio-vkbonus,
.studio-vk-bonus {
	position: relative;
	z-index: 5;
	width: 100%;
	margin: 0;
	padding: 10px 16px;
	height: 56px;
	border: 0;
	border-radius: 0 !important;
	background:
		radial-gradient(90% 180% at 100% 0%, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 60%),
		linear-gradient(105deg, #075fb2 0%, #0179cd 48%, #25b8f5 100%);
	box-shadow: 0 8px 22px rgba(1, 95, 163, 0.25);
	color: #fff;
}

.studio-vkbonus__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.studio-vkbonus__icon {
	display: block;
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.studio-vkbonus__title {
	margin: 0;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: #fff;
}

.studio-vkbonus__badge,
.studio-vkbonus__hint,
.studio-vkbonus__content,
.studio-vkbonus__body {
	display: none;
}

.studio-vkbonus__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.studio-vkbonus__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 36px;
	padding: 8px 18px;
	border: 0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(4, 45, 74, 0.24);
	color: #0179cd;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.studio-vkbonus__link img {
	width: 18px;
	height: 18px;
	object-fit: contain;
	filter: none;
}

.studio-vkbonus__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 7px 16px rgba(4, 45, 74, 0.3);
	background: #f5fbff;
}

.studio-vkbonus__link:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.85);
	outline-offset: 2px;
}

.studio-vkbonus__check {
	min-height: 36px;
	padding: 8px 14px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.studio-vkbonus__check:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.24);
}

.studio-vkbonus__check:disabled {
	cursor: default;
	opacity: 0.6;
}

.studio-vkbonus__status {
	grid-column: 2 / -1;
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.95);
}

.studio-vkbonus__status:empty {
	display: none;
}

.studio-vkbonus__status.is-ok {
	color: #d9f99d;
	font-weight: 700;
}

.studio-vkbonus__status.is-error {
	color: #ffe4e6;
	font-weight: 600;
}

.studio-vkbonus__status.is-pending {
	opacity: 0.85;
}

.studio-vkbonus.is-awarded,
.studio-vk-bonus.is-awarded {
	background:
		radial-gradient(90% 180% at 100% 0%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 60%),
		linear-gradient(105deg, #065f46 0%, #047857 50%, #10b981 100%);
	box-shadow: 0 8px 22px rgba(5, 150, 105, 0.23);
}

.studio-vkbonus__reward {
	font-weight: 800;
	color: #fff;
	white-space: nowrap;
}

@media (max-width: 720px) {
	.studio-vkbonus {
		padding: 9px 12px;
	}

	.studio-vkbonus__inner {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 8px;
	}

	.studio-vkbonus__icon {
		width: 24px;
		height: 24px;
	}

	.studio-vkbonus__title {
		font-size: 13px;
	}

	.studio-vkbonus__actions {
		grid-column: 1 / -1;
		gap: 7px;
	}

	.studio-vkbonus__link,
	.studio-vkbonus__check {
		flex: 1 1 0;
		min-height: 34px;
		padding: 7px 12px;
	}

	.studio-vkbonus__status {
		grid-column: 1 / -1;
	}
}

body.studio-body.studio-gen-skin .studio-model-dd {
	position: relative;
	margin-bottom: 14px;
}

body.studio-body.studio-gen-skin .studio-model-dd__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	padding: 8px 14px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	color: inherit;
}

body.studio-body.studio-gen-skin .studio-model-dd.is-open .studio-model-dd__toggle,
body.studio-body.studio-gen-skin .studio-model-dd__toggle:hover {
	border-color: var(--home-accent, #0179cd);
}

body.studio-body.studio-gen-skin .studio-model-dd__logo {
	width: 28px !important;
	height: 28px !important;
	object-fit: contain;
	border-radius: 6px;
	flex: 0 0 28px;
}

body.studio-body.studio-gen-skin .studio-model-dd__name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 700;
	font-size: 14px;
}

body.studio-body.studio-gen-skin .studio-model-dd__chev {
	width: 8px;
	height: 8px;
	border-right: 2px solid #8a93a3;
	border-bottom: 2px solid #8a93a3;
	transform: rotate(45deg);
	margin-top: -4px;
}

body.studio-body.studio-gen-skin .studio-model-dd.is-open .studio-model-dd__chev {
	transform: rotate(225deg);
	margin-top: 4px;
}

body.studio-body.studio-gen-skin .studio-model-rail {
	position: absolute;
	z-index: 8;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0;
	max-height: 280px;
	padding: 8px;
	overflow: auto;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
}

body.studio-body.studio-gen-skin .studio-model-rail[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-model-card {
	flex-direction: row;
	align-items: center;
	width: 100%;
	max-width: none;
	padding: 8px 10px;
	border-radius: 8px;
}

body.studio-body.studio-gen-skin .studio-model-card__logo {
	width: 32px !important;
	height: 32px !important;
	flex: 0 0 32px;
	object-fit: contain;
}

body.studio-body.studio-gen-skin .studio-composer {
	position: relative;
	margin-bottom: 14px;
}

body.studio-body.studio-gen-skin .studio-refs {
	margin: 0 0 14px;
	padding: 12px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: 10px;
	background: #fff;
}

body.studio-body.studio-gen-skin .studio-refs[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-refs__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 10px;
}

body.studio-body.studio-gen-skin .studio-refs__title {
	margin: 0;
	color: #0f172a;
	font-family: "Roboto Condensed", Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 700;
}

body.studio-body.studio-gen-skin .studio-refs__hint {
	margin: 0;
	color: #8a93a3;
	font-size: 0.8rem;
}

body.studio-body.studio-gen-skin .studio-refs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 10px;
}

body.studio-body.studio-gen-skin .studio-refs__list[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-refs__item {
	position: relative;
	width: 72px;
	height: 72px;
	border: 1px solid var(--home-line, #e4e8ee);
	border-radius: 8px;
	overflow: hidden;
	background: #f8fafc;
}

body.studio-body.studio-gen-skin .studio-refs__preview {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

body.studio-body.studio-gen-skin .studio-refs__remove {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

body.studio-body.studio-gen-skin .studio-refs__state {
    position: absolute;
    left: 6px;
    bottom: 6px;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    pointer-events: none;
}

body.studio-body.studio-gen-skin .studio-refs__item.is-ready .studio-refs__state {
    background: rgba(22, 163, 74, 0.92);
}

body.studio-body.studio-gen-skin .studio-refs__item.is-error .studio-refs__state {
    background: rgba(220, 38, 38, 0.92);
}

body.studio-body.studio-gen-skin .studio-refs__item.is-uploading .studio-refs__preview {
    opacity: 0.72;
}

body.studio-body.studio-gen-skin .studio-refs__remove:hover {
	background: rgba(15, 23, 42, 0.9);
}

body.studio-body.studio-gen-skin .studio-refs__add {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px dashed #c5ccd6;
	border-radius: 8px;
	background: #f8fafc;
	color: #475569;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
}

body.studio-body.studio-gen-skin .studio-refs__add:hover,
body.studio-body.studio-gen-skin .studio-refs__add.is-dragover {
	border-color: var(--home-accent, #0179cd);
	background: var(--home-accent-soft, #e6f3fb);
	color: var(--home-accent, #0179cd);
}

body.studio-body.studio-gen-skin .studio-refs__add[hidden],
body.studio-body.studio-gen-skin .studio-refs__add.is-full {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-refs__add-icon {
	font-size: 1.1rem;
	line-height: 1;
}

body.studio-body.studio-gen-skin .studio-prompt-box {
	min-height: 220px;
	padding: 16px 16px 16px 72px;
	border-radius: 12px;
	resize: vertical;
}

body.studio-body.studio-gen-skin .studio-composer--no-upload .studio-prompt-box {
	padding: 16px;
}

body.studio-body.studio-gen-skin .studio-field__optional {
	font-weight: 400;
	color: #8a93a3;
}

body.studio-body.studio-gen-skin .studio-field__hint {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.35;
	color: #8a93a3;
}

body.studio-body.studio-gen-skin .studio-field__hint--check {
	margin: -4px 0 8px 28px;
}

#panel-music .studio-gen-hint {
	margin: -6px 0 10px;
}

#panel-music .studio-music-model-badge {
	display: inline-flex;
	align-items: center;
	margin: 0 0 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: #fff4e8;
	border: 1px solid #c2410c;
	color: #9a3412;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

body.studio-body.studio-gen-skin .studio-composer__upload {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 1px dashed #c5ccd6;
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
	overflow: hidden;
}

body.studio-body.studio-gen-skin .studio-composer__upload:hover,
body.studio-body.studio-gen-skin .studio-composer__upload.is-dragover {
	border-color: var(--home-accent, #0179cd);
	background: var(--home-accent-soft, #e6f3fb);
}

body.studio-body.studio-gen-skin .studio-composer__upload .studio-upload__icon {
	font-size: 22px;
	line-height: 1;
	color: #8a93a3;
}

body.studio-body.studio-gen-skin .studio-composer__upload .studio-upload__preview,
body.studio-body.studio-gen-skin .studio-composer__upload.has-preview .studio-upload__preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 9px;
}

body.studio-body.studio-gen-skin .studio-composer__upload.has-preview .studio-upload__icon {
	display: none;
}

body.studio-body.studio-gen-skin .studio-controls-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

body.studio-body.studio-gen-skin .studio-side-block--inline {
	padding: 0;
	border: 0;
	background: transparent;
}

body.studio-body.studio-gen-skin .studio-aspect {
	flex: 1 1 auto;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

body.studio-body.studio-gen-skin .studio-aspect__btn {
	min-width: 52px;
	padding: 6px 8px;
	border-radius: 8px;
}

body.studio-body.studio-gen-skin .studio-panel--settings .studio-gen-actions {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 0;
	border: 0;
	background: transparent;
}

body.studio-body.studio-gen-skin .studio-panel--settings .studio-btn--generate,
body.studio-body.studio-gen-skin .studio-panel--settings a.studio-btn--generate {
	width: 100%;
	min-height: 48px;
	border-radius: 10px;
	font-weight: 700;
}

body.studio-body.studio-gen-skin .studio-panel--result {
	min-height: 520px;
}

body.studio-body.studio-gen-skin .studio-stage {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 420px;
	border-radius: 12px;
	background: #eef1f5;
	overflow: hidden;
}

body.studio-body.studio-gen-skin .studio-stage__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: #8a93a3;
	font-size: 0.95rem;
}

body.studio-body.studio-gen-skin .studio-stage__placeholder[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-stage__icon {
	width: 36px;
	height: 28px;
	border: 2px solid #c5ccd6;
	border-radius: 4px;
	position: relative;
}

body.studio-body.studio-gen-skin .studio-stage__icon::after {
	content: "";
	position: absolute;
	left: 6px;
	top: 6px;
	width: 10px;
	height: 10px;
	border: 2px solid #c5ccd6;
	border-radius: 50%;
}

body.studio-body.studio-gen-skin .studio-stage__img {
	display: block;
	max-width: 100%;
	max-height: 560px;
	width: auto;
	height: auto;
	object-fit: contain;
}

body.studio-body.studio-gen-skin .studio-stage__img[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-stage .studio-status {
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 16px;
	margin: 0;
	padding: 10px 14px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 4px 16px rgba(17, 24, 39, 0.08);
	text-align: center;
	font-size: 0.92rem;
	color: var(--home-ink, #12151c);
}

body.studio-body.studio-gen-skin .studio-stage .studio-status:empty {
	display: none;
}

body.studio-body.studio-gen-skin .studio-stage .studio-status.is-loading {
	color: #0b5f9a;
}

body.studio-body.studio-gen-skin .studio-stage .studio-status.is-error {
	color: #b42318;
	background: #fff5f4;
}

body.studio-body.studio-gen-skin .studio-stage .studio-status.is-success {
	color: #027a48;
}

body.studio-body.studio-gen-skin .studio-stage.is-loading::before {
	content: "";
	position: absolute;
	width: 32px;
	height: 32px;
	top: 18px;
	right: 18px;
	border: 3px solid rgba(1, 121, 205, 0.2);
	border-top-color: var(--home-accent, #0179cd);
	border-radius: 50%;
	animation: studio-spin 0.8s linear infinite;
}

@keyframes studio-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
	body.studio-body.studio-gen-skin .studio-board {
		grid-template-columns: 1fr;
	}

	body.studio-body.studio-gen-skin .studio-panel--result {
		min-height: 360px;
	}

	body.studio-body.studio-gen-skin .studio-stage {
		min-height: 280px;
	}
}

/* —— Табы навигации по режимам —— */
.studio-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	padding: 6px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.studio-tab {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 14px;
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	color: #fff;
	font-size: 20px !important;
	line-height: 1.25 !important;
	font-weight: 600;
	text-align: center;
}

.studio-tab--image {
	background: #0179cd;
	border-color: #0179cd;
}

.studio-tab--video {
	background: #0d9488;
	border-color: #0d9488;
}

.studio-tab--music {
	background: #c2410c;
	border-color: #c2410c;
}

.studio-tab--tools {
	background: #475569;
	border-color: #475569;
}

.studio-tab:hover {
	filter: brightness(1.08);
}

.studio-tab.is-active {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	filter: brightness(1.05);
}

.studio-tab:not(.is-active) {
	opacity: 0.72;
}

.studio-tab:not(.is-active):hover {
	opacity: 0.9;
}

/* —— Панели режимов —— */
.studio-panels {
	position: relative;
}

.studio-panel[data-panel] {
	display: none !important;
	animation: fadeIn 0.3s ease;
}

.studio-panel[data-panel].is-active {
	display: block !important;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* —— Placeholder для новых режимов —— */
.studio-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
	text-align: center;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 12px;
	border: 1px dashed rgba(255, 255, 255, 0.15);
	min-height: 200px;
}

.studio-placeholder__icon {
	font-size: 48px;
	margin-bottom: 16px;
	opacity: 0.6;
}

.studio-placeholder__title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px 0;
	color: #fff;
}

.studio-placeholder__text {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.7);
	margin: 0 0 12px 0;
	line-height: 1.5;
}

.studio-placeholder__hint {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.5);
	margin: 0;
}

/* —— Белая тема для студии —— */
body.studio-body.studio-gen-skin .studio-tabs {
	background: #f3f5f8;
	border-color: rgba(0, 0, 0, 0.08);
}

body.studio-body.studio-gen-skin .studio-tab,
body.studio-body.studio-gen-skin button.studio-tab[type="button"] {
	color: #fff;
	font-size: 20px !important;
	line-height: 1.25 !important;
}

body.studio-body.studio-gen-skin .studio-tab--image {
	background: #0179cd;
	border-color: #0179cd;
}

body.studio-body.studio-gen-skin .studio-tab--video {
	background: #0d9488;
	border-color: #0d9488;
}

body.studio-body.studio-gen-skin .studio-tab--music {
	background: #c2410c;
	border-color: #c2410c;
}

body.studio-body.studio-gen-skin .studio-tab--tools {
	background: #475569;
	border-color: #475569;
}

body.studio-body.studio-gen-skin #studioToolsGenerateBtn {
	background: linear-gradient(135deg, #64748b 0%, #475569 100%);
	color: #fff;
}

body.studio-body.studio-gen-skin .studio-tools-list {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
}

body.studio-body.studio-gen-skin .studio-tool-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid rgba(20, 24, 35, 0.14);
	border-radius: 14px;
	background: #fff;
	color: #171923;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

body.studio-body.studio-gen-skin .studio-tool-card.is-active {
	border-color: #475569;
	box-shadow: 0 0 0 2px rgba(71, 85, 105, 0.18);
}

body.studio-body.studio-gen-skin .studio-tool-card__name {
	font-weight: 650;
}

body.studio-body.studio-gen-skin .studio-tool-card__cost {
	color: #5f6470;
	font-size: 13px;
	white-space: nowrap;
}

body.studio-body.studio-gen-skin .studio-tools-upload {
	margin-bottom: 14px;
}

body.studio-body.studio-gen-skin .studio-tools-fields [hidden],
body.studio-body.studio-gen-skin #studioToolsPromptWrap[hidden],
body.studio-body.studio-gen-skin #studioToolsUploadWrap[hidden] {
	display: none !important;
}

body.studio-body.studio-gen-skin .studio-tools-upload__area {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 140px;
	border: 1px dashed #c5ccd6;
	border-radius: 14px;
	background: #f8fafc;
	cursor: pointer;
	overflow: hidden;
}

body.studio-body.studio-gen-skin .studio-tools-upload__area:hover,
body.studio-body.studio-gen-skin .studio-tools-upload__area.is-dragover {
	border-color: #475569;
	background: #f1f5f9;
}

body.studio-body.studio-gen-skin .studio-tools-upload__area .studio-upload__icon {
	font-size: 28px;
	line-height: 1;
	color: #8a93a3;
}

body.studio-body.studio-gen-skin .studio-tools-upload__area .studio-upload__preview,
body.studio-body.studio-gen-skin .studio-tools-upload__area.has-preview .studio-upload__preview {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #fff;
}

body.studio-body.studio-gen-skin .studio-tools-upload__area.has-preview .studio-upload__icon {
	display: none;
}

body.studio-body.studio-gen-skin .studio-tools-lyrics {
	display: grid;
	gap: 12px;
	width: 100%;
	max-height: 70vh;
	overflow: auto;
	padding: 8px;
}

body.studio-body.studio-gen-skin .studio-tools-lyrics__item {
	padding: 14px;
	border: 1px solid rgba(20, 24, 35, 0.12);
	border-radius: 12px;
	background: #fff;
	text-align: left;
}

body.studio-body.studio-gen-skin .studio-tools-lyrics__item h3 {
	margin: 0 0 8px;
	font-size: 16px;
}

body.studio-body.studio-gen-skin .studio-tools-lyrics__item pre {
	margin: 0;
	white-space: pre-wrap;
	font: inherit;
	line-height: 1.45;
}

body.studio-body.studio-gen-skin .studio-tab:hover {
	filter: brightness(1.06);
}

body.studio-body.studio-gen-skin .studio-tab.is-active {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

body.studio-body.studio-gen-skin .studio-placeholder {
	background: rgba(0, 0, 0, 0.02);
	border-color: rgba(0, 0, 0, 0.1);
}

body.studio-body.studio-gen-skin .studio-placeholder__title {
	color: #12151c;
}

body.studio-body.studio-gen-skin .studio-placeholder__text {
	color: rgba(0, 0, 0, 0.6);
}

body.studio-body.studio-gen-skin .studio-placeholder__hint {
	color: rgba(0, 0, 0, 0.4);
}

/* —— Мобильная адаптация —— */
@media (max-width: 640px) {
	.studio-tabs {
		gap: 4px;
		padding: 4px;
		margin-bottom: 16px;
	}

	.studio-tab {
		padding: 10px 8px;
		font-size: 20px !important;
	}

	.studio-placeholder {
		padding: 32px 16px;
		min-height: 160px;
	}

	.studio-placeholder__icon {
		font-size: 36px;
		margin-bottom: 12px;
	}

	.studio-placeholder__title {
		font-size: 16px;
	}

	.studio-placeholder__text {
		font-size: 13px;
	}
}

/* Video aspect pills sit with quality variants */
#panel-video .studio-controls-row {
	align-items: center;
	gap: 10px;
}

#panel-video .studio-video-aspect {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-left: 0;
}

.studio-stage__video {
	width: 100%;
	height: auto;
	max-height: 400px;
	border-radius: 8px;
}

/* —— Кнопка генерации видео —— */
#studioVideoGenerateBtn {
	background: linear-gradient(135deg, #0179cd 0%, #0a5a8f 100%);
}

body.studio-body.studio-gen-skin #studioVideoGenerateBtn {
	background: linear-gradient(135deg, #0179cd 0%, #0a5a8f 100%);
	color: #fff;
}

/* —— Музыка модели —— */
.studio-music-models {
	margin-bottom: 16px;
}

.studio-music-models .studio-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	background: #1a1f2e !important;
	color: #fff !important;
	font-size: 14px;
	cursor: pointer;
}

.studio-music-models .studio-select option {
	background: #1a1f2e !important;
	color: #fff !important;
}

body.studio-body.studio-gen-skin .studio-music-models .studio-select {
	border-color: rgba(0, 0, 0, 0.15);
	background: #fff !important;
	color: #12151c !important;
}

body.studio-body.studio-gen-skin .studio-music-models .studio-select option {
	background: #fff !important;
	color: #12151c !important;
}

.studio-stage__audio {
	width: 100%;
	margin-top: 16px;
}

#studioMusicGenerateBtn {
	background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
}

body.studio-body.studio-gen-skin #studioMusicGenerateBtn {
	background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
	color: #fff;
}


body.studio-body.studio-gen-skin .studio-field,
body.studio-body.studio-gen-skin .studio-music-fields {
    display: grid;
    gap: 8px;
}

body.studio-body.studio-gen-skin .studio-music-fields {
    margin-top: 14px;
}

body.studio-body.studio-gen-skin .studio-field__label,
body.studio-body.studio-gen-skin .studio-check {
    font-size: 14px;
    color: #5f6470;
}

body.studio-body.studio-gen-skin .studio-input {
    width: 100%;
    border: 1px solid rgba(20, 24, 35, 0.14);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: #171923;
    background: #fff;
}

body.studio-body.studio-gen-skin select.studio-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6470' d='M1.2 1.5 6 6.3l4.8-4.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #fff;
    padding-right: 36px;
    cursor: pointer;
}

body.studio-body.studio-gen-skin .studio-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.studio-body.studio-gen-skin .studio-check--row {
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 10px 0;
    font-weight: 600;
    color: #171923;
}

body.studio-body.studio-gen-skin .studio-check--row input[type="checkbox"] {
    width: 42px;
    height: 24px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #c5ccd6;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-check--row input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-check--row input[type="checkbox"]:checked {
    background: #0179cd;
}

body.studio-body.studio-gen-skin .studio-check--row input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

body.studio-body.studio-gen-skin .studio-music-custom,
body.studio-body.studio-gen-skin .studio-music-custom-extra {
    display: grid;
    gap: 12px;
}

body.studio-body.studio-gen-skin .studio-music-custom[hidden],
body.studio-body.studio-gen-skin .studio-music-custom-extra[hidden],
body.studio-body.studio-gen-skin .studio-music-fields [hidden] {
    display: none !important;
}

body.studio-body.studio-gen-skin .studio-music-range {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 10px;
    align-items: center;
}

body.studio-body.studio-gen-skin .studio-music-range input[type="range"] {
    width: 100%;
    accent-color: #0179cd;
}

body.studio-body.studio-gen-skin .studio-input--compact {
    padding: 10px 12px;
    text-align: center;
}

body.studio-body.studio-gen-skin .studio-input--textarea {
    min-height: 120px;
    resize: vertical;
}

body.studio-body.studio-gen-skin .studio-history-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

body.studio-body.studio-gen-skin .studio-history-tab {
    padding: 8px 14px;
    border: 1px solid var(--home-line, #e4e8ee);
    border-radius: 999px;
    background: #fff;
    color: var(--home-muted, #5b6472);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-history-tab:hover {
    border-color: var(--home-accent, #0179cd);
    color: var(--home-ink, #12151c);
}

body.studio-body.studio-gen-skin .studio-history-tab.is-active {
    border-color: var(--home-accent, #0179cd);
    background: rgba(1, 121, 205, 0.08);
    color: var(--home-accent, #0179cd);
}

body.studio-body.studio-gen-skin .studio-history-panel[hidden] {
    display: none !important;
}

/* Постраничная навигация по истории генераций. */
body.studio-body.studio-gen-skin .studio-history-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--home-line, #e4e8ee);
}

body.studio-body.studio-gen-skin .studio-history-pager__count {
    margin: 0;
    color: var(--home-muted, #5b6472);
    font-size: 13px;
}

body.studio-body.studio-gen-skin .studio-history-pager__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.studio-body.studio-gen-skin .studio-history-pager__btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--home-line, #e4e8ee);
    border-radius: 999px;
    background: #fff;
    color: var(--home-accent, #0179cd);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

body.studio-body.studio-gen-skin .studio-history-pager__btn:hover {
    border-color: var(--home-accent, #0179cd);
    color: var(--home-ink, #12151c);
}

body.studio-body.studio-gen-skin .studio-history-pager__btn.is-disabled {
    color: var(--home-muted, #5b6472);
    opacity: 0.55;
    cursor: default;
}

body.studio-body.studio-gen-skin .studio-history-pager__page {
    color: var(--home-muted, #5b6472);
    font-size: 13px;
    white-space: nowrap;
}

body.studio-body.studio-gen-skin .studio-history-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

body.studio-body.studio-gen-skin .studio-music-history,
body.studio-body.studio-gen-skin .studio-music-result {
    width: 100%;
}

body.studio-body.studio-gen-skin .studio-music-history {
    border: 1px solid var(--home-line, #e4e8ee);
    border-radius: var(--radius-lg, 7px);
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

body.studio-body.studio-gen-skin .studio-music-history__head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--home-line, #e4e8ee);
    background: #fff;
}

body.studio-body.studio-gen-skin .studio-music-history__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin-bottom: 6px;
}

body.studio-body.studio-gen-skin .studio-music-history__model {
    margin: 0;
    font-weight: 700;
    color: #171923;
}

body.studio-body.studio-gen-skin .studio-music-history__date {
    margin: 0;
    font-size: 12px;
    color: #7b8190;
}

body.studio-body.studio-gen-skin .studio-music-history__prompt {
    margin: 0;
    font-size: 13px;
    color: #5f6470;
    line-height: 1.45;
}

body.studio-body.studio-gen-skin .studio-music-history__table-wrap {
    padding: 0;
    overflow-x: auto;
}

body.studio-body.studio-gen-skin .studio-music-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

body.studio-body.studio-gen-skin .studio-music-table th {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(20, 24, 35, 0.1);
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #5f6470;
    background: #f8fafc;
}

body.studio-body.studio-gen-skin .studio-music-table td {
    padding: 12px;
    border-top: 1px solid rgba(20, 24, 35, 0.08);
    vertical-align: middle;
}

body.studio-body.studio-gen-skin .studio-music-table tbody tr:first-child td {
    border-top: 0;
}

body.studio-body.studio-gen-skin .studio-music-table__num {
    width: 88px;
    font-weight: 600;
    white-space: nowrap;
}

body.studio-body.studio-gen-skin .studio-music-table__player audio {
    width: 100%;
    min-width: 180px;
    max-width: 360px;
    height: 36px;
}

body.studio-body.studio-gen-skin .studio-music-table__actions {
    width: 240px;
    text-align: right;
    white-space: nowrap;
}

body.studio-body.studio-gen-skin .studio-music-table__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 0;
    background: var(--home-accent, #0179cd);
    color: #fff;
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

body.studio-body.studio-gen-skin .studio-music-table__btn--ghost {
    background: #fff;
    color: #171923;
    border: 1px solid rgba(20, 24, 35, 0.14);
}

/* —— Nav dropdown для студии —— */
body.studio-body.studio-gen-skin .site-topnav {
    overflow: visible;
}
body.studio-body.studio-gen-skin .site-nav-drop {
    position: relative;
}
body.studio-body.studio-gen-skin .site-nav-drop__menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    max-height: min(70vh, 480px);
    overflow: auto;
    padding: 8px 0;
    margin-top: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
    z-index: 220;
}
body.studio-body.studio-gen-skin .site-nav-drop:hover .site-nav-drop__menu {
    display: block;
}
/* Мобильное меню студии: подменю раскрывается по клику и встаёт в поток,
   чтобы не перекрывать соседние пункты (см. public-white.css). */
body.studio-body.studio-gen-skin .site-nav-drop.is-open > .site-nav-drop__menu {
    display: block;
}
body.studio-body.studio-gen-skin .site-nav-drop__arrow {
    display: inline-block;
    width: 10px;
    height: 6px;
    margin-left: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235b6472'/%3E%3C/svg%3E") no-repeat center / 10px 6px;
    vertical-align: middle;
}
body.studio-body.studio-gen-skin .site-nav-drop__item {
    display: block;
    padding: 9px 16px;
    color: #374151;
    font-size: 14px;
    font-family: var(--font-button, "Roboto Condensed", Arial, sans-serif);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
body.studio-body.studio-gen-skin .site-nav-drop__item:hover {
    background: #f3f4f6;
    color: #0179cd;
}
