/* eyrin — стили приложения по макетам чата «Маркетинг» (docs/design/eyrin, 03.11.2026). Цвета и формы — tokens.css. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--e-bg); color: var(--e-ink); }
body { font: var(--e-fs-body)/1.45 var(--e-font); -webkit-font-smoothing: antialiased; }
img { display: block; }
a { color: var(--e-accent); }
[hidden] { display: none !important; }
.muted, .caption { color: var(--e-muted); }
.caption { font-size: var(--e-fs-caption); font-weight: 500; }
.center { text-align: center; }
.grow { flex-grow: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.gap { gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-tight { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stack-tight b { overflow-wrap: anywhere; }
.push-down { margin-top: auto; }
.msg { min-height: 1.4em; margin: 0; font-size: var(--e-fs-sm); color: var(--e-muted); }
.msg.err { color: var(--e-risk); }

/* Экран с кобальтовой шапкой и аркой-листом (главный, первый запуск, вход) */
.screen { min-height: 100dvh; display: flex; flex-direction: column; }
.screen-head { background: var(--e-head); min-height: 100dvh; display: flex; flex-direction: column; }
.head { color: #fff; padding: calc(env(safe-area-inset-top) + 40px) 20px 64px; display: flex; flex-direction: column; gap: 18px; }
.head-center { align-items: center; text-align: center; gap: 12px; padding-top: calc(env(safe-area-inset-top) + 72px); }
.sheet { flex-grow: 1; margin-top: -40px; background: var(--e-bg); border-radius: var(--e-r-sheet);
         padding: 36px 20px calc(env(safe-area-inset-bottom) + 24px); display: flex; flex-direction: column; gap: 16px; }
.slow-hint { opacity: 0; animation: appear .3s 8s forwards; max-width: 300px; }   /* без скриптов: если загрузка застряла */
.slow-hint a { display: inline-block; margin-top: 8px; font-weight: 600; min-height: 44px; line-height: 44px; }
@keyframes appear { to { opacity: 1; } }
.sheet-center { align-items: center; justify-content: flex-start; padding-top: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.04em; }
.brand-lg { font-size: 34px; gap: 10px; }
.slogan { margin: 0; font-size: 16px; }
.h1 { margin: 0; font-size: var(--e-fs-h1); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.h1-sm { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.h2 { margin: 12px 0 0; font-size: var(--e-fs-h2); font-weight: 600; }
.lead { margin: 0; font-size: 16px; line-height: 1.45; max-width: 330px; }
.greet { font-size: 16px; font-weight: 500; }
.agent-status { align-self: flex-start; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14);
                border-radius: 16px; padding: 7px 12px; font-size: 13px; font-weight: 500; }
.light { width: 8px; height: 8px; border-radius: 4px; background: var(--e-light); }   /* «свет агента» — только тут */
.avatar { width: 44px; height: 44px; border-radius: 22px; border: 0; background: #fff; color: var(--e-head);
          font: 600 16px var(--e-font); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-lg { width: 52px; height: 52px; border-radius: 26px; background: var(--e-accent-soft); color: var(--e-accent); font-size: 20px; }

/* Поля */
.field { display: flex; flex-direction: column; gap: 6px; }
input, select, textarea { font: inherit; color: var(--e-ink); }
input, select { height: 50px; border-radius: var(--e-r-input); border: 1px solid var(--e-line); background: var(--e-surface);
                padding: 0 16px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--e-accent); outline-offset: 0; }
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code-boxes input { height: 56px; padding: 0; text-align: center; font-size: 22px; font-weight: 600; min-width: 0;
                    font-variant-numeric: tabular-nums; }

/* Кнопки: основная — «арка», вторичная — пилюля, ссылка */
button { font: inherit; cursor: pointer; }
.btn-arch { height: 54px; border: 0; border-radius: var(--e-r-arch); background: var(--e-accent); color: #fff;
            font-size: 17px; font-weight: 600; position: relative; }
.btn-arch:active { background: var(--e-accent-press); }
.btn-pill { min-height: var(--e-touch); border-radius: 22px; border: 1px solid var(--e-line); background: var(--e-surface);
            color: var(--e-ink); font-weight: 500; padding: 0 16px; position: relative; }
.btn-link { min-height: var(--e-touch); border: 0; background: none; color: var(--e-accent); font-weight: 600; position: relative; }
.btn-send { width: 48px; height: 44px; border: 0; border-radius: 24px 24px 12px 12px; background: var(--e-accent); color: #fff;
            display: inline-flex; align-items: center; justify-content: center; position: relative; }
.btn-a { display: flex; align-items: center; justify-content: center; text-decoration: none; }
button:disabled { cursor: progress; opacity: .85; }

/* Карточки и списки */
.card { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: var(--e-r-card); padding: 16px; }
.ask { border-radius: 24px; display: flex; flex-direction: column; gap: 10px; }
.ask textarea { border: 0; outline: none; resize: none; background: transparent; font-size: 17px; line-height: 1.4; padding: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 0 20px; scrollbar-width: none; }
.chip { flex-shrink: 0; height: var(--e-touch); padding: 0 14px; border-radius: var(--e-r-chip); border: 1px solid var(--e-line);
        background: var(--e-surface); color: var(--e-ink); font-size: 14px; font-weight: 500; }
.feature { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: var(--e-r-card); padding: 14px 16px;
           display: flex; gap: 14px; align-items: center; }
.feature b { display: block; font-size: 15px; }
.feature small { display: block; font-size: 13px; color: var(--e-muted); }
.feature-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--e-accent-soft); color: var(--e-accent);
               display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge-test { align-self: flex-start; background: var(--e-accent-soft); color: var(--e-accent-press); border-radius: 12px;
              padding: 6px 10px; font-size: 13px; font-weight: 500; }
.list { list-style: none; margin: 0; padding: 4px 16px; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--e-line); font-size: 15px; overflow-wrap: anywhere; }
.list li:last-child { border-bottom: 0; }
.list li small { display: block; color: var(--e-muted); font-size: 13px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; color: var(--e-muted);
         padding: 24px 12px; }
.empty b { color: var(--e-ink); }
.empty p { margin: 0; max-width: 320px; }
.segment { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--e-segment); border-radius: 14px; padding: 4px; gap: 4px; }
.segment button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--e-muted); font-size: 14px; }
.segment button[aria-checked="true"] { background: var(--e-surface); color: var(--e-ink); font-weight: 600; }

/* Страницы вкладок без шапки */
.tab { flex-grow: 1; }
.page { padding: calc(env(safe-area-inset-top) + 24px) 20px 120px; display: flex; flex-direction: column; gap: 14px; }
.tab.screen-head { padding-bottom: 96px; background: var(--e-head); }
.page-title { margin-top: 12px; }

/* Нижнее меню: 5 вкладок, «Агент» — арка в центре */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--e-surface); border-top: 1px solid var(--e-line);
          padding: 8px 8px calc(env(safe-area-inset-bottom) + 10px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
          align-items: end; }
.tabbar button { border: 0; background: none; color: var(--e-muted); display: flex; flex-direction: column; align-items: center;
                 gap: 4px; min-height: 48px; justify-content: center; font-size: var(--e-fs-tab); padding: 0; }
.tabbar button[aria-current="page"] { color: var(--e-accent); font-weight: 600; }
.tabbar .tab-agent { margin-top: -30px; }
.tabbar .arch { width: 60px; height: 58px; border-radius: 30px 30px 14px 14px; background: var(--e-head); border: 4px solid var(--e-surface);
                display: flex; align-items: center; justify-content: center; }

/* Индикаторы работы (правило 03.11.2026: пользователь всегда видит, что происходит) */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; overflow: hidden; z-index: 10;
            background: color-mix(in srgb, var(--e-accent) 20%, transparent); }
.progress::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--e-accent);
                   animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { left: -40%; } to { left: 100%; } }
.spinner { display: inline-block; width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; border-radius: 50%;
           border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor;
           animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
button.busy { color: transparent !important; }
button.busy > * { visibility: hidden; }
button.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
                     border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn-link.busy::after, .btn-pill.busy::after { border-color: color-mix(in srgb, var(--e-accent) 30%, transparent); border-top-color: var(--e-accent); }
@media (prefers-reduced-motion: reduce) { .progress::after, .spinner, button.busy::after { animation-duration: 3s; } }
/* Шапка: колокольчик уведомлений с точкой непрочитанных */
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 22px; border: 0; background: rgba(255,255,255,.14);
            color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn-plain { background: none; color: var(--e-ink); margin-left: -10px; }
.dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 5px; background: var(--e-risk);
       border: 2px solid var(--e-head); box-sizing: content-box; }

/* Профиль (макет App-Profile) */
.profile-head { padding-top: 12px; }
.profile-head .avatar-lg { width: 56px; height: 56px; border-radius: 28px; background: var(--e-accent); color: #fff; font-size: 22px; }
.profile-name { font-size: 20px; font-weight: 600; line-height: 1.25; }
.badge-plan { background: var(--e-accent-soft); color: var(--e-accent-press); border-radius: 10px; padding: 4px 9px;
              font-size: 12px; font-weight: 600; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: var(--e-r-card); padding: 14px;
        display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--e-muted); }
.stat-main { grid-column: span 2; background: var(--e-accent); border-color: var(--e-accent); color: #fff; flex-direction: row;
             align-items: center; gap: 14px; padding: 16px; }
.stat-main b { font-size: 40px; letter-spacing: -0.03em; line-height: 1; }
.stat-main span { color: #fff; font-size: 14px; line-height: 1.4; }
.stat-row { grid-column: span 2; flex-direction: row; justify-content: space-between; font-size: 14px; }
.stat-row span { color: var(--e-ink); font-size: 14px; }
.stat-row b { font-size: 14px; }
.menu { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: var(--e-r-card); overflow: hidden; }
.menu button { width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--e-line); background: none;
               color: var(--e-ink); font-size: 15px; display: flex; align-items: center; justify-content: space-between;
               gap: 12px; text-align: left; position: relative; }
.menu button:last-child { border-bottom: 0; }
.menu button > span { color: var(--e-muted); font-size: 13px; display: inline-flex; text-align: right; }
.menu button:active { background: var(--e-segment); }
.menu .danger { color: var(--e-risk); }

/* Внутренние страницы поверх вкладок */
.sub { position: fixed; inset: 0; z-index: 8; background: var(--e-bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.sub-open { overflow: hidden; }
.sub-head { position: sticky; top: 0; z-index: 1; background: var(--e-bg); display: flex; align-items: center; gap: 4px;
            padding: calc(env(safe-area-inset-top) + 10px) 20px 10px; border-bottom: 1px solid var(--e-line); }
.sub-head .h1-sm { font-size: 20px; flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-action { flex-shrink: 0; }
.sub-body { padding: 16px 20px calc(env(safe-area-inset-bottom) + 32px); display: flex; flex-direction: column; gap: 14px; }
.big { font-size: 24px; font-weight: 600; }
.card p, .sub-body > p { margin: 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; }
.kv b { font-weight: 600; text-align: right; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.switch-row small { font-size: 13px; }
input[type="checkbox"][role="switch"] { appearance: none; -webkit-appearance: none; flex-shrink: 0; width: 51px; height: 31px;
  padding: 0; border: 0; border-radius: 16px; background: var(--e-switch-off); position: relative; cursor: pointer; transition: background .2s; }
input[type="checkbox"][role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px;
  border-radius: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
input[type="checkbox"][role="switch"]:checked { background: var(--e-accent); }
input[type="checkbox"][role="switch"]:checked::after { transform: translateX(20px); }
.notif-list li { display: flex; flex-direction: column; gap: 3px; padding-left: 14px; position: relative; }
.notif-list li.unread::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 4px; background: var(--e-accent); }
.notif-kind { font-size: 12px; font-weight: 600; color: var(--e-accent); text-transform: uppercase; letter-spacing: .04em; }
.notif-body { color: var(--e-ink); font-size: 14px; }
.btn-danger { background: var(--e-risk); }
.btn-danger:active { background: var(--e-risk); filter: brightness(.9); }

/* Диалог с Эйрин (макет App-Chat) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat { position: fixed; inset: 0; z-index: 8; background: var(--e-bg); display: flex; flex-direction: column; }
.chat-head { background: var(--e-surface); border-bottom: 1px solid var(--e-line); display: flex; align-items: center; gap: 6px;
             padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; }
.chat-head b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head small { font-size: 12px; }
.chat-list { flex-grow: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px 10px; display: flex;
             flex-direction: column; gap: 12px; }
.msg-user { align-self: flex-end; max-width: 85%; background: var(--e-accent); color: #fff; border-radius: 20px 20px 6px 20px;
            padding: 12px 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-agent { display: flex; gap: 8px; align-items: flex-start; max-width: 100%; }
.msg-ava { width: 32px; height: 32px; border-radius: 16px; background: var(--e-accent-soft); display: flex; align-items: center;
           justify-content: center; flex-shrink: 0; }
.msg-card { background: var(--e-surface); border: 1px solid var(--e-line); border-radius: 6px 20px 20px 20px; padding: 12px 14px;
            font-size: 15px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.rich p { margin: 0 0 8px; } .rich p:last-child { margin-bottom: 0; }
.rich ul, .rich ol { margin: 0 0 8px; padding-left: 20px; } .rich ul:last-child, .rich ol:last-child { margin-bottom: 0; }
.rich li { margin: 2px 0; }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--e-muted); font-size: 14px; }
.dots { display: inline-flex; gap: 4px; } .dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--e-accent);
  animation: blink 1.2s infinite ease-in-out; } .dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.msg-error { align-self: stretch; background: color-mix(in srgb, var(--e-risk) 10%, var(--e-surface)); color: var(--e-ink);
             border: 1px solid color-mix(in srgb, var(--e-risk) 35%, transparent); border-radius: 16px; padding: 10px 12px;
             display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.chat-compose { background: var(--e-surface); border-top: 1px solid var(--e-line); display: flex; align-items: flex-end; gap: 8px;
                padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px); }
.chat-compose textarea { flex-grow: 1; min-width: 0; min-height: 44px; max-height: 132px; resize: none; border-radius: 22px;
                         border: 1px solid var(--e-line); background: var(--e-bg); padding: 11px 16px; font-size: 16px; line-height: 1.4; }
.chat-compose .btn-send { flex-shrink: 0; }
.recent { padding: 0 16px; } .recent li { padding: 0; }
.recent button { width: 100%; border: 0; background: none; color: var(--e-ink); text-align: left; padding: 12px 0; display: flex;
                 flex-direction: column; gap: 2px; font-size: 15px; }
.recent button b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .7; } }
/* Одна переписка с Эйрин, «В работе», квиз знакомства (заказчик 09.11.2026). Длинный текст — не шире экрана. */
.chat-more { align-self: center; min-height: 36px; }
.chat-pv { width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: var(--e-ink); min-width: 0; }
.chat-pv .row { min-width: 0; }
.pv-line { margin: 0; font-size: 14px; color: var(--e-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pv-line b { color: var(--e-ink); font-weight: 600; }
.work { padding: 0 16px; } .work li { padding: 0; min-width: 0; }
.work button { width: 100%; border: 0; background: none; color: var(--e-ink); text-align: left; padding: 12px 0; display: flex;
               flex-direction: column; gap: 3px; font: inherit; min-width: 0; }
.work-title { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.work-params { font-size: 13px; color: var(--e-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
               overflow: hidden; overflow-wrap: anywhere; }
.work-state { font-size: 13px; font-weight: 600; color: var(--e-accent); }
.work-state.st-ready, .work-state.st-watch { color: var(--e-ok-text); }
.work-state.st-closed { color: var(--e-muted); font-weight: 500; }
.other-chats summary { cursor: pointer; padding: 8px 0; list-style: none; }
.other-chats summary::before { content: "▸ "; } .other-chats[open] summary::before { content: "▾ "; }
.name-box { margin-top: 10px; } .name-box input { width: 100%; }
.quiz { padding-top: 4px; }
.quiz-bar { height: 6px; border-radius: 3px; background: var(--e-segment); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; background: var(--e-accent); border-radius: 3px; transition: width .3s; }
.quiz-q { margin: 8px 0 4px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt { min-height: 48px; font-size: 16px; text-align: left; padding: 0 16px; }
.quiz-own { gap: 8px; } .quiz-own input { flex-grow: 1; min-width: 0; font-size: 16px; }
.quiz-end { padding-top: 24px; align-items: center; }

/* Выдача и карточка объекта (макеты App-Results, App-Object) */
.page-over { position: fixed; inset: 0; z-index: 8; background: var(--e-bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.pad { padding: 24px 20px; }
.res-head { position: sticky; top: 0; z-index: 1; background: var(--e-surface); border-bottom: 1px solid var(--e-line);
            padding: calc(env(safe-area-inset-top) + 8px) 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.res-title { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.q-chip { flex-shrink: 0; background: var(--e-bg); border: 1px solid var(--e-line); border-radius: 12px; padding: 4px 9px; font-size: 12px; }
.res-body { padding: 12px 16px calc(env(safe-area-inset-bottom) + 24px); display: flex; flex-direction: column; gap: 10px; }
.res-tools { gap: 8px; }
.pill-select { height: 36px; width: auto; border-radius: 18px; padding: 0 12px; font-size: 13px; }
.res-list { display: flex; flex-direction: column; gap: 10px; }
.res-card, .proj { width: 100%; text-align: left; background: var(--e-surface); border: 1px solid var(--e-line); border-radius: 22px;
                   padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--e-ink); font: inherit; }
.res-card:active, .proj:active { background: var(--e-segment); }
.res-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.res-top b { font-size: 17px; font-weight: 600; }
.res-star { width: 36px; height: 36px; border-radius: 18px; background: var(--e-accent-soft); color: var(--e-accent); display: flex;
            align-items: center; justify-content: center; flex-shrink: 0; }
.res-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.res-price > b { font-size: 20px; font-weight: 600; }
.res-price .big { font-size: 24px; }
.badge { margin-left: auto; border-radius: 8px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.badge-ok { background: var(--e-ok-soft); color: var(--e-ok-text); }
.badge-warn { background: var(--e-warn-soft); color: var(--e-warn-text); }
.badge-risk { background: color-mix(in srgb, var(--e-risk) 12%, var(--e-surface)); color: var(--e-risk); }
.badge-info { background: var(--e-accent-soft); color: var(--e-accent-press); }
.proj-counts { display: flex; align-items: center; gap: 8px; } .proj-counts .badge { margin-left: 0; }
.proj b { font-size: 17px; }
.res-tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.tag { display: inline-flex; align-items: center; gap: 5px; background: var(--e-bg); border-radius: 10px; padding: 4px 8px; }
.lv { width: 7px; height: 7px; border-radius: 4px; flex-shrink: 0; background: var(--e-muted); }
.lv-ok { background: var(--e-ok); } .lv-warn { background: var(--e-warn); } .lv-risk { background: var(--e-risk); } .lv-info { background: var(--e-accent); }
.hero { height: 150px; background: var(--e-head); display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
        padding: calc(env(safe-area-inset-top) + 12px) 16px 0; }
.hero-btn { width: 44px; height: 44px; border-radius: 22px; border: 0; background: #fff; color: #0E1217; display: flex; align-items: center;
            justify-content: center; position: relative; flex-shrink: 0; }
.hero-btn[aria-pressed="true"] { color: var(--e-accent); }
.hero-btn[aria-pressed="true"] svg { fill: currentColor; }
.hero-chip { align-self: center; margin-top: -6px; background: #fff; color: #0E1217; border-radius: 10px; padding: 4px 10px; font-size: 12px;
             font-weight: 600; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj-sheet { margin-top: -28px; background: var(--e-bg); border-radius: 195px 195px 0 0 / 28px 28px 0 0; position: relative;
             padding: 24px 16px 110px; display: flex; flex-direction: column; gap: 12px; }
.obj-title { margin: 2px 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ok-text { color: var(--e-ok-text); font-weight: 600; }
.verdict { display: flex; gap: 12px; } .verdict .bar { width: 10px; border-radius: 5px; flex-shrink: 0; }
.verdict b { font-size: 16px; } .verdict .muted { font-size: 14px; line-height: 1.45; }
.card-h { font-size: 16px; font-weight: 600; }
.risk-row { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; } .risk-row .lv { width: 9px; height: 9px; margin-top: 5px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile { background: var(--e-bg); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font-size: 16px; font-weight: 600; white-space: nowrap; } .tile small { font-size: 12px; }
.btn-outline { min-height: 44px; border-radius: 22px; border: 1px solid var(--e-accent); background: var(--e-surface); color: var(--e-accent);
               font-size: 14px; font-weight: 600; position: relative; }
.btn-soft { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 0; background: var(--e-accent-soft); color: var(--e-accent-press);
            font-size: 14px; font-weight: 600; flex-shrink: 0; }
.btn-link-muted { border: 0; background: none; color: var(--e-muted); font-size: 13px; min-height: 44px; padding: 0; }
.mbar { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mbar-l { width: 84px; flex-shrink: 0; } .mbar-track { flex-grow: 1; height: 12px; }
.mbar-fill { display: block; height: 12px; border-radius: 6px; }
.mbar-this { background: var(--e-accent); } .mbar-med { background: color-mix(in srgb, var(--e-accent) 35%, var(--e-surface)); }
.links { padding: 0 4px; font-size: 13px; align-items: center; } .links a { font-weight: 600; text-decoration: none; }
.obj-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; background: var(--e-surface); border-top: 1px solid var(--e-line);
               padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px); display: flex; gap: 8px; }
.obj-actions .btn-pill { min-height: 52px; border-radius: 26px; }
textarea { border-radius: var(--e-r-input); border: 1px solid var(--e-line); background: var(--e-surface); padding: 12px 14px; width: 100%; resize: vertical; }

.why-box { display: flex; flex-direction: column; gap: 8px; } .why-box:empty { display: none; }
.why-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.why-chip { min-height: 32px; border-radius: 16px; border: 1px solid var(--e-line); background: var(--e-surface); color: var(--e-ink);
            font-size: 12px; padding: 0 10px; text-align: left; }
.why-chip[aria-pressed="true"] { border-color: var(--e-risk); background: color-mix(in srgb, var(--e-risk) 10%, var(--e-surface)); }
.why-chip b { color: var(--e-muted); font-weight: 600; }
.why-dlg { position: fixed; inset: 0; z-index: 11; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
.why-card { width: 100%; max-width: 480px; background: var(--e-surface); border-radius: 24px 24px 0 0;
            padding: 20px 16px calc(env(safe-area-inset-bottom) + 16px); }
body:has(.why-dlg) .toast { bottom: auto; top: calc(env(safe-area-inset-top) + 16px); }   /* не закрывать кнопки окна */
.why-card .opt[aria-pressed="true"] { background: var(--e-accent); color: #fff; }
.over-row { margin: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.tag-manual { background: var(--e-accent-soft); color: var(--e-accent-press); font-weight: 600; }
.tag-why { background: color-mix(in srgb, var(--e-risk) 8%, var(--e-surface)); }
.bar-dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; }

/* Сборка отчёта (макет App-Report) */
.icon-soft { background: var(--e-accent-soft); color: var(--e-accent); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-toggle { min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--e-line); background: var(--e-surface);
               color: var(--e-ink); font-size: 13px; display: inline-flex; align-items: center; }
.pill-toggle[aria-pressed="true"] { background: var(--e-accent); border-color: var(--e-accent); color: #fff; }
.pill-soon { color: var(--e-muted); border-style: dashed; }

/* Знакомство и «Эйрин и общение» */
.meet { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; color: var(--e-ink); }
.meet b { font-size: 16px; }
.seg-wrap { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.tone-about { display: block; margin-top: 4px; }

/* Бриф подбора в чате */
.checks { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; padding: 0; accent-color: var(--e-accent); flex-shrink: 0; }
.cond { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cond-chip { background: var(--e-bg); border: 1px solid var(--e-line); border-radius: 12px; padding: 5px 9px; font-size: 13px; }
.cond-def { color: var(--e-muted); border-style: dashed; } .cond-def small { font-size: 11px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.opt { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--e-accent); background: var(--e-surface);
       color: var(--e-accent); font-size: 14px; font-weight: 600; position: relative; }
.opt-main { background: var(--e-accent); color: #fff; }
.opt-skip { border-color: var(--e-line); color: var(--e-muted); font-weight: 500; }
.opt:disabled { opacity: .5; cursor: default; }

/* Системные сообщения: полоса сверху (нет связи, новая версия) и всплывающее сообщение снизу */
.banner { position: fixed; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 8px); z-index: 12; background: var(--e-ink);
          color: var(--e-bg); border-radius: 16px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 12px;
          font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.banner span { flex-grow: 1; }
.banner-btn { flex-shrink: 0; min-height: 36px; border: 0; border-radius: 18px; padding: 0 14px; background: var(--e-accent);
              color: #fff; font-weight: 600; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 96px); z-index: 12;
         max-width: calc(100% - 32px); background: var(--e-ink); color: var(--e-bg); border-radius: 14px; padding: 10px 16px;
         font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); text-align: center; }

@media (min-width: 640px) { .screen, .tabbar, .sub, .chat, .page-over, .obj-actions { max-width: 480px; margin: 0 auto; }
  .banner { max-width: 456px; margin: 0 auto; } }

/* «Эйрин поняла так» — подпись по типам */
.sign-parsed:empty { display: none; }
.sign-parsed { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--e-accent-soft); }
.kv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.kv-list .kv span { color: var(--e-muted); }
.kv-list .kv b { overflow-wrap: anywhere; }

/* «Слежу» (макет App-Watch) */
.watch-sub { margin-top: -6px; }
.watch-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.watch-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; background: none; border: 0;
              padding: 0; color: inherit; font: inherit; cursor: pointer; }
.watch-open b { font-size: 15px; }
.watch-hot { color: var(--e-accent); font-weight: 500; }
.watch-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.watch-empty p { margin: 0; }
.watch-ico { color: var(--e-accent); flex-shrink: 0; }
.watch-list { padding: 0; overflow: hidden; }
.watch-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; text-align: left;
             background: none; border: 0; border-bottom: 1px solid var(--e-line); color: inherit; font: inherit; cursor: pointer; }
.watch-row:last-child { border-bottom: 0; }
.watch-what { font-size: 12px; font-weight: 600; color: var(--e-muted); text-transform: uppercase; letter-spacing: .03em; }
.watch-badge { min-width: 60px; font-size: 13px; font-weight: 600; color: var(--e-muted); }
.wb-ok { color: var(--e-ok-text); } .wb-warn { color: var(--e-warn-text); } .wb-risk { color: var(--e-risk); }
.watch-btn[aria-pressed="true"] { background: var(--e-accent); color: #fff; }
.tag-new { background: var(--e-accent); color: #fff; border-color: var(--e-accent); }
.notif-link { cursor: pointer; }
.notif-body { white-space: pre-line; }

/* Настройки уведомлений: куда сообщать; отметки об открытии отчёта */
.kind-row { display: flex; flex-direction: column; gap: 6px; }
.kind-row + .kind-row { border-top: 1px solid var(--e-line); padding-top: 10px; }
.pills.chan { gap: 6px; }
.pill-sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
.pill-fixed { background: var(--e-accent-soft); border-color: transparent; color: var(--e-accent); }
.opens { display: inline-flex; align-items: center; gap: 6px; }
.opens svg { width: 14px; height: 14px; }
.opens-yes { color: var(--e-ok-text); font-weight: 500; }
.opens-no { color: var(--e-muted); }

/* Задачи */
.task-list { display: flex; flex-direction: column; padding: 4px 0; }
.card.task-list { padding: 4px 16px; }
.task-row { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--e-line); }
.task-row:last-child { border-bottom: 0; }
.task-chk { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--e-accent); }
.task-open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0;
             padding: 8px 0; color: inherit; font: inherit; cursor: pointer; }
.task-open b { font-weight: 600; font-size: 15px; }
.task-done b { text-decoration: line-through; color: var(--e-muted); font-weight: 500; }
.task-late { color: var(--e-risk); font-weight: 500; }
.task-go { flex-shrink: 0; }
.task-empty { padding: 10px 0; }
.task-card { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--e-line); }
.task-card input { width: 100%; min-width: 0; }
.task-card .row > input { flex: 1; }
.task-made { display: block; margin-top: 8px; color: var(--e-ok-text); font-weight: 500; }
.gap-s { gap: 8px; }
.time-24 { max-width: 110px; text-align: center; font-variant-numeric: tabular-nums; }
.time-24.bad { border-color: var(--e-risk); }
.date-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.date-box .date-ru { flex: 1; min-width: 0; padding-right: 44px; font-variant-numeric: tabular-nums; }
.date-box.bad .date-ru { border-color: var(--e-risk); }
.date-cal { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0;
            background: none; color: var(--e-muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.date-cal span, .date-cal svg { display: block; }

/* CRM (docs/65) */
.pd-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--e-warn) 14%, var(--e-surface));
           font-size: 13px; color: var(--e-ink); }
.search-box { display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 44px; border: 1px solid var(--e-line);
              border-radius: 22px; background: var(--e-surface); color: var(--e-muted); }
.search-box input { border: 0; background: none; padding: 0; min-height: 40px; flex: 1; min-width: 0; outline: none; }
.crm-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-align: left; width: 100%; color: inherit; font: inherit; cursor: pointer; }
.crm-row b { font-size: 16px; }
.crm-unlinked { border-style: dashed; }
.crm-badges { display: flex; gap: 6px; flex-shrink: 0; }
.tb { min-width: 26px; height: 26px; border-radius: 13px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #fff; }
.tb-red { background: var(--e-risk); } .tb-orange { background: #E07B00; }
.why-chip.chip-red[aria-pressed="true"] { background: var(--e-risk); border-color: var(--e-risk); color: #fff; }
.why-chip.chip-orange[aria-pressed="true"] { background: #E07B00; border-color: #E07B00; color: #fff; }
.st-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.st-pill { --st: var(--e-muted); display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px;
           font-weight: 600; color: var(--st); background: color-mix(in srgb, var(--st) 13%, var(--e-surface)); white-space: nowrap; }
.st-select { --st: var(--e-accent); color: var(--st); font-weight: 600; background: color-mix(in srgb, var(--st) 10%, var(--e-surface)); }
.req-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--e-line);
           background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.req-row:last-child { border-bottom: 0; }
.contact { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--e-line); cursor: pointer; }
.contact:last-child { border-bottom: 0; }
.contact-links { flex-wrap: wrap; font-size: 14px; }
.contact-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--e-accent); text-decoration: none; }
.contact-links svg { width: 15px; height: 15px; }
.st-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) 32px 32px; align-items: center; gap: 6px 8px; padding: 8px 0;
          border-bottom: 1px solid var(--e-line); }
.st-row:not(.st-locked) select { grid-column: 2; grid-row: 2; justify-self: start; width: auto; min-width: 150px; min-height: 34px;
                                 font-size: 14px; padding-top: 4px; padding-bottom: 4px; }
.st-row:last-child { border-bottom: 0; }
.st-row.st-locked { grid-template-columns: 12px minmax(0, 1fr) auto 32px; min-height: 48px; }
.st-row input, .st-row select { width: 100%; min-width: 0; min-height: 40px; }
.st-dot { --st: var(--e-muted); width: 12px; height: 12px; border-radius: 6px; background: var(--st); }
.st-name { font-weight: 600; padding-left: 4px; }
.st-up, .st-del { width: 32px; height: 32px; font-size: 18px; color: var(--e-muted); }
.today-strip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.today-strip svg { color: var(--e-accent); }
.today-late { color: var(--e-risk); font-weight: 600; }
/* календарь задач */
.cal { padding: 12px; }
.cal-head { margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; color: var(--e-muted); padding: 2px 0; }
.cal-day { aspect-ratio: 1; min-height: 40px; border-radius: 10px; border: 1px solid transparent; background: var(--e-bg, transparent);
           display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font: inherit; color: inherit;
           cursor: pointer; padding: 0; }
.cal-day span { font-size: 14px; font-weight: 500; }
.cal-day small { font-size: 11px; font-weight: 700; line-height: 1; }
.cal-day.load-1 { background: color-mix(in srgb, var(--e-accent) 12%, var(--e-surface)); }
.cal-day.load-2 { background: color-mix(in srgb, var(--e-accent) 28%, var(--e-surface)); }
.cal-day.load-3 { background: color-mix(in srgb, var(--e-accent) 48%, var(--e-surface)); color: #fff; }
.cal-day.cal-orange { background: #FFE2BF; color: #8A4B00; border-color: #E07B00; }
.cal-day.cal-red { background: #FFD9D6; color: #9E1B13; border-color: var(--e-risk); }
.cal-day.cal-today { border-color: var(--e-accent); border-width: 2px; }
.cal-day.cal-sel { outline: 3px solid var(--e-accent); outline-offset: 1px; }
.cal-done { color: var(--e-ok-text); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--e-muted); }
.lg::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg-red::before { background: #FFD9D6; border: 1px solid var(--e-risk); }
.lg-orange::before { background: #FFE2BF; border: 1px solid #E07B00; }
.lg-load::before { background: color-mix(in srgb, var(--e-accent) 40%, var(--e-surface)); }
.crm-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.crm-filters::-webkit-scrollbar { display: none; }
.crm-filters .why-chip { flex-shrink: 0; white-space: nowrap; }
#crm-body .btn-pill { white-space: nowrap; flex-shrink: 0; }
.st-up:disabled { visibility: hidden; }
.me-tag { font-size: 11px; font-weight: 600; color: var(--e-accent); background: var(--e-accent-soft); border-radius: 8px; padding: 2px 8px; }
.who-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--e-line); }
.who-box select, .who-box input { width: 100%; }
.loose { border-bottom: 1px solid var(--e-line); padding-bottom: 6px; }
.loose:last-child { border-bottom: 0; }
.move-item { padding: 12px; border-radius: 12px; background: var(--e-accent-soft); }
.move-due { color: var(--e-ink); font-weight: 600; }
.hist { padding: 0; }
.hist-box { padding-top: 6px; padding-bottom: 6px; }
.hist-toggle { width: 36px; height: 36px; color: var(--e-muted); }
.hist-toggle[aria-expanded="true"] { color: var(--e-accent); }
.hist-row { display: flex; flex-direction: column; gap: 2px; padding: 7px 0; border-bottom: 1px solid var(--e-line); font-size: 12px; line-height: 1.35; }
.hist-row:last-child { border-bottom: 0; }
.hist-top { display: flex; justify-content: space-between; gap: 8px; }
.hist-top b { font-weight: 600; font-size: 12.5px; }
.hist-at { color: var(--e-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist-kv { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 1px 6px; }
.hist-k { color: var(--e-muted); }
.hist-old, .hist-new { white-space: pre-wrap; overflow-wrap: anywhere; }
.hist-old { color: var(--e-muted); }
.hist-new { color: var(--e-ink); }
.hist-who { align-self: flex-end; margin-top: -2px; font-size: 11px; color: var(--e-muted); }
.hist-who-other { color: var(--e-accent); font-weight: 600; background: var(--e-accent-soft); border-radius: 8px; padding: 1px 8px; }
.who-other-tag { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--e-accent); background: var(--e-accent-soft);
                 border-radius: 8px; padding: 1px 8px; }
.seg-sm button { font-size: 13px; min-height: 34px; }
#task-dlg input:disabled, #task-dlg button:disabled { opacity: .55; }
/* Лента фильтров: листается; затухание краёв и стрелки показывают, что есть ещё */
.carousel { position: relative; margin: 0 -16px; }
.carousel .crm-filters { margin: 0; padding: 2px 16px 4px; }
.carousel::before, .carousel::after { content: ""; position: absolute; top: 0; bottom: 0; width: 44px; pointer-events: none;
  opacity: 0; transition: opacity .2s; z-index: 1; }
.carousel::before { left: 0; background: linear-gradient(to right, var(--e-bg), transparent); }
.carousel::after { right: 0; background: linear-gradient(to left, var(--e-bg), transparent); }
.carousel.can-left::before, .carousel.can-right::after { opacity: 1; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 28px; height: 28px; border-radius: 14px;
  border: 1px solid var(--e-line); background: var(--e-surface); color: var(--e-ink); font-size: 18px; line-height: 1;
  display: none; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.12); cursor: pointer; padding: 0 0 2px; }
.car-prev { left: 6px; } .car-next { right: 6px; }
.carousel.can-left .car-prev, .carousel.can-right .car-next { display: flex; }
.crm-filters .why-chip[aria-pressed="true"]:not(.chip-red):not(.chip-orange) { background: var(--e-accent); border-color: var(--e-accent); color: #fff; }
/* Доступ к базе: ответственный, распределение */
.crm-tools { align-items: center; }
.crm-tools .pill-select { max-width: 60%; }
.crm-row.picked { border-color: var(--e-accent); background: var(--e-accent-soft); }
.pick-box { width: 24px; height: 24px; flex-shrink: 0; border-radius: 6px; border: 2px solid var(--e-line); display: flex;
            align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.crm-row.picked .pick-box { background: var(--e-accent); border-color: var(--e-accent); }
.pick-bar { position: sticky; bottom: calc(env(safe-area-inset-bottom) + 84px); z-index: 3; display: flex; flex-direction: column; gap: 8px;
            box-shadow: 0 4px 18px rgba(0,0,0,.14); }
.pick-bar select { flex: 1; min-width: 0; }
.owner-card { align-items: center; }
.owner-card select { max-width: 50%; }
.who-other-strong { color: var(--e-accent); }

/* ===== Анимации (маркетинг 06.11.2026, docs/design/eyrin/animations.md) =====
   Правила: кривая cubic-bezier(.2,.8,.2,1), 180–280 мс, двигаем только transform и opacity; лайм — только окно Эйрин, свет
   статуса и кольцо «Агента»; счётчик непрочитанных — красный; reduced-motion — без движения; в фоне — пауза. */
:root { --ease: cubic-bezier(.2,.8,.2,1); }

/* --- Эйрин на главном экране --- */
.screen-head > .head { position: relative; }
.screen-head > .sheet { position: relative; z-index: 1; }            /* ноги Эйрин чуть закрыты листом */
.greet-box { max-width: 210px; }
.agent-status { max-width: 100%; min-width: 0; }
.agent-status .light { flex-shrink: 0; }
#agent-status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.eyrin-spot { position: absolute; right: 18px; bottom: 26px; width: 96px; height: 96px; z-index: 0; }
.ms { overflow: visible; display: block; }
.ms * { transform-box: fill-box; }
.ms .bob { transform-origin: 50% 100%; animation: an-bob 4s ease-in-out infinite; }
@keyframes an-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.ms .eyes { transform-origin: center; animation: an-blink 5s infinite; transition: opacity .2s; }
@keyframes an-blink { 0%, 92%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.12); } 96% { transform: scaleY(1); } }
.ms .look { transition: transform .35s var(--ease); }
.ms .win { transition: fill .3s; }
.ms .arcs, .ms .squint, .ms .rays, .ms .dots, .ms .alert { opacity: 0; transition: opacity .2s; }
.ms .rays { transform-origin: 50% 80%; }
.ms .alert { transform-origin: center; }
.st-listen .look { transform: translate(-5px, 5px); }
.st-think .win { fill: #DDF68F; }
.st-think .look { transform: translate(2px, -6px); }
.st-msg .look { transform: translate(-4px, -4px); }
.st-msg .bob { animation: an-wave 3.2s ease-in-out infinite; }
@keyframes an-wave { 0%, 78%, 100% { transform: rotate(0); } 84% { transform: rotate(-5deg); } 90% { transform: rotate(4deg); } }
.st-found .eyes { opacity: 0; }
.st-found .arcs { opacity: 1; }
.st-found .rays { opacity: 1; animation: an-rays .7s var(--ease); }
@keyframes an-rays { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; } 100% { transform: scale(1); } }
.st-found .bob { animation: an-hop .6s var(--ease), an-bob 4s ease-in-out .6s infinite; }
@keyframes an-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-12px); } 70% { transform: translateY(2px); } 100% { transform: translateY(0); } }
.st-check .eyes { opacity: 0; }
.st-check .squint { opacity: 1; }
.st-check .alert { opacity: 1; animation: an-pop .35s var(--ease); }
@keyframes an-pop { 0% { transform: scale(.3); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* появление из-за листа — раз в день (вариант В) */
.eyrin-rise.rise { transform-origin: 50% 100%; animation: an-rise 1.7s var(--ease) both; }
.eyrin-rise.rise .win { animation: an-light 1.1s steps(1) both; }
@keyframes an-rise { 0% { transform: translateY(80px); } 40% { transform: translateY(-6px); } 55% { transform: translateY(0); }
                     70% { transform: rotate(-7deg); } 85% { transform: rotate(6deg); } 100% { transform: rotate(0); } }
@keyframes an-light { 0% { fill: #3E57B5; } 35% { fill: #C6F432; } 45% { fill: #3E57B5; } 60% { fill: #C6F432; } 100% { fill: #C6F432; } }
/* облачко мыслей, «Новое сообщение», счётчики */
.an-cloud { position: absolute; right: 16px; top: -44px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
            transform-origin: 90% 100%; animation: an-in .3s var(--ease) both, an-float 3s ease-in-out .3s infinite; pointer-events: none; }
.an-bubble { background: #fff; border-radius: 16px; padding: 9px 12px; display: flex; gap: 5px; box-shadow: 0 6px 16px rgba(14,18,23,.18); }
.an-c1 { width: 9px; height: 9px; border-radius: 5px; background: #fff; margin-right: -4px; }
.an-c2 { width: 5px; height: 5px; border-radius: 3px; background: #fff; margin-right: -10px; }
@keyframes an-in { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 100% { opacity: 1; transform: none; } }
@keyframes an-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.an-cdot { width: 7px; height: 7px; border-radius: 4px; background: #2F5BFF; animation: an-cd 1.2s ease-in-out infinite; }
.an-cdot:nth-child(2) { animation-delay: .2s; }
.an-cdot:nth-child(3) { animation-delay: .4s; }
@keyframes an-cd { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.an-msg { position: absolute; right: 12px; top: -46px; z-index: 3; border: 0; background: #fff; color: #1E3FD0; border-radius: 16px 16px 4px 16px;
          padding: 8px 12px; min-height: 34px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px;
          box-shadow: 0 6px 16px rgba(14,18,23,.18); white-space: nowrap; transform-origin: 90% 100%;
          animation: an-in .35s var(--ease) both, an-nudge 3.2s ease-in-out .35s infinite; }
@keyframes an-nudge { 0%, 78%, 100% { transform: none; } 84% { transform: rotate(-4deg); } 90% { transform: rotate(3deg); } }
.lt { width: 8px; height: 8px; border-radius: 4px; background: var(--e-light); flex-shrink: 0; }
.an-badge { position: absolute; right: 8px; top: 12px; z-index: 3; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box;
            border-radius: 10px; background: var(--e-risk); color: #fff; font-size: 12px; font-weight: 700; display: flex;
            align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--e-head); animation: an-pop .35s var(--ease) both; }
.tabbar .arch { position: relative; }
.arch-badge { right: -8px; top: -8px; box-shadow: 0 0 0 2px var(--e-surface); }
/* 5. свет статуса «дышит», пока Эйрин работает */
.light.pulse { animation: an-pulse 1.6s ease-out infinite; }
@keyframes an-pulse { 0% { box-shadow: 0 0 0 0 rgba(198,244,50,.7); } 100% { box-shadow: 0 0 0 9px rgba(198,244,50,0); } }
/* кнопка «Агент»: думает — лаймовое кольцо видно с любой вкладки */
.tabbar .arch.an-arch-think { animation: an-archglow 1.6s ease-out infinite; }
@keyframes an-archglow { 0% { box-shadow: 0 0 0 0 rgba(198,244,50,.7); } 100% { box-shadow: 0 0 0 10px rgba(198,244,50,0); } }
/* 6. нажатие «Агента»: 94% → 102% → 100%, отдельное кольцо 1 → 1,55 */
.arch-ring { position: absolute; inset: -4px; border-radius: 30px 30px 14px 14px; border: 3px solid var(--e-light); opacity: 0; pointer-events: none; }
.tabbar .arch.press { animation: au-press .38s both; }
.tabbar .arch.press .arch-ring { animation: au-ring .5s var(--ease) .1s both; }
@keyframes au-press { 0% { transform: scale(1); animation-timing-function: cubic-bezier(.4,0,.2,1); }
                      32% { transform: scale(.94); animation-timing-function: var(--ease); }
                      75% { transform: scale(1.02); animation-timing-function: ease-in-out; } 100% { transform: scale(1); } }
@keyframes au-ring { 0% { opacity: .75; transform: scale(1); } 100% { opacity: 0; transform: scale(1.55); } }

/* --- 1. Вход и главная: шапка проявляется, лист встаёт снизу (недолёт 5 px), карточки по очереди --- */
.enter .head > * { animation: au-fade .32s ease-out both; }
.enter .sheet { animation: au-sheet .32s both; }
.enter .sheet > * { animation: au-card .18s var(--ease) both; animation-delay: calc(.2s + var(--i, 7) * 40ms); }
@keyframes au-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes au-sheet { 0% { transform: translateY(120px); animation-timing-function: var(--ease); } 70% { transform: translateY(-5px); animation-timing-function: ease-in-out; }
                      100% { transform: translateY(0); } }
/* --- 2. Внутренние страницы — справа; «назад» — обратно; 3. чат — снизу --- */
.sub.in, .page-over.in { animation: au-right .24s var(--ease) both; }
.sub.back, .page-over.back { animation: au-back .24s var(--ease) both; }
.sub.out, .page-over.out { animation: au-out-right .24s var(--ease) both; pointer-events: none; }
.chat.in { animation: au-up .26s var(--ease) both; }
.chat.out { animation: au-out-down .26s var(--ease) both; pointer-events: none; }
@keyframes au-right { from { transform: translateX(100%); } to { transform: none; } }
@keyframes au-back { from { transform: translateX(-24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes au-out-right { from { transform: none; } to { transform: translateX(100%); } }
@keyframes au-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes au-out-down { from { transform: none; } to { transform: translateY(100%); } }
/* --- 4. реплики и кнопки брифа; 7. карточки выдачи — по очереди --- */
.fresh, .fresh .opts > *, .card-in { animation: au-card .18s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.fresh .opts > *:nth-child(2) { --i: 2; } .fresh .opts > *:nth-child(3) { --i: 3; } .fresh .opts > *:nth-child(n+4) { --i: 4; }
@keyframes au-card { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* --- 9. в избранное: звезда 1 → 1,25 → 1 --- */
.hero-btn .star-pop, .star-pop { animation: au-star .22s var(--ease); }
@keyframes au-star { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
/* --- 10. «Слежу»: значение перекатывается, лучше — зелёным, хуже — красным, словами --- */
.dir { font-size: 11px; font-weight: 600; border-radius: 8px; padding: 1px 6px; align-self: flex-start; }
.dir-better { background: #E5F4EC; color: #17633F; }
.dir-worse { background: #FDECEB; color: #A12723; }
.roll { display: inline-flex; flex-direction: column; height: 1.35em; overflow: hidden; vertical-align: bottom; }
.roll > span { line-height: 1.35em; white-space: nowrap; }
.roll.go > span { animation: au-roll .3s var(--ease) .3s both; }
@keyframes au-roll { from { transform: translateY(0); } to { transform: translateY(-100%); } }
.watch-row.flash-better::before, .watch-row.flash-worse::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
                                                                  animation: au-flash 1.8s ease-out .3s both; }
.watch-row.flash-better::before { background: #E5F4EC; }
.watch-row.flash-worse::before { background: #FDECEB; }
.watch-row.flash-better, .watch-row.flash-worse { position: relative; isolation: isolate; }
@keyframes au-flash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
/* --- 11. силуэты карточек с бликом вместо «Загружаю…» --- */
.sk-card { background: var(--e-surface); border-radius: var(--e-r-card, 16px); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sk { display: block; height: 12px; border-radius: 6px; position: relative; overflow: hidden; background: var(--e-line); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
             background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: au-sk 1.4s linear infinite; }
@keyframes au-sk { to { transform: translateX(100%); } }
.sk.w40 { width: 40%; } .sk.w60 { width: 60%; } .sk.w90 { width: 90%; }
/* --- 12. код входа: поля качаются и краснеют --- */
.code-boxes.shake { animation: au-shake .3s ease-in-out; }
.code-boxes.shake input { border-color: var(--e-risk); }
@keyframes au-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
                      60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }

/* фон — пауза; без движения — по настройке телефона */
body.bg-paused *, body.bg-paused *::before, body.bg-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .ms *, .eyrin-rise, .an-cloud, .an-cdot, .an-msg, .an-badge, .light.pulse, .tabbar .arch, .arch-ring, .enter *, .sub, .page-over,
  .chat, .fresh, .fresh *, .card-in, .star-pop, .roll > span, .watch-row::before, .sk::after, .code-boxes {
    animation: none !important; transition: none !important; }
}
.hero-btn > [data-icon] { display: inline-flex; }
/* «Отправить клиенту» (макет RV-Share) */
.share-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 14px; border-radius: 16px;
             border: 1px solid var(--e-line); background: var(--e-surface); color: var(--e-ink); }
.share-opt[aria-pressed="true"] { border: 2px solid var(--e-accent); padding: 13px; }
.share-opt:disabled { opacity: .55; }
.share-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--e-accent-soft); color: var(--e-accent); display: flex;
             align-items: center; justify-content: center; flex-shrink: 0; }
.share-url { display: flex; align-items: center; gap: 8px; background: var(--e-bg); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.share-url .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.share-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-row .btn-pill { text-align: center; justify-content: center; }
.color-row input[type="color"] { width: 48px; height: 36px; padding: 2px; border-radius: 10px; }
.share-row .btn-pill { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--e-ink); }
/* Комментарий клиенту — в презентацию (заказчик 06.11.2026) */
.btn-comment { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 18px; }
.cmt-card { background: var(--e-accent-soft); }
.cmt-text { margin: 0; white-space: pre-line; }
.obj-pick { padding-bottom: 6px; } .obj-pick .btn-link { align-self: flex-start; margin-left: 34px; }
.obj-cmt { margin-left: 34px; width: calc(100% - 34px); border-radius: var(--e-r-input); border: 1px solid var(--e-line); padding: 10px 12px;
           background: var(--e-surface); }
/* «Подробно о помещении» */
.facts-g { border-top: 1px solid var(--e-line); padding: 10px 0 2px; }
.facts-g summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.facts-dl { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 6px 12px; margin: 8px 0; font-size: 14px; }
.facts-dl dt { color: var(--e-muted); } .facts-dl dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.facts-dl small { font-size: 12px; }
/* Аналитика (п. 163) */
.stats-btn { border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; width: 100%; }
.an-hero { display: flex; flex-direction: column; gap: 6px; }
.an-big { font-size: 34px; font-weight: 600; letter-spacing: -0.02em; color: var(--e-accent); }
.an-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--e-line); }
.an-row:last-child { border-bottom: 0; } .an-row small { grid-column: 1 / -1; font-size: 12px; } .an-k { color: var(--e-muted); }
.an-funnel { display: flex; flex-direction: column; gap: 6px; }
.an-frow { display: grid; grid-template-columns: minmax(0, 38%) 1fr 32px; gap: 8px; align-items: center; font-size: 14px; }
.an-frow b { text-align: right; } .an-track { height: 10px; border-radius: 5px; background: var(--e-bg); overflow: hidden; display: block; }
.an-bar { display: block; height: 100%; border-radius: 5px; }
.an-team { display: flex; flex-direction: column; gap: 10px; } .an-off { opacity: .6; }
.an-grid { display: grid; grid-template-columns: 1fr; }
.an-range { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.an-range .date-box { min-width: 0; } .an-range .btn-pill { grid-column: 1 / -1; }
/* Проверка ООО */
.verdict-line { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.ooo-items, .ooo-cases { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ooo-items li { display: flex; gap: 8px; align-items: baseline; } .ooo-items .lv { flex-shrink: 0; position: relative; top: 1px; }
.ooo-cases li { display: flex; flex-direction: column; gap: 2px; }
/* Логотип в презентации */
.logo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-prev { height: 36px; max-width: 120px; object-fit: contain; border: 1px solid var(--e-line); border-radius: 8px; padding: 3px 6px; background: #fff; }
.logo-empty { color: var(--e-muted); font-size: 13px; }
/* 👍 / 👎 и админка */
.rate-box { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.rate-row { display: flex; gap: 6px; }
.rate-btn { border: 1px solid var(--e-line); background: var(--e-surface); border-radius: 16px; min-width: 44px; min-height: 32px; font-size: 15px; opacity: .7; }
.rate-btn[aria-pressed="true"] { opacity: 1; border-color: var(--e-accent); background: var(--e-accent-soft); }
.rate-why { display: flex; flex-direction: column; gap: 8px; }
.an-days { display: flex; align-items: flex-end; gap: 3px; min-height: 70px; overflow-x: auto; }
.an-dcol { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 14px; flex: 1; }
.an-dbar { display: block; width: 100%; max-width: 18px; border-radius: 3px 3px 0 0; }
.an-dcol small { font-size: 10px; color: var(--e-muted); }
.q-text { white-space: pre-line; font-size: 14px; } .q-fixed { opacity: .55; }
.fresh .rate-why .opts > * { animation: none; }       /* причины 👎 — сразу, без поочерёдного появления */
.ooo-date { align-items: center; gap: 8px; } .ooo-date small, .ooo-date .btn-link { white-space: nowrap; }

/* План действий Эйрин и отмена настроек (заказчик 09.11.2026) */
.plan-box { margin-top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.plan-again { min-height: 36px; font-size: 14px; }
.plan-state { font-size: 13px; font-weight: 600; color: var(--e-muted); }
.plan-state.st-done { color: var(--e-ok-text); }
.plan-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.plan-list select { display: block; width: 100%; margin-top: 6px; }
.plan-bad { color: var(--e-muted); }
/* Фильтры «Корзины» и «Архива» (заказчик 10.11.2026) */
.seg-4 { grid-template-columns: repeat(4, 1fr); }
.filter-chips { margin: 0 -16px; padding: 0 16px; }
.chip-on { background: var(--e-accent); border-color: var(--e-accent); color: #fff; }
.date-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .date-range .field { min-width: 0; } .date-range input { font-size: 16px; min-width: 0; }
.btn-nowrap { white-space: nowrap; flex-shrink: 0; }
