/* ============================================================
   Тема «Имиджмарк» для панели ClaudeCode — cc-custom-imagemark-v23
   По спецификации Claude Design (design-spec.md), перенесено на реальную разметку CloudCLI.
   Устанавливается как dist/cc-custom.css; шрифты и логотип — в dist/imagemark/.
   Откат: вернуть прежний cc-custom.css (копия cc-custom.before-imagemark.css).
   ============================================================ */

/* ---------- 1. Шрифты ---------- */
@font-face{font-family:"Manrope";font-weight:200 800;font-display:swap;src:url(/imagemark/fonts/manrope-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Manrope";font-weight:200 800;font-display:swap;src:url(/imagemark/fonts/manrope-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF,U+2212}
@font-face{font-family:"JetBrains Mono";font-weight:400;font-display:swap;src:url(/imagemark/fonts/jbmono-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"JetBrains Mono";font-weight:400;font-display:swap;src:url(/imagemark/fonts/jbmono-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF,U+2212}

/* ---------- 2. Токены (спецификация, раздел 2 и 10.2) ---------- */
:root{
  --im-sans:"Manrope","Segoe UI",system-ui,sans-serif;
  --im-mono:"JetBrains Mono",Consolas,"Courier New",monospace;
  --im-side-bg:#152037; --im-side-card:#1f2c47; --im-side-line:#2e3b57; --im-side-active:#26365a; --im-side-border:#152037;
  --im-pill-line:#2e3b57; --im-side-2:#aab3c5; --im-side-3:#c3c9de; --im-side-ink:#ffffff; --im-tab-on:#ffffff; --im-tab-on-ink:#152037;
  --im-green:#38aa35; --im-green-btn:#278324; --im-green-dk:#1f6f1d; --im-green-ink:#1f6f1d; --im-green-ink-2:#2e8f2b; --im-green-bg:#e3f3e2; --im-on-green:#ffffff;
  --im-orange:#ff9d00; --im-warn-bg:#fff0d9; --im-warn-ink:#8a5200; --im-warn-line:#f3d9ad;
  --im-red:#f62720; --im-red-dk:#c81e18; --im-stop-bg:#ffffff;
  --im-bg:#f5f7fa; --im-header:#ffffff; --im-surface:#ffffff; --im-surface-2:#eef0f4; --im-line:#dde1ea; --im-th:#eef0f4;
  --im-ink:#152037; --im-ink-2:#5a6273; --im-ink-3:#5f6778;
  --im-seg-bg:#f5f7fa; --im-seg-active-bg:#152037; --im-seg-active-ink:#ffffff; --im-seg-ink:#152037; --im-seg-line:#152037;
  --im-user-bg:#152037; --im-user-ink:#ffffff; --im-user-muted:#aab3c5; --im-user-line:#2e3b57;
  --im-console-bg:#f5f7fa; --im-console-ink:#152037; --im-tag-bg:#e3f3e2; --im-tag-ink:#1f6f1d; --im-verb-line:#152037;
  --im-send-idle:#e9ecf1; --im-send-idle-ink:#7a8190;
  --im-code-bg:#152037; --im-code-border:#152037; --im-code-head-line:#2e3b57; --im-code-head-ink:#ffffff; --im-code-copy-line:#3a4a6a;
  --im-code-text:#dfe3ec; --im-code-muted:#aab3c5; --im-code-tag-bg:#1f3a2e; --im-code-tag-ink:#8fd88c;
  --im-shadow-composer:0 3px 0 rgba(21,32,55,.07); --im-shadow-card:0 2px 0 rgba(21,32,55,.06);
  --im-r-card:10px; --im-r-code:12px; --im-r-user:14px; --im-r-composer:16px;
  --im-t:150ms cubic-bezier(.2,.8,.2,1);
  --background:216 33% 97%!important;--foreground:221 45% 15%!important;--card:0 0% 100%!important;--card-foreground:221 45% 15%!important;--popover:0 0% 100%!important;--popover-foreground:221 45% 15%!important;--primary:118 52% 44%!important;--primary-foreground:0 0% 100%!important;--secondary:220 21% 95%!important;--secondary-foreground:221 45% 15%!important;--muted:220 21% 95%!important;--muted-foreground:221 12% 40%!important;--accent:220 21% 95%!important;--accent-foreground:221 45% 15%!important;--border:222 24% 89%!important;--input:222 24% 89%!important;--ring:118 52% 44%!important;
}
.dark{
  --im-green:#3f8a43; --im-green-btn:#2d6a31; --im-green-dk:#8cc98a; --im-green-ink:#8cc98a; --im-green-ink-2:#8cc98a; --im-green-bg:#1b2b22; --im-on-green:#e3ece3;
  --im-orange:#d98f2b;
  --im-side-bg:#0f1522; --im-side-card:#171f2f; --im-side-line:#252f42; --im-side-active:#1e2839; --im-side-border:#1c2433;
  --im-pill-line:#252f42; --im-side-ink:#c9cfda; --im-side-2:#8a93a5; --im-side-3:#a3abbb; --im-tab-on:#2a3548; --im-tab-on-ink:#dde2ea;
  --im-bg:#131a28; --im-header:#141b2a; --im-surface:#1a2233; --im-surface-2:#212a3d; --im-line:#2a3446; --im-th:#1d2536;
  --im-ink:#c9cfda; --im-ink-2:#8f98a9; --im-ink-3:#8f98a9;
  --im-seg-bg:#1a2233; --im-seg-active-bg:#2a3548; --im-seg-active-ink:#dde2ea; --im-seg-ink:#a3abbb; --im-seg-line:#8f98a9;
  --im-warn-bg:#2a2217; --im-warn-ink:#e0b36a; --im-warn-line:#3d3222;
  --im-red:#c9544f; --im-red-dk:#e88d88; --im-stop-bg:#1a2233;
  --im-user-bg:#1f2b44; --im-user-ink:#d6dce6; --im-user-muted:#9ea8bb; --im-user-line:#2d3b58;
  --im-console-bg:#0f1522; --im-console-ink:#c4cad5; --im-tag-bg:#1b2b22; --im-tag-ink:#9cc79a; --im-verb-line:#8f98a9;
  --im-send-idle:#212a3d; --im-send-idle-ink:#8f98a9;
  --im-code-bg:#0f1522; --im-code-border:#2a3446; --im-code-head-line:#232c3e; --im-code-head-ink:#d6dce6; --im-code-copy-line:#2a3446;
  --im-code-text:#c4cad5; --im-code-muted:#8f98a9; --im-code-tag-bg:#1b2b22; --im-code-tag-ink:#9cc79a;
  --im-shadow-composer:none; --im-shadow-card:none;
  --background:220 36% 12%!important;--foreground:219 19% 82%!important;--card:221 32% 15%!important;--card-foreground:219 19% 82%!important;--popover:221 32% 15%!important;--popover-foreground:219 19% 82%!important;--primary:123 37% 39%!important;--primary-foreground:120 19% 91%!important;--secondary:221 30% 18%!important;--secondary-foreground:219 19% 82%!important;--muted:221 30% 18%!important;--muted-foreground:219 13% 61%!important;--accent:221 30% 18%!important;--accent-foreground:219 19% 82%!important;--border:219 25% 22%!important;--input:219 25% 22%!important;--ring:123 37% 39%!important;
}

/* ---------- 3. База ---------- */
body, #root{font-family:var(--im-sans)!important;-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;text-rendering:optimizeLegibility}
.font-serif, .prose, .prose *:not(code):not(pre):not(pre *){font-family:var(--im-sans)!important}
.font-mono, code, pre, kbd, pre *{font-family:var(--im-mono)!important}
:is(button,a,[role=button],summary):focus-visible{outline:2px solid var(--im-green)!important;outline-offset:2px}
textarea:focus, textarea:focus-visible, input:focus, input:focus-visible{outline:none!important;box-shadow:none!important}
.h-full.flex-shrink-0 :is(button,a):focus-visible{outline-offset:-2px!important}
.h-full.flex-shrink-0 :is(button,a){--tw-ring-shadow:0 0 #0000!important;--tw-ring-offset-shadow:0 0 #0000!important}
form[data-slot="prompt-input"]:focus-within{--tw-ring-shadow:0 0 #0000!important;--tw-ring-offset-shadow:0 0 #0000!important}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---------- 4. Сайдбар: свой тёмно-синий набор переменных ---------- */
#root > .fixed.inset-0 > .h-full.flex-shrink-0{
  --background:221 45% 15%!important;--foreground:0 0% 100%!important;--card:220 39% 20%!important;--card-foreground:0 0% 100%!important;--popover:220 39% 20%!important;--popover-foreground:0 0% 100%!important;--primary:118 52% 44%!important;--primary-foreground:0 0% 100%!important;--secondary:220 39% 20%!important;--secondary-foreground:0 0% 100%!important;--muted:220 39% 20%!important;--muted-foreground:220 19% 72%!important;--accent:220 39% 20%!important;--accent-foreground:0 0% 100%!important;--border:221 31% 26%!important;--input:221 31% 26%!important;--ring:118 52% 44%!important;
  background:var(--im-side-bg)!important; border-right-color:var(--im-side-line)!important; color:#fff;
}
.dark #root > .fixed.inset-0 > .h-full.flex-shrink-0{ --background:221 39% 10%!important;--foreground:219 19% 82%!important;--card:220 34% 14%!important;--card-foreground:219 19% 82%!important;--popover:220 34% 14%!important;--popover-foreground:219 19% 82%!important;--primary:123 37% 39%!important;--primary-foreground:120 19% 91%!important;--secondary:220 34% 14%!important;--secondary-foreground:219 19% 82%!important;--muted:220 34% 14%!important;--muted-foreground:220 13% 59%!important;--accent:220 34% 14%!important;--accent-foreground:219 19% 82%!important;--border:219 28% 20%!important;--input:219 28% 20%!important;--ring:123 37% 39%!important; }
#root > .fixed.inset-0 > .h-full.flex-shrink-0 > div{background:var(--im-side-bg)!important;backdrop-filter:none!important}
@media (min-width:768px){ #root > .fixed.inset-0 > .h-full.flex-shrink-0 .md\:w-72{width:312px!important} }
#root > .fixed.inset-0 > .h-full.flex-shrink-0 .nav-divider{background:var(--im-side-line)!important;opacity:1}

/* логотип «Имиджмарк» вместо значка */
#root .h-7.w-7.rounded-lg.bg-primary\/90{
  width:32px!important;height:32px!important;border-radius:8px!important;box-shadow:none!important;
  background:url(/imagemark/logo_mark.png) center/cover no-repeat!important;
}
#root .h-7.w-7.rounded-lg.bg-primary\/90 > svg{display:none!important}
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1{font-size:18px!important;font-weight:800!important;color:var(--im-side-ink)!important;letter-spacing:-.01em}
.h-full.flex-shrink-0 button[title^="Обновить"], .h-full.flex-shrink-0 button[title^="Создать новый проект"],
.h-full.flex-shrink-0 button[title^="Скрыть боковую"]{color:var(--im-side-2)!important;min-width:32px;min-height:32px}
.h-full.flex-shrink-0 button[title^="Обновить"]:hover, .h-full.flex-shrink-0 button[title^="Создать новый проект"]:hover,
.h-full.flex-shrink-0 button[title^="Скрыть боковую"]:hover{color:var(--im-side-ink)!important;background:var(--im-side-line)!important}
.h-full.flex-shrink-0 button svg.lucide-refresh-cw, .h-full.flex-shrink-0 button svg.lucide-plus,
.h-full.flex-shrink-0 button svg.lucide-panel-left-close{width:18px!important;height:18px!important}
.group\/star{display:none!important}

/* вкладки «Проекты / Разговоры» — таблетка */
.flex.rounded-lg.bg-muted\/50.p-0\.5{background:transparent!important;border:1.5px solid var(--im-pill-line);border-radius:999px!important;padding:3px!important;align-items:center}
.flex.rounded-lg.bg-muted\/50.p-0\.5 > button{border-radius:999px!important;height:28px;font-size:14px!important;font-weight:600!important;color:var(--im-side-3)!important}
.flex.rounded-lg.bg-muted\/50.p-0\.5 > button.bg-background{background:#fff!important;color:var(--im-side-bg)!important;font-weight:700!important;box-shadow:none!important}
.dark .flex.rounded-lg.bg-muted\/50.p-0\.5 > button.bg-background{background:#e9ecf3!important;color:#0a101e!important}
.flex.rounded-lg.bg-muted\/50.p-0\.5 > button.flex-1 > svg{display:none!important}
.flex.rounded-lg.bg-muted\/50.p-0\.5 > .relative > button{color:var(--im-side-2)!important}

/* поиск */
.h-full.flex-shrink-0 input[placeholder^="Поиск"]{height:40px!important;border-radius:10px!important;background:var(--im-side-card)!important;
  border:1px solid var(--im-side-line)!important;font-size:15px!important;color:var(--im-side-ink)!important}
.h-full.flex-shrink-0 input[placeholder^="Поиск"]::placeholder{color:var(--im-side-2)!important}
.h-full.flex-shrink-0 input[placeholder^="Поиск"] + kbd{background:var(--im-side-line)!important;border:0!important;border-radius:6px!important;
  color:var(--im-side-2)!important;font-size:11px!important;font-weight:600;height:20px}

/* карточка проекта */
.md\:group.group > button{background:var(--im-side-card)!important;border-radius:10px!important;min-height:60px;padding:10px 12px!important}
.md\:group.group > button .text-sm.text-foreground{font-size:16px!important;font-weight:800!important;color:var(--im-side-ink)!important}
.md\:group.group > button .text-xs.text-muted-foreground{font-size:12px!important;color:var(--im-side-2)!important}
.h-full.flex-shrink-0 svg.lucide-star{color:var(--im-orange)!important;width:18px!important;height:18px!important;opacity:1}
.h-full.flex-shrink-0 .w-6.h-6.opacity-40{opacity:1!important}

/* дерево сеансов */
.ml-3.space-y-1.border-l{border-left:1.5px solid var(--im-side-line)!important;margin-left:14px!important;padding-left:12px!important}
.ml-3.space-y-1.border-l > button{height:40px!important;width:100%;justify-content:center;border-radius:999px!important;
  border:1.5px solid var(--im-green)!important;background:transparent!important;color:var(--im-side-ink)!important;font-size:15px!important;font-weight:700!important;gap:8px}
.ml-3.space-y-1.border-l > button svg{color:var(--im-green)!important;width:16px!important;height:16px!important}
.ml-3.space-y-1.border-l > button:hover{background:var(--im-green-bg)!important;color:var(--im-side-bg)!important}
.dark .ml-3.space-y-1.border-l > button:hover{color:var(--im-side-ink)!important}
.ml-3.space-y-1.border-l .group.relative a{min-height:56px;border-radius:10px!important;border:0!important;background:transparent!important;padding:8px 10px!important}
.ml-3.space-y-1.border-l .group.relative a:hover{background:var(--im-side-line)!important}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5{background:var(--im-side-active)!important}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .truncate.text-sm{font-weight:700!important}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background:var(--im-green)!important}
.ml-3.space-y-1.border-l .group.relative a[class*="border-green-500"] .text-\[11px\]{color:var(--im-orange)!important}
.ml-3.space-y-1.border-l .h-5.w-5.rounded-md{width:28px!important;height:28px!important;border-radius:7px!important;background:var(--im-side-line)!important}
.ml-3.space-y-1.border-l .truncate.text-sm{font-size:15px!important;font-weight:600!important;color:var(--im-side-ink)!important}
.ml-3.space-y-1.border-l .text-\[11px\]{font-size:12px!important;color:var(--im-side-2)!important}

/* низ сайдбара */
#ccDesign{color:var(--im-side-ink)!important;font-size:16px!important;font-weight:700!important}
.h-full.flex-shrink-0 .flex-shrink-0 button .text-sm, .h-full.flex-shrink-0 .flex-shrink-0 a .text-sm{font-size:15px!important;font-weight:600;color:var(--im-side-3)!important}
.h-full.flex-shrink-0 a[href*="github.com"], .h-full.flex-shrink-0 a[href*="discord"],
a[target="_blank"][href*="github.com"], a[target="_blank"][href*="discord"]{display:none!important}

/* ---------- 5. Шапка ---------- */
.pwa-header-safe{background:var(--im-surface)!important;border-bottom:1px solid var(--im-line)!important;min-height:64px;display:flex;align-items:center}
.pwa-header-safe > div{width:100%}
.pwa-header-safe h2{font-size:17px!important;font-weight:800!important;color:var(--im-ink)!important}
.pwa-header-safe h2 + div{font-size:13px!important;color:var(--im-ink-2)!important}
.pwa-header-safe .inline-flex.rounded-lg.bg-muted\/60{background:transparent!important;border:1.5px solid var(--im-seg-line);border-radius:999px!important;padding:3px!important}
.pwa-header-safe .inline-flex.rounded-lg.bg-muted\/60 button{border-radius:999px!important;height:28px;font-size:15px!important;font-weight:700!important;color:var(--im-ink)!important}
.pwa-header-safe .inline-flex.rounded-lg.bg-muted\/60 button.bg-background{background:var(--im-seg-active-bg)!important;color:var(--im-seg-active-ink)!important;box-shadow:none!important}

/* ---------- 6. Лента ---------- */
.chat-messages-pane{background:var(--im-bg)}
.chat-messages-pane > div{max-width:872px!important}

/* 6.1 текст ответа */
.chat-message.assistant .prose{font-size:17px!important;line-height:28px!important;font-weight:500;color:var(--im-ink)!important;font-synthesis:none;letter-spacing:.005em}
.chat-message.assistant .prose :is(p,li){margin-top:.35em!important;margin-bottom:.35em!important}
.chat-message.assistant .prose :is(h1,h2,h3,h4){font-weight:800!important;color:var(--im-ink)!important}
.chat-message.assistant .prose h3{font-size:20px!important;line-height:28px!important}
.chat-message.assistant .prose strong{font-weight:800!important;color:var(--im-ink)!important}
.chat-message.assistant .prose ul > li::marker{color:var(--im-green)!important;font-size:1.1em}
.chat-message.assistant .prose ol > li::marker{color:var(--im-green)!important;font-weight:800!important}
.chat-message.assistant .prose ul ul > li{list-style-type:circle}
.chat-message.assistant .prose :not(pre) > code{font-size:.82em!important;font-weight:700!important;background:var(--im-surface-2)!important;
  color:var(--im-ink)!important;border:0!important;border-radius:6px!important;padding:2px 6px!important}
.chat-message.assistant .prose a{color:var(--im-green-dk)!important}

/* строка автора ответа */
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .rounded-full{width:28px!important;height:28px!important;background:var(--im-green-bg)!important;padding:5px!important}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .text-sm:not(.rounded-full){font-size:15px!important;font-weight:800!important;color:var(--im-ink)!important}
.chat-message .text-\[11px\].text-gray-400{color:var(--im-ink-3)!important;font-size:12px!important}

/* 6.2 таблица */
.chat-message .prose table{background:var(--im-surface)!important;border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;
  border-collapse:separate!important;border-spacing:0!important;overflow:hidden;font-size:16px!important;line-height:26px!important}
.chat-message .prose thead{background:var(--im-th)!important}
.chat-message .prose thead:not(:has(th:not(:empty))){display:none!important}
.chat-message .prose :is(th,td){border:0!important;border-bottom:1px solid var(--im-line)!important;padding:12px 24px!important;color:var(--im-ink)!important;background:transparent!important}
.chat-message .prose th{font-weight:700!important;font-size:13px!important;letter-spacing:.04em;text-transform:uppercase;color:var(--im-ink-2)!important}
.chat-message .prose tr:last-child td{border-bottom:0!important}
.chat-message .prose td:first-child{color:var(--im-green)!important;font-weight:700!important}
.chat-message .prose td:nth-child(2){font-weight:600!important}

/* 6.5 сообщение пользователя */
.chat-message.user > div{max-width:min(600px,72%)!important}
.chat-message.user .rounded-br-md{position:relative!important;margin-top:22px;background:var(--im-user-bg)!important;border-radius:14px!important;
  padding:16px 20px!important;box-shadow:none!important;color:var(--im-side-ink)!important}
.chat-message.user .rounded-br-md > .whitespace-pre-wrap{font-size:16px!important;line-height:26px!important;font-weight:500;color:var(--im-side-ink)!important}
.chat-message.user .rounded-br-md > .text-xs{position:absolute!important;top:-22px;right:0;margin:0!important;color:var(--im-ink-2)!important;
  font-size:12px!important;font-weight:600;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.chat-message.user .rounded-br-md > .text-xs::before{content:"ВЫ ·";margin-right:4px;letter-spacing:1px}
.chat-message.user .rounded-br-md > .text-xs button{display:none!important}
.chat-message.user .rounded-br-md > .text-xs span{color:var(--im-ink-2)!important}
.chat-message.user .rounded-full{display:none!important}

/* 6.6 карточка команды (bash) */
.group\/cmd{background:var(--im-surface)!important;border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;
  opacity:1!important;backdrop-filter:none!important;box-shadow:none!important}
.group\/cmd:hover{border-color:var(--im-ink-2)!important}
.group\/cmd > [role=button]{min-height:44px;padding:10px 14px!important;gap:10px!important}
.group\/cmd > [role=button] > span.text-emerald-500{font-size:0!important;background:var(--im-green-bg);color:var(--im-green-dk)!important;
  border-radius:6px;height:22px;display:inline-flex;align-items:center;padding:0 8px}
.group\/cmd > [role=button] > span.text-emerald-500::before{content:"BASH";font-size:11px;font-weight:700;letter-spacing:1px;font-family:var(--im-sans)}
.group\/cmd code{font-size:13px!important;line-height:22px!important;color:var(--im-ink)!important}
.group\/cmd > [role=button] > span.tabular-nums{font-size:13px!important;font-weight:600;color:var(--im-ink-2)!important}
.group\/cmd > .truncate.italic{font-style:normal!important;font-size:14px!important;font-weight:600;color:var(--im-ink-2)!important;padding:0 14px 10px 14px!important}
.group\/cmd pre, .group\/cmd .font-mono:not(code){background:var(--im-bg)!important;font-size:13px!important;line-height:22px!important}
.dark .group\/cmd pre, .dark .group\/cmd .font-mono:not(code){background:var(--im-code-bg)!important;color:var(--im-code-text)!important}

/* 6.7 строка инструмента Read / Write / Edit */
.chat-message.tool > button{background:var(--im-surface)!important;border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;
  min-height:44px;padding:8px 14px!important;gap:10px!important}
.chat-message.tool > button:hover{border-color:var(--im-ink-2)!important}
.chat-message.tool > button > span.h-5.w-5{display:none!important}
.chat-message.tool > button > span.text-xs.font-medium.text-foreground{border:1.25px solid var(--im-seg-line);border-radius:999px;height:24px;
  display:inline-flex;align-items:center;padding:0 10px;font-size:13px!important;font-weight:700!important;color:var(--im-ink)!important}
.chat-message.tool > button > span.rounded-full.bg-muted{background:var(--im-surface-2)!important;color:var(--im-ink-2)!important;font-size:12px!important;font-weight:700!important;border-radius:6px!important}
.chat-message.tool > button > span.font-mono{font-size:13px!important;color:var(--im-ink-2)!important}
.chat-message.tool > button > span.text-\[10px\].text-muted-foreground\/40{display:none}
/* Write / Edit внутри ответа */
.chat-message .border-l-2.border-l-amber-500{border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;
  background:var(--im-surface)!important;padding:8px 12px!important;margin:6px 0!important}
.chat-message .border-l-2.border-l-amber-500 .font-medium.text-muted-foreground{border:1.25px solid var(--im-seg-line);border-radius:999px;
  padding:1px 10px;font-size:13px;font-weight:700!important;color:var(--im-ink)!important}
.chat-message .border-l-2.border-l-amber-500 button.font-mono{color:var(--im-ink-2)!important;font-size:13px}

/* 6.8 большой блок кода в ответе */
.chat-message .prose pre{background:var(--im-code-bg)!important;color:var(--im-code-text)!important;border-radius:var(--im-r-code)!important;
  border:1px solid transparent;padding:16px 20px!important;font-size:14px!important;line-height:22px!important;overflow-x:auto}
.dark .chat-message .prose pre{border-color:var(--im-line)!important}
.chat-message .prose pre code{background:transparent!important;color:inherit!important;font-weight:400!important;padding:0!important}

/* ---------- 7. Поле ввода ---------- */
.chat-composer-shell .max-w-\[54\.25rem\]{max-width:872px!important}
form[data-slot="prompt-input"]{background:var(--im-surface)!important;border:1px solid var(--im-line)!important;border-radius:var(--im-r-composer)!important;
  box-shadow:var(--im-shadow-composer)!important;backdrop-filter:none!important}
form[data-slot="prompt-input"]:focus-within{border-color:var(--im-ink-2)!important}
[data-slot="prompt-input-textarea"], [data-slot="prompt-input-body"] .chat-input-placeholder{font-size:16px!important;line-height:26px!important;padding:14px 18px 6px!important}
[data-slot="prompt-input-textarea"]::placeholder{color:var(--im-ink-2)!important;opacity:1}
[data-slot="prompt-input-footer"]{border-top:0!important;padding:8px 12px 12px!important}
[data-slot="prompt-input-tools"]{gap:8px!important;opacity:1!important}
[data-slot="prompt-input-footer"] .lg\:block.text-xs{display:none!important}
/* Auto Mode */
[data-slot="prompt-input-tools"] button[title*="режим"]{height:36px!important;border-radius:999px!important;border:0!important;padding:0 14px!important;
  background:var(--im-warn-bg)!important;color:var(--im-warn-ink)!important;font-size:14px!important;font-weight:700!important}
[data-slot="prompt-input-tools"] button[title*="режим"] .rounded-full{background:var(--im-orange)!important;width:8px!important;height:8px!important}
/* Effort */
[data-slot="prompt-input-tools"] button[aria-label="Select reasoning effort"]{height:36px!important;border-radius:999px!important;background:var(--im-surface)!important;
  border:1px solid var(--im-line)!important;padding:0 12px!important;font-size:14px!important;font-weight:700!important;color:var(--im-ink)!important}
[data-slot="prompt-input-tools"] button[aria-label="Select reasoning effort"] > span:first-child{font-size:11px!important;font-weight:600;letter-spacing:1px;text-transform:uppercase;color:var(--im-ink-2)!important}
/* Токены */
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"]{height:36px!important;border-radius:999px!important;background:var(--im-surface)!important;
  border:1px solid var(--im-line)!important;box-shadow:none!important;padding:0 12px!important}
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"] > span:first-child{background:transparent!important;color:var(--im-green)!important}
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"] > span:nth-child(2){font-size:14px!important;font-weight:800!important;color:var(--im-ink)!important}
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"] > span:nth-child(3){font-size:13px!important;color:var(--im-ink-2)!important;opacity:1}
[data-slot="prompt-input-tools"] .absolute.rounded-full.bg-primary{background:var(--im-green)!important;color:var(--im-side-ink)!important}
[data-slot="prompt-input-tools"] > .relative.inline-block > button, [data-slot="prompt-input-tools"] > button:first-child{color:var(--im-ink-2)!important}
/* отправка */
[data-slot="prompt-input-footer"] button[type=submit]{width:44px!important;height:44px!important;border-radius:12px!important;
  background:var(--im-green)!important;color:var(--im-side-ink)!important;opacity:1!important}
[data-slot="prompt-input-footer"] button[type=submit]:disabled{background:var(--im-th)!important;color:var(--im-ink-3)!important}
.dark [data-slot="prompt-input-footer"] button[type=submit]:disabled{background:var(--im-surface-2)!important}

/* ---------- 8. Пустое состояние нового сеанса ---------- */
.max-w-\[34\.25rem\] h2{font-size:32px!important;line-height:40px!important;font-weight:800!important;color:var(--im-ink)!important}
.max-w-\[34\.25rem\] h2 + p{font-size:16px!important;color:var(--im-ink-2)!important;margin-top:8px!important}
.max-w-\[34\.25rem\] [role=button].rounded-xl{max-width:520px!important;border-radius:12px!important;background:var(--im-surface)!important;
  border:1px solid var(--im-line)!important;box-shadow:none!important}
.max-w-\[34\.25rem\] [role=button].rounded-xl > div{padding:16px 18px!important;gap:14px!important}
.max-w-\[34\.25rem\] [role=button].rounded-xl > div > svg:first-child{width:36px!important;height:36px!important;padding:8px;border-radius:10px;background:var(--im-green-bg)}
.max-w-\[34\.25rem\] [role=button] span.font-semibold{font-size:17px!important;font-weight:800!important}
.max-w-\[34\.25rem\] [role=button] span.truncate{font-size:12px!important;font-weight:700!important;background:var(--im-green-bg);color:var(--im-green-ink)!important;
  border-radius:999px;padding:2px 10px}
.max-w-\[34\.25rem\] [role=button] p{font-size:13px!important;color:var(--im-ink-2)!important}
.max-w-\[34\.25rem\] > p{font-size:16px!important;color:var(--im-ink-2)!important}
.max-w-\[34\.25rem\] kbd{background:var(--im-surface-2)!important;border:1px solid var(--im-line)!important;border-radius:6px!important}

/* ---------- 9. Прочее ---------- */
button[aria-label="Открыть панель настроек"]{width:40px;height:48px;border-radius:10px 0 0 10px!important;background:var(--im-surface)!important;
  border:1px solid var(--im-line)!important;box-shadow:none!important}
button[aria-label="Открыть панель настроек"] svg{color:var(--im-ink)!important}

/* ---------- 10. Статус работы Claude и Stop (над полем ввода) ---------- */
.chat-composer-shell .chat-activity-tab{clip-path:none!important;border-radius:999px!important;border-width:1px!important;border-style:solid!important;
  height:36px!important;padding:0 14px!important;margin-bottom:8px;box-shadow:none!important;font-size:14px!important}
.chat-composer-shell div.chat-activity-tab{background:var(--im-warn-bg)!important;border-color:transparent!important;color:var(--im-warn-ink)!important;font-weight:700!important}
.chat-composer-shell div.chat-activity-tab > span.rounded-full{width:8px!important;height:8px!important;background:var(--im-orange)!important;box-shadow:0 0 0 5px color-mix(in srgb,var(--im-orange) 25%,transparent)}
.chat-composer-shell div.chat-activity-tab .tabular-nums{color:var(--im-warn-ink)!important;opacity:.85;font-weight:600}
.chat-composer-shell button.chat-activity-tab{background:var(--im-surface)!important;border:1.5px solid var(--im-red)!important;color:var(--im-red-dk)!important;font-weight:700!important;height:36px!important}
.chat-composer-shell button.chat-activity-tab svg{width:12px!important;height:12px!important}
.chat-composer-shell button.chat-activity-tab kbd{border-color:currentColor!important;color:var(--im-red-dk)!important;opacity:.8;font-size:11px!important;font-weight:700}
.chat-composer-shell button.chat-activity-tab:hover{background:color-mix(in srgb,var(--im-red) 8%,var(--im-surface))!important}
form[data-slot="prompt-input"].rounded-t-none{border-top-left-radius:var(--im-r-composer)!important;border-top-right-radius:var(--im-r-composer)!important}
/* пока Claude работает, кнопка отправки превращается в «стоп» — красный контур */
.chat-composer-shell:has(.chat-activity-tab) [data-slot="prompt-input-footer"] > div:last-child > button:last-child{
  background:var(--im-surface)!important;border:1.5px solid var(--im-red)!important;color:var(--im-red-dk)!important}
@media (prefers-reduced-motion:reduce){.chat-activity-tab .animate-pulse{animation:none!important}}

/* v3: статус и Stop — в потоке, над полем ввода: поднимают ленту, а не перекрывают её */
.chat-composer-shell > .pointer-events-none.absolute.bottom-full{
  position:static!important;transform:none!important;left:auto!important;bottom:auto!important;
  width:100%!important;max-width:872px!important;margin:0 auto!important;padding-top:10px}
.chat-composer-shell .chat-activity-enter, .chat-composer-shell .chat-activity-exit{filter:none!important}
.chat-composer-shell .chat-activity-tab{margin-bottom:10px!important}

/* v4: статус работы — строкой в конце ленты, как в claude.ai: без плашек, по левому краю колонки.
   Отдельная кнопка Stop скрыта — останавливает кнопка справа в поле ввода (красный контур) или Esc. */
.chat-composer-shell > .pointer-events-none.absolute.bottom-full{padding:4px 16px 12px!important;max-width:872px!important}
.chat-composer-shell .chat-activity-tab{margin:0!important}
.chat-composer-shell div.chat-activity-tab{background:transparent!important;border:0!important;padding:0!important;height:28px!important;
  gap:10px!important;color:var(--im-ink-2)!important;font-size:15px!important;font-weight:600!important}
.chat-composer-shell div.chat-activity-tab > span.rounded-full{box-shadow:0 0 0 4px color-mix(in srgb,var(--im-orange) 22%,transparent)!important}
.chat-composer-shell div.chat-activity-tab .tabular-nums{color:var(--im-ink-3)!important;font-weight:500!important;opacity:1}
.chat-composer-shell button.chat-activity-tab{display:none!important}
/* кнопка-стоп в поле ввода: квадрат внутри */
.chat-composer-shell:has(.chat-activity-tab) [data-slot="prompt-input-footer"] > div:last-child > button:last-child svg{color:var(--im-red-dk)!important;fill:currentColor}

/* v5: список файлов (пункты, где только `имя.файла`) — карточка файлов по макету (6.3) */
.chat-message .prose ul:has(> li > code:only-child){list-style:none!important;padding:0!important;margin:12px 0!important;
  background:var(--im-surface);border:1px solid var(--im-line);border-radius:var(--im-r-card);overflow:hidden}
.chat-message .prose ul:has(> li > code:only-child) > li{list-style:none!important;margin:0!important;padding:0 16px 0 56px!important;
  min-height:48px;display:flex;align-items:center;position:relative;border-bottom:1px solid var(--im-line)}
.chat-message .prose ul:has(> li > code:only-child) > li:last-child{border-bottom:0}
.chat-message .prose ul:has(> li > code:only-child) > li::marker{content:none!important}
.chat-message .prose ul:has(> li > code:only-child) > li::before{content:"";position:absolute;left:16px;top:50%;width:28px;height:28px;
  margin-top:-14px;border-radius:6px;background:var(--im-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338aa35' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 13h4M10 17h4'/%3E%3C/svg%3E") center/16px no-repeat}
.chat-message .prose ul:has(> li > code:only-child) > li > code{background:transparent!important;padding:0!important;font-family:var(--im-sans)!important;
  font-size:16px!important;font-weight:600!important;color:var(--im-ink)!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* инлайн-код в тексте (пути): жирнее и контрастнее, как в макете */
.chat-message.assistant .prose :not(pre) > code{font-weight:700!important;color:var(--im-ink)!important}

/* ===================== v6: правки по ревью Claude Design ===================== */

/* 1. Иконки сеансов и шапки без оранжевого: светлый значок в квадрате
      (неактивный — приглушённый, активный и в шапке — зелёный) */
.ml-3.space-y-1.border-l .h-5.w-5.rounded-md{background:var(--im-side-line)!important}
.ml-3.space-y-1.border-l .h-5.w-5.rounded-md svg{filter:brightness(0) invert(1);opacity:.85;width:16px!important;height:16px!important}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background:var(--im-green)!important}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md svg{opacity:1}
.dark .ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md svg{filter:brightness(0);opacity:.9}
.pwa-header-safe .h-5.w-5.flex-shrink-0{width:32px!important;height:32px!important;border-radius:8px;background:var(--im-green)}
.pwa-header-safe .h-5.w-5.flex-shrink-0 svg{filter:brightness(0) invert(1);width:18px!important;height:18px!important}
.dark .pwa-header-safe .h-5.w-5.flex-shrink-0 svg{filter:brightness(0)}

/* 2. Зелёная точка «сеанс активен» снаружи карточки — убрана (есть фон и зелёный значок) */
.h-full.flex-shrink-0 [role=status].rounded-full.bg-green-500{display:none!important}

/* 3. «Копировать» и время под ответами — заметнее, удобная «таблетка» 32px */
.chat-message.assistant .gap-0\.5.sm\:min-w-max{gap:6px!important;margin-top:6px}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child{height:32px;padding:0 12px!important;gap:8px!important;border-radius:999px!important;
  background:var(--im-surface)!important;border:1px solid var(--im-line)!important;color:var(--im-ink-2)!important;font-size:0!important}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child svg{width:16px!important;height:16px!important}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child::after{content:"Копировать";font-size:13px;font-weight:600;font-family:var(--im-sans)}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child:hover{border-color:var(--im-ink-2)!important;background:var(--im-surface-2)!important}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:nth-child(2){height:32px;width:32px;border-radius:999px!important;color:var(--im-ink-2)!important;
  display:inline-flex;align-items:center;justify-content:center}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:nth-child(2):hover{background:var(--im-surface-2)!important}
.chat-message .text-\[11px\].text-gray-400{color:var(--im-ink-2)!important;font-size:13px!important}

/* 4. Время сеанса — второй строкой под названием, название на всю ширину */
.ml-3.space-y-1.border-l .group.relative a .min-w-0.flex-1 > .flex.items-center.gap-2{flex-wrap:wrap;row-gap:2px}
.ml-3.space-y-1.border-l .group.relative a .min-w-0.flex-1 > .flex.items-center.gap-2 > .truncate{flex:1 0 100%}
.ml-3.space-y-1.border-l .group.relative a .min-w-0.flex-1 > .flex.items-center.gap-2 > span.ml-auto{margin-left:0!important;opacity:1!important}

/* 5. Фон основной области — #f7f7f7 (тёмная — свой слой); белые только карточки и поле ввода */
#root > .fixed.inset-0 > .flex.min-w-0.flex-1, #root > .fixed.inset-0 > .flex.min-w-0.flex-1 > .flex.h-full,
.chat-messages-pane, .chat-composer-shell{background:var(--im-bg)!important}

/* 8. Код в тексте — единый вид: JetBrains Mono 0.92em, фон --chip, скругление 4 */
.chat-message.assistant .prose :not(pre) > code{font-family:var(--im-mono)!important;font-size:.92em!important;font-weight:500!important;
  background:var(--im-surface-2)!important;color:var(--im-ink)!important;border-radius:4px!important;padding:1px 5px!important;letter-spacing:0!important}

/* 9. Кнопка «вниз» — круг 36, белый, с рамкой */
button.pointer-events-auto.rounded-full:has(> svg.lucide-arrow-down){width:36px!important;height:36px!important;background:var(--im-surface)!important;
  border:1px solid var(--im-line)!important;color:var(--im-ink)!important;box-shadow:none!important}
button.pointer-events-auto.rounded-full:has(> svg.lucide-arrow-down) svg{width:18px!important;height:18px!important}

/* ===================== v7 ===================== */
/* «MD» на кнопке «Копировать» больше не показывается */
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child > :not(svg){display:none!important}

/* Автор ответа в ленте: логотип «Имиджмарк» и подпись «Имиджмарк AI» вместо значка и имени Claude */
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .rounded-full{
  width:28px!important;height:28px!important;padding:0!important;border-radius:8px!important;
  background:url(/imagemark/logo_mark.png) center/cover no-repeat!important}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .rounded-full > *{display:none!important}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .text-sm:not(.rounded-full){font-size:0!important}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .text-sm:not(.rounded-full)::after{content:"Имиджмарк AI";font-size:15px;font-weight:800;color:var(--im-ink)}
/* логотип в шапке сеанса — тоже наш знак */
.pwa-header-safe .h-5.w-5.flex-shrink-0{background:url(/imagemark/logo_mark.png) center/cover no-repeat!important}
.pwa-header-safe .h-5.w-5.flex-shrink-0 > *{display:none!important}

/* ===================== v8 ===================== */
/* Значки сеансов: вместо логотипа Claude (после перекраски он становился белым квадратом) — значок чата */
.ml-3.space-y-1.border-l .h-5.w-5.rounded-md > svg{display:none!important}
.ml-3.space-y-1.border-l .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;
  background-position:center!important;background-size:16px!important;opacity:.9}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{opacity:1}
.dark .ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a101e' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important}

/* «Загрузить все сообщения» — спокойная зелёная «таблетка» вместо оранжевой кнопки */
.chat-messages-pane button[class*="bg-blue-"]{background:var(--im-green-bg)!important;color:var(--im-green-ink)!important;
  border:1px solid color-mix(in srgb,var(--im-green) 35%,transparent)!important;border-radius:999px!important;
  box-shadow:none!important;font-weight:700!important;font-size:13px!important;height:32px;padding:0 16px!important}
.chat-messages-pane button[class*="bg-blue-"]:hover{background:color-mix(in srgb,var(--im-green) 18%,var(--im-surface))!important}

/* Команды BASH в свёрнутом виде — одной строкой: главное — описание, сама команда серым в одну строку.
   Полностью команда видна, если нажать на карточку (раскрыть). */
.chat-message .group\/cmd > [role=button][aria-expanded="false"] code{white-space:nowrap!important;overflow:hidden!important;
  text-overflow:ellipsis!important;word-break:normal!important;max-height:22px;color:var(--im-ink-2)!important}
.chat-message .group\/cmd:has(> [role=button][aria-expanded="false"]) > .truncate.italic{color:var(--im-ink)!important}

/* ===================== v9 ===================== */
/* Название в сайдбаре — «Имиджмарк AI» (стилями, без правки кода панели) */
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1{font-size:0!important}
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1::after{content:"Имиджмарк AI";font-size:18px;font-weight:800;color:var(--im-side-ink);letter-spacing:-.01em}

/* ===================== v10 ===================== */
/* Название в сайдбаре и подпись автора: подмена текста без font-size:0 (из-за него текст обрезался и наезжал) */
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1{font-size:18px!important;color:transparent!important;position:relative;
  overflow:visible!important;text-overflow:clip!important;flex:none!important;width:150px;white-space:nowrap}
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1::after{position:absolute;left:0;top:50%;transform:translateY(-50%);
  font-size:17px;white-space:nowrap}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .text-sm:not(.rounded-full){font-size:15px!important;line-height:28px!important;
  color:transparent!important;position:relative;min-width:130px;white-space:nowrap;overflow:visible}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .text-sm:not(.rounded-full)::after{position:absolute;left:0;top:0;line-height:28px;
  white-space:nowrap}

/* Значок открытого сеанса: зелёный квадрат со значком чата (раньше значок пропадал) */
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background-color:var(--im-green)!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:center!important;background-size:16px!important}
.dark .ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a101e' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important}

/* v11: значок автора — ровно квадрат 28 с логотипом, без текста */
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .rounded-full{min-width:0!important;width:28px!important;flex:none!important;
  color:transparent!important;font-size:0!important;overflow:hidden}
.chat-message.assistant > .w-full > .mb-2.flex.items-center > .rounded-full::after{content:none!important}

/* =====================================================================
   v12 — макет Claude Design «версия 2» (design-spec v2): светлая + ночная тёмная
   ===================================================================== */
/* --- раскладка: сайдбар 288, лента 720, поле ввода 752 --- */
@media (min-width:768px){ #root > .fixed.inset-0 > .h-full.flex-shrink-0 .md\:w-72{width:288px!important} }
#root > .fixed.inset-0 > .h-full.flex-shrink-0{border-right:1px solid var(--im-side-border)!important}
.chat-messages-pane > div{max-width:720px!important}
.chat-composer-shell .max-w-\[54\.25rem\]{max-width:752px!important}
.chat-composer-shell{padding-bottom:16px!important}

/* --- сайдбар --- */
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1::after{font-size:17px!important;color:var(--im-side-ink)!important}
.flex.rounded-lg.bg-muted\/50.p-0\.5{height:34px;border:1px solid var(--im-side-line)!important}
.flex.rounded-lg.bg-muted\/50.p-0\.5 > button{height:26px!important;font-size:13px!important;color:var(--im-side-3)!important}
.flex.rounded-lg.bg-muted\/50.p-0\.5 > button.bg-background,
.dark .flex.rounded-lg.bg-muted\/50.p-0\.5 > button.bg-background{background:var(--im-tab-on)!important;color:var(--im-tab-on-ink)!important}
.h-full.flex-shrink-0 input[placeholder^="Поиск"]{height:38px!important;font-size:14px!important;color:var(--im-side-ink)!important}
.h-full.flex-shrink-0 div:has(> .md\:group.group)::before{content:"ПРОЕКТЫ";display:block;padding:8px 2px 8px;font-size:11px;
  font-weight:700;letter-spacing:.08em;color:var(--im-side-2);font-family:var(--im-sans)}
.md\:group.group > button{min-height:54px!important;padding:8px 12px!important}
.md\:group.group > button .text-sm.text-foreground{font-size:15px!important;font-weight:700!important}
.md\:group.group > button .text-xs.text-muted-foreground{font-size:11.5px!important}
.ml-3.space-y-1.border-l > button{background:var(--im-green-btn)!important;border:0!important;color:var(--im-on-green)!important;font-size:14px!important}
.ml-3.space-y-1.border-l > button svg{color:var(--im-on-green)!important}
.ml-3.space-y-1.border-l > button:hover{background:color-mix(in srgb,var(--im-green-btn) 88%,black)!important;color:var(--im-on-green)!important}
.dark .ml-3.space-y-1.border-l > button:hover{background:color-mix(in srgb,var(--im-green-btn) 85%,white)!important}
.ml-3.space-y-1.border-l .group.relative a{min-height:52px}
.ml-3.space-y-1.border-l .h-5.w-5.rounded-md{background-color:var(--im-side-card)!important;box-shadow:inset 0 0 0 1px var(--im-side-line)}
.ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background-color:var(--im-green)!important;box-shadow:none}
.dark .ml-3.space-y-1.border-l .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9cfda' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important}
.ml-3.space-y-1.border-l .truncate.text-sm{font-size:14px!important;color:var(--im-side-ink)!important}
.ml-3.space-y-1.border-l .text-\[11px\]{font-size:12px!important}
#ccDesign{font-size:15px!important;color:var(--im-side-ink)!important}

/* --- шапка 60 --- */
.pwa-header-safe{min-height:60px;background:var(--im-header)!important;border-bottom-color:var(--im-line)!important}
.pwa-header-safe h2{font-size:16px!important;font-weight:700!important}
.pwa-header-safe h2 + div{font-size:12px!important;color:var(--im-ink-2)!important}
.pwa-header-safe .h-5.w-5.flex-shrink-0{background:var(--im-green)!important;position:relative}
.pwa-header-safe .h-5.w-5.flex-shrink-0::after{content:"";position:absolute;inset:7px;background:var(--im-on-green);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center/contain no-repeat}
.pwa-header-safe .inline-flex.rounded-lg.bg-muted\/60{height:36px;background:var(--im-seg-bg)!important;border:1px solid var(--im-line)!important;align-items:center}
.pwa-header-safe .inline-flex.rounded-lg.bg-muted\/60 button{font-size:14px!important;font-weight:600!important;color:var(--im-seg-ink)!important}
.pwa-header-safe .inline-flex.rounded-lg.bg-muted\/60 button.bg-background{font-weight:700!important}

/* --- текст ленты 15.5/26 --- */
.chat-message.assistant .prose{font-size:15.5px!important;line-height:26px!important}
.chat-message.assistant .prose :is(h1,h2,h3,h4){font-size:17px!important;line-height:24px!important;margin:14px 0 6px!important}
.chat-message.assistant .prose li{margin:4px 0!important;line-height:25px!important}
.chat-message.assistant .prose ul > li::marker{font-size:.9em}
.chat-message.assistant .prose strong{color:inherit!important;font-weight:700!important}

/* --- таблица --- */
.chat-message .prose table{font-size:14px!important;line-height:22px!important}
.chat-message .prose :is(th,td){padding:10px 18px!important}
.chat-message .prose td:first-child{color:var(--im-green-ink-2)!important;font-weight:800!important}
.chat-message .prose td:nth-child(2){font-weight:700!important}
.chat-message .prose td:nth-child(n+3){font-weight:500!important}

/* --- карточка файлов: строки 40 --- */
.chat-message .prose ul:has(> li > code:only-child) > li{min-height:40px;padding-left:50px!important}
.chat-message .prose ul:has(> li > code:only-child) > li::before{left:14px;width:24px;height:24px;margin-top:-12px;background-color:var(--im-green-bg)!important;background-size:14px!important}
.chat-message .prose ul:has(> li > code:only-child) > li > code{font-size:14.5px!important}

/* --- «Копировать» 30 --- */
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child{height:30px}
.chat-message.assistant .gap-0\.5.sm\:min-w-max > button:first-child svg{width:14px!important;height:14px!important}

/* --- сообщение пользователя --- */
.chat-message.user > div{max-width:min(500px,80%)!important}
.chat-message.user .rounded-br-md{background:var(--im-user-bg)!important;padding:16px 20px!important;border-radius:var(--im-r-user)!important;color:var(--im-user-ink)!important}
.chat-message.user .rounded-br-md > .whitespace-pre-wrap{font-size:14.5px!important;line-height:24px!important;color:var(--im-user-ink)!important}
.chat-message.user .rounded-br-md > .text-xs{letter-spacing:0!important}
.chat-message.user .rounded-br-md > .text-xs::before{content:"Вы ·"!important;letter-spacing:0!important}

/* --- короткая команда: шапка «BASH + описание», ниже консоль с $ командой --- */
.chat-message .group\/cmd{display:flex!important;flex-direction:column;overflow:hidden}
.chat-message .group\/cmd > .truncate.italic{order:-1;display:flex;align-items:center;gap:10px;min-height:40px;padding:0 14px!important;
  font-size:13.5px!important;font-weight:600!important;font-style:normal!important;color:var(--im-ink-2)!important;white-space:nowrap}
.chat-message .group\/cmd > .truncate.italic::before{content:"›_ BASH";flex:none;height:22px;display:inline-flex;align-items:center;padding:0 8px;
  border-radius:6px;background:var(--im-tag-bg);color:var(--im-tag-ink);font:800 11px/1 var(--im-sans);letter-spacing:.06em}
.chat-message .group\/cmd > [role=button]{background:var(--im-console-bg)!important;border-top:1px solid var(--im-line);min-height:0!important;padding:10px 14px!important}
.chat-message .group\/cmd > [role=button] > span.text-emerald-500{font-size:13px!important;background:none!important;padding:0!important;height:auto!important;
  color:var(--im-green)!important;font-family:var(--im-mono)!important;font-weight:700}
.chat-message .group\/cmd > [role=button] > span.text-emerald-500::before{content:none!important}
.chat-message .group\/cmd code{font-size:13px!important;line-height:20px!important;color:var(--im-console-ink)!important}
.chat-message .group\/cmd > [role=button][aria-expanded="false"] code{white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;max-height:40px;color:var(--im-console-ink)!important}
.chat-message .group\/cmd > [role=button] > span.tabular-nums{font-size:12.5px!important;color:var(--im-ink-2)!important}
.chat-message .group\/cmd:has(> [role=button][aria-expanded="false"]) > .truncate.italic{color:var(--im-ink-2)!important}
/* (тёмный вариант раскрытой команды из v12 убран — см. v15) */

/* --- строки инструментов Read / Bash: глагол-«таблетка» с иконкой, шеврон справа --- */
.chat-message.tool > button{min-height:42px}
.chat-message.tool > button > svg:first-child{order:99;margin-left:auto;transform:none!important;color:var(--im-ink-2)!important}
.chat-message.tool > button > span.font-mono{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px!important}
.chat-message.tool > button > span.text-xs.font-medium.text-foreground{gap:6px;border-color:var(--im-verb-line)!important}
.chat-message.tool > button:has(> span.text-gray-500) > span.text-xs.font-medium.text-foreground::before{content:"";width:14px;height:14px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat}
.chat-message.tool > button:has(> span.text-green-500) > span.text-xs.font-medium.text-foreground{border:0!important;background:var(--im-tag-bg);color:var(--im-tag-ink)!important;
  height:22px;border-radius:6px;font-size:0!important;padding:0 8px}
.chat-message.tool > button:has(> span.text-green-500) > span.text-xs.font-medium.text-foreground::after{content:"›_ BASH";font:800 11px/1 var(--im-sans);letter-spacing:.06em}
/* Write / Edit */
.chat-message .border-l-2.border-l-amber-500 .font-medium.text-muted-foreground{display:inline-flex;align-items:center;gap:6px;border-color:var(--im-verb-line)!important}
.chat-message .border-l-2.border-l-amber-500 .font-medium.text-muted-foreground::before{content:"";width:13px;height:13px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center/contain no-repeat}

/* --- «Подумал несколько секунд» --- */
.chat-message .not-prose > button.w-full.items-center.gap-2{font-size:13px!important;font-weight:600;color:var(--im-ink-2)!important;gap:8px!important}
.chat-message .not-prose > button.w-full.items-center.gap-2 > svg:first-child{display:none}
.chat-message .not-prose > button.w-full.items-center.gap-2::before{content:"";width:16px;height:16px;flex:none;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V17h6v-.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V17h6v-.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2Z'/%3E%3C/svg%3E") center/contain no-repeat}
.chat-message .not-prose > button.w-full.items-center.gap-2 p{font-size:13px!important;margin:0!important}

/* --- статус работы: плашка слева, Stop справа, 20 px до поля ввода --- */
.chat-composer-shell > .pointer-events-none.absolute.bottom-full{max-width:720px!important;padding:0 0 20px!important}
.chat-composer-shell div.chat-activity-tab{background:var(--im-warn-bg)!important;border:1px solid var(--im-warn-line)!important;border-radius:999px!important;
  height:34px!important;padding:0 14px!important;gap:10px!important;color:var(--im-warn-ink)!important;font-size:13.5px!important;font-weight:700!important}
.chat-composer-shell div.chat-activity-tab .tabular-nums{color:var(--im-warn-ink)!important;font-size:13px!important;font-weight:600!important;opacity:1!important}
.chat-composer-shell div.chat-activity-tab > span.rounded-full{box-shadow:none!important}
.chat-composer-shell button.chat-activity-tab{display:inline-flex!important;height:34px!important;background:var(--im-stop-bg)!important;border:1.5px solid var(--im-red)!important;
  color:var(--im-red-dk)!important;font-size:13.5px!important;font-weight:700!important;padding:0 12px!important;border-radius:999px!important}
.chat-composer-shell button.chat-activity-tab kbd{border:0!important;background:none!important;color:var(--im-red-dk)!important;font-size:11px!important;font-weight:700!important;opacity:1}
@keyframes im-pulse{0%,100%{opacity:1}50%{opacity:.35}}
.chat-composer-shell div.chat-activity-tab > span.rounded-full{animation:im-pulse 1.2s ease-in-out infinite!important}

/* --- поле ввода 752 × радиус 16 --- */
form[data-slot="prompt-input"]{border-radius:var(--im-r-composer)!important;box-shadow:var(--im-shadow-composer)!important}
[data-slot="prompt-input-textarea"]{font-size:15px!important}
[data-slot="prompt-input-textarea"]::placeholder{color:var(--im-ink-3)!important}
[data-slot="prompt-input-tools"] button[title*="режим"], [data-slot="prompt-input-tools"] button[aria-label="Select reasoning effort"],
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"]{height:34px!important;font-size:13px!important}
[data-slot="prompt-input-tools"] button[aria-label="Select reasoning effort"] > span:first-child{font-size:10.5px!important;font-weight:700!important;letter-spacing:.08em}
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"] > span:nth-child(2){font-size:13px!important}
[data-slot="prompt-input-tools"] button[aria-label="Show token usage"] > span:nth-child(3){font-size:12.5px!important}
[data-slot="prompt-input-tools"] > button:first-child > svg{visibility:hidden}
[data-slot="prompt-input-tools"] > button:first-child{position:relative}
[data-slot="prompt-input-tools"] > button:first-child::after{content:"";position:absolute;inset:0;margin:auto;width:18px;height:18px;background:var(--im-ink-2);
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.4 11.6-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.4 11.6-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5'/%3E%3C/svg%3E") center/contain no-repeat}
[data-slot="prompt-input-footer"] button[type=submit]{width:42px!important;height:42px!important;position:relative;background:var(--im-green-btn)!important;color:var(--im-on-green)!important}
[data-slot="prompt-input-footer"] button[type=submit]:disabled{background:var(--im-send-idle)!important;color:var(--im-send-idle-ink)!important;opacity:1!important}
[data-slot="prompt-input-footer"] button[type=submit] > svg{visibility:hidden}
[data-slot="prompt-input-footer"] button[type=submit]::after{content:"";position:absolute;inset:0;margin:auto;width:18px;height:18px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='m5 12 7-7 7 7'/%3E%3C/svg%3E") center/contain no-repeat}

/* --- пустой экран нового сеанса --- */
.max-w-\[34\.25rem\] h2{font-size:30px!important;line-height:38px!important}
.max-w-\[34\.25rem\] h2 + p{font-size:15.5px!important}
.max-w-\[34\.25rem\] [role=button].rounded-xl{max-width:460px!important;min-height:72px;border-radius:12px!important;box-shadow:var(--im-shadow-card)!important}
.max-w-\[34\.25rem\] [role=button] span.truncate{font-size:11.5px!important;color:var(--im-green-ink)!important}
.max-w-\[34\.25rem\] > p{font-size:14px!important;color:var(--im-ink-3)!important}

/* --- кнопка правой панели 36×44 --- */
button[aria-label="Открыть панель настроек"]{width:36px!important;height:44px!important;border-radius:10px!important}

/* --- движение --- */
button:active{transform:scale(.98)}
@media (prefers-reduced-motion:reduce){.chat-composer-shell div.chat-activity-tab > span.rounded-full{animation:none!important}button:active{transform:none}}
.dark .ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3ece3' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important}

/* ===================== v13 — поддержка скрипта текстов (im-texts.js) ===================== */
/* сеанс в работе: оранжевая точка перед «N мин · в работе», время обычным цветом */
.ml-3.space-y-1.border-l .group.relative a[data-im-running] .text-\[11px\]{color:var(--im-side-2)!important}
.ml-3.space-y-1.border-l .group.relative a[data-im-running] span.text-\[11px\]::before{content:"";display:inline-block;width:7px;height:7px;
  border-radius:50%;background:var(--im-orange);margin-right:6px;vertical-align:1px}
/* длинное сообщение пользователя: 4 строки + «Показать полностью ⌄ / ещё N строк» */
.chat-message.user .rounded-br-md[data-im-long]{padding-bottom:56px!important;cursor:default}
.chat-message.user .rounded-br-md[data-im-long]:not([data-im-open]) > .whitespace-pre-wrap{display:-webkit-box!important;-webkit-line-clamp:4;
  -webkit-box-orient:vertical;overflow:hidden}
.chat-message.user .rounded-br-md[data-im-long]::after{content:"Показать полностью ⌄";position:absolute;left:20px;right:20px;bottom:0;height:44px;
  display:flex;align-items:center;border-top:1px solid var(--im-user-line);font:700 13.5px/1 var(--im-sans);color:var(--im-user-ink);cursor:pointer}
.chat-message.user .rounded-br-md[data-im-long][data-im-open]::after{content:"Свернуть ⌃"}
.chat-message.user .rounded-br-md[data-im-long]::before{content:attr(data-im-more);position:absolute;right:20px;bottom:0;height:44px;display:flex;
  align-items:center;font:500 12.5px/1 var(--im-sans);color:var(--im-user-muted);pointer-events:none;z-index:1}
.chat-message.user .rounded-br-md[data-im-long][data-im-open]::before{content:none}

/* ===================== v14 ===================== */
/* Название «Имиджмарк AI» слева сверху: ширина по тексту, не наезжает на кнопки */
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1{font-size:0!important;width:auto!important;min-width:0!important;flex:none!important;
  display:inline-flex!important;overflow:visible!important;margin-right:6px}
#root .h-7.w-7.rounded-lg.bg-primary\/90 + h1::after{position:static!important;transform:none!important;font-size:16px!important;letter-spacing:-.015em}

/* Ширина ленты под широкие экраны: 720 на узких, ~960 на 1920, до 1100 на 2К и шире */
:root{--im-feed:clamp(720px,50vw,1100px)}
.chat-messages-pane > div{max-width:var(--im-feed)!important}
.chat-composer-shell .max-w-\[54\.25rem\]{max-width:calc(var(--im-feed) + 32px)!important}
.chat-composer-shell > .pointer-events-none.absolute.bottom-full{max-width:var(--im-feed)!important}
.chat-message.user > div{max-width:min(640px,75%)!important}

/* ===================== v15 — раскрытая команда: светлый «терминал» ===================== */
/* Разметка панели: [строка команды] + [блок: описание, результат]. Блок «растворяем» (display:contents),
   чтобы поднять описание в шапку, а результат оставить под командой. */
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]){background:var(--im-surface)!important;border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;box-shadow:none!important}
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter{display:contents!important}
/* шапка: ›_ BASH + описание */
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter > div.italic{order:-2;display:flex;align-items:center;gap:10px;min-height:42px;padding:0 14px!important;margin:0!important;
  font-size:13.5px!important;font-weight:600!important;font-style:normal!important;color:var(--im-ink-2)!important;background:var(--im-surface)!important;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter > div.italic::before{content:"›_ BASH";flex:none;height:22px;display:inline-flex;align-items:center;padding:0 8px;border-radius:6px;
  background:var(--im-tag-bg);color:var(--im-tag-ink);font:800 11px/1 var(--im-sans);letter-spacing:.06em}
/* если описания нет — метка BASH всё равно видна в строке команды */
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]):not(:has(div.italic)) > [role=button]::before{content:"›_ BASH";order:-1;flex:none;height:22px;display:inline-flex;align-items:center;padding:0 8px;
  border-radius:6px;background:var(--im-tag-bg);color:var(--im-tag-ink);font:800 11px/1 var(--im-sans);letter-spacing:.06em;margin-right:4px}
/* тело команды: светлая консоль, $ у первой строки, без переноса посреди слов, до ~14 строк */
.chat-message .group\/cmd > [role=button][aria-expanded="true"]{order:-1;align-items:flex-start!important;background:var(--im-console-bg)!important;
  border-top:1px solid var(--im-line)!important;padding:12px 14px!important}
.chat-message .group\/cmd > [role=button][aria-expanded="true"] > svg:first-child{margin-top:3px}
.chat-message .group\/cmd > [role=button][aria-expanded="true"] > span.text-emerald-500{line-height:20px!important}
.chat-message .group\/cmd > [role=button][aria-expanded="true"] code{white-space:pre!important;word-break:normal!important;overflow:auto!important;max-height:290px;
  color:var(--im-console-ink)!important;font-size:13px!important;line-height:20px!important;padding-bottom:2px}
/* кнопка «Копировать команду» всегда видна */
.chat-message .group\/cmd > [role=button] > button[aria-label="Copy command"]{opacity:1!important;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--im-line)!important;border-radius:8px!important;background:var(--im-surface)!important;color:var(--im-ink-2)!important;margin-top:-4px}
.chat-message .group\/cmd > [role=button] > button[aria-label="Copy command"]:hover{color:var(--im-ink)!important;border-color:var(--im-ink-2)!important}
.chat-message .group\/cmd > [role=button][aria-expanded="false"] > button[aria-label="Copy command"]{margin-top:0}
/* результат выполнения: отдельной секцией, мельче, до ~10 строк */
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter > pre{order:1;margin:0!important;background:var(--im-surface)!important;border-top:1px solid var(--im-line)!important;
  padding:10px 14px 12px!important;max-height:220px!important;font-size:12.5px!important;line-height:19px!important;color:var(--im-ink-2)!important;
  white-space:pre-wrap!important;word-break:break-word!important}
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter > pre::before{content:"Результат";display:block;margin-bottom:4px;font:700 10.5px/1.6 var(--im-sans);letter-spacing:.08em;
  text-transform:uppercase;color:var(--im-ink-3)}
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter > pre:empty{display:none}
/* отменяем прежний тёмный вариант (v12) */
.chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) :is(pre,.font-mono){background:transparent}
.chat-message .group\/cmd > [role=button][aria-expanded="true"] > span.tabular-nums{color:var(--im-ink-2)!important}

/* ===================== v15 — строки инструментов внутри ответа (Read / WebSearch / Grep …) ===================== */
.chat-message .border-l-2:is(.border-l-muted-foreground\/40,.border-l-violet-500,.border-l-purple-500,.border-l-indigo-500,.border-l-green-500){
  border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;background:var(--im-surface)!important;
  padding:6px 12px!important;margin:6px 0!important;min-height:38px;display:flex;align-items:center}
.chat-message .border-l-2.border-l-muted-foreground\/40 :is(.font-medium,.text-muted-foreground):not(.font-mono):first-of-type{
  display:inline-flex;align-items:center;gap:6px;border:1.25px solid var(--im-verb-line);border-radius:999px;padding:1px 10px;
  font-size:12.5px!important;font-weight:700!important;color:var(--im-ink)!important}
.chat-message .border-l-2.border-l-muted-foreground\/40 :is(.font-medium,.text-muted-foreground):not(.font-mono):first-of-type::before{content:"";width:13px;height:13px;
  background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat}
.chat-message .border-l-2:is(.border-l-muted-foreground\/40,.border-l-green-500) .font-mono{color:var(--im-ink-2)!important;font-size:12.5px!important}

/* =====================================================================
   v16 — тёмная тема «графит»: нейтральные серые, высокий контраст, чистые акценты
   (заменяет ночную синюю тему из v12)
   ===================================================================== */
.dark{
  --im-green:#3fae3c; --im-green-btn:#277a25; --im-green-dk:#8fdc8c; --im-green-ink:#8fdc8c; --im-green-ink-2:#7fd37c; --im-green-bg:#1f3320; --im-on-green:#ffffff;
  --im-orange:#f5a524; --im-warn-bg:#3a2d17; --im-warn-ink:#f5c56b; --im-warn-line:#4d3b1c;
  --im-red:#ef6b64; --im-red-dk:#ff9a94; --im-stop-bg:#26282c;
  --im-side-bg:#151618; --im-side-card:#222326; --im-side-line:#2f3135; --im-side-active:#2c2e32; --im-side-border:#2a2c30;
  --im-pill-line:#3a3d43; --im-side-ink:#ececed; --im-side-2:#a9adb4; --im-side-3:#c8cbd0; --im-tab-on:#3a3d43; --im-tab-on-ink:#ffffff;
  --im-bg:#1c1d20; --im-header:#202124; --im-surface:#26282c; --im-surface-2:#2e3035; --im-line:#3a3d43; --im-th:#2b2d31;
  --im-ink:#ececed; --im-ink-2:#b6bac1; --im-ink-3:#9a9ea6;
  --im-seg-bg:#26282c; --im-seg-active-bg:#3a3d43; --im-seg-active-ink:#ffffff; --im-seg-ink:#c8cbd0; --im-seg-line:#b6bac1;
  --im-user-bg:#34363b; --im-user-ink:#f3f3f4; --im-user-muted:#b6bac1; --im-user-line:#46494f;
  --im-console-bg:#161719; --im-console-ink:#e6e8eb; --im-tag-bg:#1f3320; --im-tag-ink:#8fdc8c; --im-verb-line:#b6bac1;
  --im-send-idle:#2e3035; --im-send-idle-ink:#9a9ea6;
  --im-code-bg:#161719; --im-code-border:#3a3d43; --im-code-head-line:#2e3035; --im-code-head-ink:#ececed; --im-code-copy-line:#3a3d43;
  --im-code-text:#e6e8eb; --im-code-muted:#a9adb4; --im-code-tag-bg:#1f3320; --im-code-tag-ink:#8fdc8c;
  --im-shadow-composer:0 2px 0 rgba(0,0,0,.25); --im-shadow-card:none;
  --background:225 7% 12%!important;--foreground:240 3% 93%!important;--card:220 7% 16%!important;--card-foreground:240 3% 93%!important;--popover:220 7% 16%!important;--popover-foreground:240 3% 93%!important;--primary:118 49% 46%!important;--primary-foreground:0 0% 100%!important;--secondary:223 7% 19%!important;--secondary-foreground:240 3% 93%!important;--muted:223 7% 19%!important;--muted-foreground:218 8% 74%!important;--accent:223 7% 19%!important;--accent-foreground:240 3% 93%!important;--border:220 7% 25%!important;--input:220 7% 25%!important;--ring:118 49% 46%!important;
}
.dark #root > .fixed.inset-0 > .h-full.flex-shrink-0{ --background:220 7% 9%!important;--foreground:240 3% 93%!important;--card:225 6% 14%!important;--card-foreground:240 3% 93%!important;--popover:225 6% 14%!important;--popover-foreground:240 3% 93%!important;--primary:118 49% 46%!important;--primary-foreground:0 0% 100%!important;--secondary:225 6% 14%!important;--secondary-foreground:240 3% 93%!important;--muted:225 6% 14%!important;--muted-foreground:218 7% 68%!important;--accent:225 6% 14%!important;--accent-foreground:240 3% 93%!important;--border:220 6% 20%!important;--input:220 6% 20%!important;--ring:118 49% 46%!important; }
/* значки сеансов в графите */
.dark .ml-3.space-y-1.border-l .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8cbd0' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important}
.dark .ml-3.space-y-1.border-l .group.relative a.bg-primary\/5 .h-5.w-5.rounded-md{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E")!important}
/* читаемость в тёмной теме */
.dark .chat-message.assistant .prose{color:var(--im-ink)!important;font-weight:450}
.dark .chat-message.assistant .prose :not(pre) > code{background:var(--im-surface-2)!important;color:#f3f3f4!important}
.dark .chat-message .prose pre{background:var(--im-code-bg)!important;border:1px solid var(--im-line)!important;color:var(--im-code-text)!important}
.dark .chat-message .prose pre code{color:var(--im-code-text)!important}
.dark .chat-message .group\/cmd code, .dark .chat-message .group\/cmd pre{color:var(--im-console-ink)!important}
.dark .chat-message .group\/cmd:has(> [role=button][aria-expanded="true"]) > .settings-content-enter > pre{color:var(--im-ink-2)!important;background:var(--im-surface)!important}
.dark .chat-message .prose table{background:var(--im-surface)!important}
.dark .chat-message .prose thead{background:var(--im-th)!important}
.dark form[data-slot="prompt-input"]{background:var(--im-surface)!important}
.dark .chat-messages-pane, .dark .chat-composer-shell, .dark #root > .fixed.inset-0 > .flex.min-w-0.flex-1{background:var(--im-bg)!important}

/* ===================== v17 ===================== */
/* 1. Ширина ленты — среднее: ~845 на 1920, до 960 на 2К */
:root{--im-feed:clamp(720px,44vw,960px)}

/* 2. Без зелёной полосы: обводка фокуса у карточек команд и строк инструментов не рисуется снаружи
      (рамка карточки её обрезала, и оставалась полоса) */
.chat-message .group\/cmd [role=button]:focus, .chat-message .group\/cmd [role=button]:focus-visible,
.chat-message.tool > button:focus, .chat-message.tool > button:focus-visible{outline:none!important;box-shadow:none!important}
.chat-message .group\/cmd:focus-within{border-color:var(--im-ink-2)!important}

/* 3. Без полос прокрутки в раскрытой команде: строки переносятся по словам, высота — по содержимому */
.chat-message .group\/cmd > [role=button][aria-expanded="true"] code{white-space:pre-wrap!important;word-break:normal!important;
  overflow-wrap:anywhere!important;overflow:visible!important;max-height:none!important}
/* результат выполнения: если длинный — тонкая неброская прокрутка */
.chat-message .group\/cmd pre, .chat-message .prose pre{scrollbar-width:thin;scrollbar-color:var(--im-line) transparent}
.chat-message .group\/cmd pre::-webkit-scrollbar, .chat-message .prose pre::-webkit-scrollbar{width:6px;height:6px}
.chat-message .group\/cmd pre::-webkit-scrollbar-thumb, .chat-message .prose pre::-webkit-scrollbar-thumb{background:var(--im-line);border-radius:3px}
.chat-message .group\/cmd pre::-webkit-scrollbar-track, .chat-message .prose pre::-webkit-scrollbar-track{background:transparent}

/* ===================== v18 — подсветка кода (скрипт im-texts v3, CSS Custom Highlight API) ===================== */
/* светлая тема: консоль команд светлая, блоки кода в ответах тёмно-синие */
.chat-message .group\/cmd code::highlight(im-str){color:#1f7a1c}
.chat-message .group\/cmd code::highlight(im-kw){color:#b05a00}
.chat-message .group\/cmd code::highlight(im-cmd){color:#7b3fa0}
.chat-message .group\/cmd code::highlight(im-fn){color:#1f5fbf}
.chat-message .group\/cmd code::highlight(im-com){color:#7a808c}
.chat-message .group\/cmd code::highlight(im-num){color:#b44a00}
.chat-message .prose pre code::highlight(im-str), .chat-message .prose pre::highlight(im-str){color:#8fd88c}
.chat-message .prose pre code::highlight(im-kw), .chat-message .prose pre::highlight(im-kw){color:#ffb84d}
.chat-message .prose pre code::highlight(im-cmd), .chat-message .prose pre::highlight(im-cmd){color:#e4c8ff}
.chat-message .prose pre code::highlight(im-fn), .chat-message .prose pre::highlight(im-fn){color:#9fc6ff}
.chat-message .prose pre code::highlight(im-com), .chat-message .prose pre::highlight(im-com){color:#8d95a6}
.chat-message .prose pre code::highlight(im-num), .chat-message .prose pre::highlight(im-num){color:#ffb38a}
/* тёмная тема «графит» */
.dark .chat-message .group\/cmd code::highlight(im-str), .dark .chat-message .prose pre code::highlight(im-str), .dark .chat-message .prose pre::highlight(im-str){color:#8fdc8c}
.dark .chat-message .group\/cmd code::highlight(im-kw), .dark .chat-message .prose pre code::highlight(im-kw), .dark .chat-message .prose pre::highlight(im-kw){color:#f0b35a}
.dark .chat-message .group\/cmd code::highlight(im-cmd), .dark .chat-message .prose pre code::highlight(im-cmd), .dark .chat-message .prose pre::highlight(im-cmd){color:#d2a8ff}
.dark .chat-message .group\/cmd code::highlight(im-fn), .dark .chat-message .prose pre code::highlight(im-fn), .dark .chat-message .prose pre::highlight(im-fn){color:#8fb8ff}
.dark .chat-message .group\/cmd code::highlight(im-com), .dark .chat-message .prose pre code::highlight(im-com), .dark .chat-message .prose pre::highlight(im-com){color:#8b9099}
.dark .chat-message .group\/cmd code::highlight(im-num), .dark .chat-message .prose pre code::highlight(im-num), .dark .chat-message .prose pre::highlight(im-num){color:#f5a07a}

/* ===================== v19 — остальные строки инструментов (WebSearch, вопросы и пр.) — такие же карточки ===================== */
.chat-message .border-l-2:is(.border-l-border,.border-l-blue-500){border:1px solid var(--im-line)!important;border-radius:var(--im-r-card)!important;
  background:var(--im-surface)!important;padding:6px 12px!important;margin:6px 0!important;min-height:38px}
.chat-message .border-l-2:is(.border-l-border,.border-l-blue-500) :is(summary,button){color:var(--im-ink-2)!important;font-size:13px!important}
.chat-message .border-l-2:is(.border-l-border,.border-l-blue-500) :is(summary,button) > :is(span,p):first-of-type{color:var(--im-ink)!important;font-weight:700!important}


/* ===================== v20–v21 — спокойнее контраст в светлой теме ===================== */
/* 1. Ваше сообщение: мягкий синий фон вместо тёмно-синего, тёмный текст (тёмная тема без изменений) */
html:not(.dark){--im-user-bg:#e3e9f3;--im-user-ink:#152037;--im-user-muted:#5a6273;--im-user-line:#cbd4e3}
html:not(.dark) .chat-message.user .rounded-br-md{color:var(--im-user-ink)!important}
html:not(.dark) .chat-message.user .rounded-br-md > .whitespace-pre-wrap{color:var(--im-user-ink)!important}

/* 2. «Вы · время» над коротким сообщением больше не сжимается в столбик и не наезжает на пузырь */
.chat-message.user .rounded-br-md > .text-xs{white-space:nowrap!important;width:max-content!important;max-width:none!important}

/* 3. Блок кода в ответе: мягкий серый без рамки (вариант B, v21) вместо тёмно-синей плашки */
html:not(.dark) .chat-message .prose div.group.my-3.rounded-xl{background:#eaedf2!important;border:0!important;box-shadow:none!important}
html:not(.dark) .chat-message .prose div.group.my-3.rounded-xl > pre{background:transparent!important;border:0!important}
html:not(.dark) .chat-message .prose pre{background:#eaedf2!important;border:0!important;color:var(--im-ink)!important}
html:not(.dark) .chat-message .prose pre code{color:var(--im-ink)!important}
html:not(.dark) .chat-message .prose pre code::highlight(im-str), html:not(.dark) .chat-message .prose pre::highlight(im-str){color:#1f7a1c}
html:not(.dark) .chat-message .prose pre code::highlight(im-kw), html:not(.dark) .chat-message .prose pre::highlight(im-kw){color:#b05a00}
html:not(.dark) .chat-message .prose pre code::highlight(im-cmd), html:not(.dark) .chat-message .prose pre::highlight(im-cmd){color:#7b3fa0}
html:not(.dark) .chat-message .prose pre code::highlight(im-fn), html:not(.dark) .chat-message .prose pre::highlight(im-fn){color:#1f5fbf}
html:not(.dark) .chat-message .prose pre code::highlight(im-com), html:not(.dark) .chat-message .prose pre::highlight(im-com){color:#7a808c}
html:not(.dark) .chat-message .prose pre code::highlight(im-num), html:not(.dark) .chat-message .prose pre::highlight(im-num){color:#b44a00}

/* ===================== v22 — без кнопки обновления панели ===================== */
/* Обновление делает только администратор (im-keep-v1.sh --update), адрес /api/system/update закрыт в Caddy.
   Прячем плашку «Доступно обновление» внизу сайдбара (компьютер и телефон) и значок в свёрнутом сайдбаре:
   через них открывается окно с кнопкой «Обновить сейчас». */
.nav-divider:has(+ div > button > div > svg.lucide-circle-arrow-up){display:none!important}
div:has(> button > div > svg.lucide-circle-arrow-up){display:none!important}
button:has(> svg.lucide-sparkles):has(> span.animate-pulse){display:none!important}


/* ===================== v23 — правки v20–v21 и для тёмной темы ===================== */
/* 1. Ваше сообщение: мягкий сине-графитовый фон вместо серого пузыря (как мягкий синий в светлой теме) */
html.dark{--im-user-bg:#27303d;--im-user-ink:#e3e8ef;--im-user-muted:#a9b2c1;--im-user-line:#3a4557}
html.dark .chat-message.user .rounded-br-md{background:var(--im-user-bg)!important;color:var(--im-user-ink)!important}
html.dark .chat-message.user .rounded-br-md > .whitespace-pre-wrap{color:var(--im-user-ink)!important}
/* 2. Блок кода в ответе: мягкий серый без рамки (как вариант B в светлой теме) */
html.dark .chat-message .prose div.group.my-3.rounded-xl{background:#26282c!important;border:0!important;box-shadow:none!important}
html.dark .chat-message .prose div.group.my-3.rounded-xl > pre{background:transparent!important;border:0!important}
html.dark .chat-message .prose pre{background:#26282c!important;border:0!important}
