/*
 * Портал 38i.ru «Мой Иркутск» — дизайн по вертикалям (2026).
 *
 * Подключается только у портала, после user.css. Внутренние страницы
 * компонентов свёрстаны на токенах --af-* из user.css — здесь токены
 * получают новую палитру (ледяной фон, ночная шапка, янтарь, цвет вертикали),
 * а поверх — шапка с вертикалями, подменю, панели хабов, главная по
 * сценариям, подвал и нижняя панель на телефоне.
 *
 * Цвет вертикали — переменная --v на <header> и на body (класс v-*).
 */

body.is-p2 {
	--ice: #eef2f4;
	--surface: #ffffff;
	--sunk: #f4f7f9;
	--ink: #16222c;
	--muted: #5a6873;
	--line: #d6dee3;
	--night: #10263a;
	--night-2: #183a57;
	--on-night: #eaf1f6;
	--on-night-muted: #a2b8c9;
	--amber: #f0a019;
	--amber-ink: #3a2400;
	--amber-soft: #fdf0d6;
	--chip: #e4ebf0;
	--link: #1b5586;
	--green: #2e9e5b;
	--yellow: #d9a100;
	--red: #d9412f;
	--dusk: #2a1838;
	--berry: #d23f6a;
	--display: "Unbounded", "Onest", system-ui, sans-serif;
	--v: #10263a;

	--af-bg: var(--ice);
	--af-surface: var(--surface);
	--af-text: var(--ink);
	--af-muted: var(--muted);
	--af-border: var(--line);
	--af-accent: var(--link);
	--af-baltic: var(--link);
	--af-baltic-deep: var(--night);
	--af-amber: var(--amber);
	--af-amber-ink: var(--amber-ink);
	--af-warm: var(--amber);
	--af-warm-ink: var(--amber-ink);
	--af-radius: 12px;

	background: var(--ice);
	color: var(--ink);
}

body.is-p2.v-gorod { --v: #1b5586; }
body.is-p2.v-news { --v: #3d4a57; }
body.is-p2.v-otdyh { --v: #d23f6a; --link: #b02a55; }
body.is-p2.v-poezdki { --v: #2e8b6b; --link: #1f6f54; }
body.is-p2.v-baikal { --v: #1a8fa0; --link: #127080; }

@media (prefers-color-scheme: dark) {
	body.is-p2 {
		--ice: #0c151b;
		--surface: #15212a;
		--sunk: #111c24;
		--ink: #e6edf1;
		--muted: #95a6b2;
		--line: #253642;
		--night: #08192a;
		--night-2: #10324c;
		--amber-soft: #3a2c12;
		--chip: #1e2f3b;
		--link: #8cbde6;
	}

	body.is-p2.v-otdyh { --link: #f39bb7; }
	body.is-p2.v-poezdki { --link: #7fd1b3; }
	body.is-p2.v-baikal { --link: #7fd3de; }
}

.is-p2 a { color: var(--link); }
.is-p2 :focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* --- Шапка ----------------------------------------------------------------- */

.ph {
	position: sticky;
	top: env(safe-area-inset-top, 0px);
	z-index: 30;
	background: var(--night);
	color: var(--on-night);
}

.ph a { color: inherit; text-decoration: none; }

.ph-bar {
	display: flex;
	align-items: center;
	gap: 8px 26px;
	min-height: 64px;
	padding-block: 10px;
}

.ph-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font: 700 18px/1 var(--display);
	letter-spacing: -.02em;
	white-space: nowrap;
	color: #fff !important;
}

.ph-logo i {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--amber);
	color: var(--amber-ink);
	font: 700 16px/1 var(--display);
	font-style: normal;
}

.ph-nav {
	display: flex;
	gap: 2px;
	font-weight: 500;
	font-size: 15px;
}

.ph-nav a {
	padding: 7px 13px;
	border-radius: 999px;
	white-space: nowrap;
}

.ph-nav a:hover { background: var(--night-2); }
.ph-nav a.on { background: var(--c); color: #fff; }

.ph-hz {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 14px;
	color: var(--on-night-muted);
	white-space: nowrap;
}

.ph-hz b { color: var(--on-night); font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-hz a:hover b, .ph-hz a:hover { color: #fff; }
.ph-hz a::first-letter { text-transform: none; }

.ph-jam i {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--green);
	vertical-align: 1px;
}

.ph-jam.is-yellow i { background: var(--amber); }
.ph-jam.is-red i { background: #e5484d; }

.ph-sub {
	background: var(--v);
	color: rgba(255, 255, 255, .78);
	font-size: 14px;
}

.ph-sub__in {
	display: flex;
	gap: 4px 20px;
	padding-block: 9px;
	overflow-x: auto;
	scrollbar-width: none;
}

.ph-sub__in::-webkit-scrollbar { display: none; }
.ph-sub a { white-space: nowrap; }
.ph-sub a:hover { color: #fff; }
.ph-sub a.on { color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .85); }

@media (max-width: 1100px) {
	.ph-bar { flex-wrap: wrap; }
	.ph-nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin-inline: -6px; }
	.ph-nav::-webkit-scrollbar { display: none; }
}

@media (max-width: 760px) {
	.ph { position: relative; }
	.ph-bar { min-height: 56px; gap: 10px; }
	.ph-logo span { font-size: 16px; }
	.ph-logo i { width: 34px; height: 34px; font-size: 14px; }
	.ph-hz { gap: 12px; font-size: 13px; }
	.ph-hz .ph-time span, .ph-hz .ph-wx span, .ph-hz .ph-jam span, .ph-tv { display: none; }
	.ph-nav { display: none; }
}

/* --- Страница ---------------------------------------------------------------- */

.is-p2 .afisha-main { padding: 26px 0 48px; }

.is-p2 .afisha-title,
.is-p2 .afisha-hero__title,
.is-p2 .afisha-article__title {
	font-family: var(--display);
	font-weight: 700;
	letter-spacing: -.035em;
	line-height: 1.08;
	text-wrap: balance;
}

.is-p2 .afisha-title { font-size: clamp(26px, 3.4vw, 38px); }

.is-p2 .afisha-section__title,
.is-p2 .afisha-main h2 {
	font-family: var(--display);
	letter-spacing: -.02em;
}

.is-p2 .afisha-section__title { font-size: clamp(18px, 1.6vw, 21px); }

.is-p2 .afisha-card,
.is-p2 .news-card,
.is-p2 .afisha-plugin {
	border-radius: 12px;
}

.is-p2 .cty-chip:hover { border-color: var(--v); }
.is-p2 .cty-table th { font-weight: 600; }
.is-p2 .afisha-crumbs { border-top-color: var(--line); }

/* Проданные ссылки — тихий блок в потоке страницы */
.is-p2 .plz {
	margin-block: 8px 0;
	padding: 14px 0;
	border-top: 1px solid var(--line);
	font-size: 14px;
	color: var(--muted);
}

.is-p2 .plz a { color: var(--link); }
.is-p2 .afisha-links-zone.plz { padding-block: 14px; }
.is-p2 .afisha-links-zone:empty { display: none; }

/* --- Хаб вертикали ---------------------------------------------------------- */

.hub { display: flex; flex-direction: column; gap: 22px; }

.hub-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 6px 20px;
}

.hub-head h1 {
	margin: 0;
	font: 700 clamp(28px, 4vw, 40px)/1.05 var(--display);
	letter-spacing: -.035em;
}

.hub-head p { margin: 4px 0 0; color: var(--muted); }
.hub-head p::first-letter { text-transform: uppercase; }

/* Обложка вертикали: тёмная плашка с фото (Отдых, Поездки, Байкал) */
.hub-cover {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: var(--cover, var(--night));
	color: #fff;
	padding: clamp(20px, 3vw, 32px);
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 220px;
	justify-content: flex-end;
}

.hub-cover > img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: .55;
}

.hub-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, var(--cover-fade, rgba(6, 20, 30, .85)));
}

.hub-cover > * { position: relative; z-index: 1; }

.hub-cover h1 {
	margin: 0;
	font: 700 clamp(30px, 5vw, 54px)/1 var(--display);
	letter-spacing: -.04em;
	color: #fff;
}

.hub-cover p { margin: 0; max-width: 62ch; color: rgba(255, 255, 255, .85); font-size: 16px; }

.hub-cover__facts { display: flex; flex-wrap: wrap; gap: 8px; }

.hub-cover__facts a,
.hub-cover__facts span {
	padding: 8px 12px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .12);
	backdrop-filter: blur(4px);
	color: #fff !important;
	font-size: 14px;
}

.hub-cover__facts b { font: 700 16px/1 var(--display); margin-right: 4px; }

.hub-grid,
.pgrid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 18px;
}

.c3 { grid-column: span 3; }
.c4 { grid-column: span 4; }
.c5 { grid-column: span 5; }
.c6 { grid-column: span 6; }
.c7 { grid-column: span 7; }
.c8 { grid-column: span 8; }
.c12 { grid-column: 1 / -1; }

@media (max-width: 1080px) {
	.c3, .c4, .c5 { grid-column: span 6; }
	.c6, .c7, .c8 { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
	.c3, .c4, .c5 { grid-column: 1 / -1; }
}

/* Панель */
.pp {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.pp-h {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}

.pp-h h2 {
	margin: 0;
	font: 700 17px/1.2 var(--display);
	letter-spacing: -.02em;
}

.pp-h a { font-size: 14px; white-space: nowrap; }
.pp-empty, .pp-note { margin: 0; font-size: 14px; color: var(--muted); }

/* Заголовок ряда вне панелей */
.pe-h {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 14px;
}

.pe-h h2 {
	margin: 0;
	font: 700 20px/1.2 var(--display);
	letter-spacing: -.02em;
}

.pe-h a { font-size: 14px; white-space: nowrap; }

/* Сейчас важно */
.pal {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 10px;
}

.pal a {
	background: var(--amber-soft);
	border-radius: 10px;
	padding: 12px 14px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	color: var(--ink) !important;
	text-decoration: none;
}

.pal b { font: 700 18px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.pal span { font-size: 14px; }

/* Погода */
.pw-now { display: flex; align-items: center; gap: 14px; }
.pw-now b { font: 700 52px/.9 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.pw-now span { font-size: 14px; color: var(--muted); line-height: 1.45; }

.pw-day { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; align-items: end; }
.pw-h { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pw-t { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pw-bar { width: 100%; height: 56px; display: flex; align-items: flex-end; background: var(--sunk); border-radius: 6px; overflow: hidden; }
.pw-bar i { display: block; width: 100%; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #f0a019, #f6c96a); }
.pw-hh { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.pw-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.pw-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.pw-next { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pw-next div { background: var(--sunk); border-radius: 8px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.pw-next b { font: 700 16px/1.2 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.pw-next small::first-letter { text-transform: uppercase; }
.pw-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--amber-soft); font-size: 13px; }

/* Дороги */
.pr-jam { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: end; }
.pr-now { display: flex; flex-direction: column; gap: 2px; }
.pr-now b { font: 700 64px/.95 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--muted); }
.pr-now b.g { color: var(--green); }
.pr-now b.y { color: var(--yellow); }
.pr-now b.r { color: var(--red); }
.pr-now span { font-size: 14px; color: var(--muted); }
.pr-chart { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pr-chart p { margin: 0; font-size: 13px; color: var(--muted); }
.pr-bars { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; height: 110px; align-items: end; border-bottom: 1px solid var(--line); }
.pr-bars i { display: block; border-radius: 3px 3px 0 0; min-height: 2px; background: var(--green); }
.pr-bars i.y { background: var(--yellow); }
.pr-bars i.r { background: var(--red); }
.pr-bars i.n { background: repeating-linear-gradient(45deg, var(--chip), var(--chip) 3px, transparent 3px, transparent 6px); border-radius: 3px; opacity: .7; }
.pr-bars i.now { outline: 2px solid var(--ink); outline-offset: 1px; }
.pr-hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }

.pr-fuel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pr-ft { color: var(--ink); font-weight: 600; }
.pr-fuel b { font: 700 18px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.pr-cmp { flex: 1 1 300px; font-size: 13px; }
.pr-fuel a { margin-left: auto; }

.pr-works { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pr-wh { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.pr-wh span { font-weight: 600; }
.pr-works ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.pr-works li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; font-size: 14px; line-height: 1.4; }
.pr-works li b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.pr-works li a { color: var(--ink); }
.pr-works li a:hover { color: var(--link); }

@media (max-width: 700px) {
	.pr-jam { grid-template-columns: minmax(0, 1fr); }
	.pr-hours span:nth-child(odd) { visibility: hidden; }
	.pr-works ul { grid-template-columns: minmax(0, 1fr); }
}

/* Отключения */
.po-season {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 10px;
	align-items: baseline;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--sunk);
	font-size: 13px;
	color: var(--muted) !important;
	text-decoration: none;
}

.po-season b { color: var(--ink); font-weight: 600; }
.po-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.po-tabs span { padding: 4px 11px; border-radius: 999px; font-size: 13px; background: var(--chip); color: var(--muted); }
.po-tabs span.on { background: var(--ink); color: var(--surface); font-weight: 600; }
.po-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.po-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.po-list li:last-child { border-bottom: 0; }
.po-list time { font-variant-numeric: tabular-nums; font-weight: 600; }
.po-list small { display: block; color: var(--muted); font-size: 13px; }

/* Расписания */
.pt { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt td { padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.pt tr:last-child td { border-bottom: 0; }
.pt-t { width: 58px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pt-r { text-align: right; color: var(--muted); white-space: nowrap; font-size: 13px; }
.pt small { color: var(--muted); display: block; font-size: 12px; }

/* Маршруты */
.prt-k { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.prt-k span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: var(--chip); vertical-align: -1px; }
.prt-k .tram::before { background: #fbe1dc; }
.prt-k .trolleybus::before { background: #dcebfb; }
.prt-k .bus::before { background: #e2f1e6; }
.prt { display: flex; flex-wrap: wrap; gap: 6px; }
.prt a { min-width: 44px; text-align: center; padding: 7px 9px; border-radius: 8px; font: 600 14px/1 var(--display); background: var(--chip); color: var(--ink) !important; text-decoration: none; }
.prt a.tram { background: #fbe1dc; color: #9b2a1c !important; }
.prt a.trolleybus { background: #dcebfb; color: #1b5586 !important; }
.prt a.bus { background: #e2f1e6; color: #1f6b3e !important; }

/* Справочник */
.pref { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pref li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pref li:last-child { border-bottom: 0; }
.pref b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.pref a { color: var(--ink); }
.pref a:hover { color: var(--link); }

/* Новости */
.pn-lead { display: flex; flex-direction: column; gap: 8px; color: var(--ink) !important; text-decoration: none; }
.pn-lead img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.pn-lead b { font: 700 20px/1.2 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.pn-lead:hover b { color: var(--link); }
.pn-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.pn-meta .cat, .cat { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--chip); color: var(--link); font-size: 12px; font-weight: 600; }
.pn-feed { list-style: none; margin: 0; padding: 0; }
.pn-feed li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.pn-feed li:last-child { border-bottom: 0; }
.pn-feed time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.pn-feed a { color: var(--ink); }
.pn-feed a:hover { color: var(--link); }

/* Афиша: тёмный ряд постеров */
.pe { border-radius: 14px; padding: 22px; }
.pe-dark { background: var(--dusk); color: #f3eef7; }
.pe-dark .pe-h h2 { color: #fff; }
.pe-dark .pe-h a { color: #f5a9c0; }
.pe-night { background: var(--night); color: var(--on-night); }
.pe-night .pe-h h2 { color: #fff; }
.pe-night .pe-h a { color: #9ec9ef; }
.pe-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.pe-ev { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: inherit !important; text-decoration: none; }
.pe-p { position: relative; display: block; margin-bottom: 4px; }
.pe-p img, .pe-noimg { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.pe-p .age { position: absolute; top: 6px; left: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(8, 20, 32, .75); color: #fff; font-size: 11px; font-weight: 600; }
.pe-w { font-size: 13px; font-weight: 600; color: var(--amber); font-variant-numeric: tabular-nums; }
.pe-ev b { font: 600 15px/1.25 var(--display); letter-spacing: -.01em; }
.pe-pl { font-size: 13px; opacity: .72; }
.pe-ev:hover b { text-decoration: underline; text-underline-offset: 3px; }
.pe-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 700px) {
	.pe { padding: 16px; margin-inline: -4px; }
	.pe-row, .pe-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Кино */
.pfl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.pfl a { display: flex; flex-direction: column; gap: 5px; font-size: 14px; color: var(--ink) !important; text-decoration: none; min-width: 0; }
.pfl img, .pfl .pe-noimg { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--chip); }
.pfl b { font-weight: 600; line-height: 1.3; }
.pfl span { color: var(--muted); font-size: 13px; }

@media (max-width: 1080px) { .pfl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ТВ */
.ptv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: 14px; }
.ptv li { display: grid; grid-template-columns: 110px minmax(0, 1.2fr) minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ptv li:last-child { border-bottom: 0; }
.ptv time { display: inline-block; min-width: 44px; margin-right: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ptv-now { position: relative; padding-bottom: 5px; }
.ptv-now i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--v) var(--p), var(--chip) var(--p)); }
.ptv-next { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { .ptv li { grid-template-columns: 1fr; } .ptv-next { display: none; } }

/* Поездки выходного дня */
.ptr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ptrc { position: relative; border-radius: 12px; overflow: hidden; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 12px 14px; color: #fff !important; background: linear-gradient(160deg, #3d6a4f, #173a2c); text-decoration: none; }
.ptrc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ptrc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 32, 0) 25%, rgba(8, 20, 32, .9)); }
.ptrc.plain::after { background: none; }
.ptrc > *:not(img) { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.ptrc small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--amber); }
.ptrc b { font: 600 16px/1.2 var(--display); }
.ptrc span { font-size: 13px; color: #d5e2ec; }

@media (max-width: 1080px) { .ptr { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Куда сходить: места */
/* Разделы мест — строками в три колонки: название слева, число справа.
   Девять разделов — ровно три ряда, слова не переносятся по слогам */
.pgo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pgo > a { flex-direction: row !important; justify-content: space-between; align-items: baseline; gap: 12px !important; }
.pgo b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgo span { white-space: nowrap; }
@media (max-width: 900px) { .pgo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pgo { grid-template-columns: minmax(0, 1fr); } }
.pgo a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink) !important; text-decoration: none; }
.pgo a:hover { border-color: var(--v); }
.pgo b { font: 600 16px/1.2 var(--display); }
.pgo span { font-size: 13px; color: var(--muted); }

/* Город полосой */
.pcs { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.pcs b { font-family: var(--display); }

/* Байкал на главной */
.pbk { position: relative; border-radius: 14px; overflow: hidden; color: #fff !important; min-height: 160px; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px; background: #06313a; text-decoration: none; }
.pbk img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.pbk > *:not(img) { position: relative; }
.pbk h2 { margin: 0; font: 700 36px/1 var(--display); letter-spacing: -.04em; color: #fff; }
.pbk p { margin: 6px 0 0; color: #d6ecef; font-size: 14px; }
.pbk-w { font-size: 14px; background: rgba(3, 30, 36, .7); border-radius: 10px; padding: 10px 12px; }

/* Плитки-цифры (утро, Поездки, Отдых) */
.ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.ptile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; color: var(--ink) !important; text-decoration: none; min-width: 0; }
.ptile:hover { border-color: var(--v); }
.ptile small { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ptile b.big { font: 700 40px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ptile span { font-size: 14px; color: var(--muted); }
.ptile ul { list-style: none; margin: 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.ptile ul b { font-variant-numeric: tabular-nums; margin-right: 6px; }
.ptile .g { color: var(--green); }
.ptile .y { color: var(--yellow); }
.ptile .r { color: var(--red); }

/* Направления (Поездки) */
.pdest { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pdest a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink) !important; text-decoration: none; }
.pdest a:hover { border-color: var(--v); }
.pdest b { font: 600 17px/1.2 var(--display); letter-spacing: -.01em; }
.pdest span { font-size: 13px; color: var(--muted); }
.pdest .d { font-variant-numeric: tabular-nums; color: var(--v); font-weight: 600; }

/* Байкал: ветер и факты */
.pwind { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pwind li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pwind li:last-child { border-bottom: 0; }
.pwind .g { font-weight: 700; font-variant-numeric: tabular-nums; }
.pwind .g.hi { color: var(--red); }
.pwind .g.mid { color: var(--yellow); }
.pwind .t { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.pfacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pfacts li { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.pfacts b { font-weight: 600; }
.pfacts span { color: var(--muted); }

/* Путеводители плитками */
.pguides { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.pguide { display: flex; flex-direction: column; gap: 8px; color: var(--ink) !important; text-decoration: none; }
.pguide img, .pguide .pe-noimg { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; background: var(--chip); }
.pguide b { font: 600 16px/1.25 var(--display); letter-spacing: -.01em; }
.pguide span { font-size: 14px; color: var(--muted); }
.pguide:hover b { color: var(--link); }

/* --- Главная по сценариям ---------------------------------------------------- */

.home { display: flex; flex-direction: column; gap: 26px; }

.home-greet { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.home-greet h1 { margin: 0; font: 700 clamp(26px, 3.6vw, 38px)/1.1 var(--display); letter-spacing: -.035em; }
.home-greet span { color: var(--muted); }

.home-news { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.home-news .pn-lead b { font-size: 24px; }

@media (max-width: 1080px) { .home-news { grid-template-columns: minmax(0, 1fr); } }

/* Выходные */
.wkx { background: var(--night); color: var(--on-night); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.wkx-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; }
.wkx-head h2 { margin: 0; font: 700 clamp(24px, 3vw, 32px)/1.1 var(--display); letter-spacing: -.03em; color: #fff; }
.wkx-head p { margin: 6px 0 0; color: var(--on-night-muted); font-size: 15px; }
.wx3 { display: flex; gap: 8px; flex-wrap: wrap; }
.wx3 span { background: var(--night-2); border-radius: 10px; padding: 8px 12px; font: 600 15px/1.2 var(--display); color: #fff; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 2px; }
.wx3 b { font: 500 12px/1 var(--body, "Onest"), sans-serif; color: var(--amber); letter-spacing: .04em; }
.wkx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wkx-chips a { padding: 6px 12px; border-radius: 999px; font-size: 13px; border: 1px solid #36597a; color: #cfe0ec !important; text-decoration: none; }
.wkx-chips a:hover { border-color: #cfe0ec; }
.wkx-chips a.on { background: var(--amber); border-color: var(--amber); color: var(--amber-ink) !important; font-weight: 600; }
.wkx-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 16px; }
.wk-main { position: relative; border-radius: 12px; overflow: hidden; min-height: 420px; display: flex; align-items: flex-end; color: #fff !important; text-decoration: none; background: var(--night-2); }
.wk-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wk-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 20, 32, 0) 40%, rgba(8, 20, 32, .92)); }
.wk-main-t { position: relative; z-index: 1; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.wk-main-t b { font: 700 26px/1.1 var(--display); color: #fff; }
.wk-main-t span { font-size: 13px; color: #d5e2ec; }
.wk-main-t .w { color: var(--amber); font-weight: 600; }
.wkx .pe-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wkx .pe-p img, .wkx .pe-noimg { aspect-ratio: 4 / 5; }
.wkx-more { align-self: flex-end; color: #9ec9ef !important; font-size: 14px; }

@media (max-width: 1080px) {
	.wkx-grid { grid-template-columns: minmax(0, 1fr); }
	.wk-main { min-height: 300px; }
}

@media (max-width: 700px) {
	.wkx { padding: 16px; }
	.wkx .pe-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kids { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.kids img, .kids .pe-noimg { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; }
.kids small { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kids b { display: block; font: 600 17px/1.3 var(--display); color: var(--ink); }
.kids span { font-size: 14px; color: var(--muted); }
.kids > a:last-child { font-size: 14px; white-space: nowrap; }

@media (max-width: 700px) {
	.kids { grid-template-columns: 56px minmax(0, 1fr); }
	.kids > a:last-child { grid-column: 1 / -1; }
}

/* --- Подвал ------------------------------------------------------------------ */

.pf { background: #0b1b2a; color: #c9d6e0; font-size: 14px; padding-top: 8px; }
.pf a { color: #dde7ee; text-decoration: none; }
.pf a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pf-main { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 3.4fr); gap: 36px; padding-block: 32px 26px; }
.pf-brand { display: flex; flex-direction: column; gap: 12px; }
.pf-logo { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); letter-spacing: -.02em; color: #fff !important; text-decoration: none !important; }
.pf-logo i { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--amber); color: var(--amber-ink); font: 700 16px/1 var(--display); font-style: normal; }
.pf-brand p { margin: 0; color: #9fb2c1; line-height: 1.5; }
.pf-row { display: flex; gap: 10px; align-items: center; }
.pf-age { padding: 3px 8px; border: 1px solid #3a5268; border-radius: 6px; font-weight: 700; color: #dde7ee; }
.pf-btn { font: 500 13px/1 var(--af-font); color: #dde7ee; background: transparent; border: 1px solid #3a5268; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.pf-btn:hover { border-color: #dde7ee; }
.pf-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.pf-col h2 { margin: 0 0 10px; padding-top: 10px; border-top: 3px solid var(--v); font: 700 14px/1.2 var(--display); color: #fff; letter-spacing: -.01em; }
.pf-col h2 a { color: #fff; }
.pf-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-hz { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 22px; }
.pf-hz a { padding: 6px 12px; border: 1px solid #2c4357; border-radius: 999px; font-size: 13px; text-decoration: none !important; }
.pf-hz a:hover { border-color: #dde7ee; }
.pf-legal { display: flex; flex-direction: column; gap: 8px; padding-block: 14px 26px; border-top: 1px solid #1f3446; color: #8499a9; font-size: 13px; }
.pf-legal nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pf-legal nav a, .pf-legal a { color: #b8c7d3; }
.pf-legal p { margin: 0; }
.pf-legal .afisha-legal, .pf-legal .moduletable { margin: 0; color: #8499a9; font-size: 13px; }
.pf-data, .pf-note { font-size: 12px; color: #6f8597; }

@media (max-width: 1080px) {
	.pf-main { grid-template-columns: minmax(0, 1fr); }
	.pf-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
	.pf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* --- Нижняя панель на телефоне ---------------------------------------------- */

.ptab { display: none; }

@media (max-width: 760px) {
	body.is-p2 { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }

	.ptab {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 40;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
		background: var(--night);
		border-top: 1px solid #1f3446;
	}

	.ptab a {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 3px;
		padding: 4px 0;
		color: var(--on-night-muted) !important;
		font-size: 11px;
		text-decoration: none;
	}

	.ptab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
	.ptab a.on { color: #fff !important; }
	.ptab a.on svg { stroke: var(--amber); }

	.is-p2 .cookie-consent { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
}

.pgrid > div { display: flex; flex-direction: column; min-width: 0; }
.pgrid > div > .pp { flex: 1; }
.pgrid > div:empty { display: none; }
.pp-news--lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px 24px; align-content: start; }
.pp-news--lead > .pp-h { grid-column: 1 / -1; }
.c6 .pp-news--lead, .c5 .pp-news--lead, .c4 .pp-news--lead { display: flex; }
@media (max-width: 900px) { .pp-news--lead { display: flex; } }
.hub-cover p, .hub-cover h1 { text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }

/* Боковая колонка новостей */
.is-p2 .afisha-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); }
.pside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 120px; }
.pside .pp { padding: 16px; }
.pside-now { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pside-now a { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink) !important; text-decoration: none; font-size: 14px; }
.pside-now li:last-child a { border-bottom: 0; }
.pside-now b { min-width: 44px; font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.pside-now span { color: var(--muted); }
.pside-ev { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pside-ev a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; color: var(--ink) !important; text-decoration: none; }
.pside-ev img, .pside-ev .pe-noimg { width: 44px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--chip); }
.pside-ev b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.pside-ev small { display: block; font-size: 12px; color: var(--muted); }
.pside-ev a:hover b { color: var(--link); }
.pside .pn-feed li { grid-template-columns: 48px minmax(0, 1fr); font-size: 14px; }

/* Рубрики новостей дублируют подменю вертикали */
.is-p2 .afisha-news-page > .afisha-tabs { display: none; }

@media (max-width: 991px) {
	.is-p2 .afisha-layout { grid-template-columns: minmax(0, 1fr); }
	.pside { position: static; }
}
.is-p2 .plz:not(:has(a)) { padding: 0; border: 0; margin: 0; }

.is-p2 .pagination { flex-wrap: wrap; gap: 4px; }
.is-p2 .pagination .page-link { border-radius: 8px; color: var(--link); background: var(--surface); border-color: var(--line); }
.is-p2 .pagination .active .page-link { background: var(--v); border-color: var(--v); color: #fff; }

.pnews-strip { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.pnews-strip .pn-feed { columns: 2 340px; column-gap: 32px; }
.pnews-strip .pn-feed li { break-inside: avoid; }
.hub-lead { margin: -6px 0 0; font-size: 17px; line-height: 1.5; max-width: 80ch; }

/* Каталог мест: разделы вкладками, давно закрытые — строкой */
.is-p2 .pcat-tabs { margin-bottom: 20px; }
.is-p2 .pcat-tabs small { color: var(--muted); font-size: 12px; }
.pcat-stale { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.pcat-stale summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.pcat-stale .afisha-archive-list { margin-top: 12px; }
.pcat-warn { margin: 12px 0; padding: 10px 14px; border-radius: 10px; background: var(--amber-soft); font-size: 14px; }
.pgo--big a { padding: 18px 18px; } .pgo--big b { font-size: 18px; }
.is-p2 .pcat-tabs__arch { color: var(--muted); }
.pcat-credit { margin: 6px 0 0; font-size: 11px; color: var(--muted); } .pcat-credit a { color: inherit; }

.pgo--list > a { flex-direction: column !important; align-items: flex-start; gap: 2px !important; } .pgo--list b, .pgo--list span { white-space: normal; }
/* Вход в каталог: десять разделов — два ряда по пять, число под названием */
.pgo--big { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pgo--big > a { flex-direction: column !important; align-items: flex-start; gap: 4px !important; }
@media (max-width: 1100px) { .pgo--big { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .pgo--big { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pgo--big b { white-space: normal; } }

/* --- Темы новостей ------------------------------------------------------------ */
.topic { display: flex; flex-direction: column; gap: 22px; }
.topic-head { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--v); }
.topic-kicker { margin: 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.topic-kicker a { color: var(--muted); }
.topic-head h1 { margin: 0; font: 700 clamp(26px, 3.4vw, 36px)/1.1 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.topic-lead p { margin: 0; max-width: 78ch; font-size: 16px; line-height: 1.55; }
.topic-stat { margin: 0; font-size: 14px; color: var(--muted); }
.topic-stat b { color: var(--ink); }
.topic-svc { align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 999px; background: var(--v); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 14px; }
.topic-svc:hover { filter: brightness(1.1); }
.topic-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.topic-top .pn-lead b { font-size: 17px; }
.topic-top__main b { font-size: 22px !important; }
.topic-year h2 { margin: 0 0 6px; font: 700 18px/1.2 var(--display); color: var(--muted); }
.topic-feed li { grid-template-columns: 64px minmax(0, 1fr); }
.topic-feed small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.topic-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-pages a, .topic-pages b, .topic-pages span { min-width: 38px; text-align: center; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.topic-pages b { background: var(--v); border-color: var(--v); color: #fff; }
.topic-pages span { border: 0; background: none; }
.topic-rel h2, .topic-group h2 { margin: 0 0 12px; font: 700 19px/1.2 var(--display); letter-spacing: -.02em; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chips a, .art-topics a { padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--ink) !important; text-decoration: none; font-size: 14px; }
.topic-chips a:hover, .art-topics a:hover { background: var(--v); color: #fff !important; }
.topic-chips small { color: var(--muted); }
.topic-chips a:hover small { color: #fff; }
.topic-chips__all { background: transparent !important; color: var(--link) !important; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.topic-grid a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink) !important; text-decoration: none; }
.topic-grid a:hover { border-color: var(--v); }
.topic-grid b { font: 600 17px/1.2 var(--display); }
.topic-grid__n { font-size: 13px; color: var(--v); font-weight: 600; }
.topic-grid small { font-size: 13px; color: var(--muted); line-height: 1.4; }
.art-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 6px; }
.art-topics > span { font-size: 14px; color: var(--muted); }
.art-more-topic { margin-top: 26px; padding: 18px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 900px) { .topic-top { grid-template-columns: minmax(0, 1fr); } .topic-head { padding: 18px; } }
