/* Каркас кабинета «Телеграм-ночь»: меню, шапка, нижние вкладки, задачи, плашка cookie, гостевой подвал.
   Цвета — токены из tg-night.css. Поведение каркаса — UX-SPEC §2.8, §3.9, §3.10, §4.0.
   The task dock owns layout space. It never covers a message or a composer; it is shown only while a task runs,
   has just finished, or was opened with «Задачи». */
body.app-shell{height:100vh;height:100dvh;overflow:hidden}
.app-frame{height:100%;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"workspace" "tasks";min-width:0;min-height:0}
.app-frame>.layout{grid-area:workspace;min-height:0;height:100%;overflow:hidden}
.app-shell .sidebar-wrap{min-height:0}
.app-shell .sidebar{height:100%;position:relative;top:auto}
.app-shell .content{display:flex;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:0}
.app-shell .content>main.container{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-bottom:var(--main-pad-bottom,18px);scrollbar-gutter:stable}

/* ---------- меню слева ---------- */
.sidebar{background:var(--surface);border-right:1px solid var(--line)}
.sidebar .brand{color:var(--text);font-size:17px;font-weight:600;letter-spacing:-.01em}
.sidebar .brand .logo-mark{flex:none;width:28px;height:28px}
.sidebar .brand:focus-visible{outline-offset:-2px}
.nav-group h4{margin:0;padding:14px 10px 6px;font-family:var(--font-mono);font-size:12.5px;font-weight:400;line-height:17px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-2);white-space:nowrap}
.nav-group:first-child h4{padding-top:4px}
.snav{border:0;border-radius:var(--r-btn);color:var(--text-2);font-size:15px;font-weight:400;line-height:21px;transition:background-color .15s,color .15s}
.snav .ic{width:18px;height:18px}
.snav:hover{background:var(--surface-2);color:var(--text)}
.snav:focus-visible{outline:2px solid var(--focus);outline-offset:-2px;box-shadow:0 0 0 3px var(--focus-ring)}
.snav.active,.snav[aria-current="page"]{background:var(--surface-3);color:var(--text);font-weight:500;box-shadow:var(--inset-hi)}
.snav.active .ico,.snav[aria-current="page"] .ico{color:var(--accent-text)}
.sidebar-toggle{border:1px solid var(--line-2);border-radius:50%;background:var(--surface);color:var(--text-2);transition:color .15s,background-color .15s}
.sidebar-toggle:hover{background:var(--surface-2);color:var(--text)}
.sidebar-toggle .ic{width:14px;height:14px;transition:transform .18s}
.sidebar-toggle[aria-expanded="false"] .ic{transform:rotate(180deg)}
/* низ меню пуст: «Пройти мастер на себе» — в «Продажах», «Выйти» — в меню аккаунта; скрытые опоры (#themeToggle, #onboardHelp) */
.sidebar .side-bottom{display:none}

/* ---------- шапка кабинета ---------- */
.app-shell .header{flex-shrink:0;min-height:56px;margin:0 -24px;padding:8px 24px;gap:12px;flex-wrap:nowrap;background:var(--surface);border-bottom:1px solid var(--line)}
/* в режиме переписки у .content отступ 12px (chat.j2): шапка выходит ровно в край, кнопки — там же, где на других страницах */
.app-shell.chat-focus .header{margin-inline:-12px}
.shell-brand{display:none;align-items:center;gap:10px;margin-right:auto;min-width:0;color:var(--text);font-size:17px;font-weight:600;letter-spacing:-.01em;text-decoration:none}
.shell-brand .logo-mark{flex:none;width:28px;height:28px}
.shell-tools{display:flex;align-items:center;gap:8px;margin-left:auto;min-width:0}
.balance-chip,.shell-tasks-button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;
  min-height:36px;padding:0 12px;
  border:1px solid var(--line-2);border-radius:var(--r-btn);
  background:var(--surface-2);color:var(--text);
  font:500 15px/1.2 var(--font-ui);text-decoration:none;white-space:nowrap;
  cursor:pointer;box-shadow:none;
  transition:background-color .15s,border-color .15s,color .15s;
}
.balance-chip:hover,.shell-tasks-button:hover{background:var(--surface-3);border-color:var(--text-2);color:var(--text)}
.balance-chip:focus-visible,.shell-tasks-button:focus-visible{outline:2px solid var(--focus);outline-offset:2px;box-shadow:0 0 0 5px var(--focus-ring)}
.balance-chip{border-color:var(--line);font-family:var(--font-mono);font-variant-numeric:tabular-nums;flex:0 1 auto;min-width:0}
.balance-chip .ic,.shell-tasks-button .ic{width:16px;height:16px;color:var(--text-2)}
.balance-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.balance-amount{min-width:0;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;white-space:nowrap}
.balance-plus{display:inline-flex;align-items:center;margin-left:2px;padding-left:8px;border-left:1px solid var(--line-2)}
.balance-chip .balance-plus .ic{color:var(--accent-text)}
.balance-chip[data-stale="true"] .balance-amount{color:var(--text-2)}
.balance-chip[data-low="true"] .balance-amount{color:var(--warning)}
.shell-tasks-button[aria-expanded="true"]{background:var(--surface-3);border-color:var(--text-2)}
.shell-tasks-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:var(--r-pill);background:var(--accent);color:var(--on-accent);font:500 13px/21px var(--font-mono);font-variant-numeric:tabular-nums}
.shell-tasks-count:empty{display:none}
.shell-icon-button{width:36px;min-width:36px;padding:0}
.shell-icon-button .ic{width:18px;height:18px}
.theme-toggle .theme-ic-moon{display:none}
[data-theme="light"] .theme-toggle .theme-ic-sun{display:none}
[data-theme="light"] .theme-toggle .theme-ic-moon{display:block}
.mobile-account>summary{list-style:none}
.mobile-account[open]>summary{background:var(--surface-3);border-color:var(--text-2)}
.mobile-account .acct-ic-menu{display:none}
.mobile-account-menu{display:grid;gap:2px;width:288px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 72px);overflow-y:auto;overscroll-behavior:contain;padding:6px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--surface);box-shadow:var(--shadow-pop)}
.mobile-account-menu a{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 10px;border-radius:8px;color:var(--text);font-size:15px;line-height:21px;text-decoration:none}
.mobile-account-menu a:hover{background:var(--surface-2)}
.mobile-account-menu a .ic{color:var(--text-2)}
/* «Оформление»: тема и «Рисунки на фоне» */
.acct-appearance{display:grid;gap:2px;padding:4px 10px 6px;border-bottom:1px solid var(--line);margin-bottom:2px}
.acct-theme{display:grid;gap:6px;padding:4px 0 6px}
.acct-theme__label{font-size:13px;line-height:17px;font-weight:500;letter-spacing:.05em;text-transform:uppercase;color:var(--text-2)}
.acct-theme select{max-width:none}
.acct-doodles.switch.toggle-row{min-height:44px;padding:4px 0;font-size:15px}
.mobile-account-menu .acct-logout{margin-top:2px;border-top:1px solid var(--line);border-radius:0 0 8px 8px}
.mobile-account-menu .acct-logout:hover{color:var(--error);background:var(--error-soft)}
.mobile-account-menu .acct-logout:hover .ic{color:var(--error)}
/* «Документы и поддержка» — на обеих ширинах (подвала у кабинета больше нет) */
.acct-legal>summary{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 10px;border-radius:8px;list-style:none;cursor:pointer;color:var(--text);font-size:15px;line-height:21px}
.acct-legal>summary::-webkit-details-marker{display:none}
.acct-legal>summary .ic{color:var(--text-2)}
.acct-legal>summary::after{content:"";width:6px;height:6px;margin:-3px 2px 0 auto;border-right:1.5px solid var(--text-2);border-bottom:1.5px solid var(--text-2);transform:rotate(45deg);transition:transform .15s}
.acct-legal[open]>summary::after{margin-top:3px;transform:rotate(-135deg)}
.acct-legal>summary:hover{background:var(--surface-2)}
.acct-legal>summary:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.acct-legal__body{display:grid;gap:0;padding:0 0 6px 36px}
.mobile-account-menu .acct-legal__body a{min-height:40px;padding:8px 10px 8px 0;border-radius:0;color:var(--text-2);font-size:14px;line-height:19px;overflow-wrap:anywhere}
.mobile-account-menu .acct-legal__body a:hover{background:var(--clear);color:var(--text)}
.acct-legal__privacy:empty{display:none}
.acct-legal__privacy .ag-privacy-settings,.mobile-account-menu .ag-privacy-settings{display:flex;align-items:center;width:100%;min-height:40px;margin:0;padding:8px 10px 8px 0;border:0;border-radius:0;background:var(--clear);color:var(--text-2);font:inherit;font-size:14px;line-height:19px;text-align:left;cursor:pointer}
.acct-legal__privacy .ag-privacy-settings:hover,.mobile-account-menu .ag-privacy-settings:hover{background:var(--clear);color:var(--text)}
.mobile-account-menu .ag-privacy-settings:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.acct-legal__org{margin:6px 10px 0 0;color:var(--text-2);font-size:13px;line-height:1.5}

/* быстрый старт: без меню слева, логотип в шапке */
.app-shell.quick-start-mode .sidebar-wrap{display:none}
.app-shell.quick-start-mode .shell-brand{display:flex}
.app-shell.quick-start-mode .content{padding-inline:clamp(12px,3vw,32px)}
.app-shell.quick-start-mode .header{min-height:64px;margin-inline:calc(-1 * clamp(12px,3vw,32px));padding-inline:clamp(12px,3vw,32px)}
.app-shell.quick-start-mode .content>main.container{max-width:none}

/* A chat uses the remaining workspace height, not the browser height. */
.app-shell .content>main:has(>.tg-chat-shell){display:flex;flex-direction:column;padding-bottom:12px;overflow:hidden}
.app-shell .tg-chat-shell{flex:1;min-height:0;height:100%;overflow:hidden}
.app-shell .tg-chat-list{display:flex;flex-direction:column;min-height:0}
.app-shell .tg-chat-list .tg-list-head{position:relative;flex-shrink:0}
.app-shell .tg-chat-list .tg-list-items{flex:1;min-height:0;max-height:none;overflow:auto}
.app-shell .tg-chat-main{min-height:0;overflow:auto;display:flex;flex-direction:column}
.app-shell .tg-chat-main>.page-header{position:relative;flex-shrink:0}
.app-shell .tg-chat-main .chat-wrap{height:auto;min-height:0;flex:1}
.app-shell .tg-chat-main .msgs{min-height:120px;flex:1;overflow:auto}
.app-shell .tg-chat-main .composer{flex-shrink:0}

/* ---------- задачи: тихая строка 34px, по умолчанию свёрнута ---------- */
.app-shell .task-panel{grid-area:tasks;position:relative;inset:auto;z-index:auto;width:auto;min-width:0;min-height:0;pointer-events:auto;font-size:14px}
.app-shell .task-panel[hidden]{display:none}
.app-shell .task-dock-shell{border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;background:var(--surface);backdrop-filter:none}
.app-shell .task-statusbar{display:flex;align-items:center;justify-content:space-between;height:34px;min-width:0;border-bottom:0;gap:6px}
.app-shell .task-status-main{display:flex;align-items:center;flex:1;height:100%;border:0;background:var(--clear);color:var(--text);text-align:left;cursor:pointer;gap:9px;padding:0 14px;font:inherit;min-width:0}
.app-shell .task-window-actions{display:flex;align-items:stretch;align-self:stretch;flex-shrink:0}
.app-shell .task-window-actions button{display:grid;place-items:center;height:100%;padding:0;margin:0;border:0;background:var(--clear);color:var(--text-2);cursor:pointer;font:inherit}
.app-shell .task-window-actions button:hover,.app-shell .task-status-main:hover{background:var(--surface-2);color:var(--text)}
.app-shell .task-window-actions button:focus-visible,.app-shell .task-status-main:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.app-shell .task-window-actions .ic{width:16px;height:16px}
.app-shell .task-drawer{display:flex;flex-direction:column}
.app-shell .task-entry{border:1px solid var(--line);background:var(--surface-2)}
.app-shell .task-entry>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer}
.app-shell .task-entry>summary::-webkit-details-marker{display:none}
.app-shell .task-title{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.app-shell .task-status-main b{font-size:14px;font-weight:600;white-space:nowrap}
.app-shell .task-status-main .task-headline{color:var(--text-2);font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-shell .task-status-icon{display:inline-flex;flex-shrink:0;color:var(--text-2)}
.app-shell .task-status-icon .ic{width:15px;height:15px}
.app-shell .task-status-icon[data-tone="run"]{color:var(--accent-text)}
.app-shell .task-status-icon[data-tone="warn"]{color:var(--warning)}
.app-shell .task-status-icon[data-tone="ok"]{color:var(--success)}
.app-shell .task-window-actions button{width:34px;border-left:0}
.app-shell .task-window-actions [data-task-place]{display:flex;align-items:center;gap:6px;width:auto;padding:0 10px;font-size:13px}
.app-shell .task-window-actions [data-task-place] .ic{width:14px;height:14px}
.app-shell .task-drawer{height:var(--task-drawer-height,220px);max-height:45dvh;min-height:70px;padding:8px 12px;gap:6px;overflow:auto;border-top:1px solid var(--line)}
.app-shell .task-drawer>.muted{margin:6px 2px;font-size:14px}
.app-shell .task-entry{border-radius:8px;flex-shrink:0}
.app-shell .task-entry>summary{padding:7px 10px;gap:12px}
.app-shell .task-title{font-size:14px;font-weight:500}
.app-shell .task-summary-status{max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-2);font-size:13.5px}
.app-shell .task-entry-body{padding:8px 10px;font-size:14px}
.app-shell .task-meta{margin-bottom:5px;overflow-wrap:anywhere}
.task-technical>summary{color:var(--text-2);cursor:pointer;font-size:13px}
.task-error-notice{margin:0;padding:7px 14px;color:var(--warning);font-size:13.5px}
.task-resize{height:5px;cursor:ns-resize;touch-action:none;position:relative;background:var(--clear);outline-offset:-2px}
.task-resize:hover,.task-resize:focus-visible{background:var(--accent)}
.app-frame[data-task-state="collapsed"] .task-resize,.app-frame[data-task-state="hidden"] .task-panel{display:none}
.app-frame[data-task-position="right"][data-task-state="open"]{grid-template-columns:minmax(0,1fr) var(--task-dock-width,340px);grid-template-rows:minmax(0,1fr);grid-template-areas:"workspace tasks"}
.app-frame[data-task-position="right"][data-task-state="open"] .task-panel{border-left:1px solid var(--line)}
.app-frame[data-task-position="right"][data-task-state="open"] .task-dock-shell{height:100%;display:flex;flex-direction:column;border-top:0}
.app-frame[data-task-position="right"][data-task-state="open"] .task-statusbar{flex-shrink:0}
.app-frame[data-task-position="right"][data-task-state="open"] .task-drawer{flex:1;height:auto;max-height:none}
.app-frame[data-task-position="right"][data-task-state="open"] .task-resize{position:absolute;left:0;top:0;width:5px;height:100%;cursor:ew-resize;z-index:1}
.app-shell .task-panel[data-state="collapsed"] .task-drawer{display:none}
.task-state-dot{display:inline-block;width:6px;height:6px;margin-right:8px;border-radius:50%;background:var(--text-2);vertical-align:.1em}
.task-entry.running .task-state-dot,.task-entry.queued .task-state-dot,.task-entry.retrying .task-state-dot{background:var(--accent-text)}
.task-entry.done .task-state-dot{background:var(--success)}
.task-entry.error .task-state-dot{background:var(--warning)}
.task-block{margin-top:8px}
.task-block b{font-size:13px;font-weight:500;color:var(--text-2)}
.task-block pre{margin:5px 0;padding:8px;max-height:180px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--bg);border:1px solid var(--line);border-radius:6px;font:13px/1.5 var(--font-mono)}
.task-history{padding-left:18px;color:var(--text-2);font-size:13px}
.task-actions{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.task-action{display:inline-flex;align-items:center;min-height:32px;padding:0 10px;border:1px solid var(--line-2);border-radius:8px;background:var(--surface);color:var(--text);text-decoration:none;font:500 14px/1.2 var(--font-ui);cursor:pointer;transition:background-color .15s,border-color .15s}
.task-action:hover{background:var(--surface-3);border-color:var(--text-2)}
.task-action:disabled{color:var(--text-dis);cursor:wait}

/* ---------- юридический подвал: только у гостевых страниц (у кабинета ссылки — в меню аккаунта) ---------- */
.legal-footer{width:min(1100px,92vw);margin:0 auto;padding:20px 0 28px;color:var(--text-2);font-size:13px;line-height:1.55;text-align:center}
.legal-footer p{margin:0}
.legal-footer a{color:var(--text-2);text-decoration:underline;text-decoration-color:var(--line-2);text-underline-offset:3px}
.legal-footer a:hover{color:var(--text);text-decoration-color:currentColor}
.legal-footer .legal-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 16px;margin-bottom:8px}

@media(max-width:900px){
 .app-frame[data-task-position="right"][data-task-state="open"]{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"workspace" "tasks"}
 .app-frame[data-task-position="right"][data-task-state="open"] .task-panel{border-left:0}
 .app-frame[data-task-position="right"][data-task-state="open"] .task-dock-shell{height:auto;border-top:1px solid var(--line)}
 .app-frame[data-task-position="right"][data-task-state="open"] .task-drawer{flex:none;height:var(--task-drawer-height,220px);max-height:40dvh}
 .app-frame[data-task-position="right"][data-task-state="open"] .task-resize{position:relative;inset:auto;width:100%;height:5px;cursor:ns-resize}
 .app-shell .task-window-actions [data-task-place]{display:none}
 .app-shell .tg-chat-list{display:none}
}
@media(max-width:720px){
 .app-shell .app-frame>.layout{flex-direction:column}
 .app-shell .content{order:1;flex:1;min-height:0;padding-inline:8px}
 /* нижние вкладки — самый нижний элемент экрана, как в Telegram: строка задач над ними, подвал — в меню аккаунта */
 .app-shell .sidebar-wrap{order:2;position:fixed;left:0;right:0;bottom:0;z-index:50;width:auto;height:auto;min-height:0;flex:none;padding-bottom:env(safe-area-inset-bottom);background:var(--surface)}
 .app-shell:not(.quick-start-mode):not(.chat-focus) .app-frame{padding-bottom:calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--consent-h,0px))}
 /* плашка cookie на телефоне — лист над вкладками: содержимое сдвигается на её высоту (--consent-h ставит privacy-consent.js) */
 .app-shell.quick-start-mode .app-frame,.app-shell.chat-focus .app-frame{padding-bottom:var(--consent-h,0px)}
 .app-shell .sidebar{width:100%;height:58px;min-height:58px;transition:none}
 .app-shell .content>main.container{scrollbar-gutter:auto}
 .app-shell .content>main:has(>.tg-chat-shell){padding-bottom:4px}
 /* шапка телефона: знак, баланс, «Задачи» значком, тема, язык, меню */
 .app-shell .header{min-height:52px;margin:0 -8px;padding:6px 8px;gap:8px}
 .shell-brand{display:flex}
 .shell-brand__name{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
 .app-shell.quick-start-mode .shell-brand__name{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}
 .shell-tools{gap:4px}
 .balance-chip,.shell-tasks-button{min-height:40px;padding:0 10px;gap:6px}
 .shell-tasks-button{min-width:40px}
 .shell-icon-button{width:40px;min-width:40px}
 .shell-tasks-button .shell-tasks-label{display:none}
 .mobile-account .acct-ic-menu{display:block}
 .mobile-account .acct-ic-user{display:none}
 /* fixed: .content обрезает (overflow:hidden) всё, что ниже него, — длинное меню уходило под строку задач */
 .mobile-account-menu{position:fixed;top:calc(58px + env(safe-area-inset-top));right:8px;left:auto;width:min(296px,calc(100vw - 16px));max-height:calc(100dvh - 66px - var(--tab-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain}
 /* нижние вкладки */
 .app-shell .sidebar{border-right:0;border-top:1px solid var(--line);background:var(--surface)}
 .sidebar .snav{border-radius:10px;font-size:11.5px;font-weight:500;color:var(--text-2)}
 .sidebar .snav .mobile-label{overflow:hidden;text-overflow:ellipsis}
 .app-shell .sidebar .snav{padding-inline:1px}
 /* английские подписи — тем же размером 11.5px (буквы не мельчим); «Диалоги» во вкладке — «Chats» (перевод — интегратор) */
 .sidebar .snav .ico{width:44px;height:26px;border-radius:var(--r-pill);transition:background-color .15s}
 .sidebar .snav .ic{width:20px;height:20px}
 .sidebar .snav:hover{background:var(--clear)}
 .sidebar .snav.active,.sidebar .snav[aria-current="page"]{background:var(--clear);box-shadow:none;color:var(--accent-text);font-weight:600}
 .sidebar .snav.active .ico,.sidebar .snav[aria-current="page"] .ico{background:var(--accent-soft)}
 /* гостевые страницы: ссылки подвала — зона нажатия 40px */
 .legal-footer .legal-links a,.legal-footer .legal-links .ag-privacy-settings{display:inline-flex;align-items:center;min-height:40px}
}
@media(max-width:520px){
 .app-shell .task-statusbar{height:44px}
 .app-shell .task-status-main{padding-inline:10px;gap:7px}.app-shell .task-drawer{padding:7px;max-height:38dvh}
 .app-shell .task-window-actions button{width:44px}.app-shell .task-summary-status{max-width:34%}
 .balance-chip .balance-ic{display:none}
 /* быстрый старт на узком телефоне: название рядом со знаком сжимало чип баланса до «0,…» — остаётся знак */
 .app-shell.quick-start-mode .shell-brand__name{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
@media(max-width:400px){
 .balance-chip .balance-plus{display:none}
}
@media(prefers-reduced-motion:reduce){
 .app-shell .task-state-dot{animation:none!important}
 .snav,.sidebar-toggle .ic,.sidebar .snav .ico,.balance-chip,.shell-tasks-button{transition:none}
}
@media(max-width:1280px){.app-frame[data-task-position="right"][data-task-state="open"] .tg-chat-shell{grid-template-columns:minmax(0,1fr)}.app-frame[data-task-position="right"][data-task-state="open"] .tg-chat-list{display:none}}


/* ---------- раскладка во всю высоту (UX-SPEC §3.9): {% set layout_full = true %} → body.layout-full ----------
   main.container без подложки, полей и своей прокрутки; прокручиваются колонки страницы. Корневой блок страницы —
   класс .layout-fill (растягивается на всю высоту). Нижние вкладки телефона остаются (в отличие от chat-focus). */
.app-shell.layout-full .content{padding-inline:0}
.app-shell.layout-full .header{margin-inline:0}
.app-shell.layout-full .content>main.container{display:flex;flex-direction:column;max-width:none;width:100%;height:100%;margin:0;padding:0;border-radius:0;background:none;overflow:hidden}
.app-shell.layout-full .content>main.container>.layout-fill{flex:1 1 auto;min-height:0}
@media(max-width:720px){
 .app-shell.layout-full .content{padding-inline:0}
 .app-shell.layout-full .header{margin-inline:0}
 body.app-shell.layout-full .content>main.container{padding:0;scroll-padding-bottom:0}
}

/* ---------- плашка cookie в кабинете (UX-SPEC §2.8): компьютер — карточка 360px в левом нижнем углу области
   содержимого, не поверх меню; телефон — лист над вкладками, содержимое сдвигается (--consent-h). Гостевые
   страницы и лендинг — как раньше (стили в privacy-consent.js). ---------- */
/* ниже меню аккаунта (100), листов-выпадашек телефона (200), тостов и модальных окон; выше вкладок (50) */
body.app-shell .ag-privacy{z-index:90}
@media(min-width:721px){
 /* над полосой задач и раскрытым списком задач (--task-dock-h ставит taskpanel.js; закреплённая справа — 0) */
 body.app-shell .ag-privacy{left:calc(252px + 16px);right:auto;bottom:calc(16px + var(--task-dock-h,0px));width:360px;max-width:calc(100vw - 252px - 32px);transform:none;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px 12px 12px 14px}
 body.app-shell:has(.sidebar.collapsed) .ag-privacy{left:calc(64px + 16px);max-width:calc(100vw - 64px - 32px)}
 body.app-shell.quick-start-mode .ag-privacy{left:16px;max-width:calc(100vw - 32px)}
 body.app-shell .ag-privacy .ag-privacy-actions{display:grid;grid-template-columns:1fr 1fr}
 body.app-shell .ag-privacy button{min-width:0;white-space:normal}
 /* пока карточка видна, подложка всё равно идёт до низа экрана (полоса во всю ширину под карточку 360px пустовала),
    а низ страницы получает запас на её высоту (--consent-space ставит privacy-consent.js): последние строки и
    список «Разделов» прокручиваются выше карточки; липкая .action-bar встаёт над ней */
 html[data-consent-open] body.app-shell .content>main.container{padding-bottom:calc(var(--main-pad-bottom,18px) + var(--consent-space,0px))}
 html[data-consent-open] body.app-shell main.container .action-bar{bottom:calc(var(--consent-space,0px) - var(--main-pad-bottom,18px))}
 /* тосты — над полосой задач и карточкой cookie */
 body.app-shell .toast-region{bottom:calc(24px + var(--task-dock-h,0px) + var(--consent-space,0px))}
}
@media(max-width:720px){
 body.app-shell .ag-privacy{left:0;right:0;bottom:calc(var(--tab-h) + env(safe-area-inset-bottom));width:auto;transform:none;border-width:1px 0 0;border-radius:var(--r-card) var(--r-card) 0 0;box-shadow:none;padding:10px 12px}
 body.app-shell.quick-start-mode .ag-privacy,body.app-shell.chat-focus .ag-privacy{bottom:0;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
}
