/* Autoposter: кабинет, бизнес-кабинет, админка и поддержка в дизайн-коде 1.1 (xaos.agency).
   Подключается последним, после cabinet.css и v4.css, и переводит их на токены из /css/xaos-tokens.css:
   графит с холодным оттенком, один оранжевый на экран, Roboto Flex, статусы точкой и словом, линия вместо тени. */

/* ---------- 1. Роли цвета для старых имён переменных ---------- */
:root, html[data-theme="dark"] {
  --frame: var(--ink-1000); --bg: var(--ink-950); --bg-2: var(--ink-950);
  --surface: var(--ink-900); --surface-2: var(--ink-850); --surface-3: var(--ink-800);
  --tile: var(--ink-850); --tile-2: var(--ink-800); --float: var(--ink-800);
  --line: rgb(255 255 255 / .1); --line-2: rgb(255 255 255 / .22); --line-3: rgb(255 255 255 / .34);
  --text: var(--ink-50); --muted: var(--ink-300); --dim: var(--ink-400); --fg-rgb: 244 244 246;
  --text-2: var(--ink-300); --text-3: var(--ink-400);
  --inv: var(--white); --on-inv: var(--ink-950); --on-inv-rgb: 10 10 11;
  --btn: var(--white); --btn-ink: var(--ink-950);
  /* старый «акцент» кабинета становится главным белым: оранжевый остаётся только там, где он задан явно */
  --accent: var(--ink-50); --accent-hover: var(--white); --accent-2: var(--ink-50); --accent-ink: var(--ink-950);
  --accent-text: var(--ink-50); --accent-soft: rgb(255 255 255 / .07);
  --ok: var(--ok-base); --ok-text: var(--ok-base); --ok-soft: rgb(61 255 140 / .12);
  --wait: var(--ink-400); --wait-soft: rgb(255 255 255 / .07);
  --err: var(--err-base); --err-text: var(--err-base); --err-soft: rgb(255 106 92 / .13);
  --info: var(--ink-300); --info-soft: rgb(255 255 255 / .07);
  --sh-float: inset 0 0 0 1px var(--line); --sh-pop: inset 0 0 0 1px var(--line), var(--shadow-pop);
  --shade: rgb(5 5 6 / .7);
  --f-display: var(--font); --f-ui: var(--font);
  --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r: 18px; --r-lg: 22px; --r-xl: 32px;
  --ease: var(--ease-out); --t-fast: 160ms; --t: 320ms; --t-slow: 640ms;
  --gap: 16px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --frame: var(--ink-100); --bg: var(--ink-50); --bg-2: var(--ink-50);
  --surface: var(--white); --surface-2: var(--ink-100); --surface-3: var(--ink-200);
  --tile: var(--ink-50); --tile-2: var(--ink-100); --float: var(--white);
  --line: rgb(0 0 0 / .1); --line-2: rgb(0 0 0 / .2); --line-3: rgb(0 0 0 / .32);
  --text: var(--ink-950); --muted: var(--ink-600); --dim: var(--ink-500); --fg-rgb: 10 10 11;
  --text-2: var(--ink-600); --text-3: var(--ink-500);
  --inv: var(--ink-950); --on-inv: var(--white); --on-inv-rgb: 255 255 255;
  --btn: var(--ink-950); --btn-ink: var(--white);
  --accent: var(--ink-950); --accent-hover: var(--ink-800); --accent-2: var(--ink-950); --accent-ink: var(--white); --accent-text: var(--ink-950); --accent-soft: rgb(0 0 0 / .05);
  --ok: var(--ok-ink); --ok-text: var(--ok-ink); --ok-soft: rgb(8 122 60 / .1);
  --wait: var(--ink-500); --wait-soft: rgb(0 0 0 / .05);
  --err: var(--err-ink); --err-text: var(--err-ink); --err-soft: rgb(201 52 42 / .1);
  --info: var(--ink-600); --info-soft: rgb(0 0 0 / .05);
  --sh-float: inset 0 0 0 1px var(--line), 0 1rem 2rem -1.25rem rgb(20 20 30 / .25);
  --sh-pop: inset 0 0 0 1px var(--line), 0 1.5rem 3rem -1rem rgb(20 20 30 / .3);
  --shade: rgb(10 10 11 / .35);
  color-scheme: light;
}

/* ---------- 2. Шрифт и заголовки ---------- */
html, body { font-family: var(--font); }
body { font-size: 15px; line-height: 1.5; font-variant-numeric: normal; }
button, input, textarea, select { font-family: var(--font); }
.num, .mono, time, .num * { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
::selection { background: var(--orange); color: var(--ink-950); }
b, strong { font-weight: 600; }

.top h1, .invite-copy h1, .plans-head h2, .section-head h2, .empty-hero h2, .ref-hero h2, .welcome h2, .onair h2 {
  font-family: var(--font); font-weight: 620; font-stretch: var(--wide); letter-spacing: -.035em; line-height: 1.08; text-wrap: balance;
}
.top h1 { font-size: 28px; }
.panel h2, .panel-head h2, .tariff h3, .cstep h2, .user-card h2, .side-card h2, .invite-card h2, .chat-head h2, .slot-panel h2, .block-title, .cal-nav h2, .plan-title, .empty-state h3, .panel .empty-state h3 {
  font-family: var(--font); font-size: 17px; font-weight: 600; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.25;
}
.cal-nav h2, .plan-title { font-size: 20px; }
.price, .kpi b, .tile-stat b, .promo-code, .onair-count b, .stat b, .ref-stat b, .quota b {
  font-family: var(--font); font-weight: 500; font-stretch: 60%; letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.tile-stat b, .kpi b { font-size: 36px; line-height: 1; }
.fine, .top-sub, .panel-head .fine { color: var(--muted); }
.top-sub { font-size: 15px; margin-top: 4px; }
.nav-label, th, .field, .fine { font-family: var(--font); }

/* ---------- 3. Кнопки: пилюли, одна оранжевая на экран ---------- */
.btn, .ghost, .mini-btn, .suggest, .tabs button { font-family: var(--font); font-weight: 560; letter-spacing: 0; border-radius: var(--r-pill); }
.btn, .ghost { min-height: 44px; padding: 0 20px; font-size: 15px; gap: 8px; }
.slim, .ghost.slim, .btn.slim, .mini-btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn { background: var(--btn); color: var(--btn-ink); border-color: transparent; transition: background-color var(--t-base) var(--ease-soft), color var(--t-base) var(--ease-soft), box-shadow var(--t-base) var(--ease-soft), transform var(--t-fast) var(--ease-out), opacity var(--t-fast); }
.btn:hover { background: color-mix(in oklab, var(--btn) 86%, var(--btn-ink)); opacity: 1; box-shadow: none; }
.btn:active, .ghost:active, .mini-btn:active, .chip:active { transform: scale(.97); }
.btn:disabled, .btn[disabled], .ghost:disabled { opacity: .38; }
.btn.is-accent, .tariff.featured .btn, .inv .btn { background: var(--orange); color: var(--ink-950); }
.btn.is-accent:hover, .tariff.featured .btn:hover, .inv .btn:hover { background: var(--orange-hi); }
.btn.is-danger, .btn.is-danger:hover { background: var(--err); color: var(--ink-950); }
html[data-theme="light"] .btn.is-danger { color: var(--white); }
.ghost, .mini-btn, .suggest { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); border-color: transparent; }
.ghost:hover, .mini-btn:hover, .suggest:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px transparent; }
.ghost.on, .ghost.on:hover { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.ghost.danger:hover, .rowmenu-item.is-danger:hover { color: var(--err); background: var(--err-soft); box-shadow: none; }
.icon-btn, .ghost.icon-btn, .top .icon-btn, .theme-btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--muted); }
.icon-btn:hover, .top .icon-btn:hover, .theme-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-only { box-shadow: none; }
.link-btn { color: var(--muted); }
.link-btn:hover { color: var(--text); }
.chip, .suggest { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.chip:hover { color: var(--text); background: var(--surface-3); box-shadow: none; }
.chip.on, .chip.on:hover { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.btn.is-busy, .ghost.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after, .ghost.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid var(--btn-ink); border-right-color: transparent; animation: xa-spin .8s linear infinite; }
.ghost.is-busy::after { border-color: var(--text); border-right-color: transparent; }
@keyframes xa-spin { to { transform: rotate(360deg); } }

/* сегменты и вкладки: равные колонки, выбранный белый на surface-3 */
.seg, .tabs { padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.seg button, .tabs button { min-height: 36px; border-radius: var(--r-pill); color: var(--muted); font-weight: 560; justify-content: center; }
.seg button:hover, .tabs button:hover { color: var(--text); background: transparent; }
.seg button.on, .tabs button.on { background: var(--btn); color: var(--btn-ink); box-shadow: none; }
.seg button.on em { color: inherit; }

/* переключатель: включённый белый на тёмном, графитовый на светлом */
.switch i { background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.switch input:checked + i { background: var(--btn); }
.switch input:checked + i::after { background: var(--btn-ink); }
input[type="checkbox"], input[type="radio"], input[type="range"], progress { accent-color: var(--text); }

/* ---------- 4. Поля ---------- */
.field { color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select, .filter-bar select, .billing-head input, .billing-head select,
.tool-row input, #ticket-search, .code-field input, .promo-line input, .search-field input, .tag-box,
.mini-select, .biz-table select, .biz-access-row select, .biz-days input, .ch-row input, .cmt-form textarea, .land-field textarea, .plan-edit textarea, .plan-edit input, .link-row input,
.plan-slots select, .tpl-slot select, .tpl-slot input, .slug-field, .pm-token {
  min-height: 44px; border: 0; border-radius: var(--r-pill); background-color: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; font-family: var(--font);
  transition: box-shadow var(--t-base) var(--ease-soft), background-color var(--t-base) var(--ease-soft);
}
html[data-theme="light"] :is(.field input, .field textarea, .field select, .search-field input, #ticket-search) { background-color: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); }
.tag-box input, .slug-field input { box-shadow: none; background: transparent; min-height: 0; }
:is(.field input, .field textarea, .field select, .filter-bar select, .billing-head input, .billing-head select, .tool-row input, #ticket-search, .code-field input, .promo-line input, .search-field input,
.mini-select, .biz-table select, .ch-row input, .cmt-form textarea, .land-field textarea, .plan-edit textarea, .plan-edit input, .link-row input, .plan-slots select, .tpl-slot select, .tpl-slot input):hover { box-shadow: inset 0 0 0 1px var(--line-2); }
:is(.field input, .field textarea, .field select, .filter-bar select, .billing-head input, .billing-head select, .tool-row input, #ticket-search, .code-field input, .promo-line input, .search-field input,
.mini-select, .biz-table select, .ch-row input, .cmt-form textarea, .land-field textarea, .plan-edit textarea, .plan-edit input, .link-row input, .plan-slots select, .tpl-slot select, .tpl-slot input):focus,
.tag-box:focus-within, .slug-field:focus-within { outline: 0; border-color: transparent; box-shadow: inset 0 0 0 1.5px var(--text); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field.has-err input { box-shadow: inset 0 0 0 1.5px var(--err); }
::placeholder { color: var(--dim); opacity: 1; }

/* ---------- 5. Поверхности: линия вместо тени ---------- */
.panel, .card, .kpi, .tile-stat, .tariff, .channel, .video, .stat, .plan, .perk, .ref-stat, .stat-row article, .quota article,
.plat-card, .post-card, .project-card, .user-row, .ticket, .land-field, .type-card, .pending-topup, .plat-status, button.mine-more, .media-tile,
.acc-card, .adm-post, .invite-card, .pay-box, .staff-card, .upload-sheet, .approval-card, .payout-card, .tpl-card, .voice-card, .hook-card, .ai-panel {
  background: var(--surface); border-color: transparent; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line);
}
.panel { padding: 22px 24px 24px; }
.panel :is(.card, .kpi, .tile-stat, .tariff, .channel, .video, .stat, .plan, .perk, .ref-stat, .plat-card, .post-card, .project-card, .user-row, .ticket, .land-field, .type-card, .pending-topup, .plat-status, .media-tile, .acc-card, .adm-post, .staff-card, .approval-card, .payout-card, .tpl-card, .voice-card, .hook-card, .ai-panel, .pay-box),
.panel .stat-row article, .panel .quota article { background: var(--surface-2); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.panel-head { gap: 16px; margin-bottom: 18px; }
.panel-head .fine { margin-top: 4px; font-size: 13px; }
.tile-stat, .kpi { padding: 20px 22px; }
.note-panel, .info-note, .system-note { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-md); }
.pill { border-radius: var(--r-pill); background: var(--surface-3); color: var(--muted); font-weight: 560; }
.pill.role-admin { background: var(--btn); color: var(--btn-ink); }
/* главный администратор отличается насыщенностью, а не оранжевым: оранжевый на экране один */
.pill.role-owner { background: var(--btn); color: var(--btn-ink); font-weight: 680; }
.pill.plan-paid { background: var(--accent-soft); color: var(--accent-2); }
.tag { background: var(--surface-3); }
.meter { background: var(--surface-3); border-radius: 1rem; }
.meter i { background: var(--text); }
.empty-line, .empty-panel, .empty-dest, .stage-preview.is-empty, .dropzone { border-color: var(--line-2); border-radius: var(--r-md); }
.illus, .panel .illus, .empty-state.is-row .illus { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.thumb, .panel .thumb, .panel .thumb.is-file { background: var(--surface-3); }
.thumb.is-xl { border-radius: var(--r-md); }
.thumb > em, .wk-shot time { background: rgb(5 5 6 / .72); color: var(--ink-50); font-weight: 560; }
table { font-variant-numeric: tabular-nums; }
th { color: var(--dim); font-weight: 500; font-size: 12.5px; border-bottom-color: var(--line); }
td { border-bottom-color: var(--line); }
tbody tr:hover td { background: rgb(var(--fg-rgb) / .03); }

/* статусы: точка и слово, подложка 12–13% */
.pill.ok, .pill.is-ok, .pill.done, .st-done, .badge-ok { color: var(--ok); background: var(--ok-soft); }
.pill.wait, .pill.is-wait { color: var(--muted); background: var(--wait-soft); }
.pill.wait::before, .pill.is-wait::before { background: var(--dim) !important; }
.onair-label .pill.wait { color: var(--orange); background: rgb(255 90 38 / .13); }
.onair-label .pill.wait::before { background: currentColor !important; }
html[data-theme="light"] .onair-label .pill.wait { color: var(--orange-ink); background: rgb(194 60 16 / .1); }
.pill.bad, .pill.is-bad, .pill.err { color: var(--err); background: var(--err-soft); }
.pill.ok, .pill.wait, .pill.bad, .pill.is-ok, .pill.is-wait, .pill.is-bad, .pill.err, .pill.done { display: inline-flex; align-items: center; gap: 6px; }
.pill.ok::before, .pill.wait::before, .pill.bad::before, .pill.is-ok::before, .pill.is-wait::before, .pill.is-bad::before, .pill.err::before, .pill.done::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- 6. Каркас: тёмная рама, лист со скруглением 32 ---------- */
html, body { background: var(--frame); }
.shell { grid-template-columns: 256px minmax(0, 1fr); }
.shell.slim { grid-template-columns: 76px minmax(0, 1fr); }
.side { background: transparent; }
.side-top { gap: 16px; padding: 20px 12px 8px; }
.side .brand { padding: 0 8px; height: 36px; gap: 9px; font: 600 21px/1 var(--font); letter-spacing: -.045em; color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 25%; box-shadow: none; }
.new-post { min-height: 48px; border-radius: var(--r-pill); background: var(--orange); color: var(--ink-950); font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: 0; box-shadow: none; }
.new-post:hover { background: var(--orange-hi); box-shadow: none; }
.new-post:active { transform: scale(.97); }
.new-post svg { stroke-width: 2.1; }
.side-nav { padding: 4px 12px 18px; gap: 0; }
.nav-label { margin: 12px 12px 4px; font-size: 12px; color: var(--dim); font-weight: 400; }
.side-nav .nav-label:first-child { margin-top: 2px; }
.side .nav, .side a:not(.brand):not(.studio-credit), .side-foot button.nav { gap: 12px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); color: var(--muted); font-size: 15px; font-weight: 400; }
.side .nav svg, .side a:not(.brand):not(.studio-credit) svg { width: 18px; height: 18px; stroke-width: 1.75; color: var(--dim); transition: color var(--t-fast) var(--ease-soft); }
.side .nav:hover, .side a:not(.brand):not(.studio-credit):hover { background: var(--surface-2); color: var(--text); }
.side .nav:hover svg { color: var(--muted); }
.side .nav.on, .side a.on:not(.brand) { background: var(--surface-3); color: var(--text); font-weight: 560; box-shadow: none; }
.side .nav.on svg { color: var(--text); }
.side .dot, .nav .dot { background: var(--err); }
.side-foot { padding: 4px 12px 12px; }
.plan-card { border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px 16px; }
.plan-card:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.plan-card .meter { height: 6px; }
.plan-card .meter i { background: var(--text); }
.side-foot > a.studio-credit, .studio-credit { color: var(--dim); font-size: 12px; }

.main { margin: 8px 8px 8px 0; min-height: calc(100vh - 16px); min-height: calc(100dvh - 16px); padding: 28px 32px 48px; border-radius: var(--r-xl); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.top { margin-bottom: 24px; gap: 24px; }
.top, #screen { max-width: 1760px; margin-inline: auto; }
.top { margin-bottom: 24px; }
.search-btn { height: 44px; min-width: 240px; padding: 0 8px 0 16px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--dim); font-size: 15px; }
.search-btn:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.search-btn kbd, kbd { border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--dim); font-family: var(--font); font-weight: 500; }
.account, .who-chip { height: 44px; background: transparent; box-shadow: none; }
.account:hover { background: var(--surface-2); }
.avatar { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); font-weight: 620; }
.account-balance { background: var(--surface-3); box-shadow: none; font-weight: 580; font-size: 13px; }
.admin-link { height: 44px; padding: 0 18px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-weight: 560; }
.admin-link:hover { background: var(--surface-3); box-shadow: none; }
#bell-dot, .top .dot { background: var(--orange); box-shadow: 0 0 0 2px var(--bg); }
.scrim { background: var(--shade); }

/* ---------- 7. Окна, меню, уведомления ---------- */
.modal { background: var(--shade); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal > .panel { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-pop); }
html[data-theme="light"] .modal > .panel { background: var(--white); --tile: var(--ink-50); --surface: var(--white); }
.rowmenu-pop, .cmd-pop, .menu-pop { border-radius: var(--r-md); background: var(--surface-3); box-shadow: var(--sh-pop); }
html[data-theme="light"] .rowmenu-pop { background: var(--white); }
.rowmenu-item { font-family: var(--font); border-radius: var(--r-sm); }
.cmd-list button { border-radius: var(--r-sm); }
.cmd-list button.on { background: var(--surface-3); }
.toast { border-radius: var(--r-md); padding: 14px 18px; background: var(--ink-800); color: var(--ink-50); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), var(--shadow-float); font-weight: 500; }
.save-bar { background: var(--inv); color: var(--on-inv); border-radius: var(--r-pill); box-shadow: var(--shadow-float); }
.save-bar .btn { background: var(--orange); color: var(--ink-950); }

/* ---------- 8. Сегодня ---------- */
.page { gap: 16px; }
.reauth-banner { align-items: center; gap: 16px; padding: 14px 14px 14px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--err) 45%, transparent); }
.reauth-banner b { font-size: 15px; font-weight: 600; }
.reauth-banner b::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 2px 0; border-radius: 50%; background: var(--err); }
.reauth-banner p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.reauth-banner .btn, .reauth-banner .btn:hover { background: var(--btn); color: var(--btn-ink); opacity: 1; }

/* эфир: карточка с обложкой, текстом и тёмным «экраном» отсчёта */
.onair, .welcome {
  --text: var(--ink-50); --muted: var(--ink-300); --dim: var(--ink-400); --fg-rgb: 244 244 246;
  --line: rgb(255 255 255 / .1); --line-2: rgb(255 255 255 / .22); --float: var(--ink-800);
  display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(256px, 336px); gap: 24px; align-items: stretch;
  min-height: 288px; padding: 8px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text);
}
html[data-theme="light"] .onair, html[data-theme="light"] .welcome {
  --text: var(--ink-950); --muted: var(--ink-600); --dim: var(--ink-500); --fg-rgb: 10 10 11; --line: rgb(0 0 0 / .1); --line-2: rgb(0 0 0 / .2); --float: var(--white);
  background: var(--white);
}
.onair-canvas, .onair::before, .onair::after { display: none !important; }
.onair-frame { display: grid; min-height: 100%; }
.onair-frame .thumb.is-xl { width: 100%; height: 100%; min-height: 240px; aspect-ratio: auto; border-radius: var(--r-md); background: var(--surface-3); }
.onair-frame .thumb.is-xl img, .onair-frame .thumb.is-xl video { width: 100%; height: 100%; object-fit: cover; }
.onair-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 0 16px 4px; min-width: 0; }
.onair-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.onair-label .pill { height: 24px; padding: 0 10px; font-size: 12px; }
.onair-label .pill:not(.wait) { color: var(--muted); }
.onair h2, .welcome h2 { font-size: 24px; font-weight: 620; font-stretch: 130%; letter-spacing: -.03em; line-height: 1.15; }
.onair-text, .welcome-body > p { color: var(--muted); font-size: 13px; max-width: 40rem; }
.onair-dests { display: flex; flex-wrap: wrap; gap: 6px; }
.onair-dests li { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px 0 6px; border-radius: var(--r-pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--muted); }
html[data-theme="light"] .onair-dests li { background: var(--ink-50); }
.onair-dests li > svg, .onair-dests li .logo { width: 20px; height: 20px; flex: none; }
.onair-dests li b { font-weight: 400; font-size: 12px; color: var(--muted); }
.onair-dests li small { display: none; }
.onair-dests li.is-bad { color: var(--err); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--err) 45%, transparent); }
.onair-dests li.is-bad b { color: var(--err); }
.onair-dests li.is-bad::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.air-warn { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.air-warn svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--err); stroke-width: 1.75; stroke-linecap: round; }
.air-warn b { color: var(--text); font-weight: 580; }
.onair-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.onair-acts .btn, .onair-acts .ghost { min-height: 44px; }

.onair-side {
  --text: var(--ink-50); --muted: var(--ink-300); --dim: var(--ink-400);
  position: relative; isolation: isolate; display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0; min-height: 240px; padding: 16px; overflow: hidden;
  border-radius: var(--r-md); background: radial-gradient(70% 70% at 50% 46%, var(--ink-800), var(--ink-900) 70%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); color: var(--text); text-align: center;
}
.onair-side::before { display: none; content: none; }
.onair-side canvas.xa-vortex { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.xa-mark { position: relative; width: 104px; aspect-ratio: 1276 / 1400; margin-bottom: 4px; }
.xa-mark img { position: absolute; inset: 0; width: 100%; height: 100%; }
.xa-mark .xa-dot { transform-origin: 65.8% 35.5%; }
.xa-mark.is-pulse .xa-dot { animation: xa-hop .9s var(--ease-out); }
@keyframes xa-hop { 30% { transform: translateY(-9%) scale(1.06); } 60% { transform: translateY(1%); } }
.onair-count { display: grid; justify-items: center; gap: 2px; padding: 8px 16px; border-radius: var(--r-md); }
.onair-count small { font-size: 12px; color: var(--dim); }
.onair-count b.is-missing { color: var(--dim); }
.onair-count b { font-size: 46px; font-weight: 480; font-stretch: 38%; letter-spacing: -.01em; line-height: 1; color: var(--text); }
.onair-count span { font-size: 12px; color: var(--muted); }
.onair-side .ghost { margin-top: 8px; min-height: 32px; padding: 0 14px; font-size: 13px; color: var(--muted); background: rgb(5 5 6 / .72); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .22); }
.onair-side .ghost:hover { color: var(--text); background: rgb(5 5 6 / .85); }
.onair-side .btn { background: var(--white); color: var(--ink-950); }
.onair.is-empty .onair-side { align-content: center; }

/* перекрывает эфир v4: без кольца, сетка из трёх колонок на любом ноутбуке */
html .onair:not(.is-empty), html:not([data-theme="light"]) :is(.onair, .welcome), html:not([data-theme="light"]) .onair:not(.is-empty) {
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr) minmax(256px, 336px); grid-template-rows: none; align-content: stretch; align-items: stretch; gap: 24px; padding: 8px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}
html[data-theme="light"] .onair:not(.is-empty) { background: var(--white); }
html .onair:not(.is-empty) .onair-frame, html .onair:not(.is-empty) .onair-body { grid-row: auto; align-self: stretch; }
html .onair:not(.is-empty) .onair-frame { grid-column: 1; }
html .onair:not(.is-empty) .onair-body { grid-column: 2; }
html .onair .onair-side, html .onair:not(.is-empty) .onair-side { display: grid; grid-column: 3; grid-template-columns: none; grid-auto-flow: row; justify-items: center; justify-content: center; align-content: center; text-align: center; }
html .onair-side::before, html .onair:not(.is-empty) .onair-side::before, html .onair-count::before, html .onair-count::after { content: none; display: none; }
html .onair-count { position: static; grid-column: auto; grid-row: auto; width: auto; aspect-ratio: auto; place-content: normal; justify-items: center; }
html .onair h2 { margin-top: 0; max-width: none; }
html .onair-dests { margin-top: 0; }
html .onair .btn { background: var(--btn); color: var(--btn-ink); }
html .onair .btn:hover { background: color-mix(in oklab, var(--btn) 86%, var(--btn-ink)); }
html .onair .ghost { background: transparent; color: var(--text); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--line-2); }
html .onair .ghost:hover { background: var(--surface-3); }
html .onair-side .ghost { background: rgb(5 5 6 / .72); color: var(--ink-300); }

/* неделя */
.week-panel .week-strip, .week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wk-day, .week-strip .wk-day { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 156px; padding: 12px 12px 10px; border: 0; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.wk-day.weekend { background: var(--surface-2); }
.wk-day.weekend .wk-head b { color: var(--dim); }
.wk-day.today { background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.wk-day.on { box-shadow: inset 0 0 0 1.5px var(--text); }
html[data-theme="light"] .wk-day { background: var(--ink-100); box-shadow: none; }
html[data-theme="light"] .wk-day.today { background: var(--ink-200); box-shadow: inset 0 0 0 1.5px var(--line-2); }
html[data-theme="light"] .wk-item.is-next, html[data-theme="light"] .wk-item:hover { background: var(--white); }
.wk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wk-head b { font-size: 13px; font-weight: 400; color: var(--muted); }
.wk-head b::first-letter { text-transform: uppercase; }
.wk-head span { font-size: 22px; font-weight: 500; font-stretch: 60%; line-height: 1; color: var(--text); letter-spacing: 0; }
.wk-day.today .wk-head span { color: var(--text); }
.wk-items { display: grid; gap: 4px; }
.wk-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; margin: 0 -4px; padding: 7px 8px 8px; border-radius: 10px; font-size: 12px; line-height: 1.35; color: var(--muted); text-align: left; transition: background-color var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft); }
.wk-item:hover { background: var(--surface); color: var(--text); }
.wk-item:hover .wk-title { color: var(--text); }
.wk-shot { display: contents; }
.wk-shot .thumb { display: none; }
.wk-shot time { grid-column: 1; grid-row: 1; position: static; padding: 0; background: none; border-radius: 0; font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.wk-item::after { content: ""; grid-column: 2; grid-row: 1; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.wk-item.st-ok::after, .wk-item.st-done::after { width: 12px; height: 12px; border-radius: 0; background: var(--ok); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.wk-item.st-bad::after, .wk-item.st-err::after { background: linear-gradient(90deg, var(--err) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--err); width: 8px; height: 8px; }
.wk-item.st-live::after, .wk-item.st-run::after { background: var(--orange); }
.wk-item.is-next, .wk-items .wk-item:first-child.st-wait.is-next { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.wk-item.is-next::after { background: var(--orange); }
.wk-title, .wk-item .wk-title { grid-column: 1 / -1; padding: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; font-weight: 400; color: inherit; }
.wk-item .lgrow { display: none; }
.wk-free { display: grid; place-items: center; flex: 1; min-height: 72px; border: 0; border-radius: 10px; font-size: 12px; color: var(--dim); }
.wk-more { padding: 0 8px; font-size: 12px; color: var(--dim); }
.wk-add { position: static; align-self: stretch; display: grid; place-items: center; width: auto; height: 28px; margin-top: auto; border-radius: 8px; background: transparent; color: var(--dim); opacity: 0; transition: opacity var(--t-fast) var(--ease-soft), background-color var(--t-fast) var(--ease-soft); }
.wk-add svg { width: 14px; height: 14px; }
.wk-day:hover .wk-add, .wk-add:focus-visible { opacity: 1; }
.wk-add:hover { background: var(--surface); color: var(--text); }
@media (hover: none) { .wk-add { opacity: 1; } }

/* требует внимания, последние 14 дней, тариф */
.cols-main { gap: 16px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.side-stack { gap: 16px; }
.att-row { gap: 6px 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.att-list .att-row:first-child { border-top: 0; padding-top: 4px; }
.att-row .thumb.is-sm { width: 52px; height: 52px; border-radius: var(--r-xs); }
.att-top b { font-size: 15px; font-weight: 580; }
.att-when { font-size: 12px; color: var(--dim); }
.att-main .fine, .err-line { font-size: 13px; color: var(--muted); }
.calm { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); }
.calm svg { width: 24px; height: 24px; stroke: var(--ok); }
.bar-col i, .col-stack i.is-ok, .chart-legend i.is-ok, .plat-bar i.is-ok { background: var(--ink-400); opacity: 1; }
.bar-col:hover i { background: var(--text); }
.col-stack i.is-part, .chart-legend i.is-part { background: repeating-linear-gradient(135deg, var(--err) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--err); }
.col-stack i.is-err, .chart-legend i.is-err, .plat-bar i.is-err { background: var(--err); }
.col-stack { border-radius: 3px 3px 1px 1px; }
.col::before, .col:hover::before, .col:focus::before { background: rgb(var(--fg-rgb) / .05); }
.col.is-weekend::before { background: transparent; }
.col.is-today .col-label { color: var(--text); font-weight: 600; }
.col-label, .chart-grid b { font-family: var(--font); color: var(--dim); }
.chart-grid span { border-top-color: rgb(var(--fg-rgb) / .07); }
.col[data-tip]::after { background: var(--surface-3); color: var(--muted); box-shadow: var(--sh-pop); border-radius: 10px; font-family: var(--font); }
.usage-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-size: 15px; }
.usage-row > span:first-child { color: var(--muted); }
.usage-row b { font-weight: 600; }
.usage-row .meter { grid-column: 1 / -1; height: 8px; }
.usage-row + .usage-row { margin-top: 18px; }
.checklist li { border-color: var(--line); }
.step-n { background: var(--surface-3); color: var(--text); }

/* ---------- 9. Тарифы: «Профи» на светлом листе, оранжевая только главная кнопка ---------- */
.tariff.featured { --text: var(--ink-950); --muted: var(--ink-600); --dim: var(--ink-500); --line: rgb(0 0 0 / .1); --line-2: rgb(0 0 0 / .24); --fg-rgb: 10 10 11;
  background: var(--ink-50); color: var(--ink-950); box-shadow: none; }
html[data-theme="light"] .tariff.featured { background: var(--ink-950); color: var(--ink-50); --text: var(--ink-50); --muted: var(--ink-300); --dim: var(--ink-400); --line: rgb(255 255 255 / .1); --line-2: rgb(255 255 255 / .22); --fg-rgb: 244 244 246; }

/* ---------- 11. Разделы кабинета ---------- */
/* меню прокручивается целиком, мини-тариф и выход стоят под пунктами */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
.side-nav { flex: none; overflow: visible; }
.side-foot { margin-top: auto; }

/* кнопки-значки в строках: без бокового отступа, иначе значок сжимается */
.note-btn.is-icon, .ghost.icon-only, .slim.icon-only, .ghost.slim.is-icon { padding: 0; }
.attach-btn, .chat-attach, .att-btn, .composer .ghost.icon-btn { padding: 0; }

/* поверхности без оранжевых подсветок: тон и линия */
.meter.is-open i { background: repeating-linear-gradient(90deg, var(--surface-3) 0 6px, var(--line-2) 6px 12px); }
.onair.is-empty { background: var(--surface); }
.dropzone.has-file, .space-opt.on, .coupon.on, .biz-row.on { border-color: var(--text); }
.coupon.on, .biz-row.on { background: var(--surface-2); }
.media-thumb, .thumb.is-file, .illus, .panel .illus { background: var(--surface-2); }
.il-day.is-on { border-color: var(--line-2); background: var(--surface-3); }
.top-video:first-child, .land-field.is-changed, .plan-edit.is-featured, .lead-card.is-new { border-color: var(--line-3); }
.join-hint, .sd-biz { background: var(--surface-2); border-color: var(--line); }
.biz-alert.is-wait { border-color: var(--line-2); background: var(--surface); }
.acc-card.is-reauth { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--err) 50%, transparent); }
.bubble.me { background: var(--surface-3); border-color: var(--line); }
html[data-theme="light"] .bubble.me { background: var(--ink-100); }
.dropzone > svg, .dropzone .dz-ic, label.dropzone svg { color: var(--text); stroke: currentColor; }

/* статусы: «в очереди» серой точкой, частично штриховкой цвета ошибки */
.cal-legend i.wait, .cal-dots i.wait { background: var(--dim); }
.kpi.is-ok > span::before { background: var(--ink-400); }
.kpi.is-wait > span::before { background: repeating-linear-gradient(135deg, var(--err) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--err); }
.kpi::after, .kpi.is-ok::after, .kpi.is-wait::after, .kpi.is-bad::after, .kpi:not(:has(.spark))::after { content: none; display: none; }
.plan-now::after, .plan-now::before { content: none; display: none; }

/* тепловые карты: шкала графита, самый частый час белый */
.punch > i[style], .cols-2 > .panel > .punch > i[style], .hours-strip i[style] { background: rgb(var(--fg-rgb) / calc(.08 + var(--v) * .86)); }

/* календарь: сегодня белым кружком, без оранжевой рамки */
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--line-2); border-color: transparent; }
.cal-day.today > .num { background: var(--btn); color: var(--btn-ink); }

/* команда: владелец тоном, приглашение словом */
.seat.is-owner { border-color: var(--line-2); background: var(--surface-3); box-shadow: none; }
.seat.is-owner .seat-face { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.seat.is-free em, .seat.is-free:hover em { color: var(--muted); }
.seat.is-free:hover { border-color: var(--line-3); background: var(--surface-2); }
.seat.is-free:hover .seat-face { color: var(--text); border-color: var(--line-3); }
.seat.is-pending .seat-face { border-color: var(--line-2); color: var(--muted); }
.space-chip .seat-face { background: var(--surface-3); border-color: var(--line-2); }

/* ссылка в профиль: выбранное оформление белой линией */
.theme-opt:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.theme-opt:has(input:focus-visible) { outline-color: var(--text); }

/* идеи: стикеры кремовый и графитовый */
.il-sticky.is-2 { background: var(--ink-200); color: var(--ink-950); box-shadow: 0 16px 30px -18px rgb(0 0 0 / .45); }
.il-coupon.is-2 { background: var(--ink-200); color: var(--ink-950); box-shadow: 0 16px 30px -18px rgb(0 0 0 / .45); }

/* тарифы: метка «Чаще выбирают» и скидка года как на лендинге */
.tariff-badge, .tariff.featured .tariff-badge { position: absolute; top: 20px; right: 20px; left: auto; margin: 0; padding: 4px 12px; border-radius: var(--r-pill); background: var(--orange); color: var(--ink-950); font-size: 13px; font-weight: 640; letter-spacing: 0; text-transform: none; box-shadow: none; }
#bill-year em, .seg button em.save, .bill-toggle em { font-style: normal; padding: 1px 8px; border-radius: var(--r-pill); background: var(--orange); color: var(--ink-950); font-size: 13px; font-weight: 640; }

/* пригласить друзей: графитовый экран без свечения, код белым */
html:not([data-theme="light"]) .ref-hero { background: var(--surface); border: 0; box-shadow: inset 0 0 0 1px var(--line); }
html[data-theme="light"] .ref-hero { background: var(--ink-950); border: 0; box-shadow: none; }
html[data-theme="light"] .ref-hero .btn { background: var(--white); color: var(--ink-950); }
html[data-theme="light"] .ref-hero .btn:hover { background: var(--ink-100); }
.ref-code-box, html[data-theme="light"] .ref-code-box, html:not([data-theme="light"]) .ref-hero .ref-code-box { --cut: rgb(255 255 255 / .24); background: var(--ink-850); border: 0; box-shadow: none; }
.ref-code-box .fine::before { background: var(--dim); }
.promo-code, .ref-code-box b.promo-code { color: var(--text); font-weight: 560; font-stretch: 38%; letter-spacing: .01em; }
.perk.is-on .perk-mark, html[data-theme="light"] .perk.is-on .perk-mark { display: inline-flex; align-items: center; gap: 6px; background: var(--ok-soft); color: var(--ok); }
.perk.is-on .perk-mark::before, .perk.is-done .perk-mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.perk.is-done .perk-mark { display: inline-flex; align-items: center; gap: 6px; }
.perk.is-locked .perk-mark, .perk-mark { background: var(--surface-3); color: var(--muted); }

/* окно новостей и метка новости */
.modal.news-modal > .panel { border-color: var(--line); background: var(--surface); }
.news-tag, html[data-theme="light"] .news-tag { border-color: var(--line-2); background: transparent; color: var(--text); }

/* ---------- 10. Узкие экраны ---------- */
@media (max-width: 1180px) {
  .main { padding: 24px 24px 40px; }
  .cols-main { grid-template-columns: minmax(0, 1fr); }
  html .onair:not(.is-empty), html:not([data-theme="light"]) .onair:not(.is-empty), html .onair, html:not([data-theme="light"]) .onair { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  html .onair .onair-side, html .onair:not(.is-empty) .onair-side { grid-column: 1 / -1; min-height: 200px; }
}
@media (max-width: 960px) {
  /* планшет и телефон: меню уезжает за край, внизу по центру плавающая «Новая публикация», как в эталоне */
  html, body { background: var(--bg); }
  .shell, .shell.slim { grid-template-columns: minmax(0, 1fr); }
  .side { background: var(--frame); }
  .main { margin: 0; border-radius: 0; box-shadow: none; min-height: 100vh; min-height: 100dvh; padding: 14px 16px calc(104px + env(safe-area-inset-bottom)); }
  .tabbar, html .tabbar { left: 50%; right: auto; bottom: calc(16px + env(safe-area-inset-bottom)); display: block; width: auto; padding: 0; border: 0; border-radius: var(--r-pill); background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; transform: translateX(-50%); pointer-events: none; }
  .tabbar button:not(.tab-new) { display: none; }
  .tabbar .tab-new, html .tabbar .tab-new { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; height: 52px; min-height: 52px; padding: 0 26px; border-radius: var(--r-pill); background: var(--orange); color: var(--ink-950); font: 600 16px/1 var(--font); white-space: nowrap; box-shadow: var(--shadow-float); transition: background-color var(--t-base) var(--ease-soft), transform var(--t-fast) var(--ease-out); }
  .tabbar .tab-new:hover { background: var(--orange-hi); }
  .tabbar .tab-new:active { transform: scale(.97); }
  html .tabbar .tab-new svg { display: block; flex: 0 0 20px; width: 20px; min-width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; color: inherit; }
  .tabbar .tab-new .tab-new-label { display: inline; font: inherit; color: inherit; }
  .week-panel .week-strip, .week-strip { grid-template-columns: repeat(7, minmax(132px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .wk-day { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .top { flex-wrap: nowrap; align-items: center; }
  .top-title { min-width: 0; flex: 1; }
  .top h1 { font-size: 20px; line-height: 1.1; overflow-wrap: anywhere; }
  .top-sub, html .top-sub { display: block; margin-top: 2px; font-size: 13px; line-height: 1.3; }
  /* на телефоне подпись под заголовком идёт отдельной строкой во всю ширину, иначе кнопки сжимают её в столбик */
  .top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; }
  .top-title { display: contents; }
  .top .menu-btn { grid-column: 1; grid-row: 1; }
  .top h1 { grid-column: 2; grid-row: 1; align-self: center; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .top-tools { grid-column: 3; grid-row: 1; }
  .top-sub, html .top-sub { grid-column: 2 / -1; grid-row: 2; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  /* эфир на телефоне: экран с отсчётом сверху, обложка скрыта, кнопки во всю ширину */
  html .onair:not(.is-empty) .onair-frame { display: none; }
  .onair-acts { flex-direction: column; align-items: stretch; }
  .onair-acts .btn, .onair-acts .ghost { width: 100%; justify-content: center; min-height: 48px; }
  .top-tools { gap: 0; flex: none; }
  .top .icon-btn, .top .ghost.icon-btn, .top .theme-btn, .top .ns-btn { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  .top .menu-btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px; flex: none; }
  html .onair:not(.is-empty), html:not([data-theme="light"]) .onair:not(.is-empty), html .onair, html:not([data-theme="light"]) :is(.onair, .welcome) { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  html .onair .onair-side, html .onair:not(.is-empty) .onair-side { grid-column: auto; order: -1; min-height: 0; grid-template-columns: auto 1fr; justify-items: start; justify-content: stretch; text-align: left; padding: 12px 16px; gap: 4px 14px; }
  html .onair-count { justify-items: start; }
  html .onair:not(.is-empty) .onair-frame, html .onair:not(.is-empty) .onair-body { grid-column: auto; }
  .main { margin: 0; border-radius: 0; padding: 16px 16px 112px; box-shadow: none; }
  .top { gap: 12px; margin-bottom: 16px; }
  .top h1 { font-size: 24px; }
  .search-btn { min-width: 0; }
  .onair, .welcome { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 8px; }
  .onair-side { order: -1; grid-column: auto; min-height: 0; grid-template-columns: auto 1fr; place-items: center start; padding: 12px 16px; gap: 12px; text-align: left; }
  .onair-side .xa-mark { width: 76px; margin: 0; grid-row: span 2; }
  .onair-count { justify-items: start; padding: 0; }
  .onair-count b { font-size: 38px; }
  .onair-side .ghost { display: none; }
  .onair-frame .thumb.is-xl { min-height: 180px; aspect-ratio: 16 / 9; }
  .onair-body { padding: 4px 8px 12px; }
  .onair h2 { font-size: 20px; }
  .panel { padding: 18px 16px 20px; }
  .wk-day { min-height: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .xa-mark.is-pulse .xa-dot { animation: none; }
}

/* ---------- Язык: RU | EN, как на сайте ---------- */
.lang-sw { display: inline-flex; flex: none; align-items: center; padding: 3px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); }
.lang-sw button { min-width: 0; min-height: 0; height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: transparent; box-shadow: none; color: var(--text-3); font: 560 var(--fs-micro)/1 var(--font); letter-spacing: .02em; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast); }
.lang-sw button:hover { color: var(--text); }
.lang-sw button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); cursor: default; }
.lang-sw button:focus-visible { outline: 2px solid var(--line-3); outline-offset: 1px; }
.lang-sw.is-side { display: none; }
.lang-sw.is-corner { position: fixed; top: 22px; right: 74px; z-index: 30; background: var(--surface); }
html.ap-notice-on .lang-sw.is-corner { top: calc(22px + var(--ap-notice-vis, 0px)); }
.lang-sw.is-solo { top: 16px; right: 16px; }
html.ap-notice-on .lang-sw.is-solo { top: calc(16px + var(--ap-notice-vis, 0px)); }
html[lang="en"] .is-copied::after { content: "Copied"; }
@media (max-width: 640px) {
  /* на телефоне в шапке остаётся одна круглая кнопка с другим языком */
  .top-tools .lang-sw { display: none; }
  .lang-sw.is-side { display: inline-flex; grid-column: 1 / -1; justify-self: start; margin: 2px 0 6px 4px; }
  .lang-sw.is-side button { height: 36px; padding: 0 14px; }
  .lang-sw.is-corner { top: 14px; right: 60px; }
  html.ap-notice-on .lang-sw.is-corner { top: calc(14px + var(--ap-notice-vis, 0px)); }
  .lang-sw.is-solo { top: 12px; right: 12px; }
  html.ap-notice-on .lang-sw.is-solo { top: calc(12px + var(--ap-notice-vis, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .lang-sw button { transition: none; } }

/* ---------- 12. v72: оранжевый в данных и в навигации ---------- */
/* графики: основной ряд оранжевый, остальные ряды графитом, ошибки красным */
.bar-col i, .col-stack i.is-ok, .chart-legend i.is-ok, .plat-bar i.is-ok, .rank-bar i { background: var(--orange); }
.rank li:nth-child(n+4) .rank-bar i { background: color-mix(in oklab, var(--orange) 55%, var(--surface-3)); }
.bar-col:hover i, .col:hover .col-stack i.is-ok, .col:focus-visible .col-stack i.is-ok { background: var(--orange-hi); }
.kpi.is-ok > span::before, .kpi.is-ok > p > span::before { background: var(--orange); }
.spark i.is-now, .kpi .spark i.is-now { background: var(--orange); }
.punch > i[style], .cols-2 > .panel > .punch > i[style], .hours-strip i[style] { background: rgb(255 90 38 / calc(.12 + var(--v) * .88)); }
/* меню: значок открытого раздела, метка новых сообщений, аватар, счётчик тарифа */
.side .nav.on svg, .side a.on:not(.brand) svg { color: var(--orange); }
.side .dot, .nav .dot, #support-dot { background: var(--orange); color: var(--ink-950); }
.account .avatar, .top .avatar { background: var(--orange); color: var(--ink-950); box-shadow: none; }
.plan-card .meter i, .usage-row .meter i, .meter i { background: var(--orange); }
.switch input:checked + i { background: var(--orange); }
.switch input:checked + i::after { background: var(--ink-950); }
/* сегодня в календаре и в ленте недели */
.wk-day.today, html[data-theme="light"] .wk-day.today { box-shadow: inset 0 0 0 1.5px var(--orange); }
.wk-day.today .wk-head b, .wk-day.today .wk-head strong { color: var(--orange); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--orange); }
.cal-day.today > .num { background: var(--orange); color: var(--ink-950); }
/* выбранная карточка: край оранжевый */
.dropzone.has-file, .space-opt.on, .coupon.on, .biz-row.on { border-color: var(--orange); }
html[data-theme="light"] :is(.side .nav.on svg, .side a.on:not(.brand) svg, .wk-day.today .wk-head b, .wk-day.today .wk-head strong) { color: var(--orange-ink); }

/* ---------- 13. v72: тариф виден по цвету ---------- */
/* Старт графитом, Автор синим, Профи оранжевым, Студия фиолетовым; пробный тариф контуром */
:root, html[data-theme="dark"] { --plan-creator: #6aa8ff; --plan-pro: var(--orange); --plan-studio: #b59cff; }
html[data-theme="light"] { --plan-creator: #2563c9; --plan-pro: var(--orange-ink); --plan-studio: #6d43d6; }
.pill[class*="plan-"] { display: inline-flex; align-items: center; gap: 6px; }
.pill[class*="plan-"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.plan-free { color: var(--muted); background: rgb(var(--fg-rgb) / .07); }
.pill.plan-creator { color: var(--plan-creator); background: color-mix(in oklab, var(--plan-creator) 15%, transparent); }
.pill.plan-pro { color: var(--plan-pro); background: color-mix(in oklab, var(--plan-pro) 15%, transparent); }
.pill.plan-studio { color: var(--plan-studio); background: color-mix(in oklab, var(--plan-studio) 16%, transparent); }
.pill.plan-trial { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, currentColor 45%, transparent); }

/* ---------- 14. v72: календарь, список справа ---------- */
.agenda-item { grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 12px; }
.agenda-item .thumb.is-sm { width: 64px; height: 64px; border-radius: var(--r-xs); }
.agenda-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 10px; min-width: 0; }
.agenda-top time { font: 560 13px/1.3 var(--font); font-stretch: 100%; color: var(--muted); white-space: nowrap; }
.agenda-top .pill { white-space: nowrap; }
.agenda-main { gap: 6px; }
.agenda-main h3 { font-size: 15px; line-height: 1.35; }
.agenda-main .dest-dots, .agenda-main .dots { flex-wrap: wrap; row-gap: 6px; }
.agenda-main :is(.err-line, .fine) { overflow-wrap: anywhere; }

/* ---------- 15. v72: поиск, поддержка ---------- */
.search-btn { padding: 0 10px 0 16px; gap: 10px; }
.search-btn kbd { margin-left: 8px; padding: 0 9px; height: 26px; display: inline-grid; place-items: center; border-radius: var(--r-pill); }
/* свои сообщения читаются так же, как ответы коллег */
.bubble.me { --text: inherit; --muted: inherit; --dim: inherit; color: var(--text); }
.bubble.me b { color: var(--orange); }
html[data-theme="light"] .bubble.me b { color: var(--orange-ink); }
/* поле ответа: рамка у всей капсулы, а не прямоугольник у текста */
.composer textarea { min-height: 44px; border: 0; border-radius: 20px; background: transparent; box-shadow: none; color: var(--text); font-family: var(--font); font-size: 16px; }
.composer textarea:hover, .composer textarea:focus, .composer textarea:focus-visible { outline: 0; box-shadow: none; background: transparent; }
.composer:focus-within { border-color: var(--line-3); box-shadow: none; }
/* просмотр картинки из чата поверх переписки */
html.att-view-lock { overflow: hidden; }
.att-view { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 64px 72px; background: rgb(5 5 6 / .92); opacity: 0; transition: opacity var(--t-base) var(--ease-out); }
.att-view.is-on { opacity: 1; }
.att-view-fig { display: grid; justify-items: center; gap: 14px; margin: 0; max-width: 100%; max-height: 100%; transform: scale(.98); transition: transform var(--t-base) var(--ease-out); }
.att-view.is-on .att-view-fig { transform: none; }
.att-view-fig img { display: block; max-width: min(1400px, 100%); max-height: calc(100dvh - 160px); border-radius: var(--r-md); object-fit: contain; background: var(--ink-900); }
.att-view-fig figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px; color: var(--ink-300); font-size: 14px; }
.att-view-open { color: var(--ink-50); text-decoration: underline; text-underline-offset: 3px; }
.att-view-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: var(--r-pill); background: rgb(255 255 255 / .1); color: var(--ink-50); cursor: pointer; transition: background-color var(--t-base) var(--ease-soft); }
.att-view-btn:hover { background: rgb(255 255 255 / .18); }
.att-view-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.att-view-btn.is-close { top: 16px; right: 16px; }
.att-view-btn.is-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.att-view-btn.is-next { right: 16px; top: 50%; transform: translateY(-50%); }
.att-pics a { cursor: zoom-in; }
@media (max-width: 640px) { .att-view { padding: 64px 12px 24px; } .att-view-btn.is-prev, .att-view-btn.is-next { top: auto; bottom: 16px; transform: none; } }
@media (prefers-reduced-motion: reduce) { .att-view, .att-view-fig { transition: none; } }

/* v73: пустой эфир с настоящим фото вместо рисованной сцены */
.onair.is-empty .onair-photo { display: block; width: 100%; height: 100%; min-height: 220px; max-height: 340px; object-fit: cover; border-radius: var(--r-md); background: var(--surface-3); }

/* v73: у приветствия две части, третья колонка эфира оставляла справа пустое поле */
html:not([data-theme="light"]) .welcome { grid-template-columns: minmax(0, 420px) minmax(0, 1fr); }
@media (max-width: 1180px) { html:not([data-theme="light"]) .welcome { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 640px) { .onair.is-empty .onair-photo { min-height: 0; max-height: none; aspect-ratio: 16 / 9; height: auto; } }
/* v73: на ноутбуке поиск сжимается до кнопки с лупой, иначе он выдавливал дату под заголовком в столбик */
@media (max-width: 1280px) {
  .search-btn { width: 44px; min-width: 0; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .top-sub { white-space: nowrap; }
}

/* ---------- 16. v73: скругления. Всё мелкое (поля в одну строку, списки, клавиши, номера, метки, пункты меню) таблеткой,
   квадратные значки кругом. Многострочные поля и карточки сохраняют свой радиус. ---------- */
html body :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="color"], [type="hidden"]), select) { border-radius: var(--r-pill); }
:is(.field textarea, .cmt-form textarea, .land-field textarea, .plan-edit textarea, .tag-box), html body textarea { border-radius: 22px; }
.composer textarea { border-radius: 20px; }
html kbd, html .composer-hint kbd, html .v4-tip kbd, html .palette-hint kbd { border-radius: var(--r-pill); padding: 0 7px; }
html :is(.tid, .cat-tag, code, .ladder-bar) { border-radius: var(--r-pill); }
html .tid { padding-inline: 8px; }
html :is(.visit-dev, .type-ic, .pm-ic, .acc-mark, .rank-n) { border-radius: 50%; }
/* v73: тарифы на картинке пустого списка тем же цветом, что и в списке людей */
.il-plan:not(.is-free) { color: var(--plan-pro); background: color-mix(in oklab, var(--plan-pro) 16%, transparent); }

/* ---------- 17. v73: больше оранжевого в личном и бизнес-кабинете. Главное действие блока, знак компании и пространства, «плюс» нового. ---------- */
html .onair .onair-acts .btn, html :is(.welcome, .empty-hero) .btn:not(.ghost), html .biz-ws-foot .btn { background: var(--orange); color: var(--ink-950); }
html .onair .onair-acts .btn:hover, html :is(.welcome, .empty-hero) .btn:not(.ghost):hover, html .biz-ws-foot .btn:hover { background: var(--orange-hi); }
.biz-org-mark { border-radius: 50%; background: var(--orange); color: var(--ink-950); font-weight: 600; }
.biz-ws-mark { border-radius: 50%; background: rgb(255 90 38 / .16); color: var(--orange); font-weight: 600; }
html[data-theme="light"] .biz-ws-mark { background: rgb(194 60 16 / .1); color: var(--orange-ink); }
.biz-ws-add svg { color: var(--orange); stroke: var(--orange); }
.biz-ws-add:hover { box-shadow: inset 0 0 0 1px rgb(255 90 38 / .55); }
.welcome-steps li.is-now > span { background: var(--orange); color: var(--ink-950); box-shadow: none; }

/* ---------- 18. v75: выбор нескольких файлов в медиатеке и отмена загрузок ---------- */
.media-tile { position: relative; transition: box-shadow var(--t-fast); }
.media-tile.is-sel::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--orange); pointer-events: none; }
html[data-theme="light"] .media-tile.is-sel::after { box-shadow: inset 0 0 0 2px var(--orange-ink); }
.media-check { position: absolute; top: 8px; left: 8px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.media-check input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.media-check i { position: relative; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgb(255 255 255 / .85); background: rgb(10 10 11 / .5); backdrop-filter: blur(6px); transition: background-color var(--t-fast), border-color var(--t-fast); pointer-events: none; }
.media-check:hover i { background: rgb(10 10 11 / .7); }
.media-check input:checked + i { background: var(--orange); border-color: var(--orange); }
.media-check input:checked + i::after { content: ""; position: absolute; left: 6.5px; top: 2.5px; width: 5px; height: 10px; border: solid var(--ink-950); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.media-check:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 0; box-shadow: 0 0 0 4px var(--bg); }

.media-selbar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 12px; padding: 8px 8px 8px 16px; min-height: 52px; border-radius: var(--r-pill); background: var(--float); box-shadow: var(--sh-float); }
.media-selbar:focus { outline: none; }
.media-sel-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.media-sel-count b { color: var(--text); font-weight: 600; }
.media-sel-tools, .media-sel-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.media-sel-acts { margin-left: auto; }
.media-sel-acts .danger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.media-sel-acts .danger { display: inline-flex; align-items: center; gap: 6px; }
.media-sel-acts .btn { background: var(--orange); color: var(--ink-950); }
.media-sel-acts .btn:hover { background: var(--orange-hi); }
.media-sel-busy { display: grid; grid-template-columns: auto minmax(80px, 1fr); align-items: center; gap: 14px; flex: 1; padding-right: 10px; }
.media-sel-busy .meter { height: 6px; display: block; overflow: hidden; }
.media-sel-busy .meter i { display: block; height: 100%; background: var(--orange); transition: width var(--t) var(--ease); }

.media-result { margin-top: 16px; animation: enter .3s var(--ease); }
.media-result:focus { outline: none; }
.media-result:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.media-res-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.media-res-list { display: grid; margin: 4px 0 0; padding: 0; list-style: none; max-height: 320px; overflow-y: auto; }
.media-res-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.media-res-row:first-child { border-top: 0; }
.media-res-row .pill { min-width: 76px; justify-content: center; }
.media-res-row b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-res-err { grid-column: 2; font-size: 13px; color: var(--err); overflow-wrap: anywhere; }

.uq-top .uq-cancel { flex: none; width: 32px; height: 32px; min-height: 32px; border-radius: 50%; color: var(--muted); }
.uq-top .uq-cancel:hover { color: var(--err); background: var(--err-soft); }
.uq-top .uq-cancel svg { width: 16px; height: 16px; }
.uq-head-acts { display: flex; gap: 6px; }
#uq-cancel-all { display: inline-flex; align-items: center; gap: 6px; }
#uq-cancel-all svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pill.off { color: var(--muted); background: var(--wait-soft); display: inline-flex; align-items: center; gap: 6px; }
.pill.off::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; box-sizing: border-box; flex: none; }
.uq-item.is-cancelled .uq-top b { color: var(--muted); }
.uq-err.uq-off { font-size: 13px; color: var(--muted); }
.cloud-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cloud-foot .fine { flex: 1; min-width: 0; }
.cloud-state.is-cancelled .meter { display: none; }
.cloud-state.is-cancelled .fine { color: var(--muted); }

@media (max-width: 640px) {
  .media-selbar { border-radius: var(--r-lg); padding: 10px 12px; top: 64px; }
  .media-sel-acts { margin-left: 0; width: 100%; }
  .media-sel-acts > * { flex: 1 1 auto; justify-content: center; }
  .media-check { top: 4px; left: 4px; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .media-result { animation: none; } .media-sel-busy .meter i { transition: none; } }
