/* FixAR v2 — авторизованная оболочка «Свет в глубине».
   Гостевая композиция остаётся в my-day.css; здесь тот же материал становится
   системным языком навигации, дел, форм и кабинета. */

.plan-action-activity { margin-top:8px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;overflow-wrap:anywhere }
.plan-action-activity b { font-size:12px }
.plan-action-activity small { display:block;color:var(--muted);margin-top:4px }
.plan-activity-dot { display:inline-block;width:9px;height:9px;border-radius:50%;background:var(--dim);margin-right:7px }
.plan-action-activity[data-state="running"] .plan-activity-dot { background:var(--accent) }
.plan-action-activity[data-state="accepted"] .plan-activity-dot { background:var(--accent) }
.plan-action-activity[data-state="waiting"] .plan-activity-dot,
.plan-action-activity[data-state="queued"] .plan-activity-dot,
.plan-action-activity[data-state="review"] .plan-activity-dot { background:var(--amber) }
.plan-action-activity[data-state="done"] .plan-activity-dot { background:var(--green) }
.plan-action-activity[data-state="error"] .plan-activity-dot { background:var(--red, #f17777) }

/* Общий порог из first_experience.json для сенсорного интерфейса, включая
   гостя. Локальные компактные скины не должны снова уменьшать кнопку.
   Невидимый caret.leaf не является действием и не получает новую ширину. */
@media (max-width: 760px), (any-pointer: coarse) {
  :where(button:not(.caret.leaf), [role="button"], summary, a.btn, .domashkin-strip-cta,
         input[type="submit"], input[type="button"]) {
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

body:not(.guest-shell) {
  color-scheme: dark;
  --bg: #09090c;
  --panel: #18161c;
  --panel-2: #121115;
  --field: #151319;
  --sidebar: #0e0d11;
  --hover: #211e27;
  --field-line: rgba(208,193,230,.18);
  --line: rgba(220,210,236,.115);
  --line-soft: rgba(220,210,236,.065);
  --text: #f1efef;
  --muted: #aaa4b1;
  --dim: #77717f;
  --cyan: hsl(var(--accent-h) 52% 76%);
  --accent-soft: hsl(var(--accent-h) 42% 55%/.12);
  --accent-border: hsl(var(--accent-h) 50% 73%/.36);
  --on-accent: #21172e;
  --green: #83cfa1;
  --amber: #f2aa88;
  --focus: #d3c2f5;
  --warm: #f19a78;
  --warm-soft: rgba(239,126,86,.12);
  --depth-edge: rgba(236,221,255,.16);
  --shadow: inset 0 1px rgba(255,255,255,.075), inset 0 -1px rgba(0,0,0,.55),
    0 2px 0 #070608, 0 22px 48px -14px rgba(0,0,0,.82);
  --shadow-deep: inset 0 1px rgba(255,255,255,.11), inset 1px 0 rgba(255,255,255,.035),
    inset 0 -1px rgba(0,0,0,.68), 0 3px 0 #070608,
    0 30px 65px -17px rgba(0,0,0,.92), 0 8px 18px rgba(0,0,0,.38);
  --radius: 18px;
  --nav-w: 286px;
  background: var(--body-art,#09090c);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="light"] body:not(.guest-shell) {
  color-scheme: light;
  --bg: #eeecef;
  --panel: #faf8fa;
  --panel-2: #f2eff4;
  --field: #f7f4f8;
  --sidebar: #17151b;
  --hover: #ece7f0;
  --field-line: rgba(58,45,70,.2);
  --line: rgba(58,45,70,.13);
  --line-soft: rgba(58,45,70,.075);
  --text: #28232b;
  --muted: #736b78;
  --dim: #928a96;
  --cyan: hsl(var(--accent-h) 30% 38%);
  --accent-soft: hsl(var(--accent-h) 30% 46%/.105);
  --accent-border: hsl(var(--accent-h) 31% 44%/.3);
  --on-accent: #fff;
  --green: #397a52;
  --amber: #a25c3e;
  --focus: #7357a2;
  --warm: #b55d3f;
  --warm-soft: rgba(181,93,63,.1);
  --depth-edge: rgba(255,255,255,.72);
  --shadow: inset 0 1px rgba(255,255,255,.9), inset 0 -1px rgba(53,37,61,.05),
    0 2px 0 rgba(54,38,63,.04), 0 18px 36px -18px rgba(49,36,55,.22);
  --shadow-deep: inset 0 1px #fff, inset 1px 0 rgba(255,255,255,.7),
    inset 0 -1px rgba(53,37,61,.08), 0 3px 0 rgba(54,38,63,.05),
    0 28px 58px -22px rgba(49,36,55,.3);
}

body:not(.guest-shell) .app {
  position: relative;
  isolation: isolate;
  background: radial-gradient(circle at 82% 15%,hsl(var(--background-h) 34% 17%/.13),transparent 34%),var(--bg);
}

body:not(.guest-shell) .view {
  position: relative;
  isolation: isolate;
  background: transparent;
}

body:not(.guest-shell) .vwrap,
body:not(.guest-shell) .topm {
  position: relative;
  z-index: 2;
}
/* «Назад» остаётся прилипающей: с position:relative её top:63px на телефоне
   сдвигал кнопку вниз, прямо на заголовок экрана. */
body:not(.guest-shell) .screen-nav { position: sticky; z-index: 9; }

/* ── Фоновая архитектура: та же сетка и тот же зернистый материал ───── */
.shell-holo-scene {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--body-art,#09090c);
}
body.guest-shell .shell-holo-scene { display: none; }
.shell-holo-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg,transparent calc(100% - 1px),rgba(170,166,190,.083) 0),
    linear-gradient(transparent calc(100% - 1px),rgba(170,166,190,.083) 0);
  background-size: 172px 146px;
  background-position: 0 -26px;
  mask-image: linear-gradient(115deg,rgba(0,0,0,.4),#000);
}
.shell-holo-panels {
  position: absolute;
  inset: 0;
  opacity: var(--holo-glow,.87);
  transition: opacity .5s;
}
.shell-holo-panel {
  left: var(--hx);
  top: var(--hy);
  width: var(--hw);
  height: calc(var(--hh) * var(--holo-scale,1));
  box-shadow: 0 35.56px 60.96px -7px rgba(0,0,0,.93),0 2px 4px #000,inset 0 1px rgba(255,255,255,.13);
}
.shell-holo-panel canvas { filter: saturate(1.12); }
.shell-holo-panel.is-flicker,
.fixar-holo-panel.is-flicker {
  animation-name: fixar-holo-lamp-flicker;
  animation-timing-function: linear;
}
.shell-holo-ambient {
  position: absolute;
  width: 760px;
  height: 520px;
  right: -240px;
  top: 220px;
  background: radial-gradient(ellipse,rgba(135,58,102,.075),transparent 68%);
  filter: blur(30px);
}
.shell-holo-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,rgba(9,9,12,.985) 0%,rgba(9,9,12,.925) 26%,rgba(9,9,12,.54) 52%,rgba(9,9,12,.02) 86%),
    linear-gradient(0deg,#09090c 0%,rgba(9,9,12,.07) 47%,rgba(9,9,12,.19) 85%,rgba(9,9,12,.85) 100%);
  opacity: var(--holo-veil-opacity,.36);
  transition: opacity .5s ease;
}
@keyframes fixar-holo-lamp-flicker {
  0%, 43%, 78%, 100% { opacity: var(--base); }
  45% { opacity: .1; }
  47% { opacity: min(1,calc(var(--base) + .36)); }
  50% { opacity: .22; }
  53% { opacity: calc(var(--base) + .08); }
  56% { opacity: .08; }
  59% { opacity: min(1,calc(var(--base) + .28)); }
  63% { opacity: .31; }
  67% { opacity: min(1,calc(var(--base) + .18)); }
  71% { opacity: .16; }
  74% { opacity: min(1,calc(var(--base) + .3)); }
  76% { opacity: calc(var(--base) + .04); }
}

/* ── Боковая панель: самостоятельный объёмный объект ───────────────── */
body:not(.guest-shell) .side {
  position: relative;
  z-index: 34;
  overflow: hidden;
  border-right: 1px solid rgba(218,204,239,.15);
  background:
    linear-gradient(180deg,rgba(29,25,34,.97),rgba(12,11,14,.99) 54%,#0a090c),
    #0e0d11;
  box-shadow:
    inset -1px 0 rgba(255,255,255,.035),
    7px 0 0 rgba(5,4,7,.72),
    22px 0 48px rgba(0,0,0,.62);
}

/* Личное/Семья начинают с разговора: рабочая навигация появляется только
   после явного «К делам». Профиль справа остаётся доступен. */
body.chat-home-shell .app { grid-template-columns: minmax(0,1fr); }
body.chat-home-shell .side,
body.chat-home-shell .topm,
body.chat-home-shell .agent-dock,
body.chat-home-shell .screen-nav { display: none!important; }
body:not(.guest-shell) .side::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .42;
  background-image:
    linear-gradient(90deg,transparent calc(100% - 1px),rgba(186,172,205,.055) 0),
    linear-gradient(transparent calc(100% - 1px),rgba(186,172,205,.055) 0);
  background-size: 86px 73px;
  mask-image: linear-gradient(#000,transparent 82%);
}
body:not(.guest-shell) .side::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 210px;
  height: 124px;
  right: -66px;
  top: 76px;
  opacity: .52;
  background:
    radial-gradient(circle at 12% 40%,rgba(125,92,228,.7),transparent 34%),
    radial-gradient(circle at 86% 50%,rgba(255,105,67,.61),transparent 36%);
  filter: blur(32px);
  transform: rotate(-9deg);
}
body:not(.guest-shell) .brand {
  position: relative;
  min-height: 92px;
  padding: 25px 20px 17px;
  gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
/* Подпись «Личное пространство» убрана: она была одна на все пространства
   и дублировала переключатель прямо под логотипом. */
body:not(.guest-shell) .brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(221,209,255,.21);
  border-radius: 12px;
  background: linear-gradient(150deg,#3a304e,#191720 70%);
  color: #d4c6ff;
  box-shadow: inset 0 1px rgba(255,255,255,.17),0 3px 0 #09080b,0 10px 20px rgba(0,0,0,.64);
  font-size: 22px;
}
body:not(.guest-shell) .brand b {
  align-self: flex-start;
  padding-top: 1px;
  color: #f1efef;
  font-size: 22px;
  font-weight: 740;
  letter-spacing: -1px;
}
body:not(.guest-shell) .brand > span:not(.brand-mark) { display: none; }
body:not(.guest-shell) .brand .lang-switch {
  margin-left: auto;
  min-width: 36px;
  height: 31px;
  border-color: rgba(255,255,255,.09);
  border-radius: 9px;
  background: rgba(18,17,22,.74);
  color: #9992a2;
  box-shadow: inset 0 1px rgba(255,255,255,.04),0 4px 12px rgba(0,0,0,.25);
}
body:not(.guest-shell) .search { position: relative; padding: 15px 15px 10px; }
body:not(.guest-shell) .search::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 28px;
  width: 14px;
  height: 14px;
  border: 1px solid #837b8b;
  border-radius: 50%;
  pointer-events: none;
}
body:not(.guest-shell) .search::after {
  content: "";
  position: absolute;
  left: 40px;
  top: 41px;
  width: 6px;
  height: 1px;
  background: #837b8b;
  transform: rotate(45deg);
  pointer-events: none;
}
body:not(.guest-shell) .search input {
  height: 42px;
  padding: 0 13px 0 37px;
  border-color: rgba(255,255,255,.075);
  border-radius: 12px;
  background: rgba(12,11,15,.65);
  color: #e9e4ed;
  box-shadow: inset 0 1px rgba(255,255,255,.025),inset 0 -1px rgba(0,0,0,.52);
  font-size: 12px;
}
body:not(.guest-shell) .search input::placeholder { color: #716b77; }
body:not(.guest-shell) .switch { padding: 2px 15px 11px; }
body:not(.guest-shell) .me {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 18px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 62px;
  padding: 10px 11px;
  border: 1px solid rgba(216,199,240,.14);
  border-radius: 15px;
  background: linear-gradient(145deg,rgba(39,34,45,.95),rgba(20,18,24,.96));
  color: #eee9f1;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
}
body:not(.guest-shell) .me::before {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(225,207,255,.42),rgba(244,142,99,.17),transparent);
}
body:not(.guest-shell) .me:hover { border-color: rgba(198,169,240,.32); transform: translateY(-1px); }
.me-space-mark,
.me-space-mark .n-icon { display: grid; place-items: center; width: 38px; height: 38px; }
.me-space-mark .n-icon {
  border: 1px solid rgba(191,164,234,.17);
  border-radius: 12px;
  background: linear-gradient(145deg,rgba(102,73,135,.32),rgba(43,31,54,.5));
  color: #c7b0ec;
  box-shadow: inset 0 1px rgba(255,255,255,.09),0 5px 12px rgba(0,0,0,.33);
}
.me-space-mark svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.me-space-copy { display: grid; min-width: 0; gap: 1px; }
body:not(.guest-shell) .me-label { color: #78717f; font-size: 8px; font-weight: 560; letter-spacing: 1.4px; }
body:not(.guest-shell) .me-space { overflow: hidden; color: #e9e3ec; font-size: 14px; font-weight: 570; text-overflow: ellipsis; white-space: nowrap; }
.me-space-arrow { color: #756e7a; font-size: 16px; transition: transform 160ms ease; }
body:not(.guest-shell) .me:hover .me-space-arrow { color: #c9b7e8; transform: translateY(2px); }
body:not(.guest-shell) .switch .credit-pill {
  min-height: 34px;
  margin-top: 8px;
  border-color: rgba(239,161,118,.22);
  background: rgba(65,41,35,.32);
  color: #eab092;
  font-size: 10px;
  font-weight: 600;
}

body:not(.guest-shell) nav {
  padding: 5px 10px 18px;
  scrollbar-color: rgba(192,169,223,.18) transparent;
}
body:not(.guest-shell) .n-row {
  position: relative;
  min-height: 47px;
  margin: 3px 0;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 13px;
  transition: border-color 160ms ease,background 160ms ease,transform 160ms ease,box-shadow 160ms ease;
}
body:not(.guest-shell) .n-row:hover {
  border-color: rgba(255,255,255,.065);
  background: rgba(255,255,255,.025);
  transform: translateX(2px);
}
body:not(.guest-shell) .n-row.active {
  border-color: rgba(196,171,237,.2);
  background: linear-gradient(110deg,rgba(102,72,136,.34),rgba(39,30,48,.43) 62%,rgba(74,42,37,.2));
  box-shadow: inset 0 1px rgba(255,255,255,.085),0 2px 0 rgba(5,4,7,.76),0 11px 20px -12px rgba(0,0,0,.9);
}
body:not(.guest-shell) .n-row.active::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 14px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg,rgba(188,151,255,.58),rgba(244,137,92,.26),transparent);
}
body:not(.guest-shell) .n-label {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 8px;
  color: #aaa2b0;
}
.n-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(179,154,213,.1);
  border-radius: 10px;
  background: linear-gradient(145deg,rgba(80,60,97,.18),rgba(27,23,32,.32));
  color: #9e8db6;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.n-icon svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.n-icon-assistant,.n-icon-compass { color: #c7aaf0; }
.n-icon-dialog,.n-icon-case { color: #d2c6e3; }
.n-icon-wallet,.n-icon-calendar { color: #e5a384; }
.n-copy { display: grid; min-width: 0; gap: 1px; }
.n-copy strong { overflow: hidden; font-size: 12.5px; font-weight: 540; letter-spacing: -.08px; text-overflow: ellipsis; white-space: nowrap; }
.n-copy small { color: #69626f; font-size: 8px; font-weight: 520; letter-spacing: .5px; text-transform: uppercase; }
body:not(.guest-shell) .n-row.active .n-label { color: #f0e9f5; }
body:not(.guest-shell) .n-row.active .n-icon {
  border-color: rgba(202,175,245,.19);
  background: linear-gradient(145deg,rgba(118,82,153,.32),rgba(54,37,66,.38));
  color: #dbc5ff;
  box-shadow: inset 0 1px rgba(255,255,255,.1),0 5px 14px rgba(0,0,0,.27);
}
body:not(.guest-shell) .caret {
  order: 2;
  width: 28px;
  height: 36px;
  margin-right: 5px;
  color: #6d6673;
  font-size: 14px;
  transition: transform 160ms ease,color 160ms ease;
}
body:not(.guest-shell) .caret[aria-expanded="true"] { color: #c1afd9; transform: rotate(180deg); }
body:not(.guest-shell) .caret.leaf { width: 4px; flex-basis: 4px; visibility: hidden; }
body:not(.guest-shell) .kids {
  margin: 2px 0 7px 25px;
  padding-left: 8px;
  border-left: 1px solid rgba(186,164,215,.11);
}
body:not(.guest-shell) .kids .n-row { min-height: 40px; }
body:not(.guest-shell) .kids .n-label { grid-template-columns: 28px minmax(0,1fr); gap: 8px; padding-block: 4px; }
body:not(.guest-shell) .kids .n-icon { width: 27px; height: 27px; border-radius: 8px; }
body:not(.guest-shell) .kids .n-icon svg { width: 14px; height: 14px; }
body:not(.guest-shell) .kids .n-copy strong { font-size: 11.5px; }
body:not(.guest-shell) .kids .n-copy small { display: none; }

body:not(.guest-shell) .protofoot {
  position: relative;
  padding: 11px 12px 15px;
  border-top: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(180deg,rgba(15,13,17,.72),rgba(8,7,10,.96));
}
.desktop-account {
  position: fixed;
  z-index: 12;
  top: 18px;
  right: 22px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 218px;
  min-height: 54px;
  padding: 7px 9px;
  border: 1px solid rgba(211,194,233,.14);
  border-radius: 16px;
  background: linear-gradient(145deg,rgba(33,29,38,.94),rgba(17,15,20,.96));
  color: #ede8ef;
  box-shadow: var(--shadow-deep);
  cursor: pointer;
  text-align: left;
}
body.guest-shell .desktop-account { display: none; }
.desktop-account:hover { border-color: rgba(201,174,238,.35); background: linear-gradient(145deg,rgba(53,43,61,.96),rgba(20,17,23,.98)); }
.desktop-account:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.desktop-account .av {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(234,217,255,.2);
  border-radius: 12px;
  background: linear-gradient(145deg,#514065,#241d2b);
  color: #eadcff;
  box-shadow: inset 0 1px rgba(255,255,255,.14),0 5px 12px rgba(0,0,0,.42);
  font-size: 11px;
}
.desktop-account .av img { width: 100%; height: 100%; object-fit: cover; }
.desktop-account-copy { display: grid; min-width: 0; gap: 2px; }
.desktop-account-copy b,
.desktop-account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-account-copy b { font-size: 12.5px; font-weight: 580; }
.desktop-account-copy small { color: #817886; font-size: 8.5px; }
.desktop-account-arrow { color: #86798d; font-size: 12px; }
.account-personal-link {
  display: grid;
  grid-template-columns: 29px minmax(0,1fr) 12px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid rgba(195,165,238,.1);
  border-radius: 11px;
  background: rgba(10,9,12,.43);
  color: #a79eac;
  cursor: pointer;
  text-align: left;
}
.account-personal-link:hover { border-color: rgba(195,165,238,.28); background: rgba(69,49,82,.2); color: #eee5f3; }
.account-personal-link > span:nth-child(2) { display: grid; gap: 1px; }
.account-personal-link b { font-size: 11.5px; font-weight: 580; }
.account-personal-link small { color: #756b7b; font-size: 9px; }
.account-appearance-orb {
  position: relative;
  display: block;
  width: 29px;
  height: 29px;
  overflow: hidden;
  border: 1px solid rgba(224,203,255,.18);
  border-radius: 9px;
  background: linear-gradient(110deg,#6750bf,#17131d 45%,#ef7850);
  box-shadow: inset 0 1px rgba(255,255,255,.2),0 4px 10px rgba(0,0,0,.35);
}
.account-appearance-orb i { position: absolute; inset: 0; background-image: repeating-radial-gradient(circle at 30% 20%,rgba(255,255,255,.42) 0 1px,transparent 1px 3px); opacity: .18; }
.sidebar-utility { display: grid; gap: 3px; margin-top: 8px; }
body:not(.guest-shell) .foot-link {
  display: grid;
  grid-template-columns: 25px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 7px;
  border-radius: 9px;
  color: #7e7684;
  font-size: 10.5px;
}
body:not(.guest-shell) .foot-link:hover { color: #d9ccdf; background: rgba(255,255,255,.03); }
body:not(.guest-shell) .foot-link .n-icon { width: 25px; height: 25px; border: 0; background: transparent; box-shadow: none; }
body:not(.guest-shell) .foot-link .n-icon svg { width: 14px; height: 14px; }
.sidebar-more { margin-top: 1px; }
.sidebar-more summary { display: flex; justify-content: space-between; padding: 7px; color: #625b67; cursor: pointer; font-size: 9px; letter-spacing: .5px; list-style: none; text-transform: uppercase; }
.sidebar-more summary::-webkit-details-marker { display: none; }
.sidebar-more[open] summary span { transform: rotate(45deg); }
.sidebar-more .foot-link { display: block; padding-left: 9px; }

/* ── Основной контент: типографика, поверхности и глубина ───────────── */
body:not(.guest-shell) .vwrap { width: min(1240px,100%); padding: clamp(29px,4vw,58px) clamp(20px,4.4vw,60px) 96px; }
body:not(.guest-shell) .vhead .eyebrow,
body:not(.guest-shell) .eyebrow {
  color: #b7a4d8;
  font-size: 9px;
  font-weight: 550;
  letter-spacing: 2px;
}
body:not(.guest-shell) .vhead .eyebrow::before,
body:not(.guest-shell) .my-day-heading .eyebrow::before,
body:not(.guest-shell) .owner-heading .eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  margin-right: 10px;
  vertical-align: middle;
  background: linear-gradient(90deg,#9675e0,rgba(150,117,224,.2));
}
body:not(.guest-shell) .vhead h1,
body:not(.guest-shell) .my-day-heading h1,
body:not(.guest-shell) .my-cases-heading h1,
body:not(.guest-shell) .owner-heading h1 {
  color: var(--text);
  font-size: clamp(38px,4.7vw,64px);
  font-weight: 570;
  letter-spacing: -3.1px;
  line-height: 1.03;
}
body:not(.guest-shell) .vhead p,
body:not(.guest-shell) .my-day-heading > div > p:last-child,
body:not(.guest-shell) .my-cases-heading p { color: var(--muted); font-size: 15px; line-height: 1.72; }
body:not(.guest-shell) .crumbs { margin-bottom: 18px; color: #77717e; font-size: 10px; letter-spacing: .2px; }
body:not(.guest-shell) .crumbs a:hover { color: #d2bdf1; }
body:not(.guest-shell) .screen-back {
  min-height: 44px;
  border-color: rgba(255,255,255,.09);
  background: rgba(19,17,22,.78);
  color: #958d9b;
  box-shadow: inset 0 1px rgba(255,255,255,.045),0 9px 24px rgba(0,0,0,.4);
}
body:not(.guest-shell) .screen-back .screen-back-arrow { color: #c5afe8; }

body:not(.guest-shell) :is(.tile,.card,.pcard,.stub,.lst,.kv,.stage,.flow-step,.rc-strip,.case-dialog,.settings-card,.case-result-card,.case-next-links,.case-form-card,.case-documents-main,.case-document-tool,.case-setting-panel,.owner-block,.owner-metric,.owner-mail-hero,.owner-setting,.legal-section,.legal-overview-card,.legal-document-card,.assistant-channel-card,.assistant-vault-card,.assistant-pack-card,.fixarik-settings-hero) {
  border-color: rgba(217,204,235,.105);
  background: linear-gradient(145deg,rgba(42,37,47,.84),rgba(16,15,20,.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body:not(.guest-shell) :is(.tile,.card,.pcard,.case-result-card,.settings-card,.owner-block,.owner-metric,.legal-section,.assistant-channel-card)::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,transparent,rgba(231,214,255,.23),rgba(244,145,102,.08),transparent);
}
body:not(.guest-shell) :is(.tile,.card,.pcard,.case-result-card,.settings-card,.owner-block,.owner-metric,.legal-section,.assistant-channel-card) { position: relative; }
body:not(.guest-shell) :is(.tile,.pcard):hover {
  border-color: rgba(192,162,234,.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}
body:not(.guest-shell) :is(.tile,.pcard,.card) h3 { color: #e1d9e5; font-weight: 560; }
body:not(.guest-shell) :is(.tile,.pcard,.card) p { color: #918a97; }
body:not(.guest-shell) .section-t { color: #817989; font-size: 9px; font-weight: 560; letter-spacing: 1.8px; }
body:not(.guest-shell) .pico,
body:not(.guest-shell) .case-document-icon,
body:not(.guest-shell) .case-time-icon,
body:not(.guest-shell) .case-next-icon,
body:not(.guest-shell) .case-file-symbol {
  border: 1px solid rgba(193,165,236,.16);
  background: linear-gradient(145deg,rgba(101,70,132,.31),rgba(43,31,52,.42));
  color: #cbb2ef;
  box-shadow: inset 0 1px rgba(255,255,255,.08),0 5px 13px rgba(0,0,0,.27);
}

/* Формы и действия повторяют объём композера начальной страницы. */
body:not(.guest-shell) :is(input,textarea,select) {
  border-color: rgba(211,194,231,.14);
  background: rgba(12,11,15,.62);
  color: var(--text);
  box-shadow: inset 0 1px rgba(255,255,255,.025),inset 0 -1px rgba(0,0,0,.52);
}
body:not(.guest-shell) :is(input,textarea,select):focus {
  border-color: rgba(188,155,239,.44);
  box-shadow: 0 0 0 3px rgba(159,120,224,.1),inset 0 1px rgba(255,255,255,.04);
  outline: 0;
}
body:not(.guest-shell) :is(input,textarea)::placeholder { color: #706977; opacity: 1; }
/* Светлая тема: поля в контенте светлые, иначе тёмный текст ложится на
   почти чёрную подложку и не читается. Боковая панель остаётся тёмной. */
:root[data-theme="light"] body:not(.guest-shell) .view :is(input,textarea,select) {
  border-color: var(--field-line);
  background: var(--field);
  box-shadow: inset 0 1px 2px rgba(34,55,48,.05);
}
:root[data-theme="light"] body:not(.guest-shell) .my-day-composer textarea { border-color: transparent; background: transparent; box-shadow: none; }
body:not(.guest-shell) .btn {
  border-color: rgba(255,255,255,.095);
  background: linear-gradient(145deg,rgba(42,38,47,.96),rgba(23,21,27,.96));
  color: #d7d0dc;
  box-shadow: inset 0 1px rgba(255,255,255,.07),0 2px 0 rgba(6,5,8,.75),0 8px 18px rgba(0,0,0,.27);
  font-size: 12px;
  font-weight: 570;
}
body:not(.guest-shell) .btn:hover { border-color: rgba(198,169,239,.34); color: #fff; transform: translateY(-1px); }
body:not(.guest-shell) .btn.primary,
body:not(.guest-shell) .chat-send {
  border-color: rgba(226,211,255,.25);
  background: linear-gradient(145deg,#d9c7fb,#a58bd5);
  color: #251b38;
  box-shadow: inset 0 1px rgba(255,255,255,.48),0 2px 0 #5a4674,0 8px 18px rgba(0,0,0,.5);
}
body:not(.guest-shell) .btn.danger,
body:not(.guest-shell) .btn-out { border-color: rgba(237,130,104,.3); background: rgba(96,43,37,.22); color: #eea18c; }
body:not(.guest-shell) :is(.tab,.ct,.choice,.smart-prompt,.chip) {
  border-color: rgba(255,255,255,.08);
  background: rgba(20,18,23,.76);
  color: #9f97a4;
  box-shadow: inset 0 1px rgba(255,255,255,.025);
}
body:not(.guest-shell) :is(.tab,.ct,.choice).active,
body:not(.guest-shell) .case-detail-shell > .case-tabs .ct.active {
  border-color: rgba(202,177,241,.24);
  background: linear-gradient(145deg,rgba(121,89,153,.5),rgba(68,48,83,.56));
  color: #f2eaf8;
  box-shadow: inset 0 1px rgba(255,255,255,.11),0 2px 0 rgba(7,5,9,.64),0 7px 15px rgba(0,0,0,.3);
}

/* Дела и диалог: эффект остаётся по краям, текст — на спокойной поверхности. */
body:not(.guest-shell) .case-detail-shell { --case-surface: rgba(27,24,31,.82); }
body:not(.guest-shell) .case-detail-header { padding-bottom: 9px; border-bottom-color: rgba(255,255,255,.055); }
body:not(.guest-shell) .case-detail-header h1 { font-weight: 570; letter-spacing: -1.8px; }
body:not(.guest-shell) .case-result-head h2 { font-size: clamp(19px,1.6vw,23px); line-height: 1.22; }
body:not(.guest-shell) .case-result-card { padding: clamp(19px,2.2vw,25px); }
body:not(.guest-shell) .case-detail-avatar {
  border: 1px solid rgba(197,171,235,.18);
  background: linear-gradient(145deg,rgba(102,73,135,.34),rgba(40,30,49,.5));
  color: #ceb4ef;
  box-shadow: var(--shadow);
}
body:not(.guest-shell) .case-dialog {
  border-radius: 21px;
  background: linear-gradient(145deg,rgba(38,33,43,.88),rgba(15,14,18,.84));
  box-shadow: var(--shadow-deep);
}
body:not(.guest-shell) .case-thread .bubble {
  border: 1px solid rgba(255,255,255,.055);
  background: rgba(38,34,43,.83);
  color: #ddd6e1;
  box-shadow: inset 0 1px rgba(255,255,255,.035),0 7px 17px rgba(0,0,0,.2);
}
body:not(.guest-shell) .case-thread .bubble.user {
  border-color: rgba(193,162,235,.16);
  background: linear-gradient(145deg,rgba(103,76,130,.36),rgba(58,43,70,.42));
}
body:not(.guest-shell) .chat-composer {
  border-color: rgba(210,194,231,.15);
  background: linear-gradient(137deg,rgba(45,39,51,.9),rgba(18,17,22,.86));
  box-shadow: var(--shadow-deep);
}
body:not(.guest-shell) .smart-prompt { border-color: rgba(255,255,255,.075); border-radius: 8px; }
body:not(.guest-shell) .smart-prompt:hover { border-color: rgba(190,162,230,.3); color: #eadff3; }
body:not(.guest-shell) .dialog-questionnaire {
  border-color: rgba(195,167,236,.24);
  background: linear-gradient(145deg,rgba(75,54,90,.35),rgba(28,23,34,.96));
  box-shadow: var(--shadow);
}
body:not(.guest-shell) .my-case-row,
body:not(.guest-shell) .lrow,
body:not(.guest-shell) .case-document-card,
body:not(.guest-shell) .case-person-card,
body:not(.guest-shell) .case-time-item {
  border-color: rgba(255,255,255,.055);
  background: rgba(35,30,39,.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body:not(.guest-shell) :is(.my-case-row,.lrow,.case-document-card,.case-person-card,.case-time-item):hover { background: rgba(79,58,94,.2); }

/* Личный ловец настроения живёт только в настройках под профилем. */
.appearance-mood-card {
  --caught-h: 275;
  display: grid;
  grid-template-columns: minmax(210px,.64fr) minmax(0,1.36fr);
  align-items: center;
  gap: clamp(24px,4vw,52px);
  overflow: hidden;
  padding: clamp(22px,4vw,38px);
}
.appearance-mood-card h2 { margin: 2px 0 9px; font-size: clamp(23px,3vw,34px); font-weight: 570; letter-spacing: -1.2px; }
.appearance-mood-card p:not(.eyebrow) { max-width: 58ch; color: var(--muted); line-height: 1.65; }
.appearance-mood-visual {
  position: relative;
  min-height: 176px;
  border: 1px solid rgba(221,203,245,.15);
  background:
    linear-gradient(90deg,transparent calc(100% - 1px),rgba(187,174,205,.1) 0),
    linear-gradient(transparent calc(100% - 1px),rgba(187,174,205,.1) 0),#0b0a0d;
  background-size: 58px 48px;
  box-shadow: inset 0 1px rgba(255,255,255,.06),0 21px 40px -14px #000;
}
.appearance-mood-visual span {
  position: absolute;
  left: 17%;
  right: 11%;
  top: 28%;
  bottom: 20%;
  border: 1px solid rgba(222,204,247,.19);
  background:
    radial-gradient(circle at 27% 47%,hsla(var(--caught-h) 88% 68%/.92),transparent 28%),
    radial-gradient(circle at 86% 49%,rgba(255,104,65,.9),transparent 34%),#0c0b0e;
  box-shadow: inset 0 1px rgba(255,255,255,.2),0 4px 0 #050406,0 24px 33px -7px #000;
  transform: perspective(600px) rotateY(-7deg);
}
.appearance-mood-visual span::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: repeating-radial-gradient(circle at 20% 30%,rgba(255,255,255,.55) 0 1px,transparent 1px 3px);
  mix-blend-mode: screen;
}
.appearance-mood-visual i { position: absolute; left: 17%; right: 11%; top: calc(28% - 5px); height: 5px; transform: skewX(-35deg); background: linear-gradient(90deg,#463768,#111015,#784030); opacity: .8; }
.appearance-mood-card.caught .appearance-mood-visual span { animation: mood-catch-flash 760ms linear both; }
.appearance-mood-catch { margin-top: 10px; }
.appearance-mood-catch > span { color: #f0a384; }
@keyframes mood-catch-flash { 0%,100%{opacity:1} 15%{opacity:.12} 28%{opacity:.92} 39%{opacity:.3} 52%{opacity:1} 68%{opacity:.18} 78%{opacity:.88} }

/* Модальные окна, плавающий агент и мобильная шапка. */
body:not(.guest-shell) .sheet-bg { background: rgba(5,4,7,.76); backdrop-filter: blur(7px); }
body:not(.guest-shell) .sheet-card {
  border-color: rgba(221,204,244,.16);
  background: linear-gradient(145deg,rgba(34,30,39,.99),rgba(16,15,19,.995));
  box-shadow: var(--shadow-deep);
}
#spacechoices .space-add { margin-top: 18px; }
#spacechoices .space-add > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
#spacechoices .space-add > summary::-webkit-details-marker { display: none; }
#spacechoices .space-add > summary::after { content: "⌄"; color: var(--muted); font-size: 22px; }
#spacechoices .space-add[open] > summary::after { transform: rotate(180deg); }
#spacechoices .space-add > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#spacechoices .space-add .tiles { margin-top: 12px; }
body:not(.guest-shell) .agent-dock {
  bottom: calc(18px + var(--bottom-notice-h, 0px));
  max-height: calc(100dvh - 36px - var(--bottom-notice-h, 0px));
  border-color: rgba(211,190,241,.16);
  background: linear-gradient(145deg,rgba(34,30,39,.97),rgba(16,15,19,.98));
  box-shadow: var(--shadow-deep);
}
body:not(.guest-shell) .agent-dock-toggle { color: #ded4e5; font-weight: 570; }
body:not(.guest-shell) .agent-dock-toggle::first-letter { color: #efa181; }
body:not(.guest-shell) .topm {
  border-bottom-color: rgba(255,255,255,.075);
  background: rgba(13,12,16,.88);
  box-shadow: 0 8px 30px rgba(0,0,0,.32);
}
body:not(.guest-shell) .topm .brand-mark { width: 34px!important; height: 34px!important; border-radius: 10px!important; font-size: 19px!important; }
body:not(.guest-shell) .acct-btn { border-color: rgba(255,255,255,.085); background: rgba(26,23,30,.8); color: #ded7e2; }

/* Реферальная ссылка — вход; анкету заполняет сам приглашённый. */
.specialist-invite-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 22px;
  margin: 0 0 14px;
  padding: clamp(18px,3vw,26px);
  border: 1px solid color-mix(in srgb,var(--cyan) 46%,var(--line));
  border-radius: 18px;
  background: linear-gradient(135deg,color-mix(in srgb,var(--panel) 86%,var(--cyan) 14%),var(--panel-2));
  box-shadow: 0 18px 42px -30px color-mix(in srgb,var(--cyan) 70%,transparent);
}
.specialist-invite-card h3 { margin: 2px 0 7px; font-size: clamp(20px,2.6vw,28px); }
.specialist-invite-card p:not(.eyebrow) { max-width: 68ch; margin: 0; color: var(--muted); line-height: 1.55; }
.specialist-invite-form fieldset { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.specialist-invite-form legend { padding: 0 5px; color: var(--muted); font-size: 12.5px; }
.check-line { display: flex!important; flex-direction: row!important; align-items: flex-start; gap: 9px!important; }
.check-line input { width: auto; margin-top: 3px; }
.check-line span { display: grid; gap: 3px; color: var(--text); }
.check-line small { color: var(--muted); line-height: 1.4; }
.weekday-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.weekday-pills label { cursor: pointer; }
.weekday-pills input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-pills span { display: block; min-width: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 999px; text-align: center; }
.weekday-pills input:checked + span { border-color: var(--cyan); background: color-mix(in srgb,var(--cyan) 16%,transparent); color: var(--text); }
.specialist-terms { overflow: hidden; margin: 14px 0; border: 1px solid var(--line); border-radius: 14px; }
.practice-cabinet { min-width: 0; max-width: 100%; margin: 0 0 14px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb,var(--panel) 94%,transparent); box-shadow: var(--shadow); }
.practice-cabinet header { margin-bottom: 14px; }
.practice-cabinet h3 { margin-top: 3px; font-size: clamp(22px,2.7vw,30px); }
.practice-tabs { display: flex; max-width: 100%; gap: 7px; overflow-x: auto; padding: 2px 1px 10px; scrollbar-width: thin; }
.practice-tabs button { flex: 0 0 auto; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb,var(--panel-2) 90%,transparent); color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.practice-tabs button:hover { border-color: var(--accent-border); color: var(--text); }
.practice-tabs button[aria-selected="true"] { border-color: var(--cyan); background: color-mix(in srgb,var(--cyan) 14%,var(--panel)); color: var(--text); }
.practice-section-body { display: grid; gap: 12px; min-height: 86px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.practice-section-body > .btn { justify-self: start; }

/* Светлая тема сохраняет геометрию, но не притворяется чёрным экраном. */
/* Голограмма в светлой теме. Текстура — свечение на чёрном; раньше всю
   сцену просто гасили до opacity .16, и тёмные панели превращались в серую
   муть без цвета. Теперь: светлые панели, та же текстура через
   invert + hue-rotate (чёрное → белое, синий и оранжевый остаются
   на местах пастелью), мягкие тени и светлая вуаль под текстом. */
:root[data-theme="light"] body:not(.guest-shell) .shell-holo-scene { opacity: 1; }
:root[data-theme="light"] .shell-holo-grid {
  background-image:
    linear-gradient(90deg,transparent calc(100% - 1px),rgba(84,70,128,.075) 0),
    linear-gradient(transparent calc(100% - 1px),rgba(84,70,128,.075) 0);
}
:root[data-theme="light"] .fixar-holo-panel.shell-holo-panel {
  --base: min(1, calc(.58 + var(--holo-lift) * .5)) !important;
  border-color: rgba(122,96,176,.2);
  background: #fff;
  box-shadow: 0 26px 42px -16px rgba(72,52,116,.3),0 1px 3px rgba(72,52,116,.12),inset 0 1px rgba(255,255,255,.9);
}
:root[data-theme="light"] .shell-holo-panel canvas { filter: invert(1) hue-rotate(180deg) saturate(1.7) contrast(.94); }
:root[data-theme="light"] .fixar-holo-panel.shell-holo-panel::before { border-top-color: rgba(140,112,204,.28); background: linear-gradient(90deg,#d8cdf3,#f5f2fb 50%,#f4d5c6); opacity: .85; }
:root[data-theme="light"] .fixar-holo-panel.shell-holo-panel::after { background: linear-gradient(#e7ddf1,#cdc3dc); opacity: .85; }
:root[data-theme="light"] .fixar-holo-panel.shell-holo-panel i { background: linear-gradient(104deg,transparent 8%,rgba(148,114,255,.16) 25%,rgba(255,255,255,.7) 42%,rgba(255,144,92,.18) 54%,transparent 76%); mix-blend-mode: normal; }
:root[data-theme="light"] .shell-holo-veil {
  background:
    linear-gradient(90deg,var(--body-art) 0%,color-mix(in srgb,var(--body-art) 90%,transparent) 28%,color-mix(in srgb,var(--body-art) 40%,transparent) 56%,transparent 86%),
    linear-gradient(0deg,var(--body-art) 0%,transparent 42%);
  opacity: 1;
}
:root[data-theme="light"] body:not(.guest-shell) .side { color-scheme: dark; }
:root[data-theme="light"] body:not(.guest-shell) :is(.tile,.card,.pcard,.stub,.lst,.kv,.stage,.flow-step,.rc-strip,.case-dialog,.settings-card,.case-result-card,.case-next-links,.case-form-card,.case-documents-main,.case-document-tool,.case-setting-panel,.owner-block,.owner-metric,.owner-mail-hero,.owner-setting,.legal-section,.legal-overview-card,.legal-document-card,.assistant-channel-card,.assistant-vault-card,.assistant-pack-card,.fixarik-settings-hero) {
  background: linear-gradient(145deg,rgba(255,255,255,.96),rgba(244,241,246,.98));
}
:root[data-theme="light"] body:not(.guest-shell) :is(.tile,.pcard,.card) h3 { color: var(--text); }
:root[data-theme="light"] body:not(.guest-shell) .case-thread .bubble { background: #f5f1f7; color: var(--text); }
:root[data-theme="light"] body:not(.guest-shell) .case-thread .bubble.user { background: #e9e0f1; }
:root[data-theme="light"] body:not(.guest-shell) .chat-composer { background: linear-gradient(145deg,#fff,#f2eef4); }
/* Строки, вкладки, чипы и «Назад» тоже светлые: иначе тёмный текст темы
   ложится на тёмную подложку голограммы и не читается. */
:root[data-theme="light"] body:not(.guest-shell) :is(.my-case-row,.lrow,.case-document-card,.case-person-card,.case-time-item) {
  border-color: var(--line);
  background: rgba(255,255,255,.9);
}
:root[data-theme="light"] body:not(.guest-shell) :is(.my-case-row,.lrow,.case-document-card,.case-person-card,.case-time-item):hover { background: hsl(var(--accent-h) 40% 97%); }
:root[data-theme="light"] body:not(.guest-shell) :is(.tab,.ct,.choice,.smart-prompt,.chip) {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  box-shadow: none;
}
:root[data-theme="light"] body:not(.guest-shell) .chip.warn { border-color: color-mix(in srgb,var(--amber) 35%,transparent); background: color-mix(in srgb,var(--amber) 10%,#fff); color: var(--amber); }
:root[data-theme="light"] body:not(.guest-shell) :is(.tab,.ct,.choice).active,
:root[data-theme="light"] body:not(.guest-shell) .case-detail-shell > .case-tabs .ct.active {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: none;
}
:root[data-theme="light"] body:not(.guest-shell) .screen-back { border-color: var(--line); background: rgba(255,255,255,.92); color: var(--muted); box-shadow: 0 6px 18px rgba(34,55,48,.08); }
:root[data-theme="light"] body:not(.guest-shell) .screen-back .screen-back-arrow { color: var(--cyan); }
:root[data-theme="light"] body:not(.guest-shell) .case-detail-avatar { border-color: var(--accent-border); background: var(--accent-soft); color: var(--cyan); }
:root[data-theme="light"] body:not(.guest-shell) .dialog-questionnaire { background: linear-gradient(145deg,var(--accent-soft),#fff); }
:root[data-theme="light"] body:not(.guest-shell) .crumbs { color: var(--muted); }
:root[data-theme="light"] body:not(.guest-shell) .crumbs a:hover { color: var(--cyan); }
:root[data-theme="light"] body:not(.guest-shell) .btn:not(.primary):not(.danger) { border-color: var(--line); background: #fff; color: var(--text); box-shadow: 0 2px 6px rgba(34,55,48,.06); }
:root[data-theme="light"] body:not(.guest-shell) .btn:not(.primary):not(.danger):hover { border-color: var(--accent-border); color: var(--text); }

@media (max-width: 980px) {
  body:not(.guest-shell) { --nav-w: 268px; }
  .shell-holo-scene { inset: 0; }
  body:not(.guest-shell) .side { box-shadow: 16px 0 45px rgba(0,0,0,.65); }
}

@media (max-width: 900px) {
  body:not(.guest-shell) .app { display: block; height: 100dvh; }
  body:not(.guest-shell) .view { height: 100dvh; }
  body:not(.guest-shell) .side { position: fixed; inset: 0 auto 0 0; }
  body:not(.guest-shell) .topm { position: sticky; top: 0; }
  .desktop-account { display: none; }
  body.nav-open:not(.guest-shell) .agent-dock { opacity: 0; pointer-events: none; transform: translateY(10px); }
}

@media (max-width: 760px) {
  .shell-holo-scene { inset: 0; }
  .shell-holo-grid { background-size: 86px 73px; opacity: .56; }
  .shell-holo-panel { transform: none; }
  body:not(.guest-shell) .side { width: min(90vw,310px); }
  body:not(.guest-shell) .brand { min-height: 82px; padding-top: 19px; }
  body:not(.guest-shell) .vwrap { padding: 21px 14px calc(92px + env(safe-area-inset-bottom)); }
  body:not(.guest-shell) .vhead h1,
  body:not(.guest-shell) .my-day-heading h1,
  body:not(.guest-shell) .my-cases-heading h1,
  body:not(.guest-shell) .owner-heading h1 { font-size: 38px; letter-spacing: -2px; }
  body:not(.guest-shell) .topm { min-height: 62px; padding-inline: 12px; }
  body:not(.guest-shell) .menu-btn { border-color: rgba(255,255,255,.09); background: rgba(25,22,29,.86); color: #d8ccdf; box-shadow: inset 0 1px rgba(255,255,255,.05),0 4px 12px rgba(0,0,0,.25); }
  .appearance-mood-card { grid-template-columns: 1fr; }
  .appearance-mood-visual { min-height: 142px; }
  .specialist-invite-card { grid-template-columns: 1fr; }
  .specialist-invite-card .btn { width: 100%; }
  body:not(.guest-shell) .case-dialog { border-radius: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .shell-holo-panel,
  .fixar-holo-panel.is-flicker,
  .appearance-mood-card.caught .appearance-mood-visual span { animation: none!important; }
  body:not(.guest-shell) :is(.tile,.pcard,.n-row,.me,.btn) { transition: none!important; }
}

/* В открытом диалоге дела есть своё поле ввода: плавающий «Агент» там
   дублирует его и на телефоне закрывает кнопку «Отправить». */
body:has(.vwrap.dialog-view) .agent-dock { display: none; }

/* ── Аудит v2: читаемость, перекрытия, размеры нажатия ────────────── */
/* Мобильная шапка всегда тёмная — логотип в ней светлый в любой теме,
   и она лежит выше прокручиваемого содержимого (вкладки дела не наезжают). */
body:not(.guest-shell) .topm { z-index: 12; }
body:not(.guest-shell) .topm > b { color: #f3eef7; }
/* Не сжимать текст баланса поверх логотипа при увеличенных кнопках. На самом
   узком экране остаётся знак бренда; полное имя есть в меню и заголовке сайта. */
@media (max-width: 375px) {
  body:not(.guest-shell) .topm { gap: 6px; }
  body:not(.guest-shell) .topm > b { display: none; }
  body:not(.guest-shell) .topm > * { flex-shrink: 0; }
}
/* Плашка не блокирует нижние пункты открытого меню и не считается прочитанной. */
body.nav-open .storage-notice { visibility: hidden; pointer-events: none; }
@media (min-width: 901px) {
  body:not(.guest-shell):not(.chat-home-shell) .storage-notice {
    left: auto; right: 18px; transform: none;
    width: min(760px, calc(100vw - var(--nav-w) - 36px));
  }
}
/* На телефоне «Назад» уезжает вместе с экраном, а не висит поверх заголовков. */
@media (max-width: 900px) {
  body:not(.guest-shell) .screen-nav { position: relative; top: auto; }
}

/* Модальные окна: в светлой теме — светлая карточка, иначе тёмный текст
   заголовка терялся на тёмном фоне. */
:root[data-theme="light"] body:not(.guest-shell) .sheet-bg { background: rgba(40,32,56,.42); }
:root[data-theme="light"] body:not(.guest-shell) .sheet-card {
  border-color: rgba(98,74,150,.16);
  background: linear-gradient(145deg,#fff,#f8f5fb);
  color: var(--text);
  box-shadow: 0 30px 70px -20px rgba(52,36,88,.38);
}

/* Контраст светлой темы (WCAG AA 4.5:1). */
:root[data-theme="light"] body:not(.guest-shell) .case-gentle-note .eyebrow { color: #6a4fa6; }
:root[data-theme="light"] body:not(.guest-shell) :is(.chip.warn,.warn,.case-attention,.my-case-status.status-need) { color: #8a4529; }
:root[data-theme="light"] body:not(.guest-shell) .user > small { color: #5c5563; }
.domashkin-strip-cta { background: #7a4a12; color: #fff; }

/* Размеры нажатия: не меньше 40px по короткой стороне. */
body:not(.guest-shell) .caret { min-width: 36px; min-height: 40px; }
body:not(.guest-shell) .lang-switch { min-height: 40px; min-width: 40px; }
body:not(.guest-shell) .topm .credit-pill { min-height: 40px; }
body:not(.guest-shell) .crumbs a { display: inline-block; padding: 10px 2px; margin: -10px -2px; }
body:not(.guest-shell) .agent-dock.compact { padding-block: 2px; }
body:not(.guest-shell) .agent-dock.compact .agent-dock-toggle { min-height: 40px; }

/* Кнопка голоса на главных пространств: на телефоне с подписью, а не пустая полоса. */
@media (max-width: 760px) {
  .my-day-home:not(.my-day-guest) .my-day-composer-foot .chat-tool { gap: 8px; font-size: 14px; }
}

/* Главная в светлой теме: светлый фон, светлые голограммы, тёмный текст. */
:root[data-theme="light"] .my-day-guest { color: #1f1b25; background: var(--body-art); }
:root[data-theme="light"] .fixar-holo-scene { background: var(--body-art); }
/* Гостевая оболочка задаёт тёмные токены жёстко — в светлой теме меняем их на светлые. */
:root[data-theme="light"] body.guest-shell {
  color-scheme: light;
  --bg: var(--body-art);
  --text: #1f1b25;
  --muted: #625b6b;
  --line: rgba(40,30,60,.12);
  --line-soft: rgba(40,30,60,.07);
  --panel: #fff;
  --panel-2: #f6f3f8;
  --field: #fff;
  --cyan: #6a4fa6;
  --on-accent: #fff;
  --accent-border: rgba(98,74,150,.3);
  --accent-soft: rgba(106,79,166,.1);
  background: var(--body-art);
}
:root[data-theme="light"] body.guest-shell .view { background: var(--body-art); }
:root[data-theme="light"] body.guest-shell .storage-notice { color: #1f1b25; background: rgba(255,255,255,.96); }
:root[data-theme="light"] .fixar-holo-grid {
  background-image: linear-gradient(90deg,transparent calc(100% - 1px),rgba(84,70,128,.075) 0),linear-gradient(transparent calc(100% - 1px),rgba(84,70,128,.075) 0);
}
:root[data-theme="light"] .my-day-guest .fixar-holo-panel {
  --base: min(1, calc(.58 + var(--holo-lift, .3) * .5)) !important;
  border-color: rgba(122,96,176,.2);
  background: #fff;
  box-shadow: 0 26px 42px -16px rgba(72,52,116,.3),0 1px 3px rgba(72,52,116,.12),inset 0 1px rgba(255,255,255,.9);
}
:root[data-theme="light"] .my-day-guest .fixar-holo-panel canvas { filter: invert(1) hue-rotate(180deg) saturate(1.7) contrast(.94); }
:root[data-theme="light"] .my-day-guest .fixar-holo-panel::before { border-top-color: rgba(140,112,204,.28); background: linear-gradient(90deg,#d8cdf3,#f5f2fb 50%,#f4d5c6); opacity: .85; }
:root[data-theme="light"] .my-day-guest .fixar-holo-panel::after { background: linear-gradient(#e7ddf1,#cdc3dc); opacity: .85; }
:root[data-theme="light"] .my-day-guest .fixar-holo-panel i { background: linear-gradient(104deg,transparent 8%,rgba(148,114,255,.16) 25%,rgba(255,255,255,.7) 42%,rgba(255,144,92,.18) 54%,transparent 76%); mix-blend-mode: normal; }
:root[data-theme="light"] .fixar-holo-ambient { opacity: .4; }
:root[data-theme="light"] .fixar-holo-veil {
  background:
    linear-gradient(90deg,var(--body-art) 0%,color-mix(in srgb,var(--body-art) 92%,transparent) 28%,color-mix(in srgb,var(--body-art) 45%,transparent) 56%,transparent 86%),
    linear-gradient(0deg,var(--body-art) 0%,transparent 42%);
}
@media (max-width: 900px) {
  :root[data-theme="light"] .fixar-holo-veil { background: linear-gradient(90deg,color-mix(in srgb,var(--body-art) 94%,transparent),color-mix(in srgb,var(--body-art) 60%,transparent)),linear-gradient(0deg,var(--body-art),transparent 80%); }
}
:root[data-theme="light"] .holo-home-header { border-bottom-color: rgba(40,30,60,.08); }
:root[data-theme="light"] .holo-home-brand { color: #1f1b25; }
:root[data-theme="light"] .holo-home-brand-mark { border-color: rgba(98,74,150,.2); background: linear-gradient(150deg,#fff,#ece6f5 70%); color: #5b3fa0; box-shadow: 0 6px 16px -8px rgba(72,52,116,.35); }
:root[data-theme="light"] .holo-home-brand small,
:root[data-theme="light"] .holo-header-actions { color: #625b6b; }
:root[data-theme="light"] .holo-header-actions .my-day-signin { border-color: rgba(60,40,90,.14); background: rgba(255,255,255,.9); color: #1f1b25; box-shadow: 0 4px 12px -6px rgba(72,52,116,.3); }
:root[data-theme="light"] .holo-header-actions .my-day-signin:hover { background: #fff; border-color: rgba(98,74,150,.4); }
:root[data-theme="light"] .my-day-guest .eyebrow { color: #6a4fa6; }
:root[data-theme="light"] .holo-home-hero-copy h1 { color: #1f1b25; }
:root[data-theme="light"] .holo-home-hero-copy h1 span { color: #6f6878; }
:root[data-theme="light"] .my-day-guest .my-day-guest-lede { color: #544d5c; }
:root[data-theme="light"] .my-day-guest .my-day-composer {
  border-color: rgba(98,74,150,.18);
  background: linear-gradient(137deg,#fff,#fbf9fd);
  box-shadow: 0 1px 2px rgba(52,36,88,.08),0 22px 48px -18px rgba(52,36,88,.32);
}
:root[data-theme="light"] .my-day-guest .my-day-composer > label { color: #3f3947; }
:root[data-theme="light"] .my-day-guest .my-day-composer > label span { color: #6a4fa6; }
:root[data-theme="light"] .my-day-guest .my-day-composer textarea { color: #1f1b25; }
:root[data-theme="light"] .my-day-guest .my-day-composer textarea::placeholder { color: #7a7382; }
:root[data-theme="light"] .my-day-guest .my-day-composer-foot { border-top-color: rgba(40,30,60,.08); }
:root[data-theme="light"] .my-day-guest .my-day-composer-foot small { color: #625b6b; }
:root[data-theme="light"] .my-day-guest .my-day-composer-foot .chat-tool { border-color: rgba(40,30,60,.14); color: #4a4452; }
:root[data-theme="light"] .my-day-guest .my-day-prompt { border-color: rgba(60,40,90,.13); background: rgba(255,255,255,.88); color: #3f3947; box-shadow: 0 3px 10px -6px rgba(52,36,88,.25); }
:root[data-theme="light"] .my-day-guest .my-day-prompt:hover { border-color: rgba(98,74,150,.4); color: #1f1b25; }
:root[data-theme="light"] .my-day-guest .my-day-answer { border-color: rgba(98,74,150,.2); background: #fff; color: #3f3947; box-shadow: 0 15px 35px -12px rgba(52,36,88,.25); }
:root[data-theme="light"] .holo-home-aside h2 { color: #2a2530; }
:root[data-theme="light"] .holo-home-aside p { color: #625b6b; }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-head p,
:root[data-theme="light"] .my-day-guest .my-day-roadmap-head h2 { color: #5d5567; }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-head small { color: #6f6878; }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-grid article { border-color: rgba(60,40,90,.1); background: linear-gradient(145deg,#fff,#f7f4fa); box-shadow: 0 1px 2px rgba(52,36,88,.06),0 18px 36px -20px rgba(52,36,88,.3); }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-grid article:hover { box-shadow: 0 1px 2px rgba(52,36,88,.08),0 24px 44px -18px rgba(52,36,88,.38); }
:root[data-theme="light"] .holo-step-top > span { border-color: rgba(98,74,150,.2); background: #f1ecf8; color: #6a4fa6; }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-grid article:nth-child(2) .holo-step-top > span { border-color: rgba(176,96,60,.22); background: #fbeee7; color: #9a4a26; }
:root[data-theme="light"] .holo-step-top b { color: #6f6878; }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-grid h3 { color: #2a2530; }
:root[data-theme="light"] .my-day-guest .my-day-roadmap-grid p { color: #5d5666; }
:root[data-theme="light"] .my-day-guest .holo-invite-card { border-color: rgba(98,74,150,.2); background: linear-gradient(135deg,#fff,#f5f1fa); color: #1f1b25; box-shadow: 0 15px 34px -18px rgba(52,36,88,.3); }
:root[data-theme="light"] .my-day-guest .holo-invite-card-copy small { color: #5d5666; }
:root[data-theme="light"] body:not(.guest-shell) .case-gentle-note p:last-child { color: #5c5563; }
.appearance .hue-control input[type="range"] { min-height: 32px; }
:root[data-theme="light"] body:not(.guest-shell) .sheet-card :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea,select) {
  border-color: rgba(98,74,150,.24);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}
:root[data-theme="light"] body:not(.guest-shell) .sheet-card :is(input,textarea)::placeholder { color: #7a7382; opacity: 1; }
/* Пока плашка Домашкина видна, низ страницы можно прокрутить из-под неё. */
body.domashkin-strip-open .vwrap,
body.domashkin-strip-open .holo-home-page { padding-bottom: 190px; }

/* ── Голограммы рабочих экранов: то же поле из 16 панелей, что на главной ──
   Сцена начинается от края боковой панели, а не от края окна, поэтому
   поле стоит над содержимым, а не уезжает за правую границу. */
/* Невысокое окно уменьшает каждую панель от её левого верхнего угла —
   раньше scale стоял на всём кластере с опорой справа, и поле уезжало вправо. */
.shell-holo-panel {
  top: calc(var(--hy) * var(--holo-scale,1));
  height: var(--hh);
  transform: perspective(1200px) rotateY(-7deg) scale(var(--holo-scale,1));
  transform-origin: top left;
}
@media (max-width: 900px) {
  .shell-holo-panel { transform: scale(var(--holo-scale,1)); }
}
@media (min-width: 901px) {
  body:not(.guest-shell) .shell-holo-scene { left: var(--nav-w); transition: left .22s ease; }
}
/* Чётче: вуаль слабее, панели ярче. */
body:not(.guest-shell) .shell-holo-veil { opacity: var(--holo-veil-opacity,.22); }
:root[data-theme="light"] .fixar-holo-panel.shell-holo-panel { --base: min(1, calc(.7 + var(--holo-lift) * .5)) !important; }
:root[data-theme="light"] .shell-holo-panel canvas { filter: invert(1) hue-rotate(180deg) saturate(2) contrast(1.05); }
:root[data-theme="light"] .shell-holo-veil {
  background:
    linear-gradient(90deg,var(--body-art) 0%,color-mix(in srgb,var(--body-art) 86%,transparent) 30%,color-mix(in srgb,var(--body-art) 38%,transparent) 50%,transparent 70%),
    linear-gradient(0deg,color-mix(in srgb,var(--body-art) 70%,transparent) 0%,transparent 30%);
}

/* ── Боковая панель в светлой теме — светлая ───────────────────────── */
:root[data-theme="light"] body:not(.guest-shell) .side {
  color-scheme: light;
  border-right-color: rgba(98,74,150,.14);
  background: linear-gradient(180deg,#fbf9fd,#f4f0f8 60%,#efeaf5);
  box-shadow: 1px 0 0 rgba(255,255,255,.8) inset, 12px 0 34px -18px rgba(52,36,88,.28);
}
:root[data-theme="light"] body:not(.guest-shell) .side::before { opacity: .5; background-image: linear-gradient(90deg,transparent calc(100% - 1px),rgba(84,70,128,.06) 0),linear-gradient(transparent calc(100% - 1px),rgba(84,70,128,.06) 0); }
:root[data-theme="light"] body:not(.guest-shell) .side::after { opacity: .28; }
:root[data-theme="light"] body:not(.guest-shell) .brand { border-bottom-color: rgba(40,30,60,.07); }
:root[data-theme="light"] body:not(.guest-shell) .brand-mark { border-color: rgba(98,74,150,.2); background: linear-gradient(150deg,#fff,#ece6f5 70%); color: #5b3fa0; box-shadow: 0 6px 16px -8px rgba(72,52,116,.35); }
:root[data-theme="light"] body:not(.guest-shell) .brand b { color: #1f1b25; }
:root[data-theme="light"] body:not(.guest-shell) .brand :is(.lang-switch,.nav-collapse) { border-color: rgba(40,30,60,.12); background: #fff; color: #4a4452; box-shadow: 0 2px 6px rgba(52,36,88,.08); }
:root[data-theme="light"] body:not(.guest-shell) .search::before { border-color: #7a7382; }
:root[data-theme="light"] body:not(.guest-shell) .search::after { background: #7a7382; }
:root[data-theme="light"] body:not(.guest-shell) .search input { border-color: rgba(40,30,60,.12); background: #fff; color: #1f1b25; box-shadow: none; }
:root[data-theme="light"] body:not(.guest-shell) .search input::placeholder { color: #7a7382; }
:root[data-theme="light"] body:not(.guest-shell) .me { border-color: rgba(98,74,150,.16); background: linear-gradient(145deg,#fff,#f6f2fa); color: #1f1b25; box-shadow: 0 1px 2px rgba(52,36,88,.06),0 10px 22px -14px rgba(52,36,88,.3); }
:root[data-theme="light"] .me-space-mark .n-icon { border-color: rgba(98,74,150,.18); background: #f1ecf8; color: #6a4fa6; box-shadow: none; }
:root[data-theme="light"] body:not(.guest-shell) .me-label { color: #6f6878; }
:root[data-theme="light"] body:not(.guest-shell) .me-space { color: #1f1b25; }
:root[data-theme="light"] .me-space-arrow { color: #6f6878; }
:root[data-theme="light"] body:not(.guest-shell) .switch .credit-pill { border-color: rgba(176,96,60,.28); background: #fbeee7; color: #8a4529; }
:root[data-theme="light"] body:not(.guest-shell) nav { scrollbar-color: rgba(98,74,150,.25) transparent; }
:root[data-theme="light"] body:not(.guest-shell) .n-row:hover { border-color: rgba(98,74,150,.12); background: rgba(255,255,255,.7); }
:root[data-theme="light"] body:not(.guest-shell) .n-row.active { border-color: rgba(98,74,150,.2); background: linear-gradient(110deg,#ece5f7,#f6f2fb 62%,#fbefe9); box-shadow: 0 8px 18px -12px rgba(52,36,88,.35); }
:root[data-theme="light"] body:not(.guest-shell) .n-label { color: #4a4452; }
:root[data-theme="light"] body:not(.guest-shell) .n-row.active .n-label { color: #1f1b25; }
:root[data-theme="light"] .n-icon { border-color: rgba(98,74,150,.14); background: #f4f0f9; color: #6a4fa6; box-shadow: none; }
:root[data-theme="light"] :is(.n-icon-wallet,.n-icon-calendar) { color: #a0522d; }
:root[data-theme="light"] :is(.n-icon-dialog,.n-icon-case) { color: #5d5567; }
:root[data-theme="light"] body:not(.guest-shell) .n-row.active .n-icon { border-color: rgba(98,74,150,.24); background: #fff; color: #5b3fa0; box-shadow: 0 4px 10px -6px rgba(52,36,88,.35); }
:root[data-theme="light"] .n-copy small { color: #6f6878; }
:root[data-theme="light"] body:not(.guest-shell) .caret { color: #6f6878; }
:root[data-theme="light"] body:not(.guest-shell) .caret[aria-expanded="true"] { color: #5b3fa0; }
:root[data-theme="light"] body:not(.guest-shell) .kids { border-left-color: rgba(98,74,150,.16); }
:root[data-theme="light"] body:not(.guest-shell) .protofoot { border-top-color: rgba(40,30,60,.07); background: linear-gradient(180deg,rgba(244,240,248,.7),#efeaf5); }
:root[data-theme="light"] body:not(.guest-shell) .foot-link { color: #5d5567; }
:root[data-theme="light"] body:not(.guest-shell) .foot-link:hover { color: #1f1b25; background: rgba(255,255,255,.7); }
:root[data-theme="light"] .sidebar-more summary { color: #6f6878; }

/* ── Сворачиваемая боковая панель (компьютер) ──────────────────────── */
.nav-collapse { display: none; }
@media (min-width: 901px) {
  body:not(.guest-shell) .app { transition: grid-template-columns .22s ease; }
  body:not(.guest-shell) .nav-collapse {
    display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 0;
    border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(18,17,22,.74);
    color: #9992a2; cursor: pointer; font-size: 17px; line-height: 1;
  }
  body:not(.guest-shell) .nav-collapse:hover { color: #e6ddf0; border-color: rgba(198,169,240,.35); }
  body:not(.guest-shell) .nav-collapse:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
  body:not(.guest-shell) .brand .lang-switch + .nav-collapse { margin-left: 6px; }
  body.nav-collapsed:not(.guest-shell) { --nav-w: 80px; }
  body.nav-collapsed:not(.guest-shell) .brand { flex-direction: column; justify-content: center; min-height: 0; padding: 18px 0 14px; gap: 10px; }
  body.nav-collapsed:not(.guest-shell) .brand :is(b,.lang-switch) { display: none; }
  body.nav-collapsed:not(.guest-shell) .nav-collapse { margin: 0 !important; }
  body.nav-collapsed:not(.guest-shell) .nav-collapse span { display: inline-block; transform: rotate(180deg); }
  body.nav-collapsed:not(.guest-shell) .search,
  body.nav-collapsed:not(.guest-shell) .switch .credit-pill,
  body.nav-collapsed:not(.guest-shell) .kids,
  body.nav-collapsed:not(.guest-shell) .caret,
  body.nav-collapsed:not(.guest-shell) .sidebar-more,
  body.nav-collapsed:not(.guest-shell) :is(.me-space-copy,.me-space-arrow,.n-copy) { display: none !important; }
  body.nav-collapsed:not(.guest-shell) .switch { padding: 10px 12px; }
  body.nav-collapsed:not(.guest-shell) .me { grid-template-columns: 38px; justify-content: center; min-height: 56px; padding: 8px; }
  body.nav-collapsed:not(.guest-shell) nav { padding: 5px 12px 18px; }
  body.nav-collapsed:not(.guest-shell) .n-row { justify-content: center; }
  body.nav-collapsed:not(.guest-shell) .n-row:hover { transform: none; }
  body.nav-collapsed:not(.guest-shell) .n-label { grid-template-columns: 34px; justify-content: center; padding: 6px 0; width: 100%; }
  body.nav-collapsed:not(.guest-shell) .protofoot { padding: 10px 8px 14px; }
  body.nav-collapsed:not(.guest-shell) .foot-link { grid-template-columns: 25px; justify-content: center; }
  body.nav-collapsed:not(.guest-shell) .foot-link > span:not(.n-icon) { display: none; }
}
/* На телефоне затемнение открытого меню лежит на уровне body (z 20). Изоляция
   .app запирала боковую панель (z 34) под ним: нажатие по пункту меню попадало
   в затемнение и просто закрывало меню. */
@media (max-width: 900px) {
  body:not(.guest-shell) .app { isolation: auto; }
}
/* Карточка «Что дальше?» — плотная: под ней теперь видны голограммы. */
:root[data-theme="light"] body:not(.guest-shell) .case-next-primary { background: linear-gradient(145deg,#f3edfb,#fff 70%); border-color: rgba(98,74,150,.24); }
:root[data-theme="dark"] body:not(.guest-shell) .case-next-primary { background: linear-gradient(145deg,#2a2233,#17141b 70%); }
/* На телефоне текст идёт во всю ширину — голограммы тише, чтобы не спорить с ним. */
@media (max-width: 900px) {
  body:not(.guest-shell) .shell-holo-panels { opacity: .42; }
}
/* «Что дальше?» лежит прямо над голограммами — подложка-плашка, чтобы читалось. */
body:not(.guest-shell) .case-next-rail > .eyebrow { justify-self: start; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb,var(--panel) 92%,transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
:root[data-theme="light"] body:not(.guest-shell) .case-next-rail > .eyebrow { border-color: rgba(98,74,150,.16); background: rgba(255,255,255,.94); color: #5d5567; box-shadow: 0 4px 12px -8px rgba(52,36,88,.3); }
:root[data-theme="light"] .my-day-guest .holo-home-trust { color: #5d5666; }

/* Док агента тёмный в обеих темах (фон задан выше жёстко), а ответ красился
   общими --text/--muted: в светлой теме это тёмно-серое на почти чёрном —
   ответ открывался, но не читался. Свои токены текста — у самого дока. */
body:not(.guest-shell) .agent-dock { --text: #efe9f4; --muted: #b9b0c3; --cyan: #cdb6f5; --accent-soft: rgba(205,182,245,.12); }

/* Запас снизу на высоту открытого дока (bootstrap.js ставит --agent-dock-h). */
body:not(.guest-shell):not(.chat-home-shell) .vwrap:not(.dialog-view) { padding-bottom: max(96px, calc(var(--agent-dock-h, 0px) + 32px + var(--bottom-notice-h, 0px) + env(safe-area-inset-bottom))); }

/* ── Быстрое «В архив» в списке дел ─────────────────────────────────── */
.my-case-item { position: relative; min-width: 0; transition: height .22s ease, opacity .18s ease, transform .22s ease; }
.my-case-item.leaving { height: 0 !important; opacity: 0; transform: translateX(18px); overflow: hidden; pointer-events: none; }
.my-case-item:has(> .my-case-quick) > .my-case-row { padding-right: 62px; }
.my-case-quick {
  position: absolute; z-index: 2; right: 14px; top: 50%; translate: 0 -50%;
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted);
  cursor: pointer; opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease;
}
.my-case-item:hover > .my-case-quick, .my-case-quick:focus-visible { opacity: 1; }
.my-case-quick:hover { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 45%, var(--line)); }
.my-case-quick:focus-visible { outline: 2px solid var(--focus, var(--cyan)); outline-offset: 2px; }
.my-cases-list.view-notes .my-case-quick { top: auto; bottom: 46px; right: 14px; translate: none; }
@media (hover: none) { .my-case-quick { opacity: .85; } }
.auth-toast.has-action { display: flex; align-items: center; gap: 14px; }
.auth-toast.has-action button {
  flex: none; padding: 6px 12px; border: 1px solid color-mix(in srgb, var(--cyan) 45%, transparent); border-radius: 999px;
  background: transparent; color: var(--cyan); font: inherit; font-weight: 750; cursor: pointer;
}
.auth-toast.has-action button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ── Внимание: переливание только у того, что ждёт человека ─────────────
   Правило одно: переливается то, что требует ответа, — «Требует вас» и
   единственный следующий шаг дела. Всё остальное спокойно: когда блестит
   всё, не блестит ничего. Движение медленное (6–9 с), без мигания; при
   prefers-reduced-motion остаётся неподвижный градиент. */
@property --attn-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes attn-turn { to { --attn-a: 360deg; } }
@keyframes attn-sheen { 0%, 62% { background-position: 160% 0, 0 0; } 100% { background-position: -60% 0, 0 0; } }
@keyframes attn-flow { to { background-position: 0 -200%; } }
.my-case-status.status-need {
  color: #fff !important; font-weight: 750;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.42) 50%, transparent 65%) 160% 0 / 250% 100% no-repeat,
              linear-gradient(120deg, hsl(var(--accent-h, 275) 52% 46%), #d0643a);
  box-shadow: 0 4px 14px color-mix(in srgb, #d0643a 28%, transparent);
  animation: attn-sheen 4.2s ease-in-out infinite;
}
/* строка списка: живая кромка слева */
.my-case-item.is-need::before {
  content: ""; position: absolute; z-index: 1; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; pointer-events: none;
  background: linear-gradient(180deg, hsl(var(--accent-h, 275) 70% 66%), #ff9a5c, #7fd3ff, hsl(var(--accent-h, 275) 70% 66%)) 0 0 / 100% 200%;
  animation: attn-flow 6s linear infinite;
}
/* стикер и «что дальше»: переливающаяся кромка по контуру */
.my-cases-list.view-notes .my-case-item.is-need::before { display: none; }
.my-cases-list.view-notes .my-case-item.is-need::after,
.case-next-primary::after {
  content: ""; position: absolute; z-index: 2; inset: -1px; padding: 1.5px; pointer-events: none;
  border-radius: 4px 18px 18px 18px;
  background: conic-gradient(from var(--attn-a), hsl(var(--accent-h, 275) 75% 68%), #ff9a5c, #ffd58a, #7fd3ff, hsl(var(--accent-h, 275) 75% 68%));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: attn-turn 9s linear infinite; opacity: .9;
}
.case-next-primary { position: relative; }
.case-next-primary::after { border-radius: inherit; }
/* главные кнопки: блик только по наведению — без постоянного движения */
body:not(.guest-shell) .btn.primary {
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.4) 50%, transparent 65%) 160% 0 / 250% 100% no-repeat,
              linear-gradient(145deg,#d9c7fb,#a58bd5);
  transition: background-position .7s ease;
}
body:not(.guest-shell) .btn.primary:is(:hover,:focus-visible) { background-position: -60% 0, 0 0; }
@media (prefers-reduced-motion: reduce) {
  .my-case-status.status-need, .my-case-item.is-need::before, .my-cases-list.view-notes .my-case-item.is-need::after, .case-next-primary::after { animation: none; }
  .my-case-item, .my-case-quick, body:not(.guest-shell) .btn.primary { transition: none; }
}

/* Спокойный разговор: текст занимает высоту по содержимому, инструменты — по запросу. */
.calm-dialog, .calm-overview-card, #fixar-chat-workspace, body:has(.vwrap.dialog-view) {
  --chat-bg:#18161c; --chat-input:#211e26; --chat-user:#2c2535;
  --chat-line:#39323f; --chat-ink:#e9e3ee; --chat-muted:#aaa2b2;
}
.case-dialog.calm-dialog {
  gap:10px; max-width:820px; margin-inline:auto; padding:18px;
  background:var(--chat-bg); border-color:var(--chat-line); border-radius:18px;
  box-shadow:none; color:var(--chat-ink);
}
:root[data-theme="light"] .calm-dialog, :root[data-theme="light"] .calm-overview-card, :root[data-theme="light"] #fixar-chat-workspace, :root[data-theme="light"] body:has(.vwrap.dialog-view) {
  --chat-bg:#fcfcfb; --chat-input:#ffffff; --chat-user:#f0ecf5;
  --chat-line:#e5e0eb; --chat-ink:#2d2833; --chat-muted:#77707f;
}
:root body:not(.guest-shell) .case-dialog.calm-dialog { background:var(--chat-bg); box-shadow:none; }
.calm-dialog > * { flex-shrink:0; min-width:0; }
.calm-dialog .case-dialog-head { align-items:center; padding:0 8px 2px; }
.calm-dialog .case-dialog-head h2 { font-size:16px; font-weight:600; line-height:1.4; letter-spacing:-.2px; }
.calm-dialog .case-dialog-head p { display:block; font-size:12px; line-height:1.4; color:var(--chat-muted); }
.calm-dialog .chat-context-tools { display:flex; flex-wrap:wrap; align-items:flex-start; gap:4px 14px; padding:0 8px; }
.calm-dialog :is(.smart-prompts-fold,.dialog-tools-fold) { position:relative; margin:0; min-width:0; max-width:100%; }
.calm-dialog :is(.smart-prompts-fold,.dialog-tools-fold) > summary {
  display:flex; align-items:center; gap:7px; min-height:32px; padding:3px 0;
  border:0; border-radius:0; background:none; box-shadow:none; color:var(--chat-muted);
  list-style:none; cursor:pointer; font-size:12px; font-weight:500;
}
.calm-dialog :is(.smart-prompts-fold,.dialog-tools-fold) > summary::-webkit-details-marker { display:none; }
.calm-dialog :is(.smart-prompts-fold,.dialog-tools-fold) > summary::after { content:"⌄"; color:var(--chat-muted); font-size:12px; }
.calm-dialog :is(.smart-prompts-fold,.dialog-tools-fold)[open] > summary::after { content:"⌃"; }
.calm-dialog .smart-prompts { flex-wrap:wrap; max-height:150px; overflow:auto; margin:4px 0 8px; }
.calm-dialog .smart-prompt { flex:0 1 auto; white-space:normal; padding:7px 10px; max-width:100%; font-size:12px; line-height:1.45; background:var(--chat-input); box-shadow:none; }
.calm-dialog .dialog-tiles { max-height:170px; overflow:auto; grid-template-columns:1fr; margin:4px 0 8px; }
.calm-dialog .dialog-tile { width:100%; min-height:40px; padding:7px 10px; border:1px solid var(--chat-line); border-radius:10px; background:var(--chat-input); box-shadow:none; }
.calm-dialog .dialog-tile:hover { box-shadow:none; }
.calm-dialog .dialog-tile-icon { width:25px; height:25px; flex-basis:25px; border-radius:7px; background:var(--chat-user); color:var(--cyan); }
.calm-dialog .dialog-tile b { font-size:12px; font-weight:500; }
.calm-dialog .dialog-tile small { font-size:11px; }
.calm-dialog .case-thread { flex:1 1 0; min-height:64px; gap:26px; padding:18px 8px 22px; scrollbar-gutter:stable; }
:root body:not(.guest-shell) .calm-dialog .case-thread .bubble {
  flex:0 0 auto; width:100%; max-width:680px; min-height:min-content; margin:0;
  padding:0; border:0; background:none; box-shadow:none; color:var(--chat-ink);
  font-size:15px; font-weight:400; line-height:1.65; overflow-wrap:anywhere;
}
:root body:not(.guest-shell) .calm-dialog .case-thread .bubble.user {
  width:fit-content; max-width:min(88%,580px); padding:11px 15px;
  border:0; border-radius:16px 16px 4px 16px; background:var(--chat-user);
}
.calm-dialog .case-thread .bubble > small { display:block; margin:0 0 10px; font-size:11px; line-height:1.5; font-weight:400; color:var(--chat-muted); }
.calm-dialog .case-thread .bubble.user > small { margin-bottom:6px; }
.calm-dialog .chat-message-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.calm-dialog .agent-rich { white-space:normal; font-size:inherit; line-height:inherit; }
.calm-dialog .agent-rich p { margin:0 0 14px; font-size:inherit; line-height:inherit; }
.calm-dialog .agent-rich :is(h3,h4) { margin:18px 0 9px; font-size:16px; line-height:1.5; font-weight:600; letter-spacing:0; }
.calm-dialog .agent-rich :is(ol,ul) { margin:14px 0; padding-left:24px; }
.calm-dialog .agent-rich li { margin:8px 0; line-height:inherit; }
.calm-dialog .agent-rich strong { font-weight:600; }
.calm-dialog .readable-answer { cursor:auto; transition:none; }
.calm-dialog .chat-read-answer { border:0; border-radius:6px; background:none; padding:7px 0; margin-top:2px; color:var(--chat-muted); font:inherit; font-size:11px; cursor:pointer; }
.calm-dialog .chat-read-answer:hover { color:var(--cyan); }
:root body:not(.guest-shell) .calm-dialog .chat-composer {
  position:relative; bottom:auto; z-index:2; flex:none; gap:5px; margin:0;
  padding:10px 8px 7px; border:1px solid var(--chat-line); border-radius:19px;
  background:var(--chat-input); box-shadow:0 3px 16px rgba(0,0,0,.035);
}
:root body:not(.guest-shell) .calm-dialog .chat-composer textarea { min-height:44px; max-height:132px; padding:5px 8px; font-size:16px; line-height:1.5; color:var(--chat-ink); background:transparent; box-shadow:none; border:0; }
.calm-dialog .chat-composer textarea:focus-visible { outline:2px solid var(--focus); outline-offset:1px; border-radius:8px; }
.calm-dialog .chat-composer textarea::placeholder { color:var(--chat-muted); opacity:1; }
.calm-dialog .chat-actions { flex-wrap:nowrap; gap:4px; }
.calm-dialog :is(.chat-attachments,.chat-compose-options) { position:relative; flex:none; }
.calm-dialog :is(.chat-attachments,.chat-compose-options) > summary {
  display:flex; align-items:center; justify-content:center; min-height:40px; padding:6px 10px;
  list-style:none; cursor:pointer; font-size:12px; color:var(--chat-muted); border-radius:10px;
}
.calm-dialog :is(.chat-attachments,.chat-compose-options) > summary::-webkit-details-marker { display:none; }
.calm-dialog .chat-attachments > summary { width:40px; padding:0; font-size:25px; line-height:1; font-weight:400; }
.calm-dialog :is(.chat-attachments,.chat-compose-options) > summary:hover { background:var(--chat-user); }
.calm-dialog :is(.chat-attachment-menu,.chat-option-menu) {
  position:absolute; bottom:calc(100% + 10px); left:0; z-index:8; width:240px; max-width:calc(100vw - 64px);
  display:grid; gap:4px; padding:9px; border:1px solid var(--chat-line); border-radius:13px;
  background:var(--chat-input); box-shadow:0 8px 24px rgba(0,0,0,.12);
}
.calm-dialog .chat-option-menu { left:-44px; padding:13px; }
.calm-dialog .chat-option-menu label { display:flex; align-items:center; gap:8px; min-height:40px; font-size:13px; }
.calm-dialog .chat-option-menu p { margin:4px 0; color:var(--chat-muted); font-size:11px; line-height:1.5; }
.calm-dialog .chat-tool { min-height:40px; width:auto; padding:8px 10px; border:0; border-radius:10px; background:none; box-shadow:none; font-size:13px; font-weight:400; gap:9px; color:var(--chat-muted); }
.calm-dialog .chat-tool:focus-within { outline:2px solid var(--focus); outline-offset:1px; }
.calm-dialog .chat-tool .tool-icon { font-size:18px; line-height:1; }
.calm-dialog .chat-tool.chat-voice { width:40px; min-width:40px; margin-left:auto; padding:0; }
.calm-dialog .chat-tool.chat-voice > .sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body:not(.guest-shell) .calm-dialog .chat-send {
  flex:0 0 40px; width:40px; height:40px; min-height:40px; margin:0; padding:0;
  border:0; border-radius:50%; background:var(--cyan); color:var(--on-accent);
  box-shadow:none; font-size:24px; font-weight:400; line-height:1; transform:none;
}
.calm-dialog .chat-status { min-height:0; padding:0 8px; font-size:11px; line-height:1.5; }
.calm-dialog .chat-status:empty { display:none; }
.calm-dialog .chat-file-state { font-size:12px; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .case-dialog.calm-dialog { padding:12px 10px 10px; gap:7px; border-radius:14px; }
  .calm-dialog .case-dialog-head { padding-inline:8px; }
  .calm-dialog .case-dialog-head h2 { font-size:16px; }
  .calm-dialog .case-thread { min-height:56px; padding:13px 8px 18px; gap:24px; }
  body:not(.guest-shell) .calm-dialog .case-thread .bubble { font-size:15px; }
  body:not(.guest-shell) .calm-dialog .chat-composer { padding-bottom:calc(7px + env(safe-area-inset-bottom)); }
}
@media(pointer:coarse) {
  .calm-dialog :is(.smart-prompts-fold,.dialog-tools-fold) > summary,
  .calm-dialog :is(.chat-attachments,.chat-compose-options) > summary,
  .calm-dialog .chat-read-answer,.calm-dialog .chat-tool { min-height:44px; }
  .calm-dialog .chat-attachments > summary,.calm-dialog .chat-tool.chat-voice { width:44px; min-width:44px; }
  body:not(.guest-shell) .calm-dialog .chat-send { flex-basis:44px; width:44px; height:44px; }
}

/* В разговоре шапка задачи — контекст, а не второй главный экран. */
:root body:not(.guest-shell) .vwrap.dialog-view { padding:12px clamp(14px,2vw,28px) 12px; }
.vwrap.dialog-view .case-detail-shell { gap:8px; }
.vwrap.dialog-view .case-detail-shell > .crumbs { display:none; }
.calm-dialog .case-dialog-head > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 10px; }
.calm-dialog .case-dialog-head p { margin:0; }
.vwrap.dialog-view .case-detail-header { display:flex; gap:10px; padding:0 4px 8px; align-items:center; flex-wrap:nowrap; }
.vwrap.dialog-view .case-detail-header :is(.case-detail-avatar,.eyebrow),
.vwrap.dialog-view .case-detail-header h1 + p,
.vwrap.dialog-view .case-detail-meta:not(:has(.warn)) { display:none; }
body:not(.guest-shell) .vwrap.dialog-view .case-detail-header h1 { margin:0; font-size:17px; font-weight:500; line-height:1.4; letter-spacing:-.2px; overflow-wrap:anywhere; }
.case-connector-icon { display:none; }
.vwrap.dialog-view .case-detail-header > div:not(.case-detail-tools) { flex:1; min-width:0; }
.vwrap.dialog-view .case-detail-tools { display:flex; flex:none; margin:0; }
:root body:not(.guest-shell) .vwrap.dialog-view .case-detail-tools .btn { display:inline-flex; align-items:center; justify-content:center; width:40px; min-width:40px; min-height:40px; padding:0; border:0; border-radius:10px; background:none; color:var(--chat-muted); box-shadow:none; }
.vwrap.dialog-view .case-connector-icon { display:inline; font-size:18px; line-height:1; }
.vwrap.dialog-view .case-connector-label { display:none; }
:root body:not(.guest-shell) .vwrap.dialog-view .case-detail-tools .btn:hover { background:var(--chat-user); color:var(--chat-ink); }
@media(pointer:coarse) { :root body:not(.guest-shell) .vwrap.dialog-view .case-detail-tools .btn { width:44px; min-width:44px; min-height:44px; } }
.vwrap.dialog-view .case-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:6px 0 10px; padding-bottom:2px; }
.vwrap.dialog-view .case-tabs .ct { flex:none; min-height:36px; padding:7px 12px; font-size:12px; box-shadow:none; }
.case-dialog.calm-dialog { height:var(--case-chat-height,calc(100dvh - 190px))!important; max-width:820px!important; min-height:0!important; max-height:none!important; }

/* Та же лента и типографика в общем разговоре. */
#fixar-chat-workspace { max-width:1040px; grid-template-columns:minmax(0,1fr); background:var(--chat-bg); border-color:var(--chat-line); color:var(--chat-ink); box-shadow:0 16px 60px rgba(0,0,0,.16); }
#fixar-chat-workspace.history-open { grid-template-columns:230px minmax(0,1fr); }
#fixar-chat-workspace .fc-history { display:none; padding:18px 14px; background:var(--chat-input); border-color:var(--chat-line); }
#fixar-chat-workspace.history-open .fc-history { display:flex; }
#fixar-chat-workspace .fc-head { min-height:64px; border:0; padding:10px 22px; }
#fixar-chat-workspace .fc-head h2 { font-size:16px; font-weight:600; letter-spacing:-.2px; }
#fixar-chat-workspace .fc-head p { font-size:12px; margin-top:2px; color:var(--chat-muted); }
#fixar-chat-workspace .fc-head [data-fc-history] { display:inline-flex; }
#fixar-chat-workspace .btn { border:0; background:none; box-shadow:none; color:var(--chat-muted); transform:none; font-size:12px; font-weight:500; }
#fixar-chat-workspace .btn:hover { background:var(--chat-user); color:var(--chat-ink); }
#fixar-chat-workspace .fc-log { padding:28px max(24px,calc((100% - 660px)/2)); }
#fixar-chat-workspace .fc-message { margin-bottom:28px; font-size:15px; line-height:1.65; color:var(--chat-ink); }
#fixar-chat-workspace .fc-message.is-user { border:0; background:var(--chat-user); padding:11px 15px; }
#fixar-chat-workspace .fc-message-label { color:var(--chat-muted); font-weight:400; }
#fixar-chat-workspace .fc-message-text .agent-rich { font-size:15px; line-height:1.65; }
#fixar-chat-workspace .fc-message-text .agent-rich :is(h3,h4) { font-size:16px; line-height:1.5; font-weight:600; }
#fixar-chat-workspace .fc-message-text .agent-rich strong { font-weight:600; }
#fixar-chat-workspace .fc-empty { margin:8vh auto; }
#fixar-chat-workspace .fc-empty h3 { font-size:23px; letter-spacing:-.5px; font-weight:500; margin:15px 0 8px; }
#fixar-chat-workspace .fc-empty > span { font-size:27px; }
#fixar-chat-workspace .fc-empty p { font-size:14px; color:var(--chat-muted); }
#fixar-chat-workspace .fc-status { width:100%; max-width:708px; margin-inline:auto; padding:0 24px 8px; font-size:12px; color:var(--chat-muted); }
#fixar-chat-workspace .fc-status:empty { display:none; }
#fixar-chat-workspace .fc-composer { width:calc(100% - 40px); max-width:660px; margin:0 auto 20px; padding:10px 10px 7px; background:var(--chat-input); border-color:var(--chat-line); border-radius:19px; }
#fixar-chat-workspace .fc-composer > label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#fixar-chat-workspace .fc-composer textarea { min-height:44px; max-height:132px; padding:5px 7px; font-size:16px; line-height:1.5; background:transparent; color:var(--chat-ink); }
#fixar-chat-workspace .fc-composer-foot { gap:6px; }
#fixar-chat-workspace .fc-composer-foot small { order:-1; margin-right:auto; color:var(--chat-muted); }
#fixar-chat-workspace .fc-composer [data-fc-voice] { min-width:40px; width:40px; min-height:40px; padding:0; margin-left:auto; border:0; box-shadow:none; background:none; }
#fixar-chat-workspace .fc-composer [data-fc-voice] .tool-icon { font-size:18px; }
#fixar-chat-workspace .fc-composer [data-fc-voice] > span:last-child { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#fixar-chat-workspace .fc-composer button[type="submit"] { flex:0 0 40px; width:40px; height:40px; min-height:40px; padding:0; margin:0; border:0; border-radius:50%; background:var(--cyan); color:var(--on-accent); font-size:24px; font-weight:400; line-height:1; box-shadow:none; }
#fixar-chat-workspace .fc-latest { bottom:150px; }
#fixar-chat-workspace .chat-status:empty { display:none; }
@media(max-width:760px) {
  .vwrap.dialog-view { padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
  .vwrap.dialog-view.chat-keyboard-open .case-detail-header,
  .vwrap.dialog-view.chat-keyboard-open .case-tabs,
  .vwrap.dialog-view.chat-keyboard-open .case-detail-meta { display:none; }
  .vwrap.dialog-view.chat-keyboard-open .chat-context-tools { display:none; }
  #fixar-chat-workspace, #fixar-chat-workspace.history-open { grid-template-columns:minmax(0,1fr); top:var(--fc-viewport-top,0px); }
  #fixar-chat-workspace .fc-head { padding:8px 12px; gap:8px; }
  #fixar-chat-workspace .fc-head .btn { padding:8px; }
  #fixar-chat-workspace .fc-log { padding:22px 18px; }
  #fixar-chat-workspace.history-open .fc-history { top:64px; background:var(--chat-bg); }
  #fixar-chat-workspace .fc-composer { width:calc(100% - 20px); margin-bottom:10px; padding-bottom:calc(7px + env(safe-area-inset-bottom)); border-radius:19px; }
  #fixar-chat-workspace .fc-composer-foot small { display:none; }
}
@media(pointer:coarse) {
  .vwrap.dialog-view .case-tabs .ct { min-height:44px; }
  #fixar-chat-workspace .fc-composer [data-fc-voice] { min-width:44px; width:44px; min-height:44px; }
  #fixar-chat-workspace .fc-composer button[type="submit"] { flex-basis:44px; width:44px; height:44px; }
}
@media(max-width:900px) {
  /* На телефоне остаётся одна компактная шапка вместо нескольких панелей. */
  body:has(.vwrap.dialog-view) .topm { min-height:56px; padding:6px 10px; gap:6px; border-bottom:1px solid var(--chat-line); background:var(--chat-bg); color:var(--chat-ink); box-shadow:none; }
  body:has(.vwrap.dialog-view) .topm > b { display:inline; font-size:16px; font-weight:600; color:var(--chat-ink); }
  body:has(.vwrap.dialog-view) .topm > .brand-mark { display:none; }
  body:has(.vwrap.dialog-view) .topm :is(.menu-btn,.lang-switch,.acct-btn) { min-width:40px; min-height:40px; padding:6px; border:0; border-radius:10px; background:none; box-shadow:none; color:var(--chat-ink); }
  body:has(.vwrap.dialog-view) .topm .acct-btn { margin-left:auto; }
  body:has(.vwrap.dialog-view) .topm .av { width:28px; height:28px; font-size:12px; }
  body:has(.vwrap.dialog-view) .topm .credit-pill { min-height:36px; padding:5px 7px; font-size:11px; font-weight:400; color:var(--chat-muted); background:none; border:0; box-shadow:none; }
  body:has(.vwrap.dialog-view) .screen-nav { position:relative; height:0; min-height:0; padding:0; margin:0; overflow:visible; z-index:3; }
  body:has(.vwrap.dialog-view) .screen-back { position:absolute; top:10px; left:12px; display:flex; justify-content:center; align-items:center; width:44px; min-height:44px; padding:0; border:0; border-radius:10px; background:none; color:var(--chat-ink); box-shadow:none; }
  body:has(.vwrap.dialog-view) .screen-back [data-screen-back-label] { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  body:has(.screen-nav:not([hidden])) .vwrap.dialog-view .case-detail-header { min-height:44px; padding-left:52px; }
  .vwrap.dialog-view { background:var(--chat-bg); }
  .vwrap.dialog-view .case-tabs { gap:4px; margin:4px 0 8px; border:0; background:none; box-shadow:none; }
  :root body:not(.guest-shell) .vwrap.dialog-view .case-tabs .ct { border:0; padding:7px 10px; border-radius:9px; font-weight:500; box-shadow:none; background:none; color:var(--chat-muted); }
  :root body:not(.guest-shell) .vwrap.dialog-view .case-tabs .ct.active { background:var(--chat-user); color:var(--chat-ink); }
  .calm-dialog .case-dialog-head h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .calm-dialog .case-dialog-head p { margin:0; }
  body:has(.vwrap.chat-keyboard-open) .screen-nav { display:none; }
}
@media(max-width:360px) {
  body:has(.vwrap.dialog-view) .topm > b { display:none; }
  body:has(.vwrap.dialog-view) .topm > .brand-mark { display:grid; width:24px!important; height:24px!important; font-size:20px!important; background:none; border:0; box-shadow:none; }
}
@media(max-width:900px) and (pointer:coarse) {
  body:has(.vwrap.dialog-view) .topm :is(.menu-btn,.lang-switch,.acct-btn) { min-width:44px; min-height:44px; }
}

/* The overview uses the same conversation controls as the dialogue tab. */
:root body:not(.guest-shell) .calm-overview-card {
  width:100%; max-width:820px; margin-inline:auto; padding:24px;
  color:var(--chat-ink); background:var(--chat-bg); border:1px solid var(--chat-line);
  border-radius:18px; box-shadow:none;
}
:root body:not(.guest-shell) .calm-overview-card::before { display:none; }
.calm-overview-card .case-result-head { gap:16px; margin-bottom:16px; }
.calm-overview-card .case-result-head h2 { font-size:17px; line-height:1.4; font-weight:600; }
.calm-overview-card .case-result-head .eyebrow { margin-bottom:6px; font-size:10px; letter-spacing:1px; }
.calm-overview-card .case-goal-description { margin:0 0 14px; font-size:15px; line-height:1.65; }
.calm-overview-card .my-day-status { padding:5px 9px; font-size:11px; }
.calm-overview-card .case-summary-details { margin:0 0 20px; color:var(--chat-muted); }
.calm-overview-card .case-summary-details > summary { width:fit-content; padding:7px 0; font-size:13px; cursor:pointer; }
.calm-overview-card .case-summary-details .case-facts { margin:8px 0 0; font-size:13px; }
.calm-overview-card .case-summary-details .case-facts > * { padding:10px; }
.calm-overview-card .case-question.calm-overview { margin-top:24px; color:var(--chat-ink); }
.calm-overview > h3 { margin:0 0 12px; font-size:13px; font-weight:500; color:var(--chat-muted); }
.calm-overview #agentreply:empty { display:none; }
.calm-overview #agentreply .bubble { margin:0 0 18px; max-width:100%; padding:0; font-size:15px; line-height:1.65; }
.calm-overview .chat-composer { margin:0; }
@media(max-width:760px) {
  :root body:not(.guest-shell) .calm-overview-card { padding:16px; border-radius:16px; }
}

.calm-overview .case-thread { max-height:min(52dvh,480px); overflow:auto; overscroll-behavior:contain; padding:0 8px 0 0; margin:0 0 16px; }
.calm-overview #agentreply .bubble { margin:0 0 24px; }
.calm-overview #agentreply .bubble.user { padding:12px 16px; background:var(--chat-user); border-radius:16px; }
