/* ==========================================================================
   OldNewspaper 18+ — основные стили
   Цвета и размеры — в CSS-переменных; тёмная тема включается классом html.dark
   ========================================================================== */

/* ---------- 1. Токены дизайна ---------- */

/*
 * Значения взяты из макета главной (03_Страницы_ПК/02_Главная):
 * шрифт Arial 14px, фирменный красный #e11d48, скругления 4px,
 * светлый фон #f7f7f8, тёмный — #121214 / #1c1c21, границы #2f2f38.
 */
:root {
	--color-primary: #e11d48;
	--color-primary-hover: #f43f5e;
	--color-primary-subtle: #fff1f2;
	--color-primary-border: #fecdd3;
	--color-on-primary: #ffffff;
	--color-primary-soft-bg: #fae8e8;
	--color-primary-soft-hover: #f7d7d7;

	--bg-app: #f7f7f8;
	--bg-surface: #ffffff;
	--bg-surface-elevated: #f3f4f6;
	--bg-hover: #f9fafb;
	--bg-header: #ffffff;
	--bg-input: #ffffff;
	--text-primary: #111827;
	--text-body: #333333;
	--text-secondary: #4b5563;
	--text-muted: #9ca3af;
	--border-color: #e5e7eb;
	--border-subtle: #f3f4f6;
	--shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-pop: 0 20px 50px rgba(17, 24, 39, 0.18);

	--status-published: #16a34a;
	--status-pending: #d97706;
	--status-rejected: #dc2626;

	--font-sans: Arial, Helvetica, sans-serif;
	--font-serif: var(--font-sans);
	--font-dropcap: Georgia, "Times New Roman", serif;

	--radius-sm: 4px;
	--radius: 4px;
	--radius-lg: 4px;
	--radius-xl: 8px;

	--container: 1240px;
	--sidebar-w: 287px;
	--header-h: 57px;
	--gap: 20px;

	color-scheme: light;
}

html.dark {
	--color-primary: #e11d48;
	--color-primary-hover: #f43f5e;
	--color-primary-subtle: rgba(225, 29, 72, 0.15);
	--color-primary-border: rgba(225, 29, 72, 0.4);
	--color-primary-soft-bg: rgba(225, 29, 72, 0.15);
	--color-primary-soft-hover: rgba(225, 29, 72, 0.25);

	--bg-app: #121214;
	--bg-surface: #1c1c21;
	--bg-surface-elevated: #222227;
	--bg-hover: #282830;
	--bg-header: #1c1c21;
	--bg-input: #161619;
	--text-primary: #f3f4f6;
	--text-body: #e2e2e8;
	--text-secondary: #d1d1d8;
	--text-muted: #9ca3af;
	--border-color: #2f2f38;
	--border-subtle: #26262e;
	--shadow-card: 0 4px 12px -2px rgba(0, 0, 0, 0.35);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow-pop: 0 20px 60px rgba(0, 0, 0, 0.6);

	color-scheme: dark;
}

/* ---------- 2. База ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg-app);
	color: var(--text-body);
	font-family: var(--font-sans);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

html.theme-anim body,
html.theme-anim body * {
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

img,
svg {
	max-width: 100%;
}

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

a:hover {
	color: var(--color-primary);
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
}

h1,
h2,
h3,
h4 {
	margin: 0;
	color: var(--text-primary);
	font-family: var(--font-sans);
	line-height: 1.3;
}

p {
	margin: 0;
}

:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

[hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1100;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: var(--color-primary);
	color: #fff;
	border-radius: var(--radius);
}

.icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------- 3. Кнопки и бейджи ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 34px;
	padding: 7px 14px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.btn--primary:hover {
	background: var(--color-primary-hover);
	color: var(--color-on-primary);
}

.btn--outline {
	border-color: var(--color-primary);
	color: var(--color-primary);
	background: transparent;
}

.btn--outline:hover {
	background: var(--color-primary-subtle);
	color: var(--color-primary);
}

/* Светло-красная кнопка «+ Добавить рассказ» (как в макете). */
.btn--soft {
	border-color: var(--color-primary-border);
	background: var(--color-primary-soft-bg);
	color: var(--color-primary);
}

html.dark .btn--soft {
	border-color: rgba(225, 29, 72, 0.3);
}

.btn--soft:hover {
	background: var(--color-primary-soft-hover);
	color: var(--color-primary);
}

.btn--ghost {
	background: var(--bg-surface-elevated);
	color: var(--text-secondary);
}

.btn--ghost:hover {
	color: var(--text-primary);
	background: var(--border-color);
}

.btn--block {
	display: flex;
	width: 100%;
}

.btn--lg {
	min-height: 52px;
	font-size: 15px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: var(--radius);
	background: transparent;
	color: var(--text-primary);
}

.icon-btn:hover {
	background: var(--bg-surface-elevated);
	color: var(--color-primary);
}

.icon-btn--bordered {
	border-color: var(--border-color);
}

.badge-18 {
	display: inline-flex;
	align-items: center;
	padding: 1px 6px;
	border-radius: var(--radius-sm);
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-sans);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.02em;
	vertical-align: middle;
}

.badge-18--lg {
	padding: 4px 9px;
	font-size: 15px;
	border-radius: var(--radius);
}

/* ---------- 4. Шапка ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--bg-header);
	border-bottom: 1px solid var(--border-color);
	box-shadow: var(--shadow-sm);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--header-h);
	padding-top: 12px;
	padding-bottom: 12px;
}

.site-header__burger {
	display: none;
	margin-left: -8px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	color: var(--text-primary);
}

.brand:hover {
	color: var(--text-primary);
}

.brand__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--radius);
	background: linear-gradient(to bottom right, #e11d48, #9f1239);
	box-shadow: var(--shadow-sm);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.025em;
}

.brand__text {
	display: flex;
	flex-direction: column;
}

.brand__name {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.025em;
}

.brand__accent {
	color: var(--color-primary);
}

.brand__name .badge-18 {
	padding: 2px 6px;
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0;
}

.brand__tagline {
	color: #6b7280;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

html.dark .brand__tagline {
	color: #9ca3af;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.site-header__add {
	display: none;
}

/* Кнопка «Расширенный поиск» — как в макете: красная, мелкий шрифт, без иконки. */
.site-header__advanced {
	min-height: 0;
	padding: 8px 14px;
	font-size: 12px;
	line-height: 16px;
}

.site-header__advanced .icon {
	display: none;
}

/* Вход для авторов: та же рамка, что у кнопки темы. */
.site-header__login {
	width: 30px;
	height: 30px;
	border-color: #d1d5db;
	background: #f9fafb;
	box-shadow: var(--shadow-sm);
	color: var(--text-secondary);
}

html.dark .site-header__login {
	border-color: var(--border-color);
	background: #222227;
	color: #e5e7eb;
}

.site-header__login:hover {
	border-color: var(--color-primary);
	background: inherit;
	color: var(--color-primary);
}

.site-header__login .icon {
	width: 14px;
	height: 14px;
}

/* Переключатель темы */

.theme-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	border-radius: var(--radius);
	background: #f9fafb;
	box-shadow: var(--shadow-sm);
	color: #374151;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	letter-spacing: 0.025em;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

html.dark .theme-toggle {
	border-color: var(--border-color);
	background: #222227;
	color: #e5e7eb;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
	border-color: var(--color-primary);
}

html.dark .theme-toggle:hover,
html.dark .theme-toggle:focus-visible {
	border-color: var(--color-primary);
}

.theme-toggle .icon {
	width: 14px;
	height: 14px;
	transition: transform 0.3s ease;
}

/* Видна только иконка и подпись текущего режима (по data-theme-mode у <html>). */
.theme-toggle__icon,
.theme-toggle__label {
	display: none;
}

html:not([data-theme-mode]) .theme-toggle__icon--auto,
html[data-theme-mode="auto"] .theme-toggle__icon--auto,
html[data-theme-mode="dark"] .theme-toggle__icon--dark,
html[data-theme-mode="light"] .theme-toggle__icon--light {
	display: block;
}

html:not([data-theme-mode]) .theme-toggle__label--auto,
html[data-theme-mode="auto"] .theme-toggle__label--auto,
html[data-theme-mode="dark"] .theme-toggle__label--dark,
html[data-theme-mode="light"] .theme-toggle__label--light {
	display: inline;
}

.theme-toggle__icon--auto {
	color: #f43f5e;
}

html.dark .theme-toggle__icon--auto {
	color: #fb7185;
}

.theme-toggle__icon--dark {
	color: #fbbf24;
	fill: currentColor;
}

.theme-toggle__icon--light {
	color: #6366f1;
	fill: currentColor;
}

.theme-toggle:hover .theme-toggle__icon--auto {
	transform: scale(1.1);
}

.theme-toggle:hover .theme-toggle__icon--dark {
	transform: rotate(45deg);
}

.theme-toggle:hover .theme-toggle__icon--light {
	transform: rotate(-12deg);
}

/* Строка поиска */

.search-form {
	display: flex;
	align-items: stretch;
	width: 240px;
	min-width: 0;
	overflow: hidden;
	border: 1px solid #d1d5db;
	border-radius: var(--radius);
}

html.dark .search-form {
	border-color: var(--border-color);
}

.search-form:focus-within {
	border-color: var(--color-primary);
}

.search-form__input {
	flex: 1;
	min-width: 0;
	width: 100%;
	padding: 4px 12px;
	border: 0;
	background: var(--bg-input);
	color: #374151;
	font-size: 12px;
	line-height: 16px;
}

html.dark .search-form__input {
	color: #e5e7eb;
}

.search-form__input::placeholder {
	color: #9ca3af;
}

html.dark .search-form__input::placeholder {
	color: #6b7280;
}

.search-form__input:focus {
	outline: none;
}

.search-form__btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px;
	border: 0;
	border-left: 1px solid #4b5563;
	background: #374151;
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	transition: background-color 0.15s ease;
}

html.dark .search-form__btn {
	border-left-color: #383842;
	background: #282830;
}

.search-form__btn .icon {
	width: 12px;
	height: 12px;
	stroke-width: 3;
}

.search-form__btn:hover {
	background: #1f2937;
	color: #fff;
}

html.dark .search-form__btn:hover {
	background: #34343e;
}

/* ---------- 5. Мобильное меню (как в мобильном макете) ---------- */

.drawer {
	position: fixed;
	inset: 0;
	z-index: 60;
}

.drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.drawer__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	width: 80%;
	max-width: 320px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-right: 1px solid var(--border-color);
	background: var(--bg-surface);
	box-shadow: var(--shadow-pop);
	transform: translateX(-100%);
	transition: transform 0.22s ease;
}

html.dark .drawer__panel {
	background: #1b1b20;
}

.drawer.is-open .drawer__overlay {
	opacity: 1;
}

.drawer.is-open .drawer__panel {
	transform: none;
}

.drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid var(--border-color);
}

.drawer__title {
	font-size: 16px;
	font-weight: 700;
}

.drawer__close {
	display: inline-flex;
	padding: 4px;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--text-muted);
}

.drawer__close:hover {
	color: var(--text-primary);
}

.drawer__close .icon {
	width: 24px;
	height: 24px;
}

.drawer__body {
	flex: 1;
	padding: 12px;
	overflow-y: auto;
}

.drawer__foot {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	border-top: 1px solid var(--border-subtle);
	background: #f9fafb;
	color: #6b7280;
	font-size: 12px;
}

html.dark .drawer__foot {
	border-top-color: var(--border-color);
	background: #16161a;
	color: #9ca3af;
}

.drawer__login {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 600;
}

.drawer__login .icon {
	width: 16px;
	height: 16px;
	color: var(--color-primary);
}

html.drawer-open body {
	overflow: hidden;
}

/* Рубрики в меню: одна колонка, крупнее. */
.drawer .cat-nav--drawer {
	display: grid;
	gap: 4px;
	overflow: visible;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 14px;
	line-height: 20px;
}

.drawer .cat-nav--drawer > * + * {
	border-top: 0;
}

.drawer .cat-nav--drawer .cat-nav__link,
.drawer .cat-nav--drawer .cat-nav__reset {
	padding: 8px 10px;
	border-radius: var(--radius);
	font-weight: 500;
}

.drawer .cat-nav--drawer .cat-nav__link:hover {
	background: #fef2f2;
	color: #b91c1c;
}

html.dark .drawer .cat-nav--drawer .cat-nav__link:hover {
	background: #282832;
	color: #f87171;
}

.drawer .cat-nav--drawer .cat-nav__icon {
	width: 20px;
	height: 20px;
	border: 0;
	background: #fee2e2;
	color: #dc2626;
	font-size: 12px;
}

html.dark .drawer .cat-nav--drawer .cat-nav__icon {
	background: rgba(69, 10, 10, 0.7);
	color: #f87171;
}

.drawer .cat-nav--drawer .cat-nav__link:hover .cat-nav__icon {
	background: #fee2e2;
	color: #dc2626;
}

.drawer .cat-nav--drawer .cat-nav__link.is-active .cat-nav__icon {
	background: var(--color-primary);
	color: #fff;
}

/* ---------- 6. Раскладка: колонка + контент ---------- */

.layout {
	display: grid;
	grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
	gap: var(--gap);
	align-items: start;
	padding-top: 20px;
	padding-bottom: 20px;
	flex: 1;
}

.layout--right {
	grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
}

.layout__sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.layout__main {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.layout__main > * {
	margin-top: 0;
	margin-bottom: 0;
}

.panel {
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

.panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px 8px;
	border-bottom: 1px solid var(--border-subtle);
}

.panel__title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.panel__link {
	color: var(--text-muted);
	font-size: 11px;
	font-weight: 600;
}

/* «+ Добавить рассказ» над рубрикатором */

.sidebar-add {
	min-height: 0;
	padding: 8px 12px;
	font-size: 12px;
	line-height: 16px;
}

.sidebar-add__plus {
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

/* Рубрикатор: строки с разделителями, квадратик «+» слева (как в макете). */

.cat-nav {
	overflow: hidden;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface);
	box-shadow: var(--shadow-sm);
	font-size: 12px;
	line-height: 16px;
}

.cat-nav__link,
.cat-nav__reset {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	color: #374151;
	transition: background-color 0.15s ease, color 0.15s ease;
}

html.dark .cat-nav__link,
html.dark .cat-nav__reset {
	color: #e2e2e8;
}

.cat-nav > * + * {
	border-top: 1px solid var(--border-subtle);
}

.cat-nav__link:hover,
.cat-nav__reset:hover {
	background: var(--bg-hover);
	color: var(--color-primary);
}

html.dark .cat-nav__link:hover,
html.dark .cat-nav__reset:hover {
	color: var(--color-primary);
}

.cat-nav__link--strong {
	font-weight: 600;
}

.cat-nav__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	border: 1px solid #ffe4e6;
	border-radius: var(--radius);
	background: #fef2f2;
	color: var(--color-primary);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

html.dark .cat-nav__icon {
	border-color: rgba(136, 19, 55, 0.5);
	background: rgba(76, 5, 25, 0.4);
}

.cat-nav__link:hover .cat-nav__icon,
.cat-nav__reset:hover .cat-nav__icon,
.cat-nav__link.is-active .cat-nav__icon {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: #fff;
}

.cat-nav__name {
	flex: 1;
	min-width: 0;
}

/* Выбранная рубрика: подсветка строки, «−» в залитом квадратике. */
.cat-nav__link.is-active {
	background: rgba(254, 242, 242, 0.7);
	color: var(--color-primary);
	font-weight: 600;
}

html.dark .cat-nav__link.is-active {
	background: #282832;
	color: var(--color-primary);
}

.cat-nav__reset {
	color: var(--text-muted);
	font-weight: 600;
}

/* Рекламный слот */

.sponsor {
	width: 100%;
	max-width: 300px;
	padding: 16px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface);
	box-shadow: var(--shadow-sm);
	text-align: center;
}

html.dark .sponsor {
	background: #1e1e24;
}

.layout__sidebar .sponsor {
	max-width: none;
}

.sponsor__head {
	display: flex;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-subtle);
	color: var(--text-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

html.dark .sponsor__head {
	border-bottom-color: #292933;
	color: #6b7280;
}

.sponsor__placeholder,
.sponsor__banner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	overflow: hidden;
	text-align: center;
}

.sponsor__placeholder {
	min-height: 420px;
	padding: 24px 8px;
}

.sponsor__banner img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sponsor__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 16px;
	border: 1px solid #ffe4e6;
	border-radius: 50%;
	background: #fef2f2;
	box-shadow: var(--shadow-sm);
	color: var(--color-primary);
}

html.dark .sponsor__icon {
	border-color: rgba(225, 29, 72, 0.2);
	background: rgba(225, 29, 72, 0.1);
}

.sponsor__icon .icon {
	width: 32px;
	height: 32px;
}

.sponsor__text {
	color: var(--text-primary);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.375;
}

.sponsor__banner > a,
.sponsor__banner > iframe {
	display: block;
	width: 100%;
	height: 100%;
}

/* Место над лентой 728×90: компьютеры и планшеты */
.sponsor--header_728x90 {
	max-width: 760px;
	margin: 0 auto;
}

.sponsor--header_728x90 .sponsor__placeholder {
	flex-direction: row;
	gap: 12px;
	min-height: 0;
	padding: 8px;
}

.sponsor--header_728x90 .sponsor__icon {
	width: 40px;
	height: 40px;
	margin: 0;
}

.sponsor--header_728x90 .sponsor__icon .icon {
	width: 18px;
	height: 18px;
}

.sponsor--header_728x90 .sponsor__text {
	font-size: 14px;
}

/* Мобильное место 300×250: в ленте и на 404, до 1023 px */
.sponsor--mobile_300x250 {
	margin: 0 auto;
}

.sponsor--mobile_300x250 .sponsor__placeholder {
	min-height: 0;
}

.sponsor--mobile_300x250 .sponsor__icon {
	width: 48px;
	height: 48px;
}

.sponsor--mobile_300x250 .sponsor__icon .icon {
	width: 24px;
	height: 24px;
}

.sponsor--mobile_300x250 .sponsor__text {
	font-size: 14px;
}

@media (min-width: 1024px) {
	.sponsor--mobile_300x250 {
		display: none;
	}
}

@media (max-width: 767px) {
	.sponsor--header_728x90 {
		display: none;
	}
}

/* ---------- 7. Заголовки страниц, лента, карточки ---------- */

.page-head__title {
	font-size: 20px;
	font-weight: 700;
}

.page-head__sub {
	margin-top: 2px;
	color: var(--text-muted);
	font-size: 12px;
}

/* Заголовок-панель (как «Все категории» в макете главной): по центру, красным. */
.page-head--banner {
	padding: 12px 20px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface);
	box-shadow: var(--shadow-card);
	text-align: center;
}

.page-head--banner .page-head__title {
	color: var(--color-primary);
	font-size: 18px;
	line-height: 28px;
}

.page-head__cat {
	white-space: nowrap;
}

.page-head__sep {
	opacity: 0.55;
	font-weight: 400;
}

.breadcrumbs ol {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	list-style: none;
	color: var(--text-muted);
	font-size: 12px;
	white-space: nowrap;
	scrollbar-width: none;
}

.breadcrumbs li {
	display: flex;
	align-items: center;
}

.breadcrumbs li + li::before {
	content: "/";
	margin-right: 6px;
	color: #d1d5db;
}

html.dark .breadcrumbs li + li::before {
	color: #3f3f46;
}

.breadcrumbs a:hover {
	color: var(--color-primary);
}

.breadcrumbs__home {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.breadcrumbs__home .icon {
	width: 14px;
	height: 14px;
}

.breadcrumbs [aria-current] {
	color: var(--text-primary);
	font-weight: 500;
}

html.dark .breadcrumbs [aria-current] {
	color: #e5e7eb;
}

.story-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Карточка рассказа */

.story-card {
	padding: 20px;
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

.story-card__title {
	margin-bottom: 4px;
	font-size: 18px;
	font-weight: 700;
	line-height: 28px;
}

.story-card__title a {
	color: var(--text-primary);
	transition: color 0.15s ease;
}

.story-card__title a:hover {
	color: var(--color-primary);
}

.dropcap-letter {
	color: var(--color-primary);
}

.story-card__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	color: var(--text-muted);
	font-size: 11px;
	line-height: 16px;
}

.story-tag {
	padding: 2px 6px;
	border-radius: var(--radius);
	background: #f3f4f6;
	color: #4b5563;
}

html.dark .story-tag {
	background: #2a2a34;
	color: #d1d1d8;
}

.story-tag:hover {
	color: inherit;
	text-decoration: underline;
}

html.dark .story-tag:hover {
	color: #d1d1d8;
}

/* Рубрика карточки, которая входит в текущий выбор (как в макете). */
.story-tag--active,
html.dark .story-tag--active {
	border: 1px solid #fecaca;
	background: #fff1f2;
	color: var(--color-primary);
	font-weight: 600;
}

html.dark .story-tag--active {
	border-color: rgba(225, 29, 72, 0.4);
	background: rgba(76, 5, 25, 0.6);
}

.story-tag--active:hover,
html.dark .story-tag--active:hover {
	color: var(--color-primary);
}

.story-card__excerpt {
	margin-bottom: 12px;
	color: #4b5563;
	font-size: 12px;
	line-height: 1.625;
}

html.dark .story-card__excerpt {
	color: #9ca3af;
}

/* Поиск: найденные слова в заголовке и в отрывке текста. */
.search-hit {
	padding: 0 2px;
	border-radius: 3px;
	background: #ffe4e6;
	color: #9f1239;
	font-weight: 700;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

html.dark .search-hit {
	background: rgba(225, 29, 72, 0.3);
	color: #fecdd3;
}

.story-card__title .search-hit .dropcap-letter {
	color: inherit;
}

/* Отрывок вокруг совпадения: показываем целиком, чтобы слово по центру не обрезалось. */
.story-card__excerpt--hit {
	display: block;
	overflow: visible;
	-webkit-line-clamp: unset;
	line-clamp: unset;
}

.story-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding-top: 8px;
	border-top: 1px solid #f9fafb;
	color: var(--text-muted);
	font-size: 11px;
	line-height: 16px;
}

html.dark .story-card__meta {
	border-top-color: #26262f;
}

.story-card__meta-left {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
}

.story-card__dot {
	color: #d1d5db;
}

html.dark .story-card__dot {
	color: #4b5563;
}

.meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.meta-item .icon {
	width: 12px;
	height: 12px;
	color: var(--text-muted);
}

html.dark .meta-item .icon {
	color: #6b7280;
}

.meta-item--author {
	color: #6b7280;
}

html.dark .meta-item--author {
	color: #9ca3af;
}

.part-badge {
	display: inline-flex;
	padding: 2px 6px;
	border: 1px solid #ffe4e6;
	border-radius: var(--radius);
	background: #fef2f2;
	color: var(--color-primary);
	font-size: 10px;
	font-weight: 500;
	line-height: 1.5;
}

html.dark .part-badge {
	border-color: rgba(136, 19, 55, 0.5);
	background: rgba(76, 5, 25, 0.4);
}

.story-card__more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--color-primary);
	font-weight: 600;
}

.story-card__more span {
	font-weight: 700;
	text-decoration: underline;
}

.story-card__more:hover {
	text-decoration: underline;
}

/* Бейджи рубрик (страница рассказа и др.) */

.tag-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px 6px;
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
	color: var(--text-secondary);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.5;
}

.tag-badge__plus {
	color: var(--color-primary);
	font-weight: 700;
}

.tag-badge:hover {
	background: var(--color-primary-subtle);
	color: var(--color-primary);
}

.tag-badge--active {
	box-shadow: inset 0 0 0 1px var(--color-primary-border);
	background: var(--color-primary-subtle);
	color: var(--color-primary);
	font-weight: 600;
}

/* Пагинация (квадраты 28×28, как в макете) */

.pagination ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin: 0;
	padding: 16px 0;
	list-style: none;
	font-size: 12px;
	font-weight: 500;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface);
	color: #374151;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.15s ease;
}

html.dark .pagination .page-numbers {
	color: #d1d5db;
}

.pagination a.page-numbers:hover {
	background: var(--bg-hover);
}

.pagination .page-numbers.current {
	border-color: #fecaca;
	background: var(--bg-surface);
	color: var(--color-primary);
	font-weight: 700;
}

html.dark .pagination .page-numbers.current {
	border-color: var(--color-primary);
	background: #222227;
	color: var(--color-primary);
}

.pagination .page-numbers.dots {
	min-width: 0;
	padding: 0 4px;
	border-color: transparent;
	background: transparent;
	color: var(--text-muted);
}

/* Пустое состояние */

.empty-state {
	padding: 32px;
	border: 1px dashed #fecaca;
	border-radius: var(--radius);
	background: var(--bg-surface);
	box-shadow: var(--shadow-card);
	text-align: center;
}

html.dark .empty-state {
	border-color: rgba(225, 29, 72, 0.3);
}

.empty-state__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #fef2f2;
	color: var(--color-primary);
}

html.dark .empty-state__icon {
	background: rgba(225, 29, 72, 0.1);
}

.empty-state__icon svg {
	width: 24px;
	height: 24px;
}

.empty-state > .icon {
	width: 40px;
	height: 40px;
	margin: 0 auto 12px;
	color: var(--color-primary);
}

.empty-state__title {
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: 700;
}

.empty-state__text,
.empty-state > p {
	max-width: 448px;
	margin: 0 auto;
	color: #6b7280;
	font-size: 12px;
}

html.dark .empty-state__text,
html.dark .empty-state > p {
	color: #9ca3af;
}

/* ---------- 8. Главная: «Топ за месяц» ---------- */

.top-month {
	padding: 16px;
}

.top-month__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-subtle);
}

html.dark .top-month__head {
	border-bottom-color: #292933;
}

.top-month__title {
	display: flex;
	align-items: center;
	gap: 4px;
	color: #1f2937;
	font-size: 14px;
	font-weight: 700;
}

html.dark .top-month__title {
	color: #f3f4f6;
}

.top-month__sub {
	color: var(--text-muted);
	font-size: 11px;
}

html.dark .top-month__sub {
	color: #6b7280;
}

.top-month__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	line-height: 16px;
}

.top-month__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px;
	border-radius: var(--radius);
	transition: background-color 0.15s ease;
}

.top-month__link:hover {
	background: var(--bg-hover);
}

.top-month__name {
	overflow: hidden;
	padding-right: 8px;
	color: #374151;
	text-overflow: ellipsis;
	white-space: nowrap;
}

html.dark .top-month__name {
	color: #d1d1d8;
}

.top-month__link:hover .top-month__name {
	color: var(--color-primary);
}

.top-month__num {
	flex: none;
	padding: 0 6px;
	border: 1px solid #fecaca;
	border-radius: var(--radius);
	background: rgba(254, 242, 242, 0.5);
	color: var(--color-primary);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 10px;
	font-weight: 700;
	line-height: 15px;
}

html.dark .top-month__num {
	border-color: rgba(136, 19, 55, 0.5);
	background: rgba(76, 5, 25, 0.3);
}

.feed-summary {
	color: var(--text-muted);
	font-size: 12px;
	text-align: center;
}

/* ---------- 9. Ридер ---------- */

/*
 * Размеры — из макета 03_Страницы_ПК/03_Чтение: карточка с рамкой без красной
 * полосы, заголовок 24px с красной буквой в квадрате, текст 15px / 1.8,
 * буквица Georgia, чипы рубрик 11px, компактная панель ридера.
 */

/* Полоса прогресса чтения под хлебными крошками */
.reading-progress {
	height: 4px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--bg-surface-elevated);
}

.reading-progress__bar {
	display: block;
	width: 5%;
	height: 100%;
	background: var(--color-primary);
	transition: width 0.15s linear;
}

.reader {
	padding: 24px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface);
	box-shadow: var(--shadow-sm);
}

.reader__head {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-bottom: 16px;
}

.reader__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.reader__part,
.reader__chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	font-size: 11px;
	line-height: 16px;
}

.reader__part {
	border-color: rgba(225, 29, 72, 0.2);
	background: rgba(225, 29, 72, 0.1);
	color: #e11d48;
	font-weight: 600;
}

html.dark .reader__part {
	background: rgba(225, 29, 72, 0.15);
	color: #f43f5e;
}

.reader__part .icon {
	width: 13px;
	height: 13px;
}

.reader__chip {
	background: var(--bg-surface-elevated);
	color: var(--text-secondary);
	font-weight: 500;
}

.reader__chip:hover {
	background: var(--bg-hover);
	color: var(--text-primary);
}

.reader__title {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.375;
	letter-spacing: -0.025em;
}

.reader__title .dropcap-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin-right: 4px;
	border-radius: var(--radius);
	background: var(--color-primary);
	color: #fff;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: 0;
	vertical-align: baseline;
	box-shadow: var(--shadow-sm);
}

.reader__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 4px;
}

.reader__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	color: var(--text-muted);
	font-size: 12px;
}

.reader__meta .meta-item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.reader__meta .meta-item .icon {
	width: 14px;
	height: 14px;
	color: #6b7280;
}

.reader__author {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--text-primary);
}

.reader__author-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: var(--radius);
	background: var(--color-primary);
	color: #fff;
	font-size: 18px;
	font-weight: 900;
	line-height: 1;
}

.reader__author-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.reader__author-name {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.reader__author-role {
	margin-top: 2px;
	color: var(--text-muted);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.reader__author:hover .reader__author-name {
	color: var(--color-primary);
}

.reader__tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* A− / A+ — одна рамка, как в макете */
.reader__font {
	display: inline-flex;
	padding: 2px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
}

.tool-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 2px 8px;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
}

.tool-btn:hover:not(:disabled) {
	background: var(--bg-hover);
	color: var(--text-primary);
}

.tool-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.tool-btn--mode {
	padding: 4px;
	border: 1px solid var(--border-color);
}

.tool-btn--mode .icon {
	width: 16px;
	height: 16px;
}

html.dark .tool-btn--mode .icon {
	color: var(--color-primary);
}

.tool-btn--mode .show-light {
	color: #f59e0b;
}

.show-dark {
	display: none;
}

html.dark .show-dark {
	display: inline;
}

html.dark .show-light {
	display: none;
}

.reader__body {
	padding-top: 8px;
	color: var(--text-body);
	font-family: var(--font-sans);
	font-size: calc(15px + var(--reader-step, 0) * 1.5px);
	line-height: 1.8;
	overflow-wrap: break-word;
}

html.dark .reader__body {
	color: #d1d5db;
}

.reader__body p {
	margin: 0;
}

.reader__body p + p,
.reader__body > * + * {
	margin-top: 16px;
}

.reader__body strong {
	font-weight: 700;
}

.reader__body blockquote {
	margin: 1em 0;
	padding-left: 18px;
	border-left: 3px solid var(--color-primary-border);
	font-style: italic;
}

/* Разделитель сцен «* * *» */
.reader__body hr {
	margin: 1.6em 0;
	border: 0;
	overflow: visible;
	text-align: center;
}

.reader__body hr::after {
	content: "* * *";
	color: var(--text-muted);
	letter-spacing: 0.5em;
}

/* Буквица: Georgia, красная, на две строки (как в макете) */
.reader__body > p:first-of-type::first-letter {
	float: left;
	margin: 2px 10px 0 0;
	color: var(--color-primary);
	font-family: var(--font-dropcap);
	font-size: 36px;
	font-weight: 700;
	line-height: 1;
}

/* Предпросмотр неопубликованного рассказа */
.preview-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 12px 16px;
	border: 1px dashed var(--status-pending);
	border-radius: var(--radius);
	background: color-mix(in srgb, var(--status-pending) 8%, var(--bg-surface));
	font-size: 14px;
}

.preview-banner p {
	flex: 1;
	min-width: 220px;
}

.preview-banner > .icon {
	color: var(--status-pending);
}

.preview-banner .btn--sm {
	min-height: 32px;
	padding: 4px 12px;
	font-size: 13px;
}

/* Аватар-монограмма */

.avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-sans);
	font-weight: 700;
	line-height: 1;
}

.avatar--sm {
	width: 28px;
	height: 28px;
	font-size: 14px;
}

.avatar--md {
	width: 48px;
	height: 48px;
	font-size: 18px;
	background: var(--bg-surface-elevated);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

.avatar--lg {
	width: 88px;
	height: 88px;
	font-size: 38px;
	box-shadow: 0 0 0 6px var(--color-primary-subtle);
}

.role-badge {
	display: inline-flex;
	padding: 1px 6px;
	border-radius: var(--radius);
	background: var(--color-primary);
	color: #fff;
	font-family: var(--font-sans);
	font-size: 10px;
	font-weight: 600;
	line-height: 14px;
	text-transform: uppercase;
	vertical-align: middle;
}

/* Кнопка лайка */

.like-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid var(--color-primary);
	border-radius: var(--radius);
	background: transparent;
	color: var(--color-primary);
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.like-btn .icon {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.like-btn:hover {
	background: var(--color-primary-subtle);
}

.like-btn[aria-pressed="true"] {
	background: var(--color-primary);
	color: #fff;
}

.like-btn__count {
	font-variant-numeric: tabular-nums;
}

/* Лайк в панели ридера: мягкий красный, после нажатия — залитый */
.like-btn--compact {
	gap: 4px;
	padding: 4px 10px;
	border-color: rgba(225, 29, 72, 0.3);
	background: rgba(225, 29, 72, 0.1);
	color: #e11d48;
	font-weight: 600;
	box-shadow: var(--shadow-sm);
}

html.dark .like-btn--compact {
	background: rgba(225, 29, 72, 0.15);
	color: #f43f5e;
}

.like-btn--compact:hover,
html.dark .like-btn--compact:hover {
	background: rgba(225, 29, 72, 0.25);
}

.like-btn--compact[aria-pressed="true"],
html.dark .like-btn--compact[aria-pressed="true"] {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: #fff;
}

/* Лайк под рассказом: залитая красная кнопка */
.like-btn--solid {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: #fff;
	box-shadow: var(--shadow-sm);
}

.like-btn--solid:hover {
	border-color: #be123c;
	background: #be123c;
}

.like-btn--solid[aria-pressed="true"] {
	box-shadow: 0 0 0 2px var(--bg-app), 0 0 0 4px #f43f5e;
}

.like-btn[aria-busy="true"] {
	opacity: 0.7;
}

.like-btn.is-pop .icon {
	animation: on-pop 0.35s ease;
}

@keyframes on-pop {
	50% {
		transform: scale(1.35);
	}
}

/* Оглавление серии */

.series-toc {
	margin-top: 32px;
	padding: 16px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
}

.series-toc__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.series-toc__title {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 700;
}

.series-toc__title .icon {
	width: 18px;
	height: 18px;
	color: var(--color-primary);
}

.series-toc__count {
	color: var(--text-muted);
	font-size: 11px;
}

.series-toc__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.series-toc__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid transparent;
	border-radius: var(--radius);
	color: var(--text-secondary);
}

.series-toc__link:hover {
	border-color: var(--border-color);
	background: var(--bg-surface);
	color: var(--text-primary);
}

.series-toc__item.is-current .series-toc__link {
	border-color: var(--border-color);
	background: var(--bg-surface);
	color: var(--text-primary);
}

.series-toc__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--border-color);
	color: var(--text-secondary);
	font-size: 10px;
	font-weight: 700;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.series-toc__item.is-current .series-toc__num,
.series-toc__link:hover .series-toc__num {
	background: var(--color-primary);
	color: #fff;
}

.series-toc__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.series-toc__name {
	overflow: hidden;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.series-toc__sub {
	color: var(--text-muted);
	font-size: 10px;
	line-height: 14px;
}

.series-toc__item.is-current .series-toc__sub {
	color: #e11d48;
	font-weight: 500;
}

html.dark .series-toc__item.is-current .series-toc__sub {
	color: #f43f5e;
}

.series-toc__state {
	flex-shrink: 0;
	color: var(--text-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	text-transform: uppercase;
}

.series-toc__arrow {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	color: var(--text-muted);
	transition: transform 0.15s ease, color 0.15s ease;
}

.series-toc__link:hover .series-toc__arrow {
	color: var(--color-primary);
	transform: translateX(2px);
}

.series-toc__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--border-color);
	color: var(--text-muted);
	font-size: 12px;
}

.series-toc__foot .btn {
	gap: 8px;
	min-height: 0;
	padding: 10px 20px;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
}

.series-toc__foot .btn .icon {
	width: 14px;
	height: 14px;
}

.series-toc__item.is-soon .series-toc__link {
	cursor: default;
}

.series-toc__item.is-soon .series-toc__link:hover {
	border-color: transparent;
	background: transparent;
}

.series-toc__item.is-soon .series-toc__num,
.series-toc__item.is-soon .series-toc__link:hover .series-toc__num {
	border: 1px dashed var(--border-color);
	background: transparent;
	color: var(--text-muted);
}

.series-toc__item.is-soon .series-toc__name {
	color: var(--text-muted);
	font-weight: 500;
}

/* Блок автора */

.author-box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 24px;
	padding: 16px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-app);
	box-shadow: var(--shadow-sm);
}

.author-box > .avatar {
	order: 0;
}

.author-box__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.author-box__name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
}

.author-box__name a:hover {
	color: var(--color-primary-hover);
}

.author-box__bio {
	display: -webkit-box;
	margin-top: 2px;
	overflow: hidden;
	color: var(--text-secondary);
	font-size: 12px;
	line-height: 1.5;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
}

.author-box__all {
	align-self: flex-start;
	margin-top: 4px;
	color: #e11d48;
	font-size: 11px;
	text-decoration: underline;
}

html.dark .author-box__all {
	color: #f43f5e;
}

.author-box__all:hover {
	color: var(--text-primary);
}

.author-box__like {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 12px;
}

.author-box__score {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
}

.author-box__like-label {
	color: var(--text-muted);
	font-size: 11px;
}

.author-box__like-total {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 700;
}

.author-box__like-total .icon {
	width: 14px;
	height: 14px;
	color: var(--color-primary);
	fill: currentColor;
}

/* Компактный список: похожие / популярные */

.compact-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.compact-list__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.compact-list__title {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.compact-list__title::before {
	content: "";
	flex-shrink: 0;
	width: 6px;
	height: 14px;
	border-radius: 2px;
	background: var(--color-primary);
}

.compact-list__more {
	flex-shrink: 0;
	color: var(--color-primary);
	font-size: 12px;
	font-weight: 500;
}

.compact-list__more:hover {
	text-decoration: underline;
}

.compact-list__items {
	margin: 0;
	padding: 0;
	overflow: hidden;
	list-style: none;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface);
	box-shadow: var(--shadow-sm);
}

.compact-list__item + .compact-list__item {
	border-top: 1px solid var(--border-color);
}

.compact-list__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 14px;
}

.compact-list__link:hover {
	background: var(--bg-surface-elevated);
	color: inherit;
}

.compact-list__link:hover .compact-list__name {
	color: var(--color-primary-hover);
}

.compact-list__main {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.compact-list__row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.compact-list__time {
	flex-shrink: 0;
	color: var(--text-muted);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
}

.compact-list__name {
	overflow: hidden;
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.15s ease;
}

html.dark .compact-list__name {
	color: #e5e7eb;
}

.compact-list__excerpt {
	margin-top: 2px;
	overflow: hidden;
	color: var(--text-muted);
	font-size: 11px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.compact-list__side {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
	color: var(--text-muted);
	font-size: 11px;
}

.compact-list__likes {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: var(--color-primary);
	font-weight: 600;
}

.compact-list__likes .icon {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

/* ---------- 10. Профиль автора ---------- */

/*
 * Размеры — из макета 03_Страницы_ПК/05_Профиль_автора: карточка с отступом 24px
 * и красным свечением в углу, аватар 80px, имя 24px, «о себе» в рамке,
 * статистика в отдельной плашке, вкладки 12px, карточки рассказов «в рамке».
 */

.profile {
	position: relative;
	overflow: hidden;
	padding: 24px;
	border-radius: 8px;
}

.profile::before {
	content: "";
	position: absolute;
	top: -64px;
	right: -64px;
	width: 224px;
	height: 224px;
	border-radius: 50%;
	background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), transparent);
	filter: blur(40px);
	pointer-events: none;
}

.profile__top {
	position: relative;
	display: flex;
	align-items: center;
	gap: 20px;
}

.profile .avatar--lg {
	width: 80px;
	height: 80px;
	border: 2px solid var(--border-color);
	background: #dc2626;
	font-size: 30px;
	font-weight: 900;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.25);
}

.profile__info {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.profile__name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.025em;
}

.profile__badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 10px;
	border: 1px solid #a7f3d0;
	border-radius: 999px;
	background: #ecfdf5;
	color: #047857;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0;
}

html.dark .profile__badge {
	border-color: rgba(6, 95, 70, 0.5);
	background: rgba(2, 44, 34, 0.6);
	color: #34d399;
}

.profile__badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

.profile__since {
	margin-top: 4px;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 500;
}

.profile__since .icon {
	display: inline-block;
	width: 15px;
	height: 15px;
	margin-right: 4px;
	vertical-align: -3px;
	color: #71717a;
}

.profile__bio {
	max-width: 672px;
	margin: 12px 0 0;
	padding: 12px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: var(--bg-surface-elevated);
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.625;
}

.profile__stats {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 24px 0 0;
	padding: 12px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	background: var(--bg-surface-elevated);
}

.profile__stats > div {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 8px;
	text-align: center;
}

.profile__stats dt {
	color: var(--text-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.profile__stats dd {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	color: var(--text-primary);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.025em;
	font-variant-numeric: tabular-nums;
}

.profile__stats dd.is-accent {
	color: #ef4444;
}

.profile__stats dd .icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Вкладки и поиск по рассказам автора */

.tabs-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px;
	border-radius: 8px;
}

.tabs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	font-size: 12px;
	scrollbar-width: none;
}

.tabs__item {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 14px;
	border-radius: 6px;
	color: var(--text-muted);
	font-weight: 500;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tabs__item:hover {
	background: var(--bg-surface-elevated);
	color: var(--text-primary);
}

.tabs__item[aria-current="page"] {
	background: #dc2626;
	color: #fff;
	font-weight: 600;
	box-shadow: var(--shadow-sm);
}

.tabs__count {
	color: #71717a;
}

.tabs__item[aria-current="page"] .tabs__count {
	color: inherit;
	opacity: 0.8;
}

.tabs-bar__tools {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	max-width: 512px;
}

.tabs-bar__search {
	position: relative;
	flex: 1;
}

.tabs-bar__search .icon {
	position: absolute;
	top: 50%;
	left: 10px;
	width: 16px;
	height: 16px;
	color: #71717a;
	transform: translateY(-50%);
	pointer-events: none;
}

.tabs-bar .input {
	height: auto;
	padding: 6px 10px;
	border-radius: 6px;
	background: var(--bg-surface-elevated);
	color: var(--text-secondary);
	font-size: 12px;
	font-weight: 500;
}

.tabs-bar__search .input {
	width: 100%;
	padding-left: 32px;
	color: var(--text-primary);
	font-weight: 400;
}

.tabs-bar .input:focus {
	border-color: #dc2626;
}

/* Карточка рассказа «в рамке» (лента профиля автора) */

.story-card--boxed {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
	border-radius: 8px;
	transition: border-color 0.15s ease;
}

.story-card--boxed:hover {
	border-color: #d1d5db;
}

html.dark .story-card--boxed:hover {
	border-color: #3f3f46;
}

.story-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.story-card__head-main {
	flex: 1;
	min-width: 0;
}

.story-card.story-card--boxed .story-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.375;
}

.story-card--boxed:hover .story-card__title a {
	color: #ef4444;
}

html.dark .story-card--boxed:hover .story-card__title a {
	color: #f87171;
}

.story-card.story-card--boxed .story-card__title .dropcap-letter {
	display: inline-block;
	width: 24px;
	height: 24px;
	margin-right: 6px;
	border: 1px solid rgba(220, 38, 38, 0.3);
	border-radius: var(--radius);
	background: rgba(220, 38, 38, 0.12);
	color: #dc2626;
	font-size: 14px;
	font-weight: 900;
	line-height: 22px;
	text-align: center;
	vertical-align: middle;
}

html.dark .story-card.story-card--boxed .story-card__title .dropcap-letter {
	background: rgba(220, 38, 38, 0.2);
	color: #f87171;
}

.story-card__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.story-chip {
	padding: 2px 8px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
	color: var(--text-muted);
	font-size: 11px;
	font-weight: 500;
	line-height: 16px;
}

.story-chip:hover {
	color: var(--text-primary);
}

.story-chip--main {
	border-color: rgba(220, 38, 38, 0.3);
	background: rgba(220, 38, 38, 0.1);
	color: #dc2626;
	font-weight: 600;
}

html.dark .story-chip--main {
	background: rgba(220, 38, 38, 0.15);
	color: #f87171;
}

.story-card__part-chip {
	flex-shrink: 0;
	padding: 4px 10px;
	border: 1px solid #bae6fd;
	border-radius: var(--radius);
	background: #f0f9ff;
	color: #0369a1;
	font-size: 11px;
	font-weight: 600;
	line-height: 16px;
}

.story-card__part-chip.is-series {
	border-color: #fde68a;
	background: #fffbeb;
	color: #b45309;
}

html.dark .story-card__part-chip {
	border-color: rgba(7, 89, 133, 0.4);
	background: rgba(8, 47, 73, 0.4);
	color: #38bdf8;
}

html.dark .story-card__part-chip.is-series {
	border-color: rgba(146, 64, 14, 0.4);
	background: rgba(69, 26, 3, 0.4);
	color: #fbbf24;
}

.story-card.story-card--boxed .story-card__excerpt {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: var(--text-muted);
	font-size: 12px;
	line-height: 1.625;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.story-card__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: var(--bg-surface-elevated);
	color: var(--text-muted);
	font-size: 12px;
}

.story-card__bar-left {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.story-card__bar-left > * {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.story-card__bar .icon {
	width: 15px;
	height: 15px;
}

.story-card__bar-time {
	color: var(--text-secondary);
	font-weight: 500;
}

.story-card__bar-time .icon,
.story-card__bar-date {
	color: #71717a;
}

.story-card__bar-date {
	font-size: 11px;
}

.story-card__bar-date .icon {
	width: 14px;
	height: 14px;
}

.story-card__bar-author .icon {
	color: #dc2626;
}

.story-card__bar-author span {
	color: var(--text-primary);
	font-weight: 600;
}

.story-card__bar-likes {
	margin-left: 4px;
	color: #e11d48;
	font-weight: 600;
}

html.dark .story-card__bar-likes {
	color: #fb7185;
}

.story-card__bar-likes .icon {
	color: #f43f5e;
}

.story-card__bar-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #ef4444;
	font-weight: 600;
}

html.dark .story-card__bar-more {
	color: #f87171;
}

.story-card__bar-more .icon {
	width: 14px;
	height: 14px;
	transition: transform 0.15s ease;
}

.story-card__bar-more:hover .icon {
	transform: translateX(2px);
}

/* «Показано 1–4 из 24 рассказов» + номера страниц */
.feed-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 8px;
}

.feed-foot .feed-summary {
	color: var(--text-muted);
	font-size: 12px;
	text-align: left;
}

.feed-foot .feed-summary strong {
	color: var(--text-primary);
	font-weight: 600;
}

.feed-foot .pagination {
	margin: 0;
}

.input {
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-app);
	color: var(--text-primary);
	font-size: 14px;
}

.input:focus {
	outline: none;
	border-color: var(--color-primary);
}

.input--sm {
	height: 36px;
	font-size: 13px;
}

.series-card {
	padding: 20px 22px;
}

.series-card__title {
	font-size: 21px;
}

.series-card__sub {
	margin-top: 2px;
	color: var(--text-muted);
	font-size: 13px;
}

.series-card__parts {
	margin: 12px 0 0;
	padding-left: 20px;
	font-size: 14.5px;
	line-height: 1.9;
}

.series-card__time {
	color: var(--text-muted);
	font-size: 12.5px;
}

.prose-page {
	padding: 32px 40px;
}

.prose {
	margin-top: 16px;
	font-size: 16px;
	line-height: 1.7;
}

.prose p + p {
	margin-top: 1em;
}

.error-404 {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 40px 32px;
	text-align: center;
	background:
		radial-gradient(ellipse 55% 50% at 50% 30%, var(--color-primary-subtle), transparent 70%),
		var(--bg-surface);
}

.error-404__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border: 1px solid var(--color-primary-border);
	border-radius: var(--radius-sm);
	color: var(--color-primary);
	font-size: 12px;
	font-weight: 600;
}

.error-404__chip .icon {
	width: 14px;
	height: 14px;
}

.error-404__code {
	color: var(--color-primary);
	font-family: var(--font-serif);
	font-size: 116px;
	font-weight: 900;
	line-height: 1;
	text-shadow: 0 0 40px var(--color-primary-border);
}

.error-404__title {
	font-size: 26px;
	line-height: 1.3;
	font-weight: 700;
}

.error-404__text {
	max-width: 576px;
	color: var(--text-secondary);
	font-size: 15px;
	line-height: 1.625;
}

.error-404 .search-form {
	width: min(480px, 100%);
}

.error-404 .search-form__input {
	width: auto;
}

.error-404__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 8px;
}

.error-404__actions .btn {
	min-height: 38px;
	font-size: 13px;
	font-weight: 600;
}

.error-404 .search-form__input,
.error-404 .search-form__btn {
	height: 38px;
}

.error-404 .search-form .search-form__btn {
	border-color: var(--color-primary);
	background: var(--color-primary);
	color: #fff;
	font-weight: 600;
}

.error-404 .search-form .search-form__btn:hover {
	background: var(--color-primary-hover, #be123c);
}

/* Популярные на 404 — карточки «в рамке», как в макете 09_404. */
.popular-404 {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.popular-404 .story-list {
	gap: 12px;
}

/* ---------- Расширенный поиск ---------- */

/*
 * Размеры — из макета 03_Страницы_ПК/04_Расширенный_поиск: панели с отступом 16px,
 * заголовок 20px, строка формулы высотой 40px моноширинным 12px,
 * операторы моноширинным 11px, таблица синтаксиса 12px.
 */

.adv-search__intro {
	padding: 16px;
}

.adv-search__title {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #e11d48;
	font-family: var(--font-sans);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.025em;
}

html.dark .adv-search__title {
	color: #fb7185;
}

.adv-search__title .icon {
	width: 24px;
	height: 24px;
	color: var(--color-primary);
}

html.dark .adv-search__title .icon {
	color: #f43f5e;
}

.adv-search__intro p {
	margin-top: 4px;
	color: var(--text-muted);
	font-size: 12px;
}

.adv-search__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.adv-search__box {
	padding: 16px;
}

.adv-search__label {
	display: block;
	margin-bottom: 6px;
	color: var(--text-primary);
	font-size: 12px;
	font-weight: 600;
}

.adv-search__row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.adv-search__fx {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
	color: var(--text-muted);
	font-family: var(--font-dropcap);
	font-size: 14px;
	font-style: italic;
	font-weight: 700;
}

.adv-search__input {
	flex: 1;
	min-width: 0;
	height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-app);
	color: var(--text-primary);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
}

.adv-search__input:focus {
	outline: none;
	border-color: #f43f5e;
	box-shadow: 0 0 0 1px #f43f5e;
}

.adv-search__reset,
.adv-search__submit {
	flex-shrink: 0;
	min-height: 0;
	height: 40px;
	font-size: 12px;
}

.adv-search__reset {
	gap: 4px;
	padding: 0 12px;
	border: 1px solid var(--border-color);
	color: var(--text-muted);
	font-weight: 500;
}

.adv-search__reset .icon,
.adv-search__submit .icon {
	width: 16px;
	height: 16px;
}

.adv-search__submit {
	gap: 6px;
	padding: 0 20px;
	background: #be123c;
	font-weight: 600;
	box-shadow: var(--shadow-sm);
}

.adv-search__submit:hover {
	background: #dc2626;
}

.adv-search__error {
	margin-bottom: 8px;
	padding: 8px 12px;
	border-left: 3px solid var(--status-rejected);
	border-radius: 0 var(--radius) var(--radius) 0;
	background: var(--color-primary-subtle);
	color: var(--text-primary);
	font-size: 12px;
}

.adv-search__ops {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding-top: 8px;
	border-top: 1px solid var(--border-color);
}

.adv-search__ops-label {
	margin-right: 4px;
	color: var(--text-muted);
	font-size: 11px;
	font-weight: 500;
}

.op-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
	color: var(--text-primary);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11px;
	line-height: 16px;
	transition: background-color 0.15s ease;
}

.op-chip code {
	font-family: inherit;
	font-weight: inherit;
}

.op-chip:hover {
	background: var(--bg-hover);
}

.op-chip--logic {
	color: #e11d48;
	font-weight: 700;
}

html.dark .op-chip--logic {
	color: #fb7185;
}

.op-chip--accent {
	border-color: #fecdd3;
	background: #fff1f2;
	color: #be123c;
	font-weight: 500;
}

html.dark .op-chip--accent {
	border-color: rgba(136, 19, 55, 0.6);
	background: rgba(76, 5, 25, 0.4);
	color: #fda4af;
}

html.dark .op-chip--accent:hover {
	background: rgba(136, 19, 55, 0.6);
}

/* Таблица синтаксиса */

.adv-search__syntax {
	overflow: hidden;
}

.adv-search__syntax-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	padding: 12px 16px;
	background: var(--bg-app);
	cursor: pointer;
	list-style: none;
}

.adv-search__syntax-head::-webkit-details-marker {
	display: none;
}

.adv-search__syntax[open] .adv-search__syntax-head {
	border-bottom: 1px solid var(--border-color);
}

.adv-search__syntax-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.025em;
}

.dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #f43f5e;
	box-shadow: var(--shadow-sm);
}

.adv-search__syntax-hint {
	color: var(--text-muted);
	font-size: 11px;
}

.syntax-table {
	overflow-x: auto;
}

.syntax-table__row {
	display: grid;
	grid-template-columns: 112px minmax(0, 1fr) 256px minmax(0, 1.1fr);
	align-items: center;
	padding: 0;
	font-size: 12px;
}

.syntax-table__row > * {
	padding: 10px 16px;
}

.syntax-table__row + .syntax-table__row {
	border-top: 1px solid var(--border-color);
}

.syntax-table__row:not(.syntax-table__row--head):hover {
	background: var(--bg-surface-elevated);
}

.syntax-table__row--head {
	background: var(--bg-surface-elevated);
	color: var(--text-muted);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

html.dark .syntax-table__row--head {
	background: #17171a;
}

.syntax-table__sym code {
	display: inline-block;
	padding: 2px 6px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
	color: var(--text-primary);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11px;
	font-weight: 700;
}

.syntax-table__sym code.is-accent {
	border-color: #fecdd3;
	background: #fff1f2;
	color: #be123c;
}

html.dark .syntax-table__sym code.is-accent {
	border-color: rgba(136, 19, 55, 0.6);
	background: rgba(76, 5, 25, 0.4);
	color: #fda4af;
}

.syntax-table__what {
	color: var(--text-secondary);
}

.syntax-table__example {
	padding: 2px 8px;
	border: 1px solid #fcd34d;
	border-radius: var(--radius);
	background: #fffbeb;
	color: #92400e;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11px;
	text-align: left;
}

html.dark .syntax-table__example {
	border-color: rgba(113, 63, 18, 0.6);
	background: rgba(66, 32, 6, 0.4);
	color: #fde047;
}

.syntax-table__example:hover {
	border-color: var(--color-primary);
}

.syntax-table__how {
	color: var(--text-muted);
	font-size: 12px;
}

/* Фильтры */

.adv-search__filters {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	padding: 14px;
	color: var(--text-secondary);
	font-size: 12px;
}

.filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.filter__label {
	margin-bottom: 2px;
	padding: 0;
	color: var(--text-primary);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.filter .input {
	height: auto;
	padding: 6px;
	font-size: 12px;
}

.filter--cats {
	grid-column: 1 / -1;
	padding-top: 10px;
	border-top: 1px solid var(--border-color);
}

.filter--cats summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	list-style: none;
}

.filter--cats summary::-webkit-details-marker {
	display: none;
}

.filter--cats summary .icon {
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
}

.filter--cats[open] summary .icon {
	transform: rotate(180deg);
}

.filter__cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 4px 16px;
	margin-top: 8px;
}

.check {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--text-secondary);
	font-size: 12px;
	cursor: pointer;
}

.check input {
	width: 14px;
	height: 14px;
	margin: 0;
	accent-color: #e11d48;
	flex-shrink: 0;
}

/* Результаты */

.adv-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-color);
}

.adv-results__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 700;
}

.adv-results__count {
	padding: 2px 8px;
	border: 1px solid var(--border-color);
	border-radius: var(--radius);
	background: var(--bg-surface-elevated);
	color: #e11d48;
	font-size: 12px;
	font-weight: 600;
}

html.dark .adv-results__count {
	color: #fb7185;
}

.adv-results__sort {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--text-muted);
	font-size: 11px;
}

.adv-results__sort .input {
	height: auto;
	padding: 2px 4px;
	border-color: transparent;
	background: transparent;
	color: var(--text-primary);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
}

.adv-results__sort .input:hover,
.adv-results__sort .input:focus {
	border-color: var(--border-color);
}

/* ---------- 9. Подвал (как в макете: тёмная полоса в обеих темах) ---------- */

.site-footer {
	margin-top: 12px;
	border-top: 1px solid #374151;
	background: #232429;
	color: #9ca3af;
	font-size: 12px;
}

html.dark .site-footer {
	border-top-color: #25252b;
	background: #0e0e10;
	color: #6b7280;
}

.site-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding-top: 24px;
	padding-bottom: 24px;
	text-align: center;
}

.site-footer__copy {
	color: #d1d5db;
}

html.dark .site-footer__copy {
	color: #9ca3af;
}

.site-footer__copy strong {
	color: #fff;
	font-weight: 600;
}

.site-footer__link {
	margin-left: 4px;
	color: #9ca3af;
	text-decoration: underline;
}

.site-footer__link:hover {
	color: #fff;
}

.site-footer__disclaimer {
	max-width: 672px;
	color: #9ca3af;
	font-size: 11px;
	line-height: 1.5;
}

html.dark .site-footer__disclaimer {
	color: #6b7280;
}
/* ---------- 10. Возрастной гейт 18+ ---------- */

.age-gate {
	display: none;
}

html.age-locked .age-gate {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: block;
	overflow-y: auto;
	overscroll-behavior: contain;
	background:
		radial-gradient(ellipse 60% 45% at 50% 18%, var(--color-primary-subtle), transparent 70%),
		var(--bg-app);
}

html.age-locked body {
	overflow: hidden;
}

/* Содержимое под гейтом не читается экранными дикторами, пока гейт открыт. */
html.age-locked .site-header,
html.age-locked .layout,
html.age-locked .site-footer,
html.age-locked .drawer {
	visibility: hidden;
}

.age-gate__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: min(608px, 100%);
	min-height: 100%;
	margin: 0 auto;
	padding: 28px 16px 32px;
}

.age-gate__brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.age-gate__brand-name {
	font-family: var(--font-serif);
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.age-gate__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 40px;
	background: var(--bg-surface);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-pop);
	text-align: center;
}

.age-gate__badge {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	margin-bottom: 6px;
	border-radius: 50%;
	background: var(--color-primary);
	color: #fff;
	box-shadow: 0 0 0 8px var(--color-primary-subtle);
}

.age-gate__badge-num {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
}

.age-gate__badge-sub {
	margin-top: 2px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.9;
}

.age-gate__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--color-primary-subtle);
	color: var(--color-primary);
	font-size: 11px;
	font-weight: 600;
}

.age-gate__chip .icon {
	width: 15px;
	height: 15px;
}

/* В макете 40px антиквой; рубленый Arial шире — 36px, чтобы заголовок встал в одну строку. */
.age-gate__title {
	font-size: 36px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.age-gate__lead {
	max-width: 496px;
	color: var(--text-secondary);
	font-size: 15px;
	line-height: 1.6;
}

.age-gate__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	margin: 6px 0 0;
	padding: 16px;
	list-style: none;
	border-radius: var(--radius-lg);
	background: var(--bg-surface-elevated);
	text-align: left;
	font-size: 13px;
	line-height: 20px;
}

.age-gate__list li {
	display: flex;
	gap: 10px;
}

.age-gate__list .icon {
	margin-top: 1px;
	color: var(--color-primary);
}

.age-gate__remember {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	text-align: left;
}

.age-gate__remember input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--color-primary);
	flex-shrink: 0;
}

.age-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	margin-top: 4px;
}

#age-gate-enter {
	min-height: 56px;
	font-size: 16px;
}

#age-gate-leave {
	min-height: 48px;
}

.age-gate__legal {
	color: var(--text-muted);
	font-size: 12.5px;
	line-height: 1.6;
	text-align: center;
}

.age-gate__links a {
	color: var(--text-secondary);
	font-size: 12.5px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- 11. Адаптивность ---------- */

/* Элементы мобильной шапки, блок рубрик-аккордеон, «Загрузить ещё» и верх карточки —
   только на телефоне и планшете. */
.site-header__tool,
.site-header__search-bar,
.cat-box__summary,
.story-card__top,
.load-more,
.site-footer__badge {
	display: none;
}

.cat-box {
	display: block;
}

.cat-box > .cat-nav {
	display: block;
}

/* Планшеты и телефоны (мобильный макет главной) */
@media (max-width: 1023px) {
	:root {
		--header-h: 53px;
	}

	.site-header__inner {
		gap: 8px;
		padding: 10px 16px;
	}

	/* Логотип: красный квадрат без градиента, «OldNewspaper» без цветной части. */
	.brand {
		gap: 8px;
	}

	.brand__mark {
		border-radius: 8px;
		background: #dc2626;
		font-size: 16px;
		font-weight: 900;
	}

	.brand__name {
		gap: 4px;
		font-size: 16px;
		font-weight: 900;
	}

	.brand__accent {
		color: inherit;
	}

	.brand__name .badge-18 {
		background: #dc2626;
		font-size: 12px;
	}

	.brand__tagline {
		font-size: 9px;
		font-weight: 500;
		letter-spacing: 0.05em;
	}

	.site-header__actions {
		gap: 6px;
	}

	.site-header__search-desktop,
	.site-header__login {
		display: none;
	}

	.site-header__advanced {
		order: 1;
		flex-shrink: 0;
		padding: 6px 10px;
		border-radius: 8px;
		background: #dc2626;
	}

	/* Тема — только значок; режим «Авто» помечен буквой «A». */
	.site-header .theme-toggle {
		position: relative;
		order: 2;
		padding: 8px;
		border: 0;
		border-radius: 8px;
		background: transparent;
		box-shadow: none;
	}

	.site-header .theme-toggle .icon {
		width: 20px;
		height: 20px;
	}

	.site-header .theme-toggle__label {
		display: none !important;
	}

	.site-header .theme-toggle__icon--auto {
		color: #4b5563;
	}

	html.dark .site-header .theme-toggle__icon--auto {
		color: #d1d5db;
	}

	html:not([data-theme-mode]) .site-header .theme-toggle::after,
	html[data-theme-mode="auto"] .site-header .theme-toggle::after {
		content: "A";
		position: absolute;
		right: 4px;
		bottom: 4px;
		padding: 0 2px;
		border-radius: 2px;
		background: #dc2626;
		color: #fff;
		font-size: 8px;
		font-weight: 800;
		line-height: 1.1;
	}

	.site-header__tool {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 8px;
		border: 0;
		border-radius: 8px;
		background: transparent;
		color: #4b5563;
	}

	html.dark .site-header__tool {
		color: #d1d5db;
	}

	.site-header__tool:hover {
		color: var(--text-primary);
	}

	.site-header__tool:active {
		background: var(--bg-surface-elevated);
	}

	.site-header__tool .icon {
		width: 20px;
		height: 20px;
	}

	.site-header__search-toggle {
		order: 3;
	}

	.site-header__burger {
		order: 4;
	}

	.site-header__burger:hover {
		color: #dc2626;
	}

	/* Строка поиска под шапкой (раскрывается лупой). */
	.site-header__search-bar:not([hidden]) {
		display: block;
		padding: 4px 16px 12px;
		border-top: 1px solid var(--border-subtle);
		background: rgba(249, 250, 251, 0.7);
	}

	html.dark .site-header__search-bar:not([hidden]) {
		border-top-color: var(--border-color);
		background: #16161a;
	}

	.search-form--mobile {
		gap: 8px;
		width: 100%;
		overflow: visible;
		border: 0;
	}

	.search-form--mobile .search-form__field {
		position: relative;
		flex: 1;
	}

	.search-form--mobile .search-form__field .icon {
		position: absolute;
		top: 10px;
		left: 12px;
		width: 16px;
		height: 16px;
		color: var(--text-muted);
	}

	.search-form--mobile .search-form__input {
		padding: 8px 12px 8px 36px;
		border: 1px solid #d1d5db;
		border-radius: 8px;
		font-size: 14px;
		line-height: 20px;
	}

	html.dark .search-form--mobile .search-form__input {
		border-color: var(--border-color);
		background: #212127;
	}

	.search-form--mobile .search-form__input:focus {
		border-color: #dc2626;
		box-shadow: 0 0 0 1px #dc2626;
	}

	.search-form--mobile .search-form__btn {
		padding: 8px 16px;
		border: 0;
		border-radius: 8px;
		background: #1f2937;
		font-weight: 600;
	}

	html.dark .search-form--mobile .search-form__btn {
		background: #dc2626;
	}

	/* Раскладка: одна колонка, колонка рубрик — сверху (кнопка «Добавить» и аккордеон). */
	.layout,
	.layout--right {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
		max-width: 544px;
		padding: 12px;
	}

	.layout__sidebar {
		gap: 12px;
	}

	.layout__main {
		gap: 12px;
	}

	.layout__sidebar .sponsor {
		display: none;
	}

	.sidebar-add {
		gap: 8px;
		padding: 10px 16px;
		border-color: #fecaca;
		border-radius: 8px;
		background: #fee2e2;
		color: #b91c1c;
		font-size: 14px;
		line-height: 20px;
	}

	html.dark .sidebar-add {
		border-color: rgba(127, 29, 29, 0.6);
		background: rgba(69, 10, 10, 0.4);
		color: #fca5a5;
	}

	/* «Категории историй · Все разделы ▼» */
	.cat-box {
		overflow: hidden;
		border: 1px solid var(--border-color);
		border-radius: 8px;
		background: var(--bg-surface);
		box-shadow: var(--shadow-sm);
	}

	html.dark .cat-box {
		border-color: #2e2e38;
		background: #1b1b20;
	}

	.cat-box__summary {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10px 12px;
		color: #1f2937;
		font-size: 12px;
		font-weight: 700;
		list-style: none;
		cursor: pointer;
		-webkit-user-select: none;
		user-select: none;
	}

	html.dark .cat-box__summary {
		color: #f3f4f6;
	}

	.cat-box__summary::-webkit-details-marker {
		display: none;
	}

	.cat-box__summary:hover {
		background: #f9fafb;
	}

	html.dark .cat-box__summary:hover {
		background: #212127;
	}

	.cat-box__title {
		display: inline-flex;
		align-items: center;
		gap: 6px;
	}

	.cat-box__plus {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 16px;
		height: 16px;
		border-radius: var(--radius);
		background: #dc2626;
		color: #fff;
		font-size: 10px;
	}

	.cat-box__more {
		color: #dc2626;
		font-size: 11px;
		font-weight: 600;
	}

	html.dark .cat-box__more {
		color: #f87171;
	}

	.cat-box:not([open]) .cat-box__more span {
		display: inline-block;
		transform: rotate(-90deg);
	}

	.cat-box > .cat-nav {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 6px;
		padding: 4px 12px 12px;
		border: 0;
		border-top: 1px solid var(--border-subtle);
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	html.dark .cat-box > .cat-nav {
		border-top-color: #2e2e38;
	}

	.cat-box > .cat-nav > * + * {
		border-top: 0;
	}

	.cat-box .cat-nav__link,
	.cat-box .cat-nav__reset {
		gap: 6px;
		min-width: 0;
		padding: 4px;
		border-radius: var(--radius);
		font-weight: 500;
	}

	.cat-box .cat-nav__reset {
		grid-column: 1 / -1;
	}

	.cat-box .cat-nav__name {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.cat-box .cat-nav__link:hover {
		background: #fef2f2;
		color: #b91c1c;
	}

	html.dark .cat-box .cat-nav__link:hover {
		background: #282832;
		color: #f87171;
	}

	.cat-box .cat-nav__icon {
		width: 16px;
		height: 16px;
		border: 0;
		background: #fee2e2;
		color: #dc2626;
		font-size: 10px;
	}

	html.dark .cat-box .cat-nav__icon {
		background: #282832;
		color: #f87171;
	}

	.cat-box .cat-nav__link:hover .cat-nav__icon {
		background: #fee2e2;
		color: #dc2626;
	}

	.cat-box .cat-nav__link.is-active .cat-nav__icon {
		background: var(--color-primary);
		color: #fff;
	}

	/* Заголовок-панель: мелкие красные заглавные (как в мобильном макете). */
	.page-head--banner {
		padding: 8px 12px;
		border-radius: 8px;
	}

	.page-head--banner .page-head__title {
		color: #b91c1c;
		font-size: 12px;
		font-weight: 800;
		line-height: 16px;
		letter-spacing: 0.025em;
		text-transform: uppercase;
	}

	html.dark .page-head--banner .page-head__title {
		color: #f87171;
	}

	/* «Топ за месяц»: одна колонка. */
	.top-month {
		padding: 14px;
		border-radius: 8px;
	}

	.top-month__head {
		margin-bottom: 8px;
	}

	.top-month__title {
		gap: 6px;
		color: var(--text-primary);
	}

	.top-month__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 6px;
	}

	.top-month__name {
		font-weight: 500;
	}

	.top-month__num {
		padding: 2px 6px;
		border-color: #fecaca;
		background: #fef2f2;
		color: #dc2626;
		font-family: inherit;
	}

	html.dark .top-month__num {
		border-color: rgba(127, 29, 29, 0.6);
		background: rgba(69, 10, 10, 0.6);
		color: #f87171;
	}

	.story-list {
		gap: 12px;
	}

	.story-card {
		padding: 16px;
		border-radius: 8px;
	}

	/* «Загрузить ещё рассказы» и номера страниц 32×32 */
	.load-more {
		display: block;
		width: 100%;
		margin-top: 12px;
		padding: 10px;
		border: 1px solid #d1d5db;
		border-radius: 8px;
		background: var(--bg-surface);
		box-shadow: var(--shadow-sm);
		color: #1f2937;
		font-size: 12px;
		font-weight: 600;
	}

	html.dark .load-more {
		border-color: #2e2e38;
		background: #1b1b20;
		color: #f3f4f6;
	}

	.load-more[aria-busy="true"] {
		opacity: 0.6;
	}

	.pagination ul {
		padding: 8px 0 12px;
	}

	.pagination .page-numbers {
		min-width: 32px;
		height: 32px;
	}

	.pagination .page-numbers.current,
	html.dark .pagination .page-numbers.current {
		border-color: #dc2626;
		background: #dc2626;
		color: #fff;
	}

	/* Подвал: пометка 18+ и мелкий текст */
	.site-footer {
		margin-top: 0;
		border-top-color: #262626;
		background: #171717;
		color: #a3a3a3;
	}

	html.dark .site-footer {
		border-top-color: #202026;
		background: #0e0e11;
	}

	.site-footer__inner {
		gap: 12px;
		max-width: 544px;
	}

	.site-footer__badge {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 4px 12px;
		border: 1px solid rgba(153, 27, 27, 0.6);
		border-radius: 999px;
		background: rgba(69, 10, 10, 0.8);
		color: #fca5a5;
		font-size: 11px;
		font-weight: 600;
	}

	.site-footer__copy {
		color: #a3a3a3;
		font-size: 11px;
		line-height: 1.625;
	}

	.site-footer__copy strong {
		color: #e5e5e5;
	}

	.site-footer__disclaimer {
		color: #a3a3a3;
		font-size: 10px;
		line-height: 1.25;
	}
}

/* Узкие телефоны: в мобильном макете шапка не помещается в 375 px —
   «Расширенный поиск» становится красной кнопкой со значком. */
@media (max-width: 480px) {
	.site-header__inner {
		padding-right: 12px;
		padding-left: 12px;
	}

	.site-header__actions {
		gap: 2px;
	}

	.site-header__advanced {
		width: 32px;
		height: 32px;
		margin-right: 2px;
		padding: 0;
	}

	.site-header__advanced .icon {
		display: block;
		width: 16px;
		height: 16px;
	}

	.site-header__advanced-label {
		display: none;
	}

	.site-header .theme-toggle,
	.site-header__tool {
		padding: 6px;
	}
}
/* Ридер: нижняя панель и подпись размера шрифта — только на телефоне. */
.reader-dock,
.reader__font-size {
	display: none;
}

.series-toc__title {
	scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Телефоны: страница чтения по мобильному макету (03_Чтение). */
@media (max-width: 1023px) {
	/* В мобильном макете чтения колонки рубрик нет — они в меню ☰. */
	body.single-story .layout__sidebar {
		display: none;
	}
}

@media (max-width: 767px) {
	body.single-story {
		padding-bottom: 60px;
	}

	.reader {
		padding: 16px;
	}

	.reader__title {
		font-size: 24px;
		line-height: 1.25;
	}

	.reader__title .dropcap-letter {
		width: 32px;
		height: 32px;
		font-size: 18px;
	}

	.reader__bar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.reader__meta {
		gap: 6px 10px;
	}

	.reader__author-mark {
		width: 28px;
		height: 28px;
		border-radius: 50%;
		font-size: 14px;
	}

	.reader__author-name {
		font-size: 13px;
		font-weight: 600;
	}

	.reader__author-role {
		display: none;
	}

	/* Панель «A− 18px A+ · режим» — отдельная плашка */
	.reader__tools {
		justify-content: space-between;
		padding: 8px;
		border: 1px solid var(--border-color);
		border-radius: 8px;
		background: var(--bg-surface-elevated);
		box-shadow: var(--shadow-sm);
	}

	.reader__tools .like-btn--compact {
		display: none;
	}

	.reader__font {
		align-items: center;
		margin-right: auto;
		padding: 0;
		border: 0;
		background: transparent;
	}

	.reader__font-size {
		display: inline;
		padding: 0 10px;
		color: var(--text-secondary);
		font-size: 13px;
		font-weight: 600;
		font-variant-numeric: tabular-nums;
	}

	.reader__font .tool-btn {
		padding: 6px 12px;
		background: var(--bg-surface);
		font-size: 14px;
	}

	.tool-btn--mode {
		padding: 8px;
		background: var(--bg-surface);
	}

	.tool-btn--mode .icon {
		width: 18px;
		height: 18px;
	}

	.reader__body {
		font-size: calc(18px + var(--reader-step, 0) * 1.5px);
	}

	.reader__body > p:first-of-type::first-letter {
		margin: 6px 10px 0 0;
		font-size: 3.2em;
		line-height: 0.8;
	}

	.series-toc {
		margin-top: 24px;
		padding: 12px;
	}

	.series-toc__foot {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.series-toc__foot .btn {
		justify-content: center;
		width: 100%;
	}

	.author-box {
		flex-wrap: wrap;
	}

	.author-box__like {
		justify-content: flex-end;
		width: 100%;
	}

	.compact-list__link {
		flex-direction: column;
		align-items: stretch;
	}

	.compact-list__side {
		justify-content: space-between;
	}

	/* Нижняя панель: Пред · Часть · След · ♥ */
	.reader-dock {
		display: flex;
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 40;
		align-items: center;
		justify-content: space-between;
		gap: 4px;
		min-height: 56px;
		padding: 4px 12px calc(4px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--border-color);
		background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
	}

	.reader-dock__step {
		display: inline-flex;
		align-items: center;
		gap: 2px;
		padding: 8px 6px;
		color: var(--text-secondary);
		font-size: 13px;
		font-weight: 600;
	}

	.reader-dock__step .icon {
		width: 18px;
		height: 18px;
	}

	.reader-dock__step.is-disabled {
		opacity: 0.35;
	}

	.reader-dock__part {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 6px 14px;
		border-radius: 8px;
		background: var(--bg-surface-elevated);
		color: var(--text-primary);
		font-size: 12px;
		font-weight: 700;
		line-height: 1.2;
		text-align: center;
	}

	.reader-dock__part .icon {
		width: 20px;
		height: 20px;
		color: var(--color-primary);
	}

	.reader-dock__like {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		padding: 8px 6px;
		border: 0;
		background: transparent;
		color: var(--color-primary);
		font-size: 13px;
		font-weight: 700;
	}

	.reader-dock__like .icon {
		width: 22px;
		height: 22px;
	}

	.reader-dock__like[aria-pressed="true"] .icon {
		fill: currentColor;
	}

	.reader-dock__like.is-pop .icon {
		animation: on-pop 0.35s ease;
	}
}
/* Телефоны: карточка как в мобильном макете — автор и часть над заголовком. */
@media (max-width: 767px) {
	.story-card__top {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		margin-bottom: 4px;
		font-size: 12px;
	}

	.story-card__top-author {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		color: #374151;
		font-weight: 500;
	}

	html.dark .story-card__top-author {
		color: #d1d5db;
	}

	.story-card__top-author .icon {
		width: 14px;
		height: 14px;
		color: #dc2626;
	}

	html.dark .story-card__top-author .icon {
		color: #f87171;
	}

	.story-card__top-part {
		padding: 2px 8px;
		border: 1px solid var(--border-color);
		border-radius: var(--radius);
		background: #f3f4f6;
		color: #4b5563;
		font-size: 10px;
		font-weight: 600;
	}

	html.dark .story-card__top-part {
		border-color: #2e2e38;
		background: #282832;
		color: #d1d5db;
	}

	.story-card__title {
		margin-bottom: 0;
		font-size: 18px;
		line-height: 1.375;
		letter-spacing: -0.025em;
	}

	.story-card__title .dropcap-letter {
		display: inline-block;
		margin-right: 0.5px;
		color: #dc2626;
		font-size: 1.35em;
		font-weight: 800;
		line-height: 0.9;
	}

	.story-card__tags {
		gap: 4px;
		margin: 4px 0 8px;
	}

	.story-card__excerpt {
		display: -webkit-box;
		overflow: hidden;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
	}

	html.dark .story-card__excerpt {
		color: #d1d5db;
	}

	.story-card__meta {
		gap: 8px;
		border-top-color: var(--border-subtle);
		font-size: 12px;
	}

	.story-card__meta-left {
		gap: 12px;
		font-size: 11px;
	}

	.story-card__meta .meta-desk,
	.story-card__meta .story-card__dot {
		display: none;
	}

	.meta-item--date {
		order: -1;
	}

	.meta-item--likes {
		color: #ef4444;
		font-weight: 500;
	}

	.story-card__more {
		color: #1f2937;
		font-size: 12px;
	}

	html.dark .story-card__more {
		color: #e5e7eb;
	}

	.story-card__more span {
		color: #dc2626;
	}

	html.dark .story-card__more span {
		color: #f87171;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}


	.profile__stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}



	/* Расширенный поиск (мобильный макет): синтаксис — карточками
	   «символ · название / пример / пояснение». */
	.syntax-table__row {
		grid-template-columns: auto minmax(0, 1fr);
		gap: 8px 12px;
		padding: 14px 16px;
	}

	.syntax-table__row > * {
		padding: 0;
	}

	.syntax-table__row--head {
		display: none;
	}

	.syntax-table__sym code {
		padding: 0;
		border: 0;
		background: transparent;
		color: #e11d48;
		font-size: 12px;
	}

	html.dark .syntax-table__sym code {
		color: #fda4af;
	}

	.syntax-table__what {
		color: var(--text-muted);
		font-size: 11px;
		font-weight: 700;
		text-align: right;
	}

	.syntax-table__row > :nth-child(3),
	.syntax-table__how {
		grid-column: 1 / -1;
	}

	.syntax-table__example {
		display: block;
		width: 100%;
		padding: 8px 12px;
		font-size: 12px;
		font-weight: 700;
	}

	.adv-search__filters {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.adv-search__row {
		flex-wrap: wrap;
	}

	.adv-search__fx {
		display: none;
	}

	.adv-search__input {
		flex-basis: 100%;
		height: 44px;
	}

	.adv-search__reset,
	.adv-search__submit {
		flex: 1;
		justify-content: center;
		height: 44px;
	}

	.adv-search__ops-label {
		flex-basis: 100%;
		margin-bottom: 2px;
		font-size: 11px;
		font-weight: 700;
		letter-spacing: 0.05em;
		text-transform: uppercase;
	}

	.op-chip {
		padding: 6px 10px;
		font-size: 12px;
	}

	/* «Область поиска» — три плитки-переключателя */
	.adv-search__filters fieldset.filter {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	.adv-search__filters fieldset.filter legend {
		grid-column: 1 / -1;
		width: 100%;
		margin-bottom: 0;
	}

	.adv-search__filters fieldset .check {
		position: relative;
		justify-content: center;
		min-height: 52px;
		padding: 8px;
		border: 1px solid var(--border-color);
		border-radius: 8px;
		background: var(--bg-surface-elevated);
		color: var(--text-secondary);
		font-size: 12px;
		font-weight: 600;
		line-height: 1.25;
		text-align: center;
	}

	.adv-search__filters fieldset .check input {
		position: absolute;
		opacity: 0;
		pointer-events: none;
	}

	.adv-search__filters fieldset .check:has(input:checked) {
		border-color: var(--color-primary);
		background: var(--color-primary);
		color: #fff;
	}

	.adv-search__filters fieldset .check:has(input:focus-visible) {
		outline: 2px solid var(--color-primary-hover);
		outline-offset: 2px;
	}

	.filter .input {
		height: 40px;
		font-size: 13px;
	}

	.adv-results__head {
		align-items: flex-start;
		flex-direction: column;
	}
}

/*
 * Поиск, профиль и страницы автора на телефоне и планшете: колонки рубрик нет
 * (рубрики — в фильтре, в редакторе и в меню ☰), как на мобильных макетах.
 */
@media (max-width: 1023px) {
	body.route-advanced-search .layout__sidebar,
	body.route-author-cabinet .layout__sidebar,
	body.route-submit-story .layout__sidebar,
	body.route-story-stats .layout__sidebar,
	body.route-author-login .layout__sidebar,
	body.author .layout__sidebar {
		display: none;
	}
}
@media (max-width: 600px) {

	.prose-page {
		padding: 20px 16px 24px;
	}


	/* Профиль на телефоне: аватар слева, имя и данные справа (как шапка мобильного макета). */
	.profile {
		padding: 16px;
	}

	.profile__top {
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 14px;
	}

	.profile .avatar--lg {
		width: 64px;
		height: 64px;
		font-size: 26px;
	}

	.profile__name {
		gap: 6px 8px;
		font-size: 20px;
	}

	.profile__bio {
		flex-basis: 100%;
		font-size: 13px;
	}

	.profile__stats {
		gap: 4px;
		margin-top: 16px;
		padding: 8px;
	}

	.tabs-bar {
		padding: 12px;
	}

	.tabs {
		width: 100%;
	}

	.tabs-bar__tools {
		width: 100%;
		max-width: none;
	}

	.tabs-bar__tools .input {
		min-width: 0;
	}

	.story-card__head {
		gap: 10px;
	}

	.story-card__bar-left {
		gap: 6px 10px;
	}

	.story-card__bar-more {
		margin-left: auto;
	}

	.feed-foot {
		justify-content: center;
		text-align: center;
	}

	.series-toc__foot .btn {
		width: 100%;
	}

	.error-404 {
		padding: 32px 16px;
	}

	.error-404__title {
		font-size: 22px;
	}

	.age-gate__card {
		padding: 28px 18px 20px;
	}

	.age-gate__title {
		font-size: 27px;
	}

	.btn--lg {
		font-size: 13.5px;
	}

	.error-404__code {
		font-size: 80px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
