/* ============================================================================
   «Помощник по CRM» (25.11.2026) — стили crm-helper.js (window.HLP). Префикс hlp-.
   Язычок у правого края → панель снизу справа (неблокирующая, поверх модалок CRM: панель 100060, ниже окна подтверждения
   100100, лайтбокса правок 100120, календаря 100130 и меню выпадашек), на телефоне — лист на весь экран.
   Цвета — токены --h-* на .hlp-root (тёмная тема — body[data-theme="dark"]), акцент — синий CRM.
   Цветная метка слева — только «ровной планкой» ::before (скилл ui-polish), чекбоксы рисует ui-controls.css.
   ============================================================================ */

.hlp-root {
    --h-bg: #ffffff;
    --h-surface: #f5f7fa;
    --h-surface2: #edf0f4;
    --h-line: #e3e7ee;
    --h-line2: #eceff4;
    --h-ink: #111827;
    --h-ink2: #374151;
    --h-mut: #667085;
    --h-faint: #98a2b3;
    --h-acc: #074783;
    --h-acc2: #0b5aa6;
    --h-acc-soft: #eaf1f9;
    --h-acc-ink: #074783;
    --h-on-acc: #ffffff;
    --h-q-bg: #0b4f8f;
    --h-q-ink: #ffffff;
    --h-ok: #15803d;
    --h-ok-soft: #ecfdf3;
    --h-warn: #b45309;
    --h-warn-soft: #fff6e5;
    --h-bad: #b42318;
    --h-bad-soft: #fef3f2;
    --h-dot: #f0643a;
    --h-rec: #ef4444;
    --h-tab-bg: #eceff3;
    --h-tab-bd: #dce1e8;
    --h-tab-ic: #79839a;
    --h-tip-bg: #111827;
    --h-tip-ink: #f3f4f6;
    --h-shadow: 0 30px 70px -20px rgba(15, 23, 42, .38), 0 12px 30px -12px rgba(15, 23, 42, .2), 0 0 0 1px rgba(15, 23, 42, .06);
    --h-card-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 0 0 1px var(--h-line2);
    --h-ease: cubic-bezier(.2, .8, .2, 1);
    --h-spring: cubic-bezier(.34, 1.36, .5, 1);
    font-family: inherit;
}
body[data-theme="dark"] .hlp-root {
    --h-bg: #182131;
    --h-surface: #121a27;
    --h-surface2: #222d40;
    --h-line: #2b374c;
    --h-line2: #243045;
    --h-ink: #e7ebf2;
    --h-ink2: #c7cfdb;
    --h-mut: #95a1b4;
    --h-faint: #6b788d;
    --h-acc: #4a9eff;
    --h-acc2: #6db3ff;
    --h-acc-soft: rgba(74, 158, 255, .14);
    --h-acc-ink: #93c5fd;
    --h-on-acc: #0b1626;
    --h-q-bg: #1f5a99;
    --h-q-ink: #f4f8ff;
    --h-ok: #6ee7b7;
    --h-ok-soft: rgba(52, 211, 153, .12);
    --h-warn: #fcd34d;
    --h-warn-soft: rgba(251, 191, 36, .12);
    --h-bad: #fca5a5;
    --h-bad-soft: rgba(248, 113, 113, .12);
    --h-dot: #ff8a65;
    --h-tab-bg: #222c3d;
    --h-tab-bd: #313d52;
    --h-tab-ic: #8a96aa;
    --h-tip-bg: #0b111c;
    --h-tip-ink: #e5e7eb;
    --h-shadow: 0 30px 70px -18px rgba(0, 0, 0, .75), 0 10px 28px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .07);
    --h-card-shadow: 0 0 0 1px var(--h-line2);
}
.hlp-root [hidden] { display: none !important; }
.hlp-root.is-off { display: none; }
.hlp-root button { font-family: inherit; }
.hlp-root svg { flex-shrink: 0; }

/* ---------------------------------------------------------------- язычок */
.hlp-tab {
    /* видимая часть 24 px (наведение — 28 px): правый край таблиц CRM отступает на 20 px, полоса прокрутки (8 px, в Firefox
       на Windows 17 px) почти не перекрывается — ползунок можно ухватить и на высоте язычка */
    position: fixed; right: -12px; bottom: 96px; z-index: 100055;
    width: 36px; height: 46px; padding: 0 12px 0 0; margin: 0;
    display: grid; place-items: center;
    border: 1px solid var(--h-tab-bd); border-right: 0; border-radius: 12px 0 0 12px;
    background: var(--h-tab-bg); color: var(--h-tab-ic);
    box-shadow: -1px 1px 5px rgba(15, 23, 42, .06);
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: right .22s var(--h-ease), color .18s, background-color .18s, box-shadow .2s, transform .34s var(--h-spring), opacity .2s;
}
.hlp-tab > * { grid-area: 1 / 1; }
.hlp-tab:hover, .hlp-tab:focus-visible { right: -8px; color: var(--h-acc); background: var(--h-bg); box-shadow: -6px 6px 18px rgba(15, 23, 42, .14); outline: none; }
.hlp-tab:focus-visible { box-shadow: -6px 6px 18px rgba(15, 23, 42, .14), 0 0 0 3px color-mix(in srgb, var(--h-acc) 28%, transparent); }
.hlp-tab:active { transform: scale(.96); }
.hlp-tab-ic { display: grid; place-items: center; transition: transform .25s var(--h-spring); }
.hlp-tab:hover .hlp-tab-ic { transform: scale(1.06); }
.hlp-root:not(.is-ready) .hlp-tab { transform: translateX(110%); }
.hlp-root.is-open .hlp-tab, .hlp-root.is-capturing .hlp-tab { transform: translateX(115%); opacity: 0; pointer-events: none; }
/* «думает»: тонкое вращающееся кольцо вокруг иконки */
.hlp-tab-ring {
    width: 24px; height: 24px; border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 55%, color-mix(in srgb, var(--h-acc) 30%, transparent) 70%, var(--h-acc) 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
    opacity: 0; transition: opacity .25s;
}
.hlp-tab.is-busy { color: var(--h-acc); }
.hlp-tab.is-busy .hlp-tab-ring { opacity: 1; animation: hlp-rot .95s linear infinite; }
/* «ответ готов» / «ответ разработчика»: точка с мягкой пульсацией */
.hlp-tab-dot {
    align-self: start; justify-self: start; margin: 5px 0 0 3px;
    width: 7px; height: 7px; border-radius: 50%; background: var(--h-dot);
    box-shadow: 0 0 0 2px var(--h-tab-bg); transform: scale(0); transition: transform .3s var(--h-spring);
    position: relative;
}
.hlp-tab-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--h-dot); opacity: 0; }
.hlp-tab.has-dot .hlp-tab-dot { transform: scale(1); }
.hlp-tab.has-dot .hlp-tab-dot::after { animation: hlp-pulse 1.8s ease-out infinite; }
.hlp-tab:hover .hlp-tab-dot { box-shadow: 0 0 0 2px var(--h-bg); }

@keyframes hlp-rot { to { transform: rotate(360deg); } }
@keyframes hlp-pulse { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(2.8); opacity: 0; } }

/* ---------------------------------------------------------------- подсказки */
.hlp-tip {
    position: fixed; z-index: 100075; pointer-events: none; max-width: 260px;
    padding: 7px 10px; border-radius: 9px; background: var(--h-tip-bg); color: var(--h-tip-ink);
    font-size: 12px; line-height: 1.35; box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
    opacity: 0; transform: translateY(3px); transition: opacity .14s ease, transform .16s ease;
}
.hlp-tip b { display: block; font-weight: 600; }
.hlp-tip span { display: block; margin-top: 2px; color: #a9b3c3; font-size: 11.5px; }
.hlp-tip.side-left { transform: translateX(4px); }
.hlp-tip.is-on { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- панель */
.hlp-panel {
    position: fixed; right: 16px; bottom: 16px; z-index: 100060;
    width: 456px; height: min(720px, calc(100vh - 32px));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--h-bg); color: var(--h-ink); border-radius: 18px; box-shadow: var(--h-shadow);
    font-size: 13.5px; line-height: 1.5; outline: none;
    transform-origin: 100% 100%;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translate(8px, 12px) scale(.88);
    transition: opacity .16s ease, transform .3s var(--h-spring), width .32s var(--h-ease), visibility 0s linear .3s;
}
.hlp-root.is-open .hlp-panel {
    opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    transition: opacity .18s ease, transform .34s var(--h-spring), width .32s var(--h-ease), visibility 0s;
}
.hlp-root.is-wide .hlp-panel { width: min(720px, calc(100vw - 32px)); }
.hlp-root.is-capturing .hlp-panel { opacity: 0; visibility: hidden; pointer-events: none; transform: translate(8px, 22px) scale(.92); }
.hlp-panel.is-drop::after {
    content: 'Отпустите — картинка приложится к вопросу'; position: absolute; inset: 8px; z-index: 9; border-radius: 14px;
    display: grid; place-items: center; border: 2px dashed var(--h-acc); background: color-mix(in srgb, var(--h-bg) 86%, transparent);
    color: var(--h-acc); font-weight: 600; pointer-events: none;
}
/* появление содержимого лёгкой волной */
.hlp-root.is-anim.is-open .hlp-head,
.hlp-root.is-anim.is-open .hlp-view.is-active .hlp-scroll,
.hlp-root.is-anim.is-open .hlp-view.is-active .hlp-vbody,
.hlp-root.is-anim.is-open .hlp-composer { animation: hlp-rise .44s var(--h-ease) both; }
.hlp-root.is-anim.is-open .hlp-head { animation-delay: .03s; }
.hlp-root.is-anim.is-open .hlp-view.is-active .hlp-scroll, .hlp-root.is-anim.is-open .hlp-view.is-active .hlp-vbody { animation-delay: .08s; }
.hlp-root.is-anim.is-open .hlp-composer { animation-delay: .13s; }
@keyframes hlp-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* шапка */
.hlp-head {
    display: flex; align-items: center; gap: 8px; padding: 12px 8px 11px 14px;
    border-bottom: 1px solid var(--h-line2); background: var(--h-bg); position: relative; z-index: 2;
}
.hlp-head-main { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.hlp-logo {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--h-acc-soft); color: var(--h-acc);
}
.hlp-head-titles { min-width: 0; }
.hlp-title { font-size: 14.5px; font-weight: 650; letter-spacing: -.005em; color: var(--h-ink); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.hlp-beta { font-size: 10.5px; font-weight: 600; line-height: 1; padding: 3px 6px 4px; border-radius: 6px; background: var(--h-warn-soft); color: var(--h-warn); letter-spacing: .02em; }
.hlp-quota { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: var(--h-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.hlp-quota span { overflow: hidden; text-overflow: ellipsis; }
.hlp-ring { width: 15px; height: 15px; transform: rotate(-90deg); flex-shrink: 0; }
.hlp-ring circle { fill: none; stroke-width: 2.2; }
.hlp-ring-bg { stroke: var(--h-line); }
.hlp-ring-fg { stroke: var(--h-acc); stroke-linecap: round; transition: stroke-dashoffset .6s var(--h-ease); }
.hlp-quota.is-low { color: var(--h-warn); }
.hlp-quota.is-low .hlp-ring-fg { stroke: #f59e0b; }
.hlp-quota.is-empty { color: var(--h-bad); }
.hlp-head-actions { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.hlp-hbtn {
    position: relative; width: 30px; height: 30px; border-radius: 9px; border: 0; padding: 0;
    display: grid; place-items: center; background: transparent; color: var(--h-mut); cursor: pointer;
    transition: background-color .15s, color .15s, transform .15s;
}
.hlp-hbtn:hover { background: var(--h-surface2); color: var(--h-ink); }
.hlp-hbtn:active { transform: scale(.94); }
.hlp-hbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 26%, transparent); }
.hlp-hbtn.is-on { background: var(--h-acc-soft); color: var(--h-acc); }
.hlp-hdot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--h-dot); box-shadow: 0 0 0 2px var(--h-bg); }
.hlp-hbadge {
    position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: var(--h-acc); color: var(--h-on-acc); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
    box-shadow: 0 0 0 2px var(--h-bg); pointer-events: none;
}
.hlp-hbadge.is-hot { background: var(--h-dot); color: #fff; animation: hlp-bump .5s var(--h-spring); }
@keyframes hlp-bump { 0% { transform: scale(.6); } 100% { transform: none; } }

/* виды */
.hlp-views { position: relative; flex: 1; min-height: 0; background: var(--h-surface); }
.hlp-view {
    position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0;
    opacity: 0; visibility: hidden; transform: translateX(22px);
    transition: opacity .2s ease, transform .3s var(--h-ease), visibility 0s linear .3s;
}
.hlp-view[data-view="chat"]:not(.is-active) { transform: translateX(-22px); }
.hlp-view.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .22s ease, transform .3s var(--h-ease), visibility 0s; }

/* ---------------------------------------------------------------- диалог */
.hlp-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px 10px; scroll-padding-bottom: 24px; }
.hlp-scroll::-webkit-scrollbar, .hlp-vbody::-webkit-scrollbar { width: 8px; }
.hlp-scroll::-webkit-scrollbar-thumb, .hlp-vbody::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--h-faint) 45%, transparent); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
.hlp-thread { display: flex; flex-direction: column; gap: 14px; transition: opacity .17s ease, transform .17s ease; }
.hlp-thread.is-leaving { opacity: 0; transform: translateY(-10px); }
.hlp-thread.is-entering .hlp-empty { animation: hlp-rise .4s var(--h-ease) both; }
.hlp-tobottom {
    position: absolute; right: 16px; bottom: 150px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0;
    display: grid; place-items: center; background: var(--h-bg); color: var(--h-ink2); cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .18), 0 0 0 1px var(--h-line); animation: hlp-rise .25s var(--h-ease) both;
}
.hlp-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 36px 10px; color: var(--h-mut); font-size: 13px; }

/* приветствие */
.hlp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 4px 6px; }
.hlp-empty-art { position: relative; width: 74px; height: 74px; display: grid; place-items: center; color: var(--h-acc); margin-bottom: 12px; }
.hlp-empty-art > * { grid-area: 1 / 1; position: relative; }
.hlp-empty-blob {
    width: 74px; height: 74px; border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%;
    background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--h-acc) 22%, var(--h-bg)), var(--h-acc-soft) 70%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--h-acc) 12%, transparent);
    animation: hlp-morph 9s ease-in-out infinite;
}
@keyframes hlp-morph {
    0%, 100% { border-radius: 42% 58% 55% 45% / 48% 42% 58% 52%; transform: rotate(0deg) translateY(0); }
    50% { border-radius: 56% 44% 46% 54% / 42% 56% 44% 58%; transform: rotate(8deg) translateY(-3px); }
}
.hlp-empty h3 { margin: 0 0 6px; font-size: 17px; font-weight: 650; color: var(--h-ink); letter-spacing: -.01em; }
.hlp-empty > p { margin: 0 0 16px; max-width: 340px; color: var(--h-mut); font-size: 13px; line-height: 1.55; }
.hlp-examples { display: flex; flex-direction: column; gap: 7px; width: 100%; }
.hlp-ex {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px;
    border: 0; background: var(--h-bg); color: var(--h-ink2); font-size: 13px; line-height: 1.35; cursor: pointer;
    box-shadow: var(--h-card-shadow); transition: box-shadow .16s, transform .16s var(--h-ease), color .16s;
    animation: hlp-rise .4s var(--h-ease) both; animation-delay: calc(.05s + var(--d, 0) * .05s);
}
.hlp-ex svg { color: var(--h-faint); transition: transform .2s var(--h-ease), color .16s; }
.hlp-ex:hover { color: var(--h-ink); box-shadow: 0 4px 14px rgba(15, 23, 42, .08), 0 0 0 1px color-mix(in srgb, var(--h-acc) 35%, transparent); transform: translateY(-1px); }
.hlp-ex:hover svg { color: var(--h-acc); transform: translateX(3px); }
.hlp-empty-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 12px; }
.hlp-tipchip {
    display: flex; align-items: flex-start; gap: 8px; text-align: left; padding: 9px 10px; border-radius: 12px; border: 1px dashed var(--h-line);
    background: transparent; color: var(--h-mut); font-size: 12px; line-height: 1.35; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s;
}
.hlp-tipchip svg { color: var(--h-acc); margin-top: 1px; }
.hlp-tipchip b { display: block; color: var(--h-ink2); font-weight: 600; font-size: 12.5px; }
.hlp-tipchip:hover { border-color: color-mix(in srgb, var(--h-acc) 45%, transparent); background: var(--h-bg); }
.hlp-beta-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 14px; padding: 0 4px; text-align: left; color: var(--h-faint); font-size: 11.5px; line-height: 1.45; }
.hlp-beta-note svg { margin-top: 1px; }
.hlp-beta-note b { color: var(--h-mut); font-weight: 600; }

/* разделители */
.hlp-div { display: flex; align-items: center; gap: 10px; color: var(--h-faint); font-size: 11.5px; font-weight: 500; margin: 2px 0; }
.hlp-div::before, .hlp-div::after { content: ''; flex: 1; height: 1px; background: var(--h-line); }
.hlp-div span { white-space: nowrap; }
.hlp-div button { border: 0; background: none; padding: 0; color: var(--h-acc); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.hlp-div.is-idle span { white-space: normal; text-align: center; max-width: 300px; }

/* сообщение: вопрос справа, ответ карточкой слева */
.hlp-msg { display: flex; flex-direction: column; gap: 10px; }
.hlp-msg.is-new .hlp-q { animation: hlp-qin .34s var(--h-spring) both; }
.hlp-msg.is-new .hlp-a { animation: hlp-rise .4s var(--h-ease) both .12s; }
@keyframes hlp-qin { from { opacity: 0; transform: translate(10px, 8px) scale(.96); } to { opacity: 1; transform: none; } }
.hlp-q {
    align-self: flex-end; max-width: 86%; padding: 9px 13px; border-radius: 16px 16px 6px 16px;
    background: var(--h-q-bg); color: var(--h-q-ink); font-size: 13.5px; line-height: 1.5;
    box-shadow: 0 2px 8px -2px color-mix(in srgb, var(--h-q-bg) 55%, transparent);
}
.hlp-q-text { white-space: pre-wrap; word-break: break-word; }
.hlp-q-atts { display: flex; flex-wrap: wrap; gap: 6px; margin: 1px 0 7px; justify-content: flex-end; }
.hlp-q-img { padding: 0; border: 0; background: none; border-radius: 9px; overflow: hidden; cursor: zoom-in; box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); transition: transform .15s; }
.hlp-q-img:hover { transform: scale(1.03); }
.hlp-q-img img { display: block; width: 76px; height: 54px; object-fit: cover; object-position: top left; }
.hlp-a { align-self: stretch; padding: 12px 14px; border-radius: 16px 16px 16px 6px; background: var(--h-bg); box-shadow: var(--h-card-shadow); min-width: 0; }

/* ход поиска */
.hlp-steps.is-empty { display: none; }
.hlp-steps-h {
    display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; text-align: left;
    font-size: 12.5px; color: var(--h-mut); line-height: 1.4;
}
.hlp-steps-h b { font-weight: 600; color: var(--h-ink2); }
.hlp-steps.is-live .hlp-steps-h b { background: linear-gradient(90deg, var(--h-ink2) 0%, var(--h-ink2) 35%, var(--h-acc) 50%, var(--h-ink2) 65%, var(--h-ink2) 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hlp-shimmer 2.2s linear infinite; }
.hlp-elapsed { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--h-faint); font-size: 12px; }
.hlp-steps.is-done .hlp-steps-h { cursor: pointer; padding: 2px 0; border-radius: 7px; }
.hlp-steps.is-done .hlp-steps-h svg:first-child { color: var(--h-faint); }
.hlp-steps.is-done .hlp-steps-h:hover b { color: var(--h-ink); }
.hlp-chev { margin-left: auto; display: grid; place-items: center; color: var(--h-faint); transition: transform .25s var(--h-ease); }
.is-open > .hlp-steps-h .hlp-chev, .hlp-src.is-open .hlp-chev { transform: rotate(180deg); }
.hlp-steps-l { list-style: none; margin: 0; padding: 0; position: relative; }
.hlp-steps.is-live .hlp-steps-l { margin-top: 9px; max-height: 172px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
/* верхний шаг уходит под мягкую растушёвку, а не обрезается по линейке — только когда список прокручен */
.hlp-steps.is-live .hlp-steps-l.is-scrolled {
    -webkit-mask: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .35) 14px, #000 38px, #000 100%);
    mask: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .35) 14px, #000 38px, #000 100%);
}
.hlp-steps.is-live .hlp-steps-l::-webkit-scrollbar { display: none; }
.hlp-steps.is-done .hlp-steps-l { display: none; margin-top: 8px; max-height: 420px; overflow-y: auto; }
.hlp-steps.is-done.is-open .hlp-steps-l { display: block; animation: hlp-rise .28s var(--h-ease) both; }
.hlp-steps:not(.is-empty) + .hlp-md:not([hidden]) { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--h-line2); }
.hlp-step { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 3px 0 3px 26px; font-size: 12.5px; line-height: 1.4; color: var(--h-ink2); }
.hlp-step::before { content: ''; position: absolute; left: 9px; top: -3px; bottom: -3px; width: 1px; background: var(--h-line); }
.hlp-step:first-child::before { top: 11px; }
.hlp-step:last-child::before { bottom: auto; height: 14px; }
.hlp-step:only-child::before { display: none; }
.hlp-step-ic {
    position: absolute; left: 0; top: 2px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
    background: var(--h-bg); color: var(--h-faint); box-shadow: 0 0 0 1px var(--h-line);
}
.hlp-step[hidden] { display: none; }
.hlp-step-t { min-width: 0; word-break: break-word; }
/* техническая строка шага — только у разработчика */
.hlp-step-d { display: block; margin-top: 1px; font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--h-faint); font-style: normal; overflow-wrap: anywhere; }
.hlp-step.is-run .hlp-step-d { -webkit-text-fill-color: var(--h-faint); }
.hlp-step-s { margin-left: auto; padding-left: 6px; flex-shrink: 0; color: var(--h-faint); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hlp-step.is-done .hlp-step-ic { color: var(--h-acc); }
.hlp-step.is-run .hlp-step-ic { color: var(--h-acc); box-shadow: 0 0 0 1px var(--h-acc), 0 0 0 4px color-mix(in srgb, var(--h-acc) 14%, transparent); animation: hlp-breathe 1.4s ease-in-out infinite; }
.hlp-step.is-run .hlp-step-t { background: linear-gradient(90deg, var(--h-mut) 0%, var(--h-ink) 45%, var(--h-mut) 90%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hlp-shimmer 1.6s linear infinite; }
.hlp-step.is-err .hlp-step-ic { color: var(--h-bad); }
.hlp-step.is-err .hlp-step-s { color: var(--h-bad); }
.hlp-step.is-note { color: var(--h-mut); font-style: italic; }
.hlp-step.is-note .hlp-step-ic { box-shadow: none; background: transparent; }
.hlp-step.is-limit .hlp-step-ic { color: var(--h-warn); }
.hlp-step.is-new { animation: hlp-stepin .36s var(--h-ease) both; }
@keyframes hlp-stepin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hlp-shimmer { from { background-position: 100% 0; } to { background-position: -120% 0; } }
@keyframes hlp-breathe { 50% { box-shadow: 0 0 0 1px var(--h-acc), 0 0 0 6px color-mix(in srgb, var(--h-acc) 6%, transparent); } }
.hlp-spin {
    width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; display: inline-block;
    border: 2px solid color-mix(in srgb, var(--h-acc) 22%, transparent); border-top-color: var(--h-acc);
    animation: hlp-rot .75s linear infinite;
}

/* текст ответа */
.hlp-md { font-size: 14px; line-height: 1.62; color: var(--h-ink); word-break: break-word; }
.hlp-md > :first-child { margin-top: 0; }
.hlp-md > :last-child { margin-bottom: 0; }
.hlp-md p { margin: 0 0 9px; }
.hlp-md h3, .hlp-md h4, .hlp-md h5 { margin: 14px 0 6px; font-size: 14.5px; font-weight: 650; color: var(--h-ink); letter-spacing: -.005em; line-height: 1.4; }
.hlp-md h4, .hlp-md h5 { font-size: 13.5px; }
.hlp-md ul, .hlp-md ol { margin: 0 0 9px; padding-left: 20px; }
.hlp-md li { margin: 3px 0; padding-left: 2px; }
.hlp-md li::marker { color: var(--h-faint); }
.hlp-md ol > li::marker { font-weight: 600; color: var(--h-mut); font-size: .92em; }
.hlp-md li > ul, .hlp-md li > ol { margin: 4px 0 2px; }
.hlp-md b, .hlp-md strong { font-weight: 650; color: var(--h-ink); }
.hlp-md a { color: var(--h-acc); text-decoration: underline; text-underline-offset: 2px; }
.hlp-md code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; padding: 1px 5px; border-radius: 5px; background: var(--h-surface2); color: var(--h-ink2); word-break: break-word; }
.hlp-md pre { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: var(--h-surface); overflow-x: auto; font-size: 12px; line-height: 1.5; }
.hlp-md pre code { padding: 0; background: none; font-size: inherit; }
.hlp-md blockquote { position: relative; margin: 0 0 10px; padding: 6px 10px 6px 14px; border-radius: 8px; background: var(--h-surface); color: var(--h-ink2); }
.hlp-md blockquote::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bar, var(--h-acc)); pointer-events: none; }
.hlp-md blockquote p:last-child { margin: 0; }
.hlp-md hr { border: 0; height: 1px; background: var(--h-line); margin: 12px 0; }
.hlp-table { margin: 0 0 10px; overflow-x: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--h-line); }
.hlp-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.45; }
.hlp-table th { text-align: left; font-weight: 600; color: var(--h-mut); background: var(--h-surface); padding: 7px 10px; white-space: nowrap; }
.hlp-table td { padding: 7px 10px; border-top: 1px solid var(--h-line2); vertical-align: top; }
.hlp-det { margin: 0 0 10px; border-radius: 10px; background: var(--h-surface); }
.hlp-det > summary { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600; color: var(--h-mut); border-radius: 10px; }
.hlp-det > summary::-webkit-details-marker { display: none; }
.hlp-det > summary::before { content: ''; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--h-ease); margin-right: 2px; }
.hlp-det[open] > summary::before { transform: rotate(45deg); }
.hlp-det > summary:hover { color: var(--h-ink); }
.hlp-det-b { padding: 0 12px 10px; font-size: 13px; }
.hlp-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; border-radius: 1px; background: var(--h-acc); animation: hlp-blink .9s steps(1) infinite; }
@keyframes hlp-blink { 50% { opacity: 0; } }

/* низ карточки ответа */
.hlp-a-foot:not(:empty) { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.hlp-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hlp-conf {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px 4px 7px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; line-height: 1.2; cursor: default; white-space: nowrap;
}
.hlp-conf.is-ok { background: var(--h-ok-soft); color: var(--h-ok); }
.hlp-conf.is-partial { background: var(--h-warn-soft); color: var(--h-warn); }
.hlp-conf.is-none { background: var(--h-surface2); color: var(--h-mut); }
.hlp-conf.is-bad { background: var(--h-bad-soft); color: var(--h-bad); }
.hlp-src { border-radius: 10px; background: var(--h-surface); }
.hlp-src-h { display: flex; align-items: center; gap: 7px; width: 100%; padding: 7px 10px; border: 0; background: none; border-radius: 10px; color: var(--h-mut); font-size: 12px; font-weight: 600; cursor: pointer; text-align: left; }
.hlp-src-h:hover { color: var(--h-ink); }
.hlp-src-l { list-style: none; margin: 0; padding: 0 10px; max-height: 0; overflow: hidden; transition: max-height .3s var(--h-ease), padding .3s; }
.hlp-src.is-open .hlp-src-l { max-height: 600px; padding: 0 10px 8px; overflow-y: auto; }
.hlp-src-l li { display: flex; gap: 8px; padding: 5px 0; border-top: 1px solid var(--h-line2); font-size: 12px; }
.hlp-src-ic { color: var(--h-faint); margin-top: 1px; }
.hlp-src-l code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--h-ink2); word-break: break-word; background: none; padding: 0; border: 0; }
.hlp-src-l code i { font-style: normal; color: var(--h-mut); }
.hlp-src-l li span { display: block; color: var(--h-mut); margin-top: 1px; line-height: 1.4; }
.hlp-suggest {
    position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px 10px 15px; border-radius: 12px;
    background: var(--h-warn-soft); color: var(--h-ink2); flex-wrap: wrap;
}
.hlp-suggest::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3.5px; border-radius: 0 3px 3px 0; background: var(--bar, #f59e0b); pointer-events: none; }
.hlp-suggest.is-wish { background: var(--h-acc-soft); --bar: var(--h-acc); }
.hlp-suggest > svg { color: var(--h-warn); margin-top: 1px; }
.hlp-suggest.is-wish > svg { color: var(--h-acc); }
.hlp-suggest > div { flex: 1; min-width: 180px; font-size: 12.5px; line-height: 1.45; }
.hlp-suggest b { display: block; font-weight: 600; color: var(--h-ink); }
.hlp-suggest p { margin: 3px 0 0; color: var(--h-mut); }
.hlp-suggest p.hlp-suggest-cta { margin-top: 5px; color: var(--h-acc-ink); font-weight: 500; }
.hlp-suggest.is-bug p.hlp-suggest-cta { color: var(--h-warn); }
.hlp-follow { display: flex; flex-direction: column; gap: 5px; }
.hlp-follow > span { font-size: 11.5px; color: var(--h-faint); font-weight: 500; }
.hlp-fu {
    display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--h-line);
    background: transparent; color: var(--h-ink2); font-size: 12.5px; text-align: left; cursor: pointer; line-height: 1.35;
    transition: border-color .15s, background-color .15s, color .15s;
}
.hlp-fu svg { color: var(--h-faint); transition: transform .2s var(--h-ease), color .15s; }
.hlp-fu:hover { border-color: color-mix(in srgb, var(--h-acc) 45%, transparent); background: var(--h-acc-soft); color: var(--h-ink); }
.hlp-fu:hover svg { color: var(--h-acc); transform: translateX(2px); }
.hlp-acts { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin: 0 -4px -4px; }
.hlp-acts-sp { flex: 1; min-width: 4px; }
.hlp-act {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; min-width: 30px; justify-content: center; padding: 0 7px; border-radius: 8px; border: 0;
    background: transparent; color: var(--h-mut); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, color .15s, transform .15s;
}
.hlp-act:hover:not(:disabled) { background: var(--h-surface2); color: var(--h-ink); }
.hlp-act:active:not(:disabled) { transform: scale(.95); }
.hlp-act:disabled { cursor: default; opacity: .75; }
.hlp-act.is-text { padding: 0 9px; }
.hlp-act.is-accent { color: var(--h-acc); }
.hlp-act.is-on.is-up, .hlp-act.is-done { color: var(--h-ok); background: var(--h-ok-soft); }
.hlp-act.is-on.is-down { color: var(--h-bad); background: var(--h-bad-soft); }
.hlp-act.is-on svg, .hlp-act.is-done svg { animation: hlp-bump .4s var(--h-spring); }
.hlp-fb { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--h-surface); animation: hlp-rise .3s var(--h-ease) both; }
.hlp-fb label { font-weight: 600; font-size: 13px; color: var(--h-ink); }
.hlp-fb-sub { font-size: 11.5px; color: var(--h-mut); line-height: 1.4; }
.hlp-fb textarea, .hlp-fix-c textarea, .hlp-sheet-ta textarea {
    width: 100%; box-sizing: border-box; resize: vertical; min-height: 64px; padding: 8px 10px; border-radius: 10px;
    border: 1px solid var(--h-line); background: var(--h-bg); color: var(--h-ink); font: inherit; font-size: 13px; line-height: 1.5; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.hlp-fb textarea:focus, .hlp-fix-c textarea:focus, .hlp-sheet-ta textarea:focus { border-color: var(--h-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 16%, transparent); }
.hlp-fb-btns { display: flex; justify-content: flex-end; gap: 6px; }
.hlp-thanks { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--h-ok); animation: hlp-rise .3s var(--h-ease) both; }
.hlp-err {
    position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 15px; border-radius: 12px;
    background: var(--h-bad-soft); color: var(--h-ink2); flex-wrap: wrap;
}
.hlp-err::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3.5px; border-radius: 0 3px 3px 0; background: var(--bar, #ef4444); pointer-events: none; }
.hlp-err.is-limit { background: var(--h-warn-soft); --bar: #f59e0b; }
.hlp-err > svg { color: var(--h-bad); margin-top: 1px; }
.hlp-err.is-limit > svg { color: var(--h-warn); }
.hlp-err > div { flex: 1; min-width: 160px; font-size: 12.5px; }
.hlp-err b { display: block; color: var(--h-ink); font-weight: 600; }
.hlp-err p { margin: 2px 0 0; color: var(--h-mut); line-height: 1.45; }
.hlp-err .hlp-btn { align-self: center; }

/* ---------------------------------------------------------------- поле ввода */
.hlp-composer { position: relative; padding: 10px 12px 9px; background: var(--h-bg); border-top: 1px solid var(--h-line2); }
.hlp-longhint {
    position: relative; display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 7px 8px 7px 13px; border-radius: 10px;
    background: var(--h-warn-soft); color: var(--h-ink2); font-size: 12px; line-height: 1.4; animation: hlp-rise .3s var(--h-ease) both;
}
.hlp-longhint::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #f59e0b; pointer-events: none; }
.hlp-longhint > svg { color: var(--h-warn); }
.hlp-longhint span { flex: 1; }
.hlp-longhint button { border: 0; background: var(--h-bg); color: var(--h-acc); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; cursor: pointer; white-space: nowrap; box-shadow: 0 0 0 1px var(--h-line); }
.hlp-longhint .hlp-x { padding: 4px; background: transparent; box-shadow: none; color: var(--h-faint); display: grid; place-items: center; }
.hlp-longhint .hlp-x svg, .hlp-att-x svg, .hlp-lb-x svg, .hlp-sheet-h .hlp-hbtn svg { transform: rotate(45deg); }
.hlp-atts { display: flex; align-items: flex-end; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.hlp-att { position: relative; animation: hlp-attin .3s var(--h-spring) both; transition: opacity .16s, transform .16s; }
.hlp-att.is-out { opacity: 0; transform: scale(.8); }
@keyframes hlp-attin { from { opacity: 0; transform: scale(.7) translateY(6px); } to { opacity: 1; transform: none; } }
.hlp-att-img { display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; box-shadow: 0 0 0 1px var(--h-line), 0 2px 6px rgba(15, 23, 42, .08); background: var(--h-surface); }
.hlp-att-img img { display: block; width: 78px; height: 56px; object-fit: cover; object-position: top left; }
.hlp-att-x {
    position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0;
    display: grid; place-items: center; background: var(--h-ink); color: var(--h-bg); cursor: pointer; box-shadow: 0 0 0 2px var(--h-bg);
    transition: transform .15s;
}
.hlp-att-x:hover { transform: scale(1.1); }
.hlp-att-cap { position: absolute; left: 3px; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 5px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 9.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.hlp-atts-n { font-size: 11px; color: var(--h-faint); margin-left: 2px; padding-bottom: 2px; }
.hlp-input {
    position: relative; display: flex; align-items: flex-end; gap: 4px; padding: 5px 5px 5px 4px; border-radius: 14px;
    border: 1px solid var(--h-line); background: var(--h-bg); transition: border-color .15s, box-shadow .2s;
}
.hlp-input:focus-within { border-color: color-mix(in srgb, var(--h-acc) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 14%, transparent); }
.hlp-composer.is-flash .hlp-input { animation: hlp-flash .7s ease; }
@keyframes hlp-flash { 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--h-acc) 26%, transparent); border-color: var(--h-acc); } }
.hlp-input-tools { display: flex; gap: 1px; padding-bottom: 1px; }
.hlp-ibtn {
    width: 34px; height: 34px; border-radius: 10px; border: 0; padding: 0; display: grid; place-items: center;
    background: transparent; color: var(--h-mut); cursor: pointer; transition: background-color .15s, color .15s, transform .15s;
}
.hlp-ibtn:hover:not(:disabled) { background: var(--h-surface2); color: var(--h-acc); }
.hlp-ibtn:active:not(:disabled) { transform: scale(.92); }
.hlp-ibtn:disabled { opacity: .45; cursor: default; }
.hlp-input textarea {
    flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--h-ink);
    font: inherit; font-size: 14px; line-height: 21px; padding: 7px 4px 6px; margin: 0; max-height: 144px; box-shadow: none !important;
}
.hlp-input textarea::placeholder { color: var(--h-faint); }
.hlp-send {
    position: relative; width: 36px; height: 36px; border-radius: 11px; border: 0; padding: 0; display: grid; place-items: center; flex-shrink: 0;
    background: var(--h-acc); color: var(--h-on-acc); cursor: pointer;
    transition: background-color .18s, color .18s, transform .18s var(--h-spring), box-shadow .2s;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--h-acc) 70%, transparent);
}
.hlp-send > span { grid-area: 1 / 1; display: grid; place-items: center; transition: transform .25s var(--h-spring), opacity .18s; }
.hlp-send-stop { opacity: 0; transform: scale(.4) rotate(-90deg); }
.hlp-send:hover:not(:disabled) { background: var(--h-acc2); transform: translateY(-1px); }
.hlp-send:active:not(:disabled) { transform: scale(.94); }
.hlp-send:disabled { background: var(--h-surface2); color: var(--h-faint); box-shadow: none; cursor: default; }
.hlp-send.is-stop { background: var(--h-ink); color: var(--h-bg); box-shadow: none; }
.hlp-send.is-stop .hlp-send-go { opacity: 0; transform: scale(.4) rotate(90deg); }
.hlp-send.is-stop .hlp-send-stop { opacity: 1; transform: none; }
.hlp-send.is-stop::after {
    content: ''; position: absolute; inset: -4px; border-radius: 14px; pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 65%, var(--h-acc) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
    animation: hlp-rot 1.1s linear infinite;
}
.hlp-send.is-stopping { opacity: .6; }
.hlp-rec {
    position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 14px;
    border-radius: 13px; background: var(--h-bg); animation: hlp-rise .22s var(--h-ease) both;
}
.hlp-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--h-rec); position: relative; flex-shrink: 0; }
.hlp-rec-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--h-rec); animation: hlp-pulse 1.3s ease-out infinite; }
.hlp-rec-time { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 600; color: var(--h-ink); min-width: 34px; }
.hlp-rec.is-late .hlp-rec-time { color: var(--h-bad); }
.hlp-rec-wave { flex: 1; min-width: 40px; height: 32px; }
.hlp-rec-btn {
    display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 9px; border: 0;
    background: var(--h-surface2); color: var(--h-ink2); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.hlp-rec-btn:hover { color: var(--h-ink); }
.hlp-rec-btn.is-main { background: var(--h-acc); color: var(--h-on-acc); }
.hlp-rec-busy { justify-content: center; gap: 9px; color: var(--h-mut); font-size: 13px; }
.hlp-composer.is-rec .hlp-input { border-color: color-mix(in srgb, var(--h-rec) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-rec) 12%, transparent); }
/* «Вижу: …» (30.11.2026) — что помощник знает об открытом экране: чат клиента, карточка, лид или раздел */
.hlp-seen { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; margin: 0 2px 7px; font-size: 11.5px; line-height: 1.35; color: var(--h-mut); cursor: default; }
.hlp-seen svg { color: var(--h-acc); }
.hlp-seen-k { flex-shrink: 0; color: var(--h-faint); }
.hlp-seen-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--h-ink2); font-weight: 500; }
.hlp-composer.is-locked .hlp-seen { display: none; }
.hlp-foot-note { margin-top: 6px; text-align: center; font-size: 11px; color: var(--h-faint); }
.hlp-foot-note kbd { font: inherit; font-size: 10.5px; padding: 0 4px; border-radius: 4px; background: var(--h-surface2); color: var(--h-mut); }
.hlp-composer.is-locked .hlp-input, .hlp-composer.is-locked .hlp-foot-note, .hlp-composer.is-locked .hlp-atts { display: none; }
.hlp-locked {
    position: relative; display: flex; align-items: center; gap: 9px; padding: 11px 13px 11px 16px; border-radius: 12px;
    background: var(--h-warn-soft); color: var(--h-ink2); font-size: 13px; line-height: 1.4;
}
.hlp-locked::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3.5px; border-radius: 0 3px 3px 0; background: #f59e0b; pointer-events: none; }
.hlp-locked svg { color: var(--h-warn); }

/* ---------------------------------------------------------------- кнопки */
.hlp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 10px; border: 0;
    background: var(--h-acc); color: var(--h-on-acc); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background-color .15s, color .15s, box-shadow .15s, transform .15s, opacity .15s;
}
.hlp-btn:hover:not(:disabled) { background: var(--h-acc2); }
.hlp-btn:active:not(:disabled) { transform: scale(.97); }
.hlp-btn:disabled { opacity: .5; cursor: default; }
.hlp-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 28%, transparent); }
.hlp-btn.is-ghost { background: var(--h-bg); color: var(--h-ink2); box-shadow: 0 0 0 1px var(--h-line); }
.hlp-btn.is-ghost:hover:not(:disabled) { background: var(--h-surface2); color: var(--h-ink); }
.hlp-btn.is-soft { background: var(--h-acc-soft); color: var(--h-acc-ink); }
.hlp-btn.is-soft:hover:not(:disabled) { background: color-mix(in srgb, var(--h-acc) 20%, var(--h-bg)); }
.hlp-btn.is-danger { color: var(--h-bad); }
.hlp-btn.is-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 9px; }
.hlp-btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.hlp-btn.is-busy::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; animation: hlp-rot .75s linear infinite; }
.hlp-btn.is-ghost.is-busy::after, .hlp-btn.is-soft.is-busy::after { border-color: color-mix(in srgb, var(--h-acc) 25%, transparent); border-top-color: var(--h-acc); }
.hlp-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--h-acc); font-size: 12px; font-weight: 600; cursor: pointer; }
.hlp-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- виды: шапка и тело */
.hlp-vhead { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 8px; background: var(--h-bg); border-bottom: 1px solid var(--h-line2); }
.hlp-back { width: 32px; height: 32px; border-radius: 9px; border: 0; padding: 0; display: grid; place-items: center; background: transparent; color: var(--h-mut); cursor: pointer; flex-shrink: 0; transition: background-color .15s, color .15s; }
.hlp-back:hover { background: var(--h-surface2); color: var(--h-ink); }
.hlp-back:hover svg { animation: hlp-nudge .4s ease; }
@keyframes hlp-nudge { 50% { transform: translateX(-3px); } }
.hlp-vhead-t { flex: 1; min-width: 0; }
.hlp-vhead-t b { display: block; font-size: 14px; font-weight: 650; color: var(--h-ink); }
.hlp-vhead-t span { display: block; font-size: 11.5px; color: var(--h-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlp-vbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 22px; }
.hlp-vempty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 42px 16px; color: var(--h-mut); font-size: 12.5px; line-height: 1.5; }
.hlp-vempty svg { color: var(--h-faint); margin-bottom: 4px; }
.hlp-vempty b { color: var(--h-ink2); font-size: 14px; font-weight: 600; }
.hlp-vempty span { max-width: 300px; }
.hlp-dim { color: var(--h-faint); }
.hlp-pad { padding: 12px 4px; font-size: 12.5px; }
.hlp-intro { margin: 0 0 10px; font-size: 12.5px; color: var(--h-mut); line-height: 1.5; }

/* «История» */
.hlp-hgroup + .hlp-hgroup { margin-top: 14px; }
.hlp-hgroup-t { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--h-faint); margin: 0 4px 6px; }
.hlp-hitem {
    position: relative; display: flex; align-items: center; border-radius: 12px; background: var(--h-bg); box-shadow: var(--h-card-shadow);
    margin-bottom: 6px; transition: box-shadow .15s, transform .15s, opacity .2s; animation: hlp-rise .32s var(--h-ease) both; animation-delay: calc(var(--d, 0) * .03s);
}
.hlp-hitem:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .08), 0 0 0 1px var(--h-line); }
.hlp-hitem.is-cur { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--h-acc) 55%, transparent); }
.hlp-hitem.is-out { opacity: 0; transform: translateX(16px); }
.hlp-hitem-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
.hlp-hitem-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--h-surface); color: var(--h-faint); flex-shrink: 0; }
.hlp-hitem.has-new .hlp-hitem-ic { background: var(--h-acc-soft); color: var(--h-acc); }
.hlp-hitem-t { min-width: 0; flex: 1; }
.hlp-hitem-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 600; color: var(--h-ink); line-height: 1.4; }
.hlp-hitem-t span { display: block; font-size: 11.5px; color: var(--h-faint); margin-top: 2px; }
.hlp-newtag { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--h-dot); white-space: nowrap; padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--h-dot) 12%, transparent); }
.hlp-hitem-del { width: 32px; height: 32px; margin-right: 6px; border-radius: 9px; border: 0; padding: 0; display: grid; place-items: center; background: transparent; color: var(--h-faint); cursor: pointer; opacity: 0; transition: opacity .15s, background-color .15s, color .15s; flex-shrink: 0; }
.hlp-hitem:hover .hlp-hitem-del, .hlp-hitem-del:focus-visible { opacity: 1; }
.hlp-hitem-del:hover { background: var(--h-bad-soft); color: var(--h-bad); }

/* «Мои правки» */
.hlp-ebar { position: sticky; top: -12px; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -12px -14px 10px; padding: 10px 14px; background: color-mix(in srgb, var(--h-surface) 92%, transparent); backdrop-filter: blur(6px); }
.hlp-ebar-all { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--h-ink2); cursor: pointer; font-weight: 500; }
.hlp-ebar-acts { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.hlp-ebar-note { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; color: var(--h-mut); margin: -4px 2px 10px; line-height: 1.4; }
.hlp-elist { display: flex; flex-direction: column; gap: 8px; }
.hlp-ecard {
    position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px;
    background: var(--h-bg); box-shadow: var(--h-card-shadow); transition: box-shadow .15s, opacity .2s, transform .2s;
    animation: hlp-rise .32s var(--h-ease) both; animation-delay: calc(var(--d, 0) * .03s);
}
.hlp-ecard::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bar, #94a3b8); pointer-events: none; }
.hlp-ecard.is-sel { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--h-acc) 60%, transparent), 0 4px 14px rgba(15, 23, 42, .06); }
.hlp-ecard.is-out { opacity: 0; transform: scale(.97); }
.hlp-ecard-ck { padding-top: 2px; cursor: pointer; display: flex; }
.hlp-ecard-img { position: relative; flex-shrink: 0; width: 64px; height: 48px; border-radius: 9px; overflow: hidden; padding: 0; border: 0; cursor: zoom-in; background: var(--h-surface); box-shadow: 0 0 0 1px var(--h-line); }
.hlp-ecard-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.hlp-ecard-img i { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 4px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 10px; font-style: normal; font-weight: 600; line-height: 15px; }
.hlp-ecard-img.is-empty { display: grid; place-items: center; color: var(--h-faint); cursor: default; }
.hlp-ecard-main { flex: 1; min-width: 0; }
.hlp-ecard-t { font-size: 13px; font-weight: 600; color: var(--h-ink); line-height: 1.4; word-break: break-word; }
.hlp-ecard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 5px; font-size: 11.5px; }
.hlp-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--h-ink2); }
.hlp-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--st, #94a3b8); }
.hlp-sent { display: inline-flex; align-items: center; gap: 4px; color: var(--h-ok); font-weight: 500; }
.hlp-unsent { color: var(--h-warn); font-weight: 500; }
.hlp-ecard-text { margin-top: 6px; font-size: 12.5px; color: var(--h-ink2); line-height: 1.5; white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hlp-ecard-text.is-open { display: block; }
.hlp-ecard-main > .hlp-link { margin-top: 3px; }
.hlp-reply { position: relative; margin-top: 8px; padding: 7px 10px 7px 13px; border-radius: 10px; background: var(--h-surface); }
.hlp-reply::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--bar, var(--h-acc)); pointer-events: none; }
.hlp-reply.is-new { background: var(--h-acc-soft); animation: hlp-glow 1.6s ease 2; }
@keyframes hlp-glow { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 18%, transparent); } }
.hlp-reply-h { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: var(--h-mut); }
.hlp-reply-h b { color: var(--h-ink); font-weight: 600; }
.hlp-reply-h time { margin-left: auto; color: var(--h-faint); white-space: nowrap; }
.hlp-reply p { margin: 2px 0 0; font-size: 12.5px; color: var(--h-ink2); white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.hlp-ecard-acts { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }

/* лист «Правка разработчику» */
.hlp-sheet-wrap { position: absolute; inset: 0; z-index: 6; }
.hlp-sheet-back { position: absolute; inset: 0; background: rgba(15, 23, 42, .32); opacity: 0; transition: opacity .25s ease; backdrop-filter: blur(1.5px); }
.hlp-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 94%; display: flex; flex-direction: column;
    background: var(--h-bg); border-radius: 18px 18px 0 0; box-shadow: 0 -16px 40px rgba(15, 23, 42, .22);
    transform: translateY(102%); transition: transform .36s var(--h-spring);
}
.hlp-sheet-wrap.is-on .hlp-sheet-back { opacity: 1; }
.hlp-sheet-wrap.is-on .hlp-sheet { transform: none; }
.hlp-sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--h-line); margin: 8px auto 0; flex-shrink: 0; }
.hlp-sheet-h { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px 16px; border-bottom: 1px solid var(--h-line2); }
.hlp-sheet-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--h-acc-soft); color: var(--h-acc); flex-shrink: 0; }
.hlp-sheet-h > div { flex: 1; min-width: 0; }
.hlp-sheet-h b { display: block; font-size: 14.5px; font-weight: 650; color: var(--h-ink); }
.hlp-sheet-h span { display: block; font-size: 11.5px; color: var(--h-mut); line-height: 1.4; }
.hlp-sheet-b { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px 6px; }
.hlp-lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 6px; font-size: 12px; font-weight: 600; color: var(--h-mut); }
.hlp-lbl em { font-style: normal; font-weight: 500; color: var(--h-faint); margin-left: 4px; }
.hlp-lbl + .hlp-sheet-ta { margin-bottom: 12px; }
.hlp-sheet-ta { position: relative; }
.hlp-sheet-ta textarea { min-height: 170px; font-size: 13.5px; }
.hlp-skel {
    position: absolute; inset: 1px; border-radius: 9px; padding: 12px 12px; display: none; flex-direction: column; gap: 9px; background: var(--h-bg); pointer-events: none;
}
.hlp-skel i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--h-surface2) 0%, var(--h-surface) 40%, var(--h-surface2) 80%); background-size: 200% 100%; animation: hlp-shimmer 1.3s linear infinite; }
.hlp-skel i:nth-child(1) { width: 82%; } .hlp-skel i:nth-child(2) { width: 64%; } .hlp-skel i:nth-child(3) { width: 74%; } .hlp-skel i:nth-child(4) { width: 46%; }
.hlp-skel span { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--h-mut); }
.hlp-sheet-ta.is-drafting .hlp-skel { display: flex; }
.hlp-sheet-atts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.hlp-satt { position: relative; border-radius: 10px; transition: opacity .15s, transform .15s; }
.hlp-satt:not(.is-on) { opacity: .45; }
.hlp-satt-img { display: block; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; box-shadow: 0 0 0 1px var(--h-line); }
.hlp-satt.is-on .hlp-satt-img { box-shadow: 0 0 0 2px var(--h-acc); }
.hlp-satt-img img { display: block; width: 104px; height: 72px; object-fit: cover; object-position: top left; }
.hlp-satt-ck { position: absolute; top: 5px; left: 5px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--h-bg); box-shadow: 0 1px 4px rgba(15, 23, 42, .25); cursor: pointer; }
.hlp-satt-empty { font-size: 12px; color: var(--h-faint); padding: 2px 0 4px; line-height: 1.45; }
.hlp-sheet-ctx { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--h-mut); margin: 0 0 8px; }
.hlp-sheet-f { display: flex; align-items: center; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--h-line2); flex-wrap: wrap; }
.hlp-sheet-note { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; font-size: 11.5px; color: var(--h-faint); min-width: 0; }

/* тосты внутри панели */
.hlp-toasts { position: absolute; left: 12px; right: 12px; bottom: 112px; z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.hlp-toast {
    display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 8px 13px 8px 10px; border-radius: 12px;
    background: var(--h-tip-bg); color: var(--h-tip-ink); font-size: 12.5px; line-height: 1.4; box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
    opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .2s ease, transform .3s var(--h-spring);
}
.hlp-toast.is-in { opacity: 1; transform: none; }
.hlp-toast.is-out { opacity: 0; transform: translateY(6px); }
.hlp-toast.is-success svg { color: #4ade80; }
.hlp-toast.is-error svg { color: #f87171; }
.hlp-toast.is-warning svg { color: #fbbf24; }
.hlp-toast.is-info svg { color: #93c5fd; }

/* лайтбокс */
.hlp-lightbox {
    position: fixed; inset: 0; z-index: 100080; display: grid; place-items: center; padding: 28px;
    background: rgba(8, 12, 20, .78); backdrop-filter: blur(3px); cursor: zoom-out; opacity: 0; transition: opacity .18s ease;
}
.hlp-lightbox.is-on { opacity: 1; }
.hlp-lightbox img { max-width: min(1200px, 94vw); max-height: 88vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); background: #fff; transform: scale(.94); transition: transform .28s var(--h-spring); }
.hlp-lightbox.is-on img { transform: none; }
.hlp-lb-x { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.hlp-lb-x:hover { background: rgba(255, 255, 255, .24); }

/* ---------------------------------------------------------------- «Настройки» */
.hlp-seg { display: flex; gap: 1px; padding: 8px 10px; background: var(--h-bg); border-bottom: 1px solid var(--h-line2); overflow-x: auto; scrollbar-width: none; }
.hlp-seg::-webkit-scrollbar { display: none; }
.hlp-seg button {
    position: relative; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 9px; border: 0;
    background: transparent; color: var(--h-mut); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s;
}
.hlp-seg button:hover { color: var(--h-ink); background: var(--h-surface); }
.hlp-seg button.is-on { background: var(--h-acc-soft); color: var(--h-acc-ink); }
.hlp-segn { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--h-dot); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; }
.hlp-card { padding: 14px; border-radius: 14px; background: var(--h-bg); box-shadow: var(--h-card-shadow); margin-bottom: 10px; animation: hlp-rise .32s var(--h-ease) both; }
.hlp-card + .hlp-card { animation-delay: .05s; }
.hlp-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.hlp-card-h > div { flex: 1; min-width: 0; }
.hlp-card-h:last-child { margin-bottom: 0; }
.hlp-card-h b { display: block; font-size: 13.5px; font-weight: 650; color: var(--h-ink); }
.hlp-card-h span { display: block; font-size: 11.5px; color: var(--h-mut); margin-top: 1px; }
.hlp-switch {
    position: relative; width: 40px; height: 23px; border-radius: 12px; border: 0; padding: 0; flex-shrink: 0; cursor: pointer;
    background: var(--h-line); transition: background-color .2s;
}
.hlp-switch i { position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .25s var(--h-spring); }
.hlp-switch[aria-checked="true"] { background: var(--h-acc); }
.hlp-switch[aria-checked="true"] i { transform: translateX(17px); }
.hlp-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 26%, transparent); }
.hlp-switch.is-sm { width: 34px; height: 20px; }
.hlp-switch.is-sm i { width: 15px; height: 15px; }
.hlp-switch.is-sm[aria-checked="true"] i { transform: translateX(14px); }
.hlp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.hlp-field-l { font-size: 12px; font-weight: 600; color: var(--h-mut); }
.hlp-field small { font-size: 11.5px; color: var(--h-faint); line-height: 1.4; }
.hlp-seg2 { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--h-surface); gap: 2px; align-self: flex-start; flex-wrap: wrap; }
.hlp-seg2 button { height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--h-mut); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: background-color .15s, color .15s, box-shadow .15s; }
.hlp-seg2 button:hover { color: var(--h-ink); }
.hlp-seg2 button.is-on { background: var(--h-bg); color: var(--h-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .1), 0 0 0 1px var(--h-line2); }
.hlp-seg2.is-sm { margin-bottom: 10px; }
.hlp-seg2.is-sm button { height: 27px; font-size: 12px; padding: 0 10px; }
.hlp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hlp-num { display: flex; align-items: center; gap: 8px; }
.hlp-num input, .hlp-person-lim input {
    width: 84px; height: 34px; box-sizing: border-box; padding: 0 10px; border-radius: 9px; border: 1px solid var(--h-line);
    background: var(--h-bg); color: var(--h-ink); font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums; outline: none;
}
.hlp-num input:focus, .hlp-person-lim input:focus { border-color: var(--h-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 16%, transparent); }
.hlp-num i { font-style: normal; font-size: 12px; color: var(--h-faint); }
.hlp-budget { margin: 2px 0 12px; }
.hlp-budget-bar { height: 6px; border-radius: 6px; background: var(--h-surface2); overflow: hidden; }
.hlp-budget-bar i { display: block; height: 100%; border-radius: 6px; background: var(--h-acc); transition: width .6s var(--h-ease); }
.hlp-budget.is-hot .hlp-budget-bar i { background: #f59e0b; }
.hlp-budget span { display: block; margin-top: 6px; font-size: 12px; color: var(--h-mut); }
.hlp-budget b { color: var(--h-ink); }
.hlp-tg, .hlp-model { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--h-mut); line-height: 1.45; margin-top: 6px; }
.hlp-tg svg, .hlp-model svg { color: var(--h-faint); margin-top: 1px; }
.hlp-tg b { color: var(--h-ink2); }
.hlp-warnc { color: var(--h-warn); }
.hlp-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border-radius: 10px; border: 1px solid var(--h-line); background: var(--h-bg); color: var(--h-faint); margin-bottom: 8px; }
.hlp-search:focus-within { border-color: var(--h-acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-acc) 14%, transparent); }
.hlp-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--h-ink); font: inherit; font-size: 13px; }
.hlp-people { display: flex; flex-direction: column; }
.hlp-person { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--h-line2); transition: opacity .2s; }
.hlp-person:first-child { border-top: 0; }
.hlp-person.is-off .hlp-person-main { opacity: .6; }
.hlp-person-ck { display: flex; cursor: pointer; padding: 2px; }
.hlp-person-main { flex: 1; min-width: 0; }
.hlp-person-main b { display: block; font-size: 13px; font-weight: 600; color: var(--h-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlp-person-main span { display: block; font-size: 11.5px; color: var(--h-faint); line-height: 1.4; }
.hlp-person-lim { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.hlp-person-lim input { width: 58px; height: 30px; padding: 0 8px; font-size: 12.5px; text-align: center; }
.hlp-person-lim span { font-size: 11px; color: var(--h-faint); }
.hlp-fixes, .hlp-kn { display: flex; flex-direction: column; gap: 10px; }
.hlp-fix, .hlp-kitem { position: relative; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--h-bg); box-shadow: var(--h-card-shadow); animation: hlp-rise .32s var(--h-ease) both; animation-delay: calc(var(--d, 0) * .04s); }
.hlp-fix::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bar, #f59e0b); pointer-events: none; }
.hlp-fix.st-approved { --bar: #16a34a; }
.hlp-fix.st-rejected { --bar: #94a3b8; }
.hlp-fix-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--h-faint); }
.hlp-fix-h b { color: var(--h-ink); font-size: 13px; }
.hlp-fix-q { margin: 6px 0 4px; font-size: 13px; font-weight: 600; color: var(--h-ink2); line-height: 1.45; }
.hlp-fix-a summary { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--h-acc); cursor: pointer; list-style: none; }
.hlp-fix-a summary::-webkit-details-marker { display: none; }
.hlp-fix-a[open] summary svg { transform: rotate(180deg); }
.hlp-fix-a .hlp-md { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--h-surface); font-size: 12.5px; max-height: 260px; overflow-y: auto; }
.hlp-fix-c { margin-top: 10px; }
.hlp-fix-c > span { display: block; font-size: 11.5px; font-weight: 600; color: var(--h-mut); margin-bottom: 5px; }
.hlp-fix-c p { margin: 0; font-size: 12.5px; color: var(--h-ink2); white-space: pre-wrap; }
.hlp-fix-acts { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.hlp-fix-st { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--h-mut); }
.hlp-kitem.is-off { opacity: .6; }
.hlp-kitem-h { display: flex; align-items: flex-start; gap: 10px; }
.hlp-kitem-h b { flex: 1; font-size: 13px; color: var(--h-ink); line-height: 1.45; }
.hlp-kitem-a { margin-top: 6px; font-size: 12.5px; max-height: 160px; overflow: hidden; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.hlp-kitem-f { margin-top: 6px; font-size: 11px; color: var(--h-faint); }
.hlp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.hlp-kpi { padding: 10px 12px; border-radius: 12px; background: var(--h-bg); box-shadow: var(--h-card-shadow); min-width: 0; }
.hlp-kpi span { display: block; font-size: 11px; color: var(--h-mut); line-height: 1.3; }
.hlp-kpi b { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 17px; white-space: nowrap; font-weight: 650; color: var(--h-ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.hlp-kpi em, .hlp-utable em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 13px; color: var(--h-ink2); }
.hlp-utable em + em { margin-left: 8px; }
.hlp-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 120px; padding-top: 6px; border-bottom: 1px solid var(--h-line); }
.hlp-bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; cursor: default; }
.hlp-bar i { display: block; min-height: 0; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--h-acc) 78%, transparent); transition: background-color .15s; animation: hlp-grow .6s var(--h-ease) both; transform-origin: bottom; }
.hlp-bar:hover i { background: var(--h-acc); }
.hlp-bar span { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font-size: 10px; color: var(--h-faint); font-variant-numeric: tabular-nums; }
.hlp-bars + * { margin-top: 0; }
.hlp-card .hlp-bars { margin-bottom: 20px; }
@keyframes hlp-grow { from { transform: scaleY(0); } to { transform: none; } }
.hlp-utable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.hlp-utable th { text-align: left; font-size: 11px; font-weight: 600; color: var(--h-faint); padding: 0 6px 6px 0; }
.hlp-utable td { padding: 7px 6px 7px 0; border-top: 1px solid var(--h-line2); color: var(--h-ink2); font-variant-numeric: tabular-nums; vertical-align: top; }
.hlp-utable td b { display: block; color: var(--h-ink); font-weight: 600; }
.hlp-utable td span { display: block; font-size: 11px; color: var(--h-faint); }
.hlp-recent { display: flex; flex-direction: column; }
.hlp-rrow { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--h-line2); }
.hlp-rrow:first-child { border-top: 0; }
.hlp-rrow > div:first-child { flex: 1; min-width: 0; }
.hlp-rrow b { display: block; font-size: 12.5px; font-weight: 500; color: var(--h-ink); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hlp-rrow span { display: block; font-size: 11px; color: var(--h-faint); margin-top: 2px; }
.hlp-rrow-r { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hlp-rrow-r b { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; display: block; }
.hlp-rrow-r .hlp-conf { padding: 4px; }
.hlp-digest { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--h-surface); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--h-ink2); white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow: auto; }

/* ---------------------------------------------------------------- глобальное: тосты CRM не прячутся под панелью */
@media (min-width: 641px) {
    body.hlp-has-tab .toast-container { right: 46px; }
    body.hlp-panel-open .toast-container { right: calc(var(--hlp-pw, 456px) + 30px); }
}

/* ---------------------------------------------------------------- телефон: лист на весь экран */
@media (max-width: 640px) {
    .hlp-tab { bottom: 92px; right: -4px; padding-right: 4px; }   /* на телефоне полос прокрутки нет — язычок шире под палец */
    .hlp-tab:hover, .hlp-tab:focus-visible { right: -4px; }
    .hlp-panel, .hlp-root.is-wide .hlp-panel {
        left: 0; right: 0; bottom: 0; width: 100%; height: calc(100dvh - 8px); max-height: none;
        border-radius: 18px 18px 0 0; transform-origin: 50% 100%; transform: translateY(100%);
        transition: opacity .2s ease, transform .36s cubic-bezier(.2, .9, .25, 1), visibility 0s linear .36s;
    }
    .hlp-root.is-open .hlp-panel { transform: none; transition: opacity .2s ease, transform .4s cubic-bezier(.2, .9, .25, 1), visibility 0s; }
    .hlp-hbtn-wide { display: none; }
    .hlp-head { padding: 10px 6px 9px 14px; gap: 4px; }
    .hlp-logo { display: none; }
    .hlp-title { font-size: 14.5px; }
    .hlp-hbtn { width: 33px; height: 34px; }
    .hlp-head-actions { gap: 0; }
    .hlp-foot-note { display: none; }
    .hlp-composer { padding-bottom: max(9px, env(safe-area-inset-bottom)); }
    .hlp-input textarea { font-size: 16px; }   /* без автозума iOS */
    .hlp-scroll { padding: 14px 12px 10px; }
    .hlp-empty-tips { grid-template-columns: 1fr; }
    .hlp-q { max-width: 90%; }
    .hlp-kpis { grid-template-columns: 1fr 1fr; }
    .hlp-grid2 { grid-template-columns: 1fr; }
    .hlp-sheet-f .hlp-sheet-note { width: 100%; margin: 0 0 2px; }
    .hlp-sheet-f .hlp-btn { flex: 1; }
    .hlp-hitem-del { opacity: 1; }
    .hlp-toasts { bottom: 120px; }
    body.hlp-panel-open .toast-container { z-index: 100070; bottom: 110px; }
}
@media (max-width: 380px) {
    .hlp-act.is-text span { display: none; }
}

/* ---------------------------------------------------------------- язычок «впервые»: красный, пока ни разу не открывали
   Красный — токен --danger-color CRM, иконка белая; раз в ~4 с мягкое свечение-кольцо и лёгкий «кивок» иконки.
   После первого нажатия (отметка на сервере) — плавно в обычный серый, навсегда. */
.hlp-tab.is-new {
    background: var(--danger-color, #d93025); border-color: var(--danger-color, #d93025); color: #fff;
    box-shadow: -2px 2px 10px rgba(217, 48, 37, .28);
    animation: hlp-newglow 4.2s ease-out 1.2s infinite;
}
.hlp-tab.is-new:hover, .hlp-tab.is-new:focus-visible { background: #c5221f; border-color: #c5221f; color: #fff; box-shadow: -6px 6px 18px rgba(217, 48, 37, .32); }
.hlp-tab.is-new .hlp-tab-ic { animation: hlp-newnod 4.2s var(--h-ease) 1.2s infinite; }
.hlp-tab.is-new .hlp-tab-dot, .hlp-tab.is-new .hlp-tab-dot::after { background: #fff; }
.hlp-tab.is-new .hlp-tab-dot { box-shadow: 0 0 0 2px var(--danger-color, #d93025); }
.hlp-tab.is-was-new { transition: right .22s var(--h-ease), color .8s, background-color .8s, border-color .8s, box-shadow .8s, transform .34s var(--h-spring), opacity .2s; }
@keyframes hlp-newglow {
    0%, 62% { box-shadow: -2px 2px 10px rgba(217, 48, 37, .28), 0 0 0 0 rgba(217, 48, 37, .5); }
    86% { box-shadow: -2px 2px 10px rgba(217, 48, 37, .28), 0 0 0 9px rgba(217, 48, 37, 0); }
    100% { box-shadow: -2px 2px 10px rgba(217, 48, 37, .28), 0 0 0 0 rgba(217, 48, 37, 0); }
}
@keyframes hlp-newnod {
    0%, 62%, 100% { transform: none; }
    68% { transform: scale(1.14) rotate(-8deg); }
    74% { transform: scale(1.08) rotate(6deg); }
    80% { transform: none; }
}
/* «скрыл сам»: язычок уезжает за край и гаснет */
.hlp-root.is-leaving .hlp-tab, .hlp-root.is-leaving .hlp-panel { transform: translateX(115%); opacity: 0; pointer-events: none; transition: transform .4s var(--h-ease), opacity .3s; }

/* «Мои настройки» и пометка «скрыл сам» в «Доступе» */
.hlp-note { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: var(--h-mut); }
.hlp-note svg { margin-top: 1px; color: var(--h-faint); }
.hlp-note b { color: var(--h-ink2); font-weight: 600; }
.hlp-hidtag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 7px; font: 600 10.5px/1.5 inherit; font-style: normal; vertical-align: 1px; color: var(--h-warn); background: var(--h-warn-soft); }

/* пункт «Помощник по CRM» в меню профиля шапки (.hpm, 29.11.2026; вне .hlp-root — свои токены переключателя) */
.hpm-item.hlp-menu-item {
    --h-line: var(--border-color, #dce1e8); --h-acc: var(--primary-color, #074783); --h-spring: cubic-bezier(.34, 1.36, .5, 1);
}
.hlp-menu-item .hlp-switch { pointer-events: none; flex: none; }
.hlp-menu-item.is-busy { opacity: .7; cursor: progress; }
body[data-theme="dark"] .hpm-item.hlp-menu-item { --h-acc: #4a9eff; --h-line: #3a4559; }

/* ---------------------------------------------------------------- без анимаций по просьбе системы */
@media (prefers-reduced-motion: reduce) {
    .hlp-root *, .hlp-root *::before, .hlp-root *::after { animation: none !important; transition: none !important; }
    .hlp-tab.is-busy .hlp-tab-ring { opacity: 1; }
}
