/* =============================================================================
   kit.css — общий набор компонентов Турленты (подключается на всех публичных
   страницах после стилей страницы и перед ui.css, см. app/templates/layout/head.php).

   Здесь живёт «фирменный язык» внутренних страниц — тот же, что у ленты, входа,
   регистрации и помощи: шрифт Unbounded в заголовках, небо над хребтом,
   волна со следами, мягкие карточки и пилюли.

     .tl-ph        — шапка страницы: небо + заголовок + волна со следами (partials/page_hero)
     .tl-main      — колонка контента под шапкой
     .tl-btn       — кнопки (hot, grad, ink, soft, glass; размеры sm/lg; иконка)
     .tl-sh        — заголовок раздела со счётчиком и действием
     .tl-panel     — карточка-панель
     .tl-seg       — сегментные вкладки (и прежние .lists-tabs / .ob-tabs)
     .tl-field     — подпись + поле + подсказка (как на регистрации)
     .tl-ava       — аватар с фирменным кольцом и буквой-заглушкой
     .tl-mini      — миниатюра поста (обсуждения, связанные посты, карта, цепочки)
     .tl-stat      — цифры профиля
   Цвета — только токены из dark_root.css.
   ============================================================================= */

/* ---------- Шапка поверх неба (как на ленте, входе и регистрации) ---------- */
.tl-ph-page #header { transition: transform .3s ease, border-color .2s ease, background-color .25s ease; }
.tl-ph-page #header:not(.header-scrolled) {
	background: transparent;
	-webkit-backdrop-filter: none;
	        backdrop-filter: none;
}
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .tl-logo,
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .hdr-btn,
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .hdr-user { color: #fff; }
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) #searchmap { color: #7fb7ff; }
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) #liked { color: #ff6fa8; }
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .hdr-btn:hover,
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .hdr-user:hover { background: rgba(255, 255, 255, .12); }
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .hdr-login,
[data-theme="dark"] .tl-ph-page #header:not(.header-scrolled) .hdr-login:visited { background: #fff; color: #0e1433; }
html:not([data-theme="dark"]) .tl-ph-page #header:not(.header-scrolled) .hdr-btn:hover,
html:not([data-theme="dark"]) .tl-ph-page #header:not(.header-scrolled) .hdr-user:hover { background: rgba(255, 255, 255, .6); }

/* Страница с шапкой-небом: тело на всю ширину, без центрирования flex */
body.tl-ph-page { align-items: stretch; }

/* =============================================================================
   ШАПКА СТРАНИЦЫ (.tl-ph) — «небо над хребтом», уменьшенная версия первого экрана
   ============================================================================= */
.tl-ph {
	--ph-w: 1080px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	padding-top: 56px;                       /* высота фиксированной шапки */
	color: var(--tl-ink);
	background:
		radial-gradient(900px 380px at 88% 0%, rgba(160, 78, 255, .20), transparent 62%),
		radial-gradient(760px 380px at 0% 30%, rgba(0, 141, 254, .16), transparent 60%),
		radial-gradient(520px 260px at 70% 100%, rgba(255, 0, 180, .08), transparent 70%),
		linear-gradient(180deg, #f6f7ff 0%, #eef1ff 55%, #e5e9ff 100%);
}
html[data-theme="dark"] .tl-ph {
	color: #eef1fa;
	background:
		radial-gradient(900px 380px at 88% 0%, rgba(160, 78, 255, .40), transparent 62%),
		radial-gradient(760px 380px at 0% 30%, rgba(0, 141, 254, .30), transparent 60%),
		radial-gradient(520px 260px at 70% 100%, rgba(255, 0, 180, .18), transparent 70%),
		linear-gradient(180deg, #060918 0%, #0b1036 60%, #131b5c 100%);
}

/* Звёзды ночью и световая «пыль» днём */
.tl-ph__sky {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: .5;
	background-image:
		radial-gradient(1.6px 1.6px at 24px 38px, rgba(120, 90, 255, .55) 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 140px 92px, rgba(0, 141, 254, .45) 50%, transparent 52%),
		radial-gradient(1.8px 1.8px at 210px 22px, rgba(255, 0, 180, .35) 50%, transparent 52%),
		radial-gradient(1.2px 1.2px at 260px 140px, rgba(120, 90, 255, .4) 50%, transparent 52%);
	background-size: 300px 230px;
	-webkit-mask: linear-gradient(180deg, #000 0%, #000 50%, transparent 92%);
	        mask: linear-gradient(180deg, #000 0%, #000 50%, transparent 92%);
}
html[data-theme="dark"] .tl-ph__sky {
	opacity: .75;
	background-image:
		radial-gradient(1.2px 1.2px at 24px 38px, #fff 50%, transparent 52%),
		radial-gradient(1px 1px at 140px 92px, rgba(255, 255, 255, .8) 50%, transparent 52%),
		radial-gradient(1.4px 1.4px at 210px 22px, #fff 50%, transparent 52%),
		radial-gradient(1px 1px at 72px 160px, rgba(255, 255, 255, .6) 50%, transparent 52%),
		radial-gradient(1.1px 1.1px at 260px 140px, rgba(200, 210, 255, .9) 50%, transparent 52%);
}

.tl-ph__in {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	max-width: var(--ph-w);
	margin: 0 auto;
	padding: clamp(18px, 3.4vw, 40px) 16px calc(var(--ph-pad-b, 92px));
}
.tl-ph--tight .tl-ph__in { --ph-pad-b: 84px; }
.tl-ph--narrow { --ph-w: 760px; }

.tl-ph__kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 10px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tl-blue);
	background: rgba(255, 255, 255, .72);
	box-shadow: 0 4px 14px rgba(40, 50, 140, .07);
}
.tl-ph__kicker i { font-size: 12px; }
html[data-theme="dark"] .tl-ph__kicker { color: #b9ccff; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

.tl-ph__title {
	font-family: var(--tl-font-display);
	font-weight: 700;
	font-size: clamp(28px, 4.4vw, 48px);
	line-height: 1.04;
	letter-spacing: -0.035em;
	margin: 14px 0 0;
	color: inherit;
	max-width: 20ch;
	animation: tl-rise .7s cubic-bezier(.2, .7, .2, 1) both;
}
.tl-ph__lead {
	font-size: clamp(15px, 1.5vw, 17.5px);
	line-height: 1.55;
	color: var(--tl-ink-2);
	margin: 12px 0 0;
	max-width: 58ch;
	animation: tl-rise .7s .08s cubic-bezier(.2, .7, .2, 1) both;
}
html[data-theme="dark"] .tl-ph__lead { color: #b9c1e2; }
.tl-ph__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	animation: tl-rise .7s .14s cubic-bezier(.2, .7, .2, 1) both;
}
.tl-ph__error:not(:empty) {
	margin-top: 16px;
	display: inline-block;
	background: var(--tl-magenta-soft);
	color: var(--tl-danger);
	border-radius: 12px;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.45;
}
.tl-ph__error:empty { display: none; }

@keyframes tl-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: none; }
}

/* Волна со следами внизу шапки — partials/ridge c классом ph-ridge (настройки в ridge.css) */

/* =============================================================================
   КОЛОНКА КОНТЕНТА
   ============================================================================= */
.tl-main {
	--main-w: 1080px;
	position: relative;
	z-index: 3;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--main-w);
	margin: 0 auto;
	padding: 4px 16px 110px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.tl-main--narrow { --main-w: 640px; }
.tl-main--mid { --main-w: 860px; }
/* Первый блок «наплывает» на волну шапки */
.tl-main--lift { margin-top: -44px; }
@media (max-width: 640px) { .tl-main--lift { margin-top: -30px; } }

/* =============================================================================
   КНОПКИ
   ============================================================================= */
.tl-btn, .tl-btn:visited {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: 46px;
	padding: 0 18px;
	border-radius: 14px;
	border: 1px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	color: var(--tl-ink);
	background: var(--tl-surface-2);
	transition: filter .15s ease, transform .1s ease, background-color .15s ease, box-shadow .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.tl-btn:active { transform: scale(.98); }
.tl-btn i { font-size: .95em; }
.tl-btn--hot, .tl-btn--hot:visited { background: var(--tl-magenta); color: #fff; box-shadow: 0 10px 24px rgba(229, 0, 127, .30); }
.tl-btn--grad, .tl-btn--grad:visited { background: var(--tl-grad); color: #fff; box-shadow: 0 10px 24px rgba(110, 90, 255, .28); }
.tl-btn--ink, .tl-btn--ink:visited { background: var(--tl-ink); color: var(--tl-surface); }
.tl-btn--soft, .tl-btn--soft:visited { background: var(--tl-surface-2); color: var(--tl-ink); }
.tl-btn--line, .tl-btn--line:visited { background: var(--tl-surface); color: var(--tl-ink); border-color: var(--tl-line); }
.tl-btn--glass, .tl-btn--glass:visited {
	background: rgba(255, 255, 255, .72);
	border-color: rgba(14, 20, 51, .08);
	color: var(--tl-ink);
	box-shadow: 0 6px 18px rgba(40, 50, 140, .08);
}
html[data-theme="dark"] .tl-btn--glass,
html[data-theme="dark"] .tl-btn--glass:visited {
	background: rgba(255, 255, 255, .08);
	border-color: rgba(255, 255, 255, .2);
	color: #fff;
	box-shadow: none;
}
.tl-btn--danger, .tl-btn--danger:visited { background: var(--tl-magenta-soft); color: var(--tl-danger); }
.tl-btn:hover { filter: brightness(1.06); }
.tl-btn--soft:hover, .tl-btn--line:hover { background: var(--tl-surface-3); filter: none; }
.tl-btn--glass:hover { background: #fff; filter: none; }
html[data-theme="dark"] .tl-btn--glass:hover { background: rgba(255, 255, 255, .16); }
.tl-btn--sm, .tl-btn--sm:visited { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; gap: 7px; }
.tl-btn--lg, .tl-btn--lg:visited { height: 52px; padding: 0 22px; border-radius: 16px; font-size: 16px; }
.tl-btn--icon, .tl-btn--icon:visited { width: 46px; padding: 0; }
.tl-btn--sm.tl-btn--icon { width: 38px; }
.tl-btn--block { width: 100%; }
.tl-btn[disabled], .tl-btn:disabled { opacity: .5; cursor: default; filter: none; transform: none; }

/* Точка «есть новое» на кнопке */
.tl-btn .tl-dot,
.tl-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tl-magenta);
	box-shadow: 0 0 0 3px rgba(229, 0, 127, .18);
}

/* =============================================================================
   ЗАГОЛОВОК РАЗДЕЛА
   ============================================================================= */
.tl-sh {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 6px 0 -6px;
}
.tl-sh__t {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	font-family: var(--tl-font-display);
	font-weight: 700;
	font-size: clamp(19px, 2.2vw, 24px);
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: var(--tl-ink);
}
.tl-sh__n {
	font-family: var(--tl-font);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--tl-ink-3);
	background: var(--tl-surface-2);
	padding: 3px 9px;
	border-radius: 999px;
	align-self: center;
}
.tl-sh__sub { width: 100%; margin: -4px 0 0; font-size: 14px; color: var(--tl-ink-3); }

/* =============================================================================
   ПАНЕЛЬ
   ============================================================================= */
.tl-panel {
	position: relative;
	box-sizing: border-box;
	background: var(--tl-surface);
	border: 1px solid var(--tl-line);
	border-radius: 24px;
	box-shadow: var(--tl-shadow-1);
	padding: clamp(18px, 2.6vw, 26px);
}
.tl-panel--float {
	border-color: rgba(14, 20, 51, .06);
	box-shadow: 0 24px 60px rgba(40, 50, 140, .13), 0 2px 6px rgba(14, 20, 51, .04);
	border-radius: 28px;
}
html[data-theme="dark"] .tl-panel--float { border-color: var(--tl-line); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.tl-panel__t {
	font-family: var(--tl-font-display);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0 0 6px;
	color: var(--tl-ink);
}
.tl-panel__d { font-size: 14px; line-height: 1.55; color: var(--tl-ink-2); margin: 0; }
.tl-panel__icon {
	width: 42px;
	height: 42px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	font-size: 17px;
	color: var(--tl-blue);
	background: var(--tl-blue-soft);
}
.tl-panel__icon--hot { color: var(--tl-magenta); background: var(--tl-magenta-soft); }
.tl-panel__icon--green { color: var(--tl-green); background: var(--tl-green-soft); }
.tl-panel__icon--grad { color: #fff; background: var(--tl-grad); }

/* Строка «иконка + текст + действие» внутри панели */
.tl-row {
	display: flex;
	align-items: center;
	gap: 14px;
}
.tl-row__body { flex: 1; min-width: 0; }

/* Сетка панелей */
.tl-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) {
	.tl-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =============================================================================
   СЕГМЕНТНЫЕ ВКЛАДКИ (Избранное, Обсуждения)
   ============================================================================= */
.tl-seg,
.lists-tabs,
.ob-tabs {
	position: sticky;
	top: 64px;
	z-index: 6;
	display: flex;
	gap: 4px;
	width: 100%;
	max-width: 460px;
	min-width: 0;
	box-sizing: border-box;
	padding: 5px;
	margin: 0;
	border-radius: 16px;
	background: var(--tl-surface);
	border: 1px solid var(--tl-line);
	box-shadow: var(--tl-shadow-2);
}
.tl-seg__b,
.lists-tab,
.ob-tab {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 12px;
	border: 0;
	border-radius: 12px;
	background: none;
	color: var(--tl-ink-3);
	font: inherit;
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.tl-seg__b:hover, .lists-tab:hover, .ob-tab:hover { color: var(--tl-ink); }
.tl-seg__b.active, .lists-tab.active, .ob-tab.active {
	background: var(--tl-ink);
	color: var(--tl-surface);
	box-shadow: 0 6px 16px rgba(14, 20, 51, .18);
}
.lists-tab i, .ob-tab i { font-size: 14px; }
/* Вкладки, у которых шапка спрятана при прокрутке, прилипают к самому верху */
#header.header-hidden ~ * .tl-seg,
#header.header-hidden ~ * .lists-tabs,
#header.header-hidden ~ * .ob-tabs { top: 10px; }

/* =============================================================================
   ПОЛЯ ФОРМ — подпись, поле, подсказка (как на регистрации)
   ============================================================================= */
.tl-form { display: flex; flex-direction: column; gap: 0; }
.tl-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; position: relative; }
.tl-label { font-size: 13.5px; font-weight: 600; color: var(--tl-ink-2); }
.tl-label small { font-weight: 500; color: var(--tl-ink-3); }
.tl-hint { font-size: 12.5px; line-height: 1.4; color: var(--tl-ink-3); }
.tl-hint:empty { display: none; }
.tl-field .text_input,
.tl-field .text_input_c,
.tl-field .text_input_date,
.tl-field .text_input_resize { margin: 0; }
/* Поле скрыто правилами категории (style="display:none") — прячем и подпись */
.tl-field:has(> .text_input[style*="none"]),
.tl-field:has(> .text_input_resize[style*="none"]),
.tl-field:has(> .tl-count-wrap[style*="none"]) { display: none; }
.tl-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }

/* Подзаголовок группы полей */
.tl-fgroup {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 10px 0 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--tl-ink-3);
}
.tl-fgroup::after { content: ""; flex: 1; height: 1px; background: var(--tl-line); }

/* Пароль с «глазом» — те же классы, что на входе и регистрации */
.tl-pass { position: relative; }
.tl-pass .text_input { padding-right: 48px; }
.tl-eye {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: none;
	color: var(--tl-ink-3);
	cursor: pointer;
	font-size: 16px;
}
.tl-eye:hover { color: var(--tl-ink); background: var(--tl-surface-3); }

/* =============================================================================
   АВАТАР
   ============================================================================= */
.tl-ava {
	--s: 96px;
	position: relative;
	flex: none;
	box-sizing: border-box;
	width: var(--s);
	height: var(--s);
	padding: calc(var(--s) * .035);
	border-radius: calc(var(--s) * .32);
	background: var(--tl-grad);
	box-shadow: 0 14px 34px rgba(110, 90, 255, .28);
}
.tl-ava > img,
.tl-ava > .tl-ava__l {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	border-radius: calc(var(--s) * .29);
	border: calc(var(--s) * .035) solid var(--tl-surface);
	object-fit: cover;
	background: var(--tl-surface-2);
}
.tl-ava > .tl-ava__l {
	font-family: var(--tl-font-display);
	font-weight: 700;
	font-size: calc(var(--s) * .4);
	line-height: 1;
	color: #fff;
	background: linear-gradient(135deg, #008dfe, #a04eff 70%, #ff00b4);
	text-transform: uppercase;
}
a.tl-ava { display: block; transition: transform .2s ease; }
a.tl-ava:hover { transform: translateY(-2px) rotate(-2deg); }
.tl-ava__edit {
	position: absolute;
	right: -4px;
	bottom: -4px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: var(--tl-ink);
	background: var(--tl-surface);
	box-shadow: var(--tl-shadow-2);
}

/* =============================================================================
   ЦИФРЫ ПРОФИЛЯ
   ============================================================================= */
.tl-stats {
	display: inline-flex;
	align-items: stretch;
	gap: 0;
	padding: 6px;
	border-radius: 18px;
	background: rgba(255, 255, 255, .7);
	box-shadow: 0 6px 18px rgba(40, 50, 140, .07);
}
html[data-theme="dark"] .tl-stats { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.tl-stats .s {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 84px;
	padding: 6px 12px;
	line-height: 1.1;
}
.tl-stats .s + .s { border-left: 1px solid rgba(14, 20, 51, .08); }
html[data-theme="dark"] .tl-stats .s + .s { border-left-color: rgba(255, 255, 255, .1); }
.tl-stats .s b {
	font-family: var(--tl-font-display);
	font-weight: 700;
	font-size: 20px;
	letter-spacing: -0.02em;
	color: var(--tl-ink);
}
html[data-theme="dark"] .tl-stats .s b { color: #fff; }
.tl-stats .s span { font-size: 12px; font-weight: 500; color: var(--tl-ink-3); }
html[data-theme="dark"] .tl-stats .s span { color: #9aa3c9; }
.tl-stats[role="button"] { cursor: pointer; transition: box-shadow .2s ease; }
.tl-stats[role="button"]:hover { box-shadow: 0 0 0 2px var(--tl-blue-soft), 0 6px 18px rgba(40, 50, 140, .1); }

/* =============================================================================
   ПРОФИЛЬ В ШАПКЕ СТРАНИЦЫ (кабинет и публичный профиль)
   ============================================================================= */
.tl-prof {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 18px 24px;
	align-items: center;
}
.tl-prof .tl-ava { --s: clamp(84px, 11vw, 120px); }
.tl-prof__name {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 0;
	font-family: var(--tl-font-display);
	font-weight: 700;
	font-size: clamp(24px, 3.6vw, 40px);
	line-height: 1.05;
	letter-spacing: -0.035em;
	color: inherit;
	word-break: break-word;
}
.tl-prof__name .pro-badge { font-size: 11px; line-height: 19px; padding: 0 7px; border-radius: 7px; vertical-align: 0; }
.tl-prof__full { margin: 6px 0 0; font-size: 15.5px; color: var(--tl-ink-2); }
html[data-theme="dark"] .tl-prof__full { color: #b9c1e2; }
.tl-prof__about {
	margin: 10px 0 0;
	max-width: 62ch;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--tl-ink-2);
	white-space: pre-line;
	word-break: break-word;
}
html[data-theme="dark"] .tl-prof__about { color: #c9cfe8; }
.tl-prof__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
@media (max-width: 560px) {
	.tl-prof { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 16px; }
	.tl-stats { width: 100%; box-sizing: border-box; }
	.tl-stats .s { flex: 1; min-width: 0; padding: 6px 4px; }
}

/* Круглая иконка-кнопка рядом с ником (поделиться) */
.tl-ibtn, .tl-ibtn:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 12px;
	font-size: 15px;
	cursor: pointer;
	color: var(--tl-ink-2);
	background: rgba(255, 255, 255, .72);
	box-shadow: 0 4px 12px rgba(40, 50, 140, .08);
	transition: background-color .15s ease, color .15s ease;
}
.tl-ibtn:hover { background: #fff; color: var(--tl-ink); }
html[data-theme="dark"] .tl-ibtn,
html[data-theme="dark"] .tl-ibtn:visited { color: #dfe3f5; background: rgba(255, 255, 255, .1); box-shadow: none; }
html[data-theme="dark"] .tl-ibtn:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.tl-ibtn.has-new { color: var(--tl-magenta); }
.tl-ibtn.has-new::after {
	content: "";
	position: absolute;
	top: -3px;
	right: -3px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--tl-magenta);
	box-shadow: 0 0 0 3px var(--tl-surface);
}

/* =============================================================================
   ПУСТОЕ СОСТОЯНИЕ СПИСКОВ (<p> в .posts-container — так его пишут скрипты подгрузки)
   ============================================================================= */
.posts-container > p,
.tl-empty-box {
	grid-column: 1 / -1;
	position: relative;
	box-sizing: border-box;
	margin: 6px 0;
	padding: 92px 22px 30px;
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
	color: var(--tl-ink-2);
	background:
		linear-gradient(180deg, var(--tl-blue-soft), transparent 60%) top / 100% 110px no-repeat,
		var(--tl-surface);
	border: 1px solid var(--tl-line);
	border-radius: 24px;
	box-shadow: none;
	overflow: hidden;
}
.posts-container > p::before,
.tl-empty-box::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 18px;
	height: 56px;
	background: linear-gradient(180deg, var(--tl-blue-soft), var(--tl-ridge-fill));
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64 L0 50 L46 30 L78 42 L130 12 L168 36 L196 26 L248 54 L292 22 L330 40 L372 6 L410 34 L452 24 L520 52 L520 64 Z' fill='%23000'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64 L0 50 L46 30 L78 42 L130 12 L168 36 L196 26 L248 54 L292 22 L330 40 L372 6 L410 34 L452 24 L520 52 L520 64 Z' fill='%23000'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
}
.tl-empty-box b { display: block; margin-bottom: 6px; font-family: var(--tl-font-display); font-weight: 600; font-size: 17px; color: var(--tl-ink); }
.tl-empty-box .tl-btn { margin-top: 16px; }

/* Индикатор подгрузки списков (#loading) */
#loading {
	grid-column: 1 / -1;
	color: var(--tl-ink-3);
	font-size: 14px;
}

/* =============================================================================
   МИНИАТЮРА ПОСТА (.tl-mini) — третий тип карточки
   Горизонтальная: фото 3:4 слева, заголовок, место, цена.
   Тот же вид получают прежние миниатюры: связанные посты на странице поста,
   ветки «Обсуждений», карточки в цепочках.
   ============================================================================= */
.tl-mini, .tl-mini:visited {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 12px;
	box-sizing: border-box;
	padding: 8px;
	min-width: 0;
	border-radius: 18px;
	background: var(--tl-surface);
	border: 1px solid var(--tl-line);
	color: var(--tl-ink);
	text-decoration: none;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
a.tl-mini:hover { box-shadow: var(--tl-shadow-2); border-color: transparent; transform: translateY(-1px); }
.tl-mini__img {
	flex: 0 0 auto;
	width: 72px;
	aspect-ratio: 3 / 4;
	border-radius: 12px;
	overflow: hidden;
	background: var(--tl-surface-2);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tl-ink-3);
	font-size: 20px;
}
.tl-mini__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-mini__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 3px 4px 3px 0; }
.tl-mini__cat { font-size: 11.5px; font-weight: 600; color: var(--tl-ink-3); display: inline-flex; align-items: center; gap: 6px; }
.tl-mini__t {
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--tl-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}
.tl-mini__m { font-size: 12.5px; color: var(--tl-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-mini__m i { color: var(--tl-magenta); margin-right: 5px; font-size: 11px; }
.tl-mini__p { margin-top: auto; padding-top: 2px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--tl-ink); }

/* ---------- Цвета иконок категорий (как у плиток в ленте) ---------- */
.tl-cat-1 { color: var(--tag-icon1); }
.tl-cat-2, .tl-cat-3, .tl-cat-4, .tl-cat-5 { color: var(--tag-icon2); }
.tl-cat-6, .tl-cat-7 { color: var(--tag-icon1); }
.tl-cat-8, .tl-cat-9, .tl-cat-10 { color: var(--tag-icon3); }
.tl-cat-11 { color: var(--tag-icon4); }
.tl-cat-12 { color: var(--tag-icon5); }

/* =============================================================================
   МЕЛОЧИ
   ============================================================================= */
.tl-note {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--tl-surface-2);
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--tl-ink-2);
}
.tl-note i { color: var(--tl-blue); margin-top: 3px; }
.tl-note--warn i { color: var(--tl-amber); }
.tl-link, .tl-link:visited { color: var(--tl-blue); font-weight: 600; text-decoration: none; }
.tl-link:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.tl-ph__title, .tl-ph__lead, .tl-ph__actions { animation: none; }
}

/* Профиль в шапке на широком экране: цифры справа от имени */
@media (min-width: 900px) {
	.tl-prof--hero { grid-template-columns: auto minmax(0, 1fr) auto; }
	.tl-prof--hero .tl-prof__meta { grid-column: 3; grid-row: 1; justify-content: flex-end; }
}

/* Вкладки-панели «Избранного» */
.lists-pane { display: none; width: 100%; }
.lists-pane.active { display: block; }

/* Строка «Загрузка…» вместо пустого состояния */
.posts-container > p.tl-loading { padding: 30px 16px; background: none; border: 0; color: var(--tl-ink-3); }
.posts-container > p.tl-loading::before { display: none; }

/* Кнопка «Поделиться» в виде .tl-btn (у #share в dark_menu.css свой размер иконки) */
.tl-btn#share i { font-size: 15px; color: inherit; cursor: pointer; }

/* ---------- Всплывающая подсказка (гостю — «войдите, чтобы сохранить») ---------- */
.tl-toast {
	position: fixed;
	left: 50%;
	bottom: calc(18px + env(safe-area-inset-bottom));
	z-index: 1200;
	width: min(440px, calc(100% - 24px));
	padding: 16px 44px 16px 18px;
	box-sizing: border-box;
	border-radius: 18px;
	background: var(--tl-surface);
	border: 1px solid var(--tl-line);
	box-shadow: 0 18px 50px rgba(14, 20, 51, .22);
	transform: translate(-50%, 24px);
	opacity: 0;
	visibility: hidden;
	transition: transform .25s ease, opacity .25s ease, visibility 0s linear .25s;
}
.tl-toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .25s ease, opacity .25s ease; }
.tl-toast__t { margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; color: var(--tl-ink); }
.tl-toast__a { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-toast__x {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: var(--tl-surface-2);
	color: var(--tl-ink-2);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
@media (prefers-reduced-motion: reduce) { .tl-toast, .tl-toast.is-on { transition: none; } }

/* Предупреждение над формой (например, «подтвердите номер») — поверх волны, как панель */
.tl-verify-note {
	position: relative;
	z-index: 2;
	margin: 0;
	background: var(--tl-surface);
	border: 1px solid var(--tl-line);
	box-shadow: var(--tl-shadow-1);
}
