/* aiboom — Apple Pure White Production UI (Макет А, утверждён владельцем 02.12.2026)
   Чистый белый + угольный #0B0D12 + коралл #D9381E. Ноль эмодзи, 100% CSP-safe.
   Тёмными остаются только «кино-зоны» поверх видео и фото (см. блок ниже). */
:root {
  --canvas: #FFFFFF;
  --surface: #FFFFFF;
  --subtle: #F5F6F8;
  --elevated: #ECEEF2;
  --text: #0B0D12;
  --sec: #3F4451;
  --mut: #4B515E;
  --border: #DCDFE6;
  --border-str: #C3C8D4;
  --lime: #0B0D12;
  --on-lime: #FFFFFF;
  --accent: #D9381E;
  --accent-ink: #A8260F;
  --accent-soft: #FFF1EE;
  --ai: #D9381E;
  --ai-soft: #FFF1EE;
  --ok: #065F46;
  --ok-soft: #E7F7F0;
  --danger: #B91C1C;
  --display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 4px 16px rgba(11, 13, 18, 0.04);
  --shadow-md: 0 12px 34px rgba(11, 13, 18, 0.08);
  --shadow-lg: 0 24px 70px rgba(11, 13, 18, 0.14);
}
/* КИНО-ЗОНЫ: всё, что лежит поверх видео и фото (карточки витрины, просмотрщик роликов, монитор монтажа,
   превью субтитров, цветные шапки тарифов), остаётся на тёмной подложке с белым текстом. Внутри зоны
   переменные палитры возвращаются к тёмным значениям, поэтому вложенные кнопки и подписи читаются. */
.v-card, .s20-tile, #showcaseDetailModal, .mix-card, .player-frame, .vr-stage, .vr-progress,
.mt-monitor, .mt-lib-thumb, .mt-lib-tag, .hf-photo-pill, .hf-photo-hover, .m-pick-tag,
.sub-pill, .ag-result-media, .s20-badge, .s20-live-dot, .preset-hero, .hf-photo-card {
  --canvas: #09090B;
  --surface: #131317;
  --subtle: #1B1B22;
  --elevated: #22222C;
  --text: #F5F6F8;
  --sec: #C4C4CC;
  --mut: #8E8E9B;
  --border: #26262F;
  --border-str: #3A3A46;
  --lime: #FFFFFF;
  --on-lime: #0B0D12;
  --accent-ink: #FF8A70;
  --ok: #34D399;
  --danger: #FCA5A5;
  color: var(--text);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  background: var(--canvas);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}
/* Неоновая аура Dark Cinema выключена: на белом фоне остаётся чистый «воздух» без пятен. */
body::before, body::after { content: none; }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes btnShine {
  0% { transform: translateX(-140%) skewX(-22deg); }
  35%, 100% { transform: translateX(260%) skewX(-22deg); }
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  50% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
}
@keyframes shimmerFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.app-shell { position: relative; z-index: 1; width: 100%; min-height: 100vh; display: flex; flex-direction: column; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 999px; background: var(--ok);
  margin-right: 6px; vertical-align: middle; animation: livePulse 2s ease-in-out infinite;
}
.display { font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; }
svg.ic { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.ic-lg { width: 18px; height: 18px; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* MCP FUTURISTIC MATRIX / DOT-GRID HERO BACKDROP */
.mcp-hero-stage {
  position: relative; padding: 36px 24px 32px; border-radius: 26px; overflow: hidden; margin-bottom: 26px;
  border: 1px solid rgba(11, 13, 18, 0.08);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(11, 13, 18, 0.048) 0%, rgba(217, 56, 30, 0.06) 38%, rgba(255, 255, 255, 0.96) 78%),
    radial-gradient(rgba(11, 13, 18, 0.14) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
  box-shadow: 0 24px 70px rgba(11, 13, 18, 0.132), inset 0 1px 0 rgba(255,255,255,0.12);
}

/* CURSOR-TRACKING SPOTLIGHT GLASS GLOW */
.panel {
  position: relative; overflow: hidden;
  background-image: radial-gradient(280px circle at var(--mx, -200px) var(--my, -200px), rgba(11, 13, 18, 0.027), transparent 65%);
}
.panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, -200px) var(--my, -200px), rgba(11, 13, 18, 0.135), rgba(217, 56, 30, 0.125) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .25s;
}
.panel:hover::before { opacity: 1; }

/* Top Nav */
.topnav {
  position: sticky; top: 0; z-index: 40;
  height: 64px; padding: 0 24px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; }
.brand img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(11, 13, 18, 0.14); object-fit: cover; }
.brand-name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.03em; }
.pill-new { font-size: 14px; font-weight: 700; color: var(--lime); background: var(--subtle); border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; }

.nav-tabs { display: flex; align-items: center; gap: 4px; background: var(--subtle); padding: 4px; border-radius: 999px; border: 1px solid var(--border); }
.nav-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-weight: 500; color: var(--sec); font-size: 14px; transition: .15s; white-space: nowrap;
}
.nav-tab:hover { color: var(--text); }
.nav-tab.active { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.nav-more-wrap { position: relative; }
.nav-more-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 178px; z-index: 60;
  background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(16px);
  border: 1px solid var(--border-str); border-radius: 16px; padding: 6px;
  box-shadow: 0 20px 50px rgba(11, 13, 18, 0.154);
  display: flex; flex-direction: column; gap: 4px;
}
.nav-more-menu[hidden] { display: none; }
.nav-more-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--text);
  transition: background .15s, color .15s;
}
.nav-more-item:hover { background: var(--subtle); }
.nav-more-item.active { background: var(--lime); color: var(--on-lime); }

/* SUNO MUSIC STUDIO */
.suno-hero-bar {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding: 22px 24px; border-radius: 22px; margin-bottom: 20px;
  border: 1px solid rgba(11, 13, 18, 0.1);
  background: radial-gradient(ellipse at 12% 0%, rgba(11, 13, 18, 0.042) 0%, rgba(217, 56, 30, 0.05) 42%, rgba(255, 255, 255, 0.96) 80%);
}
.suno-shell {
  display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start;
}
.suno-tracks-pane {
  position: sticky; top: 76px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.suno-tracks-scroll {
  max-height: calc(100vh - 210px); overflow-y: auto; padding-right: 4px;
  display: flex; flex-direction: column; gap: 10px;
}
.suno-studio-main { min-width: 0; }
.suno-top-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suno-genre-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.suno-composer { display: flex; flex-direction: column; gap: 14px; }
.suno-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.suno-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.suno-field { display: flex; flex-direction: column; gap: 7px; }
.suno-label { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; color: var(--sec); text-transform: uppercase; }
.suno-textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.suno-custom-fields { display: flex; flex-direction: column; gap: 12px; }
.suno-custom-fields[hidden], .suno-live-status[hidden], .suno-ai-box[hidden], .suno-upload-box[hidden], .suno-upload-preview[hidden] { display: none; }
.suno-ai-box {
  background: var(--subtle); border: 1px solid rgba(217, 56, 30, 0.27); border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.suno-ai-composer { display: flex; flex-direction: column; gap: 8px; }
.suno-ai-textarea {
  width: 100%; min-height: 76px; max-height: 200px; padding: 10px 12px;
  font-size: 14px; line-height: 1.45; resize: vertical; font-family: inherit;
}
.v2-mic-btn { display: inline-flex; align-items: center; gap: 5px; }
.v2-mic-btn.is-listening {
  border-color: var(--danger) !important; background: rgba(220, 38, 38, 0.18) !important; color: #A5122E !important;
  animation: v2-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes v2-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
.suno-ai-log { display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow-y: auto; }
.suno-ai-msg {
  padding: 9px 11px; border-radius: 12px; font-size: 14px; line-height: 1.45;
  display: flex; flex-direction: column; gap: 6px;
}
.suno-ai-msg.is-bot { background: rgba(217, 56, 30, 0.07); border: 1px solid rgba(217, 56, 30, 0.168); color: #A52812; }
.suno-ai-msg.is-user { background: var(--surface); border: 1px solid var(--border); color: var(--text); align-self: flex-end; max-width: 90%; }
.suno-upload-box {
  background: var(--subtle); border: 1px solid var(--border-str); border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.suno-dropzone {
  border: 1px dashed rgba(11, 13, 18, 0.158); border-radius: 12px; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; cursor: pointer;
  background: rgba(11, 13, 18, 0.012); transition: border-color .15s, background .15s;
}
.suno-dropzone:hover { border-color: var(--lime); background: rgba(11, 13, 18, 0.04); }
.suno-upload-preview { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.suno-live-status {
  padding: 12px 14px; border-radius: 14px; font-size: 14px;
  background: rgba(217, 56, 30, 0.06); border: 1px solid rgba(217, 56, 30, 0.24); color: #A52812;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.suno-live-status.is-err { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.45); color: #A5122F; }
.suno-live-status.is-ok { background: rgba(5, 150, 105, 0.12); border-color: rgba(5, 150, 105, 0.45); color: #047857; }
.suno-tracks-list { display: flex; flex-direction: column; gap: 12px; }
.suno-empty {
  padding: 22px 18px; border-radius: 16px; border: 1px dashed var(--border-str);
  background: var(--subtle); text-align: center; color: var(--sec); font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.suno-track-card { flex: 0 0 auto; border-radius: 20px; background: #FFFFFF; border: 1px solid var(--border); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.suno-track-card:hover { border-color: var(--border-str); box-shadow: var(--shadow-sm); }
/* Плеер трека (Suno и «Мои работы») */
.mp-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; min-width: 0; }
.mp-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mp-cover { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 20px rgba(11, 13, 18, 0.16); }
.mp-cover-art { width: 100%; height: 100%; display: block; }
.mp-info { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -0.02em; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mp-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-pill { max-width: 100%; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: #A8260F; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-model { font-size: 14px; font-weight: 500; color: var(--sec); }
.mp-controls { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mp-play { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: #D9381E; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgba(217, 56, 30, 0.3); transition: transform .15s, background .15s; }
.mp-play:hover { background: #E63E20; transform: scale(1.05); }
.mp-play:focus-visible { outline: 3px solid #0B0D12; outline-offset: 2px; }
.mp-ic { width: 22px; height: 22px; fill: currentColor; }
.mp-ic-pause, .is-playing .mp-ic-play { display: none; }
.is-playing .mp-ic-pause { display: block; }
.mp-wave { position: relative; flex: 1 1 auto; min-width: 60px; height: 36px; }
.mp-wave-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-wave-svg.is-base { fill: #C3C8D4; }
.mp-wave-svg.is-on { fill: #D9381E; }
.mp-wave-fill { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--mp, 0%)) 0 0); pointer-events: none; }
.mp-seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; touch-action: pan-y; }
.mp-wave:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.mp-time { flex: 0 0 auto; display: inline-flex; gap: 3px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--sec); white-space: nowrap; }
.mp-time > span:first-child { color: var(--text); }
.mp-audio { display: none; }
.mp-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-acts .mw-act { min-height: 40px; }
.mp-acts .mw-act.is-icon { flex: 0 0 40px; padding: 0; }
@media (max-width: 420px) { .mp-cover { width: 76px; height: 76px; } .mp-title { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .mp-play { transition: none; } .mp-play:hover { transform: none; } }
.suno-track-audio { max-width: 100%; }
/* Живой результат генерации: видео в инспекторе, фото в просмотре */
.v-result-box[hidden] { display: none; }
.v-result-box { display: flex; flex-direction: column; gap: 10px; }
.v-result-video { width: 100%; max-height: 62vh; border-radius: 14px; border: 1px solid var(--border-str); background: #000; display: block; }
.v-result-status { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px dashed var(--border-str); font-size: 14px; color: var(--sec); }
.v-result-status.is-err { border-color: rgba(220, 38, 38, 0.5); color: #A51212; }
.v-result-spin { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid rgba(11, 13, 18, 0.1); border-top-color: var(--lime); animation: v-result-spin 0.9s linear infinite; }
@keyframes v-result-spin { to { transform: rotate(360deg); } }
/* Долгое нажатие на готовое фото на iPhone/Android должно открывать родное «Сохранить в Фото». */
.hf-photo-card img, .v-card img, #assetModalImg, .mw-media img { -webkit-touch-callout: default; }
a.is-dl-busy { pointer-events: none; opacity: 0.72; cursor: progress; }
.v-result-dl { display: block; width: 100%; text-align: center; text-decoration: none; box-sizing: border-box; }
.hf-photo-card.is-fresh { outline: 2px solid var(--lime); outline-offset: -2px; }
.hf-photo-pending {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 20px 16px; text-align: center; cursor: default;
  background: linear-gradient(135deg, var(--surface) 0%, var(--subtle) 50%, var(--surface) 100%);
  background-size: 220% 220%;
  outline: 2px solid var(--lime); outline-offset: -2px;
  animation: hf-photo-shimmer 2.2s ease-in-out infinite;
}
@keyframes hf-photo-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hf-photo-pending-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(11, 13, 18, 0.1); border-top-color: var(--lime);
  animation: v-result-spin 0.85s linear infinite;
}
.hf-photo-pending-badge {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--lime); text-transform: uppercase;
}
.hf-photo-pending-model { font-size: 14px; font-weight: 700; color: var(--text); }
.hf-photo-pending-prompt {
  font-size: 14px; color: var(--sec); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 100%;
}
.hf-photo-pending-timer {
  font-size: 14px; font-weight: 700; color: var(--text);
  padding: 4px 10px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border-str);
}
.hf-photo-pending-hint { font-size: 14px; color: var(--mut); }
/* Центральное окно генерации (Видео / Фото / Suno) с прогресс-баром и примерным временем */
.v2-gen-stage[hidden] { display: none; }
.v2-gen-stage {
  width: 100%; max-width: 720px; margin: 0 auto 18px;
  border-radius: 20px; padding: 20px;
  background: linear-gradient(145deg, var(--subtle) 0%, var(--subtle) 50%, var(--surface) 100%);
  border: 1.5px solid rgba(11, 13, 18, 0.193);
  box-shadow: 0 20px 60px rgba(11, 13, 18, 0.136), 0 0 0 1px rgba(11, 13, 18, 0.042) inset;
  display: flex; flex-direction: column; gap: 14px;
}
.v2-gen-stage.is-photo { max-width: 560px; margin: 8px auto 18px; }
.v2-gen-stage.is-compact { max-width: 100%; margin: 0; padding: 16px; }
.v2-gen-stage.is-err { border-color: rgba(220, 38, 38, 0.6); }
.v2-gen-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.v2-gen-stage-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--lime); letter-spacing: 0.04em;
}
.v2-gen-stage-eta {
  font-size: 14px; font-weight: 600; color: var(--text);
  padding: 4px 11px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border-str);
}
.v2-gen-stage-frame {
  position: relative; width: 100%; min-height: 220px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(125deg, var(--surface) 0%, var(--elevated) 45%, var(--surface) 100%);
  background-size: 220% 220%; animation: hf-photo-shimmer 2.4s ease-in-out infinite;
  border: 1px solid var(--border-str);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 18px; text-align: center;
}
.v2-gen-stage.is-compact .v2-gen-stage-frame { min-height: 110px; padding: 16px; }
.v2-gen-stage-pct { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); }
.v2-gen-stage-prompt { font-size: 14px; color: var(--sec); max-width: 520px; line-height: 1.45; }
.v2-gen-bar-track {
  width: 100%; height: 8px; border-radius: 999px; background: rgba(11, 13, 18, 0.09); overflow: hidden;
}
.v2-gen-bar-fill {
  height: 100%; width: 6%; border-radius: 999px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--lime) 100%);
  transition: width 0.8s ease;
}
.v2-gen-stage-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 14px; color: var(--sec);
}
.v2-gen-stage-media { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 14px; background: #000; display: block; border: 1px solid var(--border-str); }
.v2-gen-stage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.v2-gen-stage-actions > * { flex: 1; min-width: 160px; }
.suno-presets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.suno-preset-card {
  text-align: left; padding: 14px; border-radius: 16px; background: var(--canvas); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px; transition: border-color .18s, transform .18s;
}
.suno-preset-card:hover { border-color: var(--lime); transform: translateY(-2px); }
.suno-preset-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.suno-preset-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); }
.suno-preset-desc { font-size: 14px; color: var(--sec); line-height: 1.45; }

.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--sec); transition: .15s; white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--border-str); color: var(--text); }
.btn-credits {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--ai-soft); color: var(--accent-ink); border: 1px solid rgba(217, 56, 30, 0.18); transition: .15s; white-space: nowrap;
}
.btn-credits.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.btn-prof {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 5px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--subtle); border: 1px solid var(--border); transition: .15s; white-space: nowrap;
}
.btn-prof.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.btn-prof img { width: 24px; height: 24px; border-radius: 999px; object-fit: cover; }

.btn-lime {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, var(--lime) 0%, var(--lime) 100%); color: var(--on-lime);
  box-shadow: 0 4px 22px rgba(11, 13, 18, 0.072);
  transition: transform .16s, box-shadow .2s, filter .15s;
}
.btn-lime::after {
  content: ''; position: absolute; top: 0; left: 0; width: 42%; height: 100%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: btnShine 4.2s ease-in-out infinite;
}
.btn-lime:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(11, 13, 18, 0.132); }
.btn-ai {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent) 100%); color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(217, 56, 30, 0.18); transition: .18s;
}
.btn-ai:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(217, 56, 30, 0.3); }
.btn-dark {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: var(--subtle); color: var(--text); border: 1px solid var(--border-str); transition: .15s;
}
.btn-dark:hover { border-color: var(--text); }
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: rgba(220, 38, 38, 0.12); color: var(--danger); border: 1px solid rgba(220, 38, 38, 0.4); transition: .15s;
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.2); }

/* Screens */
.screen { display: none; padding: 24px 32px 44px; max-width: 1440px; width: 100%; margin: 0 auto; flex: 1; }
.screen.active { display: block; animation: screenIn .24s cubic-bezier(.22,1,.36,1); }
.screen.full-bleed { padding: 0; max-width: none; }

/* Mobile / TMA Bottom Tab Bar */
.mobile-tabbar { display: none; }
.mtab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--sec); }
.mtab.active { background: var(--lime); color: var(--on-lime); }
.mtab.ai-mtab.active { background: var(--ai); color: #FFFFFF; }

/* Models Value-Prop Strip on Explore */
.models-strip-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(11, 13, 18, 0.024) 0%, rgba(255, 255, 255, 0.92) 45%, rgba(217, 56, 30, 0.04) 100%);
  border: 1px solid rgba(11, 13, 18, 0.1);
}
.models-strip-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.models-strip-text { font-size: 14px; color: var(--sec); line-height: 1.4; }
.models-strip-text strong { color: var(--text); font-weight: 700; }
.models-strip-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.models-strip-links .chip { padding: 5px 11px; font-size: 14px; border-color: rgba(11, 13, 18, 0.14); }
.models-strip-links .chip:hover { border-color: var(--lime); color: var(--lime); }

.s20-hero-panel { scroll-margin-top: 76px; }
.s20-hero-panel.is-focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217, 56, 30, 0.175), 0 18px 50px rgba(11, 13, 18, 0.099); transition: border-color .25s, box-shadow .25s; }
.tag-sm { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; padding: 2px 6px; border-radius: 999px; }

/* Section Header */
.sec-hdr { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.sec-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); color: var(--sec); border: 1px solid var(--border); transition: .15s;
}
.chip:hover { color: var(--text); border-color: var(--border-str); }
.chip.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); font-weight: 700; }
.chip.ai-active { background: var(--ai); color: #FFFFFF; border-color: var(--ai); }
.chip[hidden], [hidden] { display: none !important; }

/* 4-Col Variable Masonry */
.masonry-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.m-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.v-card {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1); background: #000; cursor: pointer;
  transition: transform .24s cubic-bezier(.22,1,.36,1), border-color .22s, box-shadow .24s;
}
.v-card:hover {
  transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 42px rgba(0,0,0,0.65), 0 0 24px rgba(255, 255, 255, 0.16);
}
.v-card img, .v-card video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .55s cubic-bezier(.22,1,.36,1); }
.v-card:hover img, .v-card:hover video { transform: scale(1.06); }
.v-card:hover .v-recreate { box-shadow: 0 0 18px rgba(255, 255, 255, 0.65); transform: scale(1.05); }
.v-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(9,9,11,0.08) 0%, rgba(9,9,11,0) 42%, rgba(9,9,11,0.92) 100%);
}
.v-top {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(9,9,11,0.74); backdrop-filter: blur(8px);
  padding: 4px 9px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff;
}
.v-bot { position: absolute; bottom: 12px; left: 12px; right: 12px; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.v-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 600; color: #fff; }
.v-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: #C4C4CC; font-weight: 500; }
.v-recreate {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: var(--lime); color: var(--on-lime); transition: .15s;
}
.v-pick-subtle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(24, 24, 32, 0.86); color: #F5F6F8; border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px); transition: border-color .15s, background .15s;
}
.v-card:hover .v-pick-subtle { border-color: var(--lime); color: var(--lime); }

.tools-with-dock { padding-bottom: 165px; }
.float-composer {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 35;
  width: min(920px, calc(100vw - 32px)); margin: 0;
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(18px);
  border: 1px solid rgba(11, 13, 18, 0.119); border-radius: 22px; padding: 14px 16px;
  box-shadow: 0 22px 60px rgba(11, 13, 18, 0.18); display: flex; flex-direction: column; gap: 10px;
}
.photo-prompt-input {
  flex: 1; min-width: 140px; min-height: 40px; padding: 8px 12px;
  background: var(--canvas); border: 1px solid var(--border-str); border-radius: 12px;
  color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.photo-prompt-input:focus { border-color: var(--lime); }
.v2-select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border-str);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600;
  outline: none; cursor: pointer;
}
.v2-select:focus { border-color: var(--lime); }
#photoMoreWrap[hidden] { display: none; }
.agent-shell { display: grid; grid-template-columns: 230px 1fr 340px; gap: 18px; min-height: calc(100vh - 150px); }
.lib-shell { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.side-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--sec); text-align: left; transition: .15s;
}
.side-link:hover { color: var(--text); background: var(--subtle); }
.side-link.active { background: var(--elevated); color: var(--text); border: 1px solid var(--border-str); }
.mcp-agents { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.mcp-agent-tab {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--sec); transition: .15s;
}
.mcp-agent-tab.active { background: var(--lime); color: var(--on-lime); border-color: var(--text); font-weight: 700; }

/* Aurora Gradients for Pricing & Top-Up */
.pink-badge {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(90deg, #FF2E93, #E11D74); color: #fff; font-size: 14px; font-weight: 800;
}


/* Clean 2-Column Video Workspace (Inspector opens as 3rd column on first result) */
.video-grid { display: grid; grid-template-columns: 400px 1fr; min-height: calc(100vh - 64px); }
.video-grid.has-result { grid-template-columns: 370px 1fr 320px; }
.v-sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.v-prompt-card {
  background: var(--canvas); border: 1px solid var(--border-str); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s;
}
.v-prompt-card:focus-within { border-color: var(--lime); }
.v-prompt-textarea {
  width: 100%; min-height: 148px; background: none; border: none; color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.55; resize: vertical; outline: none;
}
.v-prompt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border); }
.v-settings-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-settings-row .chip { padding: 7px 14px; font-size: 14px; }
.v-more-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 12px; background: var(--subtle); border: 1px solid var(--border);
  color: var(--sec); font-size: 14px; font-weight: 600; transition: border-color .15s, color .15s;
}
.v-more-toggle:hover { color: var(--text); border-color: var(--border-str); }
.v-more-box { display: flex; flex-direction: column; gap: 12px; }
.v-more-box[hidden], .v-inspector[hidden] { display: none; }
.v-inspector {
  background: var(--surface); border-left: 1px solid var(--border);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.v-center {
  padding: 20px 24px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 18px; min-width: 0;
}
.preset-hero {
  position: relative; height: 102px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-str);
}
.preset-hero img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5); }
.preset-hero-body { position: absolute; inset: 10px; display: flex; flex-direction: column; justify-content: space-between; }
.mix-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mix-card {
  position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--lime);
  background: #0B0B0E; display: flex; flex-direction: column;
}
.mix-card-img { position: relative; height: 92px; }
.mix-card-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.58); }
.mix-card-title {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 6px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 800; color: var(--lime);
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}
.mix-card-del {
  position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 999px;
  background: rgba(9,9,11,0.85); color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.mix-slider-wrap { padding: 6px 8px; background: var(--subtle); display: flex; align-items: center; gap: 6px; }
.mix-slider-wrap input[type=range] { flex: 1; accent-color: var(--lime); height: 3px; }
.mix-slider-wrap span { font-size: 14px; color: var(--sec); min-width: 26px; text-align: right; }

/* Cinema Studio 4.0 Camera Setup Modal */
.cam-modal-body { display: grid; grid-template-columns: 150px 1fr; gap: 18px; min-height: 360px; }
.cam-nav { display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--border); padding-right: 14px; }
.cam-nav-btn {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--sec); text-align: left; transition: .15s;
}
.cam-nav-btn.active { background: var(--elevated); color: var(--text); border: 1px solid var(--border-str); }
.wheel-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wheel-col { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.wheel-label { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; color: var(--mut); }
.wheel-item {
  width: 100%; padding: 12px 10px; border-radius: 24px; text-align: center;
  background: var(--subtle); border: 1.5px solid var(--border); color: var(--sec);
  font-size: 14px; font-weight: 600; transition: .15s; cursor: pointer;
}
.wheel-item:hover { border-color: var(--border-str); color: var(--text); }
.wheel-item.active { background: var(--elevated); border-color: var(--text); color: var(--text); box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.move-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.move-card {
  position: relative; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--border);
  background: var(--subtle); cursor: pointer; transition: .15s;
}
.move-card:hover { border-color: var(--lime); }
.move-card img { width: 100%; height: 92px; object-fit: cover; display: block; filter: brightness(0.75); }
.move-put {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--lime); color: var(--on-lime); font-size: 14px; font-weight: 800;
  padding: 4px 8px; border-radius: 999px; opacity: 0.92;
}
.move-name { padding: 6px; text-align: center; font-size: 14px; font-weight: 600; color: var(--text); }
.dropzone {
  background: var(--subtle); border: 1px dashed var(--border-str); border-radius: 14px;
  padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: .15s; text-align: center;
}
.dropzone:hover { border-color: var(--lime); background: var(--elevated); }
.ref-circles { display: flex; align-items: center; }
.ref-circle {
  width: 38px; height: 38px; border-radius: 999px; background: var(--elevated); border: 1.2px solid #404052;
  display: flex; align-items: center; justify-content: center; margin-left: -6px; color: var(--text);
}
.ref-circle:first-child { margin-left: 0; }
.selected-refs { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; justify-content: center; margin-top: 4px; }
.sel-ref-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px;
  border-radius: 999px; background: var(--subtle); border: 1px solid var(--lime); font-size: 14px; font-weight: 600; color: var(--lime);
}
.sel-ref-chip img { width: 20px; height: 20px; border-radius: 999px; object-fit: cover; }

.box-subtle { background: var(--subtle); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.player-frame {
  width: 356px; max-width: 100%; height: 590px; border-radius: 22px; overflow: hidden; position: relative;
  border: 1px solid var(--border-str); background: #050507; display: flex; flex-direction: column;
}
.player-frame img { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
.sub-pill {
  position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: rgba(9,9,11,0.84); padding: 7px 14px; border-radius: 10px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: var(--lime);
  max-width: 90%; overflow: hidden; text-overflow: ellipsis;
}
.player-bar { background: var(--subtle); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.p-track { height: 4px; border-radius: 99px; background: var(--border-str); overflow: hidden; }
.p-fill { width: 62%; height: 100%; background: var(--lime); }
.filmstrip { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; }
.filmstrip img { width: 62px; height: 88px; border-radius: 10px; object-fit: cover; cursor: pointer; border: 2px solid transparent; opacity: 0.72; transition: .15s; flex-shrink: 0; }
.filmstrip img.active, .filmstrip img:hover { border-color: var(--lime); opacity: 1; }

/* Calendar Screen */
.cal-layout { display: grid; grid-template-columns: 1fr 420px; min-height: calc(100vh - 64px); }
.cal-main { padding: 22px 24px 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.soc-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.soc-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.soc-card.on { border-color: rgba(5, 150, 105, 0.45); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; flex: 1; }
.cal-days.week-view { gap: 10px; }
.day-col {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px; min-height: 122px; cursor: pointer; transition: .15s; min-width: 0;
}
.day-col:hover { border-color: var(--border-str); }
.day-col.selected-day { border-color: var(--lime); background: var(--subtle); }
.day-num { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; }
.mini-slot {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px;
  background: var(--subtle); border: 1px solid var(--border-str); font-size: 14px; min-width: 0;
}
.mini-slot.done { border-color: rgba(5, 150, 105, 0.45); }
.mini-slot img { width: 22px; height: 28px; border-radius: 5px; object-fit: cover; flex-shrink: 0; }
.slot-card {
  background: var(--subtle); border: 1px solid var(--border-str); border-radius: 12px; padding: 9px;
  display: flex; flex-direction: column; gap: 6px;
}
.slot-card.done { border-color: rgba(5, 150, 105, 0.45); }
.slot-card img { width: 100%; height: 96px; object-fit: cover; border-radius: 8px; }
.cal-drawer {
  background: var(--surface); border-left: 1px solid var(--border); padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
}
.vid-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.vp-item { cursor: pointer; text-align: center; }
.vp-thumb { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid transparent; height: 112px; }
.vp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vp-item.selected .vp-thumb { border-color: var(--lime); }
.vp-check {
  display: none; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px;
  border-radius: 999px; background: var(--lime); color: var(--on-lime); align-items: center; justify-content: center;
}
.vp-item.selected .vp-check { display: flex; }

/* Panels & Grids */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px; min-width: 0; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Modals */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(11, 13, 18, 0.426); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 740px; background: var(--surface); border: 1px solid var(--border-str);
  border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 16px;
  max-height: 90vh; overflow-y: auto;
}
.modal.modal-sm { max-width: 480px; }
.modal.modal-wide { max-width: min(1060px, 94vw); padding: 26px; }
#refModal .modal.modal-wide { max-width: min(1220px, 96vw); width: 96vw; max-height: 92vh; overflow-y: auto; }
.modal.modal-wide .media-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
#refGrid.media-grid { overflow-y: auto; flex: 1 1 auto; max-height: 60vh; min-height: 140px; align-content: start; padding: 2px 6px 6px 2px; overscroll-behavior: contain; }
.ref-upload-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ref-upload-top { border-color: rgba(217, 56, 30, 0.4); background: var(--accent-soft); color: #A8260F; font-weight: 700; white-space: nowrap; }
.ag-card-prompt-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.ag-card-prompt-tools .btn-dark { padding: 5px 12px; font-size: 14px; }
.ref-upload-top:hover { background: #FFE2DA; border-color: var(--accent); }
.ref-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ref-search { flex: 1 1 220px; min-width: 160px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-str); background: var(--subtle); color: var(--text); font: inherit; font-size: 14px; }
.ref-search:focus { outline: none; border-color: var(--accent); background: var(--canvas); }
.ref-counter { font-size: 14px; font-weight: 700; color: var(--sec); padding: 6px 11px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border); white-space: nowrap; }
.ref-counter.has-picked { background: var(--accent-soft); border-color: rgba(217, 56, 30, 0.35); color: #A8260F; }
.ref-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 36px 20px; border-radius: 16px; background: var(--subtle); border: 1px dashed var(--border-str); color: var(--sec); font-size: 14px; line-height: 1.5; }
.sel-ref-rm { background: none; border: none; color: var(--sec); font-size: 15px; line-height: 1; padding: 0 2px 0 4px; cursor: pointer; }
.sel-ref-rm:hover { color: var(--accent-ink); }
.modal.modal-wide .m-pick { height: 175px; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-pick {
  position: relative; border-radius: 12px; overflow: hidden; height: 150px; cursor: pointer;
  border: 2px solid transparent; transition: .15s;
}
.m-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-pick.picked { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217, 56, 30, 0.25); }
.m-pick-tag {
  position: absolute; bottom: 6px; left: 6px; right: 6px; background: rgba(9,9,11,0.82);
  padding: 4px 8px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}

/* Support Modal & Channels */
.support-list { display: flex; flex-direction: column; gap: 10px; }
.support-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--subtle); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.support-item:hover { border-color: var(--lime); background: var(--elevated); }
.support-item-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.support-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--elevated);
  border: 1px solid var(--border-str); display: flex; align-items: center; justify-content: center; color: var(--lime); flex-shrink: 0;
}
.support-label { font-weight: 700; font-size: 14px; color: var(--text); }
.support-val { font-size: 14px; color: var(--sec); word-break: break-all; }

/* Auth inputs */
.v2-input {
  width: 100%; background: var(--canvas); border: 1px solid var(--border-str); border-radius: 12px;
  padding: 11px 13px; color: var(--text); font: inherit; font-size: 14px; outline: none;
}
.v2-input:focus { border-color: var(--lime); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.92);
  padding: 18px 32px; margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 14px; color: var(--sec);
}
.footer-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-link { color: var(--sec); transition: color .15s; display: inline-flex; align-items: center; gap: 5px; }
.footer-link:hover { color: var(--lime); }

.asset-modal-grid { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  background: var(--lime); color: var(--on-lime); font-weight: 700; font-size: 14px;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 12px 32px rgba(11, 13, 18, 0.11);
  display: none; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
}
.toast.show { display: flex; }

/* Responsive Breakpoints (Tablet 901–1260px & Mobile / iPhone 390px / Telegram Mini App) */
@media (max-width: 1260px) {
  .topnav { padding: 0 14px; gap: 8px; }
  .pill-new, .support-btn-label { display: none; }
  .video-grid { grid-template-columns: 310px 1fr; }
  .v-inspector { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--border); }
  .agent-shell { grid-template-columns: 200px 1fr; }
  .agent-shell > div:last-child { grid-column: 1 / -1; }
  .suno-shell { grid-template-columns: 360px 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
  .cal-drawer { border-left: none; border-top: 1px solid var(--border); }
}

@media (max-width: 1024px) {
  .topnav { height: 56px; padding: 0 10px; gap: 6px; }
  .brand-name { font-size: 16px; }
  .nav-tabs { gap: 2px; padding: 3px; }
  .nav-tab .ic { width: 13px; height: 13px; }
  .btn-prof { padding: 3px 8px 3px 4px; font-size: 14px; gap: 5px; }
  .support-btn-label { display: none; }
}

@media (max-width: 760px) {
  .topnav { height: 54px; padding: 0 12px; gap: 8px; }
  .brand-name { font-size: 16px; }
  .nav-tabs, .pill-new, .support-btn-label { display: none; }
  .mobile-tabbar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(16px);
    border-top: 1px solid var(--border); padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .screen { padding: 16px 14px 92px; }
  .screen.full-bleed { padding: 12px 14px 92px; }
  .tools-with-dock { padding-bottom: 225px; }
  .float-composer { bottom: 64px; width: calc(100vw - 20px); padding: 12px; border-radius: 18px; }
  .site-footer { padding: 14px 14px 86px; }
}

@media (max-width: 900px) {
  .btn-credits { padding: 6px 10px; font-size: 14px; }
  .btn-ghost { padding: 6px 9px; font-size: 14px; }
  .screen { padding: 14px 12px 92px; }
  .screen.full-bleed { padding: 12px 12px 92px; }
  .site-footer { padding: 14px 12px 86px; font-size: 14px; }
  .sec-title { font-size: 14px; }
  .masonry-4, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .m-col { gap: 10px; }
  .grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .video-grid, .video-grid.has-result { grid-template-columns: 1fr; gap: 14px; min-height: auto; }
  .v-sidebar, .v-inspector { border: 1px solid var(--border); border-radius: 18px; }
  .v-center { padding: 0; }
  .v-presets-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .player-frame { width: 100%; height: 420px; }
  .agent-shell, .lib-shell, .suno-shell { grid-template-columns: 1fr; }
  .suno-tracks-pane { position: static; }
  .suno-tracks-scroll { max-height: 460px; }
  .suno-studio-main { order: -1; }
  .suno-top-controls { grid-template-columns: 1fr; }
  .suno-hero-bar { padding: 16px; border-radius: 18px; }
  .suno-presets-grid { grid-template-columns: 1fr; }
  .mtab { padding: 6px 4px; font-size: 14px; white-space: nowrap; }
  .cal-main { padding: 0; }
  .cal-drawer { border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
  .soc-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .cal-days { grid-template-columns: repeat(2, 1fr); }
  .vid-picker { grid-template-columns: repeat(2, 1fr); }
  .cam-modal-body { grid-template-columns: 1fr; }
  .cam-nav { border-right: none; border-bottom: 1px solid var(--border); padding: 0 0 10px; flex-direction: row; }
  .wheel-cols { grid-template-columns: 1fr; }
  .move-grid { grid-template-columns: repeat(2, 1fr); }
  .media-grid, .modal.modal-wide .media-grid { grid-template-columns: repeat(2, 1fr); }
  .asset-modal-grid { grid-template-columns: 1fr; }
  .toast { bottom: 78px; right: 12px; left: 12px; justify-content: center; }
  .mcp-hero-stage { padding: 22px 14px; }
}

/* MCP: живые подключения (GET/POST/DELETE /api/v2/mcp/tokens) */
.mcp-tokens-panel { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.mcp-tokens-hdr { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.mcp-tokens-sub { color: var(--sec); font-size: 14px; margin-top: 4px; }
.mcp-small-btn { padding: 8px 14px; font-size: 14px; }
.mcp-issued { border: 1px solid rgba(11, 13, 18, 0.158); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mcp-issued[hidden] { display: none; }
.mcp-issued-warn { color: var(--lime); font-size: 14px; font-weight: 600; }
.mcp-cmd { margin: 0; padding: 10px; border-radius: 8px; background: var(--subtle); border: 1px solid var(--border); font-size: 14px; white-space: pre-wrap; word-break: break-all; user-select: all; }
.mcp-issued-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Клиент пока нельзя подключить (ChatGPT, Telegram): в блоке только пояснение, без токена и кнопок копирования. */
.mcp-issued-note .mcp-issued-warn, .mcp-issued-note [data-act^="copyMcp"] { display: none; }
.mcp-issued-note .mcp-cmd { white-space: pre-wrap; font-family: inherit; }
/* Несколько способов подключения: каждый блок со своей кнопкой копирования, общие кнопки команды и JSON скрыты. */
.mcp-issued-multi #mcpIssuedCmd, .mcp-issued-multi [data-act="copyMcpCmd"], .mcp-issued-multi [data-act="copyMcpJson"] { display: none; }
.mcp-parts { display: flex; flex-direction: column; gap: 12px; }
.mcp-parts[hidden] { display: none; }
.mcp-part { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.mcp-part .mcp-cmd { align-self: stretch; }
.mcp-part-label { color: var(--sec); font-size: 14px; }
/* Вход через OAuth (ChatGPT, Claude): токена нет — предупреждение «показан 1 раз» не нужно. */
.mcp-issued-oauth .mcp-issued-warn { display: none; }
.mcp-tokens-list { display: flex; flex-direction: column; gap: 8px; }
.mcp-tokens-empty { color: var(--sec); font-size: 14px; padding: 10px 0; }
.mcp-token-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.mcp-token-name { font-weight: 700; font-size: 14px; }
.mcp-token-sub { color: var(--sec); font-size: 14px; margin-top: 2px; }

/* SEEDANCE 2.0 · Flagship 4x4 Hero Showcase Panel (Higgsfield-grade clean visual grid) */
.s20-hero-panel {
  border-radius: 24px;
  border: 1px solid rgba(11, 13, 18, 0.1);
  background: radial-gradient(ellipse at 20% 0%, rgba(11, 13, 18, 0.033) 0%, rgba(255, 255, 255, 0.96) 52%, var(--subtle) 100%);
  padding: 24px;
  margin-bottom: 34px;
  box-shadow: 0 24px 64px rgba(11, 13, 18, 0.121);
}
.s20-hero-top {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-bottom: 18px;
}
.s20-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
  background: rgba(11, 13, 18, 0.042); border: 1px solid rgba(11, 13, 18, 0.133);
  color: var(--lime); font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.s20-title {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--text);
}
.s20-title span { color: var(--lime); }
.s20-top-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--lime); color: var(--on-lime);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 900;
  letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 0 18px rgba(11, 13, 18, 0.126);
}
.s20-sub { color: var(--sec); font-size: 14px; margin-top: 8px; max-width: 640px; }
.s20-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.s20-grid-16 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start;
}
.s20-col {
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.s20-tile {
  position: relative; width: 100%; height: 280px; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1); background: #000; cursor: pointer;
  transition: transform .22s cubic-bezier(.22,1,.36,1), border-color .2s, box-shadow .22s;
}
.s20-tile.h-tall  { height: 360px; }
.s20-tile.h-med   { height: 280px; }
.s20-tile.h-short { height: 215px; }
.s20-tile:hover {
  transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.68), 0 0 22px rgba(255, 255, 255, 0.18);
}
.s20-tile img, .s20-tile video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.s20-tile:hover img, .s20-tile:hover video { transform: scale(1.05); }
.s20-tile-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 10px;
  background: linear-gradient(180deg, rgba(9,9,11,0.12) 0%, transparent 45%, rgba(9,9,11,0.88) 100%);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.s20-tile:hover .s20-tile-overlay, .s20-tile:focus-visible .s20-tile-overlay { opacity: 1; }
.s20-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.s20-badge {
  background: rgba(9,9,11,0.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.14); color: #fff;
  padding: 3px 8px; border-radius: 999px; font-size: 14px; font-weight: 700;
}
.s20-live-dot {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 3px 7px; border-radius: 999px; font-size: 14px; font-weight: 800; letter-spacing: 0.04em;
  background: rgba(9, 9, 11, 0.72); border: 1px solid rgba(255, 255, 255, 0.5); color: var(--lime);
  backdrop-filter: blur(6px);
}
.s20-tile-name { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3; }
.s20-tile-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 14px; color: #C4C4CC; }
.s20-tile-pill { background: var(--lime); color: var(--on-lime); font-weight: 800; padding: 3px 9px; border-radius: 999px; font-size: 14px; }

/* Showcase Video Detail Modal — Full-Screen Cinema Theater (1-in-1 Higgsfield layout) */
#showcaseDetailModal {
  padding: 0;
  background: rgba(5, 5, 7, 0.94);
  backdrop-filter: blur(18px);
}
.s20-modal-box {
  width: 100vw; height: 100vh; max-width: none; max-height: none; overflow: hidden;
  background: radial-gradient(circle at 38% 50%, #24262e 0%, #0d0e12 58%, #070709 100%);
  border: none; border-radius: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 390px; gap: 0;
}
.s20-modal-media {
  position: relative; width: 100%; height: 100vh; overflow: hidden; background: transparent;
  border: none; border-radius: 0; padding: 18px 22px;
  display: flex; align-items: center; justify-content: center;
}
.s20-modal-media.is-fill { padding: 0; }
.s20-modal-media video, .s20-modal-media img {
  width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 36px);
  object-fit: contain; display: block; border-radius: 14px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.78);
  background: #000;
}
.s20-modal-media video.s20-aspect-wide, .s20-modal-media img.s20-aspect-wide {
  width: 100%; height: auto;
}
.s20-modal-media video.s20-aspect-tall, .s20-modal-media img.s20-aspect-tall {
  height: calc(100vh - 36px); width: auto;
}
.s20-modal-media video.s20-fill-stage, .s20-modal-media img.s20-fill-stage {
  width: 100%; height: 100vh; max-height: 100vh; object-fit: cover; border-radius: 0; box-shadow: none;
}
/* Кнопки просмотрщика лежат в самом окне, а не внутри ролика: «На весь экран» — слева вверху, «Закрыть» — справа вверху.
   Они не прокручиваются вместе с описанием и на телефоне стоят в отдельной полосе над роликом (см. @media ниже). */
.s20-fill-btn {
  position: absolute; top: 22px; left: 26px; z-index: 6;
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; max-width: calc(100% - 120px);
  padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: rgba(9, 9, 11, 0.72); border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff; font-size: 14px; font-weight: 700; backdrop-filter: blur(8px);
  transition: border-color .18s, color .18s, background .18s;
}
.s20-fill-btn:hover { border-color: var(--lime); color: var(--lime); }
.s20-fill-btn.active { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.s20-btn-ic { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.s20-close-btn {
  position: absolute; top: 14px; right: 16px; z-index: 7;
  width: 46px; height: 46px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(255, 59, 92, 0.22), rgba(255, 59, 92, 0.22)), rgba(9, 9, 11, 0.82);
  border: 1.5px solid #FF3B5C; color: #fff; backdrop-filter: blur(10px);
  box-shadow: 0 0 0 4px rgba(255, 59, 92, 0.16), 0 0 22px rgba(255, 59, 92, 0.45), 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: background .18s, transform .18s;
}
.s20-close-btn:hover, .s20-close-btn:focus-visible { background: #FF3B5C; transform: scale(1.06); outline: none; }
.s20-close-ic { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)); }
.s20-modal-head { min-width: 0; padding-right: 58px; min-height: 40px; }
.s20-modal-title { font-size: 16px; font-weight: 800; color: #fff; }
.s20-modal-sub { font-size: 14px; color: var(--sec); margin-top: 4px; }
.s20-prompt-head { display: flex; justify-content: space-between; align-items: center; }
.s20-prompt-label { font-size: 14px; color: var(--sec); text-transform: uppercase; letter-spacing: 0.06em; }
.s20-modal-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.s20-modal-cta .btn-lime { flex: 1; }
.s20-modal-info {
  height: 100vh; overflow-y: auto; padding: 22px 20px;
  background: rgba(16, 16, 20, 0.96); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
}
.s20-modal-prompt {
  flex: 1; min-height: 160px; overflow-y: auto;
  padding: 14px; border-radius: 14px; background: #09090B; border: 1px solid var(--border);
  font-size: 14px; line-height: 1.55; color: #D4D4DC; white-space: pre-wrap;
}
.s20-modal-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.s20-spec-chip {
  padding: 5px 10px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border);
  font-size: 14px; color: var(--sec); font-weight: 600;
}
.s20-orig-badge { color: #fff; border-color: rgba(255, 255, 255, 0.28); }
@media (max-width: 900px) {
  .s20-hero-panel { padding: 14px; border-radius: 18px; margin-bottom: 22px; }
  .s20-title { font-size: 18px; }
  .s20-grid-16 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .s20-col { gap: 8px; }
  .s20-tile.h-tall  { height: 245px; }
  .s20-tile.h-med   { height: 195px; }
  .s20-tile.h-short { height: 155px; }
  .s20-tile-overlay { opacity: 1; justify-content: flex-end; background: linear-gradient(180deg, transparent 48%, rgba(9,9,11,0.92) 100%); padding: 8px; }
  .s20-tile-top { display: none; }
  /* Телефон: над роликом своя полоса 64px с двумя кнопками — они не ложатся ни друг на друга, ни на родные кнопки плеера iOS/Android. */
  #showcaseDetailModal { align-items: stretch; padding-top: calc(64px + env(safe-area-inset-top, 0px)); }
  .s20-modal-box { display: block; width: 100%; height: 100%; overflow-y: auto; }
  .s20-modal-media { height: auto; min-height: 46vh; padding: 14px; }
  .s20-modal-media.is-fill { height: 74vh; min-height: 74vh; padding: 0; }
  .s20-modal-media video, .s20-modal-media img,
  .s20-modal-media video.s20-aspect-tall { max-height: 62vh; height: auto; width: 100%; object-fit: contain; }
  .s20-modal-media video.s20-fill-stage,
  .s20-modal-media img.s20-fill-stage { max-height: 74vh; height: 74vh; width: 100%; object-fit: cover; border-radius: 0; }
  .s20-fill-btn { top: calc(10px + env(safe-area-inset-top, 0px)); left: 14px; max-width: calc(100% - 88px); }
  .s20-close-btn { top: calc(9px + env(safe-area-inset-top, 0px)); right: 14px; }
  .s20-modal-head { padding-right: 0; min-height: 0; }
  .s20-modal-info { height: auto; border-left: none; border-top: 1px solid var(--border); padding: 16px; }
}

/* GEO / FAQ footer on Explore (white-hat static HTML for humans & AI crawlers) */
.v2-geo-footer {
  margin-top: 28px; padding: 24px; border-radius: 20px;
  background: var(--subtle); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 16px;
}
.v2-geo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.v2-geo-lead { margin: 6px 0 0; max-width: 680px; color: var(--sec); font-size: 14px; line-height: 1.5; }
.v2-geo-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.v2-geo-links a { color: var(--sec); text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 2px; }
.v2-geo-links a:hover { color: var(--lime); border-color: var(--lime); }
.v2-geo-faq { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.v2-geo-faq details {
  background: var(--subtle); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--sec);
}
.v2-geo-faq summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; }
.v2-geo-faq summary::-webkit-details-marker { display: none; }
.v2-geo-faq details p { margin: 8px 0 0; }
@media (max-width: 900px) { .v2-geo-faq { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════════════════════
   HIGGSFIELD-GRADE ERGONOMICS UPGRADE (MEGA-MENU · VIDEO · PHOTO · AGENT)
   ═══════════════════════════════════════════════════════════════════════ */

/* 1. Centered Floating Mega-Menu Dropdown */
.nav-mega-panel {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  width: min(920px, calc(100vw - 32px)); z-index: 95;
  background: #FFFFFF;
  border: 1px solid var(--border-str); border-radius: 22px;
  padding: 18px; box-shadow: 0 28px 80px rgba(11, 13, 18, 0.158);
  display: flex; flex-direction: column; gap: 16px;
}
.nav-mega-panel[hidden] { display: none !important; }
.mega-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mega-card {
  background: transparent; border: 1px solid transparent; border-radius: 14px; padding: 6px;
  text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s;
  display: flex; flex-direction: column; gap: 7px; color: var(--text);
}
.mega-card:hover { background: rgba(11, 13, 18, 0.04); border-color: var(--border-str); }
.mega-card img, .mega-card video { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: center 22%; border-radius: 10px; display: block; background: #09090B; }
.mega-card > span { font-size: 14px; font-weight: 600; }
.mega-cards.is-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* SVG-плакаты: Монтаж, Автопостинг, ИИ-Агент, MCP */
.mega-art { width: 100%; aspect-ratio: 16/9; display: block; border-radius: 10px; border: 1px solid var(--border); background: linear-gradient(150deg, #FFFFFF 0%, #F5F6F8 55%, #FFF1EE 100%); }
.mega-art .card { fill: #FFFFFF; stroke: #C3C8D4; stroke-width: 1.5; }
.mega-art .ink { fill: #0B0D12; }
.mega-art .cor { fill: #D9381E; }
.mega-art .soft { fill: #FFD9D0; }
.mega-art .dim { fill: #C3C8D4; }
.mega-art .line, .mega-art .lc, .mega-art .lw, .mega-art .burst { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mega-art .line { stroke: #0B0D12; }
.mega-art .lc { stroke: #D9381E; }
.mega-art .lw { stroke: #FFFFFF; }
.mega-art .burst { stroke: #D97757; stroke-width: 5; }
/* Карточки с текстом: Тарифы, Поддержка, Кабинет */
.mega-card.is-info { align-items: flex-start; text-align: left; gap: 6px; padding: 14px; background: #FFFFFF; border-color: var(--border); }
.mega-card.is-info:hover { border-color: var(--accent); background: #FFFFFF; }
.mega-badge-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.mega-ic { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mega-card-title { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--text); }
.mega-card-sub { font-size: 14px; line-height: 1.35; color: var(--sec); overflow-wrap: anywhere; }
.mega-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 4px 6px; }
.mega-col-title { font-size: 14px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.mega-list { display: flex; flex-direction: column; gap: 4px; }
.mega-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 10px; background: transparent; border: none;
  color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; text-align: left;
}
.mega-item:hover { background: rgba(11, 13, 18, 0.06); }
.mega-badge { font-size: 14px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.mega-badge.is-new { background: rgba(217, 56, 30, 0.1); color: var(--accent-ink); }
.mega-badge.is-top { background: rgba(255, 77, 166, 0.18); color: #A5125C; }
.mega-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 14px; background: rgba(11, 13, 18, 0.03);
  border: 1px solid var(--border); font-size: 14px; color: var(--sec);
}
.mega-banner strong { color: var(--text); }
.mega-banner button { background: none; border: none; color: var(--lime); font-weight: 700; cursor: pointer; font-size: 14px; white-space: nowrap; }

/* 2. Video Studio: 440px Left Rail + Pinned Sticky Bottom CTA + Live Canvas */
.video-grid { grid-template-columns: 440px 1fr; }
.video-grid.has-result { grid-template-columns: 440px 1fr 310px; }
.hf-v-sidebar {
  display: flex; flex-direction: column; padding: 0;
  height: calc(100vh - 64px); position: sticky; top: 64px;
  border-right: 1px solid var(--border); background: var(--subtle);
}
.hf-v-scroll {
  flex: 1; overflow-y: auto; padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.hf-v-sticky-cta {
  padding: 2px 0 0;
}
.hf-v-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.hf-v-tab {
  background: none; border: none; color: var(--sec); font-size: 14px; font-weight: 600;
  padding: 0 0 8px; margin-bottom: -9px; cursor: pointer; border-bottom: 2px solid transparent;
}
.hf-v-tab.active { color: var(--text); border-bottom-color: var(--text); }
.hf-seg-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 3px;
}
.hf-seg-btn {
  background: transparent; border: none; border-radius: 8px; padding: 6px 8px;
  color: var(--sec); font-size: 14px; font-weight: 600; cursor: pointer;
}
.hf-seg-btn.active { background: var(--elevated); color: var(--text); }
.hf-dropzone {
  width: 100%; padding: 14px 12px; border-radius: 14px;
  border: 1px dashed var(--border-str); background: rgba(11, 13, 18, 0.02);
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; color: var(--text);
}
.hf-dropzone:hover { border-color: var(--lime); background: rgba(11, 13, 18, 0.04); }
.hf-dropzone strong { font-size: 14px; font-weight: 700; }
.hf-dropzone span { font-size: 14px; color: var(--sec); }
.hf-dropzone-icons { display: flex; align-items: center; margin-bottom: 4px; }
.hf-dropzone-icons span {
  width: 28px; height: 28px; border-radius: 999px; background: var(--subtle); border: 1px solid var(--border-str);
  display: inline-flex; align-items: center; justify-content: center; margin-left: -6px; color: var(--sec);
}
.hf-dropzone-icons span:first-child { margin-left: 0; }
.hf-field-label { font-size: 14px; font-weight: 600; color: var(--sec); display: block; margin-bottom: 4px; }
.hf-prompt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.hf-params-block { display: flex; flex-direction: column; gap: 8px; }
.hf-model-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; text-align: left;
}
.hf-model-row:hover, .hf-param-tile:hover { border-color: var(--border-str); }
.hf-param-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hf-param-tile {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
}
/* Качество видео: один ряд под длительностью и форматом */
.v-res-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px;
  padding: 3px 4px 3px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
}
.v-res-seg { display: flex; gap: 4px; }
.v-res-btn {
  min-width: 56px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent;
  color: var(--sec); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation;
}
.v-res-btn:hover { background: var(--subtle); }
.v-res-btn.active { background: var(--text); color: var(--surface); }
.v-res-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v-res-badge { padding: 5px 10px; margin-right: 8px; border-radius: 8px; background: var(--subtle); color: var(--text); font-size: 14px; font-weight: 700; }
.hf-tile-valrow { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.hf-tab-pill {
  font-size: 14px; font-weight: 800; padding: 1px 6px; border-radius: 999px;
  background: rgba(11, 13, 18, 0.048); color: var(--lime); margin-left: 4px; vertical-align: middle;
}
.hf-voiced-box {
  background: linear-gradient(180deg, rgba(11, 13, 18, 0.018) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid rgba(11, 13, 18, 0.1); border-radius: 14px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.hf-voiced-box[hidden] { display: none !important; }
.hf-voiced-head { display: flex; flex-direction: column; gap: 2px; }
.hf-voiced-head strong { font-size: 14px; color: var(--lime); }
.hf-voiced-head span { font-size: 14px; color: var(--sec); }
.hf-mini-group { display: flex; flex-direction: column; gap: 5px; }

/* Higgsfield-style Parameter Popovers (Model / Duration / Aspect Ratio) */
.hf-pop-anchor { position: relative; }
.hf-popover {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 80;
  min-width: 180px; width: 100%;
  background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(22px);
  border: 1px solid var(--border-str); border-radius: 16px; padding: 8px;
  box-shadow: 0 22px 60px rgba(11, 13, 18, 0.172);
  display: flex; flex-direction: column; gap: 6px;
}
.hf-popover[hidden] { display: none !important; }
.hf-pop-right { left: auto; right: 0; min-width: 190px; }
.hf-model-pop { width: 404px; max-width: calc(100vw - 32px); max-height: 440px; }
.hf-popover.suno-genre-pop { top: calc(100% + 8px); bottom: auto; width: min(380px, 92vw); }
.hf-pop-search {
  width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; color: var(--text); font-size: 14px; outline: none;
}
.hf-pop-search:focus { border-color: var(--lime); }
.hf-pop-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; max-height: 330px; }
.hf-pop-sec {
  font-size: 14px; font-weight: 700; color: var(--mut); text-transform: uppercase;
  letter-spacing: 0.06em; padding: 6px 8px 2px;
}
.hf-pop-opt {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 10px; background: transparent; border: 1px solid transparent;
  color: var(--text); text-align: left; cursor: pointer; font-size: 14px;
}
.hf-pop-opt:hover { background: rgba(11, 13, 18, 0.06); }
.hf-pop-opt.active { background: rgba(217, 56, 30, 0.1); border-color: rgba(217, 56, 30, 0.5); }
.hf-pop-opt.is-top-glow { background: rgba(255, 77, 166, 0.06); border-color: rgba(217, 56, 30, 0.132); }
.hf-pop-opt.is-top-glow.active { background: rgba(217, 56, 30, 0.1); border-color: rgba(217, 56, 30, 0.5); }
.hf-pop-opt:disabled { opacity: 0.42; cursor: not-allowed; }
.hf-pop-opt-sub { font-size: 14px; color: var(--sec); margin-top: 2px; display: block; }
.hf-ratio-box {
  display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; flex-shrink: 0; opacity: 0.85;
}
.v-card-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.v-card:hover .v-card-video { opacity: 1; }
.hf-param-k { font-size: 14px; color: var(--sec); display: block; }
.hf-param-k.is-pick { color: var(--accent-ink); font-weight: 700; font-size: 14px; letter-spacing: 0.01em; }
.chip .hf-param-k.is-pick { display: inline; }
.hf-param-v { font-size: 14px; font-weight: 700; color: var(--text); }
.hf-v-canvas { padding: 14px 20px 28px; justify-content: flex-start !important; align-items: stretch !important; }
.v-card img[src*="shorts_creator"] { object-position: center 18%; }
.hf-canvas-topbar {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

/* 3. Photo Screen: Edge-to-Edge Borderless Gallery + Floating Glass Composer */
.hf-photo-screen { padding: 12px 12px 175px; }
.photo-avatar-create {
  border-style: dashed; border-color: rgba(11, 13, 18, 0.193); color: var(--lime);
  background: rgba(11, 13, 18, 0.024); font-weight: 700;
}
.photo-avatar-create:hover { border-color: var(--lime); background: rgba(11, 13, 18, 0.04); color: var(--text); }
.photo-avatars-strip { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.photo-avatar-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px;
}
.photo-avatar-chip img {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-str); display: block;
}
.photo-avatar-chip.active {
  border-color: var(--accent); background: rgba(217, 56, 30, 0.1); color: var(--text);
}
.hf-photo-topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 4px;
}
.hf-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hf-photo-card {
  height: 310px; border-radius: 12px; border: 1px solid rgba(11, 13, 18, 0.08) !important; overflow: hidden; position: relative; cursor: pointer;
}
.hf-photo-card:hover { border-color: var(--border-str) !important; }
.hf-photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.hf-photo-card:hover img { transform: scale(1.03); }
.hf-photo-top {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 6px; pointer-events: none;
}
.hf-photo-pill {
  padding: 3px 8px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: rgba(9, 9, 11, 0.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14); color: #F4F4F5;
}
.hf-photo-pill.is-lime { background: var(--lime); color: #09090B; border-color: transparent; }
.hf-photo-hover {
  position: absolute; inset: auto 0 0 0; padding: 34px 12px 11px;
  background: linear-gradient(180deg, transparent 0%, rgba(9, 9, 11, 0.94) 100%);
  display: flex; flex-direction: column; gap: 3px;
  opacity: 1;
}
.hf-float-dock {
  max-width: 880px; width: min(880px, calc(100vw - 28px));
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(22px);
  border: 1px solid rgba(11, 13, 18, 0.14); border-radius: 22px;
  padding: 12px 14px; box-shadow: 0 24px 70px rgba(11, 13, 18, 0.158);
}
.hf-dock-main { display: flex; gap: 12px; align-items: stretch; }
.hf-dock-left { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hf-dock-input {
  width: 100%; background: transparent !important; border: none !important;
  padding: 4px 2px !important; font-size: 15px !important; color: var(--text); outline: none;
  min-height: 44px; max-height: 128px; line-height: 1.4; resize: none; font-family: inherit;
}
.hf-dock-pills { gap: 6px; }
.hf-dock-cta {
  padding: 0 22px; border-radius: 14px; font-size: 14px; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 4. Agent Screen: Supercomputer Clean Centered Layout + Slide-In Results Drawer */
.hf-agent-shell {
  display: grid; grid-template-columns: 236px 1fr; gap: 0;
  min-height: calc(100vh - 64px);
}
.hf-agent-shell.has-results { grid-template-columns: 236px 1fr 340px; }
.hf-agent-rail {
  border-right: 1px solid var(--border); background: var(--subtle); padding: 14px 12px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.hf-rail-new {
  width: 100%; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 6px;
}
.hf-rail-new:hover { border-color: var(--lime); }
.hf-rail-label { font-size: 14px; font-weight: 700; color: var(--mut); margin: 12px 0 4px 10px; letter-spacing: 0.06em; }
.hf-rail-foot { padding: 10px; border-radius: 12px; background: rgba(11, 13, 18, 0.02); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.hf-agent-stage { display: flex; flex-direction: column; min-width: 0; padding: 14px 24px 28px; }
.hf-agent-topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.hf-agent-center {
  width: min(740px, 100%); margin: auto; display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 24px 0 36px;
}
.hf-agent-hero { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: center; }
.hf-agent-mark { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.hf-agent-h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.hf-agent-composer {
  width: 100%; background: var(--subtle); border: 1px solid var(--border-str); border-radius: 20px;
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 18px 48px rgba(11, 13, 18, 0.099);
}
.hf-agent-input {
  width: 100%; background: transparent; border: none; color: var(--text); outline: none; font-size: 15px;
  min-height: 68px; max-height: 180px; line-height: 1.45; resize: none; font-family: inherit;
}
.hf-agent-composer-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.hf-agent-send {
  width: 34px; height: 34px; border-radius: 10px; border: none; background: var(--lime); color: var(--on-lime);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.hf-agent-subbar {
  width: 100%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 0 4px;
}
.hf-ghost-link {
  background: none; border: none; color: var(--sec); font-size: 14px; font-weight: 500; cursor: pointer; padding: 4px 6px;
}
.hf-ghost-link:hover { color: var(--text); }
.hf-agent-modes { justify-content: center; }
.hf-agent-log { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.hf-agent-results {
  border-left: 1px solid var(--border); background: var(--subtle); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
}
.hf-agent-results[hidden] { display: none !important; }

@media (max-width: 900px) {
  .nav-mega-panel { display: none !important; }
  .hf-v-sidebar { height: auto; position: static; border-right: none; width: 100%; min-width: 0; }
  .video-grid, .video-grid.has-result { grid-template-columns: minmax(0, 1fr); }
  .hf-model-pop { width: min(358px, calc(100vw - 28px)); }
  .hf-v-scroll { overflow: visible; padding: 12px; }
  .hf-v-sticky-cta {
    position: sticky; bottom: 58px; z-index: 15;
    padding: 8px 0 4px;
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
  }
  .hf-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-photo-card { height: 220px; }
  .hf-photo-hover { opacity: 1; }
  .hf-dock-main { flex-direction: column; }
  .hf-dock-cta { padding: 11px 16px; width: 100%; }
  .hf-agent-shell, .hf-agent-shell.has-results { grid-template-columns: 1fr; min-height: auto; }
  .hf-agent-rail { border-right: none; border-bottom: 1px solid var(--border); }
  .hf-agent-h1 { font-size: 20px; }
  .hf-agent-results { border-left: none; border-top: 1px solid var(--border); }
}



/* ── АГЕНТ 2.0: живой чат, карточки генерации, Моя Библиотека, выдвижная панель (Dark Cinema) ── */
.ag-shell {
  display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0;
  height: calc(100vh - 64px); height: calc(100dvh - 64px); min-height: 520px;
}
.ag-rail {
  border-right: 1px solid var(--border); background: var(--subtle); padding: 14px 12px; min-height: 0;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.ag-rail-top { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ag-chat-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.ag-chat-item { display: flex; align-items: center; gap: 2px; border-radius: 10px; border: 1px solid transparent; }
.ag-chat-item:hover { background: var(--subtle); }
.ag-chat-item.active { background: var(--elevated); border-color: var(--border-str); }
.ag-chat-open {
  flex: 1; min-width: 0; text-align: left; background: none; border: none; color: var(--sec); cursor: pointer;
  padding: 8px 10px; font-size: 14px; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ag-chat-item.active .ag-chat-open { color: var(--text); font-weight: 600; }
.ag-chat-del {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: none; border: none; color: var(--mut);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0;
}
.ag-chat-item:hover .ag-chat-del, .ag-chat-item.active .ag-chat-del, .ag-chat-del:focus-visible { opacity: 1; }
.ag-chat-del:hover { color: var(--danger); background: rgba(220, 38, 38, 0.1); }
.ag-chat-del .ic { width: 13px; height: 13px; }
.ag-chat-empty { color: var(--mut); font-size: 14px; padding: 6px 10px; line-height: 1.4; }
.ag-balance-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--sec); }
.ag-balance-row strong { color: var(--text); font-size: 14px; }
.ag-safe-title { color: var(--lime); font-weight: 700; font-size: 14px; }
.ag-safe-sub { color: var(--sec); font-size: 14px; line-height: 1.4; }
.ag-topup-link { text-align: left; padding: 2px 0; color: var(--lime); }

.ag-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 22px 16px; gap: 10px; }
.ag-topbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ag-model { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mut); font-weight: 600; }
/* Статичный бейдж единственного продукта «ИИ-Агент · 3 кр.» (вместо прежнего списка моделей) */
.ag-creator-badge {
  display: inline-flex; align-items: center; min-width: 0; max-width: 100%; padding: 7px 12px; border-radius: 999px;
  background: var(--subtle); border: 1px solid var(--border-str); color: var(--text); font-size: 14px; font-weight: 700;
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; user-select: none;
}
.ag-drawer-head .ag-creator-badge { flex: 0 0 auto; margin-right: auto; padding: 5px 10px; font-size: 14px; }
.ag-select {
  appearance: none; -webkit-appearance: none; background: var(--subtle); color: var(--text); border: 1px solid var(--border-str);
  border-radius: 10px; padding: 8px 30px 8px 12px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  max-width: 100%; min-width: 0;
}
.ag-select:hover, .ag-select:focus-visible { border-color: var(--lime); outline: none; }
.ag-works-link { margin-left: auto; }

.ag-log {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  display: flex; flex-direction: column; gap: 14px;
  padding: 6px 4px 10px; scroll-behavior: smooth; overscroll-behavior: contain;
}
.ag-empty { margin: auto; width: min(620px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 18px 0; }
.ag-empty-mark { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.ag-empty-title { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.ag-empty-sub { color: var(--sec); font-size: 14px; line-height: 1.5; max-width: 480px; }
.ag-starters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ag-starter {
  background: var(--subtle); border: 1px solid var(--border-str); color: var(--text); border-radius: 999px; padding: 9px 14px;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.ag-starter:hover { border-color: var(--lime); color: var(--lime); }

.ag-msg { display: flex; flex-direction: column; gap: 8px; max-width: min(760px, 100%); width: 100%; margin: 0 auto; }
.ag-msg-user { align-items: flex-end; }
.ag-bubble { border-radius: 16px; padding: 11px 14px; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.ag-msg-user .ag-bubble { background: var(--elevated); border: 1px solid var(--border-str); max-width: 86%; border-bottom-right-radius: 6px; }
.ag-msg-bot .ag-bubble { background: transparent; padding: 2px 2px; }
.ag-msg-meta { font-size: 14px; color: var(--mut); font-weight: 600; letter-spacing: 0.04em; display: flex; gap: 8px; align-items: center; }
.ag-msg-meta .ag-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); }
.ag-msg-err .ag-bubble { background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.4); color: #A5122D; font-size: 14px; }
.ag-msg-thumbs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ag-msg-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-str); }
.ag-typing {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; max-width: 100%;
  padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
}
.ag-typing-dots { display: inline-flex; gap: 5px; align-items: center; flex-shrink: 0; }
.ag-typing-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); opacity: 0.35; animation: agBlink 1.2s infinite ease-in-out; }
.ag-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ag-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
.ag-typing-text { font-size: 14px; font-weight: 600; color: var(--sec); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ag-typing-cancel {
  flex-shrink: 0; min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-str);
  background: var(--elevated); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  touch-action: manipulation; transition: border-color 0.15s ease, color 0.15s ease;
}
.ag-typing-cancel:hover, .ag-typing-cancel:focus-visible { border-color: var(--lime); color: var(--lime); outline: none; }
.ag-msg-time { font-size: 14px; font-weight: 600; letter-spacing: 0.04em; color: var(--mut); font-variant-numeric: tabular-nums; }
@keyframes agBlink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.ag-card {
  background: var(--surface); border: 1px solid var(--border-str); border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.ag-card.is-done { border-color: rgba(217, 56, 30, 0.5); }
.ag-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ag-card-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700; line-height: 1.35; }
.ag-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ag-card-controls { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 2px; }
.ag-card-sel {
  background: var(--surface); color: var(--text); border: 1px solid var(--border-str); border-radius: 9px;
  padding: 5px 8px; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; max-width: 100%;
}
.ag-card-sel:hover, .ag-card-sel:focus { border-color: var(--lime); outline: none; }
.ag-card-sel-model { flex: 1 1 140px; min-width: 120px; }
.ag-card-tag { font-size: 14px; font-weight: 600; color: var(--sec); background: var(--subtle); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }
.ag-card-price { flex-shrink: 0; font-size: 14px; font-weight: 800; color: var(--on-lime); background: var(--lime); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.ag-card-prompt { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; color: var(--sec); line-height: 1.5; }
.ag-card-prompt summary { cursor: pointer; padding: 8px 12px; font-weight: 600; color: var(--text); font-size: 14px; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.ag-card-prompt summary::-webkit-details-marker { display: none; }
.ag-card-prompt summary::after { content: '+'; color: var(--mut); font-weight: 700; }
.ag-card-prompt[open] summary::after { content: '−'; }
.ag-card-prompt-body { padding: 0 12px 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ag-card-refs { display: flex; gap: 6px; }
.ag-card-refs img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border-str); }
.ag-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-card-actions .btn-lime, .ag-card-actions .btn-dark { padding: 9px 14px; font-size: 14px; }
.ag-card-actions a { text-decoration: none; display: inline-flex; align-items: center; }
.ag-run { display: flex; flex-direction: column; gap: 8px; }
.ag-run-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: var(--sec); }
.ag-run-pct { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 800; color: var(--lime); }
.ag-run-bar { height: 6px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.ag-run-fill { height: 100%; width: 0; border-radius: 999px; background: var(--lime); transition: width 0.9s linear; }
.ag-run-note { font-size: 14px; color: var(--mut); }
.ag-run-err { font-size: 14px; color: #A5122D; background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.4); border-radius: 10px; padding: 8px 10px; }
.ag-result { display: flex; flex-direction: column; gap: 10px; }
.ag-result-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ag-result-media img, .ag-result-media video { width: 100%; max-height: 420px; border-radius: 12px; background: #000; object-fit: contain; border: 1px solid var(--border); display: block; }
.ag-result-media.is-single { grid-template-columns: minmax(0, 320px); }
.ag-track { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.ag-track-title { font-size: 14px; font-weight: 600; }
.ag-track audio { width: 100%; height: 36px; }

.ag-composer {
  width: min(760px, 100%); margin: 0 auto; background: var(--subtle); border: 1px solid var(--border-str); border-radius: 18px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 14px 40px rgba(11, 13, 18, 0.088); flex-shrink: 0;
}
.ag-composer:focus-within { border-color: rgba(217, 56, 30, 0.55); }
.ag-input {
  width: 100%; background: transparent; border: none; color: var(--text); outline: none; font-size: 15px;
  min-height: 44px; max-height: 200px; line-height: 1.45; resize: none; font-family: inherit; padding: 4px 2px;
}
.ag-composer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-composer-bar .chip { padding: 6px 11px; font-size: 14px; display: inline-flex; align-items: center; gap: 5px; }
/* PR #69: стили ответа переносятся на новую строку внутри узкой левой панели AI Creator — 4-я плашка
   «Pro-режиссёр · 8 кр.» больше не уезжает за правый край композера (ни 1440px, ни 390px), горизонтальной прокрутки нет. */
.ag-style-row { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; min-width: 0; overflow: visible; }
.ag-style-chip { flex: 0 1 auto; max-width: 100%; min-width: 0; padding: 6px 11px; font-size: 14px; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.ag-pro-chip { margin-left: auto; }
.recipe-row { margin: 8px 0; min-width: 0; }
#videoGrid .recipe-row { flex-wrap: wrap; overflow: visible; }
@media (max-width: 900px) { .ag-style-chip { min-height: 44px; } }
.ag-send { padding: 9px 16px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.ag-send .ic { width: 14px; height: 14px; }
.ag-send[disabled] { opacity: 0.55; cursor: progress; }
.ag-attach-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ag-attach-row[hidden] { display: none; }
.ag-attach { position: relative; width: 52px; height: 52px; }
.ag-attach img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-str); }
.ag-attach button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-str);
  background: var(--subtle); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.ag-attach button .ic { width: 10px; height: 10px; }

.ag-lib-empty { grid-column: 1 / -1; color: var(--mut); font-size: 14px; line-height: 1.5; padding: 10px 2px; }
.ag-pick { position: relative; }
.ag-pick.picked { outline: 2px solid var(--lime); outline-offset: -2px; }

.ag-open-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--lime); border-color: rgba(11, 13, 18, 0.14); }
.ag-open-btn .ic { width: 12px; height: 12px; }
.ag-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; z-index: 96;
  background: var(--subtle); border-left: 1px solid var(--border-str); box-shadow: -24px 0 60px rgba(11, 13, 18, 0.121);
  display: flex; flex-direction: column; gap: 10px; padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  animation: agSlide 0.22s ease-out;
}
.ag-drawer[hidden] { display: none; }
@keyframes agSlide { from { transform: translateX(36px); } to { transform: translateX(0); } }
.ag-drawer-head { display: flex; align-items: center; gap: 8px; }
.ag-drawer-head .ag-select { flex: 1; }
.ag-drawer-head .chip { padding: 7px 9px; display: inline-flex; }
.ag-drawer-title { font-size: 14px; font-weight: 800; color: var(--lime); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ag-drawer .ag-empty-title { font-size: 17px; }
.ag-drawer .ag-result-media.is-single { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1180px) {
  .ag-shell { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .ag-shell { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .ag-rail { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 12px; gap: 8px; }
  .ag-rail-top { flex-direction: row; align-items: center; gap: 8px; }
  .ag-rail .hf-rail-new { width: auto; margin: 0; flex-shrink: 0; padding: 8px 10px; }
  .ag-rail .hf-rail-label, .ag-rail .hf-rail-foot { display: none; }
  .ag-chat-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: 1; }
  .ag-chat-item { flex-shrink: 0; max-width: 170px; }
  .ag-chat-del { opacity: 1; }
  .ag-stage { padding: 10px 12px 12px; height: calc(var(--tg-viewport-stable-height, 100dvh) - 134px - env(safe-area-inset-bottom, 0px)); min-height: 280px; }
  .ag-log { overscroll-behavior: auto; }
  .ag-empty-title { font-size: 19px; }
  .ag-msg-user .ag-bubble { max-width: 94%; }
  .ag-drawer { width: 100%; border-left: none; }
  .ag-send span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-drawer, .ag-typing-dots span { animation: none; }
  .ag-typing-dots span { opacity: 0.7; }
  .ag-typing-cancel { transition: none; }
  .ag-run-fill { transition: none; }
}

/* ── БЛОК C · ОЗВУЧКА И СУБТИТРЫ (REELS) — внутри вкладки Video, Dark Cinema ── */
.vr-mode-switch { display: flex; gap: 4px; width: fit-content; max-width: calc(100% - 24px); margin: 12px auto 10px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.vr-mode-switch button { border: 0; background: transparent; color: var(--sec); font: inherit; font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: .15s; }
.vr-mode-switch button:hover { color: var(--text); }
.vr-mode-switch button.on { background: var(--lime); color: var(--on-lime); }
.vr-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; max-width: 1280px; margin: 0 auto; padding: 4px 24px 48px; }
.vr-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px; min-width: 0; }
.vr-form { display: flex; flex-direction: column; gap: 16px; }
.vr-label { display: block; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mut); margin-bottom: 7px; }
.vr-note { font-size: 14px; color: var(--mut); margin-top: 6px; }
.vr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vr-row-top { align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.vr-tight { gap: 6px; }
.vr-tight .chip { padding: 5px 11px; font-size: 14px; }
.vr-grow { flex: 1 1 220px; min-width: 0; }
.vr-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vr-between > .vr-label { margin-bottom: 0; }
.vr-anchor { position: relative; }
/* Телефон: открытый список моделей/жанров подкручивается под шапку (без клавиатуры) — видно 8–10 строк. */
.vr-anchor, .hf-pop-anchor { scroll-margin-top: 72px; }
.vr-anchor > .vr-between { margin-bottom: 8px; }
.vr-block .v2-select { border-radius: 12px; padding: 9px 12px; max-width: 100%; }
.vr-submode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vr-submode-btn { text-align: left; background: var(--subtle); border: 1px solid var(--border); border-radius: 14px; padding: 11px 13px; color: var(--text); font: inherit; cursor: pointer; transition: .15s; min-width: 0; }
.vr-submode-btn strong { display: block; font-size: 14px; }
.vr-submode-btn small { display: block; font-size: 14px; color: var(--mut); margin-top: 3px; }
.vr-submode-btn:hover { border-color: var(--border-str); }
.vr-submode-btn.active { border-color: var(--accent); background: rgba(217, 56, 30, 0.07); }
.vr-upload-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.vr-upload-btn .ic, .vr-select-btn .ic, .vr-caret .ic, .vr-play .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vr-play .ic { fill: currentColor; stroke: none; width: 12px; height: 12px; }
.vr-select-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--subtle); border: 1px solid var(--border-str); border-radius: 12px; padding: 9px 12px; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.vr-select-btn strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-textarea { width: 100%; min-height: 64px; resize: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; outline: none; }
.vr-lib-strip { display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 6px; scroll-snap-type: x proximity; }
.vr-lib-strip[hidden] { display: none; }
.vr-lib-card { position: relative; flex: 0 0 104px; height: 146px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--border); background: #09090B; cursor: pointer; scroll-snap-align: start; transition: border-color .15s, box-shadow .15s; text-align: left; }
.vr-lib-card:hover { border-color: var(--border-str); }
.vr-lib-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217, 56, 30, 0.28); }
.vr-lib-card video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.vr-lib-meta { position: absolute; inset: auto 0 0 0; padding: 18px 6px 6px; background: linear-gradient(transparent, rgba(9, 9, 11, 0.88)); color: #FFFFFF; font-size: 14px; line-height: 1.25; display: flex; flex-direction: column; gap: 1px; }
.vr-lib-meta strong { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-lib-meta span { color: rgba(255, 255, 255, 0.78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-lib-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.vr-textarea:focus { border-color: var(--lime); }
.vr-voice-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px; align-items: end; }
.vr-voice-grid .v2-select { width: 100%; border-radius: 12px; padding: 11px 12px; }
.vr-voice-bar { display: flex; align-items: center; gap: 6px; background: var(--subtle); border: 1px solid var(--border-str); border-radius: 12px; padding: 5px 8px 5px 6px; }
.vr-voice-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; padding: 0; }
.vr-voice-text { min-width: 0; flex: 1; }
.vr-voice-text strong, .vr-voice-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-voice-text strong { font-size: 14px; }
.vr-voice-text small { font-size: 14px; color: var(--mut); }
.vr-orb { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--on-lime); background: linear-gradient(135deg, var(--lime), var(--ok)); }
.vr-mini-wave, .vr-wave { display: flex; align-items: center; gap: 2px; height: 18px; flex: none; }
.vr-mini-wave i, .vr-wave i { width: 2px; height: 40%; border-radius: 2px; background: var(--lime); opacity: .75; }
.vr-mini-wave i:nth-child(2n), .vr-wave i:nth-child(2n) { height: 90%; }
.vr-mini-wave i:nth-child(3n), .vr-wave i:nth-child(3n) { height: 62%; }
.is-playing .vr-mini-wave i, .vr-stage.is-anim .vr-wave i { animation: vr-wave .7s ease-in-out infinite alternate; }
.vr-mini-wave i:nth-child(2n), .vr-wave i:nth-child(2n) { animation-delay: .15s; }
.vr-mini-wave i:nth-child(3n), .vr-wave i:nth-child(3n) { animation-delay: .3s; }
@keyframes vr-wave { from { transform: scaleY(.35); } to { transform: scaleY(1); } }
.vr-play { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; background: var(--lime); color: var(--on-lime); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.vr-play.is-loading { opacity: .55; }
.vr-play.is-playing { background: rgb(255, 255, 255); }
.vr-caret { background: none; border: 0; color: var(--sec); cursor: pointer; padding: 4px; display: flex; }
.vr-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 70; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(22px); border: 1px solid var(--border-str); border-radius: 16px; padding: 10px; box-shadow: 0 18px 50px rgba(11, 13, 18, 0.132); display: flex; flex-direction: column; gap: 8px; }
.vr-pop-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow-y: auto; }
.vr-pop-item { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: 0; border-radius: 10px; padding: 7px 8px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.vr-pop-item:hover { background: var(--subtle); }
.vr-pop-item.active { background: rgba(217, 56, 30, 0.1); }
.vr-pop-item .vr-voice-text { flex: 1; }
.vr-pop-item .vr-price { font-size: 14px; color: var(--mut); white-space: nowrap; }
.vr-pop-row { display: flex; align-items: center; gap: 6px; }
.vr-pop-row .vr-pop-item { flex: 1; min-width: 0; }
.vr-pop-cat { font-size: 14px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mut); margin: 4px 2px 0; }
.vr-script { background: var(--subtle); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.vr-script .vr-textarea { border: 0; border-radius: 0; background: transparent; }
.vr-ai-bar { background: var(--ai-soft); padding: 9px 11px; display: flex; flex-direction: column; gap: 7px; border-bottom: 1px solid var(--border); }
.vr-ai-title { font-size: 14px; font-weight: 700; color: #A52812; }
.vr-chip-ai { border-color: var(--ai); color: #A52812; }
.vr-script-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 11px; border-top: 1px solid var(--border); }
.vr-meter { font-size: 14px; font-weight: 700; color: var(--ok); }
.vr-meter.is-warn { color: #A57112; }
.vr-meter.is-over { color: var(--danger); }
.vr-fonts-grid, .vr-styles-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.vr-font-btn, .vr-style-btn { background: var(--subtle); border: 1px solid var(--border); border-radius: 12px; padding: 9px 8px; color: var(--text); font: inherit; cursor: pointer; text-align: center; min-width: 0; transition: .15s; }
.vr-font-btn:hover, .vr-style-btn:hover { border-color: var(--border-str); }
.vr-font-btn.active, .vr-style-btn.active { border-color: var(--accent); background: rgba(217, 56, 30, 0.07); }
.vr-font-btn .vr-sample { display: block; font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-font-btn small, .vr-style-btn small { display: block; font-size: 14px; color: var(--mut); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-style-btn { text-align: left; }
.vr-style-btn strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vr-pop-wide { max-height: 420px; overflow-y: auto; }
.vr-tune { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.vr-swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.vr-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-str); cursor: pointer; padding: 0; }
.vr-swatch.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--canvas), 0 0 0 4px var(--lime); }
.vr-color { width: 34px; height: 28px; padding: 0; border: 1px solid var(--border-str); border-radius: 8px; background: none; cursor: pointer; }
.vr-range { width: 100%; accent-color: var(--lime); }
.vr-suno-select { margin-top: 8px; width: 100%; border-radius: 12px; padding: 9px 12px; }
.vr-cta { display: block; width: 100%; border: 0; border-radius: 14px; padding: 14px 16px; background: var(--lime); color: var(--on-lime); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; text-align: center; text-decoration: none; transition: .15s; }
.vr-cta:hover { filter: brightness(1.06); }
.vr-cta:disabled { opacity: .5; cursor: default; }
.vr-stage-wrap { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }
.vr-stage-title { font-size: 14px; letter-spacing: .03em; }
.vr-stage { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; border: 1px solid var(--border-str); background: radial-gradient(120% 80% at 30% 10%, #2A2F45 0%, #14151C 55%, #09090B 100%); container-type: inline-size; }
.vr-stage-top, .vr-stage-bottom { position: absolute; left: 12px; right: 12px; z-index: 2; font-size: 14px; color: var(--sec); }
.vr-stage-top { top: 11px; display: flex; justify-content: space-between; gap: 6px; }
.vr-stage-hd { color: var(--lime); font-weight: 800; }
.vr-stage-bottom { bottom: 11px; }
.vr-stage-mix { margin-top: 4px; }
.vr-wave { height: 22px; justify-content: center; gap: 3px; }
.vr-sub-zone { position: absolute; left: 8%; right: 8%; top: 13%; bottom: 22%; display: flex; align-items: flex-end; justify-content: center; z-index: 1; }
.vr-stage[data-pos="mid"] .vr-sub-zone { align-items: center; }
.vr-stage[data-pos="top"] .vr-sub-zone { align-items: flex-start; }
.vr-sub-box { --vr-accent: #D1FE17; --vr-on-accent: #09090B; --vr-bg: .6; --vr-k: 1; text-align: center; color: rgb(255, 255, 255); font-size: calc(7.5cqw * var(--vr-k)); line-height: 1.22; font-weight: 400; max-width: 100%; overflow-wrap: anywhere; paint-order: stroke fill; -webkit-text-stroke: .1em #000; text-shadow: .05em .06em 0 rgba(0, 0, 0, var(--vr-bg)); }
.vr-sub-box .w { display: inline-block; margin: 0 .12em; transition: color .08s; }
.vr-sub-box .w.on { color: var(--vr-accent); }
.vr-sub-box[data-style="none"] { display: none; }
.vr-sub-box[data-style="capcut_minimal"] { --vr-k: .6; -webkit-text-stroke: 0; text-shadow: 0 .06em .18em rgba(0, 0, 0, var(--vr-bg)); }
.vr-sub-box[data-style="capcut_minimal"] .w { opacity: .62; }
.vr-sub-box[data-style="capcut_minimal"] .w.on { opacity: 1; }
.vr-sub-box[data-style="capcut_glass"] { --vr-k: .62; -webkit-text-stroke: 0; text-shadow: none; background: rgba(9, 9, 11, var(--vr-bg)); padding: .3em .55em; border-radius: .2em; }
.vr-sub-box[data-style="pill_word"] { --vr-k: .95; -webkit-text-stroke: .07em #000; }
.vr-sub-box[data-style="pill_word"] .w { padding: .04em .2em; margin: 0 .02em; border-radius: .14em; }
.vr-sub-box[data-style="pill_word"] .w.on { background: var(--vr-accent); color: var(--vr-on-accent); -webkit-text-stroke: 0; text-shadow: none; }
.vr-sub-box[data-style="hormozi"] { --vr-k: 1.08; text-transform: uppercase; -webkit-text-stroke: .14em #000; }
.vr-sub-box[data-style="hormozi"] .w.on { transform: scale(1.08); }
.vr-sub-box[data-style="neon"] { -webkit-text-stroke: 0; text-shadow: 0 0 .18em var(--vr-accent), 0 0 .45em var(--vr-accent); }
.vr-sub-box[data-style="white_box"], .vr-sub-box[data-style="black_box"], .vr-sub-box[data-style="red_hook"] { --vr-k: .9; -webkit-text-stroke: 0; text-shadow: none; padding: .28em .5em; border-radius: .12em; }
.vr-sub-box[data-style="white_box"] { background: rgba(255, 255, 255, var(--vr-bg)); color: #09090B; }
.vr-sub-box[data-style="black_box"] { background: rgba(9, 9, 11, var(--vr-bg)); }
.vr-sub-box[data-style="red_hook"] { --vr-k: .95; background: rgba(225, 29, 46, var(--vr-bg)); text-transform: uppercase; }
.vr-sub-box.no-accent .w.on { color: inherit; }
.vr-sub-box[data-style="lux_italic"] { --vr-k: .82; font-style: italic; letter-spacing: .02em; -webkit-text-stroke: 0; text-shadow: 0 .05em .12em rgba(0, 0, 0, var(--vr-bg)); }
.vr-sub-box[data-style="two_line"] { --vr-k: .62; }
.vr-sub-box[data-style="two_line"] .vr-key { display: block; font-size: 2.1em; line-height: 1.05; color: var(--vr-accent); text-transform: uppercase; }
.vr-progress { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; background: rgba(9, 9, 11, .9); text-align: center; }
.vr-progress .v2-gen-bar-track { width: 100%; }
.vr-progress-pct { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 700; color: var(--lime); }
.vr-progress-stage { font-size: 14px; font-weight: 700; }
.vr-result-video { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vr-result { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.vr-error { font-size: 14px; color: var(--danger); background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.35); border-radius: 12px; padding: 10px 12px; }
@media (max-width: 1100px) {
  .vr-wrap { grid-template-columns: minmax(0, 1fr) 320px; padding: 4px 16px 40px; }
}
@media (max-width: 900px) {
  .vr-wrap { grid-template-columns: minmax(0, 1fr); padding: 4px 12px 96px; }
  .vr-stage-wrap { position: static; order: -1; }
  .vr-stage { max-width: 210px; }
  .vr-mode-switch button { padding: 8px 11px; font-size: 14px; }
}
@media (max-width: 560px) {
  .vr-panel { padding: 14px; border-radius: 16px; }
  .vr-submode, .vr-voice-grid, .vr-tune { grid-template-columns: minmax(0, 1fr); }
  .vr-fonts-grid, .vr-styles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vr-mode-switch { width: calc(100% - 24px); }
  .vr-mode-switch button { flex: 1; white-space: normal; line-height: 1.2; padding: 7px 8px; }
  .vr-mini-wave { display: none; }
}

/* Floating Full-Bleed Edge-to-Edge Claude Fable 5.2 × aireels MCP Banner (Explore Hero Top) */
html, body { overflow-x: clip; }
@keyframes hfClaudeFloat {
  0%, 100% { transform: translateY(0px); box-shadow: 0 18px 48px rgba(217, 119, 87, 0.24), 0 1px 0 rgba(242, 158, 116, 0.34) inset; }
  50% { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(217, 119, 87, 0.36), 0 1px 0 rgba(248, 192, 162, 0.5) inset; }
}
.hf-claude-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100vw;
  max-width: none;
  margin: -24px 0 22px calc(50% - 50vw);
  padding: 22px clamp(20px, 4.5vw, 64px);
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(217, 119, 87, 0.48);
  border-bottom: 1px solid rgba(217, 119, 87, 0.48);
  background:
    radial-gradient(90% 200% at 14% 0%, rgba(217, 119, 87, 0.36) 0%, rgba(217, 119, 87, 0.1) 44%, rgba(255, 255, 255, 0.96) 80%),
    linear-gradient(105deg, var(--subtle) 0%, var(--surface) 50%, var(--subtle) 100%);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  animation: hfClaudeFloat 5.2s ease-in-out infinite;
  transition: border-color 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}
.hf-claude-banner:hover {
  border-color: rgba(244, 165, 130, 0.82);
  filter: brightness(1.07);
}
.hf-claude-aura {
  position: absolute;
  inset: -40% auto -40% 0;
  width: 480px;
  background: radial-gradient(circle, rgba(217, 119, 87, 0.4) 0%, rgba(217, 119, 87, 0) 70%);
  pointer-events: none;
}
.hf-claude-left {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.hf-claude-mark {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #E88D6B 0%, #C6613F 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 28px rgba(217, 119, 87, 0.48);
}
.hf-claude-mark svg { width: 28px; height: 28px; }
.hf-claude-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.hf-claude-toprow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.hf-claude-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.hf-claude-x { color: #9F3D19; margin: 0 3px; }
.hf-claude-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(217, 119, 87, 0.24);
  border: 1px solid rgba(242, 158, 116, 0.55);
  color: #A54612;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.hf-claude-sub {
  font-size: 14px;
  color: #935325;
  line-height: 1.4;
}
.hf-claude-cta {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #EC9573 0%, #D97757 100%);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(217, 119, 87, 0.42);
}
@media (max-width: 820px) {
  .hf-claude-banner { flex-direction: column; align-items: stretch; margin: -12px 0 16px calc(50% - 50vw); padding: 16px 16px; gap: 12px; }
  .hf-claude-title { font-size: 16px; }
  .hf-claude-sub { font-size: 14px; }
  .hf-claude-cta { width: 100%; padding: 11px 16px; }
}

/* ══ МОИ РАБОТЫ (Вариант B): единая лента, ленты «Видео» / «Фото», полки @Аватаров ══ */
.mw-screen { padding: 24px 20px 56px; }
.mw-wrap { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.mw-wrap[hidden], .mw-guest[hidden] { display: none; }
.mw-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.mw-sub { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--sec); max-width: 720px; }
.mw-h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.mw-count { color: var(--sec); font-weight: 600; }
.mw-block, .mw-shelf { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mw-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mw-chip-coral { border-color: rgba(217, 56, 30, 0.4); background: var(--accent-soft); color: #A8260F; font-weight: 700; }
.mw-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mw-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.mw-pill { display: inline-flex; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--subtle); color: var(--sec); }
.mw-pill.on { background: #0B0D12; color: #FFFFFF; }
.mw-search { width: 220px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: #FFFFFF; color: var(--text); font: inherit; font-size: 14px; }
.mw-search:focus { outline: none; border-color: var(--accent); }
.mw-ava-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.mw-ava { flex: 0 0 auto; width: 264px; max-width: 82vw; border: 1px solid var(--border); border-radius: 18px; background: #FFFFFF; overflow: hidden; display: flex; flex-direction: column; }
.mw-ava:hover { border-color: #C3C8D4; box-shadow: var(--shadow-sm); }
.mw-ava.active { border-color: var(--accent); background: var(--accent-soft); }
.mw-ava-photos { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 0; }
.mw-ava-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mw-ava-ph { position: relative; display: block; width: 100%; padding: 0; border-radius: 12px; overflow: hidden; background: var(--subtle); cursor: zoom-in; }
.mw-ava-ph.is-face { aspect-ratio: 1; }
.mw-ava-ph.is-front, .mw-ava-ph.is-back { aspect-ratio: 3 / 4; }
.mw-ava-ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.mw-ava-ph:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mw-ava-ph.is-empty { display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--sec); cursor: default; }
.mw-ava-role { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #0B0D12; font-size: 14px; font-weight: 600; line-height: 1.4; }
.mw-ava-main { width: 100%; padding: 12px; display: flex; align-items: center; gap: 10px; text-align: left; }
.mw-ava-dot { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); }
.mw-ava-text { min-width: 0; }
.mw-ava-text strong { display: block; font-size: 16px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-ava-text small { font-size: 14px; color: var(--sec); }
.mw-ava-acts { display: flex; margin-top: auto; border-top: 1px solid var(--border); }
.mw-ava-acts button { flex: 1; min-height: 44px; padding: 8px 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.mw-ava-acts button:hover { color: var(--accent-ink); }
.mw-ava-acts button + button { border-left: 1px solid var(--border); }
.mw-ava.is-new { justify-content: center; background: var(--subtle); border-style: dashed; }
.mw-ava.is-new .mw-ava-main { flex-direction: column; justify-content: center; text-align: center; flex: 1; padding: 24px 12px; }
.mw-ava.is-new strong { white-space: normal; }
.mw-ava-strip.is-compact .mw-ava { width: 216px; }
#assetModal.is-avatar .asset-modal-grid { grid-template-columns: 1fr; }
#assetModal.is-avatar #assetModalImg { height: auto !important; max-height: 68vh; object-fit: contain !important; background: var(--subtle); }
#assetModal.is-avatar .box-subtle { display: none; }
.mw-canvas { min-width: 0; }
.mw-studio-feed { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.mw-studio-feed.is-photo { padding: 6px 8px; }
.mw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.mw-card { min-width: 0; border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; overflow: hidden; display: flex; flex-direction: column; }
.mw-card.is-fresh { animation: mwIn .45s ease-out; }
@keyframes mwIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mw-card.is-fresh { animation: none; } }
.mw-media { width: 100%; aspect-ratio: 9 / 13; padding: 0; border: none; background: var(--subtle); display: block; overflow: hidden; }
.mw-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mw-media video { width: 100%; height: 100%; object-fit: contain; background: #0B0D12; display: block; }
.mw-media.is-pending, .mw-media.is-err { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; color: var(--sec); font-size: 14px; }
.mw-media.is-err { color: var(--danger); }
.mw-pct { font-size: 26px; font-weight: 800; color: var(--text); }
.mw-prompt { line-height: 1.4; overflow-wrap: anywhere; }
.mw-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 10px 0; font-size: 14px; color: var(--sec); }
.mw-badge { min-width: 0; padding: 3px 8px; border-radius: 999px; background: var(--subtle); color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-badge.is-video { background: var(--accent-soft); color: #A8260F; }
.mw-date { flex-shrink: 0; }
.mw-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 10px 10px; }
.mw-card.is-running .mw-meta, .mw-card.is-audio .mw-meta { padding-bottom: 12px; }
.mw-act { flex: 1 1 auto; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; }
.mw-act .ic { width: 15px; height: 15px; flex-shrink: 0; }
.mw-act:hover { border-color: var(--accent); color: var(--accent-ink); }
.mw-act.is-main { background: #0B0D12; border-color: #0B0D12; color: #FFFFFF; }
.mw-empty { grid-column: 1 / -1; margin: 0; padding: 40px 18px; border: 1.5px dashed #C3C8D4; border-radius: 16px; background: var(--subtle); color: var(--sec); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mw-empty strong { font-size: 16px; color: var(--text); }
.mw-ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mw-guest { max-width: 1360px; margin: 0 auto 18px; padding: 14px 20px; border: 1px solid rgba(217, 56, 30, 0.28); border-radius: 18px; background: var(--accent-soft); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; text-align: left; }
.mw-guest-ic { width: 38px; height: 38px; border-radius: 12px; background: #FFFFFF; color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mw-guest-title { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.mw-guest-text { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--sec); flex: 1 1 280px; }
.mw-guest-cta { padding: 9px 20px; flex-shrink: 0; }
.mw-demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(217, 56, 30, 0.25); font-size: 14px; font-weight: 600; color: var(--text); }
.mw-demo-bar[hidden] { display: none; }
.mw-demo-tag { font-size: 14px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: #A8260F; }
.mw-ava.is-demo { background: #FFFFFF; border-style: dashed; }
.mw-cab-avatars { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mw-cab-avatars .mw-ava { width: 100%; max-width: none; }
.mw-cab-open { color: var(--accent-ink); font-weight: 700; }
@media (min-width: 901px) {
  .mw-card.is-audio { grid-column: span 2; }
}
@media (max-width: 900px) {
  .mw-screen { padding: 16px 12px 110px; }
  .mw-canvas { padding: 12px; }
  .mw-search { flex: 1 1 160px; font-size: 16px; }
  .mw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mw-card.is-audio { grid-column: 1 / -1; }
  .mw-act { min-height: 40px; }
}

/* ══ ВКЛАДКА «МОНТАЖ» · Dark Cinema Pro Studio (Вариант 1): медиа · монитор · инспектор + таймлайн во всю ширину ══ */
#s-montage.screen.full-bleed { padding: 14px 18px 24px; }
.mt-wrap {
  --mt-work: clamp(380px, calc(100dvh - 376px), 780px);
  display: grid; gap: 10px; color: var(--text); font-size: 16px;
  grid-template-columns: 330px minmax(0, 1fr) 276px;
  grid-template-areas: "head head head" "media stage insp" "tl tl tl" "res res res";
}
.mt-wrap .ic { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.mt-head {
  grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 12px; background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 14px;
}
.mt-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.mt-badge-lime { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--lime); color: var(--on-lime); }
.mt-badge-dark { font-size: 15px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--subtle); color: var(--sec); border: 1px solid rgba(11, 13, 18, 0.08); white-space: nowrap; }
.mt-mono { font-variant-numeric: tabular-nums; }
.mt-lime { color: var(--lime); }
.mt-head-mid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 11px; background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.08); }
.mt-btn-lime {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px;
  background: var(--lime); color: var(--on-lime); font-size: 16px; font-weight: 700; transition: .15s; text-decoration: none; white-space: nowrap;
}
.mt-btn-lime:hover { filter: brightness(1.06); }
.mt-btn-lime:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.mt-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  background: var(--subtle); color: var(--text); border: 1px solid rgba(11, 13, 18, 0.1); font-size: 16px; font-weight: 600; transition: .15s;
}
.mt-btn-ghost:hover { border-color: var(--border-str); color: var(--text); }
.mt-btn-ghost:disabled { opacity: .4; cursor: not-allowed; }
.mt-btn-ic { padding: 8px 10px; }
.mt-danger:hover { border-color: var(--danger); color: var(--danger); }
.mt-card { background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mt-media { grid-area: media; height: var(--mt-work); }
.mt-media.is-drop { border-color: var(--lime); box-shadow: 0 0 0 2px var(--lime); }
.mt-stage { grid-area: stage; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, rgba(11, 13, 18, 0.021), var(--surface) 70%); }
.mt-insp { grid-area: insp; height: var(--mt-work); overflow-y: auto; }
.mt-insp-panel { display: flex; flex-direction: column; gap: 12px; }
.mt-insp-panel[hidden], .mt-music-box[hidden], .mt-noprev[hidden], .mt-proj-menu[hidden] { display: none; }
.mt-insp-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px 6px 8px; border-radius: 10px; background: var(--subtle); color: var(--text); font-size: 16px; font-weight: 600; }
.mt-insp-back:hover { background: var(--elevated); }
.mt-music-box { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.mt-toggle { position: relative; display: inline-flex; cursor: pointer; }
.mt-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mt-toggle-ui { width: 44px; height: 26px; border-radius: 999px; background: var(--border-str); transition: .15s; }
.mt-toggle-ui::after { content: ''; display: block; width: 20px; height: 20px; margin: 3px; border-radius: 999px; background: #FFFFFF; transition: .15s; }
.mt-toggle input:checked + .mt-toggle-ui { background: var(--lime); }
.mt-toggle input:checked + .mt-toggle-ui::after { transform: translateX(18px); }
.mt-toggle input:focus-visible + .mt-toggle-ui, .mt-proj-btn:focus-visible, .mt-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mt-projects { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-proj-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; max-width: 340px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--border-str); background: var(--surface); color: var(--text); font-size: 16px; }
.mt-proj-btn:hover { border-color: var(--text); }
.mt-proj-lbl { color: var(--sec); white-space: nowrap; }
.mt-proj-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-proj-btn[aria-expanded="true"] .mt-proj-caret { transform: rotate(180deg); }
.mt-proj-new { min-height: 44px; white-space: nowrap; }
.mt-proj-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: 380px; max-width: calc(100vw - 36px); max-height: 380px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 16px; background: #FFFFFF; box-shadow: var(--shadow-md); }
.mt-proj-row { display: flex; align-items: center; gap: 6px; }
.mt-proj-open { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 10px; color: var(--text); font-size: 16px; text-align: left; }
.mt-proj-open:hover, .mt-proj-open.on { background: var(--subtle); }
.mt-proj-open.on .mt-proj-open-name { font-weight: 700; }
.mt-proj-open-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-proj-count { flex-shrink: 0; font-size: 15px; color: var(--sec); }
.mt-proj-row .mt-btn-ic { min-width: 44px; min-height: 44px; }
.mt-proj-input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-str); background: #FFFFFF; color: var(--text); font: inherit; font-size: 16px; }
.mt-sec-lbl { font-size: 16px; font-weight: 700; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mt-sec-lbl > .mt-clip-name { font-weight: 500; color: var(--sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.mt-btn-upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; flex-shrink: 0; padding: 12px 8px; border-radius: 14px;
  border: 2px dashed var(--border-str); background: var(--subtle); color: var(--text); transition: .15s;
}
.mt-upload-main { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.mt-wrap .mt-upload-main .ic { width: 18px; height: 18px; stroke-width: 2.5; }
.mt-upload-sub { font-size: 15px; color: var(--sec); }
.mt-btn-upload:hover { background: rgba(11, 13, 18, 0.04); }
.mt-note { font-size: 15px; color: var(--sec); }
.mt-note:empty { display: none; }
.mt-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--subtle); flex-shrink: 0; }
.mt-tab { min-height: 42px; padding: 6px 8px; border-radius: 10px; font-size: 16px; font-weight: 600; color: var(--sec); transition: .15s; }
.mt-tab:hover { color: var(--text); }
.mt-tab.on { background: #FFFFFF; color: var(--text); box-shadow: var(--shadow-sm); }
.mt-hint { font-size: 15px; color: var(--mut); line-height: 1.45; }
.mt-chip-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mt-chip { padding: 7px 11px; border-radius: 9px; font-size: 16px; font-weight: 600; background: var(--elevated); color: var(--sec); border: 1px solid rgba(11, 13, 18, 0.08); transition: .15s; white-space: nowrap; }
.mt-chip:hover { color: var(--text); }
.mt-chip.on { background: rgba(217, 56, 30, 0.1); color: var(--accent-ink); border-color: rgba(217, 56, 30, 0.5); }
.mt-lib { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow-y: auto; flex: 1; min-height: 100px; align-content: start; }
.mt-lib[data-tab="audio"] { grid-template-columns: minmax(0, 1fr); }
.mt-lib-item { background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 11px; padding: 6px; display: flex; flex-direction: column; gap: 5px; transition: .15s; text-align: left; min-width: 0; color: inherit; }
.mt-lib-item:hover { border-color: var(--lime); }
.mt-lib-thumb { height: 84px; border-radius: 8px; position: relative; overflow: hidden; background: linear-gradient(135deg, #1E293B, #09090B); display: flex; align-items: center; justify-content: center; color: #8E8E9B; }
.mt-lib-thumb video, .mt-lib-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-lib-tag { position: absolute; left: 5px; bottom: 5px; z-index: 1; font-size: 14px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: rgba(9,9,11,0.78); color: #F4F4F5; }
.mt-lib-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-lib-item.is-audio .mt-lib-thumb { height: 52px; background: rgba(244,114,182,0.14); color: #F9A8D4; }
.mt-lib[data-tab="audio"] .mt-lib-item { flex-direction: row; align-items: center; gap: 10px; min-height: 60px; }
.mt-lib[data-tab="audio"] .mt-lib-thumb { width: 44px; height: 44px; flex-shrink: 0; }
.mt-lib[data-tab="audio"] .mt-lib-tag { display: none; }
.mt-lib[data-tab="audio"] .mt-lib-name { flex: 1; min-width: 0; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
#mtCapStyle .mt-chip { padding: 5px 9px; font-size: 15px; }
.mt-lib-add { flex-shrink: 0; padding: 7px 10px; border-radius: 9px; background: var(--lime); color: var(--on-lime); font-size: 15px; font-weight: 700; text-align: center; white-space: nowrap; }
.mt-lib-item.is-on .mt-lib-add { background: transparent; color: var(--sec); }
.mt-lib-item.is-on { border-color: #F9A8D4; }
.mt-lib-empty { grid-column: 1 / -1; font-size: 16px; color: var(--sec); line-height: 1.5; padding: 16px 8px; text-align: center; }
.mt-lib-empty .mt-btn-ghost { margin-top: 10px; }

/* Монитор */
.mt-monitor {
  position: relative; overflow: hidden; border-radius: 20px; border: 1px solid rgba(255,255,255,0.14); background: #050507;
  box-shadow: 0 12px 34px rgba(11, 13, 18, 0.22); max-width: 100%;
}
.mt-monitor[data-aspect="9:16"] { height: calc(var(--mt-work) - 86px); aspect-ratio: 9 / 16; }
.mt-monitor[data-aspect="16:9"] { width: min(100%, calc((var(--mt-work) - 86px) * 1.7778)); aspect-ratio: 16 / 9; }
.mt-monitor[data-aspect="1:1"] { height: min(calc(var(--mt-work) - 86px), 480px); aspect-ratio: 1 / 1; }
.mt-monitor-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #050507; }
.mt-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.mt-flash.is-fade { background: #050507; animation: mtFx .5s ease-out; }
.mt-flash.is-flash { background: rgb(255,255,255); animation: mtFx .3s ease-out; }
@keyframes mtFx { 0% { opacity: .95; } 100% { opacity: 0; } }
.mt-cap {
  position: absolute; left: 8%; right: 8%; text-align: center; pointer-events: none; z-index: 2;
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--text); text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 2px #000;
  overflow-wrap: anywhere;
}
.mt-cap-bottom { bottom: 20%; }
.mt-cap-mid { top: 50%; transform: translateY(-50%); }
.mt-cap-top { top: 13%; }
.mt-cap .mt-cap-on { color: var(--mt-accent, #D1FE17); }
/* Предпросмотр стиля титров: приближённо повторяет стили, которые вшивает сервер (SUBTITLE_STYLES). */
.mt-cap.mt-cap-s-karaoke { text-transform: uppercase; font-weight: 900; }
.mt-cap.mt-cap-s-capcut_minimal { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 15px; opacity: .92; text-shadow: 0 1px 8px rgba(0,0,0,0.75); }
.mt-cap.mt-cap-s-capcut_glass { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 15px; text-shadow: none; }
.mt-cap.mt-cap-s-capcut_glass span { background: rgba(9,9,11,0.55); padding: 2px 3px; }
.mt-cap.mt-cap-s-pill_word .mt-cap-on { background: var(--mt-accent, #D1FE17); color: #09090B; border-radius: 6px; padding: 1px 6px; text-shadow: none; }
.mt-cap.mt-cap-s-hormozi { text-transform: uppercase; font-weight: 900; font-size: 18px; -webkit-text-stroke: 1px #050507; text-shadow: 0 3px 0 #050507, 0 0 12px rgba(0,0,0,0.9); }
.mt-cap.mt-cap-s-neon { text-shadow: 0 0 6px var(--mt-accent, #D1FE17), 0 0 18px var(--mt-accent, #D1FE17), 0 0 2px #000; }
.mt-cap.mt-cap-s-white_box { text-shadow: none; color: #09090B; }
.mt-cap.mt-cap-s-white_box span { background: #F4F4F5; padding: 2px 3px; }
.mt-cap.mt-cap-s-black_box { text-shadow: none; }
.mt-cap.mt-cap-s-black_box span { background: #050507; padding: 2px 3px; }
.mt-cap.mt-cap-s-red_hook { text-transform: uppercase; text-shadow: none; }
.mt-cap.mt-cap-s-red_hook span { background: #E11D48; padding: 2px 4px; }
.mt-cap.mt-cap-s-red_hook .mt-cap-on { color: #F4F4F5; text-decoration: underline; }
.mt-cap.mt-cap-s-lux_italic { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 500; font-size: 18px; letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.mt-cap.mt-cap-s-two_line .mt-cap-on { display: block; font-size: 1.45em; line-height: 1.1; }
.mt-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center; color: #255393; font-size: 16px; line-height: 1.45; }
.mt-empty strong { color: var(--text); font-size: 18px; }
.mt-noprev { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; text-align: center; font-size: 16px; line-height: 1.4; color: var(--sec); }
.mt-wrap .mt-empty-ic { width: 34px; height: 34px; color: var(--lime); }
.mt-ctrl { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.mt-play { width: 44px; height: 44px; border-radius: 999px; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; transition: .15s; }
.mt-play:hover { filter: brightness(1.06); }
.mt-play .ic { fill: currentColor; stroke: none; width: 16px; height: 16px; }
.mt-play .mt-ic-pause, .mt-play.is-playing .mt-ic-play { display: none; }
.mt-play.is-playing .mt-ic-pause { display: block; }

/* Инспектор */
.mt-prop-body { display: flex; flex-direction: column; gap: 10px; }
.mt-prop-body.is-hidden { display: none; }
.mt-field { display: flex; flex-direction: column; gap: 6px; }
.mt-prop-body.is-off { opacity: .45; }
.mt-prop-body.is-off .mt-chip, .mt-prop-body.is-off .mt-swatch, .mt-prop-body.is-off .mt-select, .mt-prop-body.is-off .mt-textarea { cursor: not-allowed; }
.mt-field-lbl { font-size: 16px; color: var(--sec); display: flex; justify-content: space-between; gap: 8px; }
.mt-field-lbl strong { color: var(--text); font-variant-numeric: tabular-nums; }
.mt-range { width: 100%; accent-color: var(--lime); height: 22px; }
.mt-textarea, .mt-select {
  width: 100%; background: var(--surface); color: var(--text); border: 1px solid rgba(11, 13, 18, 0.1); border-radius: 10px; padding: 9px 10px;
  font: inherit; font-size: 16px; resize: vertical;
}
.mt-textarea:focus, .mt-select:focus { outline: none; border-color: rgba(217, 56, 30, 0.6); }
.mt-swatch { width: 30px; height: 30px; border-radius: 999px; border: 2px solid rgba(11, 13, 18, 0.18); background: var(--mt-swatch, #D1FE17); transition: .15s; }
.mt-swatch.on { border-color: var(--text); box-shadow: 0 0 0 2px rgba(217, 56, 30, 0.275); }

/* Таймлайн */
.mt-timeline { grid-area: tl; background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 16px; padding: 8px 14px; min-width: 0; }
.mt-tl-grid { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; }
.mt-tl-labels { display: flex; flex-direction: column; gap: 4px; }
.mt-tl-label { height: 36px; display: flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--sec); white-space: nowrap; }
.mt-tl-label-ruler { height: 22px; color: var(--mut); }
.mt-tl-label b { color: var(--lime); font-weight: 700; }
.mt-tl-label-name { white-space: pre; }
.mt-tl-body { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; touch-action: pan-y; }
.mt-ruler { height: 22px; position: relative; border-bottom: 1px solid rgba(11, 13, 18, 0.08); }
.mt-tick { position: absolute; bottom: 0; width: 1px; height: 7px; background: rgba(11, 13, 18, 0.22); left: var(--mt-x, 0%); }
.mt-tick span { position: absolute; bottom: 8px; left: 3px; font-size: 14px; color: var(--mut); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-lane { display: flex; align-items: stretch; height: 36px; background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.06); border-radius: 10px; overflow: hidden; }
.mt-lane-empty { flex: 1; display: flex; align-items: center; padding: 0 10px; font-size: 15px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-clip {
  flex: var(--mt-grow, 1) 1 0; min-width: 0; margin: 4px 0; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; border-radius: 7px; border: 1px solid rgba(11, 13, 18, 0.15); color: var(--text); text-align: left;
}
.mt-clip > span { overflow: hidden; text-overflow: ellipsis; }
.mt-clip > span:last-child { flex-shrink: 0; color: var(--sec); font-variant-numeric: tabular-nums; }
.mt-clip.vid { background: linear-gradient(90deg, rgba(217, 56, 30, 0.175), rgba(217, 56, 30, 0.09)); border-color: rgba(217, 56, 30, 0.33); }
.mt-clip.vid.is-image { background: linear-gradient(90deg, rgba(56,189,248,0.30), rgba(56,189,248,0.14)); border-color: rgba(56,189,248,0.5); }
.mt-clip.vid.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mt-clip.vid.has-fade { border-right: 3px solid var(--lime); }
.mt-clip.vid.has-flash { border-right: 3px solid var(--text); }
.mt-clip.bgm { background: rgba(244,114,182,0.18); border-color: rgba(244,114,182,0.5); color: #A51262; }
.mt-clip.sub { background: rgba(11, 13, 18, 0.045); border-color: rgba(11, 13, 18, 0.175); color: var(--lime); }
.mt-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 8px rgba(217, 56, 30, 0.5); pointer-events: none; left: var(--mt-x, 0%); z-index: 3; }
.mt-playhead::before { content: ''; position: absolute; top: 0; left: -5px; width: 12px; height: 9px; background: var(--lime); border-radius: 3px 3px 6px 6px; }

/* Сборка и результат */
.mt-result { grid-area: res; background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.mt-result[hidden], .mt-progress[hidden], .mt-done[hidden], .mt-error[hidden], .mt-prop-body[hidden] { display: none; }
.mt-error { font-size: 14px; color: #A5122D; background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.35); border-radius: 10px; padding: 10px 12px; line-height: 1.45; }
.mt-legacy { flex: 0 0 100%; display: flex; flex-direction: column; gap: 8px; }
.mt-legacy[hidden] { display: none; }
.mt-legacy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 10px; padding: 8px 12px; }
.mt-progress { display: flex; flex-direction: column; gap: 8px; }
.mt-progress-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.mt-progress-top strong { color: var(--lime); font-size: 15px; }
.mt-progress-track { height: 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; border: 1px solid rgba(11, 13, 18, 0.06); }
.mt-progress-bar { height: 100%; width: var(--mt-pct, 0%); background: var(--lime); border-radius: 999px; transition: width .5s ease; }
.mt-done { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mt-result-video { max-height: 420px; max-width: min(100%, 520px); border-radius: 14px; background: #050507; border: 1px solid rgba(255,255,255,0.12); }
.mt-done-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.mt-done-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; }

@media (max-width: 1320px) {
  .mt-wrap { grid-template-columns: 320px minmax(0, 1fr) 260px; }
}
@media (max-width: 1180px) {
  .mt-wrap { grid-template-columns: 280px minmax(0, 1fr) 250px; }
  .mt-monitor[data-aspect="9:16"] { height: calc(var(--mt-work) - 130px); }
  .mt-monitor[data-aspect="1:1"] { height: auto; width: 100%; }
}
@media (max-width: 900px) {
  #s-montage.screen.full-bleed { padding: 10px 10px 96px; }
  .mt-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "tl" "res" "insp" "media"; gap: 10px; }
  .mt-head { padding: 10px; gap: 8px; }
  .mt-title { font-size: 14px; }
  .mt-head > .mt-btn-lime { width: 100%; padding: 12px; font-size: 16px; }
  .mt-head-mid { width: 100%; justify-content: space-between; gap: 6px; }
  .mt-media, .mt-insp { height: auto; max-height: none; overflow: visible; }
  .mt-projects { width: 100%; }
  .mt-proj-btn { flex: 1; }
  .mt-proj-lbl { display: none; }
  .mt-proj-menu { width: 100%; max-width: 100%; }
  .mt-lib { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 330px; }
  .mt-monitor[data-aspect="9:16"] { height: 360px; }
  .mt-monitor[data-aspect="1:1"] { height: auto; width: min(100%, 340px); }
  .mt-timeline { padding: 10px; }
  .mt-tl-grid { grid-template-columns: 26px minmax(0, 1fr); gap: 6px; }
  .mt-tl-label { font-size: 14px; width: 26px; }
  .mt-tl-label-name { display: none; }
  .mt-tl-label-ruler { visibility: hidden; }
  .mt-chip { padding: 9px 12px; }
  .mt-btn-ghost { padding: 10px 12px; }
  .mt-range { height: 30px; }
  .mt-textarea, .mt-select { font-size: 16px; }
  .mt-done { flex-direction: column; align-items: stretch; }
  .mt-result-video { max-width: 100%; }
  .mt-done-side .mt-btn-lime { width: 100%; padding: 13px; }
}
@media (max-width: 420px) {
  .mt-lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mt-badge-dark { font-size: 14px; padding: 5px 8px; }
  .mtab { padding: 6px 3px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-flash.is-fade, .mt-flash.is-flash { animation: none; }
  .mt-progress-bar { transition: none; }
}

/* ── Статичная мобильная версия: страница не разъезжается по горизонтали и не зумится (обратная связь владельца 01.12) ── */
html, body { overflow-x: clip; overscroll-behavior-x: none; touch-action: pan-y; }
@media (max-width: 768px) {
  /* iOS Safari зумит страницу при фокусе в поле мельче 16px */
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]), textarea, select { font-size: 16px !important; }
  .hf-dock-input { font-size: 16px !important; }
}
@media (max-width: 760px) {
  /* Нижний таббар: крупные кнопки под палец, прокрутка только внутри самого таббара */
  .mobile-tabbar {
    justify-content: flex-start; gap: 6px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    touch-action: pan-x; overscroll-behavior-x: contain; scroll-behavior: smooth;
  }
  .mobile-tabbar::-webkit-scrollbar { display: none; }
  .mobile-tabbar .mtab {
    flex: 1 0 auto; justify-content: center; min-width: 66px; min-height: 48px;
    padding: 8px 10px; font-size: 14px; line-height: 1.2; letter-spacing: 0.01em; white-space: nowrap; touch-action: pan-x;
  }
  .float-composer { bottom: 70px; }
}

/* Модалка удаления аккаунта (Dark Cinema, без inline-стилей) */
.del-modal { gap: 12px; }
.del-modal-title { font-size: 16px; font-weight: 700; text-transform: uppercase; }
.del-modal-label { font-size: 14px; color: var(--sec); font-weight: 600; }
.del-modal-reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.del-modal-reasons .chip { min-height: 36px; }
.del-modal-reason { min-height: 84px; resize: vertical; line-height: 1.5; }
.del-modal-warn {
  font-size: 14px; color: var(--sec); line-height: 1.5;
  background: rgba(220, 38, 38, 0.08); border: 1px solid rgba(220, 38, 38, 0.28); border-radius: 12px; padding: 10px 12px;
}
.del-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.del-modal-actions > button { flex: 1 1 150px; min-height: 44px; }
.del-modal-actions > button:disabled { opacity: 0.55; cursor: default; }

/* ══════════════════════════════════════════════════════════════════════════════════════════════
   AIBOOM · СЛОЙ «МАКЕТ А · APPLE PURE WHITE» (утверждён владельцем 02.12.2026)
   Шапка с логотипом ab, бургер-меню, кнопки, поля, Агент, точечный коралл #D9381E, мобильный UX.
   ══════════════════════════════════════════════════════════════════════════════════════════════ */

/* Типографика: заголовки — Plus Jakarta Sans, текст — Inter */
.display { font-family: var(--display); letter-spacing: -0.025em; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; }
::selection { background: #FFC7BA; color: #0B0D12; }
textarea, input { caret-color: #D9381E; }
.v-card ::selection, #showcaseDetailModal ::selection,
.preset-hero ::selection, .mt-monitor ::selection,
.vr-stage ::selection { background: #D9381E; color: #FFFFFF; }

/* Шапка: полупрозрачная белая, логотип ab + aiboom */
.topnav { height: 68px; padding: 0 28px; background: rgba(255, 255, 255, 0.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.brand { gap: 9px; color: var(--text); }
.ab-svg { width: 32px; height: 32px; flex-shrink: 0; display: block; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.04em; color: var(--text); }
.burger-btn {
  display: none; width: 44px; height: 44px; min-width: 44px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  align-items: center; justify-content: center; transition: border-color .15s, background .15s;
}
.burger-btn:hover, .burger-btn:focus-visible { border-color: var(--border-str); background: var(--subtle); }
.burger-ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* Вкладки шапки: серая дорожка, активная — белая плашка с тенью (как в макете) */
.nav-tabs { border: none; background: var(--subtle); }
.nav-tab { font-weight: 600; font-size: 15px; padding: 8px 14px; color: var(--text); }
.nav-tab.active { background: #FFFFFF; color: var(--text); font-weight: 700; box-shadow: 0 2px 8px rgba(11, 13, 18, 0.08); }
.pill-new { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }

/* Кнопки: главное действие — глубокий чёрный с белым текстом; вторичные — белые с тонкой рамкой */
.btn-lime, .btn-ai { font-size: 15px; font-weight: 600; }
.btn-dark, .btn-danger { font-size: 15px; font-weight: 600; }
.btn-lime { background: var(--lime); color: var(--on-lime); box-shadow: none; }
.btn-lime::after { opacity: 0.16; }
.btn-lime:hover { filter: none; opacity: 0.9; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ai { background: var(--accent); color: #FFFFFF; box-shadow: none; }
.btn-ai:hover { box-shadow: 0 10px 26px rgba(217, 56, 30, 0.28); }
.btn-ghost { background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; padding: 8px 14px; }
.btn-dark { background: var(--surface); color: var(--text); border: 1px solid var(--border-str); }
.btn-dark:hover { border-color: var(--text); background: var(--subtle); }
.btn-credits { background: var(--surface); color: var(--text); border: 1px solid var(--border); font-size: 15px; font-weight: 600; padding: 8px 14px; }
.btn-credits:hover { border-color: var(--border-str); }
.btn-prof { background: var(--lime); color: var(--on-lime); border-color: var(--lime); font-size: 14px; font-weight: 700; padding: 5px 16px 5px 6px; }
.btn-prof:hover { opacity: 0.9; }
.btn-danger { background: #FEF2F2; }
.chip { font-size: 14px; }

/* Панели и карточки: белые, тонкая рамка, мягкая тень */
.panel { box-shadow: var(--shadow-sm); }
.models-strip-bar { background: var(--subtle); border: 1px solid var(--border); }
.s20-hero-panel { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.s20-hero-panel.is-focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217, 56, 30, 0.18), var(--shadow-md); }
.s20-eyebrow { background: var(--accent-soft); border: 1px solid transparent; color: var(--accent-ink); }
.s20-title span { color: var(--accent-ink); }
.s20-top-badge { background: var(--accent); color: #FFFFFF; box-shadow: none; }
.mega-badge.is-new { background: var(--subtle); color: var(--text); }
.mega-badge.is-top { background: var(--accent); color: #FFFFFF; }
.suno-hero-bar { background: var(--subtle); border: 1px solid var(--border); }
.mcp-hero-stage {
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  background: radial-gradient(ellipse at 50% 0%, rgba(217, 56, 30, 0.07) 0%, rgba(255, 255, 255, 0.96) 62%), radial-gradient(rgba(11, 13, 18, 0.10) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px;
}
.modal { box-shadow: var(--shadow-lg); }
.nav-mega-panel, .nav-more-menu, .hf-popover, .vr-pop { box-shadow: var(--shadow-lg); }
.site-footer { background: var(--surface); }
.footer-link:hover { color: var(--accent-ink); }
.toast { box-shadow: var(--shadow-md); }
.v-card, .s20-tile { border-color: transparent; box-shadow: 0 14px 32px rgba(11, 13, 18, 0.14); }
.hf-photo-card { box-shadow: 0 10px 26px rgba(11, 13, 18, 0.10); }

/* Поля ввода: белые, заметная рамка, фокус — угольный */
.v2-input, .photo-prompt-input, .v2-select, .ag-select, .vr-textarea, .mt-textarea, .mt-select, .ap-input, .ap-select, .ap-textarea, .hf-pop-search {
  background-color: var(--surface); border-color: var(--border-str); color: var(--text);
}
.v2-input::placeholder, .photo-prompt-input::placeholder, .ag-input::placeholder, textarea::placeholder, input::placeholder { color: var(--mut); }

/* Ход выполнения и активные статусы — коралл */
.v2-gen-bar-fill, .ag-run-fill, .mt-progress-bar, .p-fill { background: var(--accent); }
.v2-gen-stage-badge, .ag-run-pct, .mt-progress-top strong, .hf-photo-pending-badge { color: var(--accent-ink); }
.v2-gen-stage { border: 1.5px solid var(--border-str); box-shadow: var(--shadow-lg); }
.v2-gen-stage.is-err { border-color: rgba(220, 38, 38, 0.6); }
.hf-photo-pending, .hf-photo-card.is-fresh { outline-color: var(--accent); }
.v-result-spin, .hf-photo-pending-spin { border-color: rgba(217, 56, 30, 0.2); border-top-color: var(--accent); }
.ag-msg-meta .ag-dot, .ag-typing-dots span { background: var(--accent); }
.mt-playhead, .mt-playhead::before { background: var(--accent); }
/* Аватар диктора по умолчанию: тёмный коралл — белая буква читается с контрастом ≥ 4.5:1 (#C2371C 5.4:1, #D93A1E 4.6:1). */
.vr-orb { color: #FFFFFF; background: linear-gradient(135deg, #C2371C, #D93A1E); }
.vr-play.is-playing { background: var(--accent); color: #FFFFFF; }
.mt-lib-item.is-audio .mt-lib-thumb { background: #FCE7F3; color: #BE185D; }
.mt-lib-item.is-on { border-color: #DB2777; }
.mt-monitor .mt-empty { color: #C4C4CC; }
.mt-btn-lime, .mt-badge-lime, .mt-play { background: var(--lime); color: var(--on-lime); }

/* Тарифы: шапки карточек — угольная, коралловая и графитовая (вместо розово-фиолетовой авроры) */
.pink-badge { background: var(--accent); color: #FFFFFF; }
.strike-red { color: var(--sec); text-decoration: line-through; font-weight: 500; }

/* Баннер Claude × aiboom: тёплая светлая плашка вместо тёмной */
.hf-claude-banner {
  border-top: 1px solid rgba(217, 119, 87, 0.3); border-bottom: 1px solid rgba(217, 119, 87, 0.3);
  background: linear-gradient(105deg, #FFF8F5 0%, #FFEFE9 55%, #FFF6F2 100%); color: var(--text);
}
.hf-claude-banner:hover { border-color: rgba(217, 119, 87, 0.7); }
.hf-claude-aura { background: radial-gradient(circle, rgba(217, 119, 87, 0.18) 0%, rgba(217, 119, 87, 0) 70%); }
.hf-claude-mark { color: #FFFFFF; box-shadow: 0 8px 20px rgba(217, 119, 87, 0.32); }
.hf-claude-title { color: var(--text); }
.hf-claude-x { color: #C6613F; }
.hf-claude-badge { background: rgba(217, 119, 87, 0.14); border: 1px solid rgba(217, 119, 87, 0.4); color: #A8492A; }
.hf-claude-sub { color: var(--sec); }
.hf-claude-cta { background: var(--lime); color: var(--on-lime); box-shadow: none; }

/* Коралловая кнопка «Закрыть» (бургер-меню и панель Агента): 42×42, сразу видна */
.close-coral {
  width: 42px; height: 42px; min-width: 42px; border-radius: 999px; flex-shrink: 0;
  border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px rgba(217, 56, 30, 0.10); transition: background .15s, color .15s, transform .12s;
}
.close-coral:hover, .close-coral:focus-visible { background: var(--accent); color: #FFFFFF; outline: none; }
.close-coral:active { transform: scale(0.94); }
.close-coral-ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.6; stroke-linecap: round; }

/* Агент: белая панель, поле ввода на всю ширину с чёткой обводкой 2px, фокус — коралл */
.ag-rail, .hf-agent-rail { background: var(--subtle); }
.ag-empty-mark { width: auto; height: auto; border-radius: 0; display: inline-flex; }
.ag-empty-mark .ab-svg { width: 56px; height: 56px; }
.ag-composer, .hf-agent-composer {
  background: var(--surface); border: 2px solid #C3C8D4; border-radius: 20px; padding: 12px 14px;
  box-shadow: 0 12px 34px rgba(11, 13, 18, 0.06); transition: border-color .15s, box-shadow .15s;
}
.ag-composer:focus-within, .hf-agent-composer:focus-within { border-color: #D9381E; box-shadow: 0 12px 36px rgba(217, 56, 30, 0.14); }
.ag-input { font-size: 16px; }
.ag-starter { background: var(--surface); }
.ag-starter:hover { border-color: var(--accent); color: var(--accent-ink); }
.ag-card-price { background: var(--lime); color: var(--on-lime); }
.ag-drawer { background: var(--surface); box-shadow: -24px 0 60px rgba(11, 13, 18, 0.14); }
.ag-drawer .ag-composer { width: 100%; }
.ag-drawer-head { gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.ag-drawer-title { font-size: 14px; color: var(--text); }
.ag-drawer-close { margin-left: 2px; }
.ag-open-btn { color: var(--accent-ink); border-color: rgba(217, 56, 30, 0.35); background: var(--accent-soft); }

/* Мобильное бургер-меню: светлая панель слева, строки 48px / 16px */
.mnav-backdrop {
  position: fixed; inset: 0; z-index: 120; display: flex;
  background: rgba(11, 13, 18, 0.42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.mnav-backdrop[hidden] { display: none; }
.mnav-panel {
  width: 308px; max-width: 86%; height: 100%; background: #FFFFFF; overflow-y: auto; overscroll-behavior: contain;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 16px 0 48px rgba(11, 13, 18, 0.18); animation: mnavSlide 0.2s ease-out;
}
@keyframes mnavSlide { from { transform: translateX(-28px); opacity: 0.6; } to { transform: translateX(0); opacity: 1; } }
.mnav-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px 12px 6px; border-bottom: 1px solid var(--border); }
.mnav-brand { cursor: default; }
.mnav-list, .mnav-foot { display: flex; flex-direction: column; gap: 4px; }
.mnav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.mnav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px;
  padding: 12px 14px; border-radius: 14px; font-size: 16px; font-weight: 700; color: var(--text); text-align: left;
  transition: background .15s, color .15s;
}
.mnav-link:hover { background: var(--subtle); }
.mnav-link.active { background: var(--lime); color: var(--on-lime); }
.mnav-link.is-agent { color: var(--accent-ink); }
.mnav-link.is-agent.active { background: var(--accent); color: #FFFFFF; }
.mnav-badge { font-size: 14px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.mnav-cta {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 6px;
  padding: 12px 14px; border-radius: 999px; font-size: 16px; font-weight: 700; background: var(--lime); color: var(--on-lime);
}
body.mnav-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .mnav-panel { animation: none; } }

/* ── Телефон и планшет (<= 900px): бургер слева сверху вместо нижней полосы, крупнее шрифты и зоны нажатия ── */
@media (max-width: 900px) {
  .topnav { height: 60px; padding: 0 12px; gap: 8px; }
  .burger-btn { display: inline-flex; }
  .nav-tabs, .lang-btn, .nav-right .btn-ghost[data-act="openSupport"] { display: none; }
  .brand-name { font-size: 19px; }
  .ab-svg { width: 30px; height: 30px; }
  /* Нижняя полоса вкладок на телефоне убрана: разделы открываются из бургер-меню */
  .mobile-tabbar[aria-label] { display: none; }
  .screen, .screen.full-bleed { padding-bottom: 36px; }
  .site-footer { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
  .float-composer { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .tools-with-dock { padding-bottom: 190px; }
  svg.ic { width: 18px; height: 18px; }
  svg.ic-lg { width: 20px; height: 20px; }
  .btn-credits { min-height: 44px; padding: 8px 14px; font-size: 15px; }
  .btn-ghost { min-height: 44px; padding: 8px 14px; font-size: 15px; }
  .btn-lime, .btn-ai, .btn-dark, .btn-danger { min-height: 44px; font-size: 15px; }
  .chip { min-height: 44px; padding: 8px 14px; font-size: 14px; }
  .sec-title { font-size: 17px; }
  .models-strip-text { font-size: 14px; }
  .models-strip-bar { padding: 10px 12px; gap: 8px; }
  .models-strip-links { width: 100%; gap: 6px; flex-wrap: nowrap; }
  .models-strip-links .chip { flex: 1 1 0; min-width: 0; justify-content: center; padding: 6px 4px; font-size: 14px; line-height: 1.25; text-align: center; text-wrap: balance; }
  .models-strip-bar .s20-top-badge { white-space: nowrap; }
  .footer-link { min-height: 44px; }
  .ag-input { font-size: 16px; min-height: 52px; }
  .ag-composer-bar .chip { min-height: 44px; font-size: 14px; }
  .ag-drawer { padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .ag-drawer-head .chip { min-width: 44px; justify-content: center; }
  .ag-starter { min-height: 44px; font-size: 15px; }
}

/* Вариант А · Кино-Hero на Главной: тёмный ролик MAGI-2 в скруглённом окне на белой странице.
   Постер — фоном контейнера (свой для телефона), поэтому телефон не тянет широкие файлы. */
.ab-hero {
  position: relative; display: flex; align-items: center; overflow: hidden; isolation: isolate;
  height: 340px; min-height: 310px; max-height: 380px; margin: 0 0 18px; border-radius: 22px;
  background: #090A0E url('https://media.getaireels.com/v2/media/hero_reel_wide.jpg') center / cover no-repeat;
  box-shadow: 0 18px 44px rgba(11, 13, 18, 0.16);
}
.ab-hero-video { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ab-hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(95deg, rgba(9,10,14,0.88) 0%, rgba(9,10,14,0.58) 54%, rgba(9,10,14,0.18) 100%);
}
.ab-hero-content {
  position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  width: 100%; max-width: 580px; padding: 28px 36px; color: #fff; text-shadow: 0 1px 14px rgba(9, 10, 14, 0.6);
}
.ab-hero-pill {
  display: inline-flex; align-items: center; min-height: 26px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.34); color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: 0.08em; line-height: 1.3;
}
.ab-hero-title { margin: 0; color: #fff; font-size: clamp(28px, 3.3vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.ab-hero-sub { margin: 0; color: rgba(255, 255, 255, 0.92); font-size: 16px; line-height: 1.45; }
.ab-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.ab-hero-btn-primary, .ab-hero-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap; cursor: pointer; text-shadow: none;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
/* Глубокий коралл: белая подпись 14–15px — контраст 4.83:1, при наведении 6.22:1 (WCAG 1.4.3 AA для обычного текста ≥ 4.5:1). */
.ab-hero-btn-primary { background: #D9381E; color: #FFFFFF; border: 1px solid #D9381E; box-shadow: 0 10px 26px rgba(217, 56, 30, 0.38); }
.ab-hero-btn-primary:hover { background: #B92810; transform: translateY(-1px); }
.ab-hero-btn-ghost { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.34); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ab-hero-btn-ghost:hover { background: rgba(255, 255, 255, 0.26); }
.ab-hero-btn-primary:focus-visible, .ab-hero-btn-ghost:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* Пауза / воспроизведение ролика Hero (WCAG 2.2.2): значок меняется по data-paused, true — ролик на паузе. */
.ab-hero-toggle {
  position: absolute; top: 14px; right: 14px; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0; border-radius: 999px; cursor: pointer; color: #FFFFFF;
  background: rgba(9, 10, 14, 0.6); border: 1px solid rgba(255, 255, 255, 0.34);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background 0.16s ease;
}
.ab-hero-toggle:hover { background: rgba(9, 10, 14, 0.78); }
.ab-hero-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ab-hero-toggle svg { display: block; width: 18px; height: 18px; fill: currentColor; pointer-events: none; }
.ab-hero-toggle .ab-hero-ico-play, .ab-hero-toggle[data-paused="true"] .ab-hero-ico-pause { display: none; }
.ab-hero-toggle[data-paused="true"] .ab-hero-ico-play { display: block; }
@media (max-width: 720px) {
  .ab-hero {
    align-items: flex-end; height: auto; min-height: 320px; max-height: none; margin-bottom: 14px; border-radius: 20px;
    background-image: url('https://media.getaireels.com/v2/media/hero_reel_mob.jpg');
  }
  .ab-hero-scrim { background: linear-gradient(180deg, rgba(9,10,14,0.18) 0%, rgba(9,10,14,0.52) 45%, rgba(9,10,14,0.92) 100%); }
  .ab-hero-content { max-width: none; min-width: 0; gap: 9px; padding: 72px 16px 16px; }
  .ab-hero-pill { font-size: 14px; letter-spacing: 0.06em; }
  .ab-hero-title { font-size: 25px; line-height: 1.12; overflow-wrap: anywhere; }
  .ab-hero-sub { font-size: 14px; line-height: 1.4; }
  .ab-hero-actions { width: 100%; gap: 8px; margin-top: 4px; }
  .ab-hero-btn-primary, .ab-hero-btn-ghost { flex: 1 1 auto; min-height: 46px; padding: 0 14px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-hero-btn-primary, .ab-hero-btn-ghost, .ab-hero-toggle { transition: none; }
  .ab-hero-btn-primary:hover { transform: none; }
}
/* ══ aiboom · правки после ревью Codex и приёмки в браузере (десктоп + iPhone 390px) ══ */
/* «Фото»: подпись карточки лежит НАД затемнением .v-card::after (раньше градиент красил и сам текст — белый выглядел серым). */
#s-tools .hf-photo-top, #s-tools .hf-photo-hover { z-index: 2; }
#s-tools .hf-photo-hover .v-name { color: #FFFFFF; }
#s-tools .hf-photo-hover .v-meta { color: rgba(255, 255, 255, 0.86); }
#s-tools .hf-photo-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#s-tools .hf-photo-pill:not(.is-lime) { flex-shrink: 0; }
/* «Агент»: у списка моделей ровно одна стрелка — свой шеврон, родная стрелка браузера выключена во всех движках. */
.ag-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A4D57' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-position: right 11px center; background-size: 12px 12px; background-repeat: no-repeat;
}
.ag-select::-ms-expand { display: none; }
@media (max-width: 900px) {
  /* «Видео»: нижней полосы вкладок больше нет — кнопка «Создать» прилипает к самому низу экрана на сплошной матовой
     подложке во всю ширину формы: «Длительность» и «Формат» уходят под сплошную полосу, а не просвечивают по краям кнопки.
     Запас снизу у формы не добавляем: кнопка — последний элемент, в конце прокрутки она встаёт на своё место под плитками,
     а лишние 104px давали пустой серый блок под кнопкой (проверено на 390px). Списки открываются вверх и лежат выше кнопки. */
  .hf-v-scroll { padding-bottom: 0; }
  .hf-v-sticky-cta {
    position: sticky; bottom: 0; z-index: 15;
    margin: 0 -12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(11, 13, 18, 0.10);
  }
}
@media (max-width: 640px) {
  #s-tools .hf-photo-top { top: 6px; left: 6px; right: 6px; gap: 4px; }
  #s-tools .hf-photo-pill { font-size: 14px; padding: 3px 7px; max-width: 62%; }
  /* «Агент»: панель под полем ввода — одна строка, «↑» справа. */
  .ag-composer-bar { flex-wrap: nowrap; gap: 6px; }
  .ag-composer-bar .chip-row { flex-wrap: nowrap; min-width: 0; flex: 1 1 auto; gap: 4px; }
  .ag-composer-bar .chip { padding: 6px 9px; gap: 4px; font-size: 14px; min-width: 0; white-space: nowrap; flex-shrink: 1; overflow: hidden; }
  .ag-composer-bar .chip svg.ic { width: 14px; height: 14px; }
  .ag-composer-bar .chip span { overflow: hidden; text-overflow: ellipsis; }
  .ag-composer-bar .ag-send { margin-left: auto; flex-shrink: 0; padding: 6px 10px; font-size: 14px; min-width: 44px; justify-content: center; }
  /* «Агент», пустой чат: приветствие целиком помещается в окно чата, у логотипа ab запас сверху — верх буквы b не срезается. */
  .ag-empty { gap: 10px; padding: 8px 0 10px; }
  .ag-empty-mark { padding-top: 8px; overflow: visible; }
  .ag-empty-mark .ab-svg { overflow: visible; }
}
@media (max-width: 380px) {
  /* Узкие телефоны (360px): у микрофона остаётся значок (подпись есть в aria-label) — три кнопки и «↑» помещаются без обрезки. */
  .ag-composer-bar .v2-mic-btn span { display: none; }
}

/* ══ ИИ-АГЕНТ: поле ввода по центру пустого экрана → внизу активного чата; голос ответа ══
   Лента и нижний запас делят свободное место поровну (поле по центру). С первым сообщением запас сжимается до нуля:
   поле плавно уходит вниз, лента раскрывается над ним. */
.ag-shell .ag-stage::after { content: ''; flex: 1 1 0; min-height: 0; transition: flex-grow .42s cubic-bezier(.22, .8, .24, 1); }
.ag-shell.is-chat-active .ag-stage::after { flex-grow: 0.0001; }
.ag-shell .ag-stage { gap: 0; }
.ag-shell .ag-topbar { padding-bottom: 8px; }
.ag-shell .ag-log { flex: 1 1 0; transition: opacity .3s ease; }
.ag-shell.is-chat-empty .ag-log { opacity: 0; padding: 0; overflow: hidden; pointer-events: none; }
.ag-hero-mark { display: block; text-align: center; line-height: 0; max-height: 80px; padding-bottom: 16px; flex-shrink: 0; overflow: hidden; transition: max-height .42s ease, padding .42s ease, opacity .22s ease; }
.ag-hero-mark .ab-svg { width: 56px; height: 56px; margin: 0 auto; }
.ag-hero-title {
  margin: 0; text-align: center; font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--text); flex-shrink: 0;
  max-height: 120px; padding-bottom: 24px; overflow: hidden; transition: max-height .42s ease, padding .42s ease, opacity .22s ease;
}
.ag-hero-starters {
  width: min(760px, 100%); margin: 0 auto; flex-shrink: 0; max-height: 240px; padding-top: 16px; overflow: hidden;
  transition: max-height .42s ease, padding .42s ease, opacity .22s ease;
}
.ag-shell.is-chat-active .ag-hero-mark, .ag-shell.is-chat-active .ag-hero-title, .ag-shell.is-chat-active .ag-hero-starters { max-height: 0; padding: 0; opacity: 0; visibility: hidden; }
.ag-hero-starters .ag-starter { background: transparent; border: 1px solid var(--border); color: var(--sec); font-weight: 500; padding: 8px 14px; }
.ag-hero-starters .ag-starter:hover { border-color: var(--border-str); color: var(--text); background: var(--subtle); }
.ag-composer.ag-composer-slim {
  border: 1px solid #DDDFE6; border-radius: 28px; padding: 7px 8px; gap: 8px; box-shadow: 0 6px 24px rgba(17, 18, 22, 0.07);
}
.ag-composer.ag-composer-slim:focus-within { border-color: var(--accent); }
.ag-composer-slim .ag-attach-row { padding: 8px 8px 0; }
.ag-slim-row { display: flex; align-items: flex-end; gap: 2px; min-width: 0; }
.ag-slim-row .ag-input { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 11px 6px; font-size: 16px; line-height: 22px; }
.ag-ico, .ag-send.ag-send-round {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; transition: background .15s, color .15s;
}
.ag-ico { background: transparent; color: var(--sec); }
.ag-ico:hover { background: var(--subtle); color: var(--text); }
.ag-ico .ic, .ag-send-round .ic { width: 20px; height: 20px; }
.ag-send.ag-send-round { background: var(--accent); color: #FFFFFF; margin-left: 2px; }
.ag-send.ag-send-round:hover { background: var(--text); }
.ag-ico:focus-visible, .ag-send-round:focus-visible, .ag-listen:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ag-voice-ico { color: var(--accent-ink); }
.ag-voice-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); background: #FFFFFF; border-color: rgba(217, 56, 30, 0.35); }
.ag-voice-toggle .ic { width: 16px; height: 16px; }
.ag-voice-toggle.is-off, .ag-voice-ico.is-off { color: var(--sec); border-color: var(--border-str); }
.ag-speaking { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; font-size: 14px; font-weight: 600; color: var(--sec); }
.ag-speaking[hidden] { display: none; }
.ag-speaking-bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.ag-speaking-bars i { width: 3px; height: 6px; border-radius: 2px; background: var(--accent); animation: agSpeakBar .9s infinite ease-in-out; }
.ag-speaking-bars i:nth-child(2) { animation-delay: .15s; }
.ag-speaking-bars i:nth-child(3) { animation-delay: .3s; }
@keyframes agSpeakBar { 0%, 100% { height: 5px; } 50% { height: 14px; } }
.ag-speaking-stop { border: 1px solid var(--border-str); background: #FFFFFF; color: var(--text); border-radius: 999px; min-height: 30px; padding: 0 12px; font: inherit; cursor: pointer; }
.ag-msg-foot { display: flex; align-items: center; gap: 8px; }
.ag-listen {
  width: 34px; height: 34px; border: none; border-radius: 50%; background: transparent; color: var(--mut); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; margin-left: -8px;
}
.ag-listen:hover { background: var(--subtle); color: var(--text); }
.ag-listen.is-speaking { color: var(--accent-ink); }
.ag-listen .ic { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .ag-hero-title { font-size: 25px; padding-bottom: 18px; }
  .ag-slim-row .ag-input { min-height: 44px; }
  .ag-listen { width: 44px; height: 44px; }
  .ag-speaking-stop { min-height: 36px; }
  .ag-shell .ag-stage { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 640px) {
  .ag-shell .ag-stage { padding-left: 0; padding-right: 0; }
  .ag-shell .ag-topbar { gap: 5px; }
  .ag-shell .ag-topbar .chip { padding: 5px 9px; font-size: 14px; min-height: 40px; }
  .ag-shell .ag-creator-badge { padding: 7px 10px; }
  .ag-slim-row { gap: 0; }
  .ag-slim-row .ag-input { padding-left: 2px; padding-right: 2px; }
  .ag-hero-starters .ag-starter { font-size: 14px; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-shell .ag-stage::after, .ag-shell .ag-log, .ag-hero-mark, .ag-hero-title, .ag-hero-starters { transition: none; }
  .ag-speaking-bars i { animation: none; }
}

/* ══ ИИ-АГЕНТ: «Следующие шаги» ══ */
.ag-steps { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; max-width: 100%; }
.ag-steps-title { font-size: 14px; line-height: 1.4; color: #3F4451; padding: 0 0 4px 2px; }
.ag-step {
  display: inline-flex; align-items: flex-start; gap: 12px; max-width: 100%; min-height: 44px; padding: 10px 16px 10px 10px; border: none; border-radius: 12px;
  background: transparent; color: #0B0D12; font: inherit; font-size: 16px; font-weight: 600; line-height: 24px; text-align: left; cursor: pointer;
  touch-action: manipulation; transition: background .15s;
}
.ag-step span { min-width: 0; overflow-wrap: anywhere; }
.ag-step .ic { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; color: #3F4451; }
.ag-step:hover { background: #ECEDF1; }
.ag-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ══ ИИ-АГЕНТ: источники поиска Google ══ */
.ag-srcs { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; max-width: 100%; }
.ag-src-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font-size: 14px; line-height: 1.5; color: #3F4451; }
.ag-src-title { font-weight: 600; }
.ag-src { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #C9CCD6; }
.ag-src:hover { color: #0B0D12; }
.ag-src:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ══ ИИ-АГЕНТ: широкий диалог и крупный текст ══ */
.ag-shell .ag-log { padding-left: 0; padding-right: 0; gap: 28px; }
.ag-shell .ag-msg, .ag-shell .ag-composer, .ag-shell .ag-hero-starters { max-width: 1080px; width: 92%; }
.ag-shell .ag-bubble { font-size: 18px; line-height: 1.6; color: #0B0D12; }
.ag-shell .ag-msg-user .ag-bubble { max-width: 80%; padding: 12px 18px; }
.ag-shell .ag-bubble strong { font-size: 20px; line-height: 1; font-weight: 700; }
.ag-shell .ag-bubble strong.ag-h { display: inline-block; line-height: 1.4; padding-top: 4px; }
.ag-shell .ag-msg-err .ag-bubble { color: #A5122D; }
.ag-shell .ag-slim-row .ag-input { font-size: 17px; line-height: 26px; padding-top: 9px; padding-bottom: 9px; color: #0B0D12; }
.ag-shell .ag-slim-row .ag-input::placeholder { color: #5B6070; }
.ag-shell .ag-msg-meta, .ag-shell .ag-msg-time, .ag-shell .ag-typing-text, .ag-shell .ag-typing-cancel, .ag-shell .ag-speaking,
.ag-shell .ag-card-tag, .ag-shell .ag-card-prompt, .ag-shell .ag-card-prompt summary, .ag-shell .ag-run-row, .ag-shell .ag-run-note, .ag-shell .ag-run-err,
.ag-shell .ag-card-price, .ag-shell .ag-card-sel, .ag-shell .ag-track-title, .ag-shell .ag-card-actions .btn-lime, .ag-shell .ag-card-actions .btn-dark,
.ag-shell .ag-card-prompt-tools .btn-dark, .ag-shell .ag-topbar .chip, .ag-shell .ag-creator-badge, .ag-shell .ag-starter,
.ag-shell .hf-rail-new, .ag-shell .ag-chat-open, .ag-shell .ag-chat-empty, .ag-shell .hf-rail-label, .ag-shell .ag-balance-row, .ag-shell .ag-balance-row strong,
.ag-shell .ag-safe-title, .ag-shell .ag-safe-sub, .ag-shell .ag-topup-link { font-size: 14px; }
.ag-shell .ag-msg-meta, .ag-shell .ag-msg-time, .ag-shell .ag-typing-text, .ag-shell .ag-speaking, .ag-shell .ag-card-tag, .ag-shell .ag-card-prompt,
.ag-shell .ag-run-row, .ag-shell .ag-run-note, .ag-shell .ag-chat-open, .ag-shell .ag-chat-empty, .ag-shell .hf-rail-label, .ag-shell .ag-balance-row,
.ag-shell .ag-safe-sub, .ag-shell .ag-topup-link, .ag-shell .ag-listen { color: #3F4451; }
.ag-shell .ag-listen.is-speaking { color: var(--accent-ink); }
.ag-shell .ag-chat-item.active .ag-chat-open { color: #0B0D12; }
.ag-shell .ag-msg-meta, .ag-shell .ag-msg-time { letter-spacing: 0; }
.ag-shell .ag-card-title { font-size: 16px; }
.ag-drawer .ag-bubble { font-size: 16px; line-height: 1.6; color: #0B0D12; }
.ag-drawer .ag-msg-err .ag-bubble { color: #A5122D; }
.ag-drawer .ag-input { font-size: 16px; }
.ag-drawer .ag-msg-meta, .ag-drawer .ag-msg-time { font-size: 14px; letter-spacing: 0; color: #3F4451; }
@media (max-width: 900px) {
  .ag-shell .ag-msg, .ag-shell .ag-composer, .ag-shell .ag-hero-starters { width: 100%; }
  .ag-shell .ag-log { gap: 22px; }
  .ag-shell .ag-msg-user .ag-bubble { max-width: 90%; }
}
@media (max-width: 640px) {
  /* Телефон: текст во всю ширину, кнопки строкой ниже. «Мои работы» есть в Кабинете, верхняя строка не переносится. */
  .ag-shell .ag-slim-row { flex-wrap: wrap; }
  .ag-shell .ag-slim-row .ag-input { flex: 1 0 100%; order: -1; padding-left: 10px; padding-right: 10px; }
  .ag-shell .ag-slim-row .v2-mic-btn { margin-left: auto; }
  .ag-shell .ag-topbar .ag-works-link { display: none; }
}

/* ══ ВКЛАДКА «АВТОПОСТИНГ» (Вариант 3 «Автопилот-Конвейер») ══ */
.ap-wrap { max-width: 90rem; margin: 0 auto; padding: 6px 8px 28px; position: relative; z-index: 1; }
.ap-wrap .ic { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ap-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.ap-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--sec); background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.1); white-space: nowrap;
}
.ap-badge:empty { display: none; }
.ap-badge-lime { color: var(--lime); background: rgba(11, 13, 18, 0.036); border-color: rgba(11, 13, 18, 0.122); font-weight: 700; }
.ap-badge-warn { color: #A56C12; background: rgba(255,170,60,0.10); border-color: rgba(255,170,60,0.35); }
.ap-tiktok { display: grid; gap: 8px; }
.ap-consent { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.ap-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--lime); cursor: pointer; }
.ap-item.is-partial { border-color: rgba(255,170,60,0.35); }
.ap-badge-err { color: var(--danger); background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.35); }
.ap-status {
  margin-bottom: 14px; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; color: var(--text);
  background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.1);
}
.ap-status.is-warn { border-color: rgba(255,170,60,0.40); background: rgba(255,170,60,0.07); }
.ap-status.is-err { border-color: rgba(220, 38, 38, 0.45); background: rgba(220, 38, 38, 0.07); }
.ap-connect, .ap-brand-form {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.1);
}
.ap-brand-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-connect[hidden], .ap-brand-form[hidden], .ap-status[hidden], .ap-plan[hidden] { display: none; }
.ap-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ap-kpi { background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.ap-kpi-lbl { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); margin-bottom: 6px; }
.ap-kpi-val { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.ap-kpi-val.is-lime { color: var(--lime); }
.ap-kpi-sub { font-size: 14px; color: var(--sec); margin-top: 4px; min-height: 15px; }
.ap-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.ap-h2 { font-size: 18px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); }
.ap-rule { margin-top: 14px; }
.ap-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.ap-card { background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.08); border-radius: 16px; padding: 16px; min-width: 0; }
.ap-lbl {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
  font-size: 14px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--mut);
}
.ap-lbl .mt-btn-ghost { text-transform: none; letter-spacing: 0; }
.ap-text { font-size: 16px; color: var(--sec); line-height: 1.5; margin-bottom: 4px; }
.ap-sub { font-size: 16px; font-weight: 600; color: var(--sec); margin: 12px 0 6px; }
.ap-hint { font-size: 16px; color: var(--mut); line-height: 1.45; }
.ap-hint:empty { display: none; }
.ap-hint.is-err { color: var(--danger); }
.ap-hint.is-ok { color: var(--ok); }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 9px; font-size: 16px; font-weight: 600;
  color: var(--sec); background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.1); transition: .15s; min-height: 34px;
}
.ap-chip:hover { border-color: var(--border-str); color: var(--text); }
.ap-chip.is-on { background: rgba(217, 56, 30, 0.1); border-color: rgba(217, 56, 30, 0.5); color: var(--accent-ink); font-weight: 700; }
.ap-chip.is-linked::after { content: ''; width: 6px; height: 6px; border-radius: 999px; background: var(--ok); }
.ap-chip-x { display: inline-flex; padding: 2px; margin: -2px -4px -2px 0; border-radius: 6px; color: inherit; opacity: .7; }
.ap-chip-x:hover { opacity: 1; color: var(--danger); }
.ap-chip-x .ic { width: 12px; height: 12px; }
.ap-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ap-row-end { margin-top: 14px; margin-bottom: 8px; }
.ap-input, .ap-select, .ap-textarea {
  background: var(--surface); color: var(--text); border: 1px solid rgba(11, 13, 18, 0.12); border-radius: 10px; padding: 8px 10px;
  font: inherit; font-size: 16px; min-height: 36px;
}
.ap-input:focus, .ap-select:focus, .ap-textarea:focus { outline: none; border-color: rgba(217, 56, 30, 0.55); }
.ap-input-time { width: 112px; color-scheme: light; }
.ap-input-dt { color-scheme: light; }
.ap-select-wide { width: 100%; }
.ap-textarea { width: 100%; min-height: 64px; resize: vertical; line-height: 1.45; margin-top: 8px; }
.ap-file { display: none; }
.ap-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--ok); text-transform: none; letter-spacing: 0; }
.ap-switch input { accent-color: var(--lime); width: 15px; height: 15px; }
.ap-switch.is-off { color: var(--mut); }
.ap-queue { display: flex; flex-direction: column; gap: 8px; }
/* Готовые ролики: 2 карточки в ряд, остальные — горизонтальной прокруткой, а не вниз по странице */
.ap-ready {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 12px) / 2); gap: 12px; position: relative;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; margin-top: 8px;
}
.ap-ready::-webkit-scrollbar { display: none; }
.ap-ready > .ap-empty { grid-column: 1 / -1; width: 100%; }
.ap-ready:has(> .ap-empty) { display: block; }
.ap-rcard { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.ap-rcard .ap-seg { display: flex; margin-top: 0; }
.ap-rcard .ap-seg-btn { flex: 1; padding: 6px 4px; }
.ap-rcard .ap-textarea { flex: 1; margin-top: 0; min-height: 92px; }
.ap-rcard-go { width: 100%; min-height: 46px; }
.ap-link { align-self: flex-start; min-height: 32px; color: var(--text); font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.ap-link:disabled { opacity: .4; cursor: not-allowed; }
.ap-car-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.ap-car-nav[hidden] { display: none; }
.ap-icon-btn.ap-car-btn { width: 44px; height: 44px; font-size: 20px; }
.ap-car-pos { min-width: 96px; text-align: center; font-size: 16px; color: var(--sec); font-variant-numeric: tabular-nums; }
/* Лента: день и время, площадки, статус */
.ap-slot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); }
.ap-slot.is-free { border-style: dashed; border-color: var(--border-str); }
.ap-slot-text { flex: 1; min-width: 120px; font-size: 16px; color: var(--sec); overflow: hidden; text-overflow: ellipsis; }
.ap-slot-when { font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ap-slot-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.ap-badge-ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; font-weight: 700; }
@media (min-width: 1061px) { .ap-queue { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; } }
.ap-empty { padding: 18px 12px; border-radius: 12px; border: 1px dashed rgba(11, 13, 18, 0.14); font-size: 16px; color: var(--mut); line-height: 1.5; text-align: center; }
.ap-empty .mt-btn-ghost { margin-top: 10px; }
.ap-item { padding: 10px 12px; border-radius: 12px; background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.07); min-width: 0; }
.ap-item.is-new { border-color: rgba(217, 56, 30, 0.5); box-shadow: 0 0 0 1px rgba(217, 56, 30, 0.1); }
.ap-item.is-failed { border-color: rgba(220, 38, 38, 0.4); }
.ap-item-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ap-thumb {
  width: 38px; height: 50px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; color: var(--mut);
  background: linear-gradient(160deg, var(--elevated), var(--subtle)); border: 1px solid rgba(11, 13, 18, 0.08);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 700;
}
.ap-item-body { flex: 1; min-width: 0; }
.ap-item-title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-item-meta { font-size: 16px; color: var(--mut); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ap-item-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.ap-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ap-icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--sec);
  background: var(--subtle); border: 1px solid rgba(11, 13, 18, 0.08); transition: .15s;
}
.ap-icon-btn:hover { color: var(--text); border-color: var(--border-str); }
.ap-icon-btn.is-danger:hover { color: var(--danger); border-color: var(--danger); }
.ap-icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.ap-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid rgba(11, 13, 18, 0.1); margin-top: 8px; }
.ap-seg-btn { padding: 6px 11px; border-radius: 7px; font-size: 16px; font-weight: 600; color: var(--sec); min-height: 30px; }
.ap-seg-btn.is-on { background: var(--lime); color: var(--on-lime); font-weight: 700; }
.ap-edit { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(11, 13, 18, 0.07); }
.ap-plan {
  margin-top: 14px; padding: 14px 16px; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(11, 13, 18, 0.03), rgba(11, 13, 18, 0.006)); border: 1px solid rgba(11, 13, 18, 0.1);
}
.ap-plan.is-flash { box-shadow: 0 0 0 2px rgba(11, 13, 18, 0.165); }
.ap-plan-title { display: block; font-size: 14px; margin-bottom: 8px; }
.ap-plan-rows { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 1060px) {
  .ap-main, .ap-rule-grid { grid-template-columns: minmax(0, 1fr); }
  .ap-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ap-wrap { padding: 2px 0 20px; }
  .ap-title { font-size: 15px; }
  .ap-head-actions, .ap-head-actions .mt-btn-lime { width: 100%; }
  .ap-kpi { padding: 12px; }
  .ap-kpi-val { font-size: 16px; }
  .ap-queue .ap-item-top { flex-wrap: wrap; }
  .ap-ready { grid-auto-columns: min(86%, 320px); }
  .ap-item-actions { width: 100%; justify-content: flex-end; }
  .ap-icon-btn { width: 40px; height: 40px; }
  .ap-chip { min-height: 40px; padding: 9px 12px; }
  .ap-seg-btn { min-height: 38px; }
  .ap-plan .mt-btn-lime { width: 100%; }
}

/* ── Валюта витрины (₸ KZT | $ USD) и «Продолжить с Google» ── */
.cur-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-str); }
.cur-btn { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--sec); background: transparent; border: 0; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .15s, color .15s; }
.cur-btn:hover { color: var(--text); }
.cur-btn.active { background: var(--text); color: #FFFFFF; }
.cur-btn:focus-visible, .auth-google-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-google-box { display: flex; flex-direction: column; gap: 12px; }
.auth-google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 46px; padding: 11px 16px; border-radius: 12px; background: #FFFFFF; color: #1F1F1F; border: 1px solid #DADCE0; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s; }
.auth-google-btn:hover { background: #F8FAFD; box-shadow: 0 1px 3px rgba(60, 64, 67, 0.2); }
.auth-google-ic { width: 20px; height: 20px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--mut); text-transform: lowercase; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border-str); }
.auth-tg-tab { flex: 1; justify-content: center; align-items: center; gap: 6px; }
.auth-tg-tab[hidden], .auth-tg-step[hidden], .auth-tg-status[hidden], #authTgRetryBtn[hidden] { display: none; }
.auth-tg-ic { width: 14px; height: 14px; flex: none; }
.auth-tg-label { font-size: 14px; color: var(--sec); font-weight: 600; line-height: 1.45; }
.auth-tg-open { display: flex; align-items: center; justify-content: center; width: 100%; text-align: center; text-decoration: none; }
.auth-tg-open[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.auth-tg-step { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
#authTgOtpInput { text-align: center; font-size: 20px; font-weight: 600; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
#authTgOtpInput::placeholder { font-size: 14px; font-weight: 400; letter-spacing: normal; }
.auth-tg-status { font-size: 14px; color: var(--sec); line-height: 1.45; text-align: center; }
.auth-err { padding: 10px 12px; border-radius: 10px; background: rgba(217, 56, 30, 0.08); border: 1px solid rgba(217, 56, 30, 0.35); color: var(--text); font-size: 14px; line-height: 1.45; }

/* Баннер Claude × MCP живёт наверху вкладки MCP */
#s-mcp .hf-claude-banner { margin-bottom: 18px; }

/* ══ Вариант A: Мобильная шапка (Тарифы + Войти / Кабинет), Оранжевые тарифы, История оплат в Кабинете ══ */
.btn-prof {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 999px; cursor: pointer; font: inherit; white-space: nowrap;
  background: var(--lime); color: #FFFFFF; border: 1px solid var(--lime);
  font-size: 15px; font-weight: 600; padding: 8px 16px; min-height: 40px;
  transition: background 0.16s ease, opacity 0.16s ease;
}
.btn-prof:hover { opacity: 0.9; }
.btn-prof .prof-ic {
  width: 17px; height: 17px; stroke: currentColor; fill: none;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}
.btn-prof.is-guest .prof-ic { display: none; }
.btn-prof.is-authed { background: var(--surface); color: var(--text); border: 1.5px solid var(--border-str); }
.btn-prof.is-authed:hover { background: var(--subtle); }
.btn-prof.active { background: var(--lime); color: #FFFFFF; border-color: var(--lime); }

@media (max-width: 900px) {
  .nav-right { gap: 6px; min-width: 0; }
  .btn-credits { min-height: 40px; min-width: 0; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; padding: 6px 11px; font-size: 14px; gap: 5px; }
  .credits-pill-suffix { display: none; }
  .btn-prof { display: inline-flex; min-height: 40px; flex-shrink: 0; }
  .btn-prof.is-guest { padding: 0 13px; font-size: 14px; }
  .btn-prof.is-authed { width: 40px; min-width: 40px; padding: 0; }
  .btn-prof.is-authed #profileNavLabel { display: none; }
  .btn-prof.is-authed .prof-ic { display: block; width: 19px; height: 19px; }
  .brand-name { font-size: 17px; }
  .ab-svg { width: 28px; height: 28px; }
}
@media (max-width: 380px) {
  .topnav { padding: 0 8px; gap: 6px; }
  .nav-left { gap: 6px; }
  .brand-name { font-size: 16px; }
  .btn-credits { padding: 6px 9px; font-size: 14px; }
  .btn-prof.is-guest { padding: 0 11px; font-size: 14px; }
}

/* Тарифы · Вариант A: оранжевый акцент на «Помесячно» и «Годовая подписка (до −30%)» */
/* Глубокий оранжево-коралловый градиент: белый текст ≥ 5.2:1 по всей площади (WCAG 2.2 AA ≥ 4.5:1). */
@media (max-width: 720px) {
}

/* Личный кабинет · Вариант A: История оплат и кредитов */
.prof-hist-panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.prof-hist-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
}
.prof-hist-title-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-hist-title { font-size: 16px; font-weight: 800; margin: 0; }
.prof-sub-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 700; background: #FFF2EC; color: #9A2A08; border: 1px solid #FFB699;
}
.prof-hist-tabs {
  display: inline-flex; gap: 4px; background: var(--canvas); padding: 3px;
  border-radius: 999px; border: 1px solid var(--border);
}
.prof-hist-tab {
  border: none; background: transparent; color: var(--sec); font: inherit;
  font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  cursor: pointer; min-height: 34px;
}
.prof-hist-tab.active {
  background: #FFFFFF; color: var(--text); box-shadow: 0 1px 4px rgba(11, 13, 18, 0.08);
}
.prof-hist-list {
  display: flex; flex-direction: column; border: 1px solid var(--border);
  border-radius: 14px; background: #FFFFFF; overflow: hidden;
}
.prof-hist-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.prof-hist-row:last-child { border-bottom: none; }
.prof-hist-main { min-width: 0; }
.prof-hist-name { font-size: 14px; font-weight: 700; color: var(--text); }
.prof-hist-meta { font-size: 14px; color: var(--sec); margin-top: 2px; }
.prof-hist-right { text-align: right; flex-shrink: 0; }
.prof-hist-sum { font-size: 14px; font-weight: 800; color: var(--text); }
.prof-hist-badge {
  display: inline-block; font-size: 14px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; margin-top: 3px;
}
.prof-hist-badge.ok { background: #E9F9EE; color: #16794B; }
.prof-hist-badge.pend { background: #FFF6E5; color: #9A5B00; }
.prof-hist-badge.fail { background: #FDECEC; color: #B42318; }
.prof-hist-delta { font-size: 14px; font-weight: 800; }
.prof-hist-delta.pos { color: #16794B; }
.prof-hist-delta.neg { color: var(--text); }
.prof-hist-empty { padding: 18px 14px; text-align: center; font-size: 14px; color: var(--sec); }

/* Переозвучка видео (Seed Audio 1.5) */
#dubModal { z-index: 120; }
.dub-modal { max-width: 860px; }
.dub-head, .dub-label, .dub-run, .dub-progress-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dub-title { font-size: 16px; font-weight: 700; }
.dub-sub, .dub-hint, .dub-status { font-size: 14px; color: var(--sec); }
.dub-sub { margin-top: 4px; }
.dub-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start; }
.dub-preview { min-height: 160px; border-radius: 14px; overflow: hidden; background: var(--subtle); border: 1px solid var(--border); }
.dub-preview video { display: block; width: 100%; max-height: 460px; object-fit: contain; background: #0B0D12; }
.dub-form, .dub-result { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dub-label { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 4px; }
.dub-prompt { resize: vertical; min-height: 96px; }
.dub-eleven { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--subtle); }
.dub-eleven-text { flex: 1 1 260px; font-size: 14px; line-height: 1.45; color: var(--text); }
.dub-eleven-btn { flex-shrink: 0; min-height: 44px; }
.dub-sex { display: flex; gap: 8px; flex-wrap: wrap; }
.dub-sex .chip { min-height: 44px; }
.dub-voice-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dub-voice-btn { min-height: 44px; font-weight: 700; }
.dub-voice-name { font-size: 14px; color: var(--text); overflow-wrap: anywhere; min-width: 0; }
.dub-voice-clear { min-height: 44px; }
.dub-voice-url summary { cursor: pointer; font-size: 14px; color: var(--sec); padding: 6px 0; min-height: 32px; }
.dub-voice-url .v2-input { margin-top: 6px; }
.dub-check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 4px; }
.dub-check input { accent-color: var(--accent); width: 18px; height: 18px; }
.dub-run { margin-top: 6px; }
.dub-run .btn-lime { flex: 1; }
.dub-status { margin: 0; }
.dub-status.is-err { color: var(--danger); }
.dub-track { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.dub-track audio { flex: 1 1 180px; min-width: 0; height: 36px; }
.dub-out > * { display: block; width: 100%; text-align: center; }
.dub-open { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.dub-open .ic { width: 15px; height: 15px; }
.dub-cab { width: 100%; margin-top: 6px; }
@media (max-width: 900px) {
  .dub-grid { grid-template-columns: 1fr; }
  .dub-preview video { max-height: 240px; }
  .dub-modal .v2-input { font-size: 16px; }
  .dub-eleven-btn, .dub-voice-btn { width: 100%; }
}

/* ── Боковая панель студий «Видео» и «Фото» (#sidePop) ── */
.sp-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sp-backdrop { display: none; }
.sp-card {
  position: fixed; z-index: 90; display: flex; flex-direction: column; overflow: hidden;
  background: #FFFFFF; color: #0B0D12; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(11, 13, 18, 0.14); outline: none; animation: sp-in 0.16s ease-out;
}
.sp-card[hidden], .sp-pane[hidden], .sp-tabs[hidden], .sp-foot[hidden], .sp-scroll[hidden] { display: none; }
@keyframes sp-in { from { opacity: 0; transform: translateX(-8px); } }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 8px 16px; flex: none; }
.sp-title { font-size: 14px; font-weight: 700; }
.sp-x {
  margin-left: auto; flex: none; width: 36px; height: 36px; border-radius: 999px; border: none; cursor: pointer;
  background: #F5F6F8; color: #0B0D12; display: inline-flex; align-items: center; justify-content: center;
}
.sp-x:hover { background: var(--elevated); }
.sp-tabs { display: flex; gap: 4px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tab {
  flex: none; border: none; background: none; color: var(--sec); font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
.sp-tab:hover { color: #0B0D12; background: #F5F6F8; }
.sp-tab.on { background: #0B0D12; color: #FFFFFF; }
.sp-pane { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 0 16px 16px; }
.sp-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; }
.sp-note { font-size: 14px; line-height: 1.45; color: var(--sec); margin: 0 0 10px; }
.sp-card :is(.sp-tile, .sp-tab, .sp-x, .sp-opt, .sp-model, .sp-tick):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sp-dur-val { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.sp-range-wrap { --thumb: 22px; margin: 12px 0 10px; }
.sp-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: none; cursor: pointer; display: block; touch-action: pan-y; }
.sp-range::-webkit-slider-runnable-track {
  height: 34px; border-radius: 10px;
  background: linear-gradient(to right, var(--accent-soft) calc(11px + (100% - 22px) * var(--p, 0)), #F5F6F8 0);
  border: 1px solid var(--border);
}
.sp-range::-moz-range-track { height: 34px; border-radius: 10px; background: #F5F6F8; border: 1px solid var(--border); }
.sp-range::-moz-range-progress { height: 34px; border-radius: 10px; background: var(--accent-soft); }
.sp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 32px; border-radius: 9px; border: 3px solid #FFFFFF; background: var(--accent); box-shadow: 0 2px 8px rgba(11, 13, 18, 0.22); }
.sp-range::-moz-range-thumb { width: 16px; height: 26px; border-radius: 9px; border: 3px solid #FFFFFF; background: var(--accent); box-shadow: 0 2px 8px rgba(11, 13, 18, 0.22); }
.sp-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.sp-range:disabled { cursor: default; }
.sp-ticks { position: relative; height: 30px; }
.sp-tick {
  position: absolute; left: calc(11px + (100% - 22px) * var(--p)); transform: translateX(-50%); top: 0;
  min-width: 30px; height: 30px; border: none; background: none; color: var(--sec); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.sp-tick.active { color: var(--accent-ink); }

.sp-list { display: flex; flex-direction: column; gap: 3px; }
.sp-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: none; border-radius: 12px; background: none; color: #0B0D12; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.sp-opt:hover, .sp-model:hover { background: #F5F6F8; }
.sp-opt.active, .sp-model.active { background: var(--accent-soft); }
.sp-opt > .ic, .sp-model > .ic { margin-left: auto; color: var(--accent-ink); flex: none; }
.sp-ratio-ic { width: 22px; display: inline-flex; justify-content: center; color: var(--sec); }

.sp-search { flex: none; margin-bottom: 8px; padding: 11px 14px; font-size: 14px; background: #F5F6F8; }
.sp-model { display: flex; align-items: center; gap: 12px; flex: none; padding: 9px 10px; border: none; border-radius: 14px; background: none; color: #0B0D12; font: inherit; cursor: pointer; text-align: left; }
.sp-model-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; background: #F5F6F8; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; }
.sp-model-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sp-model-main strong { font-size: 14px; }
.sp-pill { font-size: 14px; font-weight: 600; color: var(--sec); background: #F5F6F8; border: 1px solid var(--border); border-radius: 7px; padding: 2px 7px; }
.sp-model-cr { font-size: 14px; color: var(--mut); }

.sp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 2px; }
.sp-tile {
  position: relative; aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: #F5F6F8; color: #0B0D12; font: inherit; cursor: pointer;
}
.sp-tile img, .sp-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-tile:hover { border-color: var(--border-str); }
.sp-tile.picked { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217, 56, 30, 0.28); }
.sp-tile.is-new { border-color: var(--accent); }
.sp-tile.is-busy { opacity: 0.5; }
.sp-mark { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 999px; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; }
.sp-mark .ic { width: 14px; height: 14px; }
.sp-cap { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 4px 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.94); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-style: dashed; border-color: var(--border-str); font-size: 14px; }
.sp-add .ic { width: 22px; height: 22px; color: var(--accent-ink); }
.sp-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.sp-play .ic { width: 34px; height: 34px; padding: 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #0B0D12; }
.sp-audio { cursor: default; display: flex; flex-direction: column; padding: 10px; gap: 6px; }
.sp-audio-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-wave { width: 100%; flex: 1; min-height: 0; stroke: #4B515E; stroke-width: 2.4; stroke-linecap: round; }
.sp-audio.picked .sp-wave { stroke: var(--accent); }
.sp-audio-btn { align-self: flex-end; width: 36px; height: 36px; border-radius: 999px; border: none; background: #0B0D12; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: none; padding-top: 12px; font-size: 14px; color: var(--sec); }
.sp-back { margin-bottom: 10px; gap: 4px; }

.ava-form { display: flex; flex-direction: column; gap: 12px; }
.ava-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ava-slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ava-box { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #F5F6F8; border: 1px dashed var(--border-str); }
.ava-slot.has-photo .ava-box { border-style: solid; border-color: var(--border); }
.ava-slot.is-over .ava-box, .ava-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(217, 56, 30, 0.22); }
.ava-drop { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ava-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ava-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px; text-align: center; font-size: 14px; line-height: 1.35; color: var(--sec); }
.ava-empty .ic { width: 24px; height: 24px; color: #0B0D12; }
.ava-empty[hidden], .ava-preview[hidden], .ava-box button[hidden] { display: none; }
.ava-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ava-replace { position: absolute; left: 6px; bottom: 6px; min-height: 32px; padding: 0 10px; border: none; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #0B0D12; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ava-remove { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: none; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #0B0D12; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ava-label { font-size: 14px; line-height: 1.35; color: #0B0D12; }
.ava-submit { width: 100%; padding: 12px; }
.sel-ref-rm .ic { width: 12px; height: 12px; }

@media (max-width: 900px) {
  body.sp-open { overflow: hidden; }
  .sp-backdrop { display: block; position: fixed; inset: 0; z-index: 97; background: rgba(11, 13, 18, 0.38); }
  .sp-backdrop[hidden] { display: none; }
  .sp-card {
    z-index: 98; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-width: 100vw; max-height: 86dvh;
    border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation-name: sp-up;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .sp-card[data-kind="media"], .sp-card[data-kind="model"] { height: 86dvh; }
  .sp-head { padding-top: 18px; position: relative; }
  .sp-head::before { content: ''; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border-str); }
  .sp-x { width: 44px; height: 44px; }
  .sp-tab { min-height: 44px; }
  .sp-search, .ava-form .v2-input { font-size: 16px; }
  .sp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ava-remove, .ava-replace { min-height: 36px; }
}
@media (max-width: 420px) {
  .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ava-empty { font-size: 14px; }
}
@keyframes sp-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sp-card { animation: none; } }

/* ══ ПРОСТО И ЧИТАЕМО (03.12): текст 18px, подзаголовки 20px, подписи от 14px; 4 вкладки; 3 тарифа ══ */
.ab-hero-sub, .ab-hero-sub[data-i18n], .v2-geo-lead, .v2-geo-faq p, .v2-geo-faq summary, .mcp-tokens-sub, .ag-bubble, .ag-empty-sub, .ag-input, .ag-starter,
.ag-msg-err .ag-bubble, .ag-card-prompt, .ag-run-note, .vr-textarea, .mw-sub, .mw-empty, .mw-guest-text, .ap-text, .dub-sub,
.v-prompt-textarea, .photo-prompt-input, .v2-input, .hf-claude-sub, .native-store-notice, .box-subtle, .panel p, .modal p:not(.sp-note):not(.ava-legal) { font-size: 18px; }
.mw-h2, .mw-empty strong, .mw-guest-title, .ap-title, .prof-hist-title, .dub-title, .del-modal-title, .s20-modal-title { font-size: 20px; }
.hf-dropzone strong, .hf-param-v, .sp-title, .sp-model-main strong, .hf-pop-opt strong, .vr-voice-text strong, .vr-submode-btn strong, .mega-card-title, .mega-item, .ag-card-title { font-size: 16px; }
.hf-pop-opt-sub, .sp-model-desc, .sp-note { font-size: 15px; color: var(--sec); }
.sp-model-desc { line-height: 1.35; }
.ava-legal { margin: 0; font-size: 14px; line-height: 1.4; color: var(--sec); text-align: center; }
.footer-link, .site-footer { font-size: 15px; color: var(--sec); }

/* Верхнее меню: 4 вкладки по центру, справа — Тарифы · Кабинет · Язык */
@media (min-width: 901px) {
  /* Вкладки центрируются в свободном месте между логотипом и кнопками справа: на длинный баланс они не наезжают */
  .topnav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; }
  .topnav .nav-tabs { justify-self: center; min-width: 0; }
  .nav-right { justify-self: end; }
  .nav-tabs .nav-tab { padding: 9px 20px; font-size: 16px; }
  .topnav .btn-credits, .topnav .btn-prof, .topnav .lang-btn { min-height: 42px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .topnav { padding: 0 14px; }
  .nav-tabs .nav-tab { padding: 9px 12px; font-size: 15px; }
  .nav-tabs .nav-tab .ic, .topnav .btn-credits .ic, .topnav .lang-btn .ic { display: none; }
  .topnav .btn-credits, .topnav .btn-ghost, .topnav .btn-prof { padding: 8px 12px; }
  .credits-pill-suffix { display: none; }
}

/* Кабинет: все инструменты */
.tl-panel { margin: 0 0 22px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--subtle); }
.tl-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tl-tile { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; color: var(--text); font-size: 18px; font-weight: 600; text-align: left; }
.tl-tile .ic { width: 22px; height: 22px; color: var(--accent-ink); }
.tl-tile:hover { border-color: var(--text); }
.tl-tile:focus-visible, .plan-cta:focus-visible, .pr-topup summary:focus-visible, .mw-more summary:focus-visible, .bill-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Карточка ролика: две кнопки в ряд и меню «•••» */
.mw-acts { align-items: stretch; }
.mw-card.is-video .mw-acts { flex-wrap: nowrap; position: relative; }
.mw-card.is-video .mw-acts > .mw-act { flex: 1 1 auto; min-width: 0; padding: 6px 8px; }
.mw-card.is-video .mw-acts > .mw-act span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-more { flex: 0 0 auto; }
.mw-more > summary { list-style: none; width: 42px; height: 100%; min-height: 40px; padding: 0; cursor: pointer; letter-spacing: 1px; }
.mw-more > summary::-webkit-details-marker { display: none; }
.mw-more-menu { position: absolute; right: 10px; bottom: calc(100% - 4px); z-index: 5; min-width: 190px; padding: 6px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; box-shadow: var(--shadow-md); }
.mw-more-menu .mw-act { flex: none; justify-content: flex-start; min-height: 44px; padding: 8px 12px; border-color: transparent; font-size: 15px; }
.mw-more-menu .mw-act:hover { background: var(--subtle); color: var(--text); border-color: transparent; }
.mw-act { min-height: 40px; }
.mw-act.is-main:hover { color: #FFFFFF; border-color: var(--text); opacity: 0.9; }
.mw-grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
@media (max-width: 900px) {
  .mw-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
}

/* Тарифы: 3 светлые карточки */
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto 18px; }
.pr-h1 { font-size: 32px; font-weight: 800; }
.pr-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bill-switch { background: var(--subtle); padding: 4px; border-radius: 999px; border: 1px solid var(--border); gap: 4px; }
.bill-btn { padding: 9px 18px; min-height: 44px; font-size: 16px; font-weight: 600; background: transparent; color: var(--text); border: 1px solid transparent; }
.bill-btn.active { background: var(--lime); color: #FFFFFF; border-color: var(--lime); }
.cur-btn { min-height: 44px; min-width: 48px; font-size: 16px; }
.pr-td { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto 18px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--subtle); }
.pr-td-title { font-size: 20px; font-weight: 700; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.pr-td-prices { display: inline-flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.pr-td-prices strong { font-weight: 800; }
.pr-td-sub { margin-top: 2px; font-size: 18px; color: var(--sec); }
.pr-td-kzt { font-size: 16px; font-weight: 500; color: var(--sec); }
.pr-td .btn-lime { padding: 12px 24px; }
#pricingCardsGrid { max-width: 1200px; margin: 0 auto 14px; align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--border); border-radius: 22px; background: #FFFFFF; color: var(--text); }
.plan-card.is-rec { border: 2px solid var(--accent); padding: 23px; box-shadow: 0 14px 40px rgba(11, 13, 18, 0.10); }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.plan-name { font-size: 22px; font-weight: 800; }
.plan-badge { padding: 5px 12px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 14px; font-weight: 700; white-space: nowrap; }
.plan-desc { font-size: 18px; color: var(--sec); }
.plan-price { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.plan-price [data-plan-price] { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
.plan-price .strike-red { font-size: 18px; }
.plan-per { font-size: 18px; color: var(--sec); }
.plan-sub { font-size: 16px; color: var(--sec); }
.plan-gets { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--subtle); font-size: 18px; }
.plan-gets strong { font-size: 20px; font-weight: 700; line-height: 1.3; }
.plan-gets .plan-cr { color: var(--sec); font-size: 16px; }
.plan-cta { width: 100%; min-height: 48px; padding: 12px 18px; font-size: 16px; }
.plan-save { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #FFFFFF; color: var(--text); font-size: 14px; font-weight: 700; }
.plan-perks { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; font-size: 18px; }
.plan-perks li { position: relative; padding-left: 28px; line-height: 1.35; }
.plan-perks li::before { content: ''; position: absolute; left: 4px; top: 5px; width: 7px; height: 12px; border: solid var(--accent); border-width: 0 2.5px 2.5px 0; transform: rotate(42deg); }
.pr-note { max-width: 1200px; margin: 0 auto 18px; font-size: 14px; color: var(--sec); text-align: center; }
.pr-topup { max-width: 1200px; margin: 0 auto 18px; border: 1px solid var(--border); border-radius: 18px; background: #FFFFFF; }
.pr-topup summary { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; font-size: 20px; font-weight: 700; cursor: pointer; list-style: none; border-radius: 18px; }
.pr-topup summary::-webkit-details-marker { display: none; }
.pr-topup summary::after { content: ''; width: 10px; height: 10px; border: solid var(--text); border-width: 0 2px 2px 0; transform: rotate(45deg); margin: -5px 6px 0 0; }
.pr-topup[open] summary::after { transform: rotate(-135deg); margin-top: 5px; }
.pr-topup-body { display: flex; flex-direction: column; gap: 14px; padding: 0 22px 22px; }
.pr-topup-mode .chip { font-size: 15px; min-height: 44px; padding: 8px 16px; }
.pr-topup-sum, .pr-topup-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 18px; }
#agencyPackLabel { font-size: 20px; font-weight: 700; }
.pr-topup-price { display: inline-flex; align-items: baseline; gap: 12px; }
.pr-topup-price strong { font-size: 24px; font-weight: 800; }
#agencySlider { width: 100%; height: 44px; accent-color: var(--accent); cursor: pointer; }
#agencySubHint { color: var(--sec); }
.pr-topup-foot .btn-lime { padding: 12px 24px; }
.pr-help { display: flex; align-items: center; justify-content: center; gap: 10px 18px; flex-wrap: wrap; font-size: 18px; color: var(--sec); }
@media (max-width: 720px) {
  .pr-h1 { font-size: 28px; }
  .pr-controls, .bill-switch { width: 100%; }
  .bill-btn { flex: 1 1 auto; justify-content: center; padding: 9px 12px; }
  .pr-td .btn-lime, .pr-topup-foot .btn-lime { width: 100%; }
  .plan-card { padding: 18px; }
  .plan-card.is-rec { padding: 17px; }
}
/* «Создать» — выше сгиба на 1440×900 */
.selected-refs:empty { display: none; }
@media (min-width: 901px) { .hf-v-sidebar .v-prompt-textarea { min-height: 104px; height: 104px; } }
.hf-pop-opt.is-top-glow:not(.active) { background: transparent; border-color: transparent; }

/* Кнопка «Другие модели» под 4 основными в «Видео» и «Фото» */
.models-more {
  flex: none; width: 100%; min-height: 44px; margin: 6px 0; padding: 10px 14px; border: 1px solid var(--border-str); border-radius: 12px;
  background: var(--subtle); color: var(--text); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.models-more:hover { background: var(--elevated); }
.models-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.models-more[aria-expanded="true"] .ic { transform: rotate(180deg); }

/* Большие мониторы: основной текст 20–21px (на ноутбуках — прежние 18px) */
@media (min-width: 1920px) {
  body, .ab-hero-sub, .ab-hero-sub[data-i18n], .v2-geo-lead, .v2-geo-faq p, .v2-geo-faq summary, .mcp-tokens-sub, .ag-bubble, .ag-empty-sub, .ag-input, .ag-starter,
  .ag-msg-err .ag-bubble, .ag-card-prompt, .ag-run-note, .vr-textarea, .mw-sub, .mw-empty, .mw-guest-text, .ap-text, .dub-sub,
  .v-prompt-textarea, .photo-prompt-input, .v2-input, .hf-claude-sub, .native-store-notice, .box-subtle, .panel p, .modal p:not(.sp-note):not(.ava-legal),
  .pr-td-sub, .plan-desc, .plan-per, .plan-gets, .plan-perks, .pr-topup-sum, .pr-topup-foot, .pr-help { font-size: clamp(20px, 1.0417vw, 21px); }
  .hf-pop-opt-sub, .sp-model-desc, .sp-note { font-size: 17px; }
  .ag-shell .ag-bubble, .ag-shell .ag-msg-err .ag-bubble, .ag-drawer .ag-bubble, .ag-shell .ag-slim-row .ag-input, .ag-drawer .ag-input, .ag-step { font-size: clamp(20px, 1.0417vw, 21px); }
  .ag-shell .ag-slim-row .ag-input { line-height: 28px; }
  .ag-shell .ag-bubble strong { font-size: 22px; }
  .mt-wrap { grid-template-columns: 340px minmax(0, 1fr) 280px; }
  .mt-wrap, .mt-proj-btn, .mt-proj-open, .mt-textarea, .mt-empty, .mt-lib-empty, .mt-noprev, .mt-sec-lbl, .mt-field-lbl,
  .ap-h2, .ap-sub, .ap-hint, .ap-empty, .ap-item-title, .ap-input, .ap-select, .ap-textarea, .ap-slot-when, .ap-slot-text, .ap-car-pos { font-size: 20px; }
  .mt-wrap .mt-btn-ghost, .mt-wrap .mt-btn-lime, .mt-tab, .mt-chip, .ap-chip, .ap-seg-btn, .ap-item-meta, .ap-link, .ap-wrap .mt-btn-lime, .ap-wrap .mt-btn-ghost { font-size: 18px; }
  .mt-proj-btn { max-width: 440px; }
  .mt-textarea { min-height: 112px; }
  #mtCapStyle .mt-chip { font-size: 18px; }
}

/* ── Режим приложения iOS / Android (body.is-native-app). На сайте и в Telegram Mini App эти правила не действуют ── */
body.is-native-app .native-store-notice { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; font-size: 14px; line-height: 1.5; color: var(--sec); }
body.is-native-app .native-store-notice[hidden] { display: none; }
body.is-native-app .native-store-notice strong { font-size: 16px; color: var(--text); }
/* Правила App Store 3.1.1: в приложении нет внешней оплаты, веб-цен и упоминаний карты */
body.is-native-app .web-pay-only,
body.is-native-app #topupSection,
body.is-native-app #currencySwitch,
body.is-native-app #s-pricing .pr-controls,
body.is-native-app #s-pricing .bill-switch,
body.is-native-app #pricingPayNote,
body.is-native-app [data-i18n="auth_note"],
body.is-native-app #navMegaPanel,
body.is-native-app #apPlan .ap-plan-rows,
body.is-native-app #pricingCardsGrid .plan-web-price,
body.is-native-app #profileAuthedWrap [data-i18n="pf_topup"],
body.is-native-app .v2-geo-footer { display: none !important; }
body.is-native-app:not(.is-native-iap) [data-act="startCheckout"],
body.is-native-app:not(.is-native-iap) [data-act="buyTopup"],
body.is-native-app:not(.is-native-iap) [data-act="buyAgencyPack"] { display: none !important; }
/* Вырез iPhone, Dynamic Island и нижняя полоса «домой» */
body.is-native-app { --app-top: env(safe-area-inset-top, 0px); --app-bottom: env(safe-area-inset-bottom, 0px); }
body.is-native-app .topnav {
  box-sizing: content-box; width: auto; padding-top: env(safe-area-inset-top, 0px);
  padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px));
}
body.is-native-app .mobile-tabbar[aria-label] { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
body.is-native-app .toast { bottom: calc(24px + var(--app-bottom)); }
body.is-native-app .modal-backdrop { padding-top: max(16px, var(--app-top)); padding-bottom: max(16px, var(--app-bottom)); }
/* Только десктоп и планшет: до 900px панель «Видео» обычная (height: auto), иначе она наезжает на кнопку генерации */
@media (min-width: 901px) {
  body.is-native-app .hf-v-sidebar { top: calc(64px + var(--app-top)); height: calc(100vh - 64px - var(--app-top)); }
}
body.is-native-app .vr-stage-wrap { top: calc(76px + var(--app-top)); }
body.is-native-app .site-footer { padding-bottom: calc(18px + var(--app-bottom)); }
@media (max-width: 900px) {
  body.is-native-app .ag-stage { height: calc(100dvh - 134px - var(--app-top) - var(--app-bottom)); }
}
@media (max-width: 760px) {
  body.is-native-app #showcaseDetailModal { padding-top: calc(64px + var(--app-top)); }
}

/* ══ ИИ-АГЕНТ: язык и диктор голоса ══ */
.ag-voice-set { position: relative; }
.ag-voice-sum { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-str); border-radius: 999px; font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; white-space: nowrap; color: #0B0D12; background: #FFFFFF; }
.ag-voice-sum::-webkit-details-marker { display: none; }
.ag-voice-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ag-voice-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 340px; max-width: calc(100vw - 32px); padding: 14px; display: flex; flex-direction: column; gap: 6px;
  background: #FFFFFF; border: 1px solid var(--border-str); border-radius: 16px; box-shadow: 0 16px 44px rgba(11, 13, 18, 0.16);
}
.ag-voice-title { font-size: 14px; font-weight: 600; color: #3F4451; }
.ag-voice-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.ag-voice-opt { min-height: 44px; padding: 0 2px; border: 1px solid var(--border-str); border-radius: 12px; background: #FFFFFF; color: #0B0D12; font: inherit; font-size: 15px; cursor: pointer; touch-action: manipulation; }
.ag-voice-opt.on { background: #0B0D12; border-color: #0B0D12; color: #FFFFFF; }
.ag-voice-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ══ Прикреплённый аватар: снять одним нажатием ══ */
.att-avatars[hidden] { display: none; }
.sel-ref-chip.att-avatar { color: #0B0D12; border-color: var(--border-str); padding: 4px 4px 4px 6px; max-width: 100%; }
.att-avatar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-avatar-photo { display: flex; flex-direction: column; gap: 4px; max-width: 100%; }
.att-avatar-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.att-avatar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; color: #0B0D12; }
.att-avatar-cards { display: flex; flex-wrap: wrap; }
.att-avatar-rm {
  flex: 0 0 auto; width: 32px; height: 32px; min-width: 32px; min-height: 32px; padding: 0; border: none; border-radius: 50%; background: #0B0D12; color: #FFFFFF;
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation;
}
.att-avatar-rm:hover { background: var(--accent); }
.att-avatar-rm:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mw-eta { font-size: 14px; color: var(--sec); }

/* ══ AI Creator: чат агента слева, доска сцен справа, готовый ролик на том же экране ══ */
.nav-tabs .ai-tab { color: var(--accent-ink); box-shadow: inset 0 0 0 1.5px var(--accent); background: #FFFFFF; font-weight: 700; }
.nav-tabs .ai-tab.active { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); }
.nav-caret { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: transform .15s; }
#navMoreBtn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-more-menu { min-width: 248px; }
.nav-more-menu .nav-more-item { min-height: 48px; padding: 10px 16px; font-size: 18px; }
.nav-more-item:focus-visible, #navMoreBtn:focus-visible, .cr-tab:focus-visible, .cr-ico:focus-visible, .cr-pill:focus-visible, .cr-link:focus-visible, .cr-go:focus-visible, .cr-quick-btn:focus-visible, .cr-add-card:focus-visible, .cr-open-scenes:focus-visible, .home-how-cta:focus-visible, .home-tg-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mnav-title { padding: 14px 14px 4px; font-size: 18px; font-weight: 600; color: var(--sec); }
.cr-workspace { position: relative; min-width: 0; }
.cr-workspace input[type="file"] { display: none; }
.cr-tabs { display: none; }
.cr-board[hidden], .cr-final[hidden], .cr-add-chip[hidden] { display: none; }
.cr-board { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--subtle); border-left: 1px solid var(--border); }
.cr-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; overscroll-behavior: contain; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 18px; background: #FFFFFF; border-bottom: 1px solid var(--border); }
.cr-board-title { flex: 1 1 200px; min-width: 0; min-height: 44px; border: none; background: transparent; color: var(--text); font: inherit; font-size: 20px; font-weight: 700; }
.cr-meta, .cr-note { font-size: 18px; line-height: 1.4; color: var(--sec); }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.cr-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 16px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 18px; }
.cr-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-num { font-size: 18px; font-weight: 700; }
.cr-badge { padding: 3px 10px; border-radius: 999px; background: var(--subtle); color: var(--text); font-size: 16px; font-weight: 600; }
.cr-badge.is-done { background: #0B0D12; color: #FFFFFF; }
.cr-card-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.cr-ico { width: 40px; height: 40px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 10px; background: transparent; color: var(--sec); cursor: pointer; }
.cr-ico:hover { background: var(--subtle); color: var(--text); }
.cr-ico:disabled { opacity: .35; cursor: default; }
.cr-ico .ic { width: 20px; height: 20px; }
.cr-title-input, .cr-text, .cr-select { width: 100%; min-width: 0; border: 1px solid var(--border-str); border-radius: 12px; background: #FFFFFF; color: var(--text); font: inherit; font-size: 18px; line-height: 1.4; padding: 10px 12px; }
.cr-title-input { font-weight: 600; }
.cr-text { min-height: 104px; resize: vertical; }
.cr-title-input:focus, .cr-text:focus, .cr-select:focus, .cr-board-title:focus { outline: 2px solid #0B0D12; outline-offset: 0; }
.cr-step { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cr-step-title { font-size: 18px; font-weight: 700; }
.cr-field { display: flex; flex-direction: column; gap: 4px; }
.cr-field-head { display: flex; align-items: center; justify-content: space-between; font-size: 18px; color: var(--sec); }
.cr-photo, .cr-video { display: block; width: 100%; max-height: 420px; object-fit: contain; border-radius: 14px; background: #0B0D12; }
.cr-frame { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--sec); }
.cr-frame img { width: 48px; height: 48px; flex-shrink: 0; object-fit: cover; border-radius: 10px; }
.cr-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 18px; color: var(--sec); }
.cr-set > span { flex: 0 0 96px; }
.cr-set .cr-select { flex: 1 1 160px; width: auto; }
.cr-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-pill { min-height: 42px; padding: 0 14px; border: 1px solid var(--border-str); border-radius: 999px; background: #FFFFFF; color: var(--text); font: inherit; font-size: 18px; cursor: pointer; }
.cr-pill.active { background: #0B0D12; border-color: #0B0D12; color: #FFFFFF; }
.cr-pill:disabled { opacity: .35; cursor: default; }
.cr-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cr-go { min-height: 48px; flex: 1 1 auto; padding: 10px 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-size: 18px; text-align: center; text-decoration: none; }
.cr-go:disabled, .cr-build-btn:disabled { opacity: .45; cursor: default; }
.cr-link { border: none; background: none; color: var(--text); font: inherit; font-size: 18px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; min-height: 42px; cursor: pointer; }
.cr-run { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.cr-run-bar { width: 18px; height: 18px; flex-shrink: 0; border: 3px solid var(--border-str); border-top-color: var(--accent); border-radius: 50%; animation: crSpin 1s linear infinite; }
@keyframes crSpin { to { transform: rotate(360deg); } }
.cr-err { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: #FEF2F2; color: #A5122D; font-size: 18px; line-height: 1.4; }
.cr-add-card { min-height: 120px; border: 2px dashed var(--border-str); border-radius: 18px; background: transparent; color: var(--text); font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; }
.cr-add-card:hover { border-color: var(--text); }
.cr-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 18px; background: #FFFFFF; border-top: 1px solid var(--border); }
.cr-music { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; font-size: 18px; }
.cr-music > span { flex-shrink: 0; }
.cr-build { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; flex: 1 1 320px; justify-content: flex-end; }
.cr-build-btn { min-height: 52px; padding: 10px 22px; border-radius: 16px; font-size: 18px; font-weight: 700; }
.cr-offer, .cr-progress { display: flex; flex-direction: column; gap: 10px; margin: 14px 18px 0; padding: 16px; border: 1px solid var(--border-str); border-radius: 16px; background: #FFFFFF; font-size: 18px; }
.cr-progress-title { font-size: 21px; }
.cr-progress-bar { width: 100%; height: 10px; border: none; border-radius: 999px; overflow: hidden; background: var(--subtle); -webkit-appearance: none; appearance: none; }
.cr-progress-bar::-webkit-progress-bar { background: var(--subtle); }
.cr-progress-bar::-webkit-progress-value { background: var(--accent); }
.cr-progress-bar::-moz-progress-bar { background: var(--accent); }
.cr-board.is-assembling .cr-step, .cr-board.is-assembling .cr-card-tools, .cr-board.is-assembling .cr-add-card, .cr-board.is-assembling .cr-foot { display: none; }
.cr-board.is-assembling .cr-title-input { pointer-events: none; border-color: transparent; padding: 0; }
.cr-quick { width: min(760px, 100%); margin: 0 auto; padding-top: 12px; flex-shrink: 0; }
.cr-quick:empty, .ag-shell.is-chat-active .cr-quick { display: none; }
.cr-quick-title { font-size: 18px; color: var(--sec); padding-bottom: 8px; text-align: center; }
.cr-quick-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cr-quick-btn { min-height: 46px; padding: 8px 18px; border: 1px solid var(--border-str); border-radius: 999px; background: #FFFFFF; color: var(--text); font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
.cr-quick-btn:hover { border-color: var(--text); }
.cr-add-chip { min-height: 40px; padding: 5px 12px; border: 1px solid var(--border-str); border-radius: 999px; background: #FFFFFF; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.cr-empty { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.cr-open-scenes { align-self: flex-start; min-height: 46px; padding: 8px 16px; border: 1px solid var(--accent); border-radius: 14px; background: #FFFFFF; color: var(--accent-ink); font: inherit; font-size: 18px; font-weight: 600; text-align: left; cursor: pointer; }
.cr-final { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; }
.cr-final-title { font-size: 28px; font-weight: 700; outline: none; overflow-wrap: anywhere; }
.cr-final-video { width: 100%; height: 62vh; background: #0B0D12; border-radius: 20px; object-fit: contain; }
.cr-final-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cr-final-open .ag-shell, .cr-final-open .cr-board, .cr-final-open .cr-tabs { display: none !important; }
.cr-films { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.cr-film { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: #FFFFFF; font-size: 18px; }

.home-how, .home-tg { margin: 24px 0; padding: 28px; border-radius: 24px; background: var(--subtle); }
.home-how-title, .home-tg-title { font-size: 28px; font-weight: 800; line-height: 1.2; }
.home-how-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 20px; }
.home-how-step { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 18px; background: #FFFFFF; border: 1px solid var(--border); font-size: 18px; line-height: 1.4; color: var(--sec); }
.home-how-step strong { font-size: 20px; line-height: 1.25; color: var(--text); }
.home-how-n { width: 36px; height: 36px; border-radius: 50%; background: #0B0D12; color: #FFFFFF; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.home-how-cta { min-height: 52px; padding: 12px 24px; border-radius: 16px; font-size: 20px; }
.home-tg { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.home-tg-text { margin-top: 6px; font-size: 18px; color: var(--sec); }
.home-tg-cta { min-height: 52px; padding: 12px 24px; display: inline-flex; align-items: center; border-radius: 16px; background: #0B0D12; color: #FFFFFF; font-size: 18px; font-weight: 700; text-decoration: none; }
.home-tg-cta:hover { opacity: .9; }
@media (max-width: 1100px) { .home-how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .home-how-steps { grid-template-columns: minmax(0, 1fr); } .home-how, .home-tg { padding: 20px; } .home-how-cta, .home-tg-cta { width: 100%; justify-content: center; } }

@media (min-width: 901px) {
  .nav-tabs .nav-tab { padding: 9px 14px; }
  .cr-workspace:not(.has-board) .cr-board { display: none; }
  .cr-workspace.has-board { display: grid; grid-template-columns: minmax(330px, 36fr) minmax(0, 64fr); height: calc(100vh - 68px); height: calc(100dvh - 68px); min-height: 520px; }
  .cr-final-open .cr-workspace.has-board { display: block; height: auto; }
  .has-board .ag-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: 100%; min-height: 0; }
  .has-board .ag-rail { flex-direction: row; border-right: none; border-bottom: 1px solid var(--border); padding: 8px 12px; min-width: 0; }
  .has-board .ag-rail-top { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
  .has-board .ag-rail .hf-rail-new { width: auto; margin: 0; flex-shrink: 0; padding: 8px 12px; }
  .has-board .ag-rail .hf-rail-label, .has-board .ag-rail .hf-rail-foot { display: none; }
  .has-board .ag-chat-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: 1; min-width: 0; }
  .has-board .ag-chat-item { flex-shrink: 0; max-width: 170px; }
  .has-board .ag-stage { min-width: 0; min-height: 0; }
  .has-board .ag-slim-row { flex-wrap: wrap; }
  .has-board .ag-slim-row .ag-input { flex: 1 0 100%; order: -1; padding-left: 10px; padding-right: 10px; }
  .has-board .ag-slim-row .v2-mic-btn { margin-left: auto; }
  .has-board .ag-hero-title { font-size: 25px; }
}
@media (min-width: 901px) and (max-width: 1280px) {
  .nav-tabs .nav-tab { padding: 9px 10px; font-size: 15px; }
  .nav-tabs .nav-tab .ic { display: none; }
  .nav-tabs { gap: 2px; }
  .topnav { gap: 8px; padding: 0 14px; }
}
@media (max-width: 900px) {
  .cr-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 8px 0; border-radius: 14px; background: var(--subtle); flex-shrink: 0; }
  .cr-tab { min-height: 44px; border: none; border-radius: 11px; background: transparent; color: var(--text); font: inherit; font-size: 18px; font-weight: 600; cursor: pointer; }
  .cr-tab.active { background: #FFFFFF; box-shadow: 0 2px 8px rgba(11, 13, 18, 0.08); }
  #s-agent:not(.cr-show-scenes) .cr-board, #s-agent.cr-show-scenes .ag-shell { display: none; }
  .cr-board { border-left: none; border-radius: 16px; overflow: hidden; }
  .cr-scroll { padding: 12px; }
  .cr-head, .cr-foot { padding: 10px 12px; }
  .cr-build-btn { width: 100%; }
  .cr-final { padding: 12px 0; }
  .cr-final-video { height: 56vh; }
}
@media (min-width: 1920px) {
  .cr-meta, .cr-note, .cr-text, .cr-select, .cr-title-input, .cr-pill, .cr-go, .cr-link, .cr-set, .cr-field-head, .cr-frame, .cr-step-title, .cr-num, .cr-build-btn, .cr-music, .cr-run, .cr-err, .cr-quick-btn,
  .home-how-step, .home-tg-text, .home-tg-cta { font-size: 20px; }
  .home-how-step strong { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .cr-run-bar { animation: none; } .nav-caret { transition: none; } }

/* ══ PR #66 · AI Creator: аватар и свои фото в сцене, качество 480p–1080p, ползунок длины ══ */
.ag-works-link { white-space: nowrap; flex-shrink: 0; }
/* Последняя карточка не прячется под нижней панелью сборки */
.cr-scroll { padding-bottom: 112px; scroll-padding-bottom: 112px; }
.cr-pick-btn { flex: 1 1 calc(50% - 10px); }
.cr-pick-btn.active { background: #FFFFFF; color: #0B0D12; box-shadow: inset 0 0 0 2px #0B0D12; }
.cr-pick { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border-str); border-radius: 16px; background: var(--subtle); }
.cr-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 18px; }
.cr-av { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: #FFFFFF; }
.cr-av-main { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 4px; border: none; border-radius: 12px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.cr-av-main:hover { background: var(--subtle); }
.cr-av-main img { width: 64px; height: 64px; flex-shrink: 0; object-fit: cover; border-radius: 12px; background: var(--subtle); }
.cr-av-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-av-text strong { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-av-text small { font-size: 16px; color: var(--sec); }
.cr-av-photos, .cr-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cr-av-ph, .cr-mine-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cr-av-ph img, .cr-mine-main img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #FFFFFF; }
.cr-mine-main { padding: 0; border: 2px solid transparent; border-radius: 14px; background: none; cursor: pointer; }
.cr-mine-main:hover { border-color: #0B0D12; }
.cr-mini { min-height: 40px; padding: 4px 8px; border: 1px solid var(--border-str); border-radius: 10px; background: #FFFFFF; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.cr-mini:hover { border-color: #0B0D12; }
.cr-refs { display: flex; flex-direction: column; gap: 6px; }
.cr-ref-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-ref { position: relative; width: 72px; margin: 0; }
.cr-ref img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); background: var(--subtle); }
.cr-ref figcaption { position: absolute; left: 4px; bottom: 4px; min-width: 20px; padding: 0 5px; border-radius: 999px; background: #FFFFFF; color: #0B0D12; font-size: 14px; font-weight: 700; text-align: center; }
.cr-ref-rm, .sel-ref-card .sel-ref-rm {
  position: absolute; top: -8px; right: -8px; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #FFFFFF; border-radius: 50%; background: #0B0D12; color: #FFFFFF; cursor: pointer; touch-action: manipulation;
}
.cr-ref-rm .ic, .sel-ref-card .sel-ref-rm .ic { width: 16px; height: 16px; }
.cr-ref-rm:hover, .sel-ref-card .sel-ref-rm:hover { background: var(--accent); color: #FFFFFF; }
.cr-pick-btn:focus-visible, .cr-av-main:focus-visible, .cr-mine-main:focus-visible, .cr-mini:focus-visible, .cr-ref-rm:focus-visible, .cr-dur-slider:focus-visible, .sel-ref-card .sel-ref-rm:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cr-pill[aria-disabled="true"] { opacity: .35; cursor: not-allowed; }
.cr-res-note { margin: -4px 0 0; font-size: 16px; }
.cr-dur { align-items: flex-start; }
.cr-dur-box { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; min-width: 0; }
.cr-dur-val { font-size: 21px; font-weight: 700; color: var(--text); }
.cr-dur-slider { width: 100%; min-height: 32px; margin: 0; accent-color: #0B0D12; cursor: pointer; }
.cr-dur-slider:disabled { cursor: default; opacity: .5; }
.cr-dur-edges { display: flex; justify-content: space-between; font-size: 16px; color: var(--sec); }
/* «Видео» и «Фото»: прикреплённые референсы и фото аватара — крупные карточки, а не мелкие кружки */
.sel-ref-chip.sel-ref-card { position: relative; display: block; width: 80px; height: 80px; margin: 8px 4px 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--subtle); overflow: visible; }
.sel-ref-card img { display: block; width: 80px; height: 80px; object-fit: cover; border-radius: 14px; }
.sel-ref-cap { position: absolute; left: 6px; bottom: 6px; min-width: 22px; padding: 0 6px; border-radius: 999px; background: #FFFFFF; color: #0B0D12; font-size: 14px; font-weight: 700; line-height: 20px; text-align: center; }
@media (max-width: 768px) {
  .cr-scroll { padding-bottom: 96px; }
  .cr-av-photos, .cr-mine { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
@media (min-width: 1920px) {
  .cr-mini, .cr-av-text small, .cr-dur-edges { font-size: 18px; }
}

/* ══ ИИ-АГЕНТ на телефоне: экран закреплён, прокручивается только переписка, поле ввода всегда внизу ══ */
:root { --nav-h: 60px; }
body.is-native-app { --nav-h: calc(60px + env(safe-area-inset-top, 0px)); }
@media (max-width: 768px) {
  #photoAvatarsStrip .photo-avatar-chip.active { display: none; } /* выбранный аватар уже показан ниже с «×» */
  body.v2-view-agent .site-footer, body.v2-view-agent .v2-geo-footer { display: none; }
  body.v2-view-agent { min-height: 0; overscroll-behavior: none; }
  body.v2-view-agent .app-shell { min-height: 0; height: 100dvh; overflow: hidden; }
  body.v2-view-agent #s-agent.active {
    display: flex; flex-direction: column; flex: 0 0 auto; padding: 0 12px; animation: none;
    height: calc(100dvh - var(--nav-h)); overflow: hidden;
  }
  /* Окно Telegram бывает ниже экрана: там берём его собственную высоту. */
  .is-tma body.v2-view-agent .app-shell { height: var(--tg-viewport-stable-height, 100dvh); }
  .is-tma body.v2-view-agent #s-agent.active { height: calc(var(--tg-viewport-stable-height, 100dvh) - var(--nav-h)); }
  body.v2-view-agent #s-agent .ag-shell { display: flex; flex-direction: column; flex: 1; width: 100%; height: auto; min-height: 0; overflow: hidden; }
  body.v2-view-agent #s-agent .ag-rail { flex-shrink: 0; padding: 8px 0; }
  body.v2-view-agent #s-agent .ag-stage {
    flex: 1; height: auto; min-height: 0; padding: 8px 0 0; padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  body.v2-view-agent #s-agent .ag-topbar { flex-shrink: 0; position: relative; }
  body.v2-view-agent #s-agent .ag-log { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  body.v2-view-agent #s-agent .is-chat-empty .ag-log { flex: 1 1 0; overflow: hidden; }
  body.v2-view-agent #s-agent .ag-composer { flex-shrink: 0; }
  body.v2-view-agent #s-agent .ag-hero-starters { flex-shrink: 1; min-height: 0; }
  body.v2-view-agent #s-agent .ag-voice-set { position: static; }
  body.v2-view-agent #s-agent .cr-workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  body.v2-view-agent #s-agent.cr-show-scenes .ag-shell { display: none; }
  body.v2-view-agent #s-agent.cr-show-scenes .cr-board { flex: 1; margin-bottom: max(10px, env(safe-area-inset-bottom)); }
  body.v2-view-agent #s-agent .cr-final { flex: 1; min-height: 0; overflow-y: auto; }
  body.v2-view-agent #s-agent .cr-foot { max-height: 45%; overflow-y: auto; }
  body.v2-view-agent #s-agent .cr-quick { max-height: 130px; overflow-y: auto; }
}
