/* ==========================================================================
   б.space AI — IDE как ОТДЕЛЬНЫЙ продукт «в духе VS Code» (2026-11-29, CLAUDE.md → «НОВОЕ ОКНО», A)
   Свои шрифты (системный Segoe UI / system-ui, код — JetBrains Mono / Consolas), своя лёгкая палитра (тёмная — как
   Dark Modern, светлая — как Light Modern), без логотипов и значков Microsoft. Шрифт сайта (Onest) здесь не участвует.
   Корень — .vs (#ide); тема IDE своя (настройки → Appearance), не зависит от темы сайта.
   ========================================================================== */
body.ide-mode .main-header, body.ide-mode .site-footer, body.ide-mode .mobile-tabbar { display: none !important; }
body.ide-mode { --tabbar-h: 0px; overflow: hidden; }
body.ide-mode #ide-page { padding: 0 !important; margin: 0 !important; max-width: none !important; }

@font-face { font-family: 'seti'; src: url('/assets/vendor/seti/seti.woff') format('woff'); font-display: block; }

.vs {
    --vs-font: "Segoe WPC", "Segoe UI", system-ui, -apple-system, "Ubuntu", "Helvetica Neue", Arial, sans-serif;
    --vs-code: "JetBrains Mono", Consolas, "Cascadia Code", "Courier New", monospace;
    --vs-bg: #1f1f1f; --vs-side: #181818; --vs-bar: #181818; --vs-panel: #181818; --vs-tab: #181818; --vs-tab-on: #1f1f1f;
    --vs-fg: #cccccc; --vs-fg-strong: #e7e7e7; --vs-muted: #9d9d9d; --vs-faint: #6e6e6e;
    --vs-border: #2b2b2b; --vs-accent: #0078d4; --vs-accent-fg: #ffffff; --vs-link: #4daafc;
    --vs-hover: #2a2d2e; --vs-active: #37373d; --vs-sel: #04395e; --vs-focus: #0078d4;
    --vs-input: #313131; --vs-input-border: #3c3c3c; --vs-badge: #616161; --vs-menu: #1f1f1f; --vs-shadow: 0 6px 22px rgba(0, 0, 0, .45);
    --vs-ok: #89d185; --vs-warn: #cca700; --vs-err: #f14c4c; --vs-add: #81b88b; --vs-mod: #e2c08d; --vs-del: #c74e39;
    --vs-ui-size: 13px; --vs-chat-font: var(--vs-font);
    /* старые имена, которыми пользуется окно ИИ / туториал — внутри IDE они тоже наши */
    --bg-color: var(--vs-bg); --panel-bg: var(--vs-side); --text-color: var(--vs-fg); --text-muted: var(--vs-muted); --text-faint: var(--vs-faint);
    --border-color: var(--vs-border); --border-strong: var(--vs-input-border); --surface-2: var(--vs-input); --surface-hover: var(--vs-hover);
    --accent-color: var(--vs-accent); --accent-text: var(--vs-link); --accent-soft: rgba(0, 120, 212, .16); --accent-soft-border: rgba(0, 120, 212, .55);
    --font-body: var(--vs-font); --font-code: var(--vs-code); --radius-sm: 4px; --radius-md: 6px;
    position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: 35px 1fr 22px; height: 100dvh;
    background: var(--vs-bg); color: var(--vs-fg); font: var(--vs-ui-size)/1.4 var(--vs-font); overflow: hidden;
}
.vs.vs-light {
    --vs-bg: #ffffff; --vs-side: #f8f8f8; --vs-bar: #f8f8f8; --vs-panel: #f8f8f8; --vs-tab: #f8f8f8; --vs-tab-on: #ffffff;
    --vs-fg: #3b3b3b; --vs-fg-strong: #1f1f1f; --vs-muted: #616161; --vs-faint: #8b8b8b;
    --vs-border: #e5e5e5; --vs-accent: #005fb8; --vs-link: #005fb8;
    --vs-hover: #f0f0f0; --vs-active: #e4e6f1; --vs-sel: #add6ff; --vs-input: #ffffff; --vs-input-border: #cecece; --vs-badge: #cccccc;
    --vs-menu: #ffffff; --vs-shadow: 0 6px 22px rgba(0, 0, 0, .16);
    --vs-ok: #388a34; --vs-warn: #bf8803; --vs-err: #e51400; --vs-add: #587c0c; --vs-mod: #895503; --vs-del: #ad0707;
    --accent-soft: rgba(0, 95, 184, .1); --accent-soft-border: rgba(0, 95, 184, .45);
}
.vs.vs-contrast { --vs-border: #6fc3df; --vs-input-border: #6fc3df; }
.vs.vs-light.vs-contrast { --vs-border: #0f4a85; --vs-input-border: #0f4a85; }
.vs.vs-nomotion *, .vs.vs-nomotion *::before, .vs.vs-nomotion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
.vs button, .vs input, .vs select, .vs textarea { font-family: inherit; font-size: inherit; }
.vs input, .vs select, .vs textarea { color: inherit; }
.vs .ai-send { background: var(--vs-fg-strong); color: var(--vs-bg); }
.vs ::selection { background: var(--vs-sel); }

/* Ползунки — как в VS Code: видны, только когда курсор внутри своей области; тонкие, поверх содержимого */
.vs *::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
.vs *::-webkit-scrollbar-thumb { background: transparent; border-radius: 0; }
.vs *:hover::-webkit-scrollbar-thumb { background: rgba(121, 121, 121, .4); }
.vs *::-webkit-scrollbar-thumb:hover { background: rgba(100, 100, 100, .7); }
.vs *::-webkit-scrollbar-corner { background: transparent; }
@supports (-moz-appearance: none) {
    .vs * { scrollbar-width: thin; scrollbar-color: transparent transparent; }
    .vs *:hover { scrollbar-color: rgba(121, 121, 121, .45) transparent; }
}

/* --- Заголовок: меню, поиск по центру, переключатели панелей --- */
.vs-title { position: relative; display: flex; align-items: center; height: 35px; background: var(--vs-bar); border-bottom: 1px solid var(--vs-border); user-select: none; min-width: 0; }
.vs-logo { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; }
.vs-logo img { width: 20px; height: 20px; border-radius: 5px; }
.vs-menubar { display: flex; align-items: center; height: 100%; flex: none; }
.vs-menu-top { height: 26px; padding: 0 8px; border: 0; border-radius: 5px; background: none; cursor: pointer; color: var(--vs-fg); }
.vs-menu-top:hover, .vs-menu-top.is-open { background: var(--vs-hover); }
/* поиск — всегда ровно посередине окна (а не посередине свободного места между меню и кнопками) */
.vs-cc { position: absolute; left: 50%; top: 5px; transform: translateX(-50%); width: clamp(140px, calc(100vw - 1080px), 520px); display: flex; }
.vs-title-right { margin-left: auto; }
.vs-cc-btn { width: 100%; height: 24px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; cursor: pointer;
             border: 1px solid var(--vs-input-border); border-radius: 6px; background: var(--vs-input); color: var(--vs-muted); white-space: nowrap; overflow: hidden; }
.vs-cc-btn:hover { border-color: var(--vs-faint); color: var(--vs-fg); }
.vs-cc-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; }
.vs-cc-btn span { overflow: hidden; text-overflow: ellipsis; }
.vs-title-right { display: flex; align-items: center; gap: 2px; padding-right: 6px; flex: none; }
.vs-ib { width: 28px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px;
         background: none; color: var(--vs-fg); cursor: pointer; flex: none; padding: 0; text-decoration: none; }
.vs-ib:hover { background: var(--vs-hover); }
.vs-ib.is-on { color: var(--vs-fg-strong); }
.vs-ib svg, .vs-act svg, .vs-sb svg, .vs-ii svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vs-ib[disabled] { opacity: .4; cursor: default; }

/* --- Тело: полоса значков | боковая панель | редакторы + нижняя панель | окно ИИ --- */
.vs-body { display: grid; grid-template-columns: 48px var(--ide-side-w, 260px) minmax(0, 1fr) var(--ide-ai-w, 400px); min-height: 0; position: relative; }
.vs:not(.side-on) .vs-body { grid-template-columns: 48px 0 minmax(0, 1fr) var(--ide-ai-w, 400px); }
.vs:not(.ai-on) .vs-body { grid-template-columns: 48px var(--ide-side-w, 260px) minmax(0, 1fr) 0; }
.vs:not(.side-on):not(.ai-on) .vs-body { grid-template-columns: 48px 0 minmax(0, 1fr) 0; }
.vs.ai-max.ai-on .vs-body { grid-template-columns: 48px 0 0 1fr; }
.vs.ai-max .vs-side, .vs.ai-max .vs-center { visibility: hidden; }
.vs-activity { display: flex; flex-direction: column; align-items: center; background: var(--vs-bar); border-right: 1px solid var(--vs-border); padding: 4px 0; }
.vs-act { position: relative; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none;
          color: var(--vs-faint); cursor: pointer; }
.vs-act svg { width: 24px; height: 24px; stroke-width: 1.4; }
.vs-act:hover, .vs-act.is-on { color: var(--vs-fg-strong); }
.vs-act.is-on::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--vs-accent); }
.vs-act-gap { flex: 1; }
.vs-act .vs-badge { position: absolute; right: 7px; bottom: 7px; }
.vs-act-avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
                 background: var(--vs-accent); color: #fff; font: 600 12px var(--vs-font); }
.vs-act-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vs-badge { min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--vs-accent); color: #fff;
            font: 600 10px/16px var(--vs-font); text-align: center; }
.vs-badge.is-grey { background: var(--vs-badge); color: var(--vs-fg-strong); }

.vs-side { position: relative; background: var(--vs-side); border-right: 1px solid var(--vs-border); min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.vs:not(.side-on) .vs-side { border: 0; }
.vs-view-head { display: flex; align-items: center; justify-content: space-between; height: 35px; padding: 0 8px 0 20px; flex: none;
                font-size: 11px; text-transform: uppercase; letter-spacing: .02em; color: var(--vs-fg); }
.vs-view-head .vs-acts { display: flex; gap: 2px; }
.vs-view-head .vs-ib { width: 22px; height: 22px; }
.vs-view-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.vs-sec { display: flex; flex-direction: column; min-height: 0; }
.vs-sec.is-grow { flex: 1; }
.vs-sec-head { display: flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 2px; flex: none; cursor: pointer; user-select: none;
               font: 700 11px var(--vs-font); text-transform: uppercase; letter-spacing: .02em; color: var(--vs-fg); border-top: 1px solid transparent; }
.vs-sec + .vs-sec > .vs-sec-head { border-top-color: var(--vs-border); }
.vs-sec-head .vs-chev { width: 16px; text-align: center; transition: transform .1s; font-size: 10px; }
.vs-sec.is-closed .vs-chev { transform: rotate(-90deg); }
.vs-sec-head .vs-sec-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-sec-head .vs-acts { display: none; gap: 2px; }
.vs-sec-head:hover .vs-acts, .vs-sec:focus-within .vs-acts { display: flex; }
.vs-sec-head .vs-ib { width: 20px; height: 20px; }
.vs-sec-body { overflow: auto; min-height: 0; flex: 1; }
.vs-sec.is-closed .vs-sec-body { display: none; }
.vs-sec-split { height: 4px; cursor: row-resize; flex: none; margin: -2px 0; position: relative; z-index: 2; }
.vs-sec-split:hover, body.vs-vresizing .vs-sec-split { background: var(--vs-accent); }
body.vs-vresizing { cursor: row-resize; user-select: none; }

/* дерево */
.vs-tree { padding-bottom: 8px; outline: 0; }
.vs-row { display: flex; align-items: center; height: 22px; padding-right: 8px; cursor: pointer; white-space: nowrap; color: var(--vs-fg); position: relative; }
.vs-row:hover { background: var(--vs-hover); }
.vs-row.is-active { background: var(--vs-active); }
.vs-row.is-focus { outline: 1px solid var(--vs-focus); outline-offset: -1px; }
.vs-row .vs-twist { width: 16px; flex: none; text-align: center; font-size: 10px; color: var(--vs-fg); }
.vs-row .vs-name { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.vs-row .vs-letter { font-size: 12px; margin-left: 6px; flex: none; width: 12px; text-align: center; }
.vs-row .vs-row-acts { display: none; gap: 2px; margin-left: 4px; }
.vs-row:hover .vs-row-acts { display: inline-flex; }
.vs-row .vs-row-acts .vs-ib { width: 20px; height: 20px; }
.vs-row input { flex: 1; height: 20px; min-width: 0; border: 1px solid var(--vs-focus); background: var(--vs-input); color: var(--vs-fg); padding: 0 4px; outline: 0; }
.vs-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(128, 128, 128, .16); pointer-events: none; }
.vs-tree:hover .vs-guide { background: rgba(128, 128, 128, .32); }
.vs-empty { padding: 10px 20px; color: var(--vs-muted); line-height: 1.5; }
.vs-empty .vs-btn { width: 100%; margin-top: 10px; }

/* значки Seti */
.seti { font-family: 'seti'; font-size: 16px; width: 16px; height: 22px; line-height: 22px; display: inline-block; text-align: center; flex: none;
        margin-right: 6px; -webkit-font-smoothing: antialiased; }
.vs-tab .seti { margin-right: 4px; }

/* кнопки и поля */
.vs-btn { height: 26px; padding: 0 12px; border: 1px solid transparent; border-radius: 2px; background: var(--vs-accent); color: var(--vs-accent-fg); cursor: pointer;
          display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.vs-btn:hover { filter: brightness(1.12); }
.vs-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.vs-btn svg path[fill='currentColor'] { fill: currentColor; }
.vs-btn.is-sec { background: var(--vs-input); color: var(--vs-fg); border-color: var(--vs-input-border); }
.vs-btn[disabled] { opacity: .5; cursor: default; filter: none; }
.vs-input { width: 100%; box-sizing: border-box; height: 26px; padding: 0 6px; border: 1px solid var(--vs-input-border); border-radius: 2px;
            background: var(--vs-input); color: var(--vs-fg); outline: 0; }
.vs-input:focus { border-color: var(--vs-focus); }
textarea.vs-input { height: auto; min-height: 26px; padding: 4px 6px; resize: vertical; line-height: 1.4; }
.vs-field { position: relative; display: flex; align-items: center; }
.vs-field .vs-input { padding-right: 76px; }
.vs-toggles { position: absolute; right: 3px; display: flex; gap: 1px; }
.vs-tog { width: 22px; height: 20px; border: 1px solid transparent; border-radius: 3px; background: none; color: var(--vs-fg); cursor: pointer;
          font: 600 11px var(--vs-code); padding: 0; }
.vs-tog.is-on { border-color: var(--vs-focus); background: rgba(0, 120, 212, .25); }
.vs-pad { padding: 4px 12px 8px 20px; display: flex; flex-direction: column; gap: 6px; }
.vs-muted { color: var(--vs-muted); }
.vs-small { font-size: 12px; }

/* --- Центр: редакторы и нижняя панель --- */
.vs-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--vs-bg); }
.vs-editors { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.vs-tabs { display: flex; height: 35px; flex: none; background: var(--vs-tab); overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--vs-border); }
.vs-tabs::-webkit-scrollbar { height: 3px; }
.vs-tab { display: flex; align-items: center; height: 35px; padding: 0 4px 0 10px; border-right: 1px solid var(--vs-border); cursor: pointer; flex: none;
          color: var(--vs-muted); white-space: nowrap; position: relative; max-width: 240px; }
.vs-tab .vs-tab-name { overflow: hidden; text-overflow: ellipsis; }
.vs-tab.is-on { background: var(--vs-tab-on); color: var(--vs-fg-strong); }
.vs-tab.is-on::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--vs-accent); }
.vs-tab.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--vs-tab-on); }
.vs-tab.is-preview .vs-tab-name { font-style: italic; }
.vs-tab-x { width: 20px; height: 20px; margin-left: 4px; border: 0; border-radius: 4px; background: none; color: inherit; cursor: pointer; visibility: hidden;
            display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.vs-tab:hover .vs-tab-x, .vs-tab.is-on .vs-tab-x, .vs-tab.is-dirty .vs-tab-x { visibility: visible; }
.vs-tab-x:hover { background: var(--vs-hover); }
.vs-tab.is-dirty .vs-tab-x::before { content: '●'; font-size: 11px; }
.vs-tab.is-dirty .vs-tab-x:hover::before { content: '×'; font-size: 15px; }
.vs-tab.is-dirty .vs-tab-x > span { display: none; }
.vs-tabs-gap { flex: 1; min-width: 8px; }
.vs-tabs-acts { display: flex; align-items: center; gap: 2px; padding: 0 6px; flex: none; position: sticky; right: 0; background: var(--vs-tab); }
.vs-crumbs { display: flex; align-items: center; gap: 2px; height: 22px; flex: none; padding: 0 12px; color: var(--vs-muted); font-size: 12px; overflow: hidden; white-space: nowrap; }
.vs-crumbs span { cursor: default; }
.vs-crumbs i { font-style: normal; opacity: .7; padding: 0 2px; }
.vs-crumbs:empty { display: none; }
.vs .ide-stage { flex: 1; position: relative; min-height: 0; }
.vs .ide-editor, .vs .ide-preview, .vs .ide-welcome, .vs .vs-diff { position: absolute; inset: 0; }
.vs .ide-preview { overflow: auto; background: var(--vs-bg); }
.vs [hidden] { display: none !important; }
.vs .ide-md { max-width: 880px; margin: 0 auto; padding: 24px 28px; line-height: 1.6; color: var(--vs-fg); }
.vs .ide-md h1, .vs .ide-md h2 { border-bottom: 1px solid var(--vs-border); padding-bottom: .3em; }
.vs .ide-md code { font: 12px var(--vs-code); background: var(--vs-input); padding: 1px 4px; border-radius: 3px; }
.vs .ide-md pre { background: var(--vs-side); padding: 12px; border-radius: 4px; overflow: auto; }
.vs .ide-md pre code { background: none; padding: 0; }
.vs .ide-md a { color: var(--vs-link); }
.vs .ide-md img { max-width: 100%; }
.vs .ide-welcome { display: flex; align-items: center; justify-content: center; overflow: auto; text-align: left; }
/* всё приветствие — по центру окна редактора: заголовок, под ним обе колонки (каждая по ширине своего текста) */
.vs-welcome { max-width: 92%; margin: auto; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 30px 0; text-align: left; }
.vs-welcome-cols { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 64px; }
.vs-welcome-cols > div { display: flex; flex-direction: column; align-items: flex-start; }
.vs-welcome h1 { margin: 0; text-align: center; font: 300 46px/1.2 var(--vs-font); color: var(--vs-fg-strong); }
.vs-welcome h1 small { display: block; font-size: 15px; color: var(--vs-muted); margin-top: 6px; transition: opacity .6s ease; }
/* Появление надписи (ide-intro.js): пока анимация не дошла — место занято, но букв и подписи не видно */
.vs-brand { display: inline-block; white-space: nowrap; }
.vs-brand-h.is-wait .vs-brand { visibility: hidden; }
.vs-brand-h.is-wait small { opacity: 0; }
.vs-intro-cv { position: absolute; z-index: 5; pointer-events: none; }
/* Туториал запустили уже внутри IDE — не цветная анимация, а мягкое одноцветное свечение с бликом */
.vs-brand.is-glow { color: transparent; -webkit-background-clip: text; background-clip: text; background-size: 260% 100%; background-position: 130% 0;
    background-image: linear-gradient(105deg, var(--vs-fg-strong) 42%, var(--vs-link) 50%, var(--vs-fg-strong) 58%); animation: vsBrandGlow 1.9s ease-in-out both; }
@keyframes vsBrandGlow {
    0% { background-position: 130% 0; filter: drop-shadow(0 0 0 transparent); }
    45% { filter: drop-shadow(0 0 14px var(--vs-link)); }
    100% { background-position: -30% 0; filter: drop-shadow(0 0 0 transparent); }
}
@media (max-width: 600px) { .vs-welcome h1 { font-size: 38px; } }
.ide-tour, .ide-tour-spot { opacity: 1; }
.ide-tour.is-out, .ide-tour-spot.is-out { opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.vs-welcome h3 { margin: 0 0 8px; font: 400 15px var(--vs-font); color: var(--vs-fg-strong); }
.vs-welcome a, .vs-link { color: var(--vs-link); cursor: pointer; text-decoration: none; display: flex; align-items: center; gap: 8px; padding: 3px 0; background: none; border: 0; text-align: left; }
.vs-welcome a:hover, .vs-link:hover { text-decoration: underline; }
.vs-welcome kbd, .vs-kbd { font: 11px var(--vs-font); padding: 1px 5px; border-radius: 3px; border: 1px solid var(--vs-input-border); border-bottom-width: 2px;
                           background: var(--vs-input); color: var(--vs-fg); }
.vs-welcome-keys { display: grid; grid-template-columns: auto auto; gap: 6px 14px; color: var(--vs-muted); align-items: center; justify-items: start; }
.vs .ide-img { display: flex; align-items: center; justify-content: center; min-height: 100%; padding: 20px; box-sizing: border-box;
               background: repeating-conic-gradient(rgba(128, 128, 128, .15) 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.vs .ide-img img { max-width: 100%; max-height: 100%; }
.vs .ide-empty { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--vs-muted); }
.vs-ext-page { max-width: 980px; margin: 0 auto; padding: 22px 28px; }
.vs-ext-top { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 16px; border-bottom: 1px solid var(--vs-border); }
.vs-ext-top img, .vs-ext-ico { width: 96px; height: 96px; border-radius: 8px; object-fit: contain; flex: none; background: var(--vs-input); }
.vs-ext-top h2 { margin: 0 0 4px; font: 600 22px var(--vs-font); color: var(--vs-fg-strong); }
.vs-ext-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--vs-muted); font-size: 12px; margin: 6px 0 10px; }
.vs-ext-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* нижняя панель */
.vs-panel { position: relative; display: flex; flex-direction: column; height: var(--ide-panel-h, 32%); min-height: 120px; flex: none;
            border-top: 1px solid var(--vs-border); background: var(--vs-panel); }
.vs:not(.panel-on) .vs-panel { display: none; }
.vs.panel-max .vs-editors { display: none; }
.vs.panel-max .vs-panel { flex: 1; height: auto; }
.vs-hresizer { position: absolute; left: 0; right: 0; top: -3px; height: 6px; cursor: row-resize; z-index: 5; }
.vs-hresizer:hover, body.vs-presizing .vs-hresizer { background: var(--vs-accent); }
body.vs-presizing { cursor: row-resize; user-select: none; }
body.vs-presizing .ide-editor, body.vs-presizing .ide-term { pointer-events: none; }
.vs-panel-head { display: flex; align-items: center; height: 35px; padding: 0 8px; flex: none; gap: 2px; }
.vs-ptab { height: 35px; padding: 0 10px; border: 0; background: none; color: var(--vs-muted); cursor: pointer; text-transform: uppercase;
           font-size: 11px; letter-spacing: .02em; position: relative; display: inline-flex; align-items: center; gap: 6px; }
.vs-ptab:hover { color: var(--vs-fg); }
.vs-ptab.is-on { color: var(--vs-fg-strong); }
.vs-ptab.is-on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 1px; background: var(--vs-accent); }
.vs-panel-acts { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.vs-panel-body { flex: 1; min-height: 0; display: flex; }
.vs-pview { flex: 1; min-width: 0; min-height: 0; overflow: auto; }
.vs-pview.is-term { display: flex; overflow: hidden; }
.vs .ide-term { flex: 1; min-width: 0; min-height: 0; padding: 4px 0 0 12px; position: relative; }
.vs .ide-term > .vs-term { position: absolute; inset: 4px 0 0 12px; }
.vs-term-list { width: 160px; flex: none; border-left: 1px solid var(--vs-border); overflow: auto; padding: 2px 0; }
.vs-term-item { display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 6px 0 8px; cursor: pointer; color: var(--vs-fg); white-space: nowrap; }
.vs-term-item:hover { background: var(--vs-hover); }
.vs-term-item.is-on { background: var(--vs-active); }
.vs-term-item .vs-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.vs-term-item .vs-ib { width: 20px; height: 20px; visibility: hidden; }
.vs-term-item:hover .vs-ib { visibility: visible; }
.vs-term-cmd { display: flex; gap: 6px; padding: 4px 12px; border-top: 1px solid var(--vs-border); }
.vs-out { margin: 0; padding: 6px 12px; font: 12px/1.5 var(--vs-code); white-space: pre-wrap; color: var(--vs-fg); }
.vs-prob { display: flex; align-items: center; gap: 6px; padding: 2px 12px; cursor: pointer; white-space: nowrap; }
.vs-prob:hover { background: var(--vs-hover); }
.vs-prob .e { color: var(--vs-err); } .vs-prob .w { color: var(--vs-warn); }
.vs-prob-ai { margin-left: auto; padding: 1px 8px; border: 1px solid var(--vs-border); border-radius: 4px; background: var(--vs-bg);
    color: var(--vs-fg); font: inherit; font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.vs-prob:hover .vs-prob-ai, .vs-prob-ai:focus-visible { opacity: 1; }
.vs-prob-ai:hover { background: var(--vs-hover); }
.vs-table { width: 100%; border-collapse: collapse; }
.vs-table th { text-align: left; font-weight: 400; color: var(--vs-muted); padding: 4px 12px; border-bottom: 1px solid var(--vs-border); }
.vs-table td { padding: 4px 12px; }
.vs-select { height: 22px; border: 1px solid var(--vs-input-border); background: var(--vs-input); color: var(--vs-fg); border-radius: 2px; }

/* строка состояния */
.vs-status { display: flex; align-items: center; height: 22px; background: var(--vs-bar); border-top: 1px solid var(--vs-border); color: var(--vs-muted);
             font-size: 12px; overflow: hidden; white-space: nowrap; user-select: none; }
.vs-sb { height: 22px; padding: 0 7px; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: inherit; cursor: pointer; flex: none; }
.vs-sb:hover { background: var(--vs-hover); color: var(--vs-fg); }
.vs-sb svg { width: 14px; height: 14px; }
.vs-sb.is-remote { background: var(--vs-accent); color: #fff; padding: 0 10px; }
.vs-sb-gap { flex: 1; }

/* меню, контекстное меню */
.vs-menu { position: fixed; z-index: 3000; min-width: 230px; max-width: 420px; padding: 4px 0; background: var(--vs-menu); color: var(--vs-fg);
           border: 1px solid var(--vs-border); border-radius: 6px; box-shadow: var(--vs-shadow); font: var(--vs-ui-size) var(--vs-font); }
.vs-mi { display: flex; align-items: center; gap: 10px; width: 100%; height: 26px; padding: 0 10px 0 26px; border: 0; background: none; color: inherit;
         cursor: pointer; text-align: left; position: relative; box-sizing: border-box; border-radius: 4px; }
.vs-menu .vs-mi { margin: 0 4px; width: calc(100% - 8px); }
.vs-mi:hover, .vs-mi.is-focus { background: var(--vs-accent); color: #fff; }
.vs-mi[disabled] { opacity: .45; cursor: default; background: none !important; color: inherit !important; }
.vs-mi .vs-mi-key { margin-left: auto; padding-left: 24px; opacity: .8; font-size: 12px; }
.vs-mi .vs-mi-check { position: absolute; left: 8px; }
.vs-mi .vs-mi-sub { margin-left: auto; }
.vs-msep { height: 1px; margin: 4px 0; background: var(--vs-border); }

/* палитра команд и быстрый поиск файла (Ctrl+Shift+P / Ctrl+P) */
.vs-qi { position: fixed; z-index: 3100; top: 40px; left: 50%; transform: translateX(-50%); width: min(600px, calc(100vw - 24px));
         background: var(--vs-menu); border: 1px solid var(--vs-border); border-radius: 8px; box-shadow: var(--vs-shadow); padding: 6px;
         font: var(--vs-ui-size) var(--vs-font); color: var(--vs-fg); }
.vs-qi input { width: 100%; box-sizing: border-box; height: 26px; padding: 0 8px; border: 1px solid var(--vs-focus); border-radius: 4px;
               background: var(--vs-input); color: var(--vs-fg); outline: 0; }
.vs-qi-list { max-height: min(60vh, 440px); overflow: auto; margin-top: 6px; }
.vs-qi-item { display: flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.vs-qi-item.is-focus { background: var(--vs-active); }
.vs-qi.vs-light-pick .vs-qi-item.is-focus, .vs-qi-item:hover { background: var(--vs-hover); }
.vs-qi-item .vs-qi-title { overflow: hidden; text-overflow: ellipsis; }
.vs-qi-item .vs-qi-desc { color: var(--vs-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.vs-qi-item .vs-kbd { margin-left: auto; }
.vs-qi-item b { color: var(--vs-link); font-weight: 600; }
.vs-qi-sep { padding: 6px 8px 2px; color: var(--vs-muted); font-size: 11px; text-transform: uppercase; }
.vs-qi-empty { padding: 8px; color: var(--vs-muted); }

/* поиск по проекту */
.vs-sres-file { display: flex; align-items: center; height: 22px; padding: 0 8px 0 4px; cursor: pointer; white-space: nowrap; }
.vs-sres-file:hover { background: var(--vs-hover); }
.vs-sres-file .vs-muted { margin-left: 6px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.vs-sres-line { display: block; height: 22px; line-height: 22px; padding: 0 8px 0 38px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-sres-line:hover { background: var(--vs-hover); }
.vs-sres-line mark { background: rgba(234, 92, 0, .33); color: inherit; border: 1px solid rgba(234, 92, 0, .5); }

/* Source Control */
.vs-scm-msg { min-height: 52px; }
.vs-scm-commit { display: flex; }
.vs-scm-commit .vs-btn { flex: 1; border-radius: 2px 0 0 2px; }
.vs-scm-commit .vs-btn.is-more { flex: none; width: 26px; padding: 0; border-left: 1px solid rgba(255, 255, 255, .25); border-radius: 0 2px 2px 0; }
.vs-letter.M { color: var(--vs-mod); } .vs-letter.A, .vs-letter.U { color: var(--vs-add); } .vs-letter.D { color: var(--vs-del); }
.vs-letter.R, .vs-letter.C { color: var(--vs-link); }
.vs-row.is-deleted .vs-name { text-decoration: line-through; }

/* расширения */
.vs-ext { display: flex; gap: 10px; padding: 8px 12px 8px 16px; cursor: pointer; position: relative; }
.vs-ext:hover { background: var(--vs-hover); }
.vs-ext.is-on { background: var(--vs-active); }
.vs-ext-icon { width: 42px; height: 42px; flex: none; border-radius: 4px; object-fit: contain; background: var(--vs-input); display: inline-flex;
               align-items: center; justify-content: center; font: 600 16px var(--vs-font); color: var(--vs-muted); }
.vs-ext-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.vs-ext-txt b { font-weight: 600; color: var(--vs-fg-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-ext-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--vs-muted); }
.vs-ext-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--vs-muted); }
.vs-ext-foot .vs-btn { height: 20px; padding: 0 6px; font-size: 11px; margin-left: auto; }
.vs-ext-stat { font-size: 11px; color: var(--vs-muted); white-space: nowrap; }

/* --- Окно ИИ в IDE: шрифт и цвета IDE, длинные подписи переносятся целиком (без «…») --- */
.vs .ide-ai-wrap { position: relative; min-width: 0; overflow: hidden; background: var(--vs-side); border-left: 1px solid var(--vs-border); }
.vs:not(.ai-on) .ide-ai-wrap { border: 0; }
.vs .ide-ai { height: 100%; display: flex; flex-direction: column; font: var(--vs-ui-size)/1.45 var(--vs-chat-font); position: relative; }
.vs .ide-resizer { position: absolute; top: 0; bottom: 0; width: 6px; z-index: 6; cursor: col-resize; touch-action: none; }
.vs .vs-side > .ide-resizer { right: -3px; }
.vs .ide-ai-wrap > .ide-resizer { left: -3px; }
.vs .ide-resizer:hover, body.ide-resizing .vs .ide-resizer { background: var(--vs-accent); }
.vs .ai-pop-text small, .vs .ai-cmd-sub { white-space: normal; text-overflow: clip; overflow: visible; }
/* полоса под полем ввода: не обрезаем «…», а переносим кнопки целиком на следующую строку */
.vs .ai-row { flex-wrap: wrap; row-gap: 4px; }
.vs .ai-row .ai-model-chip, .vs .ai-row .ai-mode-btn { max-width: none; flex: none; }
.vs .ai-model-chip span, .vs .ai-mode-btn span { white-space: nowrap; overflow: visible; text-overflow: clip; }
.vs .ai-row > .ide-bar-gap { flex: 1 1 0; min-width: 0; }
.vs .ai-send { margin-left: auto; }
.vs .ai-pop-text small { line-height: 1.35; }
.vs .ai-pop-item { align-items: flex-start; }
.vs .ai-pop-item > .ai-ic { margin-top: 2px; }
.vs .ai-cmd-sub { max-width: 50%; text-align: right; }
.vs .ai-pop, .vs .ai-pop-top { background: var(--vs-menu); border-color: var(--vs-border); box-shadow: var(--vs-shadow); font-family: var(--vs-font); }
.vs .ai-pop-search, .vs .ai-box { background: var(--vs-input); border-color: var(--vs-input-border); }
.vs .ai-pop-item.is-on { background: var(--vs-active); }
.vs .ai-msg { font-family: var(--vs-chat-font); }
.vs .ai-assistant { background: none; padding: 2px 4px; }
.vs .ai-user { background: var(--vs-input); border: 1px solid var(--vs-input-border); max-width: 96%; }
.vs .ai-log { width: 100%; box-sizing: border-box; }
.vs.chat-narrow .ai-log > * { max-width: 560px; }
.vs.chat-wide .ai-log > * { max-width: none; }
/* вкладки диалогов — как в Claude Code: у активной скруглены верхние углы и светлее фон, у остальных фона нет,
   крестик — у активной и при наведении */
.vs .ai-tabs { background: var(--vs-tab-strip, #121212); align-items: flex-end; gap: 4px; padding: 4px 14px 0 0; min-height: 38px; box-sizing: border-box; border-bottom: 1px solid var(--vs-border); }
.vs .ai-tab { height: 33px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0; color: var(--vs-muted); font-size: 12.5px; position: relative; box-sizing: border-box; }
.vs .ai-tab:hover { color: var(--vs-fg); background: var(--vs-hover); }
.vs .ai-tab.active { background: var(--vs-side); color: var(--vs-fg-strong); border-color: var(--vs-border); box-shadow: none; }
.vs .ai-tab-ico { color: #d97757; font-size: 12px; }
.vs .ai-tab button { display: inline-flex; opacity: 0; border-radius: 5px; line-height: 1; padding: 4px; color: var(--vs-muted); transition: opacity .12s, background .12s; }
.vs .ai-tab button svg { width: 14px; height: 14px; }
.vs .ai-tab.active button, .vs .ai-tab:hover button, .vs .ai-tab button:focus-visible { opacity: .75; }
.vs .ai-tab button:hover { background: color-mix(in srgb, var(--vs-fg) 10%, transparent); color: var(--vs-fg); opacity: 1; }
/* Левая вкладка прилегает к краю: скругление только справа сверху; у активной снизу справа (и слева у не первой) —
   «вогнутый» уголок того же цвета, как у вкладок браузера (просьба Ильи 03.12) */
.vs .ai-tab:first-child { border-left: 0; border-top-left-radius: 0; }
.vs .ai-tab:not(.active):hover { background: color-mix(in srgb, var(--vs-fg) 7%, transparent); }
.vs .ai-tab.active::after, .vs .ai-tab.active:not(:first-child)::before { content: ""; position: absolute; bottom: -1px; width: 8px; height: 8px; pointer-events: none; }
.vs .ai-tab.active::after { right: -9px; background: radial-gradient(circle at 100% 0, transparent 7.5px, var(--vs-side) 8px); }
.vs .ai-tab.active:not(:first-child)::before { left: -9px; background: radial-gradient(circle at 0 0, transparent 7.5px, var(--vs-side) 8px); }
.vs .ai-tab.active { margin-bottom: -1px; height: 34px; }
@media (hover: none) { .vs .ai-tab button { opacity: .85; } }

.ai-soon-btn { align-self: flex-start; }

/* Подключение сервера из IDE (ide-connect.js) */
.ic-wide { width: 100%; }
.ic-form { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; margin: 4px 0 10px; }
.ic-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-muted); min-width: 0; }
.ic-form .aurorix-input { width: 100%; box-sizing: border-box; margin: 0; }
.ic-span { grid-column: 1 / -1; width: 100%; }
.ic-key { margin-top: 10px; font-size: 13px; }
.ic-key summary { cursor: pointer; color: var(--accent-text); }
.ic-cmd { max-height: 110px; overflow: auto; padding: 10px; margin: 8px 0; border-radius: 6px; background: var(--surface-2); font: 11px/1.5 var(--font-code, monospace); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Usage */
.vs-us-card { padding: 12px 14px; margin: 8px 0; border: 1px solid var(--vs-border); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.vs-us-head, .vs-us-cap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.vs-us-head b { color: var(--vs-fg-strong); font-weight: 600; overflow-wrap: anywhere; }
.vs-us-cap { font-size: 12px; color: var(--vs-muted); }
.vs-us-limit { display: flex; flex-direction: column; gap: 6px; min-height: 18px; }
.vs-us-limit .gp-spinner { width: 14px; height: 14px; }
.vs-us-model { display: grid; grid-template-columns: 18px minmax(0, 1fr) 120px 112px; align-items: center; gap: 10px; }
.vs-us-name { overflow-wrap: anywhere; }
.vs-us-model small { display: block; font-size: 11px; color: var(--vs-muted); }
.vs-us-num { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.vs-us-foot { text-align: right; margin-top: 6px; }
.vs-meter.is-full i { background: #e5484d; }

/* модели по компаниям */
.ai-co { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px; font-size: 12px; color: var(--vs-muted, var(--text-muted)); position: sticky; top: 0;
         background: var(--vs-menu, var(--panel-bg)); z-index: 1; }
.ai-co b { color: var(--vs-fg, var(--text-color)); font-weight: 600; }
.ai-co b { flex: none; }
.ai-co-bal { margin-left: auto; font-size: 11px; text-align: right; overflow-wrap: anywhere; color: var(--vs-faint, var(--text-faint)); }
/* Режим компании: «Подписка / Тариф ✨ / API» — справа от названия (04.12) */
.ai-co { flex-wrap: wrap; }
.ai-co-modes { display: inline-flex; flex: none; padding: 2px; gap: 2px; border-radius: 7px; background: rgba(127, 127, 127, .14); }
.ai-co-modes button { padding: 2px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--vs-muted, var(--text-muted));
    font: inherit; font-size: 11px; line-height: 1.5; cursor: pointer; white-space: nowrap; }
.ai-co-modes button:hover { color: var(--vs-fg, var(--text-color)); }
.ai-co-modes button.is-on { background: var(--vs-input, var(--surface-2)); color: var(--vs-fg, var(--text-color)); box-shadow: 0 0 0 1px rgba(127, 127, 127, .25); }
.ai-co-empty { display: flex; align-items: center; gap: 10px; margin: 2px 8px 8px; padding: 8px 10px; border: 1px dashed rgba(127, 127, 127, .3);
    border-radius: 8px; font-size: 12px; line-height: 1.4; color: var(--vs-muted, var(--text-muted)); }
.ai-co-empty span { flex: 1; }
.ai-co-empty .vs-btn { flex: none; }
/* «Вход»: строки «Войти в …» и «Ввести свой ключ …» под моделями раздела */
.ai-pop-item.ai-co-act { gap: 8px; align-items: flex-start; }
.ai-pop-item.ai-co-act b { color: var(--vs-link, #4daafc); font-weight: 500; }
.ai-co-key { width: 16px; flex: none; text-align: center; font-size: 12px; line-height: 1.4; }
.ai-logo { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; }
.ai-logo img { width: 15px; height: 15px; }
.ai-logo.is-mask { -webkit-mask: var(--logo) center / 14px 14px no-repeat; mask: var(--logo) center / 14px 14px no-repeat; }
.ai-logo.is-letter { color: #fff; font: 700 10px var(--vs-font, sans-serif); }
.ai-pop-list .ai-pop-item .ai-logo { margin-top: 2px; }

/* кольцо заполнения контекста у поля ввода */
.ai-ring { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; cursor: pointer; }
.ai-ring svg { width: 16px; height: 16px; transform: rotate(-90deg); }
.ai-ring circle { fill: none; stroke-width: 3; }
.ai-ring .bg { stroke: var(--vs-input-border, var(--border-strong)); }
.ai-ring .fg { stroke: var(--vs-muted, var(--text-muted)); transition: stroke-dashoffset .3s; }
.ai-ring.is-warn .fg { stroke: var(--vs-warn, #cca700); }
.ai-ring.is-full .fg { stroke: var(--vs-err, #f14c4c); }

/* окно разрешения действия и окно вопроса — у поля ввода, как в Claude Code */
.ai-ask { margin: 8px 10px 0; border: 1px solid var(--vs-input-border, var(--border-strong)); border-radius: 10px; background: var(--vs-menu, var(--panel-bg));
          box-shadow: var(--vs-shadow, var(--shadow)); overflow: hidden; animation: ai-ask-in .15s ease-out; }
@keyframes ai-ask-in { from { transform: translateY(6px); opacity: 0; } }
.ai-ask.is-danger { border-color: rgba(241, 76, 76, .6); }
.ai-ask-head { padding: 10px 12px 6px; font-weight: 600; color: var(--vs-fg-strong, var(--text-color)); display: flex; gap: 8px; align-items: flex-start; }
.ai-ask-head small { display: block; font-weight: 400; color: var(--vs-muted, var(--text-muted)); margin-top: 2px; }
.ai-ask-body { padding: 0 12px 8px; max-height: 38vh; overflow: auto; }
.ai-ask-body pre { margin: 0; font: 12px/1.45 var(--vs-code, monospace); background: var(--vs-input, var(--surface-2)); padding: 8px; border-radius: 6px; white-space: pre-wrap; word-break: break-all; }
.ai-ask-body .ai-diff { border-radius: 6px; }
.ai-ask-opts { display: flex; flex-direction: column; padding: 4px 6px 8px; }
.ai-ask-opt { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; text-align: left; }
.ai-ask-opt:hover, .ai-ask-opt.is-focus { background: var(--vs-hover, var(--surface-hover)); }
.ai-ask-opt .n { width: 18px; flex: none; color: var(--vs-muted, var(--text-muted)); font: 12px var(--vs-code, monospace); }
.ai-ask-opt.is-picked { background: var(--accent-soft); }
.ai-ask-other { display: flex; gap: 6px; padding: 0 12px 10px; }
.ai-ask-other textarea { flex: 1; min-height: 30px; max-height: 120px; resize: vertical; border: 1px solid var(--vs-input-border, var(--border-strong)); border-radius: 6px;
                         background: var(--vs-input, var(--surface-2)); color: inherit; padding: 6px 8px; font: inherit; outline: 0; }
.ai-ask-foot { padding: 0 12px 10px; font-size: 11px; color: var(--vs-faint, var(--text-faint)); }
.ai-ask-done { margin: 4px 0; padding: 6px 10px; font-size: 12px; color: var(--vs-muted, var(--text-muted)); border-left: 2px solid var(--vs-input-border, var(--border-strong)); }
.ai-compact-note { font-size: 12px; color: var(--vs-muted, var(--text-muted)); padding: 4px 0; }
.ai-compact-note details summary { cursor: pointer; }

/* туториал — окно шага справа от подсвеченного элемента, шрифт IDE (не «тот самый ужасный») */
.ide-tour { font: 13px/1.45 "Segoe WPC", "Segoe UI", system-ui, -apple-system, sans-serif !important; width: 300px; max-width: calc(100vw - 24px);
            background: #252526; color: #e7e7e7; border: 1px solid #3c3c3c; border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.ide-tour b { font-weight: 600; font-size: 14px; color: #fff; }
.ide-tour p { color: #b4b4b4 !important; }
.ide-tour .btn-primary, .ide-tour .btn-secondary, .ide-tour button { font: 13px "Segoe UI", system-ui, sans-serif !important; letter-spacing: 0 !important;
            text-transform: none !important; border-radius: 3px !important; padding: 4px 12px !important; }
.ide-tour::before { content: ''; position: absolute; width: 10px; height: 10px; background: inherit; border: inherit; transform: rotate(45deg); }
.ide-tour.at-right::before { left: -6px; top: var(--arrow-y, 20px); border-right: 0; border-top: 0; }
.ide-tour.at-left::before { right: -6px; top: var(--arrow-y, 20px); border-left: 0; border-bottom: 0; }
.ide-tour.at-below::before { top: -6px; left: var(--arrow-x, 20px); border-right: 0; border-bottom: 0; }
.ide-tour.at-above::before { bottom: -6px; left: var(--arrow-x, 20px); border-left: 0; border-top: 0; }

/* --- Настройки аккаунта IDE (кнопка внизу слева) — окно как настройки Claude --- */
.vs-set { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); }
.vs-set-win { width: min(980px, calc(100vw - 24px)); height: min(720px, calc(100dvh - 24px)); display: grid; grid-template-columns: 220px 1fr;
              background: var(--vs-bg); color: var(--vs-fg); border: 1px solid var(--vs-border); border-radius: 12px; overflow: hidden; box-shadow: var(--vs-shadow);
              font: 14px/1.45 var(--vs-font); }
.vs-set-nav { background: var(--vs-side); border-right: 1px solid var(--vs-border); padding: 14px 8px; display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.vs-set-nav h2 { margin: 2px 10px 12px; font: 600 16px var(--vs-font); color: var(--vs-fg-strong); }
.vs-set-nav button { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--vs-fg); cursor: pointer; text-align: left; }
.vs-set-nav button:hover { background: var(--vs-hover); }
.vs-set-nav button.is-on { background: var(--vs-active); color: var(--vs-fg-strong); }
.vs-set-main { overflow: auto; padding: 22px 30px 30px; position: relative; }
.vs-set-close { position: absolute; top: 14px; right: 14px; }
.vs-set-main h3 { margin: 0 0 16px; font: 600 20px var(--vs-font); color: var(--vs-fg-strong); }
.vs-set-main h4 { margin: 22px 0 8px; font: 600 14px var(--vs-font); color: var(--vs-fg-strong); }
.vs-set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--vs-border); }
.vs-set-row > div:first-child { min-width: 0; }
.vs-set-row small { display: block; color: var(--vs-muted); font-size: 12px; margin-top: 2px; }
.vs-set-card { border: 1px solid var(--vs-border); border-radius: 10px; padding: 14px 16px; background: var(--vs-side); margin-bottom: 12px; }
.vs-seg { display: inline-flex; border: 1px solid var(--vs-input-border); border-radius: 8px; overflow: hidden; flex: none; }
.vs-seg button { border: 0; background: none; color: var(--vs-fg); padding: 5px 12px; cursor: pointer; }
.vs-seg button + button { border-left: 1px solid var(--vs-input-border); }
.vs-seg button.is-on { background: var(--vs-active); color: var(--vs-fg-strong); }
.vs-switch { width: 34px; height: 20px; border-radius: 10px; border: 0; background: var(--vs-input-border); position: relative; cursor: pointer; flex: none; padding: 0; }
.vs-switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.vs-switch.is-on { background: var(--vs-accent); }
.vs-switch.is-on::after { left: 16px; }
.vs-meter { height: 8px; border-radius: 4px; background: rgba(128, 128, 128, .22); overflow: hidden; margin: 6px 0 4px; }
.vs-meter i { display: block; height: 100%; background: var(--vs-accent); border-radius: 4px; }
.vs-mem-item { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--vs-border); }
.vs-mem-item p { margin: 0; flex: 1; }
.vs-plugins { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.vs-plugin { border: 1px solid var(--vs-border); border-radius: 10px; padding: 12px 14px; background: var(--vs-side); display: flex; flex-direction: column; gap: 6px; }
.vs-plugin b { color: var(--vs-fg-strong); }
.vs-set-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.vs-set-tabs button { border: 1px solid var(--vs-input-border); background: none; color: var(--vs-fg); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.vs-set-tabs button.is-on { background: var(--vs-fg-strong); color: var(--vs-bg); }
.vs-prev { border: 1px solid var(--vs-border); border-radius: 8px; overflow: hidden; font: 12px/1.6 var(--vs-code); }
.vs-prev div { padding: 0 10px; white-space: pre; }
.vs-prev .a { background: rgba(129, 184, 139, .2); } .vs-prev .d { background: rgba(199, 78, 57, .2); }

/* --- Узкий экран и телефон --- */
@media (max-width: 900px) {
    .vs { grid-template-rows: 35px 1fr 22px; }
    .vs-menubar, .vs-cc { display: none; }
    .vs-title { justify-content: space-between; }
    .vs-body, .vs:not(.side-on) .vs-body, .vs:not(.ai-on) .vs-body, .vs:not(.side-on):not(.ai-on) .vs-body { grid-template-columns: 44px minmax(0, 1fr); }
    .vs-activity { grid-row: 1; }
    .vs-act { width: 44px; height: 44px; }
    .vs-side { position: absolute; left: 44px; top: 0; bottom: 0; width: min(320px, calc(100vw - 44px)); z-index: 8; box-shadow: var(--vs-shadow); }
    .vs:not(.side-on) .vs-side { display: none; }
    .vs .ide-ai-wrap { position: absolute; inset: 0 0 0 44px; z-index: 9; }
    .vs:not(.ai-on) .ide-ai-wrap { display: none; }
    .vs-center { grid-column: 2; }
    .vs .ide-resizer { display: none; }
    .vs-term-list { display: none; }
    .vs-panel { height: 45%; }
    .vs-status .vs-sb.is-opt { display: none; }
    .vs-set-win { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .vs-set-nav { flex-direction: row; overflow-x: auto; padding: 8px; }
    .vs-set-nav h2 { display: none; }
    .vs-set-nav button { flex: none; }
    .vs-set-main { padding: 18px 16px; }
    .vs-us-model { grid-template-columns: 18px minmax(0, 1fr) auto; }
    .vs-us-model .vs-meter { display: none; }
    .vs-welcome-cols { flex-direction: column; }
}

/* подписка: какие нейросети входят в тариф */
.ai-plan-nets { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 18px; }
.ai-plan-nets small { flex-basis: 100%; }
.ai-logo.ai-logo-more { width: auto; min-width: 22px; height: 22px; padding: 0 5px; box-sizing: border-box; border-radius: 11px; display: inline-flex;
    align-items: center; justify-content: center; font: 600 11px var(--vs-font, system-ui); color: var(--text-muted); background: var(--surface-hover, rgba(128,128,128,.18)); }

.ai-or-btns { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.ai-or-btns .ai-or-btn { margin: 0; }

/* Большой файл кусками и просмотр архивов (js/ide-bigfile.js) */
/* #ide-editor уже position: absolute (inset 0) — плашка .ide-bigbar позиционируется внутри него */
.ide-bigbar { position: absolute; top: 6px; right: 22px; z-index: 5; max-width: calc(100% - 60px); padding: 4px 10px; border: 1px solid var(--vs-border);
    border-radius: 6px; background: var(--vs-menu); color: var(--vs-muted); font-size: 12px; pointer-events: none; box-shadow: var(--vs-shadow); }
.ide-zip { display: flex; flex-direction: column; height: 100%; padding: 14px 18px; box-sizing: border-box; gap: 10px; }
.ide-zip-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ide-zip-q { margin-left: auto; width: min(320px, 100%); height: 28px; padding: 0 10px; border: 1px solid var(--vs-input-border); border-radius: 4px;
    background: var(--vs-input); color: var(--vs-fg); font: inherit; }
.ide-zip-list { flex: 1; overflow: auto; border: 1px solid var(--vs-border); border-radius: 6px; }
.ide-zip-item { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 4px 12px; border: 0; background: none; color: var(--vs-fg);
    font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.ide-zip-item:hover { background: var(--vs-hover); }
.ide-zip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Полоса вкладок диалогов чуть темнее активной вкладки — иначе не видно, что вкладка «вырастает» из окна
   (у активной: скругление сверху справа, снизу справа — такой же вогнутый уголок наружу; у не первой — и слева) */
.vs { --vs-tab-strip: #121212; }
.vs.vs-light { --vs-tab-strip: #ececec; }
.vs .ai-tab.active { background: var(--vs-side); border-color: transparent; }
.vs .ai-tab.active::after, .vs .ai-tab.active:not(:first-child)::before { width: 10px; height: 10px; bottom: -1px; }
.vs .ai-tab.active::after { right: -10px; background: radial-gradient(circle at 100% 0, transparent 9.5px, var(--vs-side) 10px); }
.vs .ai-tab.active:not(:first-child)::before { left: -10px; background: radial-gradient(circle at 0 0, transparent 9.5px, var(--vs-side) 10px); }
.vs .ai-tab:not(.active):hover { border-radius: 8px 8px 0 0; }
.vs .ai-tab:first-child:not(.active):hover { border-top-left-radius: 0; }

/* Быстрая плавность интерфейса (Илья 03.12): наведение, меню и всплывающие окна — 0,12 с, не дольше */
.vs button, .vs a, .vs input, .vs textarea, .vs .vs-tab, .vs .vs-ti, .vs .ai-tab, .vs .ai-pop-item, .vs .vs-prob, .vs .vs-ext,
.vs-menu .vs-mi { transition: background-color .12s ease, color .12s ease, border-color .12s ease, opacity .12s ease, box-shadow .12s ease; }
.vs-menu { animation: vsPopDown .12s ease-out; transform-origin: top left; }
.vs #ai-pop:not([hidden]) { animation: vsPopUp .12s ease-out; }
.vs #ai-pop-top:not([hidden]) { animation: vsPopDown .12s ease-out; }
.vs .ide-tour, .vs .bs-modal { animation-duration: .12s; }
@keyframes vsPopDown { from { opacity: 0; transform: translateY(-4px) scale(.985); } }
@keyframes vsPopUp { from { opacity: 0; transform: translateY(4px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .vs-menu, .vs #ai-pop, .vs #ai-pop-top { animation: none; } }

/* Плашка лимита над полем ввода ИИ (как у Claude Code) */
.vs .ai-limit { margin: 0 8px 6px; padding: 7px 10px; display: flex; align-items: flex-start; gap: 8px; border-radius: 8px; font-size: 12.5px;
    line-height: 1.45; color: #e8c37b; background: rgba(214, 158, 46, .14); border: 1px solid rgba(214, 158, 46, .35); animation: vsPopUp .12s ease-out; }
.vs .ai-limit.is-full { color: #f0b37a; background: rgba(214, 120, 46, .16); border-color: rgba(214, 120, 46, .45); }
.vs .ai-limit[hidden] { display: none; }
.vs .ai-limit > span { flex: 1; min-width: 0; }
.vs .ai-limit-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.vs .ai-limit-x { padding: 0 4px; border: 0; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; opacity: .7; }
.vs .ai-limit-x:hover { opacity: 1; }
.vs.vs-light .ai-limit { color: #8a5a00; } .vs.vs-light .ai-limit.is-full { color: #9a4a00; }

/* Плашка «агент 1» / «агентов N» справа от выбора модели (основные ходы по диалогам + подзадачи ask_agent) */
.vs .ai-agents { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px;
    background: rgba(128, 128, 128, .16); color: var(--vs-fg); opacity: .85; font-size: 12px; white-space: nowrap; }
.vs .ai-agents i { width: 7px; height: 7px; border-radius: 50%; background: #3fb950; flex: none; }
.vs .ai-agents.is-idle { color: var(--vs-muted); }
.vs .ai-agents.is-idle i { background: #8b8b8b; }
.vs button.ai-agents { border: 0; font: inherit; cursor: pointer; }
.vs button.ai-agents:hover { opacity: 1; background: rgba(128, 128, 128, .26); }

/* Карта агентов (ide-agent-map.js) — окно сайта поверх IDE */
.bs-modal.am-modal { width: min(720px, 94vw); }
.am-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; margin: 6px 0 4px; }
.am-group { display: flex; flex-direction: column; gap: 2px; }
.am-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 9px; cursor: pointer; text-align: left;
    border: 1px solid rgba(128, 128, 128, .22); background: rgba(128, 128, 128, .07); color: inherit; font: inherit; }
.am-row:hover { border-color: rgba(var(--accent-rgb, 59, 130, 246), .6); background: rgba(var(--accent-rgb, 59, 130, 246), .1); }
.am-row.am-sub { margin-left: 22px; width: calc(100% - 22px); padding: 7px 10px; background: transparent; }
.am-tree { opacity: .45; font-family: monospace; }
.am-logo { display: inline-flex; width: 20px; height: 20px; flex: none; }
.am-logo svg, .am-logo img { width: 20px; height: 20px; }
.am-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.am-main b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-main small, .am-meta small { font-size: 11.5px; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; max-width: 45%; }
.am-st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.am-st i { width: 7px; height: 7px; border-radius: 50%; background: #8b8b8b; }
.am-st-running i { background: #3fb950; box-shadow: 0 0 0 3px rgba(63, 185, 80, .18); }
.am-st-error i { background: #f85149; } .am-st-stopped i { background: #d29922; }
.am-h { margin: 14px 0 6px; font-size: 13px; font-weight: 600; opacity: .8; }
.am-pre { white-space: pre-wrap; word-break: break-word; max-height: 30vh; overflow: auto; margin: 0; padding: 9px 11px; border-radius: 8px;
    background: rgba(128, 128, 128, .1); font: 12.5px/1.5 "JetBrains Mono", Consolas, monospace; }
.am-tools { margin: 0; padding-left: 20px; max-height: 26vh; overflow: auto; font-size: 12.5px; }
.am-tools li { margin: 3px 0; } .am-tools small { opacity: .65; word-break: break-word; }
.am-err { color: #f85149; font-size: 13px; }
.am-detail .bs-modal-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

/* «Регион: 🇷🇺 Россия · Изменить» — верх окна выбора модели (geo.js geoRegionRow) */
/* flex: none — список моделей это колонка flex с ограниченной высотой: без этого строка сжималась и наезжала на поиск */
.ai-pop-list > .geo-region-row, .ai-pop-list > .ai-cli-sec { flex: none; }
.geo-region-row { display: flex; align-items: center; gap: 8px; width: calc(100% - 8px); margin: 4px 4px 6px; padding: 7px 10px;
    border: 1px solid var(--vs-border, rgba(127, 127, 127, .25)); border-radius: 8px; background: transparent; color: inherit;
    font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.geo-region-row:hover { background: rgba(127, 127, 127, .1); }
.geo-region-row .geo-flag { width: 20px; height: 15px; }
.geo-region-label { opacity: .65; }
.geo-region-none { font-weight: 500; opacity: .8; }
.geo-region-row .geo-item-ai { margin-left: 4px; gap: 4px; }
.geo-region-row .geo-ai { width: 20px; height: 20px; }
.geo-region-act { margin-left: auto; color: var(--vs-link, #4daafc); font-size: 12px; white-space: nowrap; }

/* Вход в агентов компаний: 4 заметные кнопки (окно моделей, окно «Свои ключи») + карточка-подсказка в панели ИИ */
.ai-cli-sec { margin: 0 0 14px; padding: 10px; border: 1px solid rgba(var(--accent-rgb, 59, 130, 246), .35); border-radius: 10px;
    background: rgba(var(--accent-rgb, 59, 130, 246), .06); }
.ai-cli-sec.is-compact { margin: 4px 4px 8px; padding: 8px; }
.ai-cli-sec-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.ai-cli-sec-head small { opacity: .7; font-size: 12px; line-height: 1.35; }
.ai-cli-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ai-cli-btn { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left;
    border: 1px solid rgba(128, 128, 128, .3); background: rgba(128, 128, 128, .08); color: inherit; font: inherit; position: relative; }
.ai-cli-btn:hover { border-color: rgba(var(--accent-rgb, 59, 130, 246), .7); background: rgba(var(--accent-rgb, 59, 130, 246), .12); }
.ai-cli-btn > span { display: flex; flex-direction: column; min-width: 0; }
.ai-cli-btn b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.ai-cli-btn small { font-size: 11px; opacity: .65; line-height: 1.3; }
.ai-cli-btn small.ai-cli-hint-err { opacity: .9; color: #e5a03a; white-space: normal; }
.ai-cli-btn svg, .ai-cli-btn img { width: 20px; height: 20px; flex: none; }
.ai-cli-btn.is-in { border-color: rgba(63, 185, 80, .5); }
.ai-cli-ok { position: absolute; top: 6px; right: 8px; font-style: normal; color: #3fb950; font-size: 12px; }
@media (max-width: 420px) { .ai-cli-grid { grid-template-columns: 1fr; } }

.vs .ai-cli-tour { margin: 8px 0; padding: 12px; border-radius: 10px; border: 1px solid var(--vs-border); background: var(--vs-input); }
.vs .ai-cli-tour-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.vs .ai-cli-tour-head svg, .vs .ai-cli-tour-head img { width: 18px; height: 18px; }
.vs .ai-cli-x { margin-left: auto; border: 0; background: none; color: var(--vs-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.vs .ai-cli-x:hover { color: var(--vs-fg); }
.vs .ai-cli-steps { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.vs .ai-cli-steps li { color: var(--vs-muted); }
.vs .ai-cli-steps li.is-on { color: var(--vs-fg); font-weight: 600; }
.vs .ai-cli-steps li.is-done { color: var(--vs-muted); text-decoration: line-through; text-decoration-color: rgba(128, 128, 128, .5); }
.vs .ai-cli-link { display: inline-flex; margin: 0 0 8px; padding: 6px 12px; text-decoration: none; }
.vs .ai-cli-code { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.vs .ai-cli-code code { font-size: 15px; letter-spacing: 1px; padding: 2px 6px; border-radius: 4px; background: rgba(128, 128, 128, .15); }
/* Окно входа на игровом сервере — настоящий терминал xterm (полноэкранные программы входа рисуют в нём свой экран) */
.vs .ai-cli-xterm-slot { height: 420px; margin: 0 0 8px; padding: 6px; border-radius: 6px; background: #0b0b0b; overflow: hidden;
    transition: height .15s ease; }
.vs .ai-cli-xterm-slot.is-big { height: 75vh; }
.vs .ai-cli-hint .admin-link-btn { margin-right: 6px; }
.vs .ai-cli-xterm { width: 100%; height: 100%; color: #d4d4d4; font: 12px/1.4 'JetBrains Mono', Consolas, monospace; }
.vs .ai-cli-link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.vs .ai-cli-link-row .ai-cli-link { margin: 0; }
.vs .ai-cli-hint { margin: -2px 0 8px; font-size: 11.5px; line-height: 1.4; opacity: .65; }
.vs .ai-cli-restart { margin: 0 0 10px; }
.vs .ai-cli-paste { display: flex; gap: 6px; margin-bottom: 6px; }
.vs .ai-cli-paste input { flex: 1; min-width: 0; height: 30px; padding: 4px 8px; font-size: 13px; }
.vs .ai-cli-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 12px; }
.vs .ai-cli-keys .vs-btn { padding: 2px 8px; height: auto; }
.vs .ai-cli-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.vs .ai-cli-final { margin: 0; color: #3fb950; }

/* Шевроны как в VS Code (codicon chevron): тонкая линия, у раздела «свёрнут» — повёрнут */
.vs .vs-cv { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.vs .vs-row .vs-twist { display: inline-flex; align-items: center; justify-content: center; color: var(--vs-fg); opacity: .85; }
.vs .vs-chev { display: inline-flex; transition: transform .12s ease; }

/* Общий список моделей: логотип у каждой строки */
.vs .ai-pop-model { display: flex; align-items: center; gap: 10px; }
.vs .ai-pop-model .ai-pop-text { flex: 1; min-width: 0; }

/* === 04.12: «Auto», запасной поставщик, режим генерации (ide-media.js) === */
.ai-auto-logo { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 5px; font-size: 11px;
    color: #fff; background: linear-gradient(135deg, #7c5cff, #2fb7ff 55%, #2ee59d); }
.ai-pop-item.ai-auto .ai-pop-text small { white-space: normal; }
.ai-auto-seg { display: inline-flex; margin-top: 6px; }
.ai-auto-seg button { font-size: 11px; padding: 2px 8px; }
.ai-auto-note { color: var(--vs-text, var(--text-color)); }
.ai-media-wrap { display: flex; flex-direction: column; gap: 10px; }
.ai-media { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ai-media img, .ai-media video { max-width: 100%; border-radius: 8px; border: 1px solid var(--vs-border, var(--border-color)); background: #0003; }
.ai-media audio { width: 100%; }
.ai-media figcaption { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-media figcaption .vs-btn { text-decoration: none; }
.ai-media-vec code { font-size: 11px; word-break: break-all; opacity: .85; }
.ai-media-rank b { margin-bottom: 4px; }
.ai-rank-row { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: start; padding: 4px 6px; border-radius: 6px; overflow: hidden; }
.ai-rank-row span { position: absolute; inset: 0 auto 0 0; width: var(--w); background: color-mix(in srgb, var(--vs-accent, #3b82f6) 18%, transparent); }
.ai-rank-row em, .ai-rank-row p { position: relative; margin: 0; font-style: normal; font-size: 12px; }
.ai-rank-row em { font-variant-numeric: tabular-nums; opacity: .8; }
/* Сырой вывод поставщика / агента — ОДНОЙ мелкой строкой под понятным ответом, по нажатию разворачивается (Илья 04.12) */
/* снимок страницы из браузера агента (b.space Browser) */
.ai-shot { display: block; max-width: 100%; max-height: 180px; margin: 4px 0; border: 1px solid var(--vs-border); border-radius: 6px; cursor: zoom-in; }
.ai-shot-big { display: block; max-width: min(90vw, 1280px); max-height: 75vh; margin: 0 auto 12px; border-radius: 8px; }
.ai-raw { margin: 4px 0 0; font-family: var(--vs-code-font, ui-monospace, Consolas, monospace); font-size: 11px; line-height: 1.4; opacity: .62; }
.ai-raw > summary { cursor: pointer; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-raw > summary::-webkit-details-marker { display: none; }
.ai-raw > summary::before { content: '▸ '; }
.ai-raw[open] > summary::before { content: '▾ '; }
.ai-raw[open] > summary { white-space: normal; }
.ai-raw pre { margin: 4px 0 0; max-height: 240px; overflow: auto; white-space: pre-wrap; word-break: break-word; font: inherit; }
.ai-notes { margin: 2px 0 6px; }
.ai-chosen { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.ai-chosen .ai-wand { width: 14px; height: 14px; fill: none; stroke: #c9a2ff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ai-chosen .ai-logo { width: 14px; height: 14px; }
.ai-chosen b { font-weight: 600; }
.ai-chosen span:last-child { color: var(--vs-muted, var(--text-muted)); }

.ai-chosen-line { display: inline-block; width: 34px; height: 1px; background: var(--vs-border, var(--border-color)); margin-right: 2px; }
.vs-power { display: inline-flex; gap: 2px; margin-right: 6px; padding-right: 6px; border-right: 1px solid var(--vs-border, #333); }
.vs-power svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vs-power .vs-pw-start svg { fill: #89d185; stroke: #89d185; }
.vs-power .vs-pw-stop svg { stroke: #f48771; }
.vs-power .vs-ib:disabled { opacity: .45; }

/* «Ещё N моделей» под первыми четырьмя моделями компании (05.12) */
.ai-co-more { display: flex; align-items: center; gap: 8px; width: 100%; margin: 2px 0 6px; padding: 4px 10px; border: 0; background: none;
    color: var(--vs-fg-muted, #9aa0a6); font: inherit; font-size: 12px; cursor: pointer; }
.ai-co-more::before, .ai-co-more::after { content: ""; flex: 1; height: 1px; background: var(--vs-border, rgba(255,255,255,.1)); }
.ai-co-more span { order: 0; }
.ai-co-more i { font-style: normal; transition: transform .15s; }
.ai-co-more i.is-up { transform: rotate(180deg); }
.ai-co-more:hover { color: var(--vs-fg-strong, #fff); }
.ai-cache { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; font-size: 12px; color: var(--vs-fg-muted, #9aa0a6); cursor: default; }
.ai-cache .ai-ic svg { width: 13px; height: 13px; }
.ai-cli-btn.is-in { cursor: default; position: relative; }
.ai-cli-out { flex: none; align-self: flex-end; margin: 14px 0 0 auto; padding: 2px 8px; border: 1px solid var(--vs-border, rgba(255,255,255,.12)); border-radius: 6px;
    background: none; color: var(--vs-fg-muted, #9aa0a6); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.ai-cli-out:hover { color: #f87171; border-color: rgba(248,113,113,.5); }
.ai-cli-btn.is-in > span { flex: 1; }
