    /* === Font Size Scaling: scales both layout (via html font-size) and text === */
    html {
      font-size: 16.3px;
    }

    html.font-size-small,
    body.font-size-small {
      --scale-factor: 0.90;
      --chat-msg-font-size: 13.5px;
      --chat-input-font-size: 14px;
    }

    html.font-size-small {
      font-size: 15.2px !important;
    }

    html.font-size-standard,
    body.font-size-standard {
      --scale-factor: 1.02;
      --chat-msg-font-size: 15px;
      --chat-input-font-size: 16px;
    }

    html.font-size-standard {
      font-size: 16.3px !important;
    }

    html.font-size-large,
    body.font-size-large {
      --scale-factor: 1.12;
      --chat-msg-font-size: 17px;
      --chat-input-font-size: 18px;
    }

    html.font-size-large {
      font-size: 17.5px !important;
    }

    /* Tailwind rem-based text classes → fixed px * scale */
    .text-xs {
      font-size: calc(12px * var(--scale-factor, 1)) !important;
    }

    .text-sm {
      font-size: calc(14px * var(--scale-factor, 1)) !important;
    }

    .text-base {
      font-size: calc(16px * var(--scale-factor, 1)) !important;
    }

    .text-lg {
      font-size: calc(18px * var(--scale-factor, 1)) !important;
    }

    .text-xl {
      font-size: calc(20px * var(--scale-factor, 1)) !important;
    }

    .text-2xl {
      font-size: calc(24px * var(--scale-factor, 1)) !important;
    }

    /* Arbitrary pixel text classes */
    .text-\[10px\] {
      font-size: calc(10px * var(--scale-factor, 1)) !important;
    }

    .text-\[11px\] {
      font-size: calc(11px * var(--scale-factor, 1)) !important;
    }

    .text-\[13px\] {
      font-size: calc(13px * var(--scale-factor, 1)) !important;
    }

    .text-\[14px\] {
      font-size: calc(14px * var(--scale-factor, 1)) !important;
    }

    .text-\[15px\] {
      font-size: calc(15px * var(--scale-factor, 1)) !important;
    }

    .text-\[16px\] {
      font-size: calc(16px * var(--scale-factor, 1)) !important;
    }

    #header-dev-label {
      font-size: calc(13px * var(--scale-factor, 1)) !important;
    }

    .chat-group-row>div {
      font-size: var(--chat-msg-font-size, 15px) !important;
    }

    #chat-input-field {
      font-size: var(--chat-input-font-size, 16px) !important;
    }

    body {
      font-family: 'Outfit', 'Google Sans', 'Product Sans', system-ui, -apple-system, sans-serif;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
    }

    html[lang="ru"] body,
    html[lang="ru"] button,
    html[lang="ru"] input,
    html[lang="ru"] textarea,
    html[lang="ru"] select {
      font-family: 'Manrope', system-ui, -apple-system, sans-serif;
      font-weight: 600;
    }

    html[lang="ru"] small,
    html[lang="ru"] [class*="-subtitle"],
    html[lang="ru"] [class*="-description"],
    html[lang="ru"] [class*="-desc"],
    html[lang="ru"] [class*="-hint"],
    html[lang="ru"] [class*="-caption"],
    html[lang="ru"] [class*="-meta"] {
      font-weight: 400 !important;
    }
:root {
      --app-height: 100dvh;
      --tg-safe-top: 0px;
      --tg-safe-right: 0px;
      --tg-safe-bottom: 0px;
      --tg-safe-left: 0px;
      --safe-top: max(env(safe-area-inset-top, 0px), var(--tg-safe-top));
      --safe-right: max(env(safe-area-inset-right, 0px), var(--tg-safe-right));
      --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-bottom));
      --safe-left: max(env(safe-area-inset-left, 0px), var(--tg-safe-left));
    }

    html,
    body {
      width: 100%;
      max-width: 100vw;
      height: var(--app-height, 100dvh);
      min-height: 0;
      overflow-x: hidden;
      overflow-y: hidden;
    }

    body > #app,
    body > .flex,
    body > div.flex,
    main {
      min-width: 0;
      max-width: 100vw;
    }

    .app-header-anim {
      height: calc(3.5rem + var(--safe-top));
      min-height: calc(3.5rem + var(--safe-top));
      padding-top: var(--safe-top);
      padding-right: max(1rem, var(--safe-right));
      padding-left: max(1rem, var(--safe-left));
    }

    .input-panel-anim {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      overflow: visible;
      padding: 1rem;
      padding-right: max(1rem, var(--safe-right));
      padding-bottom: max(1rem, var(--safe-bottom));
      padding-left: max(1rem, var(--safe-left));
    }

    #sidebar,
    #settings-view,
    #onboarding {
      padding-top: var(--safe-top);
      padding-bottom: var(--safe-bottom);
    }

    #messages-container {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      -webkit-overflow-scrolling: touch;
      overflow-anchor: none;
    }

    .md-content,
    .md-content *,
    .user-msg-bubble,
    .user-msg-bubble * {
      user-select: text !important;
      -webkit-user-select: text !important;
    }

    .user-msg-bubble {
      min-width: 0;
      max-width: min(85%, calc(100vw - 40px));
      padding: 8px 13px;
      border: 1px solid rgba(148, 163, 184, 0.22);
      border-radius: 18px 18px 7px 18px;
      box-shadow: none;
      overflow-wrap: anywhere;
      word-break: break-word;
      white-space: pre-wrap;
    }

    .chat-group-row { width: 100%; min-width: 0; max-width: 100%; overflow: visible; }
    .chat-group-row > div,
    .chat-group-row .md-content-inner { min-width: 0; max-width: 100%; }

    .md-content-inner.is-writing {
      contain: layout style;
    }

    .md-content,
    .md-content-inner {
      box-sizing: border-box;
      min-width: 0;
      max-width: 100%;
      overflow-wrap: anywhere;
    }

    .chat-group-row.items-start > .md-content {
      min-width: 0;
      max-width: min(95%, calc(100vw - 32px)) !important;
      overflow: hidden;
    }

    .code-block-shell {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      max-width: 100%;
      margin: 12px 0;
      overflow: hidden;
      border: 1px solid #27272a;
      border-radius: 16px;
      background: #111113;
    }

    .code-block-header {
      min-width: 0;
      height: 39px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 0 10px 0 14px;
      border-bottom: 1px solid #27272a;
      color: #a1a1aa;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .code-block-header > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .code-copy-button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 9px; color: #a1a1aa; background: rgba(255, 255, 255, 0.05); font-size: 10px; font-weight: 650; letter-spacing: 0; text-transform: none; transition: color 0.18s ease, background-color 0.18s ease, transform 0.15s ease; }
    .code-copy-button:hover, .code-copy-button.copied { color: #f4f4f5; background: rgba(255, 255, 255, 0.1); }
    .code-copy-button:active { transform: scale(0.96); }

    .md-content .code-block-shell pre {
      box-sizing: border-box;
      display: block;
      width: auto;
      min-width: 0;
      max-width: 100%;
      margin: 0;
      padding: 14px;
      overflow-x: auto;
      overflow-y: hidden;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: #d4d4d8;
      font-size: 12px;
      line-height: 1.6;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-x: contain;
    }

    .md-content .code-block-shell pre code {
      display: inline-block;
      width: auto;
      min-width: 0;
      max-width: none;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      white-space: pre;
      overflow-wrap: normal;
      word-break: normal;
    }

    .code-block-shell .hljs { color: #d4d4d8; background: transparent; }
    .code-block-shell .hljs-comment,
    .code-block-shell .hljs-quote { color: #71717a; font-style: italic; }
    .code-block-shell .hljs-keyword,
    .code-block-shell .hljs-selector-tag,
    .code-block-shell .hljs-literal { color: #c084fc; }
    .code-block-shell .hljs-string,
    .code-block-shell .hljs-regexp,
    .code-block-shell .hljs-addition { color: #86efac; }
    .code-block-shell .hljs-number,
    .code-block-shell .hljs-symbol,
    .code-block-shell .hljs-bullet { color: #fbbf24; }
    .code-block-shell .hljs-title,
    .code-block-shell .hljs-section,
    .code-block-shell .hljs-function .hljs-title { color: #67e8f9; }
    .code-block-shell .hljs-variable,
    .code-block-shell .hljs-template-variable,
    .code-block-shell .hljs-attribute { color: #fda4af; }
    .code-block-shell .hljs-type,
    .code-block-shell .hljs-built_in,
    .code-block-shell .hljs-class .hljs-title { color: #93c5fd; }
    .code-block-shell .hljs-meta,
    .code-block-shell .hljs-doctag { color: #fb923c; }
    .code-block-shell .hljs-deletion { color: #f87171; }
    .code-block-shell .hljs-emphasis { font-style: italic; }
    .code-block-shell .hljs-strong { font-weight: 700; }

    .code-block-streaming .code-block-header::after { content: ''; width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--model-accent-color, #10a37f); animation: streaming-blink 0.8s infinite; }

    .user-msg-bubble-classic {
      color: #1e293b;
      background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.94));
    }

    .user-msg-bubble-orange {
      color: #7c2d12;
      background: linear-gradient(145deg, rgba(255, 247, 237, 0.98), rgba(255, 237, 213, 0.92));
      border-color: rgba(249, 115, 22, 0.2);
    }

    .dark .user-msg-bubble-classic {
      color: #f4f4f5;
      background: linear-gradient(145deg, rgba(63, 63, 70, 0.88), rgba(39, 39, 42, 0.9));
      border-color: rgba(255, 255, 255, 0.09);
    }

    .dark .user-msg-bubble-orange {
      color: #ffedd5;
      background: linear-gradient(145deg, rgba(154, 52, 18, 0.82), rgba(124, 45, 18, 0.86));
      border-color: rgba(251, 146, 60, 0.18);
    }

    #settings-view [id^="settings-tab-content-"] > .space-y-2,
    #settings-view [id^="settings-tab-content-"] > .space-y-2\.5,
    #settings-view [id^="settings-tab-content-"] > .bg-lightCard,
    #settings-view [id^="settings-tab-content-"] > .bg-slate-50 {
      border-radius: 20px !important;
    }

    #settings-view div.flex.bg-slate-100,
    #settings-view div.flex.bg-slate-100\/60 {
      padding: 5px !important;
      border: 1px solid rgba(148, 163, 184, 0.16);
      border-radius: 17px !important;
      background: rgba(241, 245, 249, 0.72) !important;
    }

    #settings-view div.flex.bg-slate-100 > button,
    #settings-view div.flex.bg-slate-100\/60 > button {
      border-radius: 13px !important;
    }

    #settings-view textarea,
    #settings-view input[type="text"],
    #settings-view input[type="number"] {
      border-radius: 16px !important;
    }

    #settings-tab-content-account > div,
    #settings-tab-content-help #specs-cards-container > div,
    #settings-tab-content-help > div:last-child {
      border-radius: 20px !important;
      box-shadow: none !important;
    }

    #settings-view button.rounded-xl,
    #settings-view a.rounded-lg {
      border-radius: 15px !important;
      box-shadow: none !important;
    }

    .data-privacy-card {
      overflow: hidden;
      border: 1px solid rgba(132, 204, 22, 0.26);
      border-radius: 8px;
      background: rgba(247, 254, 231, 0.74);
    }

    .dark .data-privacy-card {
      border-color: rgba(190, 242, 100, 0.18);
      background: rgba(29, 45, 12, 0.3);
    }

    .data-privacy-heading {
      display: flex;
      align-items: flex-start;
      gap: 11px;
      padding: 14px 14px 12px;
    }

    .data-privacy-icon,
    .data-privacy-action-icon {
      display: grid;
      flex: 0 0 auto;
      place-items: center;
      border-radius: 8px;
      color: #4d7c0f;
      background: rgba(190, 242, 100, 0.32);
    }

    .dark .data-privacy-icon,
    .dark .data-privacy-action-icon {
      color: #bef264;
      background: rgba(190, 242, 100, 0.1);
    }

    .data-privacy-icon { width: 32px; height: 32px; font-size: 14px; }
    .data-privacy-heading h2 { color: #365314; font-size: 13px; font-weight: 750; line-height: 1.2; }
    .dark .data-privacy-heading h2 { color: #ecfccb; }
    .data-privacy-heading p { margin-top: 3px; color: #65a30d; font-size: 10px; line-height: 1.35; }
    .dark .data-privacy-heading p { color: #a3c86a; }

    .data-privacy-action {
      display: grid;
      width: 100%;
      grid-template-columns: 30px minmax(0, 1fr) 14px;
      align-items: center;
      gap: 10px;
      padding: 11px 14px;
      border-top: 1px solid rgba(132, 204, 22, 0.18);
      text-align: left;
      transition: background-color .16s ease;
    }

    .data-privacy-action:hover { background: rgba(255, 255, 255, 0.46); }
    .dark .data-privacy-action { border-color: rgba(190, 242, 100, 0.1); }
    .dark .data-privacy-action:hover { background: rgba(190, 242, 100, 0.05); }
    .data-privacy-action-icon { width: 30px; height: 30px; font-size: 11px; }
    .data-privacy-action-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
    .data-privacy-action-copy b { overflow: hidden; color: #3f6212; font-size: 11px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
    .dark .data-privacy-action-copy b { color: #ecfccb; }
    .data-privacy-action-copy small { overflow: hidden; color: #65a30d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
    .dark .data-privacy-action-copy small { color: #a3c86a; }
    .data-privacy-arrow { color: #65a30d; font-size: 9px; }

    .data-retention-note {
      display: flex;
      gap: 8px;
      margin: 4px 12px 10px;
      padding: 9px 10px;
      border: 1px solid rgba(132, 204, 22, 0.17);
      border-radius: 7px;
      color: #4d7c0f;
      background: rgba(255, 255, 255, 0.42);
    }

    .dark .data-retention-note { color: #bef264; background: rgba(0, 0, 0, 0.12); }
    .data-retention-note i { margin-top: 1px; font-size: 10px; }
    .data-retention-note p { font-size: 9px; line-height: 1.45; }
    .data-retention-note b { font-weight: 750; }
    .data-privacy-policy { display: flex; align-items: center; justify-content: space-between; padding: 0 14px 12px; color: #4d7c0f; font-size: 10px; font-weight: 700; }
    .dark .data-privacy-policy { color: #bef264; }
    .data-privacy-policy i { font-size: 9px; }
    .data-account-delete { display: flex; width: calc(100% - 24px); align-items: center; justify-content: center; gap: 7px; margin: 0 12px 12px; padding: 9px 12px; border: 1px solid rgba(225, 29, 72, .24); border-radius: 7px; color: #be123c; background: rgba(255, 228, 230, .56); font-size: 10px; font-weight: 750; transition: background-color .16s ease; }
    .data-account-delete:hover { background: rgba(255, 228, 230, .9); }
    .dark .data-account-delete { color: #fda4af; background: rgba(136, 19, 55, .22); border-color: rgba(244, 63, 94, .24); }

    .history-cleanup-overlay { position: fixed; z-index: 170; inset: 0; display: flex; visibility: hidden; align-items: flex-end; justify-content: center; padding: 12px; background: rgba(15, 23, 42, .42); opacity: 0; pointer-events: none; transition: opacity .2s ease, visibility .2s ease; }
    .history-cleanup-overlay.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
    .history-cleanup-sheet { display: flex; width: min(100%, 480px); max-height: min(78dvh, 630px); flex-direction: column; overflow: hidden; border: 1px solid rgba(148, 163, 184, .22); border-radius: 8px; background: #fff; box-shadow: 0 22px 65px rgba(15, 23, 42, .22); transform: translateY(18px); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
    .history-cleanup-overlay.is-open .history-cleanup-sheet { transform: translateY(0); }
    .dark .history-cleanup-sheet { border-color: rgba(255, 255, 255, .09); background: #18181b; }
    .history-cleanup-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 15px 15px 9px; }
    .history-cleanup-kicker { display: block; margin-bottom: 2px; color: #65a30d; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
    .history-cleanup-header h2 { color: #1e293b; font-size: 15px; font-weight: 750; }
    .dark .history-cleanup-header h2 { color: #f4f4f5; }
    .history-cleanup-header button { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 7px; color: #64748b; background: rgba(148, 163, 184, .12); }
    .history-cleanup-description { padding: 0 15px 12px; color: #64748b; font-size: 10px; line-height: 1.45; }
    .dark .history-cleanup-description { color: #a1a1aa; }
    .history-cleanup-list { min-height: 0; flex: 1; overflow-y: auto; border-top: 1px solid rgba(148, 163, 184, .14); }
    .history-cleanup-item { display: grid; width: 100%; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid rgba(148, 163, 184, .1); text-align: left; }
    .history-cleanup-item input { width: 15px; height: 15px; accent-color: #65a30d; }
    .history-cleanup-item strong { display: block; overflow: hidden; color: #334155; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
    .dark .history-cleanup-item strong { color: #e4e4e7; }
    .history-cleanup-item small { display: block; margin-top: 2px; color: #94a3b8; font-size: 9px; }
    .history-cleanup-empty { padding: 30px 18px; color: #94a3b8; font-size: 11px; text-align: center; }
    .history-cleanup-footer { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px; padding: 12px; border-top: 1px solid rgba(148, 163, 184, .14); }
    .history-cleanup-select, .history-cleanup-delete { height: 38px; border-radius: 7px; font-size: 10px; font-weight: 750; }
    .history-cleanup-select { color: #475569; background: #f1f5f9; }
    .dark .history-cleanup-select { color: #d4d4d8; background: #27272a; }
    .history-cleanup-delete { display: flex; align-items: center; justify-content: center; gap: 7px; color: #fff; background: #e11d48; }

    .dark #settings-view div.flex.bg-slate-100,
    .dark #settings-view div.flex.bg-slate-100\/60 {
      background: rgba(39, 39, 42, 0.62) !important;
      border-color: rgba(255, 255, 255, 0.06);
    }

    .admin-search-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .admin-search-input,
    .admin-limit-input {
      border: 1px solid rgba(148, 163, 184, 0.24);
      border-radius: 14px !important;
      background: rgba(248, 250, 252, 0.86);
      transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .admin-search-input:focus,
    .admin-limit-input:focus {
      border-color: var(--color-accent);
      box-shadow: 0 0 0 3px var(--color-accent-focus-glow);
    }

    .admin-search-button {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 10px 15px;
      border: 1px solid rgba(148, 163, 184, 0.28);
      border-radius: 14px;
      color: #475569;
      background: rgba(248, 250, 252, 0.86);
      font-size: 12px;
      font-weight: 700;
      transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
    }

    .admin-search-button:hover {
      border-color: rgba(100, 116, 139, 0.42);
      background: #f1f5f9;
    }

    .admin-search-button:active {
      transform: scale(0.97);
    }

    .admin-accent-button {
      flex-shrink: 0;
      padding: 10px 17px;
      border-radius: 14px;
      color: #fff;
      background: var(--color-accent);
      transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
    }

    .admin-accent-button:hover {
      background: var(--color-accent-dark);
    }

    .admin-accent-button:active {
      transform: scale(0.97);
    }

    .admin-access-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 11px 13px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 16px;
      background: rgba(248, 250, 252, 0.62);
    }

    .admin-access-toggle {
      width: 40px;
      height: 23px;
      flex: 0 0 auto;
      appearance: none;
      -webkit-appearance: none;
      position: relative;
      border: 0;
      border-radius: 999px;
      background: #cbd5e1;
      transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
    }

    .admin-access-toggle::before {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 17px;
      height: 17px;
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
      transition: transform 0.15s ease;
    }

    .admin-access-toggle:checked {
      background: var(--color-accent);
    }

    .admin-access-toggle:checked::before {
      transform: translateX(17px);
    }

    .admin-access-toggle:active {
      transform: scale(0.92);
    }

    .admin-limit-input:disabled {
      cursor: not-allowed;
      opacity: 0.48;
    }

    .admin-limits-group {
      padding: 12px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 16px;
      background: rgba(248, 250, 252, 0.62);
    }

    .admin-date-input { width: 132px; padding: 8px 9px; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 12px; background: rgba(248, 250, 252, 0.86); color: #334155; font-size: 11px; outline: none; }
    .admin-date-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-focus-glow); }

    .admin-limits-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 10px;
    }

    .admin-unlimited-hint {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      color: #94a3b8;
      font-size: 9px;
      font-weight: 600;
      white-space: nowrap;
    }

    .dark .admin-search-input,
    .dark .admin-limit-input,
    .dark .admin-search-button {
      border-color: rgba(255, 255, 255, 0.08);
      background: rgba(39, 39, 42, 0.58);
    }

    .dark .admin-search-button {
      color: #d4d4d8;
    }

    .dark .admin-search-button:hover {
      border-color: rgba(255, 255, 255, 0.15);
      background: rgba(63, 63, 70, 0.72);
    }

    .dark .admin-access-row,
    .dark .admin-limits-group {
      border-color: rgba(255, 255, 255, 0.06);
      background: rgba(39, 39, 42, 0.38);
    }

    .dark .admin-date-input { border-color: rgba(255, 255, 255, 0.08); color: #d4d4d8; background: rgba(39, 39, 42, 0.58); color-scheme: dark; }

    .dark .admin-access-toggle {
      background: #52525b;
    }

    .dark .admin-access-toggle:checked {
      background: var(--color-accent);
    }

    html.accent-classic.dark .admin-accent-button {
      color: #09090b;
    }

    .admin-recent-heading { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 7px; color: #94a3b8; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
    .admin-recent-heading button { width: 25px; height: 25px; border-radius: 9px; color: #94a3b8; transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease; }
    .admin-recent-heading button:hover { color: #475569; background: rgba(148, 163, 184, 0.12); }
    .admin-recent-heading button:active { transform: rotate(45deg); }
    .admin-recent-list { display: grid; gap: 5px; max-height: 230px; overflow-y: auto; }
    .admin-recent-user { width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 14px; background: rgba(248, 250, 252, 0.58); text-align: left; transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease; }
    .admin-recent-user:hover { border-color: rgba(100, 116, 139, 0.28); background: rgba(241, 245, 249, 0.9); }
    .admin-recent-user:active { transform: scale(0.985); }
    .admin-recent-status { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12); }
    .admin-recent-status.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14); }
    .admin-recent-name { overflow: hidden; color: #334155; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
    .admin-recent-meta { margin-top: 1px; color: #94a3b8; font-size: 9px; }
    .admin-recent-time { color: #94a3b8; font-size: 9px; white-space: nowrap; }
    .admin-recent-time.online { color: #16a34a; font-weight: 700; }
    .dark .admin-recent-user { border-color: rgba(255, 255, 255, 0.06); background: rgba(39, 39, 42, 0.34); }
    .dark .admin-recent-user:hover { border-color: rgba(255, 255, 255, 0.11); background: rgba(63, 63, 70, 0.52); }
    .dark .admin-recent-name { color: #e4e4e7; }

    .admin-ban-details { padding: 12px; border: 1px solid rgba(244, 63, 94, 0.14); border-radius: 16px; background: rgba(255, 241, 242, 0.46); }
    .admin-reason-input { padding: 9px 11px; border: 1px solid rgba(148, 163, 184, 0.24); border-radius: 12px; background: rgba(255, 255, 255, 0.72); color: #334155; font-size: 11px; outline: none; }
    .admin-reason-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-focus-glow); }
    .dark .admin-ban-details { border-color: rgba(244, 63, 94, 0.12); background: rgba(76, 5, 25, 0.14); }
    .dark .admin-reason-input { border-color: rgba(255, 255, 255, 0.08); background: rgba(39, 39, 42, 0.58); color: #e4e4e7; }

    .access-blocked-card { width: 100%; max-width: 390px; padding: 32px 26px 25px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 28px; background: rgba(248, 250, 252, 0.78); }
    .access-blocked-title { color: #0f172a; font-size: 27px; font-weight: 650; line-height: 1.15; letter-spacing: -0.025em; }
    .access-blocked-message { margin-top: 14px; color: #64748b; font-size: 16px; font-weight: 500; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
    .access-support-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; padding: 12px 16px; border-radius: 15px; color: #fff; background: var(--color-accent, #e25615); font-size: 13px; font-weight: 700; transition: transform 0.15s ease, opacity 0.2s ease; }
    .access-support-button:active { transform: scale(0.98); }
    .dark .access-blocked-card { border-color: rgba(255, 255, 255, 0.07); background: rgba(24, 24, 27, 0.74); }
    .dark .access-blocked-title { color: #fafafa; }
    .dark .access-blocked-message { color: #a1a1aa; }


    .no-scrollbar::-webkit-scrollbar {
      display: none;
    }

    .no-scrollbar {
      -ms-overflow-style: none;
      scrollbar-width: none;
    }

    /* === Disable Animations === */
    html.disable-animations,
    html.disable-animations *,
    html.disable-animations *::before,
    html.disable-animations *::after {
      animation-duration: 0s !important;
      animation-delay: 0s !important;
      transition-duration: 0s !important;
      transition-delay: 0s !important;
      transition: none !important;
      animation: none !important;
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto !important;
      }

      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
      }

      #chat-ambient-layer,
      #ambient-glow {
        animation: none !important;
      }
    }

    /* === Liquid Glass Theme === */
    /* [ignoring loop detection] */
    @keyframes lg-glass-shimmer {
      0% {
        background-position: 250% 0;
      }

      100% {
        background-position: -150% 0;
      }
    }

    /* Ambient layer overrides for Liquid Glass */
    html.liquid-glass #chat-ambient-layer {
      opacity: 0.65 !important;
      filter: url(#glass-refraction) !important;
    }

    html.liquid-glass.dark #chat-ambient-layer {
      opacity: 0.55 !important;
      filter: url(#glass-refraction) !important;
    }

    html.liquid-glass .chat-blob {
      filter: blur(80px) !important;
    }

    html.liquid-glass .chat-blob-1 {
      background-color: #b0c4de !important;
    }

    /* Steel blue */
    html.liquid-glass .chat-blob-2 {
      background-color: #cbd5e1 !important;
    }

    /* Platinum slate */
    html.liquid-glass .chat-blob-3 {
      background-color: #ccd9e8 !important;
    }

    /* Light grey-blue */

    html.liquid-glass.dark .chat-blob-1 {
      background-color: #1e293b !important;
    }

    /* Dark slate blue */
    html.liquid-glass.dark .chat-blob-2 {
      background-color: #1c1917 !important;
    }

    /* Dark graphite */
    html.liquid-glass.dark .chat-blob-3 {
      background-color: #0f172a !important;
    }

    /* Midnight navy */

    /* Body gradient mesh */
    html.liquid-glass body {
      background:
        radial-gradient(ellipse at 15% 45%, rgba(148, 163, 184, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 15%, rgba(176, 196, 222, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 85%, rgba(203, 213, 225, 0.15) 0%, transparent 55%),
        linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
      background-attachment: fixed !important;
    }

    html.liquid-glass.dark body {
      background:
        radial-gradient(ellipse at 15% 45%, rgba(30, 41, 59, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 15%, rgba(15, 23, 42, 0.25) 0%, transparent 55%),
        linear-gradient(135deg, #09090b 0%, #030712 100%) !important;
      background-attachment: fixed !important;
    }

    /* Real-time Apple-like Glass interactive glare styling */
    html.liquid-glass button,
    html.liquid-glass #media-drawer-panel label,
    html.liquid-glass .chat-group-row.items-end .bg-orange-500,
    html.liquid-glass .chat-group-row.items-end .bg-slate-900,
    html.liquid-glass.dark .chat-group-row.items-end .dark\:bg-white,
    html.liquid-glass .md-content,
    html.liquid-glass .thinking-indicator,
    html.liquid-glass .user-msg-actions-panel,
    html.liquid-glass .history-item,
    html.liquid-glass .bookmark-item,
    html.liquid-glass #history-search,
    html.liquid-glass #custom-modal-box,
    html.liquid-glass #tag-picker-box {
      position: relative;
      overflow: hidden;
      --mouse-x: 50%;
      --mouse-y: 50%;
      --lg-reflect-opacity: 0;
      transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease !important;
    }

    html.liquid-glass button::before,
    html.liquid-glass #media-drawer-panel label::before,
    html.liquid-glass .chat-group-row.items-end .bg-orange-500::before,
    html.liquid-glass .chat-group-row.items-end .bg-slate-900::before,
    html.liquid-glass.dark .chat-group-row.items-end .dark\:bg-white::before,
    html.liquid-glass .md-content::before,
    html.liquid-glass .thinking-indicator::before,
    html.liquid-glass .user-msg-actions-panel::before,
    html.liquid-glass .history-item::before,
    html.liquid-glass .bookmark-item::before,
    html.liquid-glass #history-search::before,
    html.liquid-glass #custom-modal-box::before,
    html.liquid-glass #tag-picker-box::before {
      content: '';
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%),
          rgba(255, 255, 255, 0.24),
          transparent 80%);
      opacity: var(--lg-reflect-opacity, 0);
      transition: opacity 0.35s ease;
      z-index: 5;
    }

    html.liquid-glass.dark button::before,
    html.liquid-glass.dark #media-drawer-panel label::before,
    html.liquid-glass.dark .chat-group-row.items-end .bg-orange-500::before,
    html.liquid-glass.dark .chat-group-row.items-end .bg-slate-900::before,
    html.liquid-glass.dark .chat-group-row.items-end .dark\:bg-white::before,
    html.liquid-glass.dark .md-content::before,
    html.liquid-glass.dark .thinking-indicator::before,
    html.liquid-glass.dark .user-msg-actions-panel::before,
    html.liquid-glass.dark .history-item::before,
    html.liquid-glass.dark .bookmark-item::before,
    html.liquid-glass.dark #history-search::before,
    html.liquid-glass.dark #custom-modal-box::before,
    html.liquid-glass.dark #tag-picker-box::before {
      background: radial-gradient(circle 150px at var(--mouse-x, 50%) var(--mouse-y, 50%),
          rgba(255, 255, 255, 0.12),
          transparent 80%);
    }

    html.liquid-glass button:hover,
    html.liquid-glass .history-item:hover,
    html.liquid-glass .bookmark-item:hover {
      transform: translateY(-1.5px) scale(1.008);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    }

    html.liquid-glass.dark button:hover,
    html.liquid-glass.dark .history-item:hover,
    html.liquid-glass.dark .bookmark-item:hover {
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    }

    html.liquid-glass button:active,
    html.liquid-glass .history-item:active,
    html.liquid-glass .bookmark-item:active {
      transform: translateY(0) scale(0.98);
    }

    /* Main content transparent */
    html.liquid-glass #messages-container,
    html.liquid-glass .flex-1.flex.flex-col.min-h-0 {
      background: transparent !important;
    }

    /* Header glass */
    html.liquid-glass header.app-header-anim {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(255, 255, 255, 0.3) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(35px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(35px) saturate(190%) !important;
      border-bottom: 1.2px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    }

    html.liquid-glass.dark header.app-header-anim {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(10, 10, 18, 0.45) !important;
      background-size: 250% 100%, 100% 100% !important;
      border-bottom: 1.2px solid rgba(255, 255, 255, 0.12) !important;
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.15) !important;
    }

    /* Sidebar glass */
    html.liquid-glass #sidebar {
      background: rgba(244, 246, 249, 0.85) !important;
      backdrop-filter: blur(60px) saturate(210%) !important;
      -webkit-backdrop-filter: blur(60px) saturate(210%) !important;
      border-right: 1.2px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: inset 1px 0 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #sidebar {
      background: rgba(12, 12, 22, 0.9) !important;
      backdrop-filter: blur(60px) saturate(210%) !important;
      -webkit-backdrop-filter: blur(60px) saturate(210%) !important;
      border-right: 1.2px solid rgba(255, 255, 255, 0.1) !important;
      box-shadow: inset 1px 0 0 0 rgba(255, 255, 255, 0.08) !important;
    }

    html.liquid-glass #sidebar-mask {
      background: rgba(0, 0, 0, 0.12) !important;
      backdrop-filter: blur(12px) !important;
      -webkit-backdrop-filter: blur(12px) !important;
    }

    html.liquid-glass #sidebar>div:first-child {
      background: transparent !important;
      border-bottom: 1px solid rgba(255, 255, 255, 0.25) !important;
    }

    html.liquid-glass.dark #sidebar>div:first-child {
      border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    html.liquid-glass #sidebar>div:last-child {
      background: rgba(255, 255, 255, 0.2) !important;
      border-top: 1.2px solid rgba(255, 255, 255, 0.45) !important;
    }

    html.liquid-glass.dark #sidebar>div:last-child {
      background: rgba(10, 10, 18, 0.3) !important;
      border-top: 1.2px solid rgba(255, 255, 255, 0.1) !important;
    }

    html.liquid-glass #history-search {
      background: rgba(255, 255, 255, 0.3) !important;
      border: 1px solid rgba(255, 255, 255, 0.4) !important;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.4) !important;
      color: #1e293b !important;
    }

    html.liquid-glass.dark #history-search {
      background: rgba(10, 10, 15, 0.3) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.06) !important;
      color: #f4f4f5 !important;
    }

    html.liquid-glass #sidebar button[onclick="startFreshSession()"] {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(255, 255, 255, 0.35) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    }

    html.liquid-glass.dark #sidebar button[onclick="startFreshSession()"] {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(20, 20, 30, 0.4) !important;
      background-size: 250% 100%, 100% 100% !important;
      border-color: rgba(255, 255, 255, 0.12) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    }

    html.liquid-glass .history-item {
      background: transparent !important;
      border: 1px solid transparent !important;
      transition: all 0.2s ease !important;
    }

    /* Sidebar tabs container & buttons */
    .sb-tabs-container {
      display: flex;
      width: 100%;
      padding: 3.5px;
      background: #f1f5f9;
      border: 1px solid rgba(226, 232, 240, 0.8);
      border-radius: 14px;
    }
    .dark .sb-tabs-container {
      background: rgba(24, 24, 27, 0.6);
      border-color: rgba(39, 39, 42, 0.8);
    }
    .sb-tab-btn {
      flex: 1;
      padding: 6.5px 12px;
      text-align: center;
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border-radius: 10px;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      color: #64748b;
      background: transparent;
      border: 1px solid transparent;
      cursor: pointer;
    }
    .dark .sb-tab-btn {
      color: #71717a;
    }
    .sb-tab-btn:hover {
      color: #1e293b;
    }
    .dark .sb-tab-btn:hover {
      color: #e4e4e7;
    }
    .sb-tab-btn.active {
      color: #0f172a;
      background: #ffffff;
      border-color: rgba(226, 232, 240, 0.8);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    .dark .sb-tab-btn.active {
      color: #ffffff;
      background: #27272a;
      border-color: rgba(63, 63, 70, 0.5);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    /* Liquid Glass overrides for sidebar tabs */
    html.liquid-glass .sb-tabs-container {
      background: rgba(255, 255, 255, 0.25) !important;
      border: 1px solid rgba(255, 255, 255, 0.4) !important;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
    }
    html.liquid-glass.dark .sb-tabs-container {
      background: rgba(15, 15, 25, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02) !important;
    }
    html.liquid-glass .sb-tab-btn {
      color: rgba(15, 23, 42, 0.55) !important;
    }
    html.liquid-glass.dark .sb-tab-btn {
      color: rgba(255, 255, 255, 0.45) !important;
    }
    html.liquid-glass .sb-tab-btn:hover {
      color: rgba(15, 23, 42, 0.9) !important;
    }
    html.liquid-glass.dark .sb-tab-btn:hover {
      color: rgba(255, 255, 255, 0.9) !important;
    }
    html.liquid-glass .sb-tab-btn.active {
      background: rgba(255, 255, 255, 0.6) !important;
      border-color: rgba(255, 255, 255, 0.7) !important;
      color: #0f172a !important;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    }
    html.liquid-glass.dark .sb-tab-btn.active {
      background: rgba(255, 255, 255, 0.12) !important;
      border-color: rgba(255, 255, 255, 0.15) !important;
      color: #ffffff !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08) !important;
    }

    html.liquid-glass .history-item:hover {
      background: rgba(255, 255, 255, 0.25) !important;
      border-color: rgba(255, 255, 255, 0.4) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark .history-item:hover {
      background: rgba(255, 255, 255, 0.05) !important;
      border-color: rgba(255, 255, 255, 0.12) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }

    html.liquid-glass .history-item-active {
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.15) 100%),
        rgba(255, 255, 255, 0.1) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      border-left: 4px solid var(--color-accent) !important;
      box-shadow: 0 6px 16px rgba(31, 38, 135, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    }

    html.liquid-glass.dark .history-item-active {
      background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%),
        rgba(15, 15, 25, 0.4) !important;
      border: 1px solid rgba(255, 255, 255, 0.15) !important;
      border-left: 4px solid var(--color-accent) !important;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 0 rgba(255, 255, 255, 0.08) !important;
    }

    /* Model dropdown glass */
    html.liquid-glass #model-dropdown-menu {
      background: rgba(255, 255, 255, 0.6) !important;
      backdrop-filter: blur(40px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.55) !important;
      border-radius: 20px !important;
    }

    html.liquid-glass.dark #model-dropdown-menu {
      background: rgba(15, 15, 25, 0.7) !important;
      border-color: rgba(255, 255, 255, 0.12) !important;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    }

    /* Bottom input panel glass */
    html.liquid-glass .input-panel-anim {
      background: transparent !important;
    }

    html.liquid-glass .chat-input-wrap {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(255, 255, 255, 0.12) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(30px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.02),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.05) !important;
      border-radius: 18px !important;
    }

    html.liquid-glass.dark .chat-input-wrap {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(15, 15, 25, 0.4) !important;
      background-size: 250% 100%, 100% 100% !important;
      border: 1px solid rgba(255, 255, 255, 0.12) !important;
      box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.25),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.2) !important;
    }

    /* Plus button and new chat button glass */
    html.liquid-glass #btn-plus-trigger,
    html.liquid-glass.dark #btn-plus-trigger {
      background: transparent !important;
      border: none !important;
      box-shadow: none !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }

    /* Media drawer glass */
    html.liquid-glass #media-drawer-panel {
      background: rgba(255, 255, 255, 0.88) !important;
      backdrop-filter: blur(40px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
      border: 1px solid rgba(255, 255, 255, 0.7) !important;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.9) !important;
      border-radius: 20px !important;
    }

    html.liquid-glass.dark #media-drawer-panel {
      background: rgba(20, 20, 30, 0.88) !important;
      border-color: rgba(255, 255, 255, 0.15) !important;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    }

    /* Buttons and labels inside media drawer glass */
    html.liquid-glass #media-drawer-panel button,
    html.liquid-glass #media-drawer-panel label {
      background: rgba(240, 244, 248, 0.6) !important;
      backdrop-filter: blur(10px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.9) !important;
    }

    html.liquid-glass.dark #media-drawer-panel button,
    html.liquid-glass.dark #media-drawer-panel label {
      background: rgba(255, 255, 255, 0.04) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }

    /* Active state for mode buttons inside media drawer glass */
    html.liquid-glass #mode-web-search-btn[class*="bg-slate-50 "],
    html.liquid-glass #mode-thinking-btn[class*="bg-slate-50 "] {
      background: rgba(255, 255, 255, 0.95) !important;
      border-color: rgba(249, 115, 22, 0.3) !important;
      box-shadow: 0 4px 12px rgba(249, 115, 22, 0.05) !important;
    }

    html.liquid-glass.dark #mode-web-search-btn[class*="dark:bg-zinc-800/50"],
    html.liquid-glass.dark #mode-thinking-btn[class*="dark:bg-zinc-800/50"] {
      background: rgba(255, 255, 255, 0.1) !important;
      border-color: rgba(255, 255, 255, 0.22) !important;
    }

    /* Bookmark tag dropdown glass */
    html.liquid-glass .dropdown-bookmark-tag {
      background: rgba(255, 255, 255, 0.45) !important;
      backdrop-filter: blur(25px) saturate(180%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark .dropdown-bookmark-tag {
      background: rgba(15, 15, 25, 0.5) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }

    html.liquid-glass .md-content,
    html.liquid-glass .thinking-indicator,
    html.liquid-glass .user-msg-actions-panel {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.06) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.15) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(25px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.02),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.05) !important;
      overflow: hidden;
      position: relative;
    }

    html.liquid-glass .md-content {
      border-radius: 20px !important;
    }

    html.liquid-glass.dark .md-content,
    html.liquid-glass.dark .thinking-indicator,
    html.liquid-glass.dark .user-msg-actions-panel {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(15, 15, 25, 0.35) 0%, rgba(10, 10, 18, 0.25) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      border: 1px solid rgba(255, 255, 255, 0.24) !important;
      box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.25),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.2) !important;
    }

    /* Bot bubble action buttons glass & thinking icon glass */
    html.liquid-glass .bot-action-btn,
    html.liquid-glass .thinking-icon {
      background: rgba(255, 255, 255, 0.35) !important;
      backdrop-filter: blur(12px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01), inset 0 1px 0 0 rgba(255, 255, 255, 0.55) !important;
    }

    html.liquid-glass.dark .bot-action-btn,
    html.liquid-glass.dark .thinking-icon {
      background: rgba(18, 18, 30, 0.3) !important;
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }

    /* User Orange Glass */
    html.liquid-glass .user-msg-bubble-orange {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(255, 237, 213, 0.78) 0%, rgba(254, 215, 170, 0.68) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(25px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
      border-radius: 18px 18px 7px 18px !important;
      color: #7c2d12 !important;
    }

    html.liquid-glass.dark .user-msg-bubble-orange {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(154, 52, 18, 0.68) 0%, rgba(124, 45, 18, 0.62) 100%) !important;
      border-color: rgba(251, 146, 60, 0.2) !important;
      color: #ffedd5 !important;
    }

    /* User Classic Glass (Light Theme) */
    html.liquid-glass .user-msg-bubble-classic {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.04) 45%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(241, 245, 249, 0.62) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(25px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.55) !important;
      border-radius: 18px 18px 7px 18px !important;
      color: #1e293b !important;
    }

    /* User Classic Glass (Dark Theme) */
    html.liquid-glass.dark .user-msg-bubble-classic {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(63, 63, 70, 0.72) 0%, rgba(39, 39, 42, 0.66) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(25px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.1) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.09) !important;
      border-radius: 18px 18px 7px 18px !important;
      color: #f4f4f5 !important;
    }

    /* Template cards glass */
    html.liquid-glass #empty-state-block button {
      background: rgba(255, 255, 255, 0.25) !important;
      backdrop-filter: blur(20px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
      border: 1px solid rgba(255, 255, 255, 0.4) !important;
      box-shadow: 0 8px 32px rgba(31, 38, 135, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #empty-state-block button {
      background: rgba(18, 18, 30, 0.3) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }

    /* Center AI badge glass */
    html.liquid-glass #center-ai-badge {
      background: rgba(255, 255, 255, 0.3) !important;
      backdrop-filter: blur(20px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
      border: 1px solid rgba(255, 255, 255, 0.4) !important;
      box-shadow: 0 8px 32px rgba(31, 38, 135, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #center-ai-badge {
      background: rgba(18, 18, 30, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
    }

    /* Settings overlay glass */
    html.liquid-glass #settings-overlay>div:last-child {
      background: rgba(255, 255, 255, 0.6) !important;
      backdrop-filter: blur(45px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(45px) saturate(200%) !important;
      border-left: 1.2px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: inset 1px 0 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #settings-overlay>div:last-child {
      background: rgba(12, 12, 20, 0.65) !important;
      border-left: 1.2px solid rgba(255, 255, 255, 0.12) !important;
      box-shadow: inset 1px 0 0 0 rgba(255, 255, 255, 0.08) !important;
    }

    /* Header model selector button glass */
    html.liquid-glass #dropdown-parent-node>button:first-child,
    html.liquid-glass header button[onclick="startFreshSession()"],
    html.liquid-glass header button#btn-sidebar-trigger,
    html.liquid-glass #sidebar button#btn-sidebar-settings,
    html.liquid-glass header button#btn-share-dialog,
    html.liquid-glass #header-dev-label {
      background: rgba(255, 255, 255, 0.35) !important;
      backdrop-filter: blur(16px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.55) !important;
      border-radius: 14px !important;
    }

    html.liquid-glass.dark #dropdown-parent-node>button:first-child,
    html.liquid-glass.dark header button[onclick="startFreshSession()"],
    html.liquid-glass.dark header button#btn-sidebar-trigger,
    html.liquid-glass.dark #sidebar button#btn-sidebar-settings,
    html.liquid-glass.dark header button#btn-share-dialog,
    html.liquid-glass.dark #header-dev-label {
      background: rgba(15, 15, 25, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.12) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15) !important;
    }

    /* Version switcher glass */
    html.liquid-glass .version-switcher {
      background: rgba(255, 255, 255, 0.4) !important;
      backdrop-filter: blur(12px) !important;
      -webkit-backdrop-filter: blur(12px) !important;
      border: 1.2px solid rgba(255, 255, 255, 0.75) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    }
    
    html.liquid-glass.dark .version-switcher {
      background: rgba(15, 15, 25, 0.45) !important;
      border: 1.2px solid rgba(255, 255, 255, 0.24) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;
    }

    /* Settings view glass panel */
    html.liquid-glass #settings-view {
      background: rgba(244, 246, 249, 0.88) !important;
      backdrop-filter: blur(65px) saturate(210%) !important;
      -webkit-backdrop-filter: blur(65px) saturate(210%) !important;
    }

    html.liquid-glass.dark #settings-view {
      background: rgba(10, 10, 16, 0.92) !important;
      backdrop-filter: blur(65px) saturate(210%) !important;
      -webkit-backdrop-filter: blur(65px) saturate(210%) !important;
    }

    /* Settings view header */
    html.liquid-glass #settings-view>div:first-child {
      background: transparent !important;
      border-bottom: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    }

    html.liquid-glass.dark #settings-view>div:first-child {
      border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    }

    /* Tab switcher container and child wrappers */
    html.liquid-glass #settings-view div.bg-slate-100,
    html.liquid-glass #settings-view div.bg-slate-100\/60,
    html.liquid-glass #settings-view div.bg-slate-200\/60 {
      background: rgba(255, 255, 255, 0.25) !important;
      border: 1px solid rgba(255, 255, 255, 0.35) !important;
    }

    html.liquid-glass.dark #settings-view div.bg-slate-100,
    html.liquid-glass.dark #settings-view div.bg-zinc-900\/60,
    html.liquid-glass.dark #settings-view div.bg-zinc-800\/60 {
      background: rgba(10, 10, 15, 0.35) !important;
      border: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    /* Active buttons inside selectors */
    html.liquid-glass #settings-view button.bg-white {
      background: rgba(255, 255, 255, 0.45) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02), inset 0 1px 1px rgba(255, 255, 255, 0.8) !important;
      color: #1e293b !important;
    }

    html.liquid-glass.dark #settings-view button.dark\:bg-zinc-800,
    html.liquid-glass.dark #settings-view button.bg-zinc-800 {
      background: rgba(255, 255, 255, 0.1) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
      color: #f4f4f5 !important;
    }

    /* Inactive buttons inside selectors */
    html.liquid-glass #settings-view button.bg-transparent {
      border: 1.5px solid transparent !important;
      color: #64748b !important;
    }

    html.liquid-glass.dark #settings-view button.bg-transparent {
      color: #94a3b8 !important;
    }

    /* Sticky switcher block */
    html.liquid-glass #settings-view div.px-4.py-3.border-b {
      background: transparent !important;
      border-bottom: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    }

    html.liquid-glass.dark #settings-view div.px-4.py-3.border-b {
      border-bottom: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    }

    /* Textareas and inputs inside settings */
    html.liquid-glass #settings-view textarea,
    html.liquid-glass #settings-view input[type="text"] {
      background: rgba(255, 255, 255, 0.35) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.5) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
    }

    html.liquid-glass.dark #settings-view textarea,
    html.liquid-glass.dark #settings-view input[type="text"] {
      background: rgba(10, 10, 15, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.08) !important;
    }

    /* Dividers inside settings */
    html.liquid-glass #settings-view hr {
      border-color: rgba(255, 255, 255, 0.25) !important;
    }

    html.liquid-glass.dark #settings-view hr {
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Back arrows and headers */
    html.liquid-glass #settings-view button[onclick="handleSettingsOverlay(false)"] {
      background: rgba(255, 255, 255, 0.35) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      border-radius: 10px !important;
    }

    html.liquid-glass.dark #settings-view button[onclick="handleSettingsOverlay(false)"] {
      background: rgba(15, 15, 25, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.12) !important;
    }

    /* Settings cards and boxes */
    html.liquid-glass #settings-view .bg-slate-50,
    html.liquid-glass #settings-view .bg-lightCard,
    html.liquid-glass #settings-view .dark\:bg-darkCard,
    html.liquid-glass #settings-view .dark\:bg-zinc-900\/30 {
      background: rgba(255, 255, 255, 0.35) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.01), inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
    }

    html.liquid-glass.dark #settings-view .bg-slate-50,
    html.liquid-glass.dark #settings-view .dark\:bg-darkCard,
    html.liquid-glass.dark #settings-view .bg-lightCard,
    html.liquid-glass.dark #settings-view .dark\:bg-zinc-900\/30,
    html.liquid-glass.dark #settings-view .bg-zinc-900\/30 {
      background: rgba(10, 10, 18, 0.35) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.05) !important;
    }

    /* Log out action button */
    html.liquid-glass #settings-view button[onclick="handleAccountLogOut()"] {
      background: rgba(254, 226, 226, 0.3) !important;
      border: 1.5px solid rgba(239, 68, 68, 0.4) !important;
      color: #ef4444 !important;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #settings-view button[onclick="handleAccountLogOut()"] {
      background: rgba(127, 29, 29, 0.15) !important;
      border-color: rgba(239, 68, 68, 0.25) !important;
      color: #fca5a5 !important;
      box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
    }

    /* Limit progress bar */
    html.liquid-glass #settings-view .bg-slate-200,
    html.liquid-glass #settings-view .dark\:bg-zinc-800 {
      background: rgba(0, 0, 0, 0.08) !important;
    }

    html.liquid-glass.dark #settings-view .bg-slate-200,
    html.liquid-glass.dark #settings-view .dark\:bg-zinc-800 {
      background: rgba(255, 255, 255, 0.08) !important;
    }

    html.liquid-glass #settings-view .bg-slate-500,
    html.liquid-glass #settings-view .dark\:bg-zinc-400 {
      background: linear-gradient(90deg, #38bdf8, #8b5cf6) !important;
    }

    /* Support telegram link button */
    html.liquid-glass #settings-view #support-link-btn {
      background: linear-gradient(135deg, rgba(249, 115, 22, 0.7) 0%, rgba(249, 115, 22, 0.5) 100%) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
      box-shadow: 0 4px 14px rgba(249, 115, 22, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
    }

    /* Model selection hover overrides under Liquid Glass */
    html.liquid-glass #model-dropdown-menu button:hover,
    html.liquid-glass #model-dropdown-menu .other-models-trigger:hover {
      background: rgba(255, 255, 255, 0.3) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.4) !important;
    }

    html.liquid-glass.dark #model-dropdown-menu button:hover,
    html.liquid-glass.dark #model-dropdown-menu .other-models-trigger:hover {
      background: rgba(255, 255, 255, 0.06) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }

    html.liquid-glass #model-dropdown-menu button {
      border-bottom-color: rgba(255, 255, 255, 0.25) !important;
    }

    html.liquid-glass.dark #model-dropdown-menu button {
      border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Inactive send button under Liquid Glass */
    html.liquid-glass #btn-send.send-mode.inactive-send {
      background: rgba(255, 255, 255, 0.2) !important;
      backdrop-filter: blur(12px) !important;
      -webkit-backdrop-filter: blur(12px) !important;
      border: 1px solid rgba(255, 255, 255, 0.4) !important;
      color: rgba(30, 41, 59, 0.4) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.4) !important;
    }

    html.liquid-glass.dark #btn-send.send-mode.inactive-send {
      background: rgba(255, 255, 255, 0.04) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
      color: rgba(255, 255, 255, 0.2) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.04) !important;
    }

    /* Active send button under Liquid Glass (Orange Glass) */
    html.liquid-glass #btn-send.send-mode.active-send {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(249, 115, 22, 0.7) 0%, rgba(249, 115, 22, 0.5) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(25px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      color: #ffffff !important;
      box-shadow:
        0 4px 16px rgba(249, 115, 22, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #btn-send.send-mode.active-send {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(249, 115, 22, 0.7) 0%, rgba(249, 115, 22, 0.5) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      border-color: rgba(255, 255, 255, 0.25) !important;
      box-shadow:
        0 4px 16px rgba(249, 115, 22, 0.25),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.35) !important;
    }

    /* Stop generation mode under Liquid Glass (Red Glass) */
    html.liquid-glass #btn-send.stop-mode {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.08) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(239, 68, 68, 0.7) 0%, rgba(220, 38, 38, 0.5) 100%) !important;
      background-size: 250% 100%, 100% 100% !important;
      animation: lg-glass-shimmer 7s infinite linear !important;
      backdrop-filter: blur(25px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
      border: 1px solid rgba(255, 255, 255, 0.45) !important;
      color: #ffffff !important;
      box-shadow:
        0 4px 16px rgba(239, 68, 68, 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }

    html.liquid-glass.dark #btn-send.stop-mode {
      border-color: rgba(255, 255, 255, 0.25) !important;
      box-shadow:
        0 4px 16px rgba(239, 68, 68, 0.25),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.35) !important;
    }


    /* ===== ПЕРЕМЕННЫЕ АКЦЕНТНЫХ ЦВЕТОВ ===== */
    html {
      --color-accent: #e25615;
      --color-accent-dark: #c2410c;
      --color-accent-glow: rgba(226, 86, 21, 0.25);
      --color-accent-focus-glow: rgba(226, 86, 21, 0.15);
    }

    html.dark {
      --color-accent: #f16e30;
      --color-accent-dark: #ea580c;
      --color-accent-glow: rgba(241, 110, 48, 0.3);
      --color-accent-focus-glow: rgba(241, 110, 48, 0.15);
    }

    html.accent-classic {
      --color-accent: #0f172a;
      --color-accent-dark: #020617;
      --color-accent-glow: rgba(15, 23, 42, 0.15);
      --color-accent-focus-glow: rgba(15, 23, 42, 0.08);
    }

    html.accent-classic.dark {
      --color-accent: #ffffff;
      --color-accent-dark: #f4f4f5;
      --color-accent-glow: rgba(255, 255, 255, 0.15);
      --color-accent-focus-glow: rgba(255, 255, 255, 0.08);
    }

    /* ===== ПРЕМИАЛЬНЫЕ ЭЛАСТИЧНЫЕ АНИМАЦИИ ===== */
    .luxury-transition {
      transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .luxury-transition-slow {
      transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .custom-transition {
      transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
    }

    @keyframes popIn {
      from {
        transform: translate3d(0, 0, 0) scale(0.94);
        opacity: 0;
      }

      to {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
      }
    }

    @keyframes messageAppear {
      from {
        opacity: 0;
        transform: translate3d(0, 16px, 0) scale(0.97);
      }

      to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    @keyframes slideUp {
      from {
        transform: translate3d(0, 100%, 0);
      }

      to {
        transform: translate3d(0, 0, 0);
      }
    }

    @keyframes pulseMic {
      0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
      }

      70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
      }

      100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
      }
    }

    @keyframes bounceDots {

      0%,
      80%,
      100% {
        transform: translate3d(0, 0, 0) scale(0.6);
        opacity: 0.4;
      }

      40% {
        transform: translate3d(0, 0, 0) scale(1);
        opacity: 1;
      }
    }

    @keyframes thinkingRowIn {
      from {
        opacity: 0;
        transform: translate3d(0, 8px, 0);
      }

      to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
      }
    }

    .animate-thinking-row {
      animation: thinkingRowIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .animate-pop {
      animation: popIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .animate-message {
      animation: messageAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .animate-mic {
      animation: pulseMic 1.2s infinite;
    }

    .dot-bounce {
      animation: bounceDots 1.4s infinite ease-in-out both;
    }

    .dot-bounce:nth-child(1) {
      animation-delay: -0.32s;
    }

    .dot-bounce:nth-child(2) {
      animation-delay: -0.16s;
    }

    /* ===== БЛОКИРОВКА СИСТЕМНОГО ОТСКОКА ===== */
    html,
    body {
      overscroll-behavior-y: none;
    }

    #messages-container {
      overscroll-behavior-y: contain;
    }

    /* ===== AMBIENT СВЕЧЕНИЕ ===== */
    #chat-ambient-layer {
      position: fixed;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
      opacity: 0.22;
      transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1);
      z-index: 0;
    }

    .dark #chat-ambient-layer {
      opacity: 0.24;
    }

    html:not(.dark) #chat-ambient-layer {
      opacity: 0.12;
    }

    #chat-ambient-layer.hidden-glow {
      opacity: 0 !important;
    }

    .chat-blob {
      position: absolute;
      border-radius: 50%;
      filter: blur(100px);
      will-change: transform;
      transition: background-color 2.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .chat-blob-1 {
      width: 380px;
      height: 380px;
      top: 10%;
      left: -100px;
      animation: blobFloat1 18s ease-in-out infinite;
    }

    .chat-blob-2 {
      width: 340px;
      height: 340px;
      bottom: 5%;
      right: -80px;
      animation: blobFloat2 22s ease-in-out infinite;
    }

    .chat-blob-3 {
      width: 260px;
      height: 260px;
      top: 45%;
      left: 45%;
      transform: translate(-50%, -50%);
      opacity: 0.4;
      animation: blobFloat3 26s ease-in-out infinite;
    }

    @keyframes blobFloat1 {

      0%,
      100% {
        transform: translate3d(0, 0, 0) scale(1);
      }

      33% {
        transform: translate3d(50px, -30px, 0) scale(1.08);
      }

      66% {
        transform: translate3d(-20px, 40px, 0) scale(0.96);
      }
    }

    @keyframes blobFloat2 {

      0%,
      100% {
        transform: translate3d(0, 0, 0) scale(1);
      }

      50% {
        transform: translate3d(-60px, -50px, 0) scale(1.1);
      }
    }

    @keyframes blobFloat3 {

      0%,
      100% {
        transform: translate3d(-50%, -50%, 0) scale(1);
      }

      50% {
        transform: translate3d(-45%, -52%, 0) scale(1.15);
      }
    }

    @keyframes ambientFloat {

      0%,
      100% {
        transform: translate3d(-50%, 0, 0) scale(1);
      }

      33% {
        transform: translate3d(calc(-50% + 50px), -40px, 0) scale(1.08);
      }

      66% {
        transform: translate3d(calc(-50% - 40px), 30px, 0) scale(0.94);
      }
    }

    #ambient-glow {
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translate3d(-50%, 0, 0);
      width: 750px;
      height: 450px;
      border-radius: 50%;
      filter: blur(140px);
      pointer-events: none;
      z-index: 0;
      opacity: 0.12;
      transition: background-color 2.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
      animation: ambientFloat 35s ease-in-out infinite;
      will-change: transform;
    }

    html:not(.dark) #ambient-glow {
      opacity: 0.05;
    }

    .brand-citrus {
      color: #65a30d;
    }

    .dark .brand-citrus {
      color: #bef264;
    }

    #chat-input-field {
      transition: height 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      min-width: 0;
      width: 100%;
      overflow-wrap: anywhere;
      word-break: break-word;
      white-space: pre-wrap;
    }

    .input-panel-anim,
    .input-panel-anim > div,
    .chat-input-wrap,
    .chat-input-wrap > div,
    #input-active-badges {
      min-width: 0;
      max-width: 100%;
    }

    #input-active-badges {
      overflow-x: auto;
      overflow-y: hidden;
      flex-wrap: nowrap !important;
      scrollbar-width: none;
    }

    #input-active-badges::-webkit-scrollbar { display: none; }
    .input-mode-badge { flex: 0 0 auto; max-width: 100%; }

    #dropdown-parent-node { min-width: 0; max-width: calc(100vw - 132px); }
    #dropdown-parent-node > button:first-child { min-width: 0; max-width: 100%; }
    #header-active-model { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    #model-dropdown-menu { max-width: calc(100vw - 32px); }

    .model-mode-subpanel { min-width: 0; max-width: 100%; }
    .model-mode-subpanel > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .model-mode-selector { min-width: 0; max-width: 100%; }

    @media (max-width: 380px) {
      .model-mode-subpanel { padding-left: 8px !important; padding-right: 8px !important; gap: 6px !important; }
      .model-mode-selector .mode-tab { padding-left: 9px !important; padding-right: 9px !important; }
      #dropdown-parent-node { max-width: calc(100vw - 124px); }
    }

    #model-dropdown-menu {
      display: block !important;
      opacity: 0;
      transform: translateY(-8px) scale(0.96);
      pointer-events: none;
      visibility: hidden;
      transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.16s;
    }

    #model-dropdown-menu.active {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
      visibility: visible;
      transition-delay: 0s;
    }

    .onboard-step {
      transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* ===== MARKDOWN СТИЛИ ===== */
    .md-content p {
      margin-bottom: 0.5rem;
    }

    .md-content p:last-child {
      margin-bottom: 0;
    }

    .md-content h1 {
      font-size: 1.2em;
      font-weight: 700;
      margin: 0.5em 0 0.3em;
    }

    .md-content h2 {
      font-size: 1.1em;
      font-weight: 700;
      margin: 0.45em 0 0.25em;
    }

    .md-content h3 {
      font-size: 1.0em;
      font-weight: 700;
      margin: 0.4em 0 0.2em;
    }

    .md-content h4 {
      font-size: 0.95em;
      font-weight: 700;
      margin: 0.35em 0 0.15em;
    }

    .md-content strong {
      font-weight: 700;
      color: inherit;
    }

    .md-content em {
      font-style: italic;
    }

    .md-content code {
      background: rgba(243, 97, 20, 0.07);
      color: #d84f09;
      padding: 0.15rem 0.35rem;
      border-radius: 0.35rem;
      font-family: 'SF Mono', Consolas, monospace;
      font-size: 0.82em;
      border: 1px solid rgba(243, 97, 20, 0.15);
      display: inline-block;
      vertical-align: middle;
      line-height: 1.2;
    }

    html.dark .md-content code {
      background: rgba(243, 97, 20, 0.11);
      color: #f36114;
      border-color: rgba(243, 97, 20, 0.22);
    }

    .md-content pre {
      background: #0a0a0a;
      border: 1px solid #27272a;
      border-radius: 0.6rem;
      padding: 0.75rem;
      margin: 0.5rem 0;
      overflow-x: auto;
      font-family: 'SF Mono', Consolas, monospace;
      font-size: 0.75rem;
      line-height: 1.5;
    }

    .md-content pre code {
      background: transparent;
      color: #a7f3d0;
      padding: 0;
      font-size: 1em;
    }

    .md-content ul {
      list-style: disc;
      margin-left: 1.25rem;
      margin-top: 0.25rem;
      margin-bottom: 0.5rem;
    }

    .md-content ol {
      list-style: decimal;
      margin-left: 1.25rem;
      margin-top: 0.25rem;
      margin-bottom: 0.5rem;
    }

    .md-content li {
      margin-bottom: 0.15rem;
    }

    .md-content blockquote {
      border-left: 2px solid #a855f7;
      padding-left: 0.75rem;
      margin: 0.5rem 0;
      color: #a1a1aa;
      font-style: italic;
    }

    .md-content a {
      color: #2563eb;
      text-decoration: underline;
    }

    .md-content hr {
      border-color: #27272a;
      margin: 0.75rem 0;
    }

    .md-content .markdown-table-wrap {
      width: 100%;
      margin: 0.8rem 0;
      overflow-x: auto;
      border: 1px solid rgba(148, 163, 184, 0.22);
      border-radius: 10px;
      -webkit-overflow-scrolling: touch;
    }

    .md-content .markdown-table {
      width: 100%;
      min-width: 430px;
      border-collapse: collapse;
      font-size: 0.88em;
      line-height: 1.45;
    }

    .md-content .markdown-table-header,
    .md-content .markdown-table-cell {
      padding: 0.55rem 0.7rem;
      text-align: left;
      vertical-align: top;
    }

    .md-content .markdown-table-header {
      color: #334155;
      background: rgba(248, 250, 252, 0.92);
      font-weight: 700;
      white-space: nowrap;
    }

    .md-content .markdown-table-row {
      border-top: 1px solid rgba(148, 163, 184, 0.16);
    }

    html.dark .md-content .markdown-table-wrap {
      border-color: rgba(255, 255, 255, 0.1);
    }

    html.dark .md-content .markdown-table-header {
      color: #e4e4e7;
      background: rgba(39, 39, 42, 0.72);
    }

    html.dark .md-content .markdown-table-row {
      border-top-color: rgba(255, 255, 255, 0.08);
    }

    /* ===== СВЕРНУТЫЙ ХОД МЫСЛЕЙ (ACCORDION) ===== */
    .md-content details.thought-block {
      border-left: 2px solid rgba(148, 163, 184, 0.25);
      padding-left: 0.75rem;
      margin: 0.75rem 0;
    }
    
    html.dark .md-content details.thought-block {
      border-left-color: rgba(63, 63, 70, 0.4);
    }
    
    .md-content details.thought-block summary {
      list-style: none;
      outline: none;
    }
    
    .md-content details.thought-block summary::-webkit-details-marker {
      display: none;
    }

    /* ===== УЛУЧШЕННЫЙ ИНДИКАТОР "ДУМАНИЯ" ===== */
    @keyframes pulseThinkingGlow {

      0%,
      100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.3);
        opacity: 1;
      }

      50% {
        box-shadow: 0 0 12px 4px rgba(168, 85, 247, 0.15);
        opacity: 0.92;
      }
    }

    @keyframes iconSpin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    @keyframes shimmerText {
      0% {
        background-position: -200% center;
      }

      100% {
        background-position: 200% center;
      }
    }

    .thinking-indicator {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 14px;
      background: #ffffff;
      border: 1px solid rgba(161, 161, 170, 0.2);
      border-radius: 18px 18px 18px 4px;
      max-width: 85%;
      box-sizing: border-box;
      transition: background-color 0.3s, border-color 0.3s;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    }

    .dark .thinking-indicator {
      background: #09090b;
      border-color: rgba(255, 255, 255, 0.18);
      box-shadow: none;
    }

    @keyframes slideDownPanel {
      from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
        max-height: 0;
        margin-top: 0;
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 48px;
        margin-top: 8px;
      }
    }

    @keyframes slideUpPanel {
      from {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 48px;
        margin-top: 8px;
      }
      to {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
        max-height: 0;
        margin-top: 0;
      }
    }

    .user-msg-actions-panel {
      max-width: 100%;
      animation: slideDownPanel 0.34s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      overflow: hidden;
      transform-origin: top right;
      transition: max-height 0.34s cubic-bezier(0.16, 1, 0.3, 1), margin-top 0.34s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .user-msg-actions-panel.closing {
      animation: slideUpPanel 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .thinking-icon {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      background: #f8fafc;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      padding: 4px;
      border: 1px solid #e2e8f0;
    }

    .dark .thinking-icon {
      background: #18181b;
      border-color: #27272a;
    }

    .thinking-icon img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .thinking-info {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
      flex: 1;
      overflow: hidden;
    }

    .thinking-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--color-accent);
    }

    .thinking-sub {
      font-size: 11px;
      color: #64748b;
      font-weight: 400;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .dark .thinking-sub {
      color: #94a3b8;
    }

    .thinking-meta-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 2px;
    }

    .thinking-dots {
      display: flex;
      gap: 4px;
      flex-shrink: 0;
    }

    .thinking-dots span {
      width: 5px;
      height: 5px;
      background: var(--color-accent);
      border-radius: 50%;
      animation: bounceDots 1.4s infinite ease-in-out both;
    }

    .thinking-dots span:nth-child(1) {
      animation-delay: -0.32s;
    }

    .thinking-dots span:nth-child(2) {
      animation-delay: -0.16s;
    }

    .thinking-tokens {
      font-size: 10px;
      color: #64748b;
      font-weight: 500;
      font-variant-numeric: tabular-nums;
      background: rgba(100, 116, 139, 0.08);
      padding: 2px 6px;
      border-radius: 6px;
      white-space: nowrap;
    }

    .dark .thinking-tokens {
      color: #94a3b8;
      background: rgba(148, 163, 184, 0.1);
    }

    /* ===== ГРУППИРОВКА ИСТОРИИ ЧАТОВ ===== */
    .history-group-label {
      padding: 10px 14px 6px;
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: #a1a1aa;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .history-group-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, rgba(161, 161, 170, 0.25), transparent);
    }

    .history-item {
      padding: 10px 12px;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 2px 4px;
      position: relative;
      border: 1px solid transparent;
    }

    .history-item::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 12px;
      right: 12px;
      height: 1px;
      background-color: rgba(161, 161, 170, 0.08);
      transition: opacity 0.2s ease;
    }

    .dark .history-item::after {
      background-color: rgba(255, 255, 255, 0.04);
    }

    .history-item:hover::after,
    .history-item-active::after {
      opacity: 0;
    }

    .history-item:hover {
      background: rgba(113, 113, 122, 0.08);
      border-color: rgba(113, 113, 122, 0.15);
      transform: translateX(2px);
    }

    .dark .history-item:hover {
      background: rgba(255, 255, 255, 0.04);
      border-color: rgba(255, 255, 255, 0.08);
    }

    .history-item-active {
      background: linear-gradient(90deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
      border-left: 3px solid #a855f7 !important;
      padding-left: 9px !important;
      border-color: rgba(168, 85, 247, 0.3) !important;
      box-shadow: 0 2px 8px rgba(168, 85, 247, 0.1);
    }

    .history-model-icon {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(37, 99, 235, 0.12));
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      padding: 5px;
      border: 1px solid rgba(168, 85, 247, 0.1);
    }

    .history-model-icon img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }

    .history-image-studio-icon {
      color: var(--color-accent);
      background: color-mix(in srgb, var(--color-accent) 12%, transparent);
      border-color: color-mix(in srgb, var(--color-accent) 20%, transparent);
      font-size: 12px;
    }

    .history-divider {
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(161, 161, 170, 0.15), transparent);
      margin: 10px 16px 4px;
    }

    .history-empty {
      text-align: center;
      padding: 40px 20px;
      color: #71717a;
    }

    .history-empty i {
      font-size: 32px;
      opacity: 0.3;
      margin-bottom: 12px;
      display: block;
    }

    .history-delete-btn {
      opacity: 0;
      transition: all 0.2s;
      padding: 6px;
      border-radius: 6px;
      color: #ef4444;
      flex-shrink: 0;
    }

    .history-item:hover .history-delete-btn {
      opacity: 1;
    }

    .history-delete-btn:hover {
      background: rgba(239, 68, 68, 0.1);
    }

    .history-item-meta {
      font-size: 10px;
      color: #a1a1aa;
      margin-top: 1px;
    }

    .image-library-entry { display: flex; width: 100%; align-items: center; gap: 10px; margin-top: 9px; padding: 10px 11px; border: 1px solid rgba(148,163,184,.22); border-radius: 12px; color: #334155; background: rgba(248,250,252,.72); text-align: left; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
    .image-library-entry:active { transform: scale(.985); }
    .dark .image-library-entry { border-color: rgba(255,255,255,.08); color: #e4e4e7; background: rgba(39,39,42,.48); }
    .image-library-entry-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 8px; color: #fff; background: var(--color-accent); font-size: 12px; }
    html.accent-classic.dark .image-library-entry-icon { color: #18181b; }
    .image-library-entry-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
    .image-library-entry-copy strong { overflow: hidden; font-size: 12px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
    .image-library-entry-copy small { color: #94a3b8; font-size: 9px; }
    .image-library-entry-count { min-width: 22px; padding: 3px 6px; border-radius: 999px; color: #64748b; background: rgba(148,163,184,.12); font-size: 9px; font-weight: 750; text-align: center; }
    .dark .image-library-entry-count { color: #a1a1aa; background: rgba(255,255,255,.06); }
    .image-library-entry-arrow { color: #94a3b8; font-size: 9px; }

    .composer-attachment { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr) 30px; align-items: center; gap: 9px; width: calc(100% - 4px); margin: 8px 2px 1px; padding: 7px; border: 1px solid rgba(148,163,184,.2); border-radius: 12px; background: rgba(248,250,252,.8); }
    .composer-attachment.hidden { display: none !important; }
    .dark .composer-attachment { border-color: rgba(255,255,255,.08); background: rgba(39,39,42,.55); }
    .composer-attachment.is-image { display: block; width: 76px; height: 76px; margin: 10px 3px 3px; padding: 0; overflow: visible; border: 0; border-radius: 13px; background: transparent; }
    .dark .composer-attachment.is-image { border: 0; background: transparent; }
    .composer-attachment-thumb { position: relative; display: grid; width: 48px; height: 48px; overflow: hidden; place-items: center; border-radius: 8px; color: #64748b; background: #e2e8f0; }
    .composer-attachment.is-image .composer-attachment-thumb { width: 76px; height: 76px; border: 1px solid rgba(148,163,184,.24); border-radius: 13px; background: #e2e8f0; box-shadow: 0 2px 8px rgba(15,23,42,.08); cursor: zoom-in; }
    .dark .composer-attachment.is-image .composer-attachment-thumb { border-color: rgba(255,255,255,.12); box-shadow: 0 3px 12px rgba(0,0,0,.25); }
    .dark .composer-attachment-thumb { color: #a1a1aa; background: #27272a; }
    .composer-attachment-thumb:disabled { cursor: default; }
    .composer-attachment-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .composer-attachment-thumb i { font-size: 17px; }
    .composer-attachment-copy { display: flex; min-width: 0; flex-direction: column; }
    .composer-attachment-copy strong { overflow: hidden; color: #334155; font-size: 11px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
    .dark .composer-attachment-copy strong { color: #e4e4e7; }
    .composer-attachment-copy span { overflow: hidden; margin-top: 2px; color: #94a3b8; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
    .composer-attachment.is-image .composer-attachment-copy { display: none; }
    .composer-attachment-remove { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; color: #94a3b8; background: rgba(148,163,184,.1); font-size: 10px; }
    .composer-attachment.is-image .composer-attachment-remove { position: absolute; z-index: 3; top: -7px; right: -7px; width: 23px; height: 23px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #27272a; box-shadow: 0 2px 7px rgba(15,23,42,.25); font-size: 9px; }
    .dark .composer-attachment.is-image .composer-attachment-remove { border-color: #18181b; color: #18181b; background: #f4f4f5; }
    .composer-attachment-remove:active { transform: scale(.92); }
    .user-msg-bubble { overflow: hidden; }
    .user-msg-bubble.has-image-attachment { padding: 5px; border-radius: 15px 15px 6px 15px; }
    .user-message-media { display: block; width: min(280px, 70vw); max-width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: rgba(15,23,42,.08); cursor: zoom-in; }
    .user-message-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
    .user-message-file-list { display: flex; max-width: min(280px, 70vw); margin: 4px 7px 2px; padding: 7px 9px; overflow-wrap: anywhere; color: #475569; background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.18); border-radius: 9px; font-size: 10px; font-weight: 650; line-height: 1.35; }
    .dark .user-message-file-list { color: #d4d4d8; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
    .user-message-text { display: block; padding: 0; white-space: pre-wrap; }
    .has-image-attachment .user-message-text { padding: 7px 7px 4px; }

    /* ===== КНОПКА ОСТАНОВКИ ГЕНЕРАЦИИ ===== */
    #btn-send.send-mode {
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #btn-send.send-mode.inactive-send {
      background: #f1f5f9;
      color: #94a3b8;
      box-shadow: none;
      cursor: default;
    }

    .dark #btn-send.send-mode.inactive-send {
      background: rgba(39, 39, 42, 0.4);
      color: #52525b;
      box-shadow: none;
    }

    #btn-send.send-mode.active-send {
      background: var(--color-accent);
      color: #ffffff;
      box-shadow: 0 2px 8px var(--color-accent-glow);
      cursor: pointer;
    }

    .dark #btn-send.send-mode.active-send {
      background: var(--color-accent);
      color: #ffffff;
      box-shadow: 0 2px 10px var(--color-accent-glow);
    }

    #btn-send.send-mode.active-send:hover {
      background: var(--color-accent-dark);
    }

    .dark #btn-send.send-mode.active-send:hover {
      background: var(--color-accent-dark);
    }

    html.accent-classic.dark #btn-send.send-mode.active-send {
      color: #09090b !important;
    }

    #btn-send.stop-mode {
      background: #ef4444;
      color: #ffffff;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    }

    #btn-send.stop-mode:hover {
      background: #dc2626;
    }

    #btn-send i {
      transition: transform 0.3s;
    }

    #btn-send.stop-mode i {
      transform: scale(1.1);
    }

    #btn-send.stop-mode .stop-icon {
      width: 12px;
      height: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      line-height: 1;
      transform: none;
    }

    html #btn-send.stop-mode,
    html.dark #btn-send.stop-mode,
    html.dark.gray #btn-send.stop-mode,
    html.liquid-glass #btn-send.stop-mode,
    html.liquid-glass.dark #btn-send.stop-mode,
    html.liquid-glass.dark.gray #btn-send.stop-mode {
      background: #71717a !important;
      color: #ffffff !important;
      border-color: #71717a !important;
      box-shadow: 0 2px 8px rgba(63, 63, 70, 0.2) !important;
    }
    html #btn-send.stop-mode:hover,
    html.dark #btn-send.stop-mode:hover,
    html.dark.gray #btn-send.stop-mode:hover,
    html.liquid-glass #btn-send.stop-mode:hover,
    html.liquid-glass.dark #btn-send.stop-mode:hover,
    html.liquid-glass.dark.gray #btn-send.stop-mode:hover {
      background: #52525b !important;
      border-color: #52525b !important;
    }

    /* ===== ГЛОБАЛЬНЫЕ ПЛАВНЫЕ АНИМАЦИИ ===== */

    /* Появление приложения */
    @keyframes appFadeIn {
      from {
        opacity: 0;
      }

      to {
        opacity: 1;
      }
    }

    body {
      animation: appFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
/* Хедер сверху */
    @keyframes headerSlideDown {
      from {
        transform: translateY(-56px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .app-header-anim {
      animation: headerSlideDown 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
    }

    /* Инпут-бар снизу */
    @keyframes inputPanelUp {
      from {
        transform: translateY(52px);
        opacity: 0;
      }

      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .input-panel-anim {
      animation: inputPanelUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
    }

    /* Пузырь пользователя — справа */
    @keyframes userBubbleIn {
      from {
        opacity: 0;
        transform: translate3d(28px, 0, 0) scale(0.93);
      }

      to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    .animate-user-msg {
      animation: userBubbleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Пузырь бота — слева */
    @keyframes botBubbleIn {
      from {
        opacity: 0;
        transform: translate3d(-28px, 0, 0) scale(0.93);
      }

      to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    .animate-bot-msg {
      animation: botBubbleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Пустой экран */
    @keyframes emptyStateReveal {
      from {
        opacity: 0;
        transform: translate3d(0, 14px, 0) scale(0.96);
      }

      to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
      }
    }

    #empty-state-block {
      animation: emptyStateReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
    }

    #empty-state-block>* {
      max-width: 100%;
      overflow-wrap: break-word;
      word-wrap: break-word;
    }

    /* Плавная смена темы */
    .theme-transitioning body,
    .theme-transitioning #app-main-header,
    .theme-transitioning #sidebar,
    .theme-transitioning #settings-view {
      transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease !important;
    }

    /* Универсальная реакция кнопок на нажатие */
    button {
      transition:
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.22s ease,
        background-color 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.38s ease,
        color 0.38s ease;
    }

    button:active:not(:disabled) {
      transform: scale(0.91) !important;
    }

    /* Кнопка отправки */
    #btn-send {
      transition:
        background 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s ease !important;
    }

    /* Поле ввода — свечение при фокусе */
    .chat-input-wrap {
      transition: box-shadow 0.48s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.48s ease;
    }

    .chat-input-wrap:focus-within {
      border-color: var(--color-accent) !important;
      box-shadow: 0 0 0 1px var(--color-accent), 0 0 0 4px var(--color-accent-focus-glow);
    }

    .dark .chat-input-wrap:focus-within {
      border-color: var(--color-accent) !important;
      box-shadow: 0 0 0 1px var(--color-accent), 0 0 0 4px var(--color-accent-focus-glow);
    }

    /* Тост */
    #toast {
      transition:
        opacity 0.52s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.52s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Kept interactive so tapping the unavailable option can explain why. */
    .ui-style-option-locked {
      cursor: pointer;
      color: #94a3b8 !important;
      border: 1px solid rgba(148, 163, 184, 0.28) !important;
      background: rgba(148, 163, 184, 0.08) !important;
      opacity: 0.78;
    }

    .dark .ui-style-option-locked {
      color: #71717a !important;
      border-color: rgba(113, 113, 122, 0.34) !important;
      background: rgba(113, 113, 122, 0.1) !important;
    }

    .ui-style-option-locked:hover {
      color: #64748b !important;
      background: rgba(148, 163, 184, 0.14) !important;
    }

    .ui-style-option-locked-badge {
      padding: 2px 5px;
      border: 1px solid currentColor;
      border-radius: 999px;
      font-size: 7px;
      font-weight: 800;
      letter-spacing: 0.06em;
      line-height: 1;
      text-transform: uppercase;
    }

    .image-download-progress {
      position: fixed; z-index: 145; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px));
      width: min(calc(100% - 28px), 390px); padding: 12px 13px 11px;
      border: 1px solid rgba(148, 163, 184, 0.25); border-radius: 17px;
      background: rgba(255, 255, 255, 0.96); box-shadow: 0 16px 44px rgba(15, 23, 42, 0.16);
      opacity: 0; pointer-events: none; transform: translate(-50%, 14px) scale(0.98);
      transition: opacity 0.24s ease, transform 0.36s cubic-bezier(0.16, 1, 0.3, 1); backdrop-filter: blur(18px);
    }
    .dark .image-download-progress { border-color: rgba(255,255,255,.1); background: rgba(24,24,27,.96); box-shadow: 0 18px 48px rgba(0,0,0,.4); }
    .image-download-progress.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) scale(1); }
    .image-download-progress-head { display: flex; align-items: center; gap: 10px; }
    .image-download-progress-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border-radius: 11px; color: var(--color-accent, #df562c); background: color-mix(in srgb, var(--color-accent, #df562c) 12%, transparent); font-size: 12px; }
    .image-download-progress-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 1px; }
    .image-download-progress-copy strong { color: #18181b; font-size: 12px; font-weight: 700; }
    .image-download-progress-copy span { overflow: hidden; color: #71717a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .dark .image-download-progress-copy strong { color: #f4f4f5; }
    .dark .image-download-progress-copy span { color: #a1a1aa; }
    .image-download-progress-value { color: #52525b; font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; }
    .dark .image-download-progress-value { color: #d4d4d8; }
    .image-download-progress-cancel { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border: 0; border-radius: 9px; color: #71717a; background: rgba(148,163,184,.12); cursor: pointer; font-size: 11px; transition: color .18s ease, background .18s ease, transform .15s ease; }
    .image-download-progress-cancel:hover { color: #dc2626; background: rgba(239,68,68,.12); }
    .image-download-progress-cancel:active { transform: scale(.92); }
    .image-download-progress-cancel:disabled { opacity: .55; pointer-events: none; }
    .image-download-progress.is-success .image-download-progress-cancel, .image-download-progress.is-error .image-download-progress-cancel, .image-download-progress.is-cancelled .image-download-progress-cancel { display: none; }
    .image-download-progress-track { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,.2); }
    .image-download-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--color-accent, #df562c); transition: width .32s cubic-bezier(.16,1,.3,1); }
    .image-download-progress.is-success .image-download-progress-icon { color: #16a34a; background: rgba(34,197,94,.12); }
    .image-download-progress.is-success .image-download-progress-track span { background: #22c55e; }
    .image-download-progress.is-error .image-download-progress-icon { color: #dc2626; background: rgba(239,68,68,.12); }
    .image-download-progress.is-error .image-download-progress-track span { background: #ef4444; }

    /* Медиа-дровер */
    #media-drawer-panel {
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transform: translateY(10px) scale(0.985);
      transition:
        transform 0.62s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.36s ease,
        visibility 0s linear 0.36s;
    }

    #media-drawer-panel.drawer-open {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0) scale(1);
      transition-delay: 0s;
    }

    /* Превью файла */
    #attachment-preview-node {
      transition: all 0.55s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Дропдаун моделей */
    #model-dropdown-menu {
      transition:
        opacity 0.52s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.52s !important;
    }

    /* Элементы истории */
    .history-item {
      transition: all 0.42s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Custom bookmark tag dropdown positioning & styling */
    .dropdown-bookmark-tag {
      opacity: 0;
      transform: translateY(4px) scale(0.95);
      pointer-events: none;
      transition: opacity 0.34s cubic-bezier(0.16, 1, 0.3, 1), transform 0.34s cubic-bezier(0.16, 1, 0.3, 1) !important;
      display: none;
    }
    .dropdown-bookmark-tag.active {
      display: flex !important;
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }

    /* Кнопки шаблонов */
    #empty-state-block button {
      transition:
        transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.38s ease,
        box-shadow 0.38s ease !important;
    }

    #empty-state-block button:hover {
      transform: translateY(-2px) scale(1.02);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    #empty-state-block button:active {
      transform: scale(0.96) !important;
    }

    /* Иконка модели в центре — плавная смена */
    #center-ai-badge {
      transition: all 0.58s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #center-ai-badge img {
      transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* ===== DEVELOPER LABEL ===== */
    @keyframes devGlowIn {
      from {
        opacity: 0;
        filter: brightness(2.5);
      }

      60% {
        opacity: 0.65;
        filter: brightness(1.6);
      }

      to {
        opacity: 0.55;
        filter: brightness(1);
      }
    }

    .dev-label-anim {
      animation: devGlowIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    #header-dev-label {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      opacity: 1;
      transition: all 0.5s ease;
      white-space: nowrap;
      padding: 3px 8px;
      border-radius: 6px;
      background: #f1f5f9;
      border: 1px solid #cbd5e1;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
      margin-left: 8px;
    }

    .dark #header-dev-label {
      background: #18181b;
      border-color: #27272a;
    }

    /* ===== SMOOTH EXPAND/COLLAPSE ===== */
    #extra-models {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
      opacity: 0;
    }

    #extra-models.expanded {
      max-height: none;
      overflow: visible;
      opacity: 1;
    }

    .other-models-trigger {
      cursor: pointer;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }

    .other-models-trigger i {
      transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .other-models-trigger.open i {
      transform: rotate(180deg);
    }

    /* ===== DROPDOWN SMOOTH OPEN ===== */
    #model-dropdown-menu {
      display: none;
      opacity: 0;
      transform: translateY(-8px) scale(0.97);
      transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #model-dropdown-menu.active {
      display: block;
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    /* ===== iOS-LIKE BUTTON PRESS ===== */
    #model-dropdown-menu button {
      transition: background-color 0.2s ease, transform 0.15s ease;
      -webkit-tap-highlight-color: transparent;
    }

    #model-dropdown-menu button:active {
      transform: scale(0.97);
      background-color: rgba(0, 0, 0, 0.04);
    }

    .dark #model-dropdown-menu button:active {
      background-color: rgba(255, 255, 255, 0.06);
    }

    /* ===== SMOOTH SCROLLBAR FOR DROPDOWN ===== */
    #model-dropdown-menu {
      max-height: min(70vh, calc(var(--app-height, 100dvh) - 5rem - var(--safe-top)));
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    /* ===== CUSTOM MODAL STYLE ===== */
    #custom-modal-overlay,
    #tag-picker-overlay {
      will-change: opacity;
      transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
 
    #custom-modal-box,
    #tag-picker-box {
      will-change: opacity, transform;
      transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
 
    .liquid-glass #custom-modal-box,
    .liquid-glass #tag-picker-box {
      background: rgba(255, 255, 255, 0.82) !important;
      backdrop-filter: blur(30px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
      border-color: rgba(255, 255, 255, 0.6) !important;
      box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.08) !important;
    }
 
    .liquid-glass.dark #custom-modal-box,
    .liquid-glass.dark #tag-picker-box {
      background: rgba(25, 25, 30, 0.75) !important;
      backdrop-filter: blur(30px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.35) !important;
    }

    /* Primary buttons inside modals in Liquid Glass */
    html.liquid-glass #custom-modal-btn-ok,
    html.liquid-glass #tag-picker-btn-close {
      background: rgba(255, 255, 255, 0.8) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
      color: #0f172a !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 0 0 rgba(255, 255, 255, 0.6) !important;
    }
    html.liquid-glass.dark #custom-modal-btn-ok,
    html.liquid-glass.dark #tag-picker-btn-close {
      background: rgba(255, 255, 255, 0.15) !important;
      border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
      color: #ffffff !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }
    
    /* Hover/active states */
    html.liquid-glass #custom-modal-btn-ok:hover,
    html.liquid-glass #tag-picker-btn-close:hover {
      background: rgba(255, 255, 255, 0.95) !important;
    }
    html.liquid-glass.dark #custom-modal-btn-ok:hover,
    html.liquid-glass.dark #tag-picker-btn-close:hover {
      background: rgba(255, 255, 255, 0.22) !important;
    }

    /* ===== Tag Picker Modal Items ===== */
    .tag-picker-item {
      background: #f8fafc;
      border-color: #e2e8f0;
      color: #334155;
    }
    .tag-picker-item:hover {
      background: #f1f5f9;
    }
    .dark .tag-picker-item {
      background: rgba(39, 39, 42, 0.4);
      border-color: rgba(63, 63, 70, 0.5);
      color: #e4e4e7;
    }
    .dark .tag-picker-item:hover {
      background: rgba(63, 63, 70, 0.4);
    }

    /* Selected state */
    .tag-picker-item.tag-selected {
      background: rgba(249, 115, 22, 0.05) !important;
      border-color: rgba(249, 115, 22, 0.4) !important;
      color: #ea580c !important;
    }
    .dark .tag-picker-item.tag-selected {
      background: rgba(249, 115, 22, 0.1) !important;
      border-color: rgba(249, 115, 22, 0.5) !important;
      color: #fdba74 !important;
    }

    /* Liquid Glass Overrides */
    html.liquid-glass .tag-picker-item {
      background: rgba(255, 255, 255, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.45) !important;
      color: #0f172a !important;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01), inset 0 1px 0 0 rgba(255, 255, 255, 0.5) !important;
    }
    html.liquid-glass .tag-picker-item:hover {
      background: rgba(255, 255, 255, 0.5) !important;
    }
    html.liquid-glass.dark .tag-picker-item {
      background: rgba(255, 255, 255, 0.05) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      color: #f4f4f5 !important;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    }
    html.liquid-glass.dark .tag-picker-item:hover {
      background: rgba(255, 255, 255, 0.08) !important;
    }

    /* Selected state in Liquid Glass */
    html.liquid-glass .tag-picker-item.tag-selected {
      background: rgba(255, 247, 237, 0.6) !important;
      border-color: rgba(249, 115, 22, 0.5) !important;
      color: #c2410c !important;
    }
    html.liquid-glass.dark .tag-picker-item.tag-selected {
      background: rgba(249, 115, 22, 0.15) !important;
      border-color: rgba(249, 115, 22, 0.6) !important;
      color: #fdba74 !important;
    }

    /* ============================================
       GREY THEME — Neutral Charcoal Palette
       Level 0 (deepest):  #1e1e1e  — body, settings bg
       Level 1 (cards):    #282828  — sidebar, cards, md-content
       Level 2 (controls): #323232  — inputs, buttons, selectors
       Level 3 (active):   #3c3c3c  — active state buttons
       Borders:            #3a3a3a  — subtle separation
       ============================================ */

    /* --- L0: Body & full-screen backgrounds --- */
    html.dark.gray body,
    html.dark.gray .bg-darkBg,
    html.dark.gray .bg-black,
    html.dark.gray .bg-zinc-950 {
      background: #1e1e1e !important;
      background-color: #1e1e1e !important;
    }

    /* --- L0: Settings full panel --- */
    html.dark.gray #settings-view {
      background: #1e1e1e !important;
      background-color: #1e1e1e !important;
    }
    html.dark.gray #settings-view > div:first-child {
      background: #282828 !important;
      border-bottom: 1px solid #3a3a3a !important;
    }
    html.dark.gray #settings-tabs-shell {
      background: #232323 !important;
      background-color: #232323 !important;
      border-bottom-color: #3a3a3a !important;
    }
    html.dark.gray #settings-tabs-switcher {
      background: #303030 !important;
      background-color: #303030 !important;
      border: 1px solid #404040 !important;
    }

    /* --- L1: Cards, sidebar, panels, answer bubbles, dropdowns --- */
    html.dark.gray .bg-darkCard,
    html.dark.gray .bg-lightCard,
    html.dark.gray .bg-darkDropdown,
    html.dark.gray .bg-zinc-900,
    html.dark.gray .bg-zinc-900\/60,
    html.dark.gray .bg-zinc-900\/40,
    html.dark.gray .bg-zinc-900\/80 {
      background: #282828 !important;
      background-color: #282828 !important;
    }
    /* Model dropdown and media drawer explicit overrides */
    html.dark.gray #model-dropdown-menu,
    html.dark.gray #media-drawer-panel {
      background: #282828 !important;
      background-color: #282828 !important;
      border-color: #3a3a3a !important;
    }
    html.dark.gray #sidebar {
      background: #232323 !important;
      background-color: #232323 !important;
    }
    html.dark.gray #sidebar > div:first-child,
    html.dark.gray #sidebar > div:nth-child(2),
    html.dark.gray #sidebar > div:nth-child(3),
    html.dark.gray #sidebar > div:nth-child(4) {
      background: #232323 !important;
      background-color: #232323 !important;
    }
    html.dark.gray #app-main-header,
    html.dark.gray .app-header-anim {
      background: rgba(35, 35, 35, 0.96) !important;
      background-color: #232323 !important;
      border-bottom-color: #3a3a3a !important;
    }
    html.dark.gray #dropdown-parent-node > button,
    html.dark.gray #btn-sidebar-trigger,
    html.dark.gray #app-main-header button[onclick="startFreshSession()"] {
      background: #303030 !important;
      background-color: #303030 !important;
      border-color: #424242 !important;
    }
    html.dark.gray .chat-group-row div.md-content {
      background: #282828 !important;
      background-color: #282828 !important;
      border-color: #3a3a3a !important;
    }

    /* --- L2: Inputs, controls, selectors --- */
    html.dark.gray .bg-darkInput,
    html.dark.gray .bg-zinc-800,
    html.dark.gray .bg-zinc-800\/60,
    html.dark.gray .bg-zinc-800\/80 {
      background: #323232 !important;
      background-color: #323232 !important;
    }
    html.dark.gray #chat-input-container {
      background: #282828 !important;
      background-color: #282828 !important;
      border-color: #3a3a3a !important;
    }
    html.dark.gray #chat-input-field {
      background: transparent !important;
    }

    /* Settings selectors: theme, font, accent, UI style, language */
    html.dark.gray #settings-tab-content-general .bg-slate-100,
    html.dark.gray #settings-tab-content-general .dark\:bg-zinc-900\/60,
    html.dark.gray div.flex.bg-slate-100.dark\:bg-zinc-900\/60 {
      background: #282828 !important;
      background-color: #282828 !important;
      border: 1px solid #3a3a3a !important;
      border-radius: 12px !important;
    }

    /* Settings tab switcher container (Общие / Аккаунт / Справка) */
    html.dark.gray .px-4.py-3 > div.flex.bg-slate-100 {
      background: #282828 !important;
      background-color: #282828 !important;
      border: 1px solid #3a3a3a !important;
    }

    /* Inactive toggle buttons inside selectors */
    html.dark.gray #theme-light-btn,
    html.dark.gray #theme-gray-btn,
    html.dark.gray #theme-dark-btn,
    html.dark.gray #settings-tab-btn-general,
    html.dark.gray #settings-tab-btn-account,
    html.dark.gray #settings-tab-btn-help {
      background: transparent !important;
      background-color: transparent !important;
      border-color: transparent !important;
      color: #999999 !important;
    }

    /* Dropdown (model selection) */
    html.dark.gray #dropdown-parent-node div.absolute {
      background: #282828 !important;
      background-color: #282828 !important;
      border-color: #3a3a3a !important;
    }

    /* --- L3: Active state buttons --- */
    html.dark.gray #theme-light-btn.shadow-sm,
    html.dark.gray #theme-gray-btn.shadow-sm,
    html.dark.gray #theme-dark-btn.shadow-sm,
    html.dark.gray #settings-tab-btn-general.shadow-sm,
    html.dark.gray #settings-tab-btn-account.shadow-sm,
    html.dark.gray #settings-tab-btn-help.shadow-sm {
      background: #3c3c3c !important;
      background-color: #3c3c3c !important;
      border-color: #4a4a4a !important;
      color: #ffffff !important;
      box-shadow: 0 1px 3px rgba(0,0,0,0.25) !important;
    }

    /* Font size buttons */
    html.dark.gray [id^="font-size-btn-"] {
      background: transparent !important;
      color: #999999 !important;
      border-color: transparent !important;
    }
    html.dark.gray [id^="font-size-btn-"].shadow-sm {
      background: #3c3c3c !important;
      color: #ffffff !important;
      border-color: #4a4a4a !important;
      box-shadow: 0 1px 3px rgba(0,0,0,0.25) !important;
    }

    /* Accent style and UI style buttons */
    html.dark.gray [id^="accent-btn-"] {
      background: transparent !important;
      color: #999999 !important;
      border-color: transparent !important;
    }
    html.dark.gray [id^="accent-btn-"].shadow-sm {
      background: #3c3c3c !important;
      color: #ffffff !important;
      border-color: #4a4a4a !important;
    }
    html.dark.gray [id^="ui-style-btn-"] {
      background: transparent !important;
      color: #999999 !important;
      border-color: transparent !important;
    }
    html.dark.gray [id^="ui-style-btn-"].shadow-sm {
      background: #3c3c3c !important;
      color: #ffffff !important;
      border-color: #4a4a4a !important;
    }

    /* Language buttons */
    html.dark.gray [id^="lang-btn-"] {
      background: transparent !important;
      color: #999999 !important;
      border-color: transparent !important;
    }
    html.dark.gray [id^="lang-btn-"].shadow-sm {
      background: #3c3c3c !important;
      color: #ffffff !important;
      border-color: #4a4a4a !important;
    }

    /* --- Borders: Only specific structural borders --- */
    html.dark.gray header,
    html.dark.gray .app-header-anim {
      border-color: #3a3a3a !important;
    }
    html.dark.gray .border-zinc-800,
    html.dark.gray .border-zinc-900,
    html.dark.gray .border-zinc-800\/80,
    html.dark.gray .border-zinc-800\/60,
    html.dark.gray .border-zinc-700\/80,
    html.dark.gray .border-zinc-700\/50 {
      border-color: #3a3a3a !important;
    }
    html.dark.gray .border-slate-200\/80,
    html.dark.gray .border-slate-200\/90,
    html.dark.gray .border-slate-200,
    html.dark.gray .border-slate-100 {
      border-color: #3a3a3a !important;
    }
    /* Settings tab divider border */
    html.dark.gray .px-4.py-3.border-b {
      border-color: #3a3a3a !important;
    }
    /* Settings hr separators */
    html.dark.gray #settings-tab-content-general hr,
    html.dark.gray #settings-tab-content-account hr,
    html.dark.gray #settings-tab-content-help hr {
      border-color: #3a3a3a !important;
    }

    /* --- Scrollbars --- */
    html.dark.gray ::-webkit-scrollbar-thumb {
      background-color: #4a4a4a !important;
    }
    html.dark.gray ::-webkit-scrollbar-track {
      background-color: #1e1e1e !important;
    }

    /* --- Sidebar specifics --- */
    html.dark.gray .sb-tabs-container {
      background: #1e1e1e !important;
      background-color: #1e1e1e !important;
      border-color: #3a3a3a !important;
    }
    html.dark.gray .sb-tab-btn {
      background: transparent !important;
      border-color: transparent !important;
      color: #888888 !important;
    }
    html.dark.gray .sb-tab-btn.active {
      background: #323232 !important;
      background-color: #323232 !important;
      border-color: #3a3a3a !important;
      color: #ffffff !important;
    }
    html.dark.gray .history-search-wrapper,
    html.dark.gray #history-search {
      background: #282828 !important;
      background-color: #282828 !important;
      border-color: #3a3a3a !important;
    }
    /* New Chat button in sidebar */
    html.dark.gray #sidebar button.bg-white,
    html.dark.gray #sidebar button.dark\:bg-zinc-900\/60 {
      background: #282828 !important;
      border-color: #3a3a3a !important;
    }
    /* Sidebar bottom profile panel */
    html.dark.gray #sidebar > div:last-child {
      background: #232323 !important;
      background-color: #232323 !important;
      border-top-color: #3a3a3a !important;
    }
    /* Sidebar settings gear button */
    html.dark.gray #btn-sidebar-settings {
      background: #323232 !important;
      border-color: #3a3a3a !important;
    }

    /* --- History items --- */
    html.dark.gray .history-item {
      border-color: transparent !important;
    }
    html.dark.gray .history-item:hover {
      background: rgba(255, 255, 255, 0.04) !important;
    }
    html.dark.gray .history-item-active {
      background: #323232 !important;
      border-left-color: #888888 !important;
      border-color: #3a3a3a !important;
      box-shadow: none !important;
    }
    html.dark.gray .history-model-icon {
      background: #323232 !important;
      border-color: #3a3a3a !important;
    }

    /* --- User message bubbles --- */
    html.dark.gray .chat-group-row.items-end .bg-slate-900 {
      background-color: #e0e0e0 !important;
      color: #1e1e1e !important;
    }

    /* --- Dropdown items hover --- */
    html.dark.gray #model-dropdown-menu button:hover,
    html.dark.gray #model-dropdown-menu .other-models-trigger:hover {
      background: rgba(255, 255, 255, 0.06) !important;
      background-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.dark.gray .hover\:bg-zinc-800\/60:hover {
      background: rgba(255, 255, 255, 0.06) !important;
    }
    /* --- Settings toggle switches --- */
    html.dark.gray .bg-slate-200 {
      background-color: #3a3a3a !important;
    }

    /* --- Custom Instructions textarea --- */
    html.dark.gray #ci-textarea {
      background: #282828 !important;
      border-color: #3a3a3a !important;
    }
    html.dark.gray .tag-picker-item {
      background: #282828 !important;
      border-color: #3a3a3a !important;
    }

    /* --- Liquid Glass + Grey theme (comprehensive with explicit glass effect) --- */
    
    /* Body gradient */
    html.liquid-glass.dark.gray body {
      background:
        radial-gradient(ellipse at 15% 45%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 15%, rgba(255, 255, 255, 0.02) 0%, transparent 55%),
        linear-gradient(135deg, #1e1e1e 0%, #161616 100%) !important;
      background-attachment: fixed !important;
    }

    /* Model dropdown menu & media drawer */
    html.liquid-glass.dark.gray #model-dropdown-menu,
    html.liquid-glass.dark.gray #media-drawer-panel {
      background: rgba(30, 30, 30, 0.7) !important;
      background-color: rgba(30, 30, 30, 0.7) !important;
      backdrop-filter: blur(40px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.08) !important;
    }
    html.liquid-glass.dark.gray #model-dropdown-menu button {
      border-bottom-color: rgba(255, 255, 255, 0.05) !important;
    }
    html.liquid-glass.dark.gray #model-dropdown-menu button:hover,
    html.liquid-glass.dark.gray #model-dropdown-menu .other-models-trigger:hover {
      background: rgba(255, 255, 255, 0.06) !important;
    }

    /* Header buttons: model selector, sidebar trigger, new chat, share, dev label */
    html.liquid-glass.dark.gray #dropdown-parent-node > button:first-child,
    html.liquid-glass.dark.gray header button[onclick="startFreshSession()"],
    html.liquid-glass.dark.gray header button#btn-sidebar-trigger,
    html.liquid-glass.dark.gray #sidebar button#btn-sidebar-settings,
    html.liquid-glass.dark.gray header button#btn-share-dialog,
    html.liquid-glass.dark.gray #header-dev-label {
      background: rgba(45, 45, 45, 0.5) !important;
      backdrop-filter: blur(16px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    }

    /* Version switcher */
    html.liquid-glass.dark.gray .version-switcher {
      background: rgba(45, 45, 45, 0.5) !important;
      backdrop-filter: blur(12px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
      border-color: rgba(255, 255, 255, 0.18) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.12) !important;
    }

    /* Settings view */
    html.liquid-glass.dark.gray #settings-view {
      background: rgba(30, 30, 30, 0.85) !important;
      backdrop-filter: blur(65px) saturate(210%) !important;
      -webkit-backdrop-filter: blur(65px) saturate(210%) !important;
    }
    html.liquid-glass.dark.gray #settings-view > div:first-child {
      background: rgba(40, 40, 40, 0.6) !important;
    }
    html.liquid-glass.dark.gray #settings-overlay > div:last-child {
      background: rgba(35, 35, 35, 0.8) !important;
      backdrop-filter: blur(45px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(45px) saturate(200%) !important;
      border-left-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view div.bg-zinc-800\/60,
    html.liquid-glass.dark.gray #settings-view div.bg-zinc-900\/60 {
      background: rgba(40, 40, 40, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view button.bg-zinc-800,
    html.liquid-glass.dark.gray #settings-view .dark\:bg-zinc-800 {
      background: rgba(255, 255, 255, 0.08) !important;
    }
    html.liquid-glass.dark.gray #settings-view button.bg-transparent {
      color: #a0a0a0 !important;
    }
    html.liquid-glass.dark.gray #settings-view div.px-4.py-3.border-b {
      border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view input[type="text"] {
      background: rgba(40, 40, 40, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view hr {
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view button[onclick="handleSettingsOverlay(false)"] {
      background: rgba(50, 50, 50, 0.45) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
    }
    html.liquid-glass.dark.gray #settings-view .bg-zinc-900\/30 {
      background: rgba(40, 40, 40, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Header & sidebar */
    html.liquid-glass.dark.gray header,
    html.liquid-glass.dark.gray .app-header-anim {
      background: rgba(30, 30, 30, 0.75) !important;
      backdrop-filter: blur(20px) saturate(180%) !important;
      -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
      border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #sidebar {
      background: rgba(30, 30, 30, 0.75) !important;
      backdrop-filter: blur(24px) saturate(180%) !important;
      -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
      border-right-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Chat content bubbles */
    html.liquid-glass.dark.gray .chat-group-row div.md-content {
      background: rgba(40, 40, 40, 0.6) !important;
      backdrop-filter: blur(12px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* User message actions panel */
    html.liquid-glass.dark.gray .user-msg-actions-panel {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(50, 50, 50, 0.4) 0%, rgba(40, 40, 40, 0.3) 100%) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
    }

    /* Thinking icon */
    html.liquid-glass.dark.gray .thinking-icon {
      background: rgba(45, 45, 45, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Empty state template buttons */
    html.liquid-glass.dark.gray #empty-state-block button {
      background: rgba(45, 45, 45, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Center AI badge */
    html.liquid-glass.dark.gray #center-ai-badge {
      background: rgba(45, 45, 45, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Media drawer labels */
    html.liquid-glass.dark.gray #media-drawer-panel label {
      background: rgba(255, 255, 255, 0.04) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Bookmark tag dropdown */
    html.liquid-glass.dark.gray .dropdown-bookmark-tag {
      border-left-color: #888888 !important;
      border-color: #3a3a3a !important;
      box-shadow: none !important;
    }

    .mode-state-pulse {
      animation: modeStatePulse 0.34s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes modeStatePulse {
      0% { transform: scale(1); }
      42% { transform: scale(1.025); }
      100% { transform: scale(1); }
    }

    .input-mode-badge {
      animation: modeBadgeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    @keyframes modeBadgeIn {
      from { opacity: 0; transform: translateY(-5px) scale(0.92); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .mode-tab-active {
      animation: modeTabSelect 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
    }

    @keyframes modeTabSelect {
      from { transform: scale(0.9); opacity: 0.65; }
      to { transform: scale(1); opacity: 1; }
    }

    @keyframes chatMessageExit {
      to { opacity: 0; transform: translateX(-14px) scale(0.98); }
    }

    .chat-message-exit {
      pointer-events: none;
      animation: chatMessageExit 0.18s ease forwards;
    }

    .sources-block {
      overflow: hidden;
    }

    .sources-content {
      display: grid;
      grid-template-rows: 0fr;
      opacity: 0;
      transition: grid-template-rows 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease, margin-top 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sources-content-inner {
      min-height: 0;
      overflow: hidden;
    }

    .sources-block.sources-open .sources-content {
      grid-template-rows: 1fr;
      opacity: 1;
      margin-top: 0.5rem;
    }

    .sources-block.sources-open .source-chip {
      animation: sourceChipIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
      animation-delay: calc(var(--source-index) * 45ms + 45ms);
    }

    @keyframes sourceChipIn {
      from { opacity: 0; transform: translateY(-5px) scale(0.9); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }

    #mode-imagegen-btn.imagegen-disabled {
      opacity: 0.52;
      filter: grayscale(0.75);
      cursor: not-allowed;
    }

    .image-mode-entry { position: relative; display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: space-between; overflow: hidden; padding: 11px 12px; border: 1px solid rgba(148,163,184,.2); border-radius: 12px; color: #334155; background: rgba(248,250,252,.55); isolation: isolate; transition: border-color .22s ease, box-shadow .22s ease, color .22s ease; }
    .dark .image-mode-entry { border-color: rgba(255,255,255,.08); color: #d4d4d8; background: rgba(39,39,42,.38); }
    .image-mode-entry::before { content: ''; position: absolute; z-index: -1; inset: 0; opacity: 0; background-size: 220% 100%; transition: opacity .25s ease; }
    .image-mode-entry.active::before { opacity: 1; animation: imageModeSheen 5.5s ease-in-out infinite alternate; }
    .image-mode-entry.active.orange-accent { border-color: rgba(234,179,8,.3); color: #713f12; box-shadow: inset 0 1px rgba(255,255,255,.65), 0 5px 18px rgba(202,138,4,.08); }
    .image-mode-entry.active.orange-accent::before { background-image: linear-gradient(115deg, rgba(254,249,195,.98) 0%, rgba(255,251,235,.95) 43%, rgba(255,255,255,.98) 68%, rgba(254,240,138,.7) 100%); }
    .image-mode-entry.active.classic-accent { border-color: rgba(100,116,139,.25); color: #1e293b; box-shadow: inset 0 1px rgba(255,255,255,.8), 0 5px 18px rgba(15,23,42,.06); }
    .image-mode-entry.active.classic-accent::before { background-image: linear-gradient(115deg, rgba(226,232,240,.9), rgba(248,250,252,.96) 47%, #fff 70%, rgba(203,213,225,.7)); }
    .dark .image-mode-entry.active.orange-accent { border-color: rgba(250,204,21,.2); color: #fef3c7; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 7px 22px rgba(0,0,0,.2); }
    .dark .image-mode-entry.active.orange-accent::before { background-image: linear-gradient(115deg, rgba(66,50,14,.92), rgba(39,39,36,.96) 45%, rgba(255,255,255,.1) 69%, rgba(82,62,14,.82)); }
    .dark .image-mode-entry.active.classic-accent { border-color: rgba(255,255,255,.14); color: #f4f4f5; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 7px 22px rgba(0,0,0,.22); }
    .dark .image-mode-entry.active.classic-accent::before { background-image: linear-gradient(115deg, rgba(39,39,42,.96), rgba(63,63,70,.9) 47%, rgba(255,255,255,.12) 70%, rgba(24,24,27,.96)); }
    .image-mode-entry-icon { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(148,163,184,.16); border-radius: 8px; color: #64748b; background: rgba(255,255,255,.55); font-size: 10px; }
    .active.orange-accent .image-mode-entry-icon { color: #a16207; border-color: rgba(202,138,4,.18); background: rgba(255,255,255,.58); }
    .dark .image-mode-entry-icon { color: #a1a1aa; background: rgba(255,255,255,.05); }
    .dark .active.orange-accent .image-mode-entry-icon { color: #fde68a; border-color: rgba(250,204,21,.15); background: rgba(255,255,255,.07); }
    .image-mode-state-icon { display: grid; width: 24px; height: 24px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #94a3b8; font-size: 8px; }
    .image-mode-entry.active .image-mode-state-icon { color: currentColor; background: rgba(255,255,255,.45); }
    .dark .image-mode-entry.active .image-mode-state-icon { background: rgba(255,255,255,.08); }
    @keyframes imageModeSheen { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

    #mode-imagegen-btn.imagegen-disabled:hover {
      transform: none;
      box-shadow: none;
    }

    #mode-imagegen-btn.imagegen-disabled #switch-imagegen-bg {
      background-color: #cbd5e1;
    }

    .dark #mode-imagegen-btn.imagegen-disabled #switch-imagegen-bg {
      background-color: #3f3f46;
    }

    .imagegen-coming-soon {
      flex: 0 0 auto;
      padding: 2px 6px;
      border: 1px solid rgba(100, 116, 139, 0.28);
      border-radius: 999px;
      color: #64748b;
      background: rgba(148, 163, 184, 0.12);
      font-size: 9px;
      font-weight: 700;
      line-height: 1.2;
      white-space: nowrap;
    }

    .dark .imagegen-coming-soon {
      color: #a1a1aa;
      border-color: rgba(161, 161, 170, 0.24);
      background: rgba(161, 161, 170, 0.1);
    }

    .image-studio-hidden { display: none !important; }
    .image-studio-header-title { position: absolute; left: 50%; display: inline-flex; align-items: center; gap: 8px; transform: translateX(-50%); color: #334155; font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: -.025em; white-space: nowrap; pointer-events: none; }
    .image-studio-header-title > i { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(148,163,184,.2); border-radius: 8px; color: #64748b; background: rgba(255,255,255,.65); font-size: 11px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
    .dark .image-studio-header-title { color: #e4e4e7; }
    .dark .image-studio-header-title > i { border-color: rgba(255,255,255,.08); color: #a1a1aa; background: rgba(39,39,42,.68); box-shadow: 0 2px 10px rgba(0,0,0,.18); }
    .image-studio-header-title.hidden { display: none !important; }
    .image-studio-mode #mode-web-search-btn { display: none !important; }
    .image-studio-mode #media-drawer-panel .grid.grid-cols-1.sm\:grid-cols-2 { grid-template-columns: 1fr; }
    .image-studio-mode #media-attachments-options { grid-template-columns: 1fr; }
    .image-studio-empty { gap: 0; width: 100%; }
    .image-studio-orbit { position: relative; display: grid; width: 76px; height: 76px; margin-bottom: 20px; place-items: center; border: 1px solid rgba(234,179,8,.25); border-radius: 25px; color: #a16207; background: linear-gradient(145deg, rgba(254,249,195,.95), rgba(255,255,255,.94)); box-shadow: 0 18px 50px rgba(202,138,4,.12), inset 0 1px rgba(255,255,255,.8); }
    .image-studio-orbit::before, .image-studio-orbit::after { content: ''; position: absolute; border: 1px solid rgba(234,179,8,.16); border-radius: 50%; }
    .image-studio-orbit::before { width: 46px; height: 46px; }
    .image-studio-orbit::after { width: 6px; height: 6px; top: 9px; right: 14px; border: 0; background: #facc15; box-shadow: -46px 40px 0 rgba(251,146,60,.75); }
    .image-studio-orbit > i { position: absolute; z-index: 2; top: 50%; left: 50%; display: block; width: 24px; height: 24px; margin: 0; font-size: 22px; line-height: 24px; text-align: center; transform: translate(-50%,-50%); }
    .dark .image-studio-orbit { border-color: rgba(250,204,21,.16); color: #fde68a; background: linear-gradient(145deg, rgba(63,52,20,.88), rgba(24,24,27,.96)); box-shadow: 0 20px 55px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.07); }
    html.accent-classic .image-studio-orbit { border-color: rgba(100,116,139,.22); color: #475569; background: linear-gradient(145deg, rgba(226,232,240,.92), #fff); box-shadow: 0 18px 50px rgba(15,23,42,.09), inset 0 1px rgba(255,255,255,.9); }
    html.accent-classic .image-studio-orbit::before { border-color: rgba(100,116,139,.18); }
    html.accent-classic .image-studio-orbit::after { background: #94a3b8; box-shadow: -46px 40px 0 rgba(203,213,225,.9); }
    html.accent-classic.dark .image-studio-orbit { border-color: rgba(255,255,255,.12); color: #e4e4e7; background: linear-gradient(145deg, #3f3f46, #18181b); box-shadow: 0 20px 55px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.08); }
    .image-studio-title { color: #18181b; font-size: clamp(24px,7vw,34px); font-weight: 760; letter-spacing: -.035em; line-height: 1.05; }
    .dark .image-studio-title { color: #fafafa; }
    .image-studio-subtitle { max-width: 390px; margin-top: 10px; color: #71717a; font-size: 13px; line-height: 1.5; }
    .dark .image-studio-subtitle { color: #a1a1aa; }
    @media (max-width: 520px) { .image-studio-empty { justify-content: center; } }

    .image-aspect-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 10px; background: #fff; }
    .image-aspect-panel.hidden { display: none !important; }
    .dark .image-aspect-panel { border-color: rgba(255, 255, 255, 0.12); background: #18181b; }
    .image-aspect-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
    .image-aspect-copy > span { color: #18181b; font-size: 13px; font-weight: 700; }
    .image-aspect-copy small { overflow: hidden; color: #71717a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
    .dark .image-aspect-copy > span { color: #f4f4f5; }
    .image-aspect-options { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; padding: 3px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 8px; background: #f4f4f5; }
    .image-aspect-option { display: flex; min-width: 52px; height: 36px; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; color: #71717a; font-size: 11px; font-weight: 700; transition: 0.2s ease; }
    .image-aspect-option.active { color: #18181b; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
    .dark .image-aspect-options { border-color: rgba(255, 255, 255, 0.08); background: #27272a; }
    .dark .image-aspect-option.active { color: #f4f4f5; background: #09090b; }
    .image-mode-label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
    .image-mode-label b { font-weight: 700; }
    .image-mode-label i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.45; }
    .image-limit-panel { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 11px 14px; border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 10px; background: rgba(248, 250, 252, 0.7); }
    .image-limit-panel.hidden { display: none !important; }
    .image-limit-copy { display: flex; flex-direction: column; gap: 1px; }
    .image-limit-copy span { color: #27272a; font-size: 12px; font-weight: 700; }
    .image-limit-copy small { color: #71717a; font-size: 10px; }
    .image-limit-panel > strong { color: #27272a; font-size: 13px; font-variant-numeric: tabular-nums; }
    .dark .image-limit-panel { border-color: rgba(255, 255, 255, 0.08); background: rgba(39, 39, 42, 0.55); }
    .dark .image-limit-copy span, .dark .image-limit-panel > strong { color: #f4f4f5; }
    .image-account-limit-card { padding: 15px 16px; border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 12px; background: #fff; }
    .dark .image-account-limit-card { border-color: rgba(255, 255, 255, 0.08); background: #09090b; }
    .image-account-limit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
    .image-account-limit-head > div { display: flex; flex-direction: column; gap: 2px; }
    .image-account-limit-head strong { color: #27272a; font-size: 13px; }
    .image-account-limit-head span { color: #71717a; font-size: 10px; }
    .image-account-limit-head b { color: #27272a; font-size: 13px; font-variant-numeric: tabular-nums; }
    .dark .image-account-limit-head strong, .dark .image-account-limit-head b { color: #f4f4f5; }
    .image-account-limit-track { height: 5px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #e4e4e7; }
    .dark .image-account-limit-track { background: #27272a; }
    .image-account-limit-track i { display: block; width: 100%; height: 100%; border-radius: inherit; background: #52525b; transition: width 0.35s ease; }
    .dark .image-account-limit-track i { background: #d4d4d8; }
    .aspect-shape { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
    .aspect-shape.square { width: 10px; height: 10px; }
    .aspect-shape.landscape { width: 13px; height: 8px; }
    .aspect-shape.portrait { width: 7px; height: 12px; }

    .image-generation-card { position: relative; display: flex; width: min(390px, calc(100vw - 44px)); align-items: center; gap: 14px; overflow: hidden; padding: 13px; border: 1px solid rgba(249, 115, 22, 0.18); border-radius: 20px; background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,247,237,0.9)); box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08); transition: width 0.72s cubic-bezier(0.16, 1, 0.3, 1), padding 0.72s cubic-bezier(0.16, 1, 0.3, 1), gap 0.5s ease, border-radius 0.72s cubic-bezier(0.16, 1, 0.3, 1); }
    .dark .image-generation-card { border-color: rgba(251, 146, 60, 0.16); background: linear-gradient(135deg, rgba(39,39,42,0.96), rgba(28,25,23,0.92)); box-shadow: 0 16px 42px rgba(0,0,0,0.3); }
    .image-generation-card::before { content: ''; position: absolute; inset: -80% -25%; background: conic-gradient(from 110deg, transparent, rgba(251,146,60,0.12), transparent 28%, rgba(168,85,247,0.1), transparent 55%); animation: imageAuraSpin 7s linear infinite; pointer-events: none; }
    .image-generation-canvas { position: relative; flex: 0 0 auto; width: 78px; height: 78px; overflow: hidden; border-radius: 16px; background: linear-gradient(145deg, #fb923c, #ec4899 48%, #7c3aed); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 8px 24px rgba(190,24,93,0.18); transition: width 0.72s cubic-bezier(0.16, 1, 0.3, 1), height 0.72s cubic-bezier(0.16, 1, 0.3, 1), border-radius 0.72s cubic-bezier(0.16, 1, 0.3, 1), transform 0.72s cubic-bezier(0.16, 1, 0.3, 1); }
    .image-generation-canvas.aspect-16-9 { width: 96px; height: 60px; border-radius: 14px; }
    .image-generation-canvas.aspect-9-16 { width: 54px; height: 88px; border-radius: 14px; }
    .image-generation-card.is-framing .image-generation-canvas.final-aspect-1-1 { width: 128px; height: 128px; }
    .image-generation-card.is-framing .image-generation-canvas.final-aspect-16-9 { width: 176px; height: 99px; }
    .image-generation-card.is-framing .image-generation-canvas.final-aspect-9-16 { width: 86px; height: 153px; }
    .image-generation-card.is-complete { width: min(620px, calc(100vw - 32px)); align-items: stretch; flex-direction: column; gap: 10px; padding: 10px; border-radius: 18px; }
    .image-generation-card.is-complete .image-generation-canvas { align-self: center; max-width: 100%; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 18px 38px rgba(190,24,93,0.24); }
    .image-generation-card.is-complete .image-generation-canvas.final-aspect-1-1 { width: min(100%, 520px); height: min(calc(100vw - 52px), 520px); }
    .image-generation-card.is-complete .image-generation-canvas.final-aspect-16-9 { width: min(100%, 600px); height: min(calc((100vw - 52px) * 0.5625), 338px); }
    .image-generation-card.is-complete .image-generation-canvas.final-aspect-9-16 { width: min(calc((100vw - 52px) * 0.5625), 338px); height: min(calc(100vw - 52px), 600px); }
    .image-generation-card.is-complete .image-generation-canvas > i, .image-generation-card.is-complete .image-orb, .image-generation-card.is-complete .image-scanline { opacity: 0; transition: opacity 0.35s ease; }
    .image-generation-card.is-complete .image-generation-canvas img { position: relative; z-index: 2; display: block; width: 100%; height: 100%; object-fit: cover; }
    .image-generation-card.is-complete .image-generation-canvas::after { content: ''; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(255,255,255,0.2), transparent 34%, rgba(15,23,42,0.18)), repeating-linear-gradient(90deg, transparent 0 15%, rgba(255,255,255,0.12) 15% 16%, transparent 16% 33%); }
    .image-generation-card.is-complete .image-generation-copy { flex: 0 0 auto; padding: 2px 3px 3px; }
    .image-generation-card.is-complete .image-generation-progress { display: none; }
    .image-generation-canvas > i { position: absolute; z-index: 4; top: 50%; left: 50%; color: rgba(255,255,255,0.94); font-size: 19px; transform: translate(-50%,-50%); animation: imageSpark 1.8s ease-in-out infinite; }
    .image-orb { position: absolute; border-radius: 50%; filter: blur(7px); animation: imageOrbFloat 3.2s ease-in-out infinite alternate; }
    .orb-one { width: 48px; height: 48px; top: -9px; left: -7px; background: rgba(253,224,71,0.72); }
    .orb-two { width: 54px; height: 54px; right: -15px; bottom: -10px; background: rgba(96,165,250,0.68); animation-delay: -1.1s; }
    .orb-three { width: 32px; height: 32px; left: 34%; bottom: -8px; background: rgba(244,114,182,0.78); animation-delay: -2s; }
    .image-scanline { position: absolute; z-index: 3; inset: -30% 0 auto; height: 34%; background: linear-gradient(180deg, transparent, rgba(255,255,255,0.34), transparent); animation: imageScan 2.2s ease-in-out infinite; }
    .image-generation-copy { position: relative; z-index: 2; display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 3px; }
    .image-generation-eyebrow { color: #64748b; font-size: 8px; font-weight: 850; letter-spacing: 0.15em; }
    .dark .image-generation-eyebrow { color: #a1a1aa; }
    .image-generation-copy strong { color: #1e293b; font-size: 13px; font-weight: 760; }
    .dark .image-generation-copy strong { color: #f4f4f5; }
    .image-generation-status { display: flex; align-items: center; gap: 6px; color: #94a3b8; font-size: 9px; }
    .image-generation-status i { width: 3px; height: 3px; border-radius: 50%; background: #fdba74; }
    .image-result-meta { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
    .image-result-meta span { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border: 1px solid rgba(249,115,22,.18); border-radius: 999px; color: #9a3412; background: rgba(255,247,237,.9); font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; }
    .image-result-meta span:last-child { border-color: rgba(148,163,184,.2); color: #64748b; background: rgba(248,250,252,.9); }
    .image-result-meta i { color: #f97316; font-size: 9px; }
    .image-result-meta span:last-child i { color: #64748b; }
    html.accent-classic .image-result-meta span:first-child { border-color: rgba(148,163,184,.2); color: #475569; background: rgba(248,250,252,.9); }
    html.accent-classic .image-result-meta span:first-child i { color: #64748b; }
    .dark .image-result-meta span { border-color: rgba(251,146,60,.2); color: #fdba74; background: rgba(124,45,18,.22); }
    .dark .image-result-meta span:last-child { border-color: rgba(255,255,255,.1); color: #a1a1aa; background: rgba(39,39,42,.78); }
    .dark .image-result-meta span:last-child i { color: #a1a1aa; }
    html.accent-classic.dark .image-result-meta span:first-child { border-color: rgba(255,255,255,.1); color: #a1a1aa; background: rgba(39,39,42,.78); }
    html.accent-classic.dark .image-result-meta span:first-child i { color: #a1a1aa; }
    .image-generation-progress { height: 3px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,0.16); }
    .image-generation-progress span { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f97316, #ec4899, #8b5cf6); animation: imageProgress 2.3s ease-in-out infinite; }
    .image-generation-timing { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; color: #71717a; font-size: 9px; font-variant-numeric: tabular-nums; }
    .image-generation-timing .image-generation-elapsed { color: #3f3f46; font-weight: 750; }
    .dark .image-generation-timing { color: #71717a; }
    .dark .image-generation-timing .image-generation-elapsed { color: #d4d4d8; }
    .image-generation-timing.is-delayed { color: #a16207; }
    .dark .image-generation-timing.is-delayed { color: #facc15; }
    .image-preview-trigger { cursor: zoom-in; }
    .image-result-actions { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr; gap: 6px; }
    .image-result-actions button { display: flex; height: 38px; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 10px; color: #3f3f46; background: rgba(255,255,255,0.72); font-size: 11px; font-weight: 700; transition: transform .16s ease, background-color .16s ease; }
    .image-result-actions button:active { transform: scale(.98); }
    .dark .image-result-actions button { border-color: rgba(255,255,255,.09); color: #d4d4d8; background: rgba(39,39,42,.72); }
    .image-preview-overlay { position: fixed; z-index: 500; inset: 0; display: flex; visibility: hidden; flex-direction: column; padding: calc(var(--safe-top, 0px) + 12px) 12px calc(var(--safe-bottom, 0px) + 12px); background: rgba(9,9,11,.96); opacity: 0; pointer-events: none; transition: opacity .22s ease, visibility .22s ease; }
    .image-preview-overlay.is-open { visibility: visible; opacity: 1; pointer-events: auto; }
    .image-preview-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 2px 12px; color: #fff; }
    .image-preview-heading { display: flex; min-width: 0; flex-direction: column; }
    .image-preview-heading.hidden, .image-preview-actions button.hidden { display: none !important; }
    .image-preview-heading strong { font-size: 13px; }
    .image-preview-heading span { color: #a1a1aa; font-size: 10px; }
    .image-preview-actions { display: flex; gap: 7px; }
    .image-preview-actions button { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: #fff; background: rgba(255,255,255,.07); }
    .image-preview-stage { display: flex; min-height: 0; flex: 1; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px; touch-action: none; }
    .image-preview-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.45); transform-origin: center; transition: transform .2s cubic-bezier(.16,1,.3,1); will-change: transform; }
    .image-preview-stage img.is-zoomed { cursor: grab; }
    .image-preview-stage.is-dragging img { cursor: grabbing; }
    .image-preview-stage.is-zooming img { transition: none; }
    .image-preview-hint { flex: 0 0 auto; padding-top: 10px; color: #71717a; font-size: 10px; text-align: center; }
    body.image-preview-open { overflow: hidden; }
    .image-library-view { position: fixed; z-index: 45; inset: 0; display: flex; visibility: hidden; flex-direction: column; overflow: hidden; padding-top: var(--tg-safe-top, 0px); background: #f5f5f7; opacity: 0; transform: translateX(4%); pointer-events: none; transition: opacity .22s ease, transform .3s cubic-bezier(.16,1,.3,1), visibility .3s; }
    .dark .image-library-view { background: #09090b; }
    .image-library-view.is-open { visibility: visible; opacity: 1; transform: translateX(0); pointer-events: auto; }
    .image-library-header { display: grid; grid-template-columns: 42px minmax(0,1fr); flex: 0 0 auto; align-items: center; gap: 12px; padding: 14px clamp(14px,3vw,28px); border-bottom: 1px solid rgba(148,163,184,.18); background: rgba(255,255,255,.88); backdrop-filter: blur(18px); }
    .dark .image-library-header { border-color: rgba(255,255,255,.07); background: rgba(9,9,11,.9); }
    .image-library-back { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(148,163,184,.22); border-radius: 10px; color: #475569; background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.04); }
    .dark .image-library-back { border-color: rgba(255,255,255,.09); color: #d4d4d8; background: #18181b; }
    .image-library-title-wrap { min-width: 0; }
    .image-library-kicker { display: block; margin-bottom: 2px; color: var(--color-accent); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
    .image-library-title-wrap h1 { overflow: hidden; color: #18181b; font-size: clamp(17px,4vw,22px); font-weight: 760; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
    .dark .image-library-title-wrap h1 { color: #fafafa; }
    .image-library-title-wrap p { margin-top: 2px; overflow: hidden; color: #94a3b8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
    .image-library-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px clamp(10px,3vw,28px) calc(var(--tg-safe-bottom, 0px) + 28px); }
    .image-library-grid { max-width: 1180px; margin: 0 auto; columns: 2; column-gap: 10px; }
    .image-library-card { display: inline-block; width: 100%; overflow: hidden; margin: 0 0 10px; break-inside: avoid; border: 1px solid rgba(148,163,184,.2); border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(15,23,42,.055); }
    .dark .image-library-card { border-color: rgba(255,255,255,.08); background: #18181b; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
    .image-library-preview { display: block; width: 100%; cursor: zoom-in; background: #e2e8f0; }
    .dark .image-library-preview { background: #27272a; }
    .image-library-preview img { display: block; width: 100%; height: auto; min-height: 112px; object-fit: cover; }
    .image-library-card-info { display: flex; flex-direction: column; padding: 9px; }
    .image-library-card-info time { margin-bottom: 4px; color: #a1a1aa; font-size: 8px; font-weight: 650; }
    .image-library-card-info p { display: -webkit-box; overflow: hidden; margin: 0; color: #52525b; font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
    .dark .image-library-card-info p { color: #a1a1aa; }
    .image-library-card-actions { display: grid; grid-template-columns: 1fr 32px; gap: 5px; margin-top: 8px; }
    .image-library-card-actions button { display: flex; height: 30px; align-items: center; justify-content: center; gap: 5px; border: 1px solid rgba(148,163,184,.2); border-radius: 7px; color: #64748b; background: #f8fafc; font-size: 9px; font-weight: 700; }
    .dark .image-library-card-actions button { border-color: rgba(255,255,255,.08); color: #a1a1aa; background: #27272a; }
    .image-library-card-actions button:first-child { color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
    .image-library-empty { max-width: 360px; margin: 12vh auto 0; padding: 20px; color: #71717a; text-align: center; }
    .image-library-empty > span { display: grid; width: 62px; height: 62px; margin: 0 auto 15px; place-items: center; border: 1px solid rgba(148,163,184,.22); border-radius: 16px; color: var(--color-accent); background: #fff; font-size: 22px; box-shadow: 0 8px 28px rgba(15,23,42,.06); }
    .dark .image-library-empty > span { border-color: rgba(255,255,255,.08); background: #18181b; }
    .image-library-empty strong { display: block; color: #27272a; font-size: 15px; }
    .dark .image-library-empty strong { color: #f4f4f5; }
    .image-library-empty p { margin-top: 6px; font-size: 11px; line-height: 1.55; }
    .image-library-empty button { margin-top: 16px; padding: 10px 14px; border-radius: 8px; color: #fff; background: var(--color-accent); font-size: 11px; font-weight: 720; }
    html.accent-classic.dark .image-library-empty button { color: #18181b; }
    body.image-library-open { overflow: hidden; }
    @media (min-width: 680px) { .image-library-grid { columns: 3; column-gap: 14px; } .image-library-card { margin-bottom: 14px; } }
    @media (min-width: 1020px) { .image-library-grid { columns: 4; column-gap: 16px; } .image-library-card { margin-bottom: 16px; } }
    .reasoning-effort-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .reasoning-effort-option { height: 28px; border: 1px solid rgba(148,163,184,.18); border-radius: 7px; color: #71717a; background: rgba(255,255,255,.65); font-size: 9px; font-weight: 750; text-transform: uppercase; transition: .16s ease; }
    .reasoning-effort-option.active { color: #18181b; border-color: rgba(63,63,70,.25); background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.08); }
    .dark .reasoning-effort-option { color: #a1a1aa; border-color: rgba(255,255,255,.07); background: rgba(39,39,42,.65); }
    .dark .reasoning-effort-option.active { color: #fafafa; border-color: rgba(255,255,255,.14); background: #18181b; }
    @keyframes imageAuraSpin { to { transform: rotate(360deg); } }
    @keyframes imageSpark { 50% { opacity: 0.72; transform: translate(-50%,-50%) scale(1.15) rotate(8deg); } }
    @keyframes imageOrbFloat { to { transform: translate(8px, 7px) scale(1.14); } }
    @keyframes imageScan { 0% { transform: translateY(-20%); } 100% { transform: translateY(390%); } }
    @keyframes imageProgress { 0% { transform: translateX(-110%); } 55%,100% { transform: translateX(240%); } }
    @media (prefers-reduced-motion: reduce) { .image-generation-card::before, .image-generation-canvas > i, .image-orb, .image-scanline, .image-generation-progress span { animation: none !important; } }
    .generated-image-block { width: min(100%, 620px); overflow: hidden; margin: 8px 0; border: 1px solid rgba(148,163,184,0.2); border-radius: 18px; background: rgba(248,250,252,0.72); box-shadow: 0 10px 30px rgba(15,23,42,0.08); }
    .dark .generated-image-block { border-color: rgba(255,255,255,0.08); background: rgba(39,39,42,0.55); box-shadow: 0 14px 34px rgba(0,0,0,0.28); }
    .generated-image-block img { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: rgba(15,23,42,0.04); }
    .generated-image-block figcaption { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; color: #94a3b8; font-size: 9px; font-weight: 650; }
    .generated-image-block figcaption span { display: inline-flex; align-items: center; gap: 6px; }
    .generated-image-block figcaption span i { color: #f97316; }
    .generated-image-block figcaption a { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 9px; color: #64748b; background: rgba(148,163,184,0.1); transition: 0.18s ease; }
    .generated-image-block figcaption a:hover { color: #f97316; background: rgba(249,115,22,0.1); }
    @media (max-width: 560px) { .image-aspect-panel { align-items: stretch; flex-direction: column; } .image-aspect-options { width: 100%; } .image-aspect-option { flex: 1; } .image-generation-card { gap: 11px; } }

    /* Keep Telegram WebView compositing stable on touch devices. */
    @media (max-width: 820px), (pointer: coarse) {
      .chat-blob {
        animation: none !important;
        filter: blur(56px);
        will-change: auto;
      }

      .chat-blob-1 { transform: translate3d(12px, -8px, 0) scale(1.04); }
      .chat-blob-2 { transform: translate3d(-10px, -12px, 0) scale(1.03); }
      .chat-blob-3 { display: none; }

      html.liquid-glass #chat-ambient-layer {
        filter: none !important;
        opacity: 0.32 !important;
      }

      html.liquid-glass .chat-blob {
        filter: blur(52px) !important;
      }

      html.liquid-glass .app-header-anim,
      html.liquid-glass #sidebar,
      html.liquid-glass #settings-view,
      html.liquid-glass #media-drawer-panel,
      html.liquid-glass #model-dropdown-menu,
      html.liquid-glass #custom-modal-box,
      html.liquid-glass #tag-picker-box,
      html.liquid-glass .md-content,
      html.liquid-glass .thinking-indicator {
        backdrop-filter: blur(14px) saturate(140%) !important;
        -webkit-backdrop-filter: blur(14px) saturate(140%) !important;
      }

      html.liquid-glass button::before,
      html.liquid-glass #media-drawer-panel label::before,
      html.liquid-glass .md-content::before,
      html.liquid-glass .history-item::before,
      html.liquid-glass .bookmark-item::before {
        display: none !important;
      }

    }
    html.dark.gray .history-model-icon {
      background: #323232 !important;
      border-color: #3a3a3a !important;
    }

    /* --- User message bubbles --- */
    html.dark.gray .chat-group-row.items-end .bg-slate-900 {
      background-color: #e0e0e0 !important;
      color: #1e1e1e !important;
    }

    /* --- Dropdown items hover --- */
    html.dark.gray #model-dropdown-menu button:hover,
    html.dark.gray #model-dropdown-menu .other-models-trigger:hover {
      background: rgba(255, 255, 255, 0.06) !important;
      background-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.dark.gray .hover\:bg-zinc-800\/60:hover {
      background: rgba(255, 255, 255, 0.06) !important;
    }
    /* --- Settings toggle switches --- */
    html.dark.gray .bg-slate-200 {
      background-color: #3a3a3a !important;
    }

    /* --- Custom Instructions textarea --- */
    html.dark.gray #ci-textarea {
      background: #282828 !important;
      border-color: #3a3a3a !important;
    }
    html.dark.gray .tag-picker-item {
      background: #282828 !important;
      border-color: #3a3a3a !important;
    }

    /* --- Liquid Glass + Grey theme (comprehensive with explicit glass effect) --- */
    
    /* Body gradient */
    html.liquid-glass.dark.gray body {
      background:
        radial-gradient(ellipse at 15% 45%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 15%, rgba(255, 255, 255, 0.02) 0%, transparent 55%),
        linear-gradient(135deg, #1e1e1e 0%, #161616 100%) !important;
      background-attachment: fixed !important;
    }

    /* Model dropdown menu & media drawer */
    html.liquid-glass.dark.gray #model-dropdown-menu,
    html.liquid-glass.dark.gray #media-drawer-panel {
      background: rgba(30, 30, 30, 0.7) !important;
      background-color: rgba(30, 30, 30, 0.7) !important;
      backdrop-filter: blur(40px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.08) !important;
    }
    html.liquid-glass.dark.gray #model-dropdown-menu button {
      border-bottom-color: rgba(255, 255, 255, 0.05) !important;
    }
    html.liquid-glass.dark.gray #model-dropdown-menu button:hover,
    html.liquid-glass.dark.gray #model-dropdown-menu .other-models-trigger:hover {
      background: rgba(255, 255, 255, 0.06) !important;
    }

    /* Header buttons: model selector, sidebar trigger, new chat, share, dev label */
    html.liquid-glass.dark.gray #dropdown-parent-node > button:first-child,
    html.liquid-glass.dark.gray header button[onclick="startFreshSession()"],
    html.liquid-glass.dark.gray header button#btn-sidebar-trigger,
    html.liquid-glass.dark.gray #sidebar button#btn-sidebar-settings,
    html.liquid-glass.dark.gray header button#btn-share-dialog,
    html.liquid-glass.dark.gray #header-dev-label {
      background: rgba(45, 45, 45, 0.5) !important;
      backdrop-filter: blur(16px) saturate(160%) !important;
      -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
      box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    }

    /* Version switcher */
    html.liquid-glass.dark.gray .version-switcher {
      background: rgba(45, 45, 45, 0.5) !important;
      backdrop-filter: blur(12px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
      border-color: rgba(255, 255, 255, 0.18) !important;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.12) !important;
    }

    /* Settings view */
    html.liquid-glass.dark.gray #settings-view {
      background: rgba(30, 30, 30, 0.85) !important;
      backdrop-filter: blur(65px) saturate(210%) !important;
      -webkit-backdrop-filter: blur(65px) saturate(210%) !important;
    }
    html.liquid-glass.dark.gray #settings-view > div:first-child {
      background: rgba(40, 40, 40, 0.6) !important;
    }
    html.liquid-glass.dark.gray #settings-overlay > div:last-child {
      background: rgba(35, 35, 35, 0.8) !important;
      backdrop-filter: blur(45px) saturate(200%) !important;
      -webkit-backdrop-filter: blur(45px) saturate(200%) !important;
      border-left-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view div.bg-zinc-800\/60,
    html.liquid-glass.dark.gray #settings-view div.bg-zinc-900\/60 {
      background: rgba(40, 40, 40, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view button.bg-zinc-800,
    html.liquid-glass.dark.gray #settings-view .dark\:bg-zinc-800 {
      background: rgba(255, 255, 255, 0.08) !important;
    }
    html.liquid-glass.dark.gray #settings-view button.bg-transparent {
      color: #a0a0a0 !important;
    }
    html.liquid-glass.dark.gray #settings-view div.px-4.py-3.border-b {
      border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view input[type="text"] {
      background: rgba(40, 40, 40, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view hr {
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #settings-view button[onclick="handleSettingsOverlay(false)"] {
      background: rgba(50, 50, 50, 0.45) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
    }
    html.liquid-glass.dark.gray #settings-view .bg-zinc-900\/30 {
      background: rgba(40, 40, 40, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Header & sidebar */
    html.liquid-glass.dark.gray header,
    html.liquid-glass.dark.gray .app-header-anim {
      background: rgba(30, 30, 30, 0.75) !important;
      backdrop-filter: blur(20px) saturate(180%) !important;
      -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
      border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray #sidebar {
      background: rgba(30, 30, 30, 0.75) !important;
      backdrop-filter: blur(24px) saturate(180%) !important;
      -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
      border-right-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Chat content bubbles */
    html.liquid-glass.dark.gray .chat-group-row div.md-content {
      background: rgba(40, 40, 40, 0.6) !important;
      backdrop-filter: blur(12px) saturate(140%) !important;
      -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* User message actions panel */
    html.liquid-glass.dark.gray .user-msg-actions-panel {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(135deg, rgba(50, 50, 50, 0.4) 0%, rgba(40, 40, 40, 0.3) 100%) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
    }

    /* Thinking icon */
    html.liquid-glass.dark.gray .thinking-icon {
      background: rgba(45, 45, 45, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Empty state template buttons */
    html.liquid-glass.dark.gray #empty-state-block button {
      background: rgba(45, 45, 45, 0.35) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Center AI badge */
    html.liquid-glass.dark.gray #center-ai-badge {
      background: rgba(45, 45, 45, 0.4) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Media drawer labels */
    html.liquid-glass.dark.gray #media-drawer-panel label {
      background: rgba(255, 255, 255, 0.04) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Bookmark tag dropdown */
    html.liquid-glass.dark.gray .dropdown-bookmark-tag {
      background: rgba(30, 30, 30, 0.7) !important;
      backdrop-filter: blur(20px) !important;
      -webkit-backdrop-filter: blur(20px) !important;
    }

    /* Send button inactive */
    html.liquid-glass.dark.gray #btn-send.send-mode.inactive-send {
      background: rgba(255, 255, 255, 0.04) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Input wrap */
    html.liquid-glass.dark.gray .chat-input-wrap {
      background:
        linear-gradient(120deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.03) 45%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 70%),
        rgba(30, 30, 30, 0.7) !important;
      backdrop-filter: blur(30px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    }

    /* Tag picker */
    html.liquid-glass.dark.gray #tag-picker-box {
      background: rgba(40, 40, 40, 0.8) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
      backdrop-filter: blur(30px) saturate(190%) !important;
      -webkit-backdrop-filter: blur(30px) saturate(190%) !important;
    }
    html.liquid-glass.dark.gray .tag-picker-item {
      background: rgba(255, 255, 255, 0.05) !important;
      border-color: rgba(255, 255, 255, 0.08) !important;
    }

    /* Sidebar tabs in liquid glass + grey */
    html.liquid-glass.dark.gray .sb-tabs-container {
      background: rgba(30, 30, 30, 0.4) !important;
      backdrop-filter: blur(10px) !important;
      -webkit-backdrop-filter: blur(10px) !important;
      border-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.liquid-glass.dark.gray .sb-tab-btn.active {
      background: rgba(60, 60, 60, 0.5) !important;
      border-color: rgba(255, 255, 255, 0.1) !important;
    }

    /* History items in liquid glass + grey */
    html.liquid-glass.dark.gray .history-item:hover {
      background: rgba(255, 255, 255, 0.04) !important;
    }
    html.liquid-glass.dark.gray .history-item-active {
      background: rgba(60, 60, 60, 0.4) !important;
      backdrop-filter: blur(8px) !important;
      -webkit-backdrop-filter: blur(8px) !important;
    }

    /* Model dropdown active/selected item background styling */
    .model-dropdown-active-item {
      background-color: rgba(0, 0, 0, 0.03) !important;
    }
    .dark .model-dropdown-active-item {
      background-color: rgba(255, 255, 255, 0.06) !important;
    }
    html.dark.gray .model-dropdown-active-item {
      background-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Soften user message bubbles in dark mode to lower exposure/brightness */
    html.dark:not(.gray) .chat-group-row.items-end .bg-slate-900 {
      background-color: #e4e4e7 !important;
      color: #09090b !important;
    }
    html.dark:not(.gray) .chat-group-row.items-end .bg-orange-500 {
      background-color: #c2410c !important;
    }

    /* Segmented Control for Model Mode Selector in dropdown */
    .model-mode-selector {
      border: 1px solid rgba(0, 0, 0, 0.05);
    }
    .dark .model-mode-selector {
      border: 1px solid rgba(255, 255, 255, 0.05);
    }
    .model-mode-selector button {
      cursor: pointer;
      outline: none;
      white-space: nowrap;
    }
    .model-mode-selector button:active {
      transform: scale(0.95);
    }

    /* Typing cursor effect during streaming */
    .md-content-inner.is-writing::after {
      content: '';
      display: inline-block;
      width: 6px;
      height: 15px;
      background-color: var(--model-accent-color, #10a37f);
      margin-left: 4px;
      vertical-align: middle;
      animation: streaming-blink 0.8s infinite;
      border-radius: 2px;
      transition: background-color 0.3s;
    }

    @keyframes streaming-blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0; }
    }

    /* ===== WEB SEARCH SOURCE CHIPS & DETAILS STYLES ===== */
    .sources-block summary::-webkit-details-marker {
      display: none !important;
    }
    .sources-block summary {
      list-style: none !important;
      outline: none !important;
    }
    
    /* Footnote Links custom style */
    .footnote-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none !important;
    }
    .footnote-link:hover {
      text-decoration: none !important;
    }


/* Hide hardcoded default empty-state until local prefs are applied */
html:not(.ls-boot-ready) #empty-state-block,
html:not(.ls-boot-ready) #header-active-model,
html:not(.ls-boot-ready) #header-dev-label,
html:not(.ls-boot-ready) #center-ai-badge {
  visibility: hidden !important;
}
html:not(.ls-boot-ready) #image-studio-header-title {
  visibility: hidden !important;
}

/* Canonical model dropdown transition. Keep this after theme-specific overrides. */
#model-dropdown-menu {
  display: block !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-6px) scale(0.98) !important;
  transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.16s !important;
}
#model-dropdown-menu.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
  transition-delay: 0s !important;
}

/* Neutral stop control in every visual theme. */
html #btn-send.stop-mode {
  background: #71717a !important;
  color: #fff !important;
  border-color: #71717a !important;
  box-shadow: 0 2px 8px rgba(63, 63, 70, 0.2) !important;
}
html #btn-send.stop-mode:hover { background: #52525b !important; border-color: #52525b !important; }
html #btn-send.stop-mode .stop-icon { width: 12px !important; height: 12px !important; font-size: 12px !important; transform: none !important; }


/* sidebar edge swipe */
#sidebar.sidebar-dragging,
#sidebar-mask.sidebar-dragging {
  transition: none !important;
}
