/* И.Р.И.С. Стиль как у локальной Ирис: бело-синий, тонкий Exo 2, много воздуха.
   Крупно и контрастно, кнопки нажимаются в перчатках (не ниже 56 px).
   --y - главный акцент (исторически «жёлтый», теперь синий), --ink - текст на акценте. */
@font-face { font-family: 'Exo 2'; font-weight: 200 700; font-display: swap; src: url(/fonts/exo2-cyr.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Exo 2'; font-weight: 200 700; font-display: swap; src: url(/fonts/exo2-lat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400 600; font-display: swap; src: url(/fonts/jbm-cyr.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400 600; font-display: swap; src: url(/fonts/jbm-lat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F; }
:root {
  --bg: #eef1f4;
  --panel: #f7f9fb;
  --card: #ffffff;
  --line: #cfd6de;
  --text: #1d2836;
  --mute: #66717f;
  --y: #2c9be6;
  --ink: #ffffff;
  --ok: #2fa36b;
  --bad: #e2453c;
  --warn: #c98516;
  --shadow: 0 1px 2px rgba(29,40,54,.06), 0 6px 18px rgba(29,40,54,.07);
  --tap: 56px;
  --r: 16px;
  --head: "Exo 2", "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif;
  --body: "Exo 2", "Segoe UI", Roboto, "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 62% 30%, #fff 0%, #f3f5f8 45%, #e3e8ee 100%) fixed var(--bg);
  color: var(--text);
  font: 16px/1.4 var(--body);
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); margin: 0; text-wrap: balance; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }

.stripe { height: 3px; background: linear-gradient(90deg, var(--y), #7cc6ff 55%, transparent); }

/* Шапка */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); }
.top-row { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 6px 16px; }
.logo { font-family: var(--head); font-weight: 300; letter-spacing: .26em; color: var(--text); }
.logo-big { font-size: 28px; }
.top-title { font-family: var(--head); font-weight: 700; font-size: 18px; margin-left: auto; text-align: right; }
.back { background: none; border: 0; min-height: var(--tap); padding: 0 12px 0 0; font-weight: 600; color: var(--y); font-size: 17px; }
.chip-btn {
  margin-left: auto; max-width: 62%; min-height: 40px; padding: 4px 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--panel); color: var(--mute); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Экраны */
.screen { flex: 1; padding: 8px 16px 24px; display: flex; flex-direction: column; gap: 14px; }
.screen.with-bar { padding-bottom: 190px; }
.screen.with-composer { padding-bottom: 150px; }
.big { font-size: 34px; line-height: 1.05; }
.big .count { color: var(--y); font-variant-numeric: tabular-nums; }
.lead { color: var(--mute); margin: 0; }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); color: var(--mute); margin: 0; }
.notice.warn { border-color: var(--warn); color: var(--warn); }
.empty { color: var(--mute); text-align: center; padding: 40px 0; margin: 0; }

/* Вход */
.auth { padding: 0; }
.auth-box { padding: 28px 20px; display: flex; flex-direction: column; gap: 16px; }
.auth-box h1 { font-size: 32px; }
.lang-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lang-switch button {
  flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--mute);
}
.lang-switch button.on { border-color: var(--y); color: var(--y); }
.fixed-email { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--card); color: var(--mute); }

/* Формы */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; color: var(--mute); letter-spacing: .04em; text-transform: uppercase; }
.field-hint { font-size: 13px; color: var(--mute); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: var(--tap); padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-size: 17px;
}
textarea { resize: vertical; min-height: var(--tap); line-height: 1.35; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--y); }
.form-error { margin: 0; color: var(--bad); font-weight: 600; }

/* Кнопки */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 12px 18px; border-radius: var(--r); border: 0;
  font-family: var(--head); font-weight: 600; font-size: 18px; letter-spacing: .02em; text-align: center;
}
.btn-main { background: var(--y); color: var(--ink); box-shadow: 0 6px 16px rgba(44,155,230,.28); }
.btn-dark { background: var(--card); border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow); }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--mute); }
.btn-red { border-color: #f0c4c0; color: var(--bad); }
.btn-small { min-height: 44px; font-size: 15px; padding: 8px 14px; }
.btn:active:not(:disabled) { transform: translateY(1px); filter: brightness(.92); }
.btn.busy { opacity: .6; }
.link { background: none; border: 0; padding: 6px 0; color: var(--y); font-size: 13px; text-align: left; min-height: 32px; }

/* Список задач */
.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1; min-height: 48px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); color: var(--mute);
  font-weight: 600; font-size: 15px;
}
.tab.on { background: var(--y); color: var(--ink); }
.list { display: flex; flex-direction: column; gap: 10px; }
.card {
  display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left;
  padding: 14px 16px; border-radius: var(--r); border: 1px solid #e1e6ec; background: var(--card); color: var(--text); box-shadow: var(--shadow);
}
.card.hot { background: #fff; color: var(--text); border-color: #f3b9b4; box-shadow: inset 4px 0 0 var(--bad), var(--shadow); }
.card h3 { font-size: 19px; line-height: 1.2; font-family: var(--body); font-weight: 600; }
.card-top { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--mute); }
.card.hot .card-top, .card.hot .meta { color: var(--mute); }
.num { font-family: var(--head); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.kind { padding: 1px 8px; border-radius: 8px; border: 1px solid currentColor; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--mute); }
.pill { padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-new { background: #e3f1fc; color: #1f7cc0; }
.pill-in_work { background: #fbf0de; color: #a86b12; }
.pill-done { background: #e1f4ea; color: #1f7a4f; }
.pill-accepted { background: #eceff2; color: var(--mute); }
.card.hot .pill { background: #fde5e3; color: #c1352d; }
.late { color: var(--bad); font-weight: 700; }
.card.hot .late { color: var(--bad); }

/* Нижняя панель */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 560px; margin: 0 auto;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 82%, transparent);
  display: flex; flex-direction: column; gap: 8px;
}
.bar-row { display: flex; gap: 8px; }
.bar-row .btn { flex: 1; }
.btn-mic { background: var(--panel); border: 1px dashed var(--line); color: var(--mute); min-height: 60px; }
.btn-mic.on { background: var(--card); border: 1px solid var(--y); color: var(--y); }
.mic-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--line); flex: none; }
.mic-dot.live { background: var(--bad); box-shadow: 0 0 0 4px #ff5a4d33; }
.soon { font-family: var(--body); font-weight: 400; font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 8px; }

/* Задача */
.task-body { display: flex; flex-direction: column; gap: 16px; }
.task-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--mute); }
.tx { display: flex; flex-direction: column; align-items: flex-start; }
.tx-main { white-space: pre-wrap; }
.tx-title .tx-main { font-family: var(--head); font-weight: 700; font-size: 26px; line-height: 1.15; }
.tx-note { font-size: 12px; color: var(--warn); }
.tx-orig { padding: 8px 12px; border-left: 3px solid var(--y); color: var(--mute); font-size: 14px; white-space: pre-wrap; }
.block { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--bad); font-weight: 700; }
.label.ok { color: var(--ok); }
.label.plain { color: var(--mute); }
.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 16px; background: var(--card); border-radius: var(--r); }
.facts dt { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.row2 { display: flex; gap: 8px; }
.row2 .btn { flex: 1; }
.back-panel { display: flex; flex-direction: column; gap: 8px; }

/* Фото */
.photos { display: flex; flex-wrap: wrap; gap: 8px; }
.photo {
  position: relative; width: 96px; height: 96px; padding: 0; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); overflow: hidden; flex: none;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo.failed { border-color: var(--bad); }
.photo-add { border-style: dashed; color: var(--mute); font-size: 14px; }
.photo-x {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px; border: 0; background: none;
  color: #fff; font-size: 24px; line-height: 1; text-shadow: 0 0 4px #000, 0 0 2px #000;
}
.viewer { position: fixed; inset: 0; z-index: 30; background: #000e; display: flex; align-items: center; justify-content: center; }
.viewer img { max-width: 100%; max-height: 100%; }
.viewer-close { position: absolute; top: 8px; right: 8px; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: #0009; color: #fff; font-size: 30px; }

/* Лента */
.feed { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.feed-status { font-size: 13px; color: var(--mute); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.feed-status .tx { color: var(--text); font-size: 15px; padding: 10px 14px; background: var(--card); border-radius: 14px; }
.msg { align-self: flex-start; max-width: 88%; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid #e1e6ec; display: flex; flex-direction: column; gap: 6px; }
.msg.me { align-self: flex-end; background: #dcebf8; }
.msg-head { font-size: 12px; color: var(--mute); }
.who { font-weight: 700; color: var(--text); }
.when { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }

/* Поле комментария */
.composer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; max-width: 560px; margin: 0 auto;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-width: 0; }
.btn-icon { width: var(--tap); padding: 0; font-size: 26px; flex: none; }
.btn-send { flex: none; padding: 12px 14px; font-size: 16px; }
.picked .photo { width: 64px; height: 64px; }

/* Люди */
.person { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r); background: var(--card); }
.person.off { opacity: .55; }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--y); border-radius: var(--r); }
.link-box p { margin: 0; color: var(--mute); font-size: 14px; }

/* Обводка дефекта */
.draw { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; flex-direction: column; }
.draw-hint { margin: 0; padding: 12px 16px; text-align: center; color: var(--y); font-weight: 600; }
.draw-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.draw-canvas { max-width: 100%; max-height: 100%; touch-action: none; border-radius: 8px; }
.draw-bar { display: flex; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.draw-bar .btn { flex: 1; padding: 12px 8px; font-size: 16px; }

/* Сообщения */
.offline { position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: var(--bad); color: #fff; font-weight: 700; text-align: center; }
#toast {
  position: fixed; left: 16px; right: 16px; bottom: 210px; z-index: 50; max-width: 528px; margin: 0 auto;
  padding: 14px 16px; border-radius: var(--r); background: var(--text); color: var(--ink); font-weight: 600;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .15s, transform .15s;
}
#toast.show { opacity: 1; transform: none; }
#toast.bad { background: var(--bad); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Ирис */
.iris-screen { padding-bottom: 0; }
.home-screen { flex: none; height: calc(100dvh - 82px); min-height: 0; padding-bottom: 0; gap: 10px; }
.home-screen .sections { flex: none; }
.home-screen .av { width: clamp(110px, 22dvh, 190px); }
.home-screen .iris { flex: 1; height: auto; }
.iris { display: flex; flex-direction: column; gap: 10px; flex: none; min-height: 0; height: calc(100dvh - 82px); }
.iris-embedded { height: 100dvh; padding: 0 16px; }
.iris-head { min-height: var(--tap); display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.iris-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.iris-msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; }
.iris-msg.her { align-self: flex-start; background: var(--card); border: 1px solid #e1e6ec; box-shadow: var(--shadow); }
.iris-msg.me { align-self: flex-end; background: #dcebf8; }
.iris-status { color: var(--y); font-size: 14px; font-weight: 600; }
.iris-compose { display: flex; flex-direction: column; gap: 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
.btn-hold { background: var(--y); color: var(--ink); min-height: 72px; font-size: 19px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.btn-hold.on { background: var(--bad); color: #fff; }
.btn-hold:disabled { opacity: .5; }
.ic { align-self: stretch; border: 2px solid var(--y); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--panel); }
.ic-done, .ic-rejected, .ic-failed { border-color: var(--line); }
.ic-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--y); font-weight: 700; }
.ic-title { font-weight: 700; font-size: 17px; white-space: pre-wrap; }
.ic-line { color: var(--mute); font-size: 14px; white-space: pre-wrap; }
.ic-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.ic-actions .btn { flex: 1; }
.ic-actions .ic-done { color: var(--ok); font-weight: 700; flex: 1; }
.ic-state { color: var(--mute); font-size: 14px; }
.install { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--y); border-radius: var(--r); }
.install-text { flex: 1 1 200px; font-size: 14px; }

/* Планшет и ПК: список слева, Ирис справа */
@media (min-width: 900px) {
  #app.split { max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #app.split .split-left { display: flex; flex-direction: column; min-height: 100dvh; }
  #app.split .bar { position: sticky; max-width: none; margin: 0; }
  #app.split .screen.with-bar { padding-bottom: 24px; }
  #app.split .split-right { position: sticky; top: 0; height: 100dvh; border-left: 1px solid var(--line); }
}

/* Лицо Ирис: голограмма */
.av { position: relative; flex: none; align-self: center; width: 190px; aspect-ratio: 1; margin: 0; }
.iris-embedded .av { width: 230px; }
.av-face { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #eef4f9 0%, #d3e1ed 55%, #b4c8da 100%); box-shadow: 0 10px 30px rgba(20,60,95,.16), inset 0 0 0 1px rgba(44,155,230,.18); }
.av-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.av-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.av.av-idle .av-ring { border-color: #3fa9f5; box-shadow: 0 0 18px #3fa9f544; }
.av.av-listen .av-ring { border-color: var(--bad); box-shadow: 0 0 26px #ff5a4d88; animation: av-pulse 1s ease-in-out infinite; }
.av.av-think .av-ring { border-color: var(--y); border-top-color: transparent; animation: av-spin 1s linear infinite; }
.av.av-talk .av-ring { border-color: #3fa9f5; box-shadow: 0 0 28px #3fa9f588; animation: av-pulse 1.4s ease-in-out infinite; }
@keyframes av-pulse { 50% { transform: scale(1.04); } }
@keyframes av-spin { to { transform: rotate(360deg); } }
@media (max-height: 620px) { .av { width: 130px; } }
@media (prefers-reduced-motion: reduce) { .av-ring { animation: none !important; } }
.mini-iris { width: 34px; height: 34px; border-radius: 50%; flex: none; background: #e9f1f8; border: 2px solid var(--y); box-shadow: 0 0 10px rgba(44,155,230,.4); }

/* Разделы, тендеры, совещания */
.sections { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.sec { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--mute); font-family: var(--head); font-weight: 700; font-size: clamp(12px, 3.3vw, 15px); padding: 0 4px; overflow-wrap: normal; word-break: keep-all; }
.sec.on { background: var(--card); color: var(--y); box-shadow: var(--shadow); }
.tender { cursor: default; }
.tender .price { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.tender a.link { text-decoration: underline; }
.setup { border: 1px solid var(--line); border-radius: var(--r); padding: 0 14px; }
.setup summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--y); }
.setup .form { padding-bottom: 14px; }
.setup .row2 .field { flex: 1; min-width: 0; }
.btn-rec { min-height: 64px; width: 100%; }
.pill-m-recording { background: #fde5e3; color: #c1352d; }
.pill-m-processing { background: #fbf0de; color: #a86b12; }
.pill-m-done { background: #e1f4ea; color: #1f7a4f; }
.pill-m-failed { background: #fde5e3; color: #c1352d; }
.rec { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; text-align: center; }
.rec .btn { width: 100%; }
.rec-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--bad); animation: av-pulse 1s ease-in-out infinite; box-shadow: 0 0 0 8px #ff5a4d33; }
.rec-time { font-family: var(--head); font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.rec-info { color: var(--mute); }
.proto, .part { white-space: pre-wrap; margin: 0; }
.proto { padding: 12px 14px; background: var(--card); border-radius: var(--r); align-self: stretch; }
.part { padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.block.stretch { align-items: stretch; }

/* Живой голос и переводчик */
.btn-live { background: var(--card); border: 1px solid var(--y); color: var(--y); min-height: 60px; box-shadow: var(--shadow); }
.btn-live.on { background: var(--y); color: #fff; }
.iris-caption { color: var(--y); font-size: 15px; min-height: 22px; text-align: center; }
.tr { gap: 10px; }
.tr-half { flex: 1; min-height: 120px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.tr-top { transform: rotate(180deg); background: #e8eef4; }
.tr-lines { display: flex; flex-direction: column; gap: 6px; }
.tr-line { margin: 0; font-size: 20px; line-height: 1.3; }
.tr-line.user { color: var(--mute); font-size: 15px; }
.tr-line.assistant { color: var(--text); font-weight: 600; }
.tr-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.tr-mid .tabs, .tr-btn { width: 100%; }
.tr-status { color: var(--mute); font-size: 14px; text-align: center; }
.tr-on { border-color: var(--bad); color: var(--bad); }

/* Портрет-аватар: состояние показывает мягкая подсветка рамки */
.av-photo .av-face { transition: box-shadow .35s; }
.av-photo.av-listen .av-face { box-shadow: 0 0 0 3px rgba(226,69,60,.55), 0 10px 30px rgba(226,69,60,.25); }
.av-photo.av-think .av-face { box-shadow: 0 0 0 3px rgba(230,163,58,.6), 0 10px 30px rgba(230,163,58,.22); }
.av-photo.av-talk .av-face { box-shadow: 0 0 0 3px rgba(44,155,230,.6), 0 10px 30px rgba(44,155,230,.3); }

/* Файлы в чате Ирис */
.iris-file { display: flex; align-items: center; gap: 10px; max-width: 94%; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid #e1e6ec; box-shadow: var(--shadow); }
.iris-file.her { align-self: flex-start; }
.iris-file.me { align-self: flex-end; background: #dcebf8; box-shadow: none; }
.file-ico { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font: 700 12px var(--mono); letter-spacing: .04em; color: #fff; background: #66717f; }
.file-xlsx, .file-csv { background: #1f8f5a; }
.file-docx { background: #2c7be6; }
.file-pdf { background: #d6453c; }
.file-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-name { font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.file-size { font-size: 13px; color: var(--mute); }
.file-get { flex: none; text-decoration: none; min-height: 48px; }
.btn-attach { flex: none; width: var(--tap); padding: 0; font-size: 26px; font-weight: 400; }

/* ---------- Разделы «Чат» и «Документы» ---------- */
@media (min-width: 900px) { #app.wide { max-width: 1180px; } }
.chats-screen { padding-bottom: 12px; }
.chats-wrap { display: flex; gap: 16px; flex: 1; min-height: 0; }
.chats-side { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.chats-side-top { display: flex; flex-direction: column; gap: 8px; }
.chats-side-top .btn.on { border-color: var(--y); color: var(--y); }
.chats-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; }
.chat-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.chat-item.on { border-color: var(--y); box-shadow: 0 0 0 2px rgba(44,155,230,.18); }
.chat-item-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-item-date { font-size: 12px; color: var(--mute); }
.chats-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; min-height: calc(100dvh - 170px); border-radius: var(--r); position: relative; }
.chats-pane.drop { outline: 3px dashed var(--y); outline-offset: 4px; }
.pane-head { display: flex; align-items: center; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pane-head h2, .pane-title { font-size: 20px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pane-head input { flex: 1; min-height: 44px; padding: 8px 12px; font-size: 17px; }
.pane-menu { display: flex; gap: 6px; }
.pane-back { display: none; }
.pane-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; }
.chat-log { flex: 1; min-height: 240px; }
.compose-row { display: flex; gap: 8px; }
.compose-row .btn-send { flex: 1; }
.cam-only { display: none; }
.upload-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--y); transition: width .2s; }
.drop-hint { margin: 0; font-size: 13px; color: var(--mute); text-align: center; }
.files-filter { display: flex; gap: 8px; }
.files-filter input { flex: 1; }
.files-filter select { width: auto; }
.files-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid #e1e6ec; flex-wrap: wrap; }
.file-row .file-info { flex: 1; min-width: 140px; }
.memory-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid #e1e6ec; }
.memory-text { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.memory-date { font-size: 12px; color: var(--mute); }
@media (max-width: 899px) {
  .sections { flex-wrap: wrap; }
  .sec { flex: 1 0 30%; }
  .chats-side { width: auto; flex: 1; }
  .chats-screen.has-pane .chats-side { display: none; }
  .chats-screen.no-pane .chats-pane { display: none; }
  .pane-back { display: inline-flex; }
  .cam-only { display: inline-flex; }
  .drop-hint { display: none; }
  .chats-pane { min-height: calc(100dvh - 130px); }
}

/* Главная на ПК: разделы в одну строку не влезают в 560 px - переносим */
@media (min-width: 900px) {
  .home-screen .sections, .screen .sections { flex-wrap: wrap; }
}

/* Ирис для ПК в профиле */
.pc-get { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.pc-get .btn { text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.pc-steps { margin: 0; padding-left: 20px; color: var(--mute); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }

/* внутри программы «Ирис для ПК»: разделы и профиль показывает сама программа */
.embed .sections, .embed .chip-btn { display: none !important; }
.embed header.top:has(.logo) { display: none; }

.btn-end { background: var(--bad); color: #fff; min-height: 64px; font-size: 18px; }

/* заявка на демо */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute); }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.consent a, .auth-box .lead a { color: var(--y); }
.demo-ask { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.demo-ask .btn { text-decoration: none; display: flex; align-items: center; justify-content: center; }
.apply-steps ol { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.key-form { padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.legal { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }
.legal h1 { font-size: 28px; line-height: 1.2; }
.legal h2 { font-size: 18px; margin: 18px 0 0; }
.legal p { margin: 6px 0 0; }
.legal a { color: var(--y); }

/* ежедневник */
.planner-add { display: flex; flex-direction: column; gap: 10px; }
.planner-mic { min-height: 64px; font-size: 18px; }
.planner-mic.on { background: var(--bad); }
.planner-quick { display: flex; gap: 8px; }
.planner-quick input { flex: 1; min-width: 0; }
.planner-status { margin: 0; color: var(--y); font-size: 14px; }
.planner-when { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.planner-list { display: flex; flex-direction: column; gap: 18px; }
.planner-day h2 { font-size: 17px; margin: 0 0 8px; }
.planner-day.past h2 { color: var(--bad); }
.planner-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 8px; }
.planner-item input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.planner-time { flex: none; min-width: 48px; font-weight: 700; color: var(--y); font-variant-numeric: tabular-nums; }
.planner-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.planner-item.done .planner-text, .planner-item.done .planner-time { text-decoration: line-through; color: var(--mute); }
.planner-del { border: 0; background: none; color: var(--mute); font-size: 22px; width: 36px; height: 36px; border-radius: 10px; flex: none; }
.planner-del:hover { background: #fde5e3; color: var(--bad); }

.iris-msg a { color: var(--y); overflow-wrap: anywhere; }

.pc-key { display: flex; flex-direction: column; gap: 6px; }
.pc-key:empty { display: none; }
.pc-key-code { font-size: 15px; font-weight: 700; letter-spacing: .04em; padding: 10px 12px; border-radius: 10px; background: #eef4fa; color: var(--text); user-select: all; overflow-wrap: anywhere; }
