    /* Скрытый пиксель Яндекс.Метрики (noscript) */
    .metrika-pixel { position: absolute; left: -9999px; }

    /* Классы форм модалок (вместо inline-стилей) */
    .form-field { text-align: left; margin-bottom: 20px; }
    .form-field.mb16 { margin-bottom: 16px; }
    .form-field.no-mb { margin-bottom: 0; }
    .form-label { display: block; margin-bottom: 4px; font-weight: 500; }
    .form-input { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 10px 12px; color: #fff; font-family: inherit; font-size: 0.9rem; box-sizing: border-box; }
    .hidden { display: none; }
    .modal-note { margin-bottom: 0; opacity: 0.8; }
    .modal-p0 { margin: 0; }
    .referral-note { margin-top: 8px; }

    :root {
      --bg-dark: #0a0b17;
      --bg-sidebar: transparent;
      --varvara-cyan: #00E5FF;
      --varvara-glow: rgba(0,229,255,0.25);
      --varvara-blue: #4dabf7;
      --text-main: #fff;
      --text-muted: #8e8ea0;
      --input-bg: #161722;
      --input-border: rgba(255,255,255,0.08);
      --chip-bg: rgba(255,255,255,0.04);
      --chip-hover: rgba(255,255,255,0.08);
      --accent-red: #D42A3B;
      --sidebar-width: 240px;
      --plus-gradient: linear-gradient(135deg, #FF6B35, #FF2E63);
    }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background: var(--bg-dark);
      color: var(--text-main);
      height: 100vh;
      display: flex;
      overflow: hidden;
    }
    *:focus-visible { outline: 2px solid var(--varvara-cyan); outline-offset: 2px; }

    /* ===== САЙДБАР ===== */
    .sidebar {
      width: var(--sidebar-width);
      height: 100vh;
      background: transparent;
      backdrop-filter: none;
      display: flex;
      flex-direction: column;
      border-right: none;
      flex-shrink: 0;
      transition: transform .3s ease, width .3s ease;
      overflow-y: auto;
      overflow-x: hidden;
      z-index: 30;
      position: relative;
      transform: translateX(0);
    }
    body.sidebar-hidden .sidebar {
      transform: translateX(-100%);
      margin-right: calc(-1 * var(--sidebar-width));
    }

    .sidebar-header {
      padding: 20px 16px 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      border-bottom: none;
      min-height: 68px;
    }
    .sidebar-header .logo-icon {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      overflow: hidden;
      border: 1px solid rgba(0,229,255,0.2);
      box-shadow: 0 0 12px rgba(0,229,255,0.15);
      flex-shrink: 0;
    }
    .sidebar-header .logo-icon img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .sidebar-header .brand {
      font-family: 'Russo One', sans-serif;
      font-size: 1.2rem;
      font-weight: 400;
      color: var(--text-main);
      white-space: nowrap;
    }

    .sidebar-nav-top {
      padding: 12px 12px 8px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .sidebar-nav-bottom {
      padding: 8px 12px 4px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      margin-top: auto;
      border-top: none;
    }
    .sidebar-nav-top a,
    .sidebar-nav-top button,
    .sidebar-nav-bottom a,
    .sidebar-nav-bottom button {
      background: transparent;
      border: none;
      color: var(--text-muted);
      padding: 10px 12px;
      border-radius: 10px;
      font-size: 0.95rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
      text-decoration: none;
      display: flex;
      align-items: center;
      gap: 14px;
      width: 100%;
      white-space: nowrap;
    }
    .sidebar-nav-top a:hover,
    .sidebar-nav-top button:hover,
    .sidebar-nav-bottom a:hover,
    .sidebar-nav-bottom button:hover {
      background: rgba(255,255,255,0.06);
      color: var(--text-main);
    }
    .sidebar-nav-top .new-chat-btn {
      color: var(--varvara-cyan);
      font-weight: 600;
    }
    .sidebar-nav-top .new-chat-btn:hover {
      background: rgba(0,229,255,0.08);
      color: #fff;
    }

    /* ===== СПИСОК СОХРАНЁННЫХ ЧАТОВ (для авторизованных) ===== */
    .sidebar-chats-section {
      display: none; /* показывается только после авторизации */
      flex: 1;
      min-height: 0;
      padding: 8px 12px 4px;
      display: none;
      flex-direction: column;
    }
    .sidebar-chats-section.visible { display: flex; }
    .sidebar-chats-title {
      font-size: 0.7rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 6px 12px 8px;
    }
    .sidebar-chats {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .sidebar-chats::-webkit-scrollbar { width: 5px; }
    .sidebar-chats::-webkit-scrollbar-track { background: transparent; }
    .sidebar-chats::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
    .chat-list-item {
      display: flex;
      align-items: center;
      border-radius: 10px;
      transition: background 0.2s ease;
      position: relative;
    }
    .chat-list-item:hover { background: rgba(255,255,255,0.06); }
    .chat-list-item.active { background: rgba(0,229,255,0.1); }
    .chat-list-open {
      flex: 1;
      min-width: 0;
      background: transparent;
      border: none;
      color: var(--text-muted);
      font-family: inherit;
      font-size: 0.85rem;
      text-align: left;
      padding: 9px 30px 9px 12px;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      border-radius: 10px;
    }
    .chat-list-item:hover .chat-list-open,
    .chat-list-item.active .chat-list-open { color: var(--text-main); }
    .chat-list-del {
      position: absolute;
      right: 4px;
      background: transparent;
      border: none;
      color: var(--text-muted);
      width: 24px;
      height: 24px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.75rem;
      line-height: 1;
      display: none;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .chat-list-item:hover .chat-list-del { display: flex; }
    .chat-list-del:hover { color: var(--accent-red); background: rgba(212,42,59,0.15); }
    .chat-list-empty {
      color: var(--text-muted);
      font-size: 0.8rem;
      padding: 8px 12px;
    }
    .sidebar-nav-top a svg,
    .sidebar-nav-top button svg,
    .sidebar-nav-bottom a svg,
    .sidebar-nav-bottom button svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* ===== НОВАЯ КНОПКА "БОЛЬШЕ ВОЗМОЖНОСТЕЙ" ===== */
    .sidebar-plus-btn {
      background: var(--plus-gradient) !important;
      color: #fff !important;
      font-weight: 600 !important;
      border-radius: 12px !important;
      padding: 12px 16px !important;
      margin: 4px 0 8px 0 !important;
      box-shadow: 0 4px 20px rgba(255, 46, 99, 0.3);
      transition: all 0.3s ease !important;
      text-decoration: none !important;
      display: flex !important;
      align-items: center !important;
      gap: 12px !important;
      width: 100% !important;
      box-sizing: border-box !important;
      white-space: normal !important;
    }
    .sidebar-plus-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 30px rgba(255, 46, 99, 0.5);
      color: #fff !important;
    }
    .sidebar-plus-btn svg {
      width: 24px;
      height: 24px;
      stroke: #fff;
      fill: none;
      stroke-width: 2.5;
      flex-shrink: 0;
    }
    .sidebar-plus-text {
      display: flex;
      flex-direction: column;
      line-height: 1.2;
      font-size: 0.95rem;
      text-align: left;
    }

    .sidebar-footer {
      padding: 8px 12px 16px;
      border-top: none;
    }
    .sidebar-footer .profile-btn {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px;
      border-radius: 10px;
      cursor: pointer;
      transition: .2s;
      text-decoration: none;
      color: inherit;
    }
    .sidebar-footer .profile-btn:hover {
      background: rgba(255,255,255,0.04);
    }
    .profile-avatar {
      width: 32px;
      height: 32px;
      background: linear-gradient(135deg, var(--varvara-cyan), var(--varvara-blue));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.9rem;
      font-weight: 600;
      flex-shrink: 0;
      color: #0a0b17;
    }
    .profile-info {
      display: flex;
      flex-direction: column;
      line-height: 1.2;
      overflow: hidden;
    }
    .profile-name { font-size: 0.85rem; font-weight: 500; }
    .profile-plan { font-size: 0.7rem; color: var(--text-muted); }

    /* ===== БУРГЕР С ЛОГОТИПОМ (Десктоп) ===== */
    .burger-btn {
      position: fixed;
      top: 12px;
      left: 12px;
      z-index: 40;
      background: rgba(10, 11, 23, 0.8);
      border: 1px solid var(--input-border);
      color: var(--varvara-cyan);
      padding: 6px 10px 6px 6px;
      border-radius: 16px;
      cursor: pointer;
      transition: opacity .3s ease, transform .3s ease, box-shadow .3s;
      opacity: 0;
      transform: scale(0.8);
      pointer-events: none;
      display: flex;
      align-items: center;
      gap: 8px;
      backdrop-filter: blur(8px);
      box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    .burger-btn:hover {
      border-color: var(--varvara-cyan);
      box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
      background: rgba(10, 11, 23, 0.9);
    }
    .burger-btn .burger-logo {
      width: 28px; height: 28px;
      border-radius: 50%; object-fit: cover;
      border: 1px solid rgba(0,229,255,0.3);
      box-shadow: 0 0 8px rgba(0,229,255,0.2);
    }
    .burger-btn svg {
      width: 20px; height: 20px;
      stroke: currentColor; fill: none;
      stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
    }
    body.sidebar-hidden .burger-btn {
      opacity: 1; transform: scale(1); pointer-events: auto;
    }

    /* ===== ОСНОВНАЯ ОБЛАСТЬ ===== */
    .main-content {
      flex: 1; display: flex; flex-direction: column;
      position: relative; overflow: hidden;
    }
    .bg-glow {
      position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
      width: 1600px; height: 1200px;
      background: radial-gradient(circle, rgba(0, 229, 255, 0.45) 0%, rgba(0, 229, 255, 0.15) 30%, rgba(0,0,0,0) 70%);
      z-index: 3; pointer-events: none; mix-blend-mode: screen; opacity: 1;
      transition: opacity .3s;
    }
    body.chat-active .bg-glow { opacity: 0.6; }

    .chat-scroll-area {
      flex: 1; overflow-y: auto; display: flex; flex-direction: column;
      align-items: center; width: 100%; z-index: 2; scroll-behavior: smooth; position: relative;
    }
    .chat-scroll-area::-webkit-scrollbar { width: 6px; }
    .chat-scroll-area::-webkit-scrollbar-track { background: transparent; }
    .chat-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

    /* ===== НАЧАЛЬНЫЙ ЭКРАН ===== */
    .initial-screen {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      flex: 1; width: 100%; max-width: 1600px; padding: 30px 20px 20px;
      text-align: center; transition: .3s; min-height: 100%; position: relative; z-index: 2;
    }
    body.chat-active .initial-screen { display: none; }
    .initial-content {
      flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%;
    }
    .varvara-orb {
      width: 140px; height: 140px; border-radius: 50%;
      background: linear-gradient(135deg, #0F1A2E 0%, #1A2B4C 100%);
      box-shadow: 0 0 60px 10px rgba(0,229,255,0.3), inset -10px -10px 30px rgba(0,0,0,0.5);
      margin-bottom: 28px; position: relative; animation: orbPulse 3s infinite ease-in-out;
      display: flex; align-items: center; justify-content: center; overflow: hidden;
      border: 2px solid rgba(0,229,255,0.3);
    }
    .varvara-gif { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; z-index: 2; display: block; }
    .varvara-orb::after {
      content: ''; position: absolute; top: 20%; left: 25%; width: 40%; height: 30%;
      background: rgba(255,255,255,0.15); border-radius: 50%; filter: blur(15px); z-index: 3; pointer-events: none;
    }
    @keyframes orbPulse {
      0%, 100% { transform: scale(1); box-shadow: 0 0 60px 10px rgba(0,229,255,0.2), inset -10px -10px 30px rgba(0,0,0,0.5); }
      50% { transform: scale(1.05); box-shadow: 0 0 80px 20px rgba(0,229,255,0.4), inset -10px -10px 30px rgba(0,0,0,0.5); }
    }
    h1 { font-size: 2.5rem; font-weight: 500; margin-bottom: 8px; font-family: 'Russo One', sans-serif; text-shadow: 0 0 20px rgba(0,229,255,0.2); }
    .subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 24px; font-weight: 400; line-height: 1.5; }

    .initial-input-area { width: 100%; max-width: 800px; margin: 0 auto 20px; }
    .input-wrapper input[type="text"], .input-wrapper textarea { min-width: 0; }
    .input-wrapper {
      width: 100%; display: flex; align-items: center; background: var(--input-bg);
      border: 1px solid var(--input-border);
      border-radius: 32px;
      padding: 8px 8px 8px 24px;
      transition: .3s;
      gap: 4px;
    }
    .input-wrapper:focus-within {
      border-color: var(--varvara-cyan);
      box-shadow: 0 0 0 2px rgba(0,229,255,0.15);
    }
    .input-wrapper input[type="text"], .input-wrapper textarea {
      flex: 1; background: none; border: none; outline: none; color: var(--text-main);
      font-size: 1.1rem; padding: 10px 0;
    }
    .input-wrapper textarea {
      font-family: inherit; line-height: 1.45; min-height: 24px; max-height: 220px;
      resize: none; overflow-y: auto;
    }
    .input-wrapper input[type="text"]::placeholder { color: var(--text-muted); }
.input-wrapper textarea::placeholder { color: var(--text-muted); }
    .input-wrapper .upload-btn, .input-wrapper .mic-btn {
      background: transparent; border: none; color: var(--text-muted); padding: 8px;
      border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s; flex-shrink: 0;
    }
    .input-wrapper .upload-btn:hover, .input-wrapper .mic-btn:hover { color: var(--varvara-cyan); background: rgba(0,229,255,0.1); }
    .input-wrapper .upload-btn svg, .input-wrapper .mic-btn svg {
      width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
    }
    .input-wrapper .send-btn {
      background: var(--varvara-cyan); border: none; width: 44px; height: 44px;
      border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .2s; flex-shrink: 0;
    }
    .input-wrapper .send-btn:hover { background: var(--varvara-blue); transform: scale(1.05); }
    .input-wrapper .send-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
    .input-wrapper .send-btn img { width: 24px; height: 24px; display: block; }

    .send-btn.stop-active {
      animation: stopPulse 1.2s ease-in-out infinite;
      background: var(--varvara-cyan) !important;
      border-radius: 8px !important;
    }
    @keyframes stopPulse {
      0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.5); }
      100% { box-shadow: 0 0 0 15px rgba(0, 229, 255, 0); }
    }

    .initial-input-area .input-wrapper { padding: 12px 12px 12px 28px; }
    .initial-input-area .input-wrapper input[type="text"], .initial-input-area .input-wrapper textarea { font-size: 1.2rem; padding: 12px 0; }
    .initial-input-area .input-wrapper .upload-btn svg, .initial-input-area .input-wrapper .mic-btn svg { width: 26px; height: 26px; }
    .initial-input-area .input-wrapper .send-btn { width: 50px; height: 50px; }
    .initial-input-area .input-wrapper .send-btn img { width: 28px; height: 28px; }

    /* ===== КОМПОЗИЦИЯ СТРОКИ ЗАПРОСА ===== */
    .input-toolbar {
      display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
      margin-top: 10px; width: 100%; max-width: 800px;
    }
    .input-toolbar .intellect-inline, .input-toolbar .websearch-inline-btn { flex-shrink: 0; }
    .attach-wrap { position: relative; display: flex; flex-shrink: 0; }
    .attach-menu {
      position: absolute; bottom: calc(100% + 12px); right: 0;
      background: #1d1f2e; border: 1px solid rgba(255,255,255,0.12);
      border-radius: 14px; padding: 8px; min-width: 230px;
      box-shadow: 0 12px 32px rgba(0,0,0,0.5);
      opacity: 0; visibility: hidden; transform: translateY(6px);
      transition: opacity .2s ease, visibility .2s ease, transform .2s ease; z-index: 120;
    }
    .attach-wrap.open .attach-menu { opacity: 1; visibility: visible; transform: translateY(0); }
    .attach-item {
      display: flex; align-items: center; gap: 10px; width: 100%;
      background: none; border: none; color: var(--text-muted);
      padding: 10px 12px; border-radius: 10px; cursor: pointer;
      font-size: .9rem; font-family: inherit; text-align: left;
      min-height: 44px; transition: .15s;
    }
    .attach-item:hover, .attach-item:focus-visible { background: rgba(255,255,255,0.06); color: var(--varvara-cyan); }
    .attach-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

    /* ===== ДОСТУПНОСТЬ (WCAG 2.1) ===== */
    :focus-visible { outline: 2px solid var(--varvara-cyan); outline-offset: 2px; border-radius: 4px; }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    }

    /* ===== ПАНЕЛЬ РЕЖИМОВ ===== */
    .mode-selector {
      display: flex;
      gap: 10px;
      background: var(--input-bg);
      border: 1px solid var(--input-border);
      border-radius: 28px;
      padding: 6px;
      margin: 0 auto 14px auto;
      width: auto;
      max-width: 440px;
      flex-shrink: 0;
      justify-content: center;
    }
    .mode-selector .mode-btn {
      flex: 0 1 auto;
      padding: 10px 24px;
      border: none;
      border-radius: 22px;
      background: transparent;
      color: var(--text-muted);
      font-size: 1.05rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.25s ease;
      font-family: inherit;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .mode-selector .mode-btn svg {
      width: 22px;
      height: 22px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .mode-selector .mode-btn:hover {
      color: var(--text-main);
    }
    .mode-selector .mode-btn.active {
      background: var(--varvara-cyan);
      color: #0a0b17;
      box-shadow: 0 0 24px var(--varvara-glow);
    }
    .mode-selector .mode-btn.active svg {
      stroke: #0a0b17;
    }

    /* ===== «ИНТЕЛЛЕКТ» В СТРОКЕ ЗАПРОСА ===== */
    .intellect-inline {
      position: relative;
      flex-shrink: 0;
      display: flex;
    }
    .intellect-inline-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 20px;
      padding: 7px 10px;
      cursor: pointer;
      color: var(--text-muted);
      font-size: 0.92rem;
      font-weight: 500;
      font-family: inherit;
      transition: all 0.2s;
      white-space: nowrap;
    }
    .intellect-inline-btn:hover {
      color: var(--text-main);
      background: rgba(255,255,255,0.06);
    }
    .intellect-inline-btn svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .intellect-inline-btn .chev { width: 13px; height: 13px; opacity: 0.7; }
    .intellect-inline-btn .intellect-inline-label {
      min-width: 82px;
      text-align: left;
    }
    .intellect-inline-btn.expert { color: #b9a5ff; }
    .intellect-inline-btn.expert svg { stroke: #b9a5ff; }
    /* ===== КНОПКА «ПОИСК» В СТРОКЕ ЗАПРОСА ===== */
    .websearch-inline-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 20px;
      padding: 7px 10px;
      cursor: pointer;
      color: var(--text-muted);
      font-size: 0.92rem;
      font-weight: 500;
      font-family: inherit;
      transition: all 0.2s;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .websearch-inline-btn:hover {
      color: var(--text-main);
      background: rgba(255,255,255,0.06);
    }
    .websearch-inline-btn svg {
      width: 17px;
      height: 17px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .websearch-inline-btn.active {
      color: var(--varvara-cyan);
      background: rgba(0,229,255,0.08);
      border-color: rgba(0,229,255,0.25);
    }
    @media (max-width: 640px) {
      .websearch-inline-btn .websearch-inline-label { display: none; }
      .websearch-inline-btn { padding: 7px 8px; }
    }

    /* Плашка «Ищу в интернете» */
    .search-block {
      border-left: 3px solid var(--varvara-cyan);
      background: rgba(0,229,255,0.05);
      border-radius: 0 10px 10px 0;
      padding: 8px 12px;
      margin: 0 0 10px 0;
    }
    .search-block .search-head {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--varvara-cyan);
      min-width: 0;
    }
    .search-block .search-query {
      font-weight: 500;
      color: var(--text-muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .search-block.search-done .search-head { color: var(--text-muted); }
    .intellect-dropdown {
      position: absolute;
      bottom: calc(100% + 12px);
      left: 0;
      z-index: 60;
      width: 300px;
      background: #161722;
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 16px;
      padding: 8px;
      box-shadow: 0 16px 40px rgba(0,0,0,0.55);
      display: none;
      animation: fadeIn 0.18s ease;
    }
    .intellect-dropdown.open { display: block; }
    .intellect-dropdown-head {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--text-muted);
      padding: 8px 10px 6px;
    }
    .intellect-option {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      background: transparent;
      border: none;
      border-radius: 10px;
      padding: 10px;
      cursor: pointer;
      text-align: left;
      color: var(--text-main);
      font-family: inherit;
      transition: background 0.15s;
    }
    .intellect-option:hover { background: rgba(255,255,255,0.06); }
    .intellect-option .opt-ico {
      width: 18px;
      height: 18px;
      stroke: var(--text-muted);
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .intellect-option .opt-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
    .intellect-option .opt-text strong { font-size: 0.92rem; font-weight: 600; color: var(--text-main); }
    .intellect-option .opt-text small { font-size: 0.78rem; color: var(--text-muted); line-height: 1.35; }
    .intellect-option .opt-check {
      width: 16px;
      height: 16px;
      stroke: var(--varvara-cyan);
      fill: none;
      stroke-width: 2.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
      visibility: hidden;
    }
    .intellect-option.active .opt-check { visibility: visible; }
    .intellect-option.active .opt-ico { stroke: var(--varvara-cyan); }
    .intellect-option.active .opt-text strong { color: var(--varvara-cyan); }
    .intellect-dropdown-info {
      width: 100%;
      background: transparent;
      border: none;
      border-top: 1px solid rgba(255,255,255,0.07);
      margin-top: 6px;
      padding: 10px;
      color: var(--varvara-blue);
      font-size: 0.82rem;
      cursor: pointer;
      text-align: left;
      font-family: inherit;
      border-radius: 0 0 10px 10px;
    }
    .intellect-dropdown-info:hover { color: var(--varvara-cyan); }
    @media (max-width: 640px) {
      .intellect-inline-btn .intellect-inline-label,
      .intellect-inline-btn .chev { display: none; }
      .intellect-inline-btn { padding: 7px 8px; }
      .intellect-dropdown { width: min(320px, calc(100vw - 48px)); }
    }
    /* Модалка «Интеллект» */
    .intellect-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.6); z-index: 2100; justify-content: center; align-items: center;
      backdrop-filter: blur(6px); animation: fadeIn 0.3s ease;
    }
    .intellect-modal-overlay.active { display: flex; }
    .intellect-modal-window {
      background: var(--bg-dark); border: 1px solid var(--input-border); border-radius: 20px;
      width: 100%; max-width: 460px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      position: relative; animation: slideUp 0.4s ease; max-height: 85vh; overflow-y: auto;
    }
    .intellect-modal-window h3 {
      font-family: 'Russo One', sans-serif; font-size: 1.15rem; margin: 0 0 14px 0;
      color: var(--text-main); font-weight: 400; padding-right: 36px;
    }
    .intellect-modal-window p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; margin: 0 0 12px 0; }
    .intellect-modal-window .intellect-modes {
      margin: 18px 0; display: flex; flex-direction: column; gap: 10px;
    }
    .intellect-modal-window .intellect-mode-item {
      background: rgba(255,255,255,0.04); border: 1px solid var(--input-border);
      border-radius: 12px; padding: 14px;
    }
    .intellect-modal-window .intellect-mode-item strong { color: var(--text-main); display: block; margin-bottom: 4px; font-size: 0.95rem; }
    .intellect-modal-window .intellect-mode-item span { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }

    /* ===== МОДАЛКА «ДОБАВИТЬ В ЗНАНИЯ ВАРВАРЫ» ===== */
    .knowledge-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: center;
      backdrop-filter: blur(6px); animation: fadeIn 0.3s ease;
    }
    .knowledge-modal-overlay.active { display: flex; }
    .knowledge-modal-window {
      background: var(--bg-dark); border: 1px solid var(--input-border); border-radius: 20px;
      width: 100%; max-width: 480px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      position: relative; animation: slideUp 0.4s ease; max-height: 90vh; overflow-y: auto;
    }
    .knowledge-modal-close {
      position: absolute; top: 16px; right: 16px; background: transparent; border: none;
      color: var(--text-muted); cursor: pointer; transition: color 0.2s; display: flex; padding: 4px;
    }
    .knowledge-modal-close:hover { color: var(--text-main); }
    .knowledge-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .knowledge-modal-window h3 {
      font-family: 'Russo One', sans-serif; font-size: 1.1rem; margin: 0 0 18px 0;
      color: var(--text-main); font-weight: 400; padding-right: 36px;
    }
    .knowledge-modal-window label {
      display: block; margin-bottom: 4px; font-weight: 500; color: var(--text-main); font-size: 0.9rem;
    }
    .knowledge-modal-window input,
    .knowledge-modal-window textarea {
      width: 100%; background: var(--input-bg); border: 1px solid var(--input-border);
      border-radius: 10px; padding: 11px 14px; color: var(--text-main); font-size: 0.95rem;
      margin-bottom: 14px; transition: border-color 0.2s; box-sizing: border-box;
      font-family: inherit; resize: vertical;
    }
    .knowledge-modal-window input:focus,
    .knowledge-modal-window textarea:focus { outline: none; border-color: var(--varvara-cyan); }
    .knowledge-modal-window textarea { min-height: 110px; }
    .knowledge-modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }
    .knowledge-modal-buttons button {
      padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer;
      font-size: 0.9rem; font-weight: 500; transition: all 0.2s; font-family: inherit;
    }
    .knowledge-modal-buttons .btn-confirm {
      background: var(--varvara-cyan); color: #0a0b17;
    }
    .knowledge-modal-buttons .btn-confirm:hover { box-shadow: 0 0 20px var(--varvara-glow); }
    .knowledge-modal-buttons .btn-cancel {
      background: rgba(255,255,255,0.06); color: var(--text-muted);
    }
    .knowledge-modal-buttons .btn-cancel:hover { color: var(--text-main); }
    .knowledge-context {
      background: rgba(255,255,255,0.04); border: 1px solid var(--input-border);
      border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
      font-size: 0.85rem; color: var(--text-muted); max-height: 130px; overflow-y: auto;
    }
    .knowledge-context strong { color: var(--text-main); }
    .knowledge-context .answer-preview {
      display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
      overflow: hidden; margin-top: 6px; line-height: 1.45;
    }

    /* ===== ЧИПЫ ===== */
    .chips {
      display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 16px; position: relative; z-index: 2;
    }
    .chip {
      background: rgba(255,255,255,0.03); border: none; color: var(--text-muted);
      padding: 10px 18px; border-radius: 20px; cursor: pointer; font-size: 1.1rem;
      transition: .2s; display: flex; align-items: center; gap: 10px;
    }
    .chip:hover { background: var(--chip-hover); color: var(--text-main); }
    .chip svg {
      width: 20px; height: 20px; stroke: var(--varvara-cyan); fill: none;
      stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    }
    .chip .zov-icon {
      display: inline-flex;
      align-items: center;
      gap: 1px;
      font-weight: 700;
      font-size: 1.3rem;
      letter-spacing: 1px;
      line-height: 1;
    }
    .chip .zov-icon .z { color: #ffffff; }
    .chip .zov-icon .o { color: #0039a6; }
    .chip .zov-icon .v { color: #d52b1e; }

    /* ===== ДИСКЛЕЙМЕРЫ ===== */
    .bottom-disclaimer, .chat-disclaimer {
      font-size: .75rem; color: var(--text-muted); text-align: center; margin-top: 10px; opacity: .8; position: relative; z-index: 2;
    }
    .bottom-disclaimer a, .chat-disclaimer a { color: var(--varvara-blue); text-decoration: none; transition: .2s; }
    .bottom-disclaimer a:hover, .chat-disclaimer a:hover { text-decoration: underline; }
    .bottom-disclaimer { padding: 12px 0 12px; width: 100%; margin-top: auto; }

    /* ===== ЧАТ ===== */
    .chat-messages-container {
      width: 100%; max-width: 800px; padding: 40px 20px 20px; display: none;
      flex-direction: column;
      gap: 14px;
      flex: 1; position: relative; z-index: 2;
    }
    body.chat-active .chat-messages-container { display: flex; }

    .message {
      max-width: 80%;
      padding: 12px 16px;
      border-radius: 16px;
      font-size: .95rem;
      line-height: 1.5;
      position: relative;
      z-index: 2;
    }
    .message.user {
      align-self: flex-end;
      background: var(--input-bg);
      border: 1px solid var(--input-border);
      border-bottom-right-radius: 4px;
      color: var(--text-main);
      font-weight: 400;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .message.user:hover {
      border-color: var(--varvara-cyan);
      box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
    }
    .message.user.file-message {
      background: transparent;
      border: none;
      padding: 8px 0;
      align-self: flex-end;
      color: var(--text-main);
      font-weight: 400;
    }
    .message.user.file-message:hover {
      border: none;
      box-shadow: none;
    }

    .message.bot {
      align-self: flex-start;
      background: transparent;
      padding: 0;
      color: var(--text-main);
      display: flex;
      align-items: flex-start;
      gap: 10px;
      max-width: 80%;
    }
    .message.bot img.bot-avatar {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
      margin-top: 2px;
    }
    .bot-content-wrapper {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-width: 100%;
    }
    .bot-text {
      background: transparent !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      padding: 0 !important;
      border: none !important;
      box-shadow: none !important;
      line-height: 1.6 !important;
      font-size: 1.05rem !important;
      word-wrap: break-word;
    }
    .bot-text .icon-line {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 10px;
    }
    .bot-text .icon-line:last-child { margin-bottom: 0; }
    /* Благодарность за лайк/дизлайк — под конкретным сообщением */
    .reaction-note {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 8px 0 4px 0;
      padding: 8px 14px;
      color: var(--text-muted);
      font-size: 0.9rem;
      font-style: italic;
    }
    .reaction-note .reaction-icon svg {
      width: 18px; height: 18px;
      stroke: var(--varvara-cyan);
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex-shrink: 0;
    }
    .bot-text .icon-line svg {
      width: 20px; height: 20px;
      flex-shrink: 0;
      margin-top: 2px;
      stroke: var(--varvara-cyan);
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .bot-text img {
      max-width: 100%;
      max-height: 300px;
      border-radius: 12px;
      margin-top: 12px;
      object-fit: contain;
      display: block;
      margin-left: auto;
      margin-right: auto;
    }
    .bot-text h3 {
      margin: 0 0 8px 0;
      font-weight: 600;
      font-size: 1.1rem;
      color: var(--varvara-cyan);
    }
    .bot-text p { margin: 0 0 10px 0; }
    .bot-text a {
      color: #C0222F;
      text-decoration: none;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .bot-text a:hover { text-decoration: underline; }

    /* ===== MARKDOWN-СТИЛИ ===== */
    .bot-text h1, .bot-text h2 {
      margin: 14px 0 8px 0;
      font-weight: 600;
      font-size: 1.2rem;
      color: var(--varvara-cyan);
    }
    .bot-text h4, .bot-text h5, .bot-text h6 {
      margin: 12px 0 6px 0;
      font-weight: 600;
      font-size: 1rem;
      color: var(--text-primary);
    }
    .bot-text ul, .bot-text ol {
      margin: 6px 0 10px 0;
      padding-left: 22px;
    }
    .bot-text li { margin-bottom: 4px; }
    .bot-text li.md-check { list-style: none; margin-left: -18px; }
    .bot-text blockquote {
      border-left: 3px solid var(--varvara-cyan);
      background: rgba(0,229,255,0.05);
      padding: 10px 16px;
      margin: 10px 0;
      border-radius: 0 10px 10px 0;
      font-style: italic;
      color: var(--text-muted);
    }
    .bot-text pre {
      background: #12131e;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 14px 16px;
      overflow-x: auto;
      margin: 10px 0;
      font-size: 0.9rem;
    }
    .bot-text pre code {
      background: transparent;
      padding: 0;
      font-family: 'Consolas', 'Monaco', monospace;
      color: #e2e2f0;
      white-space: pre;
      display: block;
      line-height: 1.5;
    }
    .bot-text code {
      background: rgba(0,229,255,0.08);
      padding: 2px 6px;
      border-radius: 5px;
      font-family: 'Consolas', 'Monaco', monospace;
      font-size: 0.9em;
      color: #7ee7f7;
    }
    .bot-text del { opacity: 0.6; }
    .bot-text hr {
      border: none;
      border-top: 1px solid rgba(255,255,255,0.1);
      margin: 14px 0;
    }
    .bot-text .md-table-wrap { overflow-x: auto; margin: 10px 0; border-radius: 10px; border: 1px solid rgba(255,255,255,0.08); }
    .bot-text table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: #12131e; }
    .bot-text table th {
      background: rgba(0,229,255,0.07);
      color: var(--text-primary);
      font-weight: 600;
      text-align: left;
      padding: 10px 14px;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .bot-text table td { padding: 10px 14px; color: var(--text-muted); border-bottom: 1px solid rgba(255,255,255,0.06); }
    .bot-text table tr:last-child td { border-bottom: none; }
    .bot-text .md-img { max-width: 100%; max-height: 320px; border-radius: 12px; margin: 10px 0; }
    .bot-text .mermaid-box {
      background: #12131e;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 16px;
      margin: 10px 0;
      overflow-x: auto;
      text-align: center;
    }
    .bot-text .mermaid-box svg { max-width: 100%; height: auto; }
    /* ===== ВАРВАРА CHARTS: живые графики Chart.js из ```chart ===== */
    .bot-text .chart-box {
      background: #12131e;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px;
      padding: 16px;
      margin: 10px 0;
      overflow: hidden;
    }
    .bot-text .chart-box canvas { max-width: 100%; }
    /* ===== ПЛАВНАЯ ПЕЧАТЬ ОТВЕТА ===== */
    .tw-w { opacity: 0; }
    .tw-w.on { opacity: 1; transition: opacity .16s ease; }
    .tw-block { opacity: 0; }
    .tw-block.on { opacity: 1; transition: opacity .22s ease; }
    /* Подсветка highlight.js — базовые цвета, если тема не загрузилась */
    .bot-text pre code.hljs { padding: 0; background: transparent; }

    /* ===== БЛОК «ВАРВАРА ДУМАЕТ» ===== */
    .thinking-block {
      border-left: 3px solid var(--varvara-violet, #8167ff);
      background: rgba(129,103,255,0.06);
      border-radius: 0 10px 10px 0;
      padding: 8px 12px;
      margin: 0 0 10px 0;
      cursor: pointer;
      user-select: none;
      transition: background 0.2s;
    }
    .thinking-block:hover { background: rgba(129,103,255,0.1); }
    .thinking-head {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--varvara-violet, #a78bff);
    }
    .thinking-head .think-dots .dot {
      animation: thinkPulse 1.2s infinite ease-in-out;
    }
    .thinking-head .think-dots .dot:nth-child(2) { animation-delay: 0.2s; }
    .thinking-head .think-dots .dot:nth-child(3) { animation-delay: 0.4s; }
    @keyframes thinkPulse {
      0%, 60%, 100% { opacity: 0.3; }
      30% { opacity: 1; }
    }
    .thinking-chevron {
      margin-left: auto;
      transition: transform 0.2s ease;
      flex-shrink: 0;
    }
    .thinking-block.open .thinking-chevron { transform: rotate(180deg); }
    .thinking-body {
      display: none;
      margin-top: 8px;
      max-height: 180px;
      overflow-y: auto;
      font-size: 0.88rem;
      font-style: italic;
      line-height: 1.55;
      color: var(--text-muted);
      white-space: pre-wrap;
      word-wrap: break-word;
      cursor: text;
      user-select: text;
    }
    .thinking-block.open .thinking-body { display: block; }
    .thinking-block.thinking-live .thinking-body { display: block; }
    .thinking-block.thinking-live { cursor: pointer; }
    .thinking-block.thinking-done { cursor: pointer; }
    .thinking-block.thinking-done .thinking-head { color: var(--text-muted); }

    .app-preview-window {
      width: 600px; height: 400px; max-width: 100%; margin-top: 16px; border-radius: 12px;
      overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
      display: flex; flex-direction: column; background: #0a0b17;
    }
    .app-preview-header {
      height: 32px; background: #161722; display: flex; align-items: center; padding: 0 12px; gap: 6px;
      border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
    }
    .traffic-light { width: 10px; height: 10px; border-radius: 50%; }
    .app-preview-header span { font-size: 12px; color: var(--text-muted); margin-left: 8px; font-family: 'Inter', sans-serif; }
    .preview-open-btn { margin-left: auto; color: var(--text-muted); display: flex; align-items: center; text-decoration: none; transition: color 0.2s; }
    .preview-open-btn:hover { color: var(--text-main); }
    .app-preview-body { flex: 1; overflow: hidden; position: relative; cursor: pointer; display: block; text-decoration: none; }
    .app-preview-body img { width: 100%; height: 100%; object-fit: cover; display: block; }

    .message-actions {
      display: flex;
      gap: 6px;
      margin-top: 6px;
      margin-left: 4px;
      flex-wrap: wrap;
    }
    .action-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      padding: 6px;
      min-width: 32px;
      min-height: 32px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: .2s;
    }
    .action-btn:hover {
      color: var(--text-main);
      background: rgba(255,255,255,0.05);
    }
    .action-btn svg {
      width: 20px; height: 20px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      pointer-events: none;
    }
    .action-btn.active { color: var(--varvara-cyan); }
    .action-btn.active.dislike-active { color: var(--accent-red); }

    .action-menu {
      display: flex;
      gap: 8px;
      margin-top: 8px;
      flex-wrap: wrap;
    }
    .action-menu-btn {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px;
      padding: 6px 14px;
      color: #fff;
      cursor: pointer;
      transition: 0.2s;
      font-size: 0.85rem;
      font-family: inherit;
    }
    .action-menu-btn:hover {
      background: rgba(255,255,255,0.1);
    }
    .action-menu-btn:active {
      transform: scale(0.95);
    }

    /* ===== Плашка кнопок под нарисованной картинкой ===== */
    .v-img-box { position: relative; display: block; max-width: 100%; }
    .v-img-actions {
      display: flex !important; gap: 8px; margin: 6px 0 4px; flex-wrap: wrap;
      align-items: center;
    }
    .v-img-btn {
      display: inline-flex !important; align-items: center; gap: 7px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 8px; padding: 6px 14px;
      color: #fff; cursor: pointer; transition: 0.2s;
      font-size: 0.85rem; font-family: inherit;
      width: auto; height: auto; flex: 0 0 auto;
    }
    .v-img-btn svg {
      width: 15px !important; height: 15px !important;
      stroke: currentColor; fill: none; flex-shrink: 0;
      display: inline-block;
    }
    .v-img-btn:hover { background: rgba(0,229,255,0.12); border-color: rgba(0,229,255,0.4); }
    .v-img-btn:active { transform: scale(0.95); }
    /* Обёртка блока кода/графика с плашкой */
    .v-block-wrap { display: block; max-width: 100%; margin: 10px 0; }



    .typing-dots .dot { display: inline-block; width: 6px; height: 6px; background: #8e8ea0; border-radius: 50%; margin: 0 1px; animation: dotPulse 1.2s infinite ease-in-out; }
    .typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
    .typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }
    @keyframes dotPulse {
      0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
      30% { transform: translateY(-4px); opacity: 1; }
    }

    .chat-input-area {
      display: none; flex-shrink: 0; width: 100%; max-width: 800px; margin: 0 auto;
      padding: 10px 20px 20px; background: linear-gradient(to top, var(--bg-dark) 70%, transparent);
      z-index: 5; flex-direction: column; align-items: center; justify-content: center; position: relative;
    }
    body.chat-active .chat-input-area { display: flex; }
    .chat-input-area .input-wrapper { max-width: 800px; background: rgba(22, 23, 34, 0.9); }

    /* ===== КНОПКА «К ПОСЛЕДНЕМУ СООБЩЕНИЮ» ===== */
    .scroll-bottom-btn {
      position: fixed;
      bottom: 130px;
      right: 28px;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: #161722;
      border: 1px solid rgba(0,229,255,0.35);
      color: var(--varvara-cyan);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 18px rgba(0,229,255,0.18);
      opacity: 0;
      visibility: hidden;
      transform: translateY(10px);
      transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, border-color 0.2s, box-shadow 0.2s;
      z-index: 90;
      padding: 0;
    }
    .scroll-bottom-btn.visible {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }
    .scroll-bottom-btn:hover {
      border-color: var(--varvara-cyan);
      box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 26px rgba(0,229,255,0.3);
    }
    .scroll-bottom-btn svg {
      width: 22px;
      height: 22px;
      stroke: currentColor;
      fill: none;
      stroke-width: 2.2;
      stroke-linecap: round;
      stroke-linejoin: round;
      pointer-events: none;
    }
    @media (max-width: 768px) {
      .scroll-bottom-btn { bottom: 110px; right: 16px; width: 44px; height: 44px; }
    }

    /* ===== МОДАЛКИ ===== */
    .about-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: center;
      backdrop-filter: blur(6px); animation: fadeIn 0.3s ease;
    }
    .about-modal-overlay.active { display: flex; }
    .about-modal-window {
      background: var(--bg-dark); border: 1px solid var(--input-border); border-radius: 20px;
      width: 100%; max-width: 400px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      position: relative; text-align: center; animation: slideUp 0.4s ease; max-height: 85vh; overflow-y: auto;
    }
    .about-modal-close { position: absolute; top: 16px; right: 16px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.2s; display: flex; padding: 4px; }
    .about-modal-close:hover { color: var(--text-main); }
    .about-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .about-modal-icon { width: 80px; height: 80px; margin-bottom: 16px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px rgba(255,255,255,0.05); }
    .about-modal-window h2 { font-family: 'Russo One', sans-serif; font-size: 1.3rem; margin-bottom: 24px; color: var(--text-main); font-weight: 400; }
    .about-modal-window p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
    .about-modal-link {
      display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; padding: 14px;
      background: rgba(255,255,255,0.05); border: 1px solid var(--input-border); border-radius: 12px;
      color: var(--text-main); text-decoration: none; font-size: 0.95rem; margin-bottom: 12px; transition: all 0.2s; text-align: left;
    }
    .about-modal-link:last-child { margin-bottom: 0; }
    .about-modal-link:hover { background: var(--varvara-glow); border-color: var(--varvara-cyan); color: var(--varvara-cyan); }
    .about-modal-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

    .clear-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.6); z-index: 2100; justify-content: center; align-items: center;
      backdrop-filter: blur(6px); animation: fadeIn 0.3s ease;
    }
    .clear-modal-overlay.active { display: flex; }
    .clear-modal-window {
      background: var(--bg-dark); border: 1px solid var(--input-border); border-radius: 20px;
      width: 100%; max-width: 400px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      position: relative; text-align: center; animation: slideUp 0.4s ease;
    }
    .clear-modal-close {
      position: absolute; top: 16px; right: 16px;
      background: transparent; border: none; color: var(--text-muted);
      cursor: pointer; transition: color 0.2s; display: flex; padding: 4px;
    }
    .clear-modal-close:hover { color: var(--text-main); }
    .clear-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .clear-modal-window h3 {
      font-family: 'Russo One', sans-serif;
      font-size: 1.3rem;
      margin-bottom: 12px;
      color: var(--text-main);
      font-weight: 400;
    }
    .clear-modal-window p {
      color: var(--text-muted);
      margin-bottom: 24px;
      font-size: 0.95rem;
      line-height: 1.5;
    }
    .clear-modal-buttons {
      display: flex;
      gap: 12px;
      justify-content: center;
    }
    .clear-modal-buttons button {
      padding: 10px 24px;
      border-radius: 12px;
      border: none;
      font-family: inherit;
      font-size: 1rem;
      font-weight: 500;
      cursor: pointer;
      transition: 0.2s;
    }
    .clear-modal-buttons .btn-confirm {
      background: var(--varvara-cyan);
      color: #0a0b17;
    }
    .clear-modal-buttons .btn-confirm:hover {
      background: var(--varvara-blue);
      transform: scale(1.03);
    }
    .clear-modal-buttons .btn-cancel {
      background: rgba(255,255,255,0.08);
      color: var(--text-muted);
    }
    .clear-modal-buttons .btn-cancel:hover {
      background: rgba(255,255,255,0.15);
      color: var(--text-main);
    }

    /* ===== КНОПКА ДЛЯ МОБИЛЬНЫХ (С ЛОГОТИПОМ) ===== */
    .mobile-menu-btn {
      display: none;
      position: fixed; top: 12px; left: 12px; z-index: 40;
      background: rgba(10, 11, 23, 0.8);
      border: 1px solid var(--input-border);
      color: var(--varvara-cyan);
      padding: 6px 10px 6px 6px;
      border-radius: 16px;
      cursor: pointer;
      align-items: center;
      gap: 8px;
      backdrop-filter: blur(8px);
      box-shadow: 0 4px 15px rgba(0,0,0,0.3);
      transition: all 0.3s ease;
    }
    .mobile-menu-btn:hover { border-color: var(--varvara-cyan); box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); background: rgba(10, 11, 23, 0.9); }
    .mobile-menu-btn .mobile-menu-logo {
      width: 28px; height: 28px;
      border-radius: 50%; object-fit: cover;
      border: 1px solid rgba(0,229,255,0.3);
      box-shadow: 0 0 8px rgba(0,229,255,0.2);
    }
    .mobile-menu-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

    .sidebar-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 25; }

    .toast-notification {
      position: fixed;
      bottom: 30px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      background: var(--input-bg);
      border: 1px solid var(--varvara-cyan);
      border-radius: 16px;
      padding: 14px 28px;
      color: var(--text-main);
      font-size: 1rem;
      font-weight: 500;
      box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
      backdrop-filter: blur(10px);
      z-index: 9999;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease, transform 0.4s ease;
      white-space: nowrap;
    }
    .toast-notification.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .complaint-modal-overlay {
      display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.6); z-index: 2200; justify-content: center; align-items: center;
      backdrop-filter: blur(6px); animation: fadeIn 0.3s ease;
    }
    .complaint-modal-overlay.active { display: flex; }
    .complaint-modal-window {
      background: var(--bg-dark); border: 1px solid var(--input-border); border-radius: 20px;
      width: 100%; max-width: 480px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
      position: relative; text-align: center; animation: slideUp 0.4s ease;
      max-height: 90vh; overflow-y: auto;
    }
    .complaint-modal-close {
      position: absolute; top: 16px; right: 16px;
      background: transparent; border: none; color: var(--text-muted);
      cursor: pointer; transition: color 0.2s; display: flex; padding: 4px;
    }
    .complaint-modal-close:hover { color: var(--text-main); }
    .complaint-modal-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .complaint-modal-window h3 {
      font-family: 'Russo One', sans-serif;
      font-size: 1.3rem;
      margin-bottom: 16px;
      color: var(--text-main);
      font-weight: 400;
    }
    .complaint-modal-window label {
      color: var(--text-muted);
      font-size: 0.9rem;
    }
    .complaint-modal-window select,
    .complaint-modal-window textarea {
      width: 100%;
      padding: 10px 12px;
      border-radius: 8px;
      background: var(--input-bg);
      color: var(--text-main);
      border: 1px solid var(--input-border);
      font-size: 1rem;
      font-family: inherit;
      transition: border-color 0.2s;
      margin-top: 4px;
    }
    .complaint-modal-window select:focus,
    .complaint-modal-window textarea:focus {
      border-color: var(--varvara-cyan);
      outline: none;
    }
    .complaint-modal-window textarea {
      resize: vertical;
      min-height: 80px;
    }
    .complaint-modal-buttons {
      display: flex;
      gap: 12px;
      justify-content: center;
      margin-top: 8px;
    }
    .complaint-modal-buttons button {
      padding: 10px 24px;
      border-radius: 12px;
      border: none;
      font-family: inherit;
      font-size: 1rem;
      font-weight: 500;
      cursor: pointer;
      transition: 0.2s;
    }
    .complaint-modal-buttons .btn-confirm {
      background: var(--varvara-cyan);
      color: #0a0b17;
    }
    .complaint-modal-buttons .btn-confirm:hover {
      background: var(--varvara-blue);
      transform: scale(1.03);
    }
    .complaint-modal-buttons .btn-cancel {
      background: rgba(255,255,255,0.08);
      color: var(--text-muted);
    }
    .complaint-modal-buttons .btn-cancel:hover {
      background: rgba(255,255,255,0.15);
      color: var(--text-main);
    }
    .complaint-context {
      text-align: left;
      margin-bottom: 16px;
      font-size: 0.9rem;
      color: var(--text-muted);
      background: rgba(255,255,255,0.03);
      padding: 12px;
      border-radius: 8px;
      max-height: 120px;
      overflow-y: auto;
    }
    .complaint-context strong {
      color: var(--text-main);
    }
    .complaint-context .answer-preview {
      display: block;
      margin-top: 4px;
      padding: 6px 10px;
      background: rgba(255,255,255,0.05);
      border-radius: 6px;
      max-height: 60px;
      overflow-y: auto;
      font-size: 0.85rem;
    }

    @media (max-width: 768px) {
      .burger-btn { display: none !important; }
      .mobile-menu-btn { display: flex; }
      .sidebar {
        position: fixed; top: 0; left: 0; transform: translateX(-100%); transition: transform .3s ease;
        width: 280px; z-index: 35; margin-left: 0 !important; border-right: 1px solid rgba(255,255,255,0.06);
        box-shadow: 4px 0 30px rgba(0,0,0,0.6); background: rgba(10, 11, 23, 0.9); backdrop-filter: blur(10px);
      }
      body.mobile-open .sidebar { transform: translateX(0); }
      body.mobile-open .sidebar-overlay { display: block; }
      body.sidebar-hidden .sidebar { transform: translateX(-100%); }
      .varvara-orb { width: 100px; height: 100px; margin-bottom: 20px; }
      h1 { font-size: 2rem; }
      .subtitle { font-size: 1rem; margin-bottom: 20px; }
      .initial-input-area { max-width: 100%; padding: 0 10px; }
      .initial-input-area .input-wrapper { padding: 8px 8px 8px 16px; }
      .initial-input-area .input-wrapper input[type="text"], .initial-input-area .input-wrapper textarea { font-size: 1rem; padding: 8px 0; }
      .initial-input-area .input-wrapper .send-btn { width: 44px; height: 44px; }
      .initial-input-area .input-wrapper .send-btn img { width: 22px; height: 22px; }
      .initial-input-area .input-wrapper .upload-btn svg, .initial-input-area .input-wrapper .mic-btn svg { width: 22px; height: 22px; }
      .message { max-width: 90%; font-size: .95rem; }
      .message.bot { max-width: 90%; }
      .chat-messages-container { padding: 20px 12px 12px; gap: 12px; }
      .chat-input-area { padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
      .chat-input-area .input-wrapper { padding: 4px 4px 4px 12px; border-radius: 28px; }
      .chat-input-area .input-wrapper input[type="text"], .chat-input-area .input-wrapper textarea { font-size: 1rem; padding: 8px 0; }
      .chat-input-area .input-wrapper .send-btn { width: 40px; height: 40px; }
      .chat-input-area .input-wrapper .send-btn img { width: 20px; height: 20px; }
      .chat-input-area .input-wrapper .upload-btn svg, .chat-input-area .input-wrapper .mic-btn svg { width: 20px; height: 20px; }
      .chip { padding: 8px 14px; font-size: 1rem; }
      .bottom-disclaimer { font-size: .7rem; padding: 10px 0; }
      .app-preview-window { width: 100%; height: 300px; }
      .about-modal-window { margin: 0 16px; padding: 24px; }
      .clear-modal-window { margin: 0 16px; padding: 24px; }
      .complaint-modal-window { margin: 0 16px; padding: 24px; }
      .mode-selector { max-width: 100%; padding: 4px; gap: 6px; }
      .mode-selector .mode-btn { padding: 8px 16px; font-size: 0.95rem; }
      .mode-selector .mode-btn svg { width: 20px; height: 20px; }
      .sidebar-plus-btn {
        margin: 4px 0 8px 0 !important;
        padding: 10px 14px !important;
      }
      .sidebar-plus-text {
        font-size: 0.85rem;
      }
    }
    @media (max-width: 480px) {
      .varvara-orb { width: 80px; height: 80px; margin-bottom: 16px; }
      h1 { font-size: 1.6rem; }
      .subtitle { font-size: .95rem; margin-bottom: 16px; }
      .initial-input-area .input-wrapper input[type="text"], .initial-input-area .input-wrapper textarea { font-size: .9rem; }
      .initial-input-area .input-wrapper .send-btn { width: 38px; height: 38px; }
      .initial-input-area .input-wrapper .send-btn img { width: 18px; height: 18px; }
      .initial-input-area .input-wrapper .upload-btn svg, .initial-input-area .input-wrapper .mic-btn svg { width: 18px; height: 18px; }
      .message { max-width: 95%; font-size: .9rem; padding: 10px 12px; }
      .chat-input-area .input-wrapper input[type="text"], .chat-input-area .input-wrapper textarea { font-size: .9rem; }
      .chat-input-area .input-wrapper .send-btn { width: 36px; height: 36px; }
      .chat-input-area .input-wrapper .send-btn img { width: 18px; height: 18px; }
      .chat-input-area .input-wrapper .upload-btn svg, .chat-input-area .input-wrapper .mic-btn svg { width: 18px; height: 18px; }
      .chip { padding: 6px 12px; font-size: .9rem; gap: 8px; }
      .chip svg { width: 18px; height: 18px; }
      .chip .zov-icon { font-size: 1.1rem; }
      .mode-selector .mode-btn { padding: 6px 12px; font-size: 0.85rem; }
      .mode-selector .mode-btn svg { width: 18px; height: 18px; }
      .sidebar-plus-text { font-size: 0.8rem; }
    }
