/**
 * Мобильная вёрстка N2E (≤720px). Десктоп не затрагивается.
 * ROLLBACK: убрать <link> из index.php и html/content.php
 *
 * html.n2e-narrow — класс из index.php по screen (короткая сторона ≤720).
 * Не зависит от layout viewport: desktop min-width (627/700/1000) иначе раздувает
 * Safari, @media (max-width:720px) перестаёт матчиться, страница чуть шире экрана.
 */

/* Без класса: по реальной ширине устройства (даже если layout viewport раздут) */
@media (max-device-width: 920px) {
	html {
		height: 100% !important;
		overflow: hidden !important;
		max-width: 100% !important;
		--n2e-cal-day-h: 68px;
		--n2e-cal-day-pad: 3px 2px 22px;
	}
	body {
		height: 100% !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		max-width: 100% !important;
	}
	.wrapper,
	.header,
	.footer,
	.middle,
	.container {
		min-width: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		overflow: visible !important;
	}
	.calendar,
	.zitar_planning {
		min-width: 0 !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 8px !important;
		padding-right: 8px !important;
		box-sizing: border-box !important;
		overflow: visible !important;
	}
	.calendar .calendarDiv,
	.zitar_planning .calendarDiv,
	.zitar-plan-inner,
	.zitar-plan-heading-row {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
	}
	.calendar .calendarDiv,
	.zitar_planning .calendarDiv {
		display: grid !important;
		grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
		gap: 2px !important;
	}
	.dayDiv,
	.dayDiv:hover {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: var(--n2e-cal-day-h, 68px) !important;
		min-height: var(--n2e-cal-day-h, 68px) !important;
		max-height: var(--n2e-cal-day-h, 68px) !important;
		padding: var(--n2e-cal-day-pad, 3px 2px 22px) !important;
		margin: 0 !important;
		box-sizing: border-box !important;
		display: block !important;
		overflow: hidden !important;
		font-size: 0.58rem !important;
	}
	.prevNextMonthCSS,
	.prevNextYearCSS {
		flex: 1 1 0 !important;
		width: 0 !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
		overflow: hidden !important;
	}
	.yearDiv,
	.monthDiv {
		display: flex !important;
		flex-wrap: nowrap !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		gap: 2px !important;
	}
}

html.n2e-narrow {
	height: 100% !important;
	overflow: hidden !important;
	width: 100% !important;
	max-width: 100% !important;
	/* Запас под absolute footer (Контакты / О сайте) — не перекрывать контент */
	--n2e-footer-reserve: 52px;
}
/* Экстремальный зум: shell выше экрана — скролл страницы, не схлопывание чата */
html.n2e-narrow:not(.n2e-msg-page-lock),
html.n2e-msg-compact:not(.n2e-msg-page-lock) {
	height: auto !important;
	min-height: 100% !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
}
html.n2e-narrow body {
	height: 100% !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	scrollbar-gutter: auto;
}
html.n2e-narrow:not(.n2e-msg-page-lock) body,
html.n2e-msg-compact:not(.n2e-msg-page-lock) body {
	height: auto !important;
	min-height: 100% !important;
}
/* Сообщения: не резервировать полосу скролла страницы без самого скролла */
html.n2e-narrow.n2e-msg-compact body,
html.n2e-msg-page-lock body {
	scrollbar-gutter: auto !important;
}

/* Открытый чат на телефоне: только лента внутри shell; при экстремальном зуме — скролл страницы */
html.n2e-msg-page-lock,
html.n2e-msg-page-lock body {
	overflow: hidden !important;
	overscroll-behavior: none;
}
html.n2e-narrow:not(.n2e-msg-page-lock) body,
html.n2e-msg-compact:not(.n2e-msg-page-lock) body {
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
}
html.n2e-msg-page-lock .n2e-msg-thread {
	overscroll-behavior: contain;
	touch-action: pan-y;
}

/* Меню открыто: стоп скролла страницы на iOS (не только @media ≤720) */
html.n2e-mobile-nav-lock,
html.n2e-mobile-nav-lock body {
	overflow: hidden !important;
	-webkit-overflow-scrolling: auto;
	overscroll-behavior: none;
}

/* Клавиатура iOS: shell/шапка fixed к visualViewport — прячем absolute-footer, чтобы не всплывал посреди экрана */
html.n2e-msg-kb-open footer.footer {
	visibility: hidden !important;
	pointer-events: none !important;
}
html.n2e-msg-kb-open .middle.n2e-middle--messages {
	padding-bottom: 0 !important;
}
html.n2e-msg-kb-open .messagesView .n2e-msg-shell {
	margin: 0 !important;
	max-width: 100% !important;
	border-radius: 0 !important;
}

html.n2e-narrow .wrapper,
html.n2e-narrow .header,
html.n2e-narrow .footer,
html.n2e-narrow .middle,
html.n2e-narrow .container {
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
	overflow: visible !important;
}

html.n2e-narrow .wrapper {
	margin: 0 !important;
	min-height: 100% !important;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

/* Auth: wrapper на всю высоту экрана → absolute footer у низа viewport, не у низа формы */
html.n2e-narrow .wrapper.n2e-auth-page {
	min-height: 100% !important;
	min-height: 100dvh !important;
	position: relative !important;
	display: flex !important;
	flex-direction: column !important;
}
html.n2e-narrow .wrapper.n2e-auth-page #formregauth {
	flex: 1 1 auto !important;
	padding-bottom: calc(var(--n2e-footer-reserve, 52px) + 12px) !important;
	box-sizing: border-box !important;
}
html.n2e-narrow .wrapper.n2e-auth-page .footer {
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	margin-top: 0 !important;
}

html.n2e-narrow .container {
	float: none !important;
}

/*
 * Desktop chrome: .middle { height:0 } + flex в колонке 100vh.
 * На narrow wrapper → height:auto — без сброса height контент = 0 (пустой экран, только header/footer).
 */
html.n2e-narrow #content:not(.n2e-is-hidden),
html.n2e-narrow #formregauth {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	flex: 1 1 auto !important;
}
html.n2e-narrow .middle {
	height: auto !important;
	max-height: none !important;
	min-height: 0 !important;
	flex: 1 1 auto !important;
	overflow: visible !important;
	padding-bottom: var(--n2e-footer-reserve, 52px) !important;
}

html.n2e-narrow .calendar,
html.n2e-narrow .zitar_planning {
	overflow-x: hidden !important;
}

html.n2e-narrow .confidencialfilter {
	min-width: 0 !important;
	flex: 1 1 auto;
	max-width: 100%;
}

/* Сендвич слева (html.n2e-narrow ≤1400) — правый rail тоже прячем; DOM не чистим. */
html.n2e-narrow .right-sidebar,
html.n2e-narrow .right-sidebar.n2e-rail-on {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Меню: по классу n2e-narrow (zoom / ≤1400), не только @media max-width:720 —
   иначе при масштабе браузера кнопка display:none или без полосок «гамбургера». */
html.n2e-narrow .n2e-mobile-nav-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 34px;
	height: 28px;
	margin: 0;
	padding: 0;
	pointer-events: auto !important;
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid var(--m02-line);
	border-radius: 8px;
	background: transparent;
	color: var(--m02-muted);
	cursor: pointer;
	box-sizing: border-box;
}
html.n2e-narrow .n2e-mobile-nav-btn:hover,
html.n2e-narrow .n2e-mobile-nav-btn:focus {
	color: var(--m02-cyan);
	border-color: var(--m02-cyan);
	outline: none;
}
html.n2e-narrow .n2e-mobile-nav-btn-bars,
html.n2e-narrow .n2e-mobile-nav-btn-bars::before,
html.n2e-narrow .n2e-mobile-nav-btn-bars::after {
	display: block;
	width: 16px;
	height: 2px;
	border-radius: 1px;
	background: currentColor;
}
html.n2e-narrow .n2e-mobile-nav-btn-bars {
	position: relative;
}
html.n2e-narrow .n2e-mobile-nav-btn-bars::before,
html.n2e-narrow .n2e-mobile-nav-btn-bars::after {
	content: '';
	position: absolute;
	left: 0;
}
html.n2e-narrow .n2e-mobile-nav-btn-bars::before {
	top: -5px;
}
html.n2e-narrow .n2e-mobile-nav-btn-bars::after {
	top: 5px;
}
html:not(.n2e-narrow) .n2e-mobile-nav-btn {
	display: none !important;
}

/* Баннер «дата рождения» — вторая строка шапки (зум: не наезжать на «Меню») */
html.n2e-narrow .header.n2e-has-empty-bd,
html.n2e-msg-compact .header.n2e-has-empty-bd {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	grid-template-rows: minmax(40px, auto) auto;
	grid-template-areas:
		"hd-left logo hd-right"
		"banner banner banner";
	padding-top: 0 !important;
	padding-bottom: 6px !important;
	column-gap: 6px;
	row-gap: 4px;
	align-items: center;
	box-sizing: border-box;
}
html.n2e-narrow .header.n2e-has-empty-bd .n2e-header-left,
html.n2e-msg-compact .header.n2e-has-empty-bd .n2e-header-left {
	position: static !important;
	grid-area: hd-left;
	top: auto !important;
	bottom: auto !important;
	height: auto !important;
	min-height: 40px;
	justify-self: start;
	align-self: center;
	max-width: none !important;
}
html.n2e-narrow .header.n2e-has-empty-bd .logo,
html.n2e-msg-compact .header.n2e-has-empty-bd .logo {
	position: static !important;
	grid-area: logo;
	left: auto !important;
	right: auto !important;
	transform: none !important;
	margin: 0 !important;
	height: 40px;
	max-width: min(42vw, 100%) !important;
	justify-self: center;
	align-self: center;
}
html.n2e-narrow .header.n2e-has-empty-bd .n2e-notif-wrap,
html.n2e-msg-compact .header.n2e-has-empty-bd .n2e-notif-wrap {
	position: static !important;
	grid-area: hd-right;
	top: auto !important;
	bottom: auto !important;
	right: auto !important;
	left: auto !important;
	height: auto !important;
	min-height: 40px;
	justify-self: end;
	align-self: center;
}
/* Панель к viewport: wrap в шапке static → absolute уезжал за край.
 * display:flex только когда открыта — иначе !important ломает .n2e-is-hidden / .hide(). */
html.n2e-narrow .n2e-notif-panel,
html.n2e-msg-compact .n2e-notif-panel {
	position: fixed !important;
	top: 52px !important;
	left: 8px !important;
	right: 8px !important;
	bottom: auto !important;
	width: auto !important;
	max-width: none !important;
	/* Высота до низа окна — список забирает остаток (flex), не отдельный max-height */
	max-height: calc(100dvh - 60px) !important;
	z-index: 230 !important;
	box-sizing: border-box !important;
	flex-direction: column !important;
	overflow: hidden !important;
}
html.n2e-narrow .n2e-notif-panel:not(.n2e-is-hidden),
html.n2e-msg-compact .n2e-notif-panel:not(.n2e-is-hidden) {
	display: flex !important;
}
html.n2e-narrow .n2e-notif-panel.n2e-is-hidden,
html.n2e-msg-compact .n2e-notif-panel.n2e-is-hidden {
	display: none !important;
}
html.n2e-narrow .n2e-notif-list,
html.n2e-msg-compact .n2e-notif-list {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow-y: auto !important;
}
html.n2e-narrow .header.n2e-has-empty-bd .emptyBirthday,
html.n2e-msg-compact .header.n2e-has-empty-bd .emptyBirthday {
	grid-area: banner;
	position: static !important;
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	left: auto !important;
	right: auto !important;
	box-sizing: border-box !important;
	white-space: normal !important;
	text-align: center;
	font-size: 0.68rem !important;
	line-height: 1.3 !important;
	padding: 4px 10px !important;
}

html.n2e-narrow .left-sidebar {
	position: fixed !important;
	left: 8px !important;
	right: auto !important;
	top: 48px !important;
	bottom: auto !important;
	width: min(340px, calc(100% - 16px)) !important;
	max-width: calc(100% - 16px) !important;
	height: auto !important;
	max-height: min(78vh, 620px) !important;
	margin: 0 !important;
	padding: 0 0 10px !important;
	/* Без scale/filter/clip-path: в Safari iOS слой уходит под backdrop и не принимает тап. */
	transform: translate3d(0, 10px, 0);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	border: 1px solid var(--m02-line) !important;
	border-radius: 14px !important;
	clip-path: none;
	-webkit-clip-path: none;
	filter: none;
	-webkit-filter: none;
	box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28) !important;
	background: var(--m02-panel) !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch;
	z-index: 12110 !important;
	transition: opacity 0.2s ease, transform 0.22s ease, visibility 0.2s;
}

html.n2e-narrow body:has(.header.n2e-has-empty-bd) .left-sidebar {
	top: 88px !important;
}

html.n2e-narrow body.n2e-mobile-nav-open .left-sidebar {
	transform: translate3d(0, 0, 0);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Затемнение за плашкой меню — при зуме тоже (не только @media ≤720) */
html.n2e-narrow .n2e-mobile-nav-backdrop,
html.n2e-mobile-nav-lock .n2e-mobile-nav-backdrop {
	position: fixed !important;
	inset: 0 !important;
	z-index: 12100 !important;
	background: rgba(0, 0, 0, 0.72) !important;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
}
html.n2e-narrow .n2e-mobile-nav-backdrop[hidden],
html.n2e-mobile-nav-lock .n2e-mobile-nav-backdrop[hidden] {
	display: none !important;
}
html.n2e-narrow body.n2e-mobile-nav-open .n2e-mobile-nav-backdrop:not([hidden]),
html.n2e-mobile-nav-lock body.n2e-mobile-nav-open .n2e-mobile-nav-backdrop:not([hidden]) {
	display: block !important;
}

html.n2e-narrow .content {
	padding-left: 6px !important;
	padding-right: 6px !important;
	max-width: 100% !important;
	overflow: visible !important;
	box-sizing: border-box !important;
}

/* Панели: auto+max-width, не width:100% (иначе padding/border раздувают за экран) */
html.n2e-narrow .contentForm,
html.n2e-narrow .calendar,
html.n2e-narrow .zitar_planning,
html.n2e-narrow .zitar_indicators,
html.n2e-narrow .profileUserCSS,
html.n2e-narrow .admin_panel,
html.n2e-narrow .redirectUser,
html.n2e-narrow .friends,
html.n2e-narrow .people,
html.n2e-narrow .eventsView,
html.n2e-narrow .messagesView,
html.n2e-narrow .n2e-group-page,
html.n2e-narrow .n2e-group-create,
html.n2e-narrow .peopleView,
html.n2e-narrow .subscribersView,
html.n2e-narrow .blacklistView,
html.n2e-narrow .subscriptionsView,
html.n2e-narrow .groupsView,
html.n2e-narrow .invitationsView {
	min-width: 0 !important;
	width: auto !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box !important;
	/* visible: не создавать вложенный scrollport (Firefox RDM) */
	overflow: visible !important;
}

html.n2e-narrow .contentForm,
html.n2e-narrow .profileUserCSS,
html.n2e-narrow .admin_panel {
	margin-top: 8px !important;
	padding: 12px 10px 16px !important;
	border-radius: 12px !important;
}

/* Добавить / Редактировать — две строки по центру (узкий экран) */
html.n2e-narrow .admin_panel .n2e-admin-users-tabs {
	flex-direction: column !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 4px !important;
}
html.n2e-narrow .admin_panel .n2e-admin-users-tabs .change_user_panel {
	display: block !important;
	width: auto !important;
	max-width: 100% !important;
	white-space: normal !important;
	text-align: center !important;
}

html.n2e-narrow .friends .contentForm,
html.n2e-narrow .people .contentForm,
html.n2e-narrow .subscribersView .contentForm,
html.n2e-narrow .blacklistView .contentForm,
html.n2e-narrow .subscriptionsView .contentForm,
html.n2e-narrow .groupsView .contentForm,
html.n2e-narrow .eventsView .contentForm,
html.n2e-narrow .invitationsView .contentForm {
	width: auto !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding: 12px 10px 16px !important;
	box-sizing: border-box !important;
	overflow-x: hidden !important;
	border-radius: 12px !important;
}

html.n2e-narrow .friends .friendsListHeader,
html.n2e-narrow .friends .searchFriendsDiv,
html.n2e-narrow .friends .FriendsListDiv,
html.n2e-narrow .people .friendsListHeader,
html.n2e-narrow .people .searchFriendsDiv,
html.n2e-narrow .people .FriendsListDiv,
html.n2e-narrow .subscribersView .friendsListHeader,
html.n2e-narrow .subscribersView .searchFriendsDiv,
html.n2e-narrow .subscribersView .FriendsListDiv,
html.n2e-narrow .subscriptionsView .friendsListHeader,
html.n2e-narrow .subscriptionsView .searchFriendsDiv,
html.n2e-narrow .subscriptionsView .FriendsListDiv,
html.n2e-narrow .blacklistView .friendsListHeader,
html.n2e-narrow .blacklistView .searchFriendsDiv,
html.n2e-narrow .blacklistView .FriendsListDiv,
html.n2e-narrow .invitationsView .friendsListHeader,
html.n2e-narrow .invitationsView .searchFriendsDiv,
html.n2e-narrow .invitationsView .FriendsListDiv,
html.n2e-narrow .admin_panel .searchUsersDiv,
html.n2e-narrow .admin_panel .UsersListDiv,
html.n2e-narrow .admin_panel #AdminChangeUser {
	max-width: 100% !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

/* Скролл: без гориз. полосы; на узком — overlay, без пустой полосы справа */
html.n2e-narrow .n2e-scroll,
html.n2e-narrow .n2e-msg-list,
html.n2e-narrow .n2e-msg-thread,
html.n2e-msg-compact .n2e-msg-list,
html.n2e-msg-compact .n2e-msg-thread {
	overflow-x: hidden !important;
	scrollbar-gutter: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
html.n2e-narrow .n2e-scroll::-webkit-scrollbar,
html.n2e-narrow .n2e-msg-list::-webkit-scrollbar,
html.n2e-narrow .n2e-msg-thread::-webkit-scrollbar,
html.n2e-msg-compact .n2e-msg-list::-webkit-scrollbar,
html.n2e-msg-compact .n2e-msg-thread::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}
html.n2e-narrow .zitar-ind-table-scroll,
html.n2e-narrow .zitar-ind-groups-scroll,
html.n2e-narrow .zitar-ind-metric-table-scroll,
html.n2e-narrow .zitar-ind-settings-table-wrap,
html.n2e-narrow .zitar-ind-lab-scroll,
html.n2e-narrow .zitar-ind-lab-scroll.n2e-scroll,
html.n2e-narrow #zitarIndGridWrap.zitar-ind-grid-wrap {
	/* Гориз. скролл таблицы; вертикаль — у страницы (body). Не pan-x: иначе вверх/вниз с таблицы «не пускает». */
	overflow-x: auto !important;
	overflow-y: hidden !important;
	max-height: none !important;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
	touch-action: auto;
	/* left:1px на телефоне даёт рывок влево-вправо; левый просвет — ::after у shell. */
	top: 1px !important;
	left: 0 !important;
	overscroll-behavior-x: contain;
	overscroll-behavior-y: auto;
	position: relative;
}
html.n2e-narrow .zitar-ind-lab-mount {
	overflow: visible !important;
	max-height: none !important;
}
/* Заглушки shell на телефоне — поверх 1px-просвета */
html.n2e-narrow .zitar-ind-grid-shell::before {
	height: 4px;
	z-index: 90;
	background: var(--m02-panel, #171b20);
}
html.n2e-narrow .zitar-ind-grid-shell::after {
	width: 5px;
	z-index: 90;
	background: var(--m02-panel, #171b20);
}
html[data-n2e-theme="light"].n2e-narrow .zitar-ind-grid-shell::before,
html[data-n2e-theme="light"].n2e-narrow .zitar-ind-grid-shell::after {
	background: var(--m02-panel, #ffffff);
}
html.n2e-narrow .zitar-ind-table-scroll::-webkit-scrollbar,
html.n2e-narrow .zitar-ind-groups-scroll::-webkit-scrollbar,
html.n2e-narrow .zitar-ind-metric-table-scroll::-webkit-scrollbar,
html.n2e-narrow .zitar-ind-settings-table-wrap::-webkit-scrollbar,
html.n2e-narrow .zitar-ind-lab-scroll::-webkit-scrollbar,
html.n2e-narrow .zitar-ind-lab-scroll.n2e-scroll::-webkit-scrollbar {
	height: 6px;
	width: 6px;
	display: block;
}

html.n2e-narrow {
	/* Ячейки дней календаря/планирования (mobile) */
	--n2e-cal-day-h: 68px;
	--n2e-cal-day-pad: 3px 2px 22px;
}

html.n2e-narrow .calendar,
html.n2e-narrow .zitar_planning {
	padding: 12px 6px 16px !important;
	overflow: visible !important;
}

html.n2e-narrow .calendar .calendarDiv,
html.n2e-narrow .zitar_planning .calendarDiv,
html.n2e-narrow .zitar-plan-inner {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .confidencialfilterDiv {
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	display: flex !important;
	flex-wrap: wrap !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .calendar .confidencialfilter {
	min-width: 0 !important;
	width: auto !important;
	flex: 1 1 auto;
	box-sizing: border-box !important;
}

html.n2e-narrow .middle.n2e-middle--messages {
	padding-left: 0 !important;
	padding-right: 0 !important;
	/* absolute footer (~34–40px) не должен перекрывать композер */
	padding-bottom: 52px !important;
}

/* Календарь/планирование/сообщения — полная мобильная укладка по классу (не только @media max-width) */
html.n2e-narrow .calendar .calendarDiv,
html.n2e-narrow .zitar_planning .calendarDiv {
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	display: grid !important;
	grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
	gap: 2px !important;
	box-sizing: border-box !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

html.n2e-narrow .calendar .dayDiv,
html.n2e-narrow .calendar .dayDiv:hover,
html.n2e-narrow .zitar_planning .dayDiv,
html.n2e-narrow .zitar_planning .dayDiv:hover {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: var(--n2e-cal-day-h, 68px) !important;
	min-height: var(--n2e-cal-day-h, 68px) !important;
	max-height: var(--n2e-cal-day-h, 68px) !important;
	padding: var(--n2e-cal-day-pad, 3px 2px 22px) !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	display: block !important;
	font-size: 0.58rem !important;
	overflow: hidden !important;
}

/* Узкий экран: бренд сверху; split-числа планирования — в одну строку */
html.n2e-narrow .calendar .dayDivEventLength,
html.n2e-narrow .zitar_planning .dayDivEventLength {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 1px !important;
	max-width: calc(100% - 4px) !important;
	padding: 2px 4px 3px !important;
}
html.n2e-narrow .calendar .dayDivEventLength .n2e-day-count,
html.n2e-narrow .zitar_planning .dayDivEventLength .n2e-day-count {
	display: block !important;
	/* размер — M02 0.72rem, без мобильного урезания */
}
html.n2e-narrow .zitar_planning .dayDivEventLength .n2e-day-count.zitar-plan-badge-split {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 4px !important;
	white-space: nowrap !important;
}

html.n2e-narrow .calendar .yearDiv,
html.n2e-narrow .calendar .monthDiv,
html.n2e-narrow .zitar_planning .yearDiv,
html.n2e-narrow .zitar_planning .monthDiv {
	display: flex !important;
	flex-wrap: nowrap !important;
	justify-content: center;
	align-items: stretch;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	gap: 2px !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .calendar .prevNextMonthCSS,
html.n2e-narrow .calendar .prevNextYearCSS,
html.n2e-narrow .zitar_planning .prevNextMonthCSS,
html.n2e-narrow .zitar_planning .prevNextYearCSS {
	/* 5×120px с calendar/style.css иначе чуть шире экрана */
	flex: 1 1 0 !important;
	width: 0 !important;
	min-width: 0 !important;
	max-width: none !important;
	height: 34px !important;
	margin: 2px 0 !important;
	padding: 0 2px !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	font-size: 0.68rem !important;
}

html.n2e-narrow .messagesView,
html.n2e-msg-compact .messagesView {
	margin: 8px 0 0 !important;
	padding: 0 !important;
	max-width: 100% !important;
	overflow-x: hidden !important;
}

html.n2e-narrow .messagesView .contentForm,
html.n2e-msg-compact .messagesView .contentForm {
	padding: 0 !important;
	margin: 0 !important;
	width: auto !important;
	max-width: 100% !important;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: hidden !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .messagesView .n2e-msg-shell,
html.n2e-msg-compact .messagesView .n2e-msg-shell {
	width: 100% !important;
	max-width: 100% !important;
	/* JS: --n2e-msg-shell-h от visualViewport; fallback ближе к JS (header+8+footer≈92) */
	height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
	max-height: none !important;
	min-height: var(--n2e-msg-shell-min-h, 0px) !important;
	margin: 0 !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	box-sizing: border-box !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-shell,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-shell {
	min-height: var(--n2e-msg-shell-min-h, 260px) !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-shell,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-shell {
	min-height: var(--n2e-msg-shell-min-h, 220px) !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-thread-wrap,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-thread-wrap {
	min-height: 72px !important;
	flex: 1 1 72px !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-list,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-list {
	min-height: 96px !important;
	flex: 1 1 96px !important;
}

html.n2e-narrow body:has(.header.n2e-has-empty-bd) .messagesView .n2e-msg-shell,
html.n2e-narrow body:has(.header.n2e-has-empty-bd) .messagesView.n2e-msg-mobile-show-list .n2e-msg-shell,
html.n2e-narrow body:has(.header.n2e-has-empty-bd) .messagesView.n2e-msg-mobile-chat .n2e-msg-shell,
html.n2e-msg-compact body:has(.header.n2e-has-empty-bd) .messagesView .n2e-msg-shell,
html.n2e-msg-compact body:has(.header.n2e-has-empty-bd) .messagesView.n2e-msg-mobile-show-list .n2e-msg-shell,
html.n2e-msg-compact body:has(.header.n2e-has-empty-bd) .messagesView.n2e-msg-mobile-chat .n2e-msg-shell {
	height: var(--n2e-msg-shell-h, calc(100dvh - 132px)) !important;
	max-height: none !important;
}

/* На узком экране «разворот» desktop (fixed left/right 168px) всегда выключать */
html.n2e-narrow .n2e-msg-shell--expanded,
html.n2e-msg-compact .n2e-msg-shell--expanded {
	position: relative !important;
	inset: auto !important;
	left: auto !important;
	right: auto !important;
	top: auto !important;
	bottom: auto !important;
	width: 100% !important;
	max-width: 100% !important;
	height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
	max-height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
	z-index: auto !important;
}

/* Сообщения: список/чат не рядом (desktop left 320px иначе не влезает) */
html.n2e-narrow .messagesView .n2e-msg-expand-toggle,
html.n2e-msg-compact .messagesView .n2e-msg-expand-toggle,
html.n2e-narrow .messagesView .n2e-msg-list-toggle,
html.n2e-msg-compact .messagesView .n2e-msg-list-toggle,
html.n2e-narrow .messagesView .n2e-msg-list-restore,
html.n2e-msg-compact .messagesView .n2e-msg-list-restore,
html.n2e-narrow .messagesView .n2e-msg-open-list-btn,
html.n2e-msg-compact .messagesView .n2e-msg-open-list-btn,
html.n2e-narrow .messagesView .n2e-msg-compact-tabs,
html.n2e-msg-compact .messagesView .n2e-msg-compact-tabs,
html.n2e-narrow .messagesView #n2eMsgExpand,
html.n2e-msg-compact .messagesView #n2eMsgExpand {
	display: none !important;
}

html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-shell,
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-shell,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-shell,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-shell {
	flex-direction: column !important;
	height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
	max-height: none !important;
}

html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-left,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-left {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	border-right: none !important;
}

html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-right,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-right {
	display: none !important;
}

html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-left,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-left {
	display: none !important;
}

html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-right,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-right {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
}

/* «← Чаты» + «Меню» чата — при n2e-narrow/compact (зум 140%), не только max-width:720 */
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-chat-head,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-chat-head {
	flex-wrap: nowrap;
	gap: 8px;
	align-items: flex-start;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-nav,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-nav {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	flex: 0 0 auto;
	order: 0;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-back-to-list,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-back-to-list {
	display: inline-flex !important;
	flex: 0 0 auto !important;
	order: 0 !important;
	margin: 0 !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-chat-peer,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-chat-peer {
	flex: 1 1 auto;
	min-width: 0;
	order: 1;
	padding-top: 1px;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-chat-actions,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-chat-actions,
html.n2e-narrow .messagesView.n2e-msg-mobile-chat #n2eMsgGroupMembersBtn,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat #n2eMsgGroupMembersBtn {
	display: none !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-btn.is-active,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-btn.is-active {
	color: var(--m02-cyan);
	border-color: var(--m02-cyan);
	background: var(--m02-hover);
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-bg:not([hidden]),
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-bg:not([hidden]) {
	display: block !important;
	position: fixed;
	inset: 0;
	z-index: 40;
	background: rgba(0, 0, 0, 0.45);
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-panel:not([hidden]),
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-panel:not([hidden]),
html.n2e-narrow .messagesView:has(.n2e-msg-chat-head) .n2e-msg-mobile-menu-panel:not([hidden]),
html.n2e-msg-compact .messagesView:has(.n2e-msg-chat-head) .n2e-msg-mobile-menu-panel:not([hidden]) {
	display: block !important;
	position: fixed !important;
	/* left/top/width задаёт placeMobileChatMenuPanel — не тянуть на весь экран при зуме */
	left: auto;
	right: auto !important;
	z-index: 220;
	width: min(280px, calc(100vw - 16px));
	max-width: 280px;
	background: var(--m02-panel);
	border: 1px solid var(--m02-line);
	border-radius: 10px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
	max-height: min(60vh, 360px);
	box-sizing: border-box;
	overflow: auto;
}
html.n2e-narrow .n2e-msg-mobile-menu-list,
html.n2e-msg-compact .n2e-msg-mobile-menu-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 10px 10px;
	max-height: min(60vh, 360px);
	overflow: auto;
}
html.n2e-narrow .n2e-msg-mobile-menu-item,
html.n2e-msg-compact .n2e-msg-mobile-menu-item {
	width: 100%;
	justify-content: flex-start;
	text-align: left;
}

/* Fallback: открытый чат при зуме — только mobile-chat, не desktop avatars/full/hidden */
html.n2e-narrow .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-left,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-left {
	display: none !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-right,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-right {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-mobile-nav,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-mobile-nav {
	display: flex !important;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	flex: 0 0 auto;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-back-to-list,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-back-to-list {
	display: inline-flex !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-chat-actions,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-chat:not(.n2e-msg-mobile-show-list) .n2e-msg-chat-actions {
	display: none !important;
}

/* Явно: после «← Чаты» список снова виден (перебивает любой fallback) */
html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-left,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-left {
	display: flex !important;
}
html.n2e-narrow .messagesView.n2e-msg-mobile-show-list .n2e-msg-right,
html.n2e-msg-compact .messagesView.n2e-msg-mobile-show-list .n2e-msg-right {
	display: none !important;
}

html.n2e-narrow .n2e-msg-left,
html.n2e-msg-compact .n2e-msg-left {
	width: 100% !important;
	max-width: 100% !important;
}

/* Планирование: шапка/фильтр не раздувают (кнопки nowrap + 574px) */
html.n2e-narrow .zitar_planning {
	padding: 8px 4px 12px !important;
	margin: 8px 0 0 !important;
	overflow-x: hidden !important;
	max-width: 100% !important;
}

html.n2e-narrow .zitar-plan-heading-row {
	flex-wrap: wrap !important;
	justify-content: center !important;
	row-gap: 8px !important;
}
html.n2e-narrow .zitar-plan-heading {
	order: 1 !important;
	flex: 1 1 100% !important;
	max-width: 100% !important;
}
html.n2e-narrow .zitar-plan-all-btn.blbutton,
html.n2e-narrow .zitar-plan-settings-btn.blbutton {
	flex: 0 1 auto !important;
	max-width: none !important;
	white-space: nowrap !important;
}
html.n2e-narrow .zitar-plan-all-btn.blbutton {
	order: 2 !important;
}
html.n2e-narrow .zitar-plan-settings-btn.blbutton {
	order: 3 !important;
}

html.n2e-narrow .zitar-plan-kind-filter {
	max-width: 100% !important;
	min-width: 0 !important;
	gap: 4px 6px !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .zitar-plan-kind-btn {
	white-space: normal !important;
	font-size: 0.66rem !important;
	padding: 2px 4px 3px !important;
}

/* Показатели: без боковых 180px, таблица скроллится внутри, не раздувает страницу */
html.n2e-narrow .zitar_indicators {
	min-width: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 8px 0 0 !important;
	padding: 12px 8px 16px !important;
	overflow-x: hidden !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .zitar-ind-shell,
html.n2e-narrow .zitar-ind-grid-shell,
html.n2e-narrow .zitar-ind-sum-grid {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

html.n2e-narrow .zitar-ind-sum-layout {
	flex-direction: column !important;
}

html.n2e-narrow .zitar-ind-table-scroll,
html.n2e-narrow .zitar-ind-groups-scroll,
html.n2e-narrow .zitar-ind-metric-table-scroll,
html.n2e-narrow .zitar-ind-settings-table-wrap,
html.n2e-narrow #zitarIndGridWrap.zitar-ind-grid-wrap,
html.n2e-narrow .zitar-ind-lab-scroll {
	width: 100% !important;
	max-width: 100% !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	max-height: none !important;
	box-sizing: border-box !important;
	-webkit-overflow-scrolling: touch;
	touch-action: auto;
	top: 1px !important;
	left: 0 !important;
	overscroll-behavior-x: contain;
	position: relative;
}

html.n2e-narrow .zitar-ind-toolbar {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	width: 100% !important;
	max-width: 100% !important;
}

html.n2e-narrow .profileUserCSS,
html.n2e-narrow .admin_panel,
html.n2e-narrow .redirectUser,
html.n2e-narrow .friends,
html.n2e-narrow .eventsView,
html.n2e-narrow .peopleView,
html.n2e-narrow .groupsView,
html.n2e-narrow .contentForm {
	overflow-x: hidden !important;
}

/* max-device-width: по экрану телефона, даже если layout viewport раздут min-width */
@media (max-width: 720px), (max-device-width: 720px) {
	/* —— Корень: height:100%; скролл у body, не у html —— */
	html {
		height: 100%;
		overflow: hidden;
		width: 100%;
		max-width: 100%;
	}
	body {
		height: 100%;
		overflow-x: hidden;
		overflow-y: auto;
		width: 100%;
		max-width: 100%;
	}

	.wrapper {
		min-width: 0 !important;
		min-height: 100% !important;
		height: auto !important;
		overflow: visible;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		box-sizing: border-box;
	}

	/* Шапка/подвал: снять desktop min-width 650px — иначе logo/footer «уезжают» вправо */
	.header {
		min-width: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.logo {
		left: 50% !important;
		right: auto !important;
		width: auto !important;
		max-width: calc(100% - 168px) !important;
		margin-left: 0 !important;
		transform: translateX(-50%) !important;
		z-index: 36 !important;
	}

	.n2e-header-left {
		position: absolute !important;
		left: 6px !important;
		top: 0 !important;
		bottom: 0 !important;
		height: auto !important;
		max-width: calc(50% - 52px) !important;
		gap: 6px !important;
		z-index: 46 !important;
		pointer-events: none;
	}

	.n2e-header-left .n2e-mobile-nav-btn,
	.n2e-header-left .n2e-theme-toggle {
		pointer-events: auto;
	}

	.emptyBirthday {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		white-space: normal !important;
		overflow: hidden !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		left: auto !important;
		right: auto !important;
		font-size: 0.68rem !important;
	}

	.n2e-theme-toggle {
		width: 34px !important;
		min-width: 34px !important;
		max-width: 34px !important;
		height: 28px !important;
		min-height: 28px !important;
		max-height: 28px !important;
	}

	.n2e-notif-wrap {
		right: 6px !important;
		left: auto !important;
		gap: 8px !important;
		z-index: 46 !important;
	}

	.n2e-notif-wrap .n2e-zitar-mark {
		display: flex !important;
		flex: 0 0 auto;
		margin: 0 2px 0 0 !important;
		padding: 0 !important;
		font-size: 0.82rem !important;
		opacity: 0.55 !important;
		pointer-events: none;
	}

	.n2e-notif-wrap .n2e-zitar-mark.is-stand-switch {
		pointer-events: auto !important;
		opacity: 0.7 !important;
	}

	.n2e-notif-wrap .n2e-zitar-mark[hidden] {
		display: none !important;
	}

	.footer {
		position: absolute !important;
		bottom: 0 !important;
		top: auto !important;
		min-width: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		left: 0 !important;
		right: 0 !important;
		margin-top: 0 !important;
		box-sizing: border-box;
		justify-content: center !important;
		gap: 8px !important;
		padding-left: 8px !important;
		padding-right: 8px !important;
	}

	.footer .afooter {
		flex: 0 1 auto;
		max-width: calc(50% - 6px);
	}

	/* Auth: отступы формы; footer absolute у низа экрана (wrapper ≥100dvh) */
	.wrapper.n2e-auth-page {
		min-height: 100% !important;
		min-height: 100dvh !important;
		position: relative !important;
		display: flex !important;
		flex-direction: column !important;
	}
	.wrapper.n2e-auth-page #formregauth {
		display: block;
		flex: 1 1 auto;
		padding: 8px 8px calc(var(--n2e-footer-reserve, 52px) + 12px) !important;
		box-sizing: border-box;
	}
	.wrapper.n2e-auth-page .footer {
		position: absolute !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
	}

	.wrapper.n2e-auth-page .n2e-auth-row {
		padding: 0.75rem 12px 0.5rem !important;
	}

	.wrapper.n2e-auth-page .n2e-auth-row > .col,
	.wrapper.n2e-auth-page .n2e-auth-row > .col.n2e-auth-card {
		min-height: 0 !important;
	}

	.middle {
		min-width: 0 !important;
		width: 100% !important;
		padding-bottom: var(--n2e-footer-reserve, 52px) !important;
	}

	.container {
		min-width: 0 !important;
		width: 100% !important;
		float: none !important;
		overflow-x: hidden;
	}

	.content {
		padding: 0 8px !important;
	}

	/* Центральные панели — без боковых 180px */
	.contentForm,
	.calendar,
	.zitar_planning,
	.zitar_indicators,
	.profileUserCSS,
	.admin_panel,
	.redirectUser,
	.friends,
	.eventsView,
	.messagesView,
	.n2e-group-page,
	.n2e-group-create,
	.peopleView,
	.subscribersView,
	.blacklistView,
	.subscriptionsView,
	.groupsView,
	.invitationsView {
		margin: 8px 0 0 !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	/* Колокольчик — см. блок шапки выше (.n2e-notif-wrap) */
	/* Панель: см. html.n2e-narrow .n2e-notif-panel (fixed на весь экран) */

	/* —— Меню-плашка (всплывающая панель, не боковая полоса) —— */
	.n2e-mobile-nav-backdrop {
		z-index: 12100 !important;
	}

	.left-sidebar {
		position: fixed !important;
		left: 8px !important;
		right: auto !important;
		top: 48px !important;
		bottom: auto !important;
		width: min(340px, calc(100% - 16px)) !important;
		max-width: calc(100% - 16px) !important;
		height: auto !important;
		max-height: min(78vh, 620px) !important;
		margin: 0 !important;
		padding: 0 0 10px !important;
		transform: translate3d(0, 10px, 0);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		border: 1px solid var(--m02-line) !important;
		border-radius: 14px !important;
		clip-path: none;
		-webkit-clip-path: none;
		filter: none;
		-webkit-filter: none;
		box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28) !important;
		background: var(--m02-panel) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
		z-index: 12110 !important;
		transition: opacity 0.2s ease, transform 0.22s ease, visibility 0.2s;
	}

	body:has(.header.n2e-has-empty-bd) .left-sidebar {
		top: 76px !important;
		padding-top: 0 !important;
	}

	body.n2e-mobile-nav-open .left-sidebar {
		transform: translate3d(0, 0, 0);
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.left-sidebar::before {
		content: 'Меню';
		display: block;
		position: sticky;
		top: 0;
		z-index: 2;
		padding: 12px 14px 10px;
		font-size: 0.82rem;
		font-weight: 700;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--m02-cyan);
		background: var(--m02-panel);
		border-bottom: 1px solid var(--m02-line);
		border-radius: 14px 14px 0 0;
		box-sizing: border-box;
		/* Маска над sticky: контент при скролле не светится в верхних углах плашки. */
		box-shadow: 0 -8px 0 0 var(--m02-panel), 0 2px 10px rgba(0, 0, 0, 0.06);
	}

	.left-sidebar .userbutton,
	.n2e-zitar-nav,
	.n2e-zitar-nav > .userbutton,
	.n2e-zitar-sub .userbutton {
		width: 100% !important;
		max-width: none !important;
		box-sizing: border-box;
	}

	.n2e-mobile-nav-btn {
		width: auto !important;
		min-width: 34px;
		padding: 0 10px 0 8px !important;
		gap: 6px;
		font-size: 0.72rem;
		font-weight: 600;
		color: var(--m02-muted);
	}

	.n2e-mobile-nav-btn::after {
		content: 'Меню';
		line-height: 1;
	}

	/* —— Календарь / планирование: 7 дней в ряд —— */
	.calendar,
	.zitar_planning {
		min-width: 0 !important;
		width: 100% !important;
		margin: 8px 0 0 !important;
		padding: 12px 6px 16px !important;
		box-sizing: border-box;
		overflow-x: hidden !important;
		max-width: 100% !important;
	}

	.calendar .calendarDiv,
	.zitar_planning .calendarDiv {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		display: grid !important;
		grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
		gap: 2px !important;
		box-sizing: border-box !important;
		text-align: center;
		margin-top: 8px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.calendar .dayDiv,
	.zitar_planning .dayDiv {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: var(--n2e-cal-day-h, 68px) !important;
		min-height: var(--n2e-cal-day-h, 68px) !important;
		max-height: var(--n2e-cal-day-h, 68px) !important;
		padding: var(--n2e-cal-day-pad, 3px 2px 22px) !important;
		margin: 0 !important;
		box-sizing: border-box !important;
		display: block !important;
		position: relative !important;
		font-size: 0.58rem !important;
		line-height: 1.15 !important;
		overflow: hidden;
	}

	.calendar .dayDiv:hover,
	.zitar_planning .dayDiv:hover {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: var(--n2e-cal-day-h, 68px) !important;
		min-height: var(--n2e-cal-day-h, 68px) !important;
		max-height: var(--n2e-cal-day-h, 68px) !important;
		font-size: 0.58rem !important;
		padding: var(--n2e-cal-day-pad, 3px 2px 22px) !important;
	}

	/* Бейдж: бренд сверху; числа (в т.ч. split) — в одну строку под ним */
	.calendar .dayDivEventLength,
	.zitar_planning .dayDivEventLength {
		top: auto !important;
		bottom: 3px !important;
		left: 50% !important;
		right: auto !important;
		transform: translateX(-50%) !important;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 1px !important;
		min-width: 0 !important;
		max-width: calc(100% - 4px) !important;
		padding: 2px 4px 3px !important;
		pointer-events: none;
		box-sizing: border-box !important;
	}

	.calendar .dayDivEventLength .n2e-day-count,
	.zitar_planning .dayDivEventLength .n2e-day-count {
		display: block !important;
		/* размер — M02 0.72rem */
	}

	/* Только split приёмка|отгрузка — в ряд, не столбиком */
	.zitar_planning .dayDivEventLength .n2e-day-count.zitar-plan-badge-split {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 4px !important;
		white-space: nowrap !important;
	}

	.calendar .prevNextMonthCSS,
	.calendar .prevNextYearCSS,
	.zitar_planning .prevNextMonthCSS,
	.zitar_planning .prevNextYearCSS {
		width: calc(20% - 4px) !important;
		min-width: 0 !important;
		max-width: none !important;
		height: 34px !important;
		font-size: 0.68rem !important;
		margin: 2px !important;
		flex: 1 1 0;
		box-sizing: border-box !important;
		overflow: hidden;
		white-space: nowrap;
	}

	.calendar .yearDiv,
	.calendar .monthDiv,
	.zitar_planning .yearDiv,
	.zitar_planning .monthDiv {
		display: flex !important;
		flex-wrap: nowrap !important;
		justify-content: center;
		align-items: center;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		overflow: hidden;
		box-sizing: border-box;
		white-space: nowrap;
	}

	.confidencialfilterDiv {
		display: flex !important;
		flex-wrap: wrap !important;
		justify-content: center;
		align-items: stretch;
		min-width: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.calendar .confidencialfilter {
		min-width: 0 !important;
		width: auto !important;
		flex: 1 1 auto;
		padding: 4px 6px 10px !important;
		font-size: 0.72rem !important;
		box-sizing: border-box !important;
	}

	.modalElement,
	.event-specific {
		width: calc(100% - 16px) !important;
		max-width: calc(100% - 16px) !important;
		left: 50% !important;
		transform: translateX(-50%) !important;
		top: 2% !important;
		max-height: 92vh;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		box-sizing: border-box;
		padding: 0 !important;
		border-radius: 12px !important;
		/* Карточки при скролле не «режут» скругление модалки (Safari/iOS). */
		clip-path: inset(0 round 12px);
		-webkit-clip-path: inset(0 round 12px);
		background: var(--m02-panel);
	}

	/* Лента дня: одна sticky-шапка — дата, угол и крестик */
	.modalElement .n2e-day-modal-head {
		position: sticky;
		top: 0;
		z-index: 12;
		margin: 0;
		padding: 12px 44px 10px 12px;
		box-sizing: border-box;
		background: var(--m02-panel);
		border-bottom: 1px solid var(--m02-line);
		border-radius: 12px 12px 0 0;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
		overflow: hidden;
		min-height: 44px;
	}

	.modalElement .n2e-day-modal-head::before {
		content: '';
		position: absolute;
		left: 0;
		right: 0;
		top: -6px;
		height: 6px;
		background: var(--m02-panel);
	}

	.modalElement .n2e-day-modal-head #h4ModalDate {
		position: static;
		z-index: auto;
		margin: 0;
		padding: 0;
		text-align: center;
		background: transparent;
		border: none;
		border-radius: 0;
		box-shadow: none;
		width: auto;
	}

	.modalElement .n2e-day-modal-head #h4ModalDate::before,
	.modalElement .n2e-day-modal-head #h4ModalDate::after {
		display: none;
	}

	.modalElement .n2e-day-modal-head .modalClose {
		position: absolute !important;
		top: 8px !important;
		right: 8px !important;
		float: none !important;
		margin: 0 !important;
		z-index: 2 !important;
		opacity: 0.9 !important;
		width: 28px !important;
		height: 28px !important;
		background: var(--m02-panel);
		border: 1px solid var(--m02-line);
		border-radius: 8px;
		box-sizing: border-box;
	}

	/* Старый markup без обёртки — подтянуть при restore previousModal */
	.modalElement > #h4ModalDate {
		position: sticky;
		top: 0;
		z-index: 12;
		margin: 0;
		padding: 12px 44px 10px 12px;
		text-align: center;
		background: var(--m02-panel);
		border-bottom: 1px solid var(--m02-line);
		border-radius: 12px 12px 0 0 !important;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
		width: 100%;
		box-sizing: border-box;
	}

	.modalElement > .modalClose {
		position: absolute !important;
		top: 8px !important;
		right: 8px !important;
		float: none !important;
		margin: 0 !important;
		z-index: 13 !important;
		opacity: 0.9 !important;
		width: 28px !important;
		height: 28px !important;
		background: var(--m02-panel);
		border: 1px solid var(--m02-line);
		border-radius: 8px;
		box-sizing: border-box;
	}

	.modalElement #eventformdisp {
		position: sticky;
		top: 44px;
		z-index: 11;
		display: block;
		margin: 0 0 8px !important;
		padding: 0 12px 8px !important;
		background: var(--m02-panel);
		border-bottom: 1px solid var(--m02-line);
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
	}

	.modalElement > .dayEventElement,
	.modalElement > .noEventToday,
	.modalElement > .moreEventElement,
	.modalElement > .zitar-plan-day-list,
	.modalElement > p:not(#h4ModalDate) {
		margin-left: 10px !important;
		margin-right: 10px !important;
		width: auto !important;
		max-width: none !important;
		box-sizing: border-box;
	}

	.event-specific {
		padding: 14px 10px 16px !important;
	}

	.eventTitle,
	.eventDate,
	.descriptionEventForm {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	/* width:100% + margin съедал правый край — block auto-fill внутри модалки */
	.dayEventElement,
	.moreEventElement {
		width: auto !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
		overflow: hidden;
	}

	/* Карточка события в ленте дня: название у аватарки, подписчики — строкой ниже */
	.dayEventCardInner {
		display: grid !important;
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 6px 10px !important;
		align-items: start !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
	}

	.dayEventCardBody,
	.dayEventCardMain,
	.dayEventCardTop {
		display: contents !important;
	}

	.dayEventCardAvatar {
		grid-column: 1;
		grid-row: 1;
		width: 72px !important;
	}

	.dayEventCardAvatar .n2e-event-avatar,
	.dayEventCardAvatar .n2e-event-avatar-empty {
		width: 72px !important;
		height: 72px !important;
		min-height: 72px !important;
	}

	.dayEventCardTopLeft {
		grid-column: 2;
		grid-row: 1;
		min-width: 0 !important;
		max-width: 100% !important;
		overflow: hidden;
	}

	.dayEventCardTopRight {
		grid-column: 1 / -1;
		grid-row: 2;
		flex-direction: row !important;
		align-items: center !important;
		justify-content: space-between !important;
		max-width: none !important;
		width: 100% !important;
		min-width: 0 !important;
		text-align: left !important;
		gap: 8px !important;
		flex-wrap: wrap !important;
	}

	.dayEventCardTopRight .n2e-ev-sub-actions {
		flex: 0 1 auto;
		margin-left: auto;
		flex-wrap: wrap !important;
		justify-content: flex-end;
		gap: 4px !important;
		max-width: 100%;
		min-width: 0;
	}

	.dayEventCardSubsCount {
		white-space: normal !important;
		word-break: break-word;
		overflow-wrap: anywhere;
		min-width: 0;
		flex: 1 1 auto;
	}

	.dayEventCardTopRight .n2e-ev-sub-actions .blbutton {
		white-space: normal !important;
		text-align: center;
		max-width: 100%;
	}

	.dayEventCardDesc {
		grid-column: 1 / -1;
		grid-row: 3;
	}

	.dayEventCardFoot {
		grid-column: 1 / -1;
		grid-row: 4;
	}

	/* Просмотр события: название на всю ширину, подписчики над автором */
	.n2e-event-sheet {
		max-width: 100% !important;
	}

	.n2e-event-sheet-head {
		flex-wrap: wrap;
		gap: 10px !important;
	}

	.n2e-event-sheet-avatar-wrap {
		flex: 0 0 80px !important;
		width: 80px !important;
		min-height: 80px !important;
	}

	.n2e-event-sheet-avatar-wrap .n2e-event-sheet-avatar {
		width: 80px !important;
		height: 80px !important;
		min-height: 80px !important;
	}

	.n2e-event-sheet-head-text {
		flex: 1 1 calc(100% - 92px) !important;
		min-width: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		gap: 6px !important;
	}

	.n2e-event-sheet-title-row {
		display: contents !important;
	}

	.n2e-event-sheet-title {
		order: 1;
		width: 100% !important;
		font-size: 0.95rem !important;
	}

	.n2e-event-sheet-head-text .dayEventCardMine {
		order: 0;
		/* flex-column по умолчанию stretch — бейдж тянулся до крестика */
		align-self: flex-start !important;
		width: auto !important;
		max-width: max-content !important;
		flex: 0 0 auto !important;
		box-sizing: border-box;
	}

	.n2e-event-sheet-title-row .n2e-ev-subs-count,
	.n2e-event-sheet-title-row .n2e-event-sheet-subs {
		order: 2;
		align-self: flex-start;
		margin: 0 !important;
		white-space: normal !important;
	}

	.n2e-event-sheet-owner {
		order: 3;
	}

	.n2e-event-sheet-when,
	.n2e-event-sheet-date {
		order: 4;
	}

	/* —— Профиль —— */
	.redirectUser {
		padding: 12px 10px 16px !important;
	}

	.redirectUser .n2e-profile-layout {
		display: flex !important;
		flex-direction: column !important;
		grid-template-columns: none !important;
		width: 100% !important;
		max-width: 100% !important;
		gap: 12px !important;
	}

	.redirectUser .n2e-profile-layout > .n2e-profile-head,
	.redirectUser .n2e-profile-layout > .n2e-profile-social,
	.redirectUser .n2e-profile-layout > .n2e-profile-gallery,
	.redirectUser .n2e-profile-layout > .n2e-profile-social-stage {
		grid-column: auto !important;
		grid-row: auto !important;
		width: 100% !important;
		min-width: 0 !important;
		max-width: 100% !important;
	}

	.redirectUser .n2e-profile-social {
		flex: none !important;
		order: 2;
	}

	.redirectUser .n2e-profile-gallery {
		order: 3;
		margin-top: 0 !important;
	}

	.redirectUser .n2e-profile-social-stage {
		order: 4;
	}

	.redirectUser .additional_information_user {
		width: 100% !important;
		max-width: 100% !important;
	}

	.zitar-plan-inner,
	.zitar-plan-heading-row {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Планирование: пустой день — без отступа «под полосу часов» (иначе 4–6 букв в строке) */
	.modalElement .zitar-plan-day-list > .zitar-plan-empty {
		padding: 8px 10px !important;
		overflow-wrap: break-word;
		word-break: normal;
		white-space: normal;
		text-align: center;
		max-width: 100%;
	}

	/* Планирование: Пр/От справа как раньше, но уже (~48px), чтобы список + часы влезали */
	.modalElement.zitar-plan-day-open {
		width: calc(100% - 16px) !important;
		max-width: calc(100% - 16px) !important;
	}

	.modalElement .zitar-plan-day-layout {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto !important;
		grid-template-rows: auto auto !important;
		align-items: start !important;
		--zitar-plan-hour-col-w: 54px;
		--zitar-plan-hour-cols-gap: 4px;
		--zitar-plan-hour-strip-w: calc(54px * 2 + 4px);
		column-gap: 6px !important;
		row-gap: 0 !important;
		max-width: 100%;
		overflow-x: hidden !important;
		width: 100%;
	}

	.modalElement .zitar-plan-day-list {
		grid-column: 1 !important;
		grid-row: 2 !important;
		width: auto !important;
		max-width: 100% !important;
		min-width: 0 !important;
		order: 0 !important;
	}

	.modalElement .zitar-plan-hours-head {
		grid-column: 2 !important;
		grid-row: 1 !important;
		width: var(--zitar-plan-hour-strip-w) !important;
		max-width: var(--zitar-plan-hour-strip-w) !important;
		order: 0 !important;
		overflow: hidden;
		box-sizing: border-box;
		padding-bottom: 2px;
	}

	.modalElement .zitar-plan-hours-body {
		grid-column: 2 !important;
		grid-row: 2 !important;
		width: var(--zitar-plan-hour-strip-w) !important;
		max-width: var(--zitar-plan-hour-strip-w) !important;
		overflow: hidden !important;
		order: 0 !important;
	}

	.modalElement .zitar-plan-hours-cols {
		width: 100%;
		gap: 4px !important;
	}

	.modalElement .zitar-plan-hours-col {
		flex: 0 0 54px !important;
		width: 54px !important;
		max-width: 54px !important;
		min-width: 0 !important;
		overflow: hidden !important;
	}

	.modalElement .zitar-plan-hours-col-title {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 2px 1px;
		gap: 0;
		min-height: 0;
		font-size: 0.62rem;
	}

	.modalElement .zitar-plan-hours-col-name {
		font-size: 0.64rem;
	}

	.modalElement .zitar-plan-hours-col-cap {
		font-size: 0.54rem;
		letter-spacing: -0.03em;
	}

	.modalElement .zitar-plan-hours-toggle {
		font-size: 0.62rem;
		gap: 3px;
		padding: 0;
		white-space: nowrap;
	}

	.modalElement .zitar-plan-hour-cell {
		padding: 1px 3px;
		gap: 2px;
		min-height: 18px;
		font-size: 0.58rem;
		overflow: hidden;
		justify-content: space-between;
	}

	.modalElement .zitar-plan-hour-label {
		font-size: 0.62rem;
		flex: 0 0 auto;
	}

	/* Слева час, справа занято/лимит — в одну строку */
	.modalElement .zitar-plan-hour-count {
		display: inline !important;
		font-size: 0.52rem;
		min-width: 0 !important;
		letter-spacing: -0.04em;
		flex: 0 0 auto;
		text-align: right;
	}

	/* —— Zitar показатели —— */
	.zitar_indicators {
		min-width: 0 !important;
		width: 100% !important;
		margin: 8px 0 0 !important;
		padding: 12px 8px 16px !important;
		overflow-x: hidden !important;
		box-sizing: border-box;
	}

	/* Сводная: «Редактировать» / «По умолчанию» по центру */
	.zitar-ind-sum-toolbar.has-actions {
		flex-direction: column !important;
		align-items: stretch !important;
		justify-content: flex-start !important;
		gap: 10px !important;
	}

	.zitar-ind-sum-toolbar .zitar-ind-sum-filters {
		width: 100% !important;
	}

	.zitar-ind-sum-toolbar .zitar-ind-sum-actions {
		justify-content: center !important;
		width: 100% !important;
		flex-wrap: wrap;
	}

	.zitar-ind-sum-layout {
		flex-direction: column !important;
		gap: 10px !important;
	}

	.zitar-ind-grid-shell {
		width: 100% !important;
		max-width: 100% !important;
		border: 1px solid var(--m02-line) !important;
		border-radius: 10px !important;
		background: var(--m02-panel) !important;
		overflow: hidden !important;
		isolation: isolate;
		box-shadow: none !important;
	}

	.zitar-ind-sum-grid {
		width: 100% !important;
		max-width: 100% !important;
		overflow: visible !important;
		max-height: none !important;
		border: none !important;
		background: transparent !important;
	}

	.zitar-ind-table-scroll,
	.zitar-ind-groups-scroll,
	.zitar-ind-metric-table-scroll,
	.zitar-ind-settings-table-wrap,
	#zitarIndGridWrap.zitar-ind-grid-wrap,
	.zitar-ind-lab-scroll {
		width: 100% !important;
		max-width: 100% !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		max-height: none !important;
		border: none !important;
		border-radius: 0 !important;
		background: var(--m02-panel) !important;
		isolation: isolate;
		-webkit-overflow-scrolling: touch;
		touch-action: auto;
		box-shadow: none !important;
		padding-top: 0 !important;
		top: 1px !important;
		left: 0 !important;
		overscroll-behavior-x: contain;
		position: relative;
	}

	.zitar-ind-grid-shell::before {
		height: 4px !important;
		z-index: 90 !important;
		background: var(--m02-panel) !important;
	}
	.zitar-ind-grid-shell::after {
		width: 5px !important;
		z-index: 90 !important;
		background: var(--m02-panel) !important;
	}

	.zitar-ind-sum-grid:has(.zitar-ind-groups-block),
	.zitar-ind-sum-grid:has(.zitar-ind-metric-view),
	.zitar-ind-sum-grid:has(.zitar-ind-table-scroll) {
		overflow: visible !important;
		max-height: none !important;
		border: none !important;
		background: transparent !important;
	}

	/* Редактирование — горизонтальный скролл таблицы */
	.zitar-ind-table.is-editing,
	.zitar-ind-table.is-sum-editing {
		min-width: 480px;
		font-size: 0.78rem;
	}

	/* Просмотр: sticky без отрицательного top — иначе шапка дёргается при первом скролле */
	.zitar-ind-table:not(.is-editing):not(.is-sum-editing) .zitar-ind-th-metric,
	.zitar-ind-table:not(.is-editing):not(.is-sum-editing) .zitar-ind-metric {
		position: sticky !important;
		left: 0 !important;
		z-index: 2 !important;
		min-width: 7.2rem !important;
		max-width: 9.2rem !important;
		width: 9.2rem !important;
		white-space: normal !important;
		word-break: break-word;
		line-height: 1.25;
		padding-left: 10px !important;
		box-shadow:
			inset -1px 0 0 var(--m02-line),
			2px 0 8px rgba(0, 0, 0, 0.07) !important;
	}

	.zitar-ind-table:not(.is-editing):not(.is-sum-editing) thead th.zitar-ind-th-metric {
		z-index: 6 !important;
		top: 0 !important;
		left: 0 !important;
		box-shadow:
			inset -1px 0 0 var(--m02-line),
			2px 0 8px rgba(0, 0, 0, 0.07),
			inset 0 -2px 0 var(--m02-cyan) !important;
	}

	.zitar-ind-table:not(.is-editing):not(.is-sum-editing) thead tr:only-child th {
		top: 0 !important;
		box-shadow: inset 0 -2px 0 var(--m02-cyan) !important;
	}

	.zitar-ind-table:not(.is-editing):not(.is-sum-editing) thead tr:first-child:not(:only-child) th:not(.zitar-ind-th-metric) {
		top: 0 !important;
		box-shadow: inset 0 -1px 0 var(--m02-line) !important;
	}

	.zitar-ind-sum-table:not(.is-editing):not(.is-sum-editing) thead tr:nth-child(2) th {
		top: var(--zitar-ind-h1, 36px) !important;
		box-shadow: inset 0 -2px 0 var(--m02-cyan) !important;
	}

	.zitar-ind-groups-block .zitar-ind-sum-table thead tr:nth-child(2) th {
		top: var(--zitar-ind-h1, 36px) !important;
	}

	.zitar-ind-settings .zitar-ind-settings-table thead th {
		top: 0 !important;
		text-align: left !important;
		box-shadow: inset 0 -2px 0 var(--m02-cyan) !important;
	}

	.zitar-ind-settings .zitar-ind-settings-table thead th:not(:first-child) {
		text-align: center !important;
	}

	.zitar-ind-settings .zitar-ind-modal-sub {
		text-align: left !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.zitar-ind-check-list {
		background: var(--m02-panel) !important;
		border: none !important;
		border-radius: 0 !important;
	}

	.zitar-ind-table.is-editing .zitar-ind-th-metric,
	.zitar-ind-table.is-editing .zitar-ind-metric,
	.zitar-ind-table.is-sum-editing .zitar-ind-th-metric,
	.zitar-ind-table.is-sum-editing .zitar-ind-metric {
		position: static !important;
		left: auto !important;
		width: auto !important;
		min-width: 0 !important;
		max-width: 9.5em !important;
		white-space: normal !important;
		box-shadow: none !important;
	}

	.zitar-ind-groups-block + .zitar-ind-groups-block {
		margin-top: 14px;
	}

	.zitar-ind-table {
		min-width: 560px;
		font-size: 0.78rem;
	}

	.zitar-ind-table th,
	.zitar-ind-table td {
		padding: 5px 7px !important;
	}

	/* Загрузка: город/год в ряд, кнопки — ниже, не друг на друге */
	.zitar-ind-toolbar {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 10px !important;
		grid-template-columns: none !important;
	}

	.zitar-ind-toolbar .zitar-ind-filters {
		display: grid !important;
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
		gap: 10px 12px !important;
		width: 100% !important;
		justify-self: stretch !important;
	}

	.zitar-ind-toolbar .zitar-ind-filter {
		min-width: 0 !important;
		width: 100% !important;
	}

	.zitar-ind-toolbar .zitar-ind-filter select,
	.zitar-ind-toolbar .zitar-ind-dd {
		width: 100% !important;
		min-width: 0 !important;
	}

	.zitar-ind-upload-actions,
	.zitar-ind-edit-actions {
		grid-column: auto !important;
		justify-self: stretch !important;
		width: 100% !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 8px !important;
	}

	.zitar-ind-upload-actions .zitar-ind-upload-btn,
	.zitar-ind-edit-actions .zitar-ind-upload-btn {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.zitar-ind-norms {
		flex: none !important;
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	/* —— События (каталог) —— */
	.eventsView .contentForm {
		padding: 12px 8px 16px !important;
		overflow-x: hidden !important;
	}

	.n2e-events-shell {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
		padding-left: 0 !important;
		padding-right: 0 !important;
		overflow-x: hidden;
	}

	.n2e-events-shell .friendsListHeader,
	.n2e-events-shell .searchFriendsDiv,
	.n2e-events-sort-row,
	.n2e-events-filters,
	.n2e-events-authors-wrap,
	.n2e-events-list {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
	}

	.n2e-events-shell .n2e-events-seg {
		display: flex !important;
		flex-wrap: wrap !important;
		justify-content: center !important;
		max-width: 100% !important;
		gap: 6px !important;
	}

	.n2e-events-shell .n2e-events-seg .n2e-event-audience-kind-btn {
		white-space: normal !important;
		text-align: center;
	}

	.n2e-events-sort-tabs {
		justify-content: center !important;
		max-width: 100% !important;
	}

	.n2e-events-sort-tab {
		white-space: normal !important;
		text-align: center;
		max-width: 100%;
		line-height: 1.25 !important;
	}

	.n2e-events-filters {
		flex-wrap: wrap !important;
		gap: 6px !important;
		justify-content: stretch !important;
	}

	.n2e-events-select,
	.n2e-events-time {
		flex: 1 1 calc(50% - 6px) !important;
		min-width: 0 !important;
		max-width: 100% !important;
		box-sizing: border-box;
	}

	.n2e-events-list .n2e-group-event,
	.n2e-events-list .n2e-events-card {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		box-sizing: border-box !important;
		overflow: hidden;
	}

	.n2e-events-list .n2e-group-event-inner {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box;
	}

	.n2e-events-list .n2e-event-avatar,
	.n2e-events-list .n2e-event-avatar-empty,
	.n2e-events-list .n2e-group-event-avatar {
		width: 52px !important;
		height: 52px !important;
		min-width: 52px !important;
		flex-shrink: 0 !important;
	}

	.n2e-events-list .n2e-group-event-body {
		min-width: 0 !important;
		max-width: 100% !important;
		overflow: hidden;
	}

	.n2e-events-list .n2e-group-event-title {
		-webkit-line-clamp: 2 !important;
		word-break: break-word !important;
		overflow-wrap: anywhere !important;
		white-space: normal !important;
	}

	.n2e-events-list .n2e-group-event-meta,
	.n2e-events-list .n2e-group-event-author {
		word-break: break-word !important;
		overflow-wrap: anywhere !important;
		white-space: normal !important;
		max-width: 100% !important;
	}

	.n2e-events-card-mine {
		display: inline !important;
		margin-left: 0.35em !important;
		white-space: nowrap;
	}

	/* —— Группа: шапка «Лента» + «Опубликовать запись» —— */
	.n2e-group-feed-head {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 8px !important;
		min-height: 0 !important;
	}

	.n2e-group-feed-title {
		order: 1;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		text-align: center !important;
	}

	.n2e-group-feed-compose-btn {
		order: 2;
		align-self: flex-end !important;
		max-width: 100% !important;
		white-space: normal !important;
		text-align: center;
		line-height: 1.25;
	}

	/* —— Админка —— */
	.admin_panel {
		padding: 12px 10px 16px !important;
	}

	/* Добавить / Редактировать — две строки по центру */
	.admin_panel .n2e-admin-users-tabs {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 4px !important;
	}
	.admin_panel .n2e-admin-users-tabs .change_user_panel {
		display: block !important;
		width: auto !important;
		max-width: 100% !important;
		white-space: normal !important;
		text-align: center !important;
		padding: 8px 8px 10px !important;
	}

	.admin_panel .n2e-admin-site-settings input,
	.admin_panel .n2e-admin-site-settings select {
		max-width: 100% !important;
	}

	/* —— Сообщения: без боковых 168px, список или чат на весь блок —— */
	.middle.n2e-middle--messages {
		padding-left: 0 !important;
		padding-right: 0 !important;
		/* не 12px: absolute footer перекрывал поле ввода */
		padding-bottom: 52px !important;
	}

	/* Развернуть чат — только десктоп */
	.messagesView .n2e-msg-expand-toggle {
		display: none !important;
	}

	.messagesView {
		margin: 8px 0 0 !important;
		padding: 0 !important;
	}

	.messagesView .contentForm {
		padding: 0.25em 0 !important;
	}

	.messagesView .n2e-msg-shell {
		width: 100% !important;
		max-width: 100% !important;
		height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
		max-height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
		min-height: 0 !important;
		margin: 0 !important;
		border-radius: 10px !important;
	}

	body:has(.header.n2e-has-empty-bd) .messagesView .n2e-msg-shell {
		height: var(--n2e-msg-shell-h, calc(100dvh - 132px)) !important;
		max-height: var(--n2e-msg-shell-h, calc(100dvh - 132px)) !important;
	}

	.messagesView .n2e-msg-shell--expanded {
		left: 0 !important;
		right: 0 !important;
		width: calc(100% - 16px) !important;
		max-width: calc(100% - 16px) !important;
		margin: 0 auto !important;
	}

	.messagesView.n2e-msg-mobile-show-list .n2e-msg-shell,
	.messagesView.n2e-msg-mobile-chat .n2e-msg-shell {
		flex-direction: column !important;
		max-height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
		height: var(--n2e-msg-shell-h, calc(100dvh - 92px)) !important;
	}

	.messagesView.n2e-msg-mobile-show-list .n2e-msg-left {
		display: flex !important;
		flex-direction: column !important;
		flex: 1 1 auto !important;
		width: 100% !important;
		max-width: none !important;
		max-height: none !important;
		min-height: 0 !important;
		border-right: none !important;
		border-bottom: none !important;
	}

	.messagesView.n2e-msg-mobile-show-list .n2e-msg-right {
		display: none !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-left {
		display: none !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-right,
	.messagesView.n2e-msg-mobile-show-list .n2e-msg-left {
		display: flex !important;
		flex-direction: column !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-right {
		flex: 1 1 auto !important;
		width: 100% !important;
		min-width: 0 !important;
		min-height: 0 !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-list,
	.messagesView.n2e-msg-mobile-show-list .n2e-msg-list {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		touch-action: pan-y;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-thread {
		flex: 1 1 auto !important;
		min-height: 0 !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-left-head,
	.messagesView.n2e-msg-mobile-show-list .n2e-msg-left-head {
		flex-shrink: 0;
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 4px !important;
	}

	.n2e-msg-left-title-row {
		position: static !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		flex-wrap: wrap !important;
		justify-content: center !important;
		align-content: flex-start !important;
		row-gap: 10px !important;
		column-gap: 6px !important;
		min-height: 0 !important;
		width: 100% !important;
		margin: 0 !important;
	}

	.n2e-msg-left-title-row h3 {
		flex: 0 0 100% !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		order: 0 !important;
		line-height: 1.25 !important;
	}

	.n2e-msg-left-title-row .n2e-msg-list-toggle,
	.n2e-msg-left-title-row .n2e-msg-self-notes-toggle,
	.n2e-msg-left-title-row .n2e-msg-hidden-toggle,
	.n2e-msg-left-title-row .n2e-msg-chats-only-toggle,
	.n2e-msg-left-title-row .n2e-msg-search-toggle {
		position: static !important;
		left: auto !important;
		right: auto !important;
		top: auto !important;
		order: 1 !important;
		margin: 0 !important;
	}

	.n2e-msg-left-head > .n2e-msg-tabs.n2e-event-audience-kind {
		width: 100% !important;
		margin: 0 !important;
	}

	.n2e-msg-tabs.n2e-event-audience-kind {
		width: 100% !important;
		margin: 0 !important;
	}

	.n2e-msg-search-wrap {
		width: 100% !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-chat-head {
		position: sticky !important;
		top: 0 !important;
		z-index: 12 !important;
		flex: 0 0 auto !important;
		flex-wrap: nowrap;
		gap: 8px;
		align-items: flex-start;
		background: var(--m02-panel);
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-nav {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		flex: 0 0 auto;
		order: 0;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-chat-peer {
		flex: 1 1 auto;
		min-width: 0;
		order: 1;
		padding-top: 1px;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-btn.is-active {
		color: var(--m02-cyan);
		border-color: var(--m02-cyan);
		background: var(--m02-hover);
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-chat-actions {
		display: none !important;
	}

	.messagesView.n2e-msg-mobile-chat #n2eMsgGroupMembersBtn {
		display: none !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-bg:not([hidden]) {
		display: block !important;
		position: fixed;
		inset: 0;
		z-index: 40;
		background: rgba(0, 0, 0, 0.45);
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-menu-panel:not([hidden]) {
		display: block !important;
		position: fixed !important;
		left: auto;
		right: auto !important;
		z-index: 220;
		width: min(280px, calc(100vw - 16px));
		max-width: 280px;
		background: var(--m02-panel);
		border: 1px solid var(--m02-line);
		border-radius: 10px;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
		max-height: min(60vh, 360px);
		box-sizing: border-box;
		overflow: auto;
	}

	.n2e-msg-mobile-menu-list {
		display: flex;
		flex-direction: column;
		gap: 6px;
		padding: 8px 10px 10px;
		max-height: min(60vh, 360px);
		overflow: auto;
	}

	.n2e-msg-mobile-menu-item {
		width: 100%;
		justify-content: flex-start;
		text-align: left;
	}

	.n2e-msg-mobile-menu-empty {
		padding: 8px 4px;
		color: var(--m02-muted);
		font-size: 0.85rem;
		text-align: center;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-drop-zone {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-back-to-list {
		flex: 0 0 auto !important;
		order: 0 !important;
		margin: 0 !important;
	}

	.n2e-msg-list-toggle,
	.n2e-msg-list-restore,
	#n2eMsgExpand,
	.n2e-msg-shell--list-hidden .n2e-msg-list-restore {
		display: none !important;
	}

	/* Корзина «Удалить чат» — только в меню действий, не в верхней полосе */
	.n2e-msg-chat-head #n2eMsgHideChatBtn {
		display: none !important;
	}

	.n2e-msg-back-to-list {
		display: none !important;
		align-items: center;
		flex-shrink: 0;
		margin: 0 8px 0 0;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-back-to-list {
		display: inline-flex !important;
	}

	.n2e-msg-chat-head .n2e-msg-chat-actions {
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 4px;
	}

	.messagesView.n2e-msg-mobile-chat .n2e-msg-mobile-nav {
		display: flex !important;
	}

	/* —— Списки пользователей: все кнопки видны, перенос под именем —— */
	.friendsElement.n2e-list-card.n2e-user-card:not(.n2e-group-card),
	.usersInfoElement.n2e-list-card.n2e-user-card {
		overflow: visible !important;
	}

	.n2e-list-body > .n2e-list-actions,
	.people .n2e-list-actions,
	.subscribersView .n2e-list-actions,
	.friends .n2e-list-actions,
	.subscriptionsView .n2e-list-actions,
	.blacklistView .n2e-list-actions,
	.invitationsView .n2e-list-actions {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		flex-wrap: wrap !important;
		width: 100% !important;
		max-width: 100% !important;
		gap: 6px !important;
		margin-top: 8px !important;
		justify-content: stretch !important;
		box-sizing: border-box;
	}

	.n2e-list-actions .blbutton,
	.friendsElement .n2e-list-actions .blbutton,
	.usersInfoElement .n2e-list-actions .blbutton {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		flex: 1 1 auto !important;
		white-space: normal !important;
		text-align: center;
		line-height: 1.25;
		padding-left: 8px !important;
		padding-right: 8px !important;
		box-sizing: border-box !important;
	}

	.n2e-list-actions .n2e-btn-wide {
		grid-column: 1 / -1;
	}

	/* —— Группы: кнопки под карточкой, название на всю ширину —— */
	.friendsElement.n2e-list-card.n2e-group-card,
	.n2e-group-card {
		flex-wrap: wrap !important;
		align-items: flex-start !important;
		overflow: visible !important;
	}

	.n2e-group-card .n2e-list-body,
	.n2e-group-card .n2e-group-body {
		flex: 1 1 0 !important;
		min-width: 0 !important;
	}

	.n2e-group-card-side {
		flex: 0 0 100% !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 6px 0 0 !important;
		padding: 10px 0 0 !important;
		border-top: 1px solid var(--m02-line);
		box-sizing: border-box;
		order: 10;
	}

	.n2e-group-card-side .n2e-group-actions {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100% !important;
		gap: 6px !important;
		justify-content: stretch !important;
		flex-wrap: wrap !important;
	}

	.n2e-group-card-side .n2e-g-open,
	.n2e-group-card-side .n2e-group-btn:not(.n2e-g-open),
	.n2e-group-card-side .blbutton:not(.n2e-g-open) {
		order: 0 !important;
	}

	.n2e-group-card-side .n2e-group-btn,
	.n2e-group-card-side .blbutton {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		margin: 0 !important;
		white-space: normal !important;
		text-align: center;
		line-height: 1.25;
		justify-content: center;
		box-sizing: border-box !important;
	}

	/* Одна кнопка в ряду группы — на всю ширину */
	.n2e-group-card-side .n2e-group-actions:has(> :only-child) {
		grid-template-columns: 1fr;
	}
}

/* Планшет (не телефон): сетки календаря и планирования — без min-width 700/600.
 * min-device-width:721 — не перебивать телефон с раздутым layout viewport. */
@media (min-width: 721px) and (max-width: 1100px) and (min-device-width: 721px) {
	.calendar,
	.zitar_planning {
		min-width: 0 !important;
		max-width: 100%;
		width: auto;
		overflow-x: hidden;
		box-sizing: border-box;
		margin-left: 24px !important;
		margin-right: 24px !important;
	}

	.calendar {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.zitar-plan-inner,
	.zitar-plan-heading-row,
	.calendar .calendarDiv,
	.zitar_planning .calendarDiv {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
	}

	.zitar_planning .calendarDiv {
		display: grid !important;
		grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
		gap: 2px !important;
	}

	.calendar .dayDiv,
	.zitar_planning .dayDiv {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		height: var(--n2e-cal-day-h, 68px) !important;
		min-height: var(--n2e-cal-day-h, 68px) !important;
		max-height: var(--n2e-cal-day-h, 68px) !important;
		box-sizing: border-box !important;
	}
}
