/*
Theme Name: Myroslava
Theme URI: https://poetry.in.ua/
Author: Poetry.in.ua
Author URI: https://poetry.in.ua/
Description: Сучасна авторська тема для сайту «Поезія і проза Галини Мирослави»: спокійна книжкова типографіка, білий простір для читання, картки записів, адаптивне меню без jQuery, підтримка Customizer, Block Editor та Classic Editor.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: myroslava
Tags: blog, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, editor-style, block-styles, wide-blocks
*/

/* ---------- Токени ---------- */
:root {
	--ink: #221c1a;
	--ink-soft: #3d3532;
	--muted: #6b625d;        /* було #7a716c: 4.77 → 5.95 на білому, 5.38 на теплому */
	--line: #e7e1da;
	--line-strong: #8f867e; /* рамки полів вводу: 3.57:1 на білому, 3.23:1 на теплому (WCAG 1.4.11) */
	--paper: #ffffff;
	--paper-warm: #f7f3ee;
	--paper-soft: #fbf8f4;   /* тло стрічки й архівів */
	--accent: #6d3f7a;
	--accent-rgb: 109, 63, 122;
	--gold: #b08d57;         /* лінії, рамки, орнаменти */
	--gold-ink: #8a6a35;     /* золото для тексту: 5.01:1 на білому */
	--ink-plum: #26202b;     /* підвал */
	--gold-light: #d4b477;   /* заголовки в підвалі: 8.0:1 */
	--font-serif: "Literata", Georgia, "Times New Roman", serif;
	--font-display: "Playfair Display", "Literata", Georgia, serif;
	--font-ui: "Manrope", "Segoe UI", system-ui, sans-serif;
	--measure: 42rem;
	--container: 78rem;
	--radius-sm: 8px;
	--radius: 12px;
	--radius-lg: 16px;
	--shadow: 0 1px 2px rgba(34, 28, 26, 0.04), 0 10px 30px -18px rgba(34, 28, 26, 0.25);
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
	--step-0: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
	--step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
	--step-2: clamp(1.45rem, 1.3rem + 0.9vw, 1.9rem);
	--step-3: clamp(1.9rem, 1.6rem + 1.6vw, 2.6rem);
	--step-4: clamp(2.3rem, 1.8rem + 2.6vw, 3.6rem);
	--step--2: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);   /* підписи-кікери */
	--step-5: clamp(2.5rem, 1.8rem + 3.3vw, 4.25rem);      /* лише ім'я у вступному блоці */
	--leading-display: 1.06;
	--leading-title: 1.12;
	--leading-heading: 1.2;
	--leading-body: 1.7;
	--leading-prose: 1.65;
	--leading-verse: 1.58;
	--label-size: var(--step--2);
	--label-track: 0.12em;
	--ink-plum-deep: #1c171f;   /* низ сливового градієнта */
	--ink-plum-soft: #2f2434;   /* верх сливового градієнта екслібриса (для іншого акценту PHP виводить усі три через color-mix) */
	--on-plum: #f3ede6;         /* текст на сливовому: 13.6:1 */
	--on-plum-soft: #c9bfc6;    /* 8.9:1 */
	--on-plum-muted: #aca0a8;   /* 6.3:1 */
	--header-h: calc(4.5rem + 1px);          /* висота липкої шапки без стрічки (header-2) */
}

/* Висота шапки з вишитою крайкою (header-5): її читає титул, що заходить під прозору шапку (header-2) */
.has-ornaments {
	--header-h: calc(4.5rem + 16px);
}

@media (max-width: 1140px) {
	:root {
		--header-h: calc(3.75rem + 1px);
	}

	.has-ornaments {
		--header-h: calc(3.75rem + 12px);
	}
}

/* ---------- Базове ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(4.5rem + 16px + 1rem); /* липка шапка + стрічка з крайками + повітря */
}

html:has(body.admin-bar) {
	scroll-padding-top: calc(4.5rem + 16px + 1rem + 32px);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

body {
	margin: 0;
	background: var(--paper-soft);
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: var(--step-0);
	line-height: var(--leading-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-feature-settings: "kern", "liga";   /* "onum" не існує у наших підмножинах — прибрано */
	font-variant-numeric: proportional-nums;
	font-optical-sizing: auto;
}

/* Колонка читання лишається білою */
body.is-reading,
body.page,
body.attachment {
	background: var(--paper);
}

img,
video,
iframe,
embed,
object {
	max-width: 100%;
	height: auto;
}

iframe {
	border: 0;
}

a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	text-decoration-color: rgba(var(--accent-rgb), 0.4);
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
	text-decoration-color: currentColor;
}

/* Посилання в колонці читання: чорнило в слові, слива — у підкресленні.
   :where() тримає специфічність на (0,1,1), тож .entry-toc-list a, .entry-part-up a перекривають це правило. */
.entry-content a:where(:not(.button):not(.wp-block-button__link)),
.comment-content a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: rgba(var(--accent-rgb), 0.5);
	text-decoration-thickness: 0.07em;
	text-underline-offset: 0.16em;
	text-decoration-skip-ink: auto;
}

.entry-content a:where(:not(.button):not(.wp-block-button__link)):hover,
.comment-content a:hover {
	color: var(--accent);
	text-decoration-color: currentColor;
}

.site-footer .entry-content a {
	color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--paper); /* світлий проміжок — кільце читається на теплому папері й на фото */
}

/* Кільце фокуса зі скругленням — лише текстові посилання; «пігулки» зберігають свою форму */
.entry-content a:focus-visible,
.hero-lead a:focus-visible,
.hero-new a:focus-visible,
.footer-list a:focus-visible,
.comment-content a:focus-visible {
	border-radius: 3px;
}

.site-header:focus,
.site-header:focus-visible {
	outline: none; /* ціль кнопки «Нагору» при логотипі-зображенні */
	box-shadow: none;
}

.site-main:focus,
.site-main:focus-visible {
	outline: none; /* ціль skip-link */
	box-shadow: none;
}

/* Темний підвал: акцент на чорнилі = 2:1 → біле кільце 15.9:1 */
.site-footer :focus-visible {
	outline-color: #fff;
	box-shadow: 0 0 0 3px var(--ink-plum);
}

/* Вага за розміром: Playfair легшає, коли росте — 400 у титулах, 500 у розділах, 600 у дрібних заголовках */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: var(--leading-heading);
	color: var(--ink);
	margin: 0 0 0.6em;
	letter-spacing: -0.005em;
	text-wrap: balance;
	font-kerning: normal;
}

h1 {
	font-size: var(--step-4);
	font-weight: 400;
	line-height: var(--leading-title);
	letter-spacing: -0.015em;
}

h2 {
	font-size: var(--step-3);
	letter-spacing: -0.01em;
}

h3 {
	font-size: var(--step-2);
}

h4 {
	font-size: var(--step-1);
	font-weight: 600;
}

h5,
h6 {
	font-size: var(--step-0);
	font-weight: 600;
}

p {
	margin: 0 0 1.25em;
}

blockquote {
	margin: 1.75em 0;
	padding: 0.25em 0 0.25em 1.5em;
	border-left: 3px solid var(--gold);
	font-style: italic;
	color: var(--ink-soft);
}

blockquote cite {
	display: block;
	font-style: normal;
	font-family: var(--font-ui);
	font-size: var(--step--1);
	color: var(--muted);
	margin-top: 0.5em;
}

hr {
	border: 0;
	height: 1px;
	background: var(--line);
	margin: 2.5em auto;
	max-width: 8rem;
}

figure {
	margin: 1.75em 0;
}

figcaption,
.wp-caption-text {
	font-family: var(--font-ui);
	font-size: var(--step--1);
	color: var(--muted);
	text-align: center;
	margin-top: 0.5em;
}

table {
	border-collapse: collapse;
	width: 100%;
	margin: 1.5em 0;
	font-size: var(--step--1);
}

th,
td {
	border-bottom: 1px solid var(--line);
	padding: 0.6em 0.75em;
	text-align: left;
	vertical-align: top;
}

th {
	font-family: var(--font-ui);
	font-weight: 700;
}

pre,
code,
kbd {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

pre {
	background: var(--paper-warm);
	padding: 1em 1.25em;
	border-radius: var(--radius);
	overflow-x: auto;
}

ul,
ol {
	padding-left: 1.4em;
	margin: 0 0 1.25em;
}

li + li {
	margin-top: 0.3em;
}

/* Форми */
input,
textarea,
select,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="number"],
textarea,
select {
	width: 100%;
	padding: 0.65em 0.9em;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--paper);
	font-family: var(--font-ui);
	font-size: 1rem;
	transition: border-color 0.15s ease;
}

input::placeholder,
textarea::placeholder {
	color: var(--muted); /* 5.95:1 на білому замість типового #a9a9a9 */
	opacity: 1;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--accent);
}

input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
	outline: none; /* лише для кліку мишкою */
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

button,
.button,
input[type="submit"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.65em 1.3em;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

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

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	clip: auto;
	margin: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.6em 1em;
	background: var(--ink);
	color: #fff;
	border-radius: var(--radius-sm);
	text-decoration: none;
}

/* Підписи: акцентні (eyebrow, «Розділи», «Новий запис») і тихі (заголовки віджетів, серія/теги/поділитися/навігація).
   .brand-kicker навмисно не тут — шапка задає йому власний розмір і колір. */
.eyebrow,
.hero-links-label,
.hero-new-label {
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: var(--label-track);
	text-transform: uppercase;
	color: var(--accent);
}

.widget-title,
.widget .wp-block-heading,
.series-label,
.tags-label,
.share-label,
.post-nav-label,
.author-card-role {
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

/* ---------- Сітка ---------- */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: calc(var(--measure) + 2 * var(--gutter));
}

.container--wide {
	max-width: 62rem;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1 0 auto;
	padding-bottom: clamp(3rem, 8vw, 6rem);
}

.eyebrow {
	margin: 0 0 0.75em; /* голос підпису — з базового правила підписів */
}

.section-title {
	font-size: var(--step-2);
	font-weight: 500;
	letter-spacing: -0.01em;
	margin: 0 0 1.5rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.section-title::after { /* золотий «намітковий» шов замість сірої лінії */
	content: "";
	flex: 1;
	height: 3px;
	margin-left: 0.25rem;
	background: repeating-linear-gradient(90deg, var(--gold) 0 3px, transparent 3px 8px);
	opacity: 0.55;
}

.section-head {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.section-head .section-title {
	flex: 1;
	margin-bottom: 0;
}

.section-link { /* «Усі записи» — капітельний кікер золотом, як колофон картки */
	flex: none;
	font-family: var(--font-ui);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gold-ink);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.section-link:hover {
	color: var(--accent);
}

.section-link span {
	display: inline-block;
	transition: transform 0.15s ease;
}

.section-link:hover span {
	transform: translateX(3px);
}

/* ---------- Шапка ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(253, 251, 248, 0.9);
	backdrop-filter: saturate(160%) blur(10px);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--line);
}

body.is-reading .site-header,
body.page .site-header {
	background: rgba(255, 255, 255, 0.92);
}

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

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

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 1.5rem;
	min-height: 4.5rem;
	padding-block: 0.75rem;
}

.brand {
	margin: 0;
	min-width: 0;
	font-size: 1rem;
	line-height: 1;
}

.brand-link {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	color: var(--ink);
	text-decoration: none;
}

.brand-mark {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 10px; /* 10/44 = пропорція favicon (7/32); діагональне перо хоче круглішого кута */
	background: var(--accent);
	color: #fff;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.15rem;
	letter-spacing: 0.02em;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 4px 12px -8px rgba(var(--accent-rgb), 0.7);
	transition: transform 0.2s ease;
}

/* Знак «медальйон»: сам диск є плиткою, перо вирізане (показує папір) */
.brand-mark--seal {
	background: transparent;
	box-shadow: none;
	color: var(--accent);
	border-radius: 50%;
}

.brand-mark--seal svg {
	width: 100%;
	height: 100%;
	display: block;
}

.brand-mark--writer svg {
	width: 84%;
	height: 84%;
	display: block;
}

.brand-mark--writer .writer-detail {
	stroke: var(--accent);
}

.brand-link:hover .brand-mark {
	transform: rotate(-6deg);
}

.brand-mark--quill svg {
	width: 78%;
	height: 78%;
	display: block;
}

.brand-mark--quill .quill-shaft {
	stroke: var(--accent);
}

/* Бренд-блок у тріаді слива / золото / чорнило: золотий кікер, ім'я Playfair 500 */
.brand-text {
	display: flex;
	flex-direction: column;
	gap: 0.28rem;
	min-width: 0;
}

.brand-kicker {
	font-family: var(--font-ui);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gold-ink);   /* ≈4.8:1 на тлі шапки — AA для жирних капітелей */
}

.brand-name {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1.55rem;
	line-height: 1.05;
	letter-spacing: 0;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.brand-link:hover .brand-name {
	color: var(--accent);
}

.custom-logo-link {
	display: block;
	line-height: 0;
	min-width: 0; /* блок бренду стискається у flex-рядку — картинка має стискатися разом із ним */
}

.custom-logo {
	width: auto;
	height: clamp(36px, 4vw, 56px);
	max-width: min(380px, 62vw, 100%); /* 100%: широкий текстовий логотип (720×100) інакше налазить на «Головна» (logo_style=image) */
	object-fit: contain;
	object-position: left center;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	order: 2;
	margin-inline-start: auto; /* меню тиснеться вправо, іконка пошуку — за ним */
}

.header-actions {
	order: 3;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.site-nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
}

.site-nav .menu li {
	margin: 0;
	position: relative;
}

.site-nav .menu a {
	display: block;
	padding: 0.45em 0.6em;
	font-family: var(--font-ui);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--ink-soft);
	text-decoration: none;
	border-radius: 999px;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

/* Верхній рівень: легше, редакційніше, без «пігулок» */
.site-nav .menu > li > a {
	position: relative;
	padding: 0.45em 0.15em;
	margin-inline: 0.55em;
	font-weight: 500;
	font-size: 0.92rem;
	letter-spacing: 0.01em;
	border-radius: 4px; /* форма кільця фокуса */
	background: transparent;
}

.site-nav .menu > li > a::after { /* золотий намітковий стібок, що «прошивається» зліва */
	content: "";
	position: absolute;
	left: 0.15em;
	right: 0.15em;
	bottom: 0.15em;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--gold) 0 4px, transparent 4px 7px);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.2s ease;
}

/* current-menu-parent — щоб кожен вірш підсвічував свій розділ */
.site-nav .menu > li > a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current-menu-ancestor > a,
.site-nav .menu .current-menu-parent > a,
.site-nav .menu .current_page_item > a {
	background: transparent;
	color: var(--accent);
}

.site-nav .menu > li > a:hover::after,
.site-nav .menu .current-menu-item > a::after,
.site-nav .menu .current-menu-ancestor > a::after,
.site-nav .menu .current-menu-parent > a::after,
.site-nav .menu .current_page_item > a::after {
	transform: scaleX(1);
}

body:not(.has-ornaments) .site-nav .menu > li > a::after {
	background: var(--accent);
	height: 1px;
}

.site-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0.4rem;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 12rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav .menu li:hover > .sub-menu,
.site-nav .menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.site-nav .sub-menu a {
	white-space: normal;
	border-radius: var(--radius-sm);
}

@media (max-width: 1280px) {
	.site-header-inner {
		gap: 1rem;
	}

	.site-nav .menu > li > a {
		font-size: 0.84rem;
		margin-inline: 0.4em;
	}

	.custom-logo {
		max-width: min(300px, 60vw);
	}

	.brand-name {
		font-size: 1.35rem;
	}
}

/* «Меню» — як текст титулу, без рамки */
.nav-toggle {
	display: none;
	background: transparent;
	border-color: transparent;
	color: var(--ink);
	padding: 0.5em 0.6em;
	gap: 0.6em;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.nav-toggle:hover {
	background: var(--paper-warm);
	border-color: transparent;
	color: var(--ink);
}

.nav-toggle[aria-expanded="true"] {
	color: var(--accent);
}

.nav-extra {
	display: none; /* показується лише в панелі ≤1140 */
}

.nav-toggle-bars {
	position: relative;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s ease;
}

.nav-toggle-bars::before {
	top: -6px;
}

.nav-toggle-bars::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
	transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

.search-toggle {
	background: transparent;
	border-color: transparent;
	color: var(--ink-soft);
	padding: 0.45em;
	border-radius: 50%;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
	background: rgba(var(--accent-rgb), 0.08);
	border-color: transparent;
	color: var(--accent);
}

/* Справжній стан «закрито»: лупа ↔ хрестик (svg-класи ставить header.php) */
.search-toggle .icon-close {
	display: none;
}

.search-toggle[aria-expanded="true"] .icon-search {
	display: none;
}

.search-toggle[aria-expanded="true"] .icon-close {
	display: block;
}

/* Пошук як лінійка в зошиті: Literata на золотій лінії, без рамки */
.header-search {
	border-top: 1px solid var(--line);
	background: var(--paper-soft);
	padding-block: 1.1rem 1.35rem;
}

.header-search .search-form {
	max-width: 40rem;
	margin-inline: auto;
	align-items: center;
	gap: 0.9rem;
}

.header-search .search-field {
	border: 0;
	border-bottom: 1px solid var(--gold-ink); /* 4.7:1 на paper-soft (WCAG 1.4.11) */
	border-radius: 0;
	background: transparent;
	padding: 0.35em 0.1em;
	font-family: var(--font-serif);
	font-size: 1.25rem;
	color: var(--ink);
}

.header-search .search-field::placeholder {
	font-style: italic;
	color: var(--muted);
}

.header-search .search-field:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 4px;
	box-shadow: none;
	border-bottom: 2px solid var(--accent);
}

.header-search .search-submit {
	padding: 0.55em 1.2em;
}

@media (min-width: 1141px) {
	.header-search .search-form::after { /* підказка клавіші на десктопі */
		content: "Esc" / "";
		font: 600 0.68rem/1 var(--font-ui);
		letter-spacing: 0.08em;
		color: var(--muted);
		border: 1px solid var(--line-strong);
		border-radius: 4px;
		padding: 0.3em 0.45em;
	}
}

.search-form {
	display: flex;
	gap: 0.5rem;
}

.search-form .search-field {
	flex: 1;
}

.search-form .search-submit {
	flex: none;
}

/* Компактна шапка при прокручуванні — лише десктоп (клас .is-scrolled ставить main.js) */
/* Сторож для IntersectionObserver (main.js): 80px від верху документа, незалежно від висоти шапки */
.header-sentinel {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 80px;
	pointer-events: none;
}

@media (max-width: 1140px) {
	.header-sentinel {
		height: 24px; /* шапка стає непрозорою, щойно титул рушив (hero починається за 40px під нею); 80px — лише для компактної шапки ≥1141 */
	}
}

@media (min-width: 1141px) {
	.site-header {
		transition: background-color 0.25s ease, box-shadow 0.25s ease;
	}

	.site-header-inner {
		transition: min-height 0.25s ease, padding 0.25s ease;
	}

	.brand-mark {
		transition: width 0.25s ease, height 0.25s ease, transform 0.2s ease;
	}

	.brand-name {
		transition: font-size 0.25s ease, color 0.15s ease;
	}

	.brand-kicker {
		max-height: 1.4em;
		overflow: hidden;
		transition: opacity 0.2s ease, max-height 0.25s ease;
	}

	.brand-text {
		transition: gap 0.25s ease;
	}

	.custom-logo {
		transition: height 0.25s ease;
	}

	.has-ornaments .site-header::after {
		transition: height 0.25s ease, background-size 0.25s ease;
	}

	.site-header.is-scrolled {
		background: rgba(253, 251, 248, 0.96);
		box-shadow: 0 14px 34px -26px rgba(34, 28, 26, 0.4);
	}

	body.is-reading .site-header.is-scrolled,
	body.page .site-header.is-scrolled {
		background: rgba(255, 255, 255, 0.96);
	}

	.site-header.is-scrolled .site-header-inner {
		min-height: 3.5rem;
		padding-block: 0.45rem;
	}

	.site-header.is-scrolled .brand-mark {
		width: 2.2rem;
		height: 2.2rem;
	}

	.site-header.is-scrolled .brand-kicker {
		opacity: 0;
		max-height: 0;
	}

	.site-header.is-scrolled .brand-text {
		gap: 0;
	}

	.site-header.is-scrolled .brand-name {
		font-size: 1.25rem;
	}

	.site-header.is-scrolled .custom-logo {
		height: clamp(30px, 3vw, 40px);
	}

	.has-ornaments .site-header.is-scrolled::after {
		height: 12px;
		background-size: 18.29px 8px; /* стрічка 8px між крайками */
	}
}

/* Прозора шапка над титулом на головній (header-2): потрібні html.js із main.js і body.has-hero із functions.php */
html.js body.has-hero .site-header:not(.is-scrolled) {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

html.js body.has-hero .site-header:not(.is-scrolled)::after {
	background-color: transparent; /* стрічка лягає просто на теплий папір титулу */
	box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.14), inset 0 -1px 0 rgba(var(--accent-rgb), 0.14);
}

@media (max-width: 1140px) {
	html {
		scroll-padding-top: calc(3.75rem + 12px + 1rem);
	}

	html:has(body.admin-bar) {
		scroll-padding-top: calc(3.75rem + 12px + 1rem + 32px);
	}

	/* Компактна липка шапка: 94px → ~68px на 375px */
	.site-header-inner {
		min-height: 3.75rem;
		padding-block: 0.5rem;
		gap: 0.75rem;
	}

	.nav-toggle {
		display: inline-flex;
		min-height: 2.75rem; /* 44px — зона дотику */
	}

	.header-actions {
		margin-inline-start: auto;
	}

	.search-toggle {
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		justify-content: center;
	}

	/* Панель меню — сторінка книги, не білий дропдаун */
	.site-nav {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
		background: var(--paper-soft);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
		padding: 0.5rem var(--gutter) calc(1rem + env(safe-area-inset-bottom, 0px));
		max-height: calc(100vh - 4.5rem);
		max-height: calc(100dvh - 4.5rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
	}

	.site-nav.is-open {
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	.site-nav .menu {
		flex-direction: column;
		gap: 0;
	}

	.site-nav .menu > li + li {
		border-top: 1px dashed rgba(176, 141, 87, 0.45); /* золотий пунктир між рядками змісту */
	}

	.site-nav .menu a {
		padding: 0.8em 0.5em;
		font-size: 1.05rem;
		border-radius: var(--radius-sm);
		white-space: normal;
	}

	/* Рядки змісту — Playfair, без стібка й без відступів десктопного рівня */
	.site-nav .menu > li > a {
		margin-inline: 0;
		padding: 0.7em 0.25em;
		font-family: var(--font-display);
		font-weight: 500;
		font-size: 1.3rem;
		letter-spacing: 0;
		color: var(--ink);
	}

	.site-nav .menu > li > a::after {
		display: none;
	}

	.site-nav .menu > li > a:hover {
		background: transparent;
		color: var(--accent);
	}

	.site-nav .sub-menu a {
		font-family: var(--font-serif);
		font-size: 1rem;
	}

	.site-nav .menu .current-menu-item > a,
	.site-nav .menu .current-menu-parent > a,
	.site-nav .menu .current-menu-ancestor > a {
		color: var(--accent);
		background: transparent;
		box-shadow: inset 3px 0 0 var(--accent);
		padding-left: 0.75em;
	}

	.has-ornaments .site-nav .menu .current-menu-item > a,
	.has-ornaments .site-nav .menu .current-menu-parent > a,
	.has-ornaments .site-nav .menu .current-menu-ancestor > a { /* з орнаментами — зірка-закладка замість сливової риски */
		box-shadow: none;
		padding-left: 1.6em;
		background: var(--orn-star) 0.25em center / 16px 16px no-repeat;
	}

	/* «Новий запис» у панелі (посилання .nav-extra друкує header.php після wp_nav_menu) */
	.nav-extra {
		display: inline-flex;
		align-items: center;
		gap: 0.5em;
		align-self: flex-start;
		margin: 1rem 0 0.25rem;
		padding: 0.6em 1.1em;
		border-radius: 999px;
		background: var(--accent);
		color: #fff;
		font: 600 0.95rem var(--font-ui);
		text-decoration: none;
	}

	.nav-extra .quill {
		width: 1.1em;
		height: 1.1em;
	}

	.nav-extra .quill-shaft {
		stroke: var(--accent);
	}

	body.has-hero .nav-extra {
		display: none; /* на головній перо вже стоїть у вступному блоці */
	}

	.has-ornaments .site-nav::after { /* вишита крайка панелі */
		content: "";
		display: block;
		height: 8px;
		margin: 1rem calc(-1 * var(--gutter)) calc(-1rem - env(safe-area-inset-bottom, 0px));
		background: var(--orn-band) center / 18.29px 8px repeat-x;
	}

	.site-nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		border: 0;
		box-shadow: none;
		padding: 0 0 0.5rem 1rem;
		background: transparent;
	}

	/* Сторінка під відкритим меню не прокручується і злегка затемнена; тап по затемненню закриває меню (JS) */
	body.nav-open {
		overflow: hidden;
	}

	body.nav-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 40; /* нижче за .site-header (50) */
		background: rgba(34, 28, 26, 0.35);
	}
}

@media (max-width: 782px) {
	html:has(body.admin-bar) {
		scroll-padding-top: calc(3.75rem + 12px + 1rem + 46px);
	}
}

/* ---------- Вступний блок ---------- */
.hero {
	background:
		radial-gradient(60rem 30rem at 85% -6%, rgba(var(--accent-rgb), 0.1), transparent 60%),
		linear-gradient(180deg, var(--paper-warm), var(--paper-soft));
	box-shadow: inset 0 -1px 0 var(--line);
	padding-block: clamp(2.5rem, 7vw, 5.5rem);
	margin-bottom: clamp(2rem, 5vw, 4rem);
}

/* Титул заходить під прозору шапку (header-2): потрібні html.js із main.js і body.has-hero із functions.php */
html.js body.has-hero .hero {
	margin-top: calc(-1 * var(--header-h));
	padding-top: calc(clamp(2.5rem, 7vw, 5.5rem) + var(--header-h));
}

.hero-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: start; /* редакційна сітка: обидві колонки від однієї верхньої лінії */
}

/* Обидва eyebrow на одній лінії: текст дістає верхній відступ картки (без стрічки / стрічка + повітря) */
.hero:not(.hero--solo) .hero-text {
	padding-top: 1.5rem;
}

.has-ornaments .hero:not(.hero--solo) .hero-text {
	padding-top: calc(10px + 1.25rem);
}

/* Вступний блок без правої колонки («Права колонка = Нічого» або немає записів) */
.hero--solo .hero-inner {
	grid-template-columns: minmax(0, 1fr);
}

.hero--solo .hero-text {
	max-width: 46rem;
}

.hero--solo .hero-lead {
	max-width: 38rem;
}

/* Титульна сторінка: ім'я Playfair 400 у --step-5, штрих пера, курсивна роль, лід як «дек» */
.hero-title {
	font-size: var(--step-5);
	font-weight: 400;
	line-height: var(--leading-display);
	letter-spacing: -0.015em;
	margin-bottom: 0.25em;
}

.hero-title--two { /* «Галина / Мирослава» — два врівноважені рядки; клас ставить hero.php лише для двох слів */
	max-width: 11ch;
}

.has-ornaments .hero-title::after { /* штрих пера: золота волосяна лінія під іменем */
	content: "";
	display: block;
	width: 7.5rem;
	height: 0.75rem;
	margin: 0.3em 0 0 0.06em;
	background: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 120 12%22%3E%3Cpath d=%22M2 8.5C22 3 44 2.5 62 5.5c14 2.3 30 3.4 56-2%22 fill=%22none%22 stroke=%22%23b08d57%22 stroke-width=%221.6%22 stroke-linecap=%22round%22/%3E%3C/svg%3E') left center / 100% auto no-repeat;
}

.hero-byline {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
	letter-spacing: 0.01em;
	color: var(--muted);
	margin: 0 0 0.6em;
}

.hero-byline .sep {
	color: var(--gold);
	font-style: normal;
	margin: 0 0.15em;
}

.hero-lead {
	font-family: var(--font-serif);
	font-size: var(--step-1);
	line-height: 1.45;
	color: var(--ink-soft);
	max-width: 24ch; /* лід як «дек», не абзац */
}

.hero-lead p:last-child {
	margin-bottom: 0;
}

.hero-portrait {
	width: 5.5rem;
	height: 5.5rem;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	margin: 0 0 1.25rem;
	box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold);
}

.hero-text > .eyebrow {
	letter-spacing: 0.2em;
	margin-bottom: 1.1em;
}

.has-ornaments .hero-text > .eyebrow::before { /* вишита зірка перед підписом — та сама, що відкриває розділи */
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 0.6rem;
	vertical-align: -2px;
	background: var(--orn-star) center / contain no-repeat;
}

.hero-actions {
	margin-top: 1.5rem;
}

.hero-cta {
	padding: 0.75em 1.5em;
	font-size: 1rem;
	box-shadow: 0 10px 20px -14px rgba(var(--accent-rgb), 0.9);
}

.hero-cta .quill {
	width: 1.15em;
	height: 1.15em;
	flex: none;
	transition: transform 0.2s ease;
}

.hero-cta .quill-shaft {
	stroke: var(--gold-light); /* золотий стрижень у білому пері (identity-7) */
}

.hero-cta:hover .quill {
	transform: rotate(-14deg) translateY(-1px);
}

/* Розділи — рядок змісту під волосяною лінією (ярус 3: виноска); голос підпису — з базового правила */
.hero-links-label {
	margin-right: 0.9rem;
	align-self: center;
}

.hero-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0;
	margin-top: 2.5rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--line);
}

.pill { /* базова «пігулка» лишається для інших місць і для touch-правил */
	display: inline-block;
	padding: 0.4em 0.95em;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	font-family: var(--font-ui);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-soft);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pill:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.hero-links .pill { /* рядок змісту: Literata із золотим підкресленням, без рамок */
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-family: var(--font-serif);
	font-size: 1.02rem;
	font-weight: 400;
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: rgba(176, 141, 87, 0.55);
}

.hero-links .pill:hover {
	color: var(--accent);
	text-decoration-color: currentColor;
	background: transparent;
	border-color: transparent;
}

.hero-links .pill:not(:last-child)::after { /* золота крапка ПІСЛЯ пункту: при переносі не стає на початок рядка; inline-block не успадковує підкреслення */
	content: "·" / "";
	display: inline-block;
	margin: 0 0.6em;
	color: var(--gold);
	font-weight: 700;
	text-decoration: none;
}

.hero-latest {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.5rem;
	box-shadow: var(--shadow);
}

.hero-latest-media {
	display: block;
	margin: -1.5rem -1.5rem 1.25rem;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--paper-warm);
}

.hero-latest-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-latest-title {
	font-size: var(--step-2);
	margin-bottom: 0.4em;
}

.hero-latest-title a {
	color: var(--ink);
	text-decoration: none;
}

.hero-latest-title a:hover {
	color: var(--accent);
}

.hero-latest-excerpt {
	margin: 0.75em 0 0;
	color: var(--ink-soft);
	font-size: var(--step--1);
}

/* Вірш дня — сливовий екслібрис із золотою ниткою (той самий словник, що й підвал) */
.hero-verse {
	position: relative;
	background:
		radial-gradient(28rem 16rem at 100% 0%, rgba(212, 180, 119, 0.16), transparent 65%),
		linear-gradient(165deg, var(--ink-plum-soft), var(--ink-plum) 60%, var(--ink-plum-deep));
	border: 1px solid rgba(212, 180, 119, 0.28);
	border-radius: var(--radius-lg);
	padding: 1.5rem 1.75rem;
	color: var(--on-plum);
	box-shadow: inset 0 0 0 1px rgba(212, 180, 119, 0.14), 0 30px 44px -30px rgba(38, 32, 43, 0.85), var(--shadow);
}

.hero-verse .eyebrow {
	color: var(--gold-light);
}

.hero-verse::after { /* без орнаментів — тиха золота лапка */
	content: "“" / "";
	position: absolute;
	right: 1.1rem;
	top: 0.6rem;
	font-family: var(--font-display);
	font-size: 6rem;
	line-height: 1;
	color: rgba(212, 180, 119, 0.24);
	pointer-events: none;
}

.has-ornaments .hero-verse::after { /* з орнаментами — калина в куті сторінки, як наприкінці кожного вірша */
	content: "";
	width: 32px;
	height: 22px;
	top: calc(10px + 1.25rem + 0.15rem); /* під стрічкою, на рівні eyebrow */
	right: 1.75rem;
	background: var(--orn-kalyna-dark) center / contain no-repeat;
	opacity: 0.9;
}

.hero-verse-text {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	font-family: var(--font-display);
	font-style: italic;
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
	line-height: 1.42;
	color: var(--on-plum);
	white-space: normal; /* рядки — окремі блоки (.hero-verse-line), pre-line більше не потрібен */
	text-wrap: pretty;
	hanging-punctuation: first;
	display: -webkit-box;
	-webkit-line-clamp: 8;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hero-verse-line { /* висячий відступ: перенесений хвіст стоїть правіше, лівий край вірша чистий */
	display: block;
	padding-left: 1.2em;
	text-indent: -1.2em;
}

.hero-verse-line:first-child { /* інципіт */
	font-size: 1.12em;
	color: var(--gold-light);
}

.hero-verse-title { /* підпис як епіграф: — Назва, дата */
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.5rem;
	margin: 0.25rem 0 0.75rem;
	font-family: var(--font-ui);
	font-size: 0.9rem;
	color: var(--on-plum-muted);
}

.hero-verse-title::before {
	content: "—" / "";
	color: var(--gold-light);
	font-family: var(--font-display);
	font-size: 1.05rem;
}

.hero-verse-title a {
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 500;
	font-size: 1.12rem;
	color: var(--on-plum);
	text-decoration: none;
}

.hero-verse-title a:hover {
	color: var(--gold-light);
}

.hero-verse-title .entry-date { /* курсив Literata — з правила дат («Мета») */
	font-size: 0.92rem;
	color: var(--on-plum-muted);
}

.hero-verse-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	margin: 0;
	font-family: var(--font-ui);
	font-size: 0.85rem;
}

.hero-verse-actions .card-more {
	color: var(--gold-light);
}

.hero-verse-actions .card-more:hover {
	color: var(--on-plum);
}

.hero-verse-random {
	color: var(--on-plum-soft);
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}

.hero-verse-random:hover {
	color: var(--gold-light);
}

.hero-verse a:focus-visible { /* сливове кільце зникло б на сливі */
	outline-color: var(--gold-light);
	box-shadow: 0 0 0 3px var(--ink-plum);
}

/* «Новий запис» — закладка-стрічка; шрифт і колір підпису — з базового правила підписів */
.hero-new {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.6rem;
	margin: 0.85rem 0 0;
	font-family: var(--font-ui);
	font-size: 0.92rem;
}

.hero-new-label::before { /* закладка-стрічка */
	content: "";
	display: inline-block;
	width: 7px;
	height: 12px;
	margin-right: 0.5rem;
	vertical-align: -1px;
	background: var(--accent);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 68%, 0 100%);
}

.hero-new a {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 1.02rem;
	color: var(--ink);
	text-decoration-color: rgba(176, 141, 87, 0.6);
}

.hero-new .entry-date {
	font-size: 0.92rem;
}

/* Орнаменти вступного блоку — базові правила ПЕРЕД планшетними медіа-блоками, інакше ті не перекривають їх (однакова специфічність) */
.has-ornaments .hero {
	position: relative;
	overflow: hidden;
}

.has-ornaments .hero::before { /* зірковий візерунок вступного блоку */
	content: "";
	position: absolute;
	inset: 0;
	background: var(--orn-star) 0 0 / 66px 66px repeat; /* візерунок «ружа» з першої версії — на прохання власника */
	opacity: 0.07;
	-webkit-mask-image: linear-gradient(100deg, transparent 45%, #000 75%);
	mask-image: linear-gradient(100deg, transparent 45%, #000 75%);
	pointer-events: none;
}

.hero-inner {
	position: relative;
}

.has-ornaments .hero-latest::before {
	content: "";
	display: block;
	height: 10px;
	margin: -1.5rem -1.5rem 1.25rem;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: var(--orn-band) center / 22.86px 10px repeat-x;
	opacity: 0.85;
}

.has-ornaments .hero-verse::before { /* золото на сливі — стрічка екслібриса */
	content: "";
	display: block;
	height: 10px;
	margin: -1.5rem -1.75rem 1.25rem;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: var(--orn-band-dark) center / 22.86px 10px repeat-x;
	opacity: 1;
}

.has-ornaments .hero-latest-media + .hero-latest-title,
.has-ornaments .hero-latest-media {
	margin-top: 0;
}

.has-ornaments .hero-latest--has-media::before { /* клас із PHP — запасний варіант без :has() */
	display: none;
}

.has-ornaments .hero-latest:has(.hero-latest-media)::before {
	display: none;
}

/* Планшет у ландшафті (1001–1140px): вужча текстова колонка, вірш дрібніший, 10 рядків */
@media (min-width: 1001px) and (max-width: 1140px) {
	.hero-inner {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		gap: 2.5rem;
	}

	.hero-verse {
		padding: 1.5rem;
	}

	.has-ornaments .hero-verse::before {
		margin: -1.5rem -1.5rem 1.25rem;
	}

	.has-ornaments .hero-verse::after {
		right: 1.5rem;
	}

	.hero-verse-text {
		font-size: 1.15rem;
		-webkit-line-clamp: 10;
	}
}

/* Планшет у портреті (701–1000px): дві колонки лишаються, картка на всю колонку */
@media (min-width: 701px) and (max-width: 1000px) {
	.hero-new .entry-date {
		display: none; /* дата є на картці запису; у вузькій колонці «Новий запис» лишається одним рядком */
	}

	.hero-inner {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
		gap: 2rem;
	}

	.hero-title {
		font-size: var(--step-3);
	}

	.hero-latest,
	.hero-verse {
		max-width: none;
		padding: 1.25rem 1.4rem;
	}

	.hero-verse-text {
		font-size: 1.1rem;
	}

	.has-ornaments .hero-verse::before,
	.has-ornaments .hero-latest::before {
		margin: -1.25rem -1.4rem 1.1rem;
	}

	.has-ornaments .hero-verse::after {
		right: 1.4rem;
		top: calc(10px + 1.1rem + 0.15rem);
	}

	.hero-latest-media {
		margin: -1.25rem -1.4rem 1.1rem;
	}

	.hero-links-label {
		flex-basis: 100%;
		margin: 0 0 -0.15rem;
	}
}

/* Стос (≤700px): текст над карткою */
@media (max-width: 700px) {
	.hero-inner {
		grid-template-columns: minmax(0, 1fr); /* minmax(0,…): рядок розділів без переносів не розпирає колонку */
	}

	.hero-latest,
	.hero-verse {
		max-width: none; /* картка на всю колонку… */
	}

	.hero-verse-text,
	.hero-latest-excerpt {
		max-width: 34rem; /* …міра вірша лишається книжковою */
	}

	.hero:not(.hero--solo) .hero-text,
	.has-ornaments .hero:not(.hero--solo) .hero-text {
		padding-top: 0; /* у стосі вирівнювати нема з чим */
	}

	.has-ornaments .hero::before { /* зоряне поле — під ім'я, а не за нього */
		-webkit-mask-image: linear-gradient(180deg, transparent 38%, #000 72%);
		mask-image: linear-gradient(180deg, transparent 38%, #000 72%);
	}
}

/* ---------- Мета ---------- */
.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.75rem;
	font-family: var(--font-ui);
	font-size: 0.82rem;
	color: var(--muted);
	margin: 0 0 0.75rem;
}

.entry-cats {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.cat-chip {
	display: inline-block;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: rgba(var(--accent-rgb), 0.09);
	color: var(--accent);
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.cat-chip:hover {
	background: var(--accent);
	color: #fff;
}

.format-badge {
	padding: 0.15em 0.6em;
	border: 1px solid var(--gold);
	color: var(--gold-ink);
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Дати всюди — курсив Literata, приглушені (type-6) */
.entry-date,
.entry-reading,
.widget .post-date,
.widget .wp-block-latest-posts__post-date,
.comment-metadata time {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 0.9rem;
	letter-spacing: 0.01em;
	color: var(--muted);
	font-variant-numeric: proportional-nums;
}

.entry-date {
	white-space: nowrap;
}

/* ---------- Розкладка ---------- */
.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4rem);
	padding-top: 1rem;
}

.layout.has-sidebar {
	grid-template-columns: minmax(0, 1fr) 18rem;
}

/* Планшет у ландшафті (1001–1140px): вужча бічна колонка, щоб сітка карток лишалася 2-колонковою */
@media (max-width: 1140px) {
	.layout.has-sidebar {
		grid-template-columns: minmax(0, 1fr) 16rem;
		gap: 2rem;
	}
}

@media (max-width: 1000px) {
	.layout.has-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Перший блок під стрічкою шапки (немає hero: /page/N/ або вимкнений вступ) — таке ж повітря, як у .page-header */
.site-main > .featured:first-child,
.site-main > .layout:first-child {
	padding-top: clamp(2rem, 5vw, 3.5rem);
}

/* Запис/сторінка з бічною колонкою: вкладені контейнери без подвійних полів, «полиця» — панель у колонці */
.site-main > .layout.layout--entry {
	padding-top: 0; /* повітря дає .entry-header */
}

.layout--entry .layout-main > .entry .container,
.layout--entry .layout-main > .container,
.layout--entry .entry-shelf .container {
	padding-inline: 0;
}

.layout--entry .container--narrow {
	max-width: var(--measure);
}

.layout--entry .container--wide {
	max-width: none;
}

.layout--entry .entry-shelf {
	margin-bottom: 0;
	padding-inline: clamp(1rem, 3vw, 2rem);
	border-radius: var(--radius-lg);
	box-shadow: inset 0 0 0 1px var(--line);
}

.layout--entry .layout-sidebar {
	padding-top: clamp(2rem, 5vw, 4rem); /* на рівні з титулом запису */
}

@media (max-width: 1140px) {
	.layout--entry.has-sidebar .related .grid-3 { /* у вузькій колонці поруч із бічною — «Читайте також» стовпчиком */
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Заголовок архіву як титульна сторінка (archive-1): лічильник — курсивний колофон золотом-чорнилом на зоряній лінії */
.page-header {
	position: relative;
	overflow: hidden;
	padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem);
	border-bottom: 1px solid var(--line);
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	background: linear-gradient(180deg, var(--paper-warm), var(--paper-soft));
}

.page-header > .container {
	position: relative; /* над зоряним полем ::before («Орнаменти») */
}

.page-header .page-title {
	margin-bottom: 0.15em;
}

.page-count { /* type-6 + archive-1 */
	margin: 0;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 1.02rem;
	letter-spacing: 0.01em;
	color: var(--gold-ink);
}

.archive-description {
	max-width: var(--measure);
	margin: 0.25rem 0 0;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: var(--step-0);
	line-height: 1.5;
	color: var(--ink-soft);
}

.page-header-rule {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-top: 1.1rem;
}

.page-header-rule .ornament--start {
	margin: 0;
	flex: none;
	width: 8rem;
	max-width: 8rem;
}

.page-header .eyebrow a { /* archive-2: «Архів · 2016» веде на рік */
	color: inherit;
	text-decoration: none;
}

.page-header .eyebrow a:hover {
	text-decoration: underline;
	text-decoration-color: var(--gold);
}

.page-header-search {
	max-width: 32rem;
	margin-top: 1rem;
}

/* Кожна рубрика — на своєму папері (archive-7); body.rubric-* ставить myroslava_rubric_body_class */
body.rubric-prose .page-header {
	background: linear-gradient(180deg, #f6efe6, var(--paper-soft));
}

body.rubric-notes .page-header {
	background: linear-gradient(180deg, #f5f1ea, var(--paper-soft));
}

body.rubric-kids .page-header {
	background: linear-gradient(180deg, #faf3e3, var(--paper-soft));
}

body.rubric-media .page-header {
	background: linear-gradient(180deg, #f3eef3, var(--paper-soft));
}

/* ---------- Картки ---------- */
.grid {
	display: grid;
	gap: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.25rem, 3vw, 2rem); /* ряд = розворот: вертикальний проміжок на третину більший */
}

.grid-2 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}

.grid-3 {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.card {
	position: relative; /* уся картка — посилання (накладка .card-title a::after) */
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover { /* «чорнильний» hover: сливова тінь і рамка */
	transform: translateY(-3px);
	box-shadow: 0 1px 2px rgba(34, 28, 26, 0.04), 0 22px 44px -26px rgba(var(--accent-rgb), 0.45);
	border-color: rgba(var(--accent-rgb), 0.28);
}

.card-media {
	position: relative;
	display: block;
	margin: 0;
	aspect-ratio: 4 / 3;
	flex: 1 0 auto; /* зайву висоту ряду забирає фото, не порожнеча під текстом */
	background: var(--paper-warm);
	overflow: hidden;
}

.card-media a {
	position: absolute;
	inset: 0;
	display: block;
}

.card-media:not(.card-media--text)::after { /* волосяна рамка: світлі фото мають край */
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 1px rgba(34, 28, 26, 0.08);
	pointer-events: none;
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.card:hover .card-media img {
	transform: scale(1.03);
}

/* Обкладинка без фото — як обкладинка книги: тон рубрики + вишитий штамп у куті (--orn-star-faint з inc/ornaments.php; без орнаментів — none) */
.card-media--text {
	position: relative;
	display: flex;
	align-items: flex-start;
	flex: 1 0 auto;
	padding: 3rem 1.6rem 1.5rem;
	min-height: 13rem;
	text-decoration: none;
	color: var(--ink-soft);
	background:
		var(--orn-star-faint, none) right -0.9rem top -0.9rem / 5.5rem 5.5rem no-repeat,
		radial-gradient(28rem 16rem at 100% 0%, rgba(var(--accent-rgb), 0.12), transparent 65%),
		var(--paper-warm);
	aspect-ratio: auto;
}

.card-media--text::before {
	content: "“" / "";
	position: absolute;
	top: 0.35rem;
	left: 1.1rem;
	font-family: var(--font-display);
	font-size: 4.5rem;
	line-height: 1;
	color: rgba(var(--accent-rgb), 0.22);
	transition: color 0.25s ease;
}

.card:hover .card-media--text::before {
	color: rgba(var(--accent-rgb), 0.38);
}

.card-quote {
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1rem;
	line-height: 1.5;
	white-space: pre-line;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-media--verse .card-quote {
	font-size: 1.02rem;
	line-height: 1.6;
	-webkit-line-clamp: 8;
}

.card-media--prose {
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
}

.card-media--prose .card-quote { /* одна витягнута фраза як епіграф, по центру, без маски-затухання */
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.08rem;
	line-height: 1.5;
	color: var(--ink-soft);
	white-space: normal;
	flex: 0 0 auto;
	min-height: 0;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
	-webkit-mask-image: none;
	mask-image: none;
	text-wrap: pretty;
	hanging-punctuation: first;
}

.card-body {
	--card-pad: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 0 0 auto; /* тіло обіймає вміст; висоту ряду бере обкладинка */
	padding: 1.25rem var(--card-pad) 1.2rem;
}

.card > .card-body:first-child { /* картка зовсім без обкладинки заповнює ряд сама */
	flex: 1;
}

.card-title {
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 0.5em;
	font-size: var(--step-1);
}

.card-title a {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
	transition: text-decoration-color 0.2s ease;
}

.card-title a::after { /* уся картка — посилання, на всіх пристроях */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.card:hover .card-title a,
.card:focus-within .card-title a,
.card-title a:hover {
	color: var(--ink);
	text-decoration-color: var(--gold);
}

.card-excerpt {
	color: var(--ink-soft);
	font-size: var(--step--1);
	margin: 0 0 1.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card-excerpt--verse {
	white-space: pre-line;
	font-family: var(--font-display);
	font-style: italic;
	color: var(--ink-soft);
	-webkit-line-clamp: 4;
}

.card-more { /* тихе посилання (hero, verse-aside) */
	margin-top: auto;
	font-family: var(--font-ui);
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none;
}

.card-more span {
	display: inline-block;
	transition: transform 0.15s ease;
}

.card-more:hover span {
	transform: translateX(3px);
}

.card .card-more { /* колофон картки: лінія на всю ширину, капітель золотом ліворуч, стрілка праворуч */
	margin: auto calc(-1 * var(--card-pad)) 0;
	padding: 0.8rem var(--card-pad) 0;
	border-top: 1px solid var(--line);
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
	z-index: 2;
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gold-ink);
	transition: color 0.15s ease;
}

.card .card-more:hover,
.card:hover .card-more {
	color: var(--accent);
}

.card:hover .card-more span {
	transform: translateX(4px);
}

/* Рубрика в картці — капітельний кікер, а не «пігулка»; пігулки лишаються в hero, шапці запису, бічній колонці */
.card .entry-meta {
	position: relative;
	z-index: 2;
	gap: 0.35rem 0.6rem;
	font-size: 0.76rem;
	margin-bottom: 0.65rem;
}

.card .cat-chip {
	padding: 0;
	border-radius: 0;
	background: transparent;
	font-size: 0.72rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
}

.card .cat-chip:hover {
	background: transparent;
	color: var(--ink);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-underline-offset: 0.2em;
}

.card .entry-cats::after { /* золота крапка після рубрики (дата завжди йде за нею; при переносі крапка не починає рядок) */
	content: "";
	display: inline-block;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--gold);
	margin-left: 0.6rem;
	vertical-align: 0.2em;
}

.card .format-badge {
	font-size: 0.66rem;
	padding: 0.1em 0.55em;
}

/* Відео/аудіо: гліфи на картці, щоб їх успадкували і маска обкладинки, і значок на фото */
.card--video {
	--glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M16 12.5v15l12-7.5z'/%3E%3C/svg%3E");
	--glyph-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M16 12.5v15l12-7.5z' fill='%23fff'/%3E%3C/svg%3E");
}

.card--audio {
	--glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Crect x='12' y='17' width='3' height='8' rx='1.5'/%3E%3Crect x='18.5' y='12' width='3' height='18' rx='1.5'/%3E%3Crect x='25' y='15' width='3' height='12' rx='1.5'/%3E%3C/svg%3E");
	--glyph-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='18.5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Crect x='12' y='17' width='3' height='8' rx='1.5' fill='%23fff'/%3E%3Crect x='18.5' y='12' width='3' height='18' rx='1.5' fill='%23fff'/%3E%3Crect x='25' y='15' width='3' height='12' rx='1.5' fill='%23fff'/%3E%3C/svg%3E");
}

/* Обкладинка без фото: замість лапок — знак «відтворити» кольором акценту (маска) */
.card--video .card-media--text::before,
.card--audio .card-media--text::before {
	content: "";
	top: 1.1rem;
	left: 1.25rem;
	width: 2.4rem;
	height: 2.4rem;
	background: var(--accent);
	opacity: 0.8;
	-webkit-mask: var(--glyph) center / contain no-repeat;
	mask: var(--glyph) center / contain no-repeat;
}

/* Фото відео/аудіо: сливовий диск із білим знаком у нижньому лівому куті */
.card--video .card-media:not(.card-media--text)::before,
.card--audio .card-media:not(.card-media--text)::before {
	content: "";
	position: absolute;
	left: 0.9rem;
	bottom: 0.9rem;
	z-index: 1;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: rgba(38, 32, 43, 0.55) var(--glyph-white) center / 100% 100% no-repeat; /* біле кільце гліфа = обідок диска */
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	pointer-events: none;
}

/* Тон обкладинки за рубрикою — кольорові розділи одного журналу */
.card.rubric-notes .card-media--text {
	background:
		var(--orn-star-faint, none) right -0.9rem top -0.9rem / 5.5rem 5.5rem no-repeat,
		radial-gradient(28rem 16rem at 100% 0%, rgba(176, 141, 87, 0.18), transparent 65%),
		var(--paper-soft);
}

.card.rubric-notes .card-media--text::before {
	color: rgba(176, 141, 87, 0.45);
}

.card.rubric-notes:hover .card-media--text::before {
	color: rgba(176, 141, 87, 0.7);
}

.card.rubric-notes .entry-date { /* щоденник — про дати: курсив Literata трохи більший */
	font-size: 1rem;
	color: var(--ink-soft);
}

.card.rubric-kids .card-media--text {
	background:
		var(--orn-star-faint, none) right -0.9rem top -0.9rem / 5.5rem 5.5rem no-repeat,
		radial-gradient(24rem 14rem at 0% 100%, rgba(176, 141, 87, 0.16), transparent 65%),
		radial-gradient(28rem 16rem at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 65%),
		#fbf5ea;
}

.card.rubric-prose .card-media--text {
	background:
		var(--orn-star-faint, none) right -0.9rem top -0.9rem / 5.5rem 5.5rem no-repeat,
		linear-gradient(180deg, rgba(34, 28, 26, 0.04), transparent 60%),
		var(--paper-warm);
}

.card.rubric-prose .card-media--text::before {
	color: rgba(34, 28, 26, 0.16);
}

.card.rubric-prose:hover .card-media--text::before {
	color: rgba(34, 28, 26, 0.3);
}

.card.rubric-media .card-media--text {
	background:
		var(--orn-star-faint, none) right -0.9rem top -0.9rem / 5.5rem 5.5rem no-repeat,
		radial-gradient(28rem 16rem at 100% 0%, rgba(var(--accent-rgb), 0.2), transparent 60%),
		linear-gradient(180deg, #f3ecf4, var(--paper-warm));
}

/* Вибрані твори */
.featured {
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.featured .card-quote {
	font-size: 1.05rem;
}

.featured .card-media--text {
	min-height: 14rem;
}

.grid-3 .card-title {
	font-size: var(--step-0);
	line-height: 1.3;
}

/* Телефон (≤639px): полиця з обкладинок 4:5, третя визирає з-за краю (свайп) */
@media (max-width: 639px) {
	.featured .grid-3 {
		display: flex;
		gap: 0.85rem;
		margin-inline: calc(-1 * var(--gutter));
		padding: 0.25rem var(--gutter) 1rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.featured .grid-3::-webkit-scrollbar {
		display: none;
	}

	.featured .grid-3::after { /* Safari губить кінцевий padding у скролері */
		content: "";
		flex: 0 0 calc(var(--gutter) - 0.85rem);
	}

	.featured .card {
		flex: 0 0 min(76vw, 21rem);
		scroll-snap-align: start;
	}

	.featured .card-media:not(.card-media--text) {
		aspect-ratio: 4 / 5;
	}

	.featured .card-media--text {
		min-height: 16rem;
	}

	.featured .card-title {
		font-size: 1.15rem;
	}

	.featured .card-excerpt {
		-webkit-line-clamp: 3;
	}
}

/* 640–895px: третя картка — широка горизонтальна (як було) */
@media (min-width: 640px) and (max-width: 895px) {
	.featured .grid-3 > .card:nth-child(3):last-child {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: stretch;
	}

	.featured .grid-3 > .card:nth-child(3):last-child > .card-media:not(.card-media--text) {
		flex: 0 0 42%;
		aspect-ratio: auto;
		min-height: 14rem;
	}

	.featured .grid-3 > .card:nth-child(3):last-child > .card-media--text {
		flex: 0 0 50%;
		min-height: 0;
	}

	.featured .grid-3 > .card:nth-child(3):last-child > .card-body {
		flex: 1 1 auto;
	}
}

/* Від 896px: перша прикріплена — велика «обкладинка номера», дві інші — горизонтальні праворуч */
@media (min-width: 896px) {
	/* «Вибрані твори»: три рівні картки в ряд (без великої «обкладинки номера» — на прохання власника) */
	.featured .grid-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: clamp(1.25rem, 2.5vw, 1.75rem);
	}

	.featured .grid-3 > .card > .card-media:not(.card-media--text) { /* фото в ряду однієї висоти (4:3); решту висоти бере текст */
		flex: none;
		aspect-ratio: 4 / 3;
		min-height: 0;
	}

	.featured .grid-3 > .card > .card-body {
		flex: 1 1 auto;
	}

	/* Два прикріплені — дві рівні колонки; один — широка горизонтальна картка (клас із featured.php) */
	.featured .featured-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

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

	.featured .featured-grid--1 > .card:first-child {
		flex-direction: row;
		align-items: stretch;
	}

	.featured .featured-grid--1 > .card:first-child > .card-media:not(.card-media--text) {
		flex: 0 0 50%;
		aspect-ratio: auto;
		min-height: 16rem;
	}

	.featured .featured-grid--1 > .card:first-child > .card-media--text {
		flex: 0 0 50%;
		min-height: 0;
	}

	.featured .featured-grid--1 > .card:first-child > .card-body {
		flex: 1 1 auto;
	}
}

/* «Читайте також»: виноска, не друга стрічка — три тихі рядки з квадратною мініатюрою (на всіх ширинах) */
.related .grid-3 {
	gap: 0.75rem;
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.related .grid-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1rem;
	}
}

.related .card {
	flex-direction: row;
	align-items: center;
	gap: 1rem;
	padding: 0.65rem;
	border-radius: var(--radius);
}

.related .card:hover {
	transform: none;
}

.related .card-media {
	flex: none;
	width: 5rem;
	aspect-ratio: 1 / 1;
	min-height: 0;
	margin: 0;
	padding: 0;
	border-radius: var(--radius-sm);
}

.related .card-media--text {
	--orn-star-faint: none; /* штамп не влазить у 5rem — вимикаємо лише цей шар, тон рубрики лишається */
}

.related .card-quote,
.related .card-excerpt,
.related .card-more,
.related .format-badge, /* cards-8: значки формату в «Читайте також» ховаємо — рядок і так тісний */
.has-ornaments .related .card-media--text::after,
.related .card-media:not(.card-media--text)::after,
.related .card-media:not(.card-media--text)::before {
	display: none;
}

.related .card-media--text::before {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -30%);
	font-size: 2.75rem;
	color: rgba(var(--accent-rgb), 0.35);
}

.related .card-body {
	flex: 1 1 auto; /* базове flex: 0 0 auto (G5) лишало тіло на max-content — назви не переносились і обрізались */
	padding: 0 0.25rem 0 0;
	min-width: 0;
}

.related .entry-meta {
	margin-bottom: 0.2rem;
	font-size: 0.72rem;
	gap: 0.25rem 0.5rem;
}

.related .entry-date {
	font-size: 0.82rem;
}

.related .card-title {
	font-size: 1.05rem;
	line-height: 1.3;
	margin: 0;
}

/* ---------- Пагінація ---------- */
/* Книжковий розворот (archive-6): волосяна лінія із зіркою на ній, нумерали Playfair, «назад/далі» по краях, курсивний фоліо */
.pagination {
	position: relative;
	margin-top: clamp(2rem, 5vw, 3.5rem);
	padding-top: 1.75rem;
	border-top: 1px solid var(--line);
	font-family: var(--font-ui);
}

.has-ornaments .pagination::before {
	content: "";
	position: absolute;
	top: -11px;
	left: 50%;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	border-radius: 50%;
	background: var(--orn-star) center / 22px 22px no-repeat;
	box-shadow: 0 0 0 8px var(--paper-soft); /* кільце кольору тла розриває лінію навколо зірки */
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.pagination .nav-links::before,
.pagination .nav-links::after { /* розпірки: номери — по центру, стрілки — по краях */
	content: "";
	flex: 1 1 0;
}

.pagination .nav-links::before {
	order: -1;
}

.pagination .nav-links::after {
	order: 1;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.6rem;
	border: 0;
	border-radius: 999px;
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 600;
	font-variant-numeric: oldstyle-nums;
	color: var(--ink-soft);
	text-decoration: none;
	transition: color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pagination a.page-numbers:not(.prev):not(.next):hover {
	color: var(--accent);
	box-shadow: inset 0 -2px 0 var(--gold);
}

.pagination .page-numbers.current {
	background: var(--accent);
	color: #fff;
	box-shadow: 0 6px 14px -8px rgba(var(--accent-rgb), 0.8);
}

.pagination .page-numbers.dots {
	min-width: 1.25rem;
	padding: 0;
	color: var(--muted);
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
	flex: none;
	gap: 0.45em;
	padding: 0 1rem;
	border: 1px solid rgba(var(--accent-rgb), 0.35);
	font-family: var(--font-ui);
	font-size: 0.9rem;
	color: var(--accent);
}

.pagination .page-numbers.prev {
	order: -2; /* попередня стоїть лівіше за розпірку ::before */
	margin-right: 0.5rem;
}

.pagination .page-numbers.next {
	order: 2;
	margin-left: 0.5rem;
}

.pagination a.page-numbers.prev:hover,
.pagination a.page-numbers.next:hover {
	background: rgba(var(--accent-rgb), 0.08);
}

.pagination-status { /* фоліо курсивом, як лічильник архіву (archive-1); скидає капітель спільного правила підписів у «Базовому» */
	margin: 0.75rem 0 0;
	text-align: center;
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 400;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	text-transform: none;
	color: var(--gold-ink);
}

/* ---------- Окремий запис ---------- */
.entry-header {
	padding-top: clamp(2rem, 5vw, 4rem);
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	text-align: center;
}

.entry-header .entry-meta {
	justify-content: center;
}

.entry-title {
	font-size: var(--step-4);
	margin-bottom: 0;
}

/* Кікер над назвою (prose-7): жанрова ремарка чи серія — капітель золотом-чорнилом */
.entry-kicker {
	margin: 0 0 0.55em;
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: var(--label-track);
	text-transform: uppercase;
	color: var(--gold-ink);
	text-wrap: balance;
}

.entry-kicker a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(176, 141, 87, 0.5);
}

.entry-kicker a:hover {
	color: var(--accent);
	border-color: currentColor;
}

.entry-kicker + .entry-title {
	margin-top: 0;
}

.entry-title.is-long { /* verse-4: назва довша за 36 знаків — на щабель менша */
	font-size: var(--step-3);
}

.entry-byline {
	margin: 0.75em 0 0;
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--step-0);
	letter-spacing: 0.01em;
	color: var(--muted);
}

.entry-byline::before {
	content: "— " / "";
}

/* verse-4: авантитул — автор капітеллю, рубрика текстом із золотою крапкою (дата курсивом за type-6) */
.entry--verse .entry-byline {
	font-style: normal;
	font-size: var(--label-size);
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--gold-ink);
}

.entry--verse .entry-byline::before {
	content: none;
}

.is-verse .entry-header .cat-chip {
	padding: 0;
	background: none;
	font-size: var(--label-size);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.is-verse .entry-header .cat-chip:hover {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: var(--gold);
	text-underline-offset: 0.2em;
}

.is-verse .entry-header .entry-cats + .entry-date::before {
	content: "·" / "";
	color: var(--gold);
	margin-right: 0.75rem; /* симетрично до gap .entry-meta: РУБРИКА · дата */
}

.rubric-notes .entry-header .entry-cats + .entry-date::before {
	content: none; /* у щоденнику дата — штамп над назвою (prose-6): крапці там нема місця */
}

/* prose-6: щоденник — дата як штамп над назвою (spans .date-day/-month/-year ставить PHP; всюди інде вони inline).
   font-style: normal на штампі перекриває курсив .entry-date з type-6: (0,3,0) проти (0,1,0). */
.rubric-notes .entry-header .entry-meta {
	flex-direction: column;
	align-items: center;
	gap: 0.7rem;
	margin-bottom: 1rem;
}

.rubric-notes .entry-header .entry-date {
	order: -1;
	display: grid;
	justify-items: center;
	line-height: 1;
	white-space: normal;
	font-style: normal;
}

.rubric-notes .entry-header .date-day {
	font-family: var(--font-display);
	font-size: var(--step-3);
	font-weight: 600;
	color: var(--accent);
	font-variant-numeric: lining-nums;
}

.rubric-notes .entry-header .date-month,
.rubric-notes .entry-header .date-year {
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.rubric-notes .entry-header .date-month {
	margin-top: 0.45rem;
	color: var(--gold-ink);
}

.rubric-notes .entry-header .date-year {
	margin-top: 0.2rem;
	color: var(--muted);
}

.rubric-notes .entry-header .entry-date::after {
	content: "";
	width: 2.5rem;
	height: 1px;
	margin-top: 0.7rem;
	background: var(--gold);
}

.rubric-notes .entry-title {
	font-size: var(--step-3);
}

.entry-media {
	margin: 0 auto clamp(1.5rem, 4vw, 3rem);
}

.entry-media img {
	display: block;
	width: auto;
	max-width: 100%;
	margin-inline: auto;
	border-radius: var(--radius);
}

/* Вірш: картина — вклейка в паспарту (verse-7): тепле поле з рамкою, підпис із тире.
   (0,2,0) перекриває .container/.container--wide: ширина, поля, max-width — усе тут. Телефон — у «Мобільних», друк — у «Друці». */
.entry--verse .entry-media {
	width: fit-content;
	max-width: min(100%, calc(var(--measure) + 2 * var(--gutter)));
	margin: 0 auto clamp(1.75rem, 4vw, 3rem);
	padding: 8px;
	background: var(--paper-warm);
	border: 1px solid var(--line);
	box-shadow: inset 0 0 0 1px var(--paper), 0 1px 2px rgba(34, 28, 26, 0.05);
}

.entry--verse .entry-media img {
	max-height: min(56vh, 32rem);
	object-fit: contain;
	border-radius: 0;
	box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.entry--verse .entry-media figcaption {
	margin: 0.6rem 0 0.15rem;
	font-size: 0.76rem;
	letter-spacing: 0.05em;
}

.entry--verse .entry-media figcaption::before {
	content: "— " / "";
	color: var(--gold-ink);
}

.entry-content {
	font-size: var(--step-0);
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content img {
	border-radius: var(--radius-sm);
}

.entry-content .aligncenter,
.entry-content img.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.entry-content .alignleft {
	float: left;
	margin: 0.3em 1.5em 1em 0;
	max-width: 50%;
}

.entry-content .alignright {
	float: right;
	margin: 0.3em 0 1em 1.5em;
	max-width: 50%;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content .wp-caption {
	max-width: 100%;
}

.entry-content .alignwide {
	margin-inline: calc(50% - min(50vw - var(--gutter), 31rem));
	width: auto;
	max-width: none;
}

.entry-content .alignfull {
	margin-inline: calc(50% - 50vw);
	width: 100vw;
	max-width: none;
}

/* prose-8: картинки в прозі виходять за міру колонки, м'яка рамка, золота риска над підписом (лише не-вірші).
.wp-block-embed — теж <figure>,
.entry:not(.entry--verse) .entry-content > figure:not(.alignleft, .alignright, .alignfull, .alignwide, .wp-block-embed),
.entry:not(.entry--verse) .entry-content > .wp-caption.aligncenter,
.entry:not(.entry--verse) .entry-content > .wp-caption.alignnone {
	margin-inline: calc(50% - min(50vw - var(--gutter), 31rem));
	margin-block: 1.75em;
	text-align: center;
	text-indent: 0;
	max-width: none;
}

тому виключений: відео лишається в колонці. Паспарту вірша зберігає підпис із тире: (0,2,1) > (0,1,1). */
.entry:not(.entry--verse) .entry-content > p:has(> img:only-child) { /* :has() окремо: браузер без :has() відкидає весь список */
	margin-inline: calc(50% - min(50vw - var(--gutter), 31rem));
	margin-block: 1.75em;
	text-align: center;
	text-indent: 0;
	max-width: none;
}

.entry:not(.entry--verse) .entry-content > p > img:only-child,
.entry:not(.entry--verse) .entry-content figure:not(.wp-block-embed) img,
.entry:not(.entry--verse) .entry-content .wp-caption img {
	display: inline-block;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	outline: 1px solid rgba(34, 28, 26, 0.08);
	outline-offset: -1px;
}

.entry-content figcaption::before,
.entry-content .wp-caption-text::before,
.entry-media figcaption::before {
	content: "";
	display: block;
	width: 2rem;
	height: 1px;
	margin: 0.7rem auto 0.45rem;
	background: var(--gold);
}

@media (max-width: 1000px) {
	.entry:not(.entry--verse) .entry-content > figure:not(.alignleft, .alignright, .alignfull, .alignwide, .wp-block-embed),
	.entry:not(.entry--verse) .entry-content > .wp-caption.aligncenter,
	.entry:not(.entry--verse) .entry-content > .wp-caption.alignnone {
		margin-inline: 0;
	}

	.entry:not(.entry--verse) .entry-content > p:has(> img:only-child) { /* :has() окремо: браузер без :has() відкидає весь список */
		margin-inline: 0;
	}
}

.wp-block-embed,
.entry-content .video-container,
.entry-content .wp-video,
.entry-content .wp-audio-shortcode {
	margin: 1.75em 0;
}

.wp-block-embed__wrapper {
	position: relative;
}

.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper::before {
	padding-top: 56.25%;
}

/* Старі записи: відео-iframe без блокової обгортки → .video-wrap (PHP myroslava_wrap_iframes, JS — запасний варіант) */
.video-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 1.75em 0;
}

.video-wrap--portrait {
	aspect-ratio: 9 / 16; /* вертикальні Shorts */
	max-width: 22rem;
	margin-left: auto;
	margin-right: auto;
}

.video-wrap > iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.entry-content > iframe[src*="youtube"],
.entry-content > p > iframe[src*="youtube"],
.entry-content > iframe[src*="vimeo"] {
	max-width: 100%;
}

/* Старі записи: центрований вірш із інлайн-стилями зберігає своє вирівнювання,
   але шрифт та кольори підтягуємо до теми. */
.entry-content [style*="font-family"] {
	font-family: inherit !important;
}

.entry-content [style*="font-size"] {
	font-size: inherit !important;
}

.entry-content span[style*="color: #ffffff"],
.entry-content span[style*="color:#ffffff"],
.entry-content span[style*="color: white"] {
	color: #fff !important;
}

.entry-content > p:has(> span[style*="color: #ffffff"]:only-child),
.entry-content > p:has(> span[style*="color:#ffffff"]:only-child) {
	margin: 0;
	line-height: 0.6;
}

.entry-content p[style*="text-align: center"],
.entry-content [style*="text-align:center"] {
	text-align: center;
}

/* Тиха палітра: інлайн-кольори старих записів → кольори теми (клас quiet-inline на <body>).
   Порядок важливий: правило inherit у :where() має специфічність (0,2,0), правила акценту/золота йдуть після. */
.quiet-inline .entry-content [style*="color"]:where(:not([style*="#ffffff"]):not([style*="#fff;"]):not([style*="#fff "]):not([style*="white"])) { /* «#fff» ловив і #ffff00 (жовтий текст «Викрутасика») */
	color: inherit !important;
}

/* Синьо-фіолетові назви циклів, епіграфи → акцент; теплі відтінки («Далі буде») → золото. */
.quiet-inline .entry-content [style*="#333399"],
.quiet-inline .entry-content [style*="#666699"],
.quiet-inline .entry-content [style*="#800080"],
.quiet-inline .entry-content [style*="#003366"],
.quiet-inline .entry-content [style*="#cc99ff"],
.quiet-inline .entry-content [style*="#008080"] {
	color: var(--accent) !important;
}

.quiet-inline .entry-content [style*="#800000"],
.quiet-inline .entry-content [style*="#993300"],
.quiet-inline .entry-content [style*="#ff9900"] {
	color: var(--gold-ink) !important;
}

/* «Жирний» вірш → книжкова вага 450 (Literata variable 400–700; verse-3 — 470, якщо на Windows ClearType виглядає тонко) */
.quiet-inline .entry-content [style*="center"] strong,
.quiet-inline .entry-content [style*="center"] b,
.quiet-inline .entry-content strong[style*="center"] {
	font-weight: 450;
}

/* Дрібні 8pt-рядки (епіграфи, підписи) — справді дрібніші, а не inherit */
.quiet-inline .entry-content [style*="font-size: 8pt"],
.quiet-inline .entry-content [style*="font-size:8pt"] {
	font-size: var(--step--1) !important;
}

/* Верстка вірша: рядок/строфа (verse-1), оптичний кегль Literata (verse-3), hr · передмова · післямова (verse-9) */
.entry--verse .entry-content {
	--verse-line: 0.3em;    /* між рядками-абзацами */
	--verse-stanza: 1.25em; /* між строфами ≈ один рядок */
	max-width: calc(36rem + 2 * var(--gutter));
	font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
	line-height: var(--leading-verse);
	font-variation-settings: "opsz" 24; /* Literata 7–72: книжковий кегль, тонші засічки; Playfair/Manrope без осі — ігнорують */
	overflow-wrap: anywhere; /* довгі адреси-післямови й лінії з тире не розпирають сторінку на планшеті */
}

.entry--verse .entry-content p,
.entry--verse .entry-content div[style*="center"] > p {
	margin-bottom: var(--verse-line);
	text-wrap: balance;
}

.entry--verse .entry-content div[style*="center"]:not(:has(p, div)) { /* рядок-«листок» у <div> (29 віршів) — той самий крок, що й у <p>; <br> усередині такого div — не строфа (епіграф + перший рядок у «Слухаєш») */
	margin-bottom: var(--verse-line);
	text-wrap: balance;
}

.entry--verse .entry-content p:has(br) { /* строфа, набрана одним абзацом (Shift+Enter) */
	margin-bottom: var(--verse-stanza);
}

.entry-content .verse-gap { /* проза — як було */
	margin: 0;
	height: 0.6em;
	line-height: 0;
}

.entry--verse .entry-content .verse-gap { /* обидва шляхи до строфи дають однакову відстань */
	height: calc(var(--verse-stanza) - var(--verse-line));
}

.entry--verse .entry-content .verse-gap + .verse-gap {
	height: 0;
}

/* біла «.» = строфа; перекриває загальне правило білих розпірок за специфічністю */
.entry--verse .entry-content > p:has(> span[style*="color: #ffffff"]:only-child),
.entry--verse .entry-content > p:has(> span[style*="color:#ffffff"]:only-child),
.entry--verse .entry-content div:has(> span[style*="color: #ffffff"]:only-child) {
	margin: 0;
	line-height: calc(var(--verse-stanza) - var(--verse-line));
}

/* вірш усередині прози: центровані рядки поспіль — щільно, останній перед прозою — звичайний відступ */
.entry:not(.entry--verse) .entry-content p[style*="center"]:has(+ p[style*="center"]) {
	margin-bottom: 0.3em;
}

.entry--verse .entry-content > p:has(> a:only-child):not(:has(img)),
.entry--verse .entry-content > div > p:has(> a:only-child):not(:has(img)) { /* післямова-посилання; старі записи загорнуті в <div> (Рухаєшся); посилання-картинки не чіпаємо */
	text-align: center;
	font-family: var(--font-ui);
	font-size: var(--step--1);
	overflow-wrap: anywhere;
	margin-top: 1.5em;
}

/* лише кінцевий <hr> (або перед кікером циклу) ховається; серединний — зірка з повітрям */
.entry--verse .entry-content > hr:last-child {
	display: none;
}

.entry--verse .entry-content > hr:has(+ .ornament--end),
.entry--verse .entry-content hr:has(+ .verse-cycle),
.entry--verse .entry-content hr:has(+ .verse-junk) { /* :has() окремо: браузер без :has() відкидає весь список */
	display: none;
}

.has-ornaments .entry--verse .entry-content hr {
	margin: 1.75em auto;
	max-width: 10rem;
}

/* передмова-щоденник перед назвою («І знову розмови з собою.») */
.entry--verse .entry-content > p:not([style*="center"]):not(.verse-gap):has(~ .verse-cycle, ~ .verse-title, ~ div .verse-cycle, ~ div .verse-title) {
	font-style: italic;
	color: var(--ink-soft);
	margin-bottom: 1.5em;
}

.entry-content .verse-title {
	font-family: var(--font-display);
	font-size: var(--step-1);
	font-weight: 600;
	line-height: 1.25;
	margin-bottom: 1em !important;
}

.entry-content .verse-title :is(strong, b, span) {
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
}

/* verse-4: назву несе H1 — дубль і «сміття» («–», «_») ховаємо; цикл — капітель між двома золотими волосинами.
   Стоїть після правил тихої палітри: обидва !important, пізніше перемагає. */
.entry--verse .entry-content .verse-title,
.entry--verse .entry-content .verse-junk {
	display: none;
}

.entry--verse .entry-content .verse-cycle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin: 0 0 1.6em !important;
	font-family: var(--font-display);
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gold-ink) !important;
}

.entry--verse .entry-content .verse-cycle :is(span, strong, b, em) {
	color: inherit !important;
	font-weight: inherit !important;
	font-size: inherit !important;
	font-style: normal;
}

.entry--verse .entry-content .verse-cycle::before,
.entry--verse .entry-content .verse-cycle::after {
	content: "";
	flex: 0 1 3rem;
	height: 1px;
	background: var(--gold);
	opacity: 0.6;
}

/* verse-6: підпис справа з золотим тире; дужки лишаються в DOM для тексту */
.entry--verse .entry-content :is(p, div):has(.verse-signature):not(:has(p, div)) {
	text-align: right !important;
	margin: 1.4em 0 0 !important;
}

.entry-content .verse-signature {
	display: inline;
	margin: 0;
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--step--1);
	letter-spacing: 0.03em;
	color: var(--ink-soft);
}

.entry-content .verse-signature::before {
	content: "— " / "";
	color: var(--gold-ink);
}

.entry-content .verse-signature-paren {
	display: none;
}

/* verse-2: «Книжкова» верстка — body.verse-book з Customizer (типово center → нічого не змінюється) */
.verse-book .entry--verse .entry-content {
	width: fit-content;
	min-width: min(100%, 24rem);
}

.verse-book .entry--verse .entry-content :is(p, div) {
	text-align: left !important;
}

.verse-book .entry--verse .entry-content :is(p, div)[style*="center"]:not(:has(br)):not(:has(p, div)) { /* перенесений хвіст — з виступом; лише найглибший блок, інакше виступи додаються */
	padding-left: 1.25em;
	text-indent: -1.25em;
}

.verse-book .entry--verse .entry-content :is(p, div) > span[aria-hidden="true"][style*="#ffffff"]:first-child {
	display: none; /* біла розпірка ПЕРЕД текстом рядка робить рваний лівий край */
}

.verse-book .entry--verse .entry-content .verse-cycle {
	justify-content: flex-start;
}

.verse-book .entry--verse .entry-content :is(p, div):has(.verse-signature):not(:has(p, div)) {
	text-align: right !important;
}

.verse-book .entry--verse .entry-content .ornament--end {
	margin-inline: auto;
}

/* Проза: переноси та охайні кінцівки абзаців (лише нецентрований текст; у віршах — вимкнено) */
.entry-content p:not([style*="center"]) {
	-webkit-hyphens: auto;
	hyphens: auto;
	hyphenate-limit-chars: 8 4 4;
	text-wrap: pretty;
}

.entry--verse .entry-content p {
	-webkit-hyphens: manual;
	hyphens: manual;
}

/* prose-3: рубрика «Проза» — абзацний відступ замість порожнього рядка; щоденник — 1em; вірші не зачіпаються.
   :where(:not(.entry-part-up)) лишає .entry-part-up { margin: 0 0 -1.5em } (prose-1) без гонитви за специфічністю. Без justify. */
.rubric-prose .entry:not(.entry--verse) .entry-content p {
	line-height: var(--leading-prose);
}

.rubric-prose .entry:not(.entry--verse) .entry-content p:where(:not(.entry-part-up)) {
	margin-bottom: 0.45em;
}

.rubric-prose .entry:not(.entry--verse) .entry-content p + p {
	text-indent: 1.6em;
}

.rubric-prose .entry:not(.entry--verse) .entry-content :is(h2, h3, h4, hr, figure, blockquote, nav, aside, .verse-gap) + p,
.rubric-prose .entry:not(.entry--verse) .entry-content p + p:is(.entry-dropcap, .entry-part-up, [style*="center"], [style*="right"]) {
	text-indent: 0;
}

.rubric-prose .entry:not(.entry--verse) .entry-content p:has(> img:only-child),
.rubric-prose .entry:not(.entry--verse) .entry-content p:has(> a:only-child) { /* :has() окремо: браузер без :has() відкидає весь список */
	text-indent: 0;
}

.rubric-prose .entry:not(.entry--verse) .entry-content p:not(.entry-part-up):has(+ h2),
.rubric-prose .entry:not(.entry--verse) .entry-content p:not(.entry-part-up):has(+ hr) {
	margin-bottom: 1.25em;
}

.rubric-notes .entry:not(.entry--verse) .entry-content p:where(:not(.entry-part-up)) {
	margin-bottom: 1em;
}

/* Буквиця — типографіка, не орнамент: показуємо й при вимкнених орнаментах (prose-4; клас ставить PHP, не на абзацах із тире) */
.entry-content .entry-dropcap::first-letter {
	float: left;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 4.9em;
	line-height: 0.78;
	padding: 0.06em 0.12em 0 0;
	margin-bottom: -0.12em;
	color: var(--accent);
}

@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
	.entry-content .entry-dropcap::first-letter {
		float: none;
		-webkit-initial-letter: 3;
		initial-letter: 3;
		font-size: unset;
		line-height: unset;
		padding: 0;
		margin: 0 0.14em 0 0;
	}
}

/* prose-2: «2. Плямки» → заголовок частини: нумерал курсивом золотом-чорнилом, назва під ним; рік у дужках → колофон */
.entry-content .entry-part {
	margin: clamp(1.25rem, 3vw, 2rem) 0 1.4rem;
	text-align: center;
	font-size: var(--step-2);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-indent: 0;
}

.entry-content .entry-part-num {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 400;
	font-size: var(--step-1);
	line-height: 1;
	color: var(--gold-ink);
}

.has-ornaments .entry-content .entry-part-num::before,
.has-ornaments .entry-content .entry-part-num::after { /* золота нитка обабіч (identity-7) */
	content: "";
	display: inline-block;
	width: 1.6rem;
	height: 1px;
	margin: 0 0.6rem;
	vertical-align: middle;
	background: var(--gold);
}

.entry-content .entry-part-title {
	display: block;
	text-wrap: balance;
}

.entry-content .entry-colophon {
	display: block;
	margin-top: 0.5em;
	text-align: right;
	text-indent: 0;
	font-family: var(--font-ui);
	font-size: var(--label-size);
	letter-spacing: var(--label-track);
	color: var(--muted);
}

.entry-content hr + p[style*="center"]:has(+ .entry-part) { /* підзаголовок розділу між зіркою і частиною */
	font-family: var(--font-display);
	font-style: italic;
	font-size: var(--step-1);
	color: var(--ink-soft);
	margin-bottom: 0.25em;
}

/* prose-1: «Зміст» — панель на теплому папері, кривулька під перемикачем, дві колонки, крапкові лінії, «6 хв».
   .entry-content .entry-toc-list a / .entry-part-up a (0,2,1) перекривають посилання колонки читання (0,1,1). */
.entry-content .entry-toc {
	margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.entry-toc-box {
	padding: 1.5rem 1.75rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background: var(--paper-warm);
}

.has-ornaments .entry-toc-box::before {
	content: "";
	display: block;
	height: 10px;
	margin: -1.5rem -1.75rem 1.25rem;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	background: var(--orn-kryvulka) center / 17.5px 10px repeat-x;
	opacity: 0.6;
}

.entry-toc-title {
	list-style: none;
	cursor: default;
	text-align: center;
	font-family: var(--font-display);
	font-size: var(--step-1);
	font-weight: 600;
	margin: 0 0 0.9rem;
}

.entry-toc-title::-webkit-details-marker {
	display: none;
}

.entry-toc-list {
	columns: 2;
	column-gap: 2.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--step--1);
}

.entry-toc-list li {
	break-inside: avoid;
	margin: 0;
}

.entry-content .entry-toc-list a {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	padding: 0.32rem 0;
	border-bottom: 1px dotted var(--line);
	color: var(--ink);
	text-decoration: none;
}

.entry-content .entry-toc-list a:hover .entry-toc-name {
	color: var(--accent);
}

.entry-toc-num {
	flex: none;
	min-width: 1.5em;
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--gold-ink);
	font-variant-numeric: tabular-nums;
}

.entry-toc-name {
	flex: 1;
}

.entry-toc-time {
	flex: none;
	font-family: var(--font-ui);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: var(--muted);
}

.entry-toc-break {
	column-span: all;
	height: 1px;
	margin: 0.9rem 0;
	background: linear-gradient(var(--gold), var(--gold)) center / 8rem 1px no-repeat; /* auto-margins на column-span не працюють — центруємо градієнтом */
}

.entry-content .entry-part-up {
	text-align: right;
	margin: 0 0 -1.5em;
	font-family: var(--font-ui);
	font-size: 0.74rem;
	letter-spacing: 0.06em;
	text-indent: 0;
}

.entry-content .entry-part-up a {
	color: var(--muted);
	text-decoration: none;
}

.entry-content .entry-part-up a:hover {
	color: var(--accent);
}

.page-links {
	margin-top: 2rem;
	font-family: var(--font-ui);
	font-size: var(--step--1);
}

.page-links a,
.page-links > span:not(:first-child) {
	display: inline-block;
	margin-left: 0.3em;
	padding: 0.2em 0.6em;
	border: 1px solid var(--line);
	border-radius: 6px;
	text-decoration: none;
}

.entry-footer {
	margin-top: clamp(2rem, 4vw, 3rem);
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.series {
	padding: 1rem 1.25rem;
	border: 1px solid var(--line);
	border-left: 3px solid var(--gold);
	border-radius: var(--radius);
	background: var(--paper-warm);
	font-family: var(--font-ui);
	font-size: 0.9rem;
}

.series-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.5rem;
	margin: 0;
}

.series-label {
	font-size: var(--label-size);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted);
}

.series-name {
	font-family: var(--font-display);
	font-size: var(--step-0);
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}

.series-name:hover {
	color: var(--accent);
}

.series-pos {
	color: var(--muted);
}

.series-parts {
	margin-top: 0.6rem;
}

.series-parts summary {
	cursor: pointer;
	color: var(--accent);
	font-weight: 600;
}

.series-parts ol {
	margin: 0.5rem 0 0;
	padding-left: 1.4em;
}

.series-parts li {
	margin: 0;
	padding: 0.15rem 0;
}

.series-parts li[aria-current] {
	font-weight: 700;
	color: var(--ink);
}

.series-parts a {
	color: var(--ink-soft);
	text-decoration: none;
}

.series-parts a:hover {
	color: var(--accent);
}

.series-next {
	display: inline-block;
	margin-top: 0.75rem;
}

.tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-ui);
	font-size: 0.85rem;
}

.tags-label {
	color: var(--muted);
	margin-right: 0.3rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: var(--label-size);
}

.tags a {
	padding: 0.25em 0.75em;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink-soft);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.tags a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-ui);
	font-size: 0.85rem;
}

.share-label {
	color: var(--muted);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: var(--label-size);
	margin-right: 0.3rem;
}

.share-link {
	display: inline-flex;
	align-items: center;
	padding: 0.4em 0.9em;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink-soft);
	font-weight: 600;
	font-size: 0.85rem;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.share-link:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--paper);
}

.share-copy.is-copied,
.share-copy-text.is-copied {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.share-native {
	border-color: rgba(var(--accent-rgb), 0.35);
	color: var(--accent);
}

/* Є системне меню «Поділитися» — мережеві кнопки зайві */
.share.has-native-share .share-facebook,
.share.has-native-share .share-telegram,
.share.has-native-share .share-x {
	display: none;
}

.edit-link {
	font-family: var(--font-ui);
	font-size: 0.85rem;
	margin: 0;
}

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: clamp(2rem, 4vw, 3rem);
}

.post-nav-link {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding: 1rem 1.25rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-decoration: none;
	color: var(--ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.post-nav-link:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow);
}

.post-nav-next {
	text-align: right;
}

.post-nav-prev {
	grid-column: 1;
}

.post-nav-next {
	grid-column: 2;
}

.post-nav-cat {
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: none;
	color: var(--accent);
}

.post-nav-link:hover .post-nav-title {
	color: var(--accent);
}

.post-nav-label {
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted);
}

.post-nav-title {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: var(--step-0);
	line-height: 1.3;
}

/* Сторінка вірша (body.is-verse, verse-8): теги, «поділитися» й сусідні вірші — текстом під однією волосиною, без рамок */
.is-verse .tags {
	justify-content: center;
}

.is-verse .tags a {
	border: 0;
	padding: 0;
	color: var(--muted);
}

.is-verse .tags a::before {
	content: "#" / "";
	color: var(--gold);
}

.is-verse .tags a:hover {
	color: var(--accent);
}

.is-verse .share {
	justify-content: center;
	gap: 0.15rem 1.1rem;
}

.is-verse .share-label {
	margin-right: 0.4rem;
}

.is-verse .share-link {
	padding: 0.2em 0.45em; /* «X» інакше 9px завширшки */
	border: 0;
	border-bottom: 1px solid transparent;
	border-radius: 0;
	background: none;
	color: var(--ink-soft);
}

.is-verse .share-link:hover {
	color: var(--accent);
	background: none;
	border-bottom-color: rgba(var(--accent-rgb), 0.45);
}

.is-verse .share-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.is-verse .share-copy.is-copied,
.is-verse .share-copy-text.is-copied {
	background: none;
	color: var(--accent);
	border-bottom-color: var(--accent);
}

.is-verse .share-native {
	border-color: transparent;
}

.is-verse .post-nav {
	gap: 2rem;
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line);
}

.is-verse .post-nav-link {
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.is-verse .post-nav-link:hover {
	box-shadow: none;
}

.is-verse .post-nav-label {
	font-size: 0.7rem;
	letter-spacing: 0.12em;
}

.is-verse .post-nav-title {
	font-style: italic;
	font-weight: 500;
	font-size: var(--step-1);
}

.entry--verse .entry-footer { /* verse-6: колофон-перо — єдина лінія закриття */
	border-top: 0;
	padding-top: 0.25rem;
}

@media (max-width: 600px) {
	.post-nav {
		grid-template-columns: 1fr;
		gap: 0.6rem;
	}
	.is-verse .post-nav {
		gap: 1rem;
	}
	.post-nav-prev,
	.post-nav-next {
		grid-column: auto;
		text-align: left;
	}
	.post-nav-link {
		padding: 0.85rem 1rem;
	}
}

.related {
	margin-top: clamp(3rem, 6vw, 5rem);
}

/* identity-2: три тони — біла колонка → тепла «полиця» (пов'язані + коментарі) → сливовий підвал.
   Обгортка .entry-shelf — у single.php. Полиця закінчується --paper-soft — тим самим тоном, що й паперова смужка крайки підвалу. */
.entry-shelf {
	margin-top: clamp(3rem, 6vw, 5rem);
	margin-bottom: calc(-1 * clamp(3rem, 8vw, 6rem)); /* = .site-main padding-bottom: полиця впирається в підвал */
	padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem);
	background: linear-gradient(180deg, var(--paper-warm), var(--paper-soft) 14rem);
	box-shadow: inset 0 1px 0 var(--line);
}

.entry-shelf .related {
	margin-top: 0;
}

.entry-shelf .comments-area {
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

.entry-shelf:not(:has(.related, .comments-area)) {
	display: none;
}

.author-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
	margin-top: clamp(2rem, 4vw, 3rem);
	padding: 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	background:
		radial-gradient(24rem 12rem at 100% 0%, rgba(var(--accent-rgb), 0.1), transparent 65%),
		var(--paper-warm);
}

.author-card-photo img {
	width: 6rem;
	height: 6rem;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold);
}

.author-card .eyebrow {
	margin-bottom: 0.3em;
}

.author-card-name {
	font-family: var(--font-display);
	font-size: var(--step-1);
	font-weight: 600;
	margin: 0 0 0.15em;
}

.author-card-role {
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 0.6rem;
}

.author-card-text {
	color: var(--ink-soft);
	font-size: var(--step--1);
	line-height: 1.6;
}

.author-card-text p:last-child {
	margin-bottom: 0.75em;
}

.author-card-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 0;
	font-family: var(--font-ui);
	font-size: 0.85rem;
}

.author-card-random {
	color: var(--muted);
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}

.author-card-random:hover {
	color: var(--accent);
}

.author-card .social {
	margin-top: 0.9rem;
}

/* .social-link розрахований на темний підвал — тут світлий варіант */
.author-card .social-link {
	border-color: var(--line);
	color: var(--ink-soft);
}

.author-card .social-link:hover {
	border-color: var(--accent);
	color: var(--accent);
	text-decoration: none;
}

.author-card--sidebar {
	grid-template-columns: 1fr;
	justify-items: center;
	text-align: center;
	margin: 0 0 2.5rem;
}

.author-card--sidebar .author-card-links,
.author-card--sidebar .social {
	justify-content: center;
}

@media (max-width: 600px) {
	.author-card {
		grid-template-columns: 1fr;
	}
}

/* ---------- Коментарі ---------- */
.comments-area {
	margin-top: clamp(3rem, 6vw, 5rem);
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 2rem;
}

.comment-list .children {
	list-style: none;
	padding-left: clamp(1rem, 4vw, 3rem);
}

.comment-body {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--line);
}

.comment-meta {
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--muted);
	margin-bottom: 0.5rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-weight: 700;
	color: var(--ink);
}

.comment-author .avatar {
	border-radius: 50%;
	width: 40px;
	height: 40px;
}

.comment-author .fn {
	font-style: normal;
}

.comment-metadata a {
	color: var(--muted);
	text-decoration: none;
}

.comment-content {
	font-size: var(--step--1);
}

.comment-content p:last-child {
	margin-bottom: 0;
}

.reply {
	font-family: var(--font-ui);
	font-size: 0.82rem;
	margin-top: 0.5rem;
}

.comment-respond {
	margin-top: 1rem;
}

.comment-respond .comment-reply-title {
	font-size: var(--step-2);
}

.comment-form {
	font-family: var(--font-ui);
	font-size: 0.95rem;
}

.comment-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.comment-form p {
	margin-bottom: 1rem;
}

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.comment-form-cookies-consent label {
	font-weight: 400;
}

.comment-form-cookies-consent input {
	margin-top: 0.35em;
}

.comment-notes,
.logged-in-as {
	color: var(--muted);
	font-size: 0.85rem;
}

.comment-navigation {
	font-family: var(--font-ui);
	font-size: 0.9rem;
	display: flex;
	justify-content: space-between;
	margin: 1rem 0;
}

.no-comments {
	font-family: var(--font-ui);
	color: var(--muted);
}

/* ---------- Бічна колонка ---------- */
.layout-sidebar {
	font-family: var(--font-ui);
	font-size: 0.95rem;
}

.widget {
	margin-bottom: 2.5rem;
}

.widget-title,
.widget .wp-block-heading {
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--line);
}

.widget ul,
.widget ol {
	list-style: none;
	padding: 0;
	margin: 0;
}

.widget li {
	padding: 0.4rem 0;
	border-bottom: 1px dashed var(--line);
	margin: 0;
}

.widget li:last-child {
	border-bottom: 0;
}

.widget a {
	color: var(--ink-soft);
	text-decoration: none;
}

.widget a:hover {
	color: var(--accent);
}

.widget .post-date,
.widget .wp-block-latest-posts__post-date {
	display: block;
	font-size: 0.8rem;
	color: var(--muted);
}

.widget .tagcloud a,
.wp-block-tag-cloud a {
	display: inline-block;
	margin: 0 0.3rem 0.4rem 0;
	padding: 0.25em 0.7em;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.82rem !important;
}

.widget select {
	width: 100%;
}

.wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.5rem;
}

.wp-block-search__input {
	flex: 1;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	padding: 0.65em 0.9em;
	font-family: var(--font-ui);
	font-size: 1rem;
}

/* Специфічність (0,2,0) перекриває :root :where(.wp-element-button) з global-styles */
.wp-block-search__button.wp-element-button {
	flex: none;
	margin-left: 0;
	padding: 0.65em 1.3em;
	border: 1px solid var(--accent);
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-ui);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
}

.wp-block-search__button.wp-element-button:hover {
	background: var(--ink);
	border-color: var(--ink);
}

.wp-block-calendar table {
	font-size: 0.85rem;
}

.wp-block-calendar th,
.wp-block-calendar td {
	text-align: center;
	padding: 0.35em;
}

.wp-block-calendar a {
	text-decoration: underline;
}

/* archive-5: бічна колонка як «зміст» — нумеровані записи, цитовані коментарі, тихий пошук.
   Покрито і класичний .search-form, і блоковий пошук; жива колонка використовує блоковий. */
.layout-sidebar .wp-block-latest-posts__list {
	counter-reset: toc;
}

.layout-sidebar .wp-block-latest-posts__list > li {
	counter-increment: toc;
	display: grid;
	grid-template-columns: 1.6rem minmax(0, 1fr);
	column-gap: 0.35rem;
	align-items: baseline;
}

.layout-sidebar .wp-block-latest-posts__list > li::before {
	content: counter(toc);
	font-family: var(--font-display);
	font-size: 1.05rem;
	line-height: 1;
	color: var(--gold-ink);
	font-variant-numeric: oldstyle-nums;
}

.layout-sidebar .wp-block-latest-posts__post-title {
	font-family: var(--font-serif);
	font-size: 0.98rem;
	line-height: 1.35;
}

.layout-sidebar .wp-block-latest-posts__post-date {
	grid-column: 2;
}

.layout-sidebar .wp-block-latest-comments__comment {
	position: relative;
	padding-left: 1.1rem;
	line-height: 1.4;
	margin-bottom: 0;
}

.layout-sidebar .wp-block-latest-comments__comment::before {
	content: "\201C" / "";
	position: absolute;
	left: 0;
	top: 0.35rem;
	font-family: var(--font-display);
	font-size: 1.5rem;
	line-height: 1;
	color: rgba(var(--accent-rgb), 0.55);
}

.layout-sidebar .wp-block-latest-comments__comment-meta {
	font-size: 0.88rem;
}

.layout-sidebar .wp-block-latest-comments__comment-author {
	font-weight: 700;
	color: var(--ink);
}

.layout-sidebar .wp-block-latest-comments__comment-link {
	font-family: var(--font-serif);
	font-style: italic;
	color: var(--ink-soft);
}

/* Пошук — лінія зошита: підкреслення стає сливовим через :focus-within, системне кільце фокуса на полі лишається */
.layout-sidebar .search-form,
.layout-sidebar .wp-block-search__inside-wrapper {
	gap: 0;
	align-items: center;
	border-bottom: 1.5px solid var(--line-strong);
	transition: border-color 0.15s ease;
}

.layout-sidebar .search-form:focus-within,
.layout-sidebar .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--accent);
}

.layout-sidebar .search-field,
.layout-sidebar .wp-block-search__input {
	border: 0;
	border-radius: 0;
	background: transparent;
	padding: 0.55em 0;
	font-size: 0.95rem;
}

.layout-sidebar .search-submit,
.layout-sidebar .wp-block-search__button.wp-element-button {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0.4em 0 0.4em 0.5em;
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.layout-sidebar .search-submit:hover,
.layout-sidebar .wp-block-search__button.wp-element-button:hover {
	background: transparent;
	border-color: transparent;
	color: var(--ink);
}

/* ---------- Підвал ---------- */
.site-footer {
	background:
		radial-gradient(70rem 28rem at 100% 0%, rgba(var(--accent-rgb), 0.22), transparent 60%),
		linear-gradient(180deg, var(--ink-plum), var(--ink-plum-deep));
	color: var(--on-plum-soft);
	font-family: var(--font-ui);
	font-size: 0.92rem;
	padding-block: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
	margin-top: auto;
}

.site-footer a {
	color: var(--on-plum);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--gold-light);
	text-decoration: underline;
	text-decoration-color: rgba(212, 180, 119, 0.5);
}

/* «На прощання» (footer-2): рядок вірша дня над колонками; підпис «з вірша «…» →» друкує PHP */
.footer-farewell {
	max-width: 44rem;
	margin: 0 auto clamp(2.5rem, 5vw, 4rem);
	text-align: center;
}

.footer-farewell-label {
	margin: 0 0 0.5rem;
	font-family: var(--font-ui);
	font-size: var(--label-size);
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold-light);
}

.footer-farewell-line {
	margin: 0;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: var(--step-2);
	line-height: 1.35;
	color: var(--on-plum);
	text-wrap: balance;
}

.footer-farewell-line::before {
	content: "\201C" / "";
	display: block;
	font-family: var(--font-display);
	font-style: normal;
	font-size: 3rem;
	line-height: 0.55;
	margin-bottom: 0.4rem;
	color: rgba(212, 180, 119, 0.5);
}

.footer-farewell-src {
	margin: 0.75rem 0 0;
	font-family: var(--font-ui);
	font-size: 0.85rem;
	color: var(--on-plum-muted);
}

.footer-widgets { /* footer-3: бренд-колонка ширша */
	display: grid;
	grid-template-columns: 1.35fr 1fr 1fr;
	gap: 2.5rem;
	margin-bottom: 2.5rem;
}

@media (max-width: 800px) {
	.footer-widgets {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

}

.site-footer .widget-title {
	color: var(--gold-light);
	border-color: rgba(212, 180, 119, 0.22);
	letter-spacing: 0.16em;
}

.site-footer .widget {
	margin-bottom: 1.5rem;
}

.site-footer .widget li {
	border-color: rgba(255, 255, 255, 0.07);
}

.site-footer .widget a {
	color: var(--on-plum);
}

.footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-list li {
	padding: 0.35rem 0;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.footer-list .count {
	color: var(--on-plum-muted); /* 6.3:1 на сливовому */
	font-variant-numeric: tabular-nums;
}

/* «Зміст»-подібні крапкові лінії між назвою і числом (footer-4); примітка до заголовка «Цього дня» (footer-9) */
.footer-list--toc li {
	align-items: baseline;
	gap: 0.6rem;
}

.footer-list--toc li > a {
	order: 1;
}

.footer-list--toc li::before {
	content: "";
	order: 2;
	flex: 1 1 1rem;
	min-width: 1rem;
	border-bottom: 1px dotted rgba(212, 180, 119, 0.42);
	transform: translateY(-0.3em);
}

.footer-list--toc .count {
	order: 3;
	color: var(--on-plum-soft);
	font-size: 0.85rem;
}

.widget-title-note {
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: none;
	color: var(--on-plum-muted);
	margin-left: 0.35rem;
}

/* Бренд-блок підвалу — той самий лок-ап, що й у шапці (footer-3) */
.footer-brand-link {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.9rem;
	margin-bottom: 1rem;
	color: #fff;
	text-decoration: none;
}

.footer-brand-link:hover {
	text-decoration: none;
}

.footer-brand-mark {
	flex: none;
	width: 3rem;
	height: 3rem;
	margin-top: 0.15rem;
	color: var(--gold-light);
}

.footer-brand-mark .quill-shaft {
	stroke: var(--ink-plum); /* «виріз» кольору підвалу */
}

.footer-brand-mark .writer-detail {
	stroke: var(--ink-plum);
}

.footer-brand-mark svg {
	width: 100%;
	height: 100%;
	display: block;
}

.footer-brand-text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.footer-brand-kicker {
	font-family: var(--font-ui);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold-light);
}

.footer-brand-name { /* header-4: вага 500 як у шапці */
	font-family: var(--font-display);
	font-weight: 500;
	font-size: var(--step-1);
	line-height: 1.1;
	letter-spacing: -0.01em;
}

.footer-tagline {
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--on-plum-soft);
	max-width: 24rem;
	margin: 0 0 0.6rem;
}

.social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 1rem;
}

.social-link {
	padding: 0.35em 0.85em;
	border: 1px solid rgba(212, 180, 119, 0.35);
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.85rem;
}

.site-footer .social-link:hover {
	border-color: var(--gold-light);
	color: var(--gold-light);
	text-decoration: none;
}

/* Підпис-рядок (footer-5, footer-8): калина-роздільник над ним — в «Орнаментах»; без орнаментів — тонка золота лінія */
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 0;
	border-top: 0;
	color: var(--on-plum-muted);
	font-size: 0.85rem;
}

body:not(.has-ornaments) .footer-bottom {
	border-top: 1px solid rgba(212, 180, 119, 0.18);
	padding-top: 1.5rem;
}

.footer-colophon {
	flex-basis: 100%;
	margin: 0 0 0.4rem;
	text-align: center;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--on-plum-soft);
}

.footer-copy p {
	margin: 0;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline; /* пункти й крапки на одній лінії шрифту */
	gap: 0.25rem 0.75rem;
}

.footer-menu li {
	display: inline-flex;
	align-items: baseline;
	line-height: 1.4;
}

.footer-menu li + li::before {
	content: "·" / "";
	margin-right: 0.75rem;
	color: rgba(212, 180, 119, 0.6);
	font-family: var(--font-ui);
	line-height: 1;
}

.to-top { /* «Нагору» — пігулка золотою ниткою */
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.45rem 0.95rem;
	border: 1px solid rgba(212, 180, 119, 0.35);
	border-radius: 999px;
	color: var(--gold-light);
	font-weight: 600;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.to-top:hover {
	border-color: var(--gold-light);
	background: rgba(212, 180, 119, 0.08);
	text-decoration: none;
}

.to-top-arrow {
	display: inline-block;
	transition: transform 0.15s ease;
}

.to-top:hover .to-top-arrow {
	transform: translateY(-2px);
}

/* ---------- Сторінки помилок, пошуку ---------- */
.error-404,
.no-results {
	padding-top: clamp(2rem, 6vw, 5rem);
}

.error-404 .search-form,
.no-results .search-form {
	max-width: 30rem;
	margin: 1.5rem 0;
}

.no-results {
	padding-top: 1rem;
}

/* archive-3: запит — назва сторінки; збіги в картках підсвічені (H1 у search.php, myroslava_search_mark) */
.page-title--query {
	overflow-wrap: anywhere; /* одне довге слово інакше обрізається .page-header{overflow:hidden} разом із «»» */
	-webkit-hyphens: auto;
	hyphens: auto;
}

.page-title--query em {
	font-style: italic;
	font-weight: 500;
}

.page-title--query .q-mark {
	color: var(--accent);
	font-weight: 400;
}

mark.search-mark {
	background: rgba(var(--accent-rgb), 0.14);
	color: inherit;
	padding: 0 0.08em;
	border-radius: 3px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.card-title a mark.search-mark {
	background: none;
	box-shadow: inset 0 -0.38em rgba(var(--accent-rgb), 0.18);
}

.search .layout-sidebar .widget_search { /* одна форма пошуку на сторінці — та, що в заголовку */
	display: none;
}

/* archive-4: 404 / порожній пошук — примарне «404» і картка з кількома рядками вірша дня (template-parts/verse-aside.php) */
.error-404 {
	padding-bottom: clamp(2rem, 6vw, 4rem);
	overflow: hidden;
}

.error-404-head {
	position: relative;
}

.ghost-number {
	position: absolute;
	left: -0.04em;
	top: -0.5em;
	z-index: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(7rem, 22vw, 15rem);
	line-height: 1;
	letter-spacing: -0.02em;
	color: rgba(var(--accent-rgb), 0.07);
	pointer-events: none;
	user-select: none;
}

.error-404-head .page-title {
	position: relative;
	z-index: 1;
}

.verse-aside {
	max-width: 34rem;
	margin-top: clamp(2.5rem, 6vw, 4rem);
	padding: 1.5rem 1.75rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
}

.verse-aside .ornament--start {
	margin: 0 0 1rem;
}

.verse-aside .eyebrow {
	color: var(--muted);
}

.verse-aside-text {
	margin: 0 0 1.1rem;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: var(--step-0);
	line-height: 1.55;
	white-space: pre-line;
	color: var(--ink-soft);
}

.verse-aside-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin: 0;
}

.verse-aside .card-more { /* cards-2 робить .card .card-more колофоном картки; поза карткою — звичайне тихе посилання */
	margin: 0;
	padding: 0;
	border: 0;
	display: inline-flex;
	gap: 0.35em;
}

.no-results .verse-aside {
	margin-top: 2rem;
}

/* ---------- Блоки редактора ---------- */
.entry-content .wp-block-quote,
.entry-content .wp-block-pullquote {
	font-family: var(--font-display);
}

.entry-content .wp-block-pullquote {
	border-top: 3px solid var(--gold);
	border-bottom: 3px solid var(--gold);
	padding: 1.5em 0;
	text-align: center;
}

.entry-content .wp-block-verse {
	font-family: var(--font-serif);
	background: transparent;
	padding: 0;
	white-space: pre-wrap;
	line-height: 1.75;
}

.entry-content .wp-block-separator {
	border: 0;
	height: 1px;
	background: var(--line);
	max-width: 8rem;
}

.entry-content .wp-block-separator.is-style-wide {
	max-width: none;
}

.entry-content .wp-block-image figcaption {
	text-align: center;
}

.entry-content .wp-block-gallery {
	margin-bottom: 1.75em;
}

.wp-block-button__link {
	border-radius: 999px;
}

.has-accent-color {
	color: var(--accent);
}

.has-accent-background-color {
	background-color: var(--accent);
}

.has-gold-color,
.has-gold-ink-color {
	color: var(--gold-ink);
}

.has-paper-warm-background-color {
	background-color: var(--paper-warm);
}

.has-ink-background-color {
	background-color: var(--ink);
	color: #fff;
}

.has-small-font-size {
	font-size: var(--step--1);
}

.has-large-font-size {
	font-size: var(--step-1);
}

.has-x-large-font-size {
	font-size: var(--step-2);
}

/* ---------- Орнаменти (українські мотиви) ---------- */
.ornament {
	position: relative;
	height: 22px;
	margin: 1.25rem auto 0;
	max-width: 14rem;
	background: var(--orn-star) center / 22px 22px no-repeat;
}

/* Волосяні лінії теплішають від --line до золота біля знака (identity-7) */
.ornament::before,
.ornament::after {
	content: "";
	position: absolute;
	top: 50%;
	width: calc(50% - 22px);
	height: 1px;
}

.ornament::before {
	left: 0;
	background: linear-gradient(90deg, var(--line), var(--gold));
}

.ornament::after {
	right: 0;
	background: linear-gradient(90deg, var(--gold), var(--line));
}

.ornament--start {
	margin: 0 0 1.5rem;
	max-width: 10rem;
	background-position: left center;
}

.ornament--start::before {
	display: none;
}

.ornament--start::after {
	width: calc(100% - 30px);
	background: linear-gradient(90deg, var(--gold), var(--line));
}

/* Кінцівка «калина» наприкінці прози: 36×25, більше повітря (verse-6 / footer-7) */
.ornament--end {
	height: 25px;
	max-width: 16rem;
	margin: clamp(2.5rem, 5vw, 3.75rem) auto 0;
	background: var(--orn-kalyna) center / 36px 25px no-repeat;
}

.ornament--end::before,
.ornament--end::after {
	width: calc(50% - 30px);
	opacity: 0.7;
}

/* Колофон вірша: перо замість калини (verse-6; SVG друкує myroslava_ornament()) */
.ornament--colophon {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	max-width: 12rem;
	margin-top: clamp(1.5rem, 3vw, 2.25rem);
	background: none;
}

.ornament--colophon::before,
.ornament--colophon::after {
	width: calc(50% - 28px);
	opacity: 0.55;
}

.ornament--colophon .ornament-quill {
	width: 30px;
	height: 30px;
	color: var(--accent);
}

.ornament--colophon .quill-shaft {
	stroke: var(--gold);
}

/* Калина-роздільник над підписом підвалу (footer-5): золота нитка обабіч */
.has-ornaments .footer-bottom::before {
	content: "";
	flex-basis: 100%;
	height: 22px;
	margin-bottom: 1.1rem;
	background:
		var(--orn-kalyna-dark) center / 32px 22px no-repeat,
		linear-gradient(rgba(212, 180, 119, 0.28), rgba(212, 180, 119, 0.28)) left center / calc(50% - 30px) 1px no-repeat,
		linear-gradient(rgba(212, 180, 119, 0.28), rgba(212, 180, 119, 0.28)) right center / calc(50% - 30px) 1px no-repeat;
}

/* Стрічка з крайками (header-5): волосяна лінія, 1px ґрунту, вишивка, 1px ґрунту, лінія — 16px; ≤1140 і при прокручуванні — 12px */
.has-ornaments .site-header {
	border-bottom: 0;
}

.has-ornaments .site-header::after {
	content: "";
	display: block;
	height: 16px;
	background: var(--orn-band) center 2px / 27.43px 12px repeat-x, var(--paper-warm);
	box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
}

/* Оповідні розділи — кривулька, як на їхніх картках */
body.rubric-prose.has-ornaments .site-header::after,
body.rubric-notes.has-ornaments .site-header::after,
body.rubric-media.has-ornaments .site-header::after {
	background-image: var(--orn-kryvulka);
	background-size: 21px 12px; /* період 28:16 збережено */
}

/* Компактна стрічка під липкою шапкою на планшеті/телефоні (після базового правила, щоб перекрити його) */
@media (max-width: 1140px) {
	.has-ornaments .site-header::after {
		height: 12px;
		background-size: 18.29px 8px; /* пропорція стрічки 27.43:12 збережена */
	}

	body.rubric-prose.has-ornaments .site-header::after,
	body.rubric-notes.has-ornaments .site-header::after,
	body.rubric-media.has-ornaments .site-header::after {
		background-size: 14px 8px;
	}
}

.has-ornaments .section-title::before {
	content: "";
	flex: none;
	width: 22px;
	height: 22px;
	background: var(--orn-star) center / contain no-repeat;
}

.has-ornaments .card-media--text::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 10px;
	background: var(--orn-band) center / 22.86px 10px repeat-x;
	opacity: 0.55;
	transition: opacity 0.25s ease; /* cards-7: стрічка проступає під курсором */
}

/* Кривулька — стрічка карток оповідних рубрик (проза, статті, нотатки, бібліотека, відео) */
.has-ornaments .card.rubric-prose .card-media--text::after,
.has-ornaments .card.rubric-notes .card-media--text::after,
.has-ornaments .card.rubric-media .card-media--text::after {
	background-image: var(--orn-kryvulka);
	background-size: 17.5px 10px;
}

/* Стрічка карток у стрічці записів — легша (8px, .45); повна 10px лишається вибраним творам і картці вірша (identity-3) */
.layout .card-media--text::after {
	height: 8px;
	background-size: 18.29px 8px;
	opacity: 0.45;
}

.layout .card.rubric-prose .card-media--text::after,
.layout .card.rubric-notes .card-media--text::after,
.layout .card.rubric-media .card-media--text::after {
	background-size: 14px 8px;
}

.card:hover .card-media--text::after { /* cards-7 */
	opacity: 0.95;
}

.has-ornaments .page-header {
	position: relative;
}

/* Заголовок архіву: те саме розріджене небо, що й у hero (archive-1); оповідні рубрики — кривулька, дитяча — калина (archive-7) */
.has-ornaments .page-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		var(--orn-field) 0 0 / 88px 88px repeat,
		var(--orn-field) 44px 44px / 88px 88px repeat;
	opacity: 0.08;
	-webkit-mask-image: linear-gradient(100deg, transparent 50%, #000 85%);
	mask-image: linear-gradient(100deg, transparent 50%, #000 85%);
	pointer-events: none;
}

body.has-ornaments.rubric-prose .page-header::before,
body.has-ornaments.rubric-notes .page-header::before,
body.has-ornaments.rubric-media .page-header::before {
	background: var(--orn-kryvulka) 0 0 / 56px 32px repeat;
	opacity: 0.07;
}

body.has-ornaments.rubric-kids .page-header::before {
	background: var(--orn-kalyna) 0 0 / 96px 66px repeat;
	opacity: 0.08;
}

body.has-ornaments.rubric-kids .page-header .ornament--start {
	background-image: var(--orn-kalyna);
	background-size: 32px 22px;
}

.has-ornaments .entry-content hr {
	height: 22px;
	max-width: 14rem;
	background: var(--orn-star) center / 22px 22px no-repeat;
	position: relative;
}

.has-ornaments .entry-content hr::before,
.has-ornaments .entry-content hr::after {
	content: "";
	position: absolute;
	top: 50%;
	width: calc(50% - 22px);
	height: 1px;
}

.has-ornaments .entry-content hr::before {
	left: 0;
	background: linear-gradient(90deg, var(--line), var(--gold));
}

.has-ornaments .entry-content hr::after {
	right: 0;
	background: linear-gradient(90deg, var(--gold), var(--line));
}

/* Крайка рушника в підвалі (footer-1): стрічка · золота нитка · торочки, шари саме в цьому порядку; ::before над небом (z 2).
   Паперова смужка над стрічкою збігається з тлом сторінки над нею. Без орнаментів — 2px золота лінія. */
.has-ornaments .site-footer {
	--hem-paper: var(--paper-soft);
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding-top: calc(clamp(2.5rem, 6vw, 4.5rem) + 22px);
}

body.page.has-ornaments .site-footer,
body.attachment.has-ornaments .site-footer {
	--hem-paper: var(--paper);
}

.has-ornaments .site-footer::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 22px;
	z-index: 2;
	pointer-events: none;
	background:
		var(--orn-band) center top / 27.43px 12px repeat-x,
		linear-gradient(var(--gold), var(--gold)) center 12px / 100% 1px no-repeat,
		repeating-linear-gradient(90deg, rgba(212, 180, 119, 0.55) 0 1px, transparent 1px 5px) center 13px / auto 9px repeat-x,
		linear-gradient(var(--hem-paper) 12px, transparent 12px);
	-webkit-mask-image: linear-gradient(#000 13px, rgba(0, 0, 0, 0.85) 14px, transparent 22px);
	mask-image: linear-gradient(#000 13px, rgba(0, 0, 0, 0.85) 14px, transparent 22px);
}

.has-ornaments .site-footer::after { /* розріджене небо підвалу — золото на сливі (identity-3) */
	content: "";
	position: absolute;
	inset: 12px 0 0;
	z-index: -1;
	background:
		var(--orn-field-dark) 0 0 / 88px 88px repeat,
		var(--orn-field-dark) 44px 44px / 88px 88px repeat;
	opacity: 0.05;
	-webkit-mask-image: linear-gradient(80deg, #000, transparent 55%);
	mask-image: linear-gradient(80deg, #000, transparent 55%);
	pointer-events: none;
}

body:not(.has-ornaments) .site-footer {
	border-top: 2px solid var(--gold);
}

.has-ornaments .site-footer .widget-title::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 0.5rem;
	vertical-align: -1px;
	background: var(--orn-star-light) center / contain no-repeat;
}

/* Зірка перед заголовками бічної колонки (archive-5) */
.has-ornaments .layout-sidebar .widget-title::before,
.has-ornaments .layout-sidebar .widget .wp-block-heading::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 0.5rem;
	vertical-align: -1px;
	background: var(--orn-star) center / contain no-repeat;
}

.has-ornaments .comments-title::before {
	display: none;
}

/* Закладка-стрічка на сторінках читання (identity-5): слива на віршах, золото на прозі/щоденнику; ≤640 і в друці — схована */
body.has-ornaments.is-reading .site-main {
	position: relative;
}

body.has-ornaments.is-reading .site-main::before {
	content: "";
	position: absolute;
	top: 0;
	right: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
	width: 12px;
	height: 5.5rem;
	background:
		linear-gradient(90deg, transparent 5px, rgba(212, 180, 119, 0.9) 5px, rgba(212, 180, 119, 0.9) 7px, transparent 7px),
		var(--accent);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 7px), 0 100%);
	filter: drop-shadow(0 4px 4px rgba(var(--accent-rgb), 0.25));
	pointer-events: none;
}

body.has-ornaments.is-reading.rubric-prose .site-main::before,
body.has-ornaments.is-reading.rubric-notes .site-main::before { /* оповідна полиця — золота стрічка зі сливовою ниткою */
	background:
		linear-gradient(90deg, transparent 5px, rgba(var(--accent-rgb), 0.85) 5px, rgba(var(--accent-rgb), 0.85) 7px, transparent 7px),
		var(--gold);
}

/* ---------- Компактні архіви ---------- */
.archives-compact {
	font-family: var(--font-ui);
	font-size: 0.9rem;
}

.archives-year {
	border-bottom: 1px dashed var(--line);
}

.archives-year:last-child {
	border-bottom: 0;
}

.archives-year summary { /* рядок року: каретка фіксованої ширини, щоб відкритий і закриті роки стояли в одну лінію */
	display: flex;
	align-items: baseline;
	gap: 0.55rem;
	padding: 0.5rem 0;
	cursor: pointer;
	list-style: none;
	color: var(--ink-soft);
}

.archives-year summary::-webkit-details-marker {
	display: none;
}

.archives-year summary::before {
	content: "";
	flex: none;
	width: 6px;
	height: 6px;
	margin-right: 0.15rem;
	border-right: 1.5px solid var(--gold-ink);
	border-bottom: 1.5px solid var(--gold-ink);
	transform: translate(-1px, -2px) rotate(-45deg);
	transition: transform 0.15s ease;
}

.archives-year[open] summary::before {
	transform: translate(0, -3px) rotate(45deg);
}

.archives-year summary:hover .archives-year-label {
	color: var(--accent);
}

.archives-year-label { /* рік — нумерал Playfair (archive-5) */
	font-family: var(--font-display);
	font-size: 1.08rem;
	font-weight: 600;
	color: var(--ink);
	transition: color 0.15s ease;
}

.archives-year .count { /* кількість — курсивом золотом, як лічильник архіву в заголовку */
	margin-left: auto;
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--gold-ink);
	font-variant-numeric: tabular-nums;
}

.archives-months { /* місяці — дві колонки рядків «Місяць … 2», вирівняні під назвою року */
	list-style: none;
	margin: 0 0 0.75rem 1.2rem;
	padding: 0;
	border: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 1rem;
}

.widget .archives-months li {
	padding: 0;
	border: 0;
	margin: 0;
}

.archives-months a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.28rem 0;
	border: 0;
	border-bottom: 1px dotted var(--line);
	border-radius: 0;
	font-size: 0.84rem;
	color: var(--ink-soft);
	text-decoration: none;
	transition: color 0.15s ease;
}

.archives-months a:hover {
	color: var(--accent);
}

.archives-months a .count {
	margin: 0;
	font-family: var(--font-ui);
	font-style: normal;
	font-size: 0.74rem;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.archives-months .archives-all { /* «Усі записи за рік» — капітельний кікер золотом, як «Усі вірші →» */
	grid-column: 1 / -1;
	margin-top: 0.35rem;
}

.archives-months .archives-all a {
	display: inline-flex;
	justify-content: flex-start;
	border: 0;
	padding: 0.2rem 0 0;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gold-ink);
}

.archives-months .archives-all a::after {
	content: "→" / "";
	margin-left: 0.2em;
}

.archives-months .archives-all a:hover {
	color: var(--accent);
}

/* Класичний віджет архівів — теж компактно */
.widget_archive ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.widget_archive li {
	padding: 0;
	border: 0;
}

.widget_archive li a {
	display: inline-block;
	padding: 0.2em 0.6em;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.8rem;
}

/* ---------- Календарна стрічка року (archive-2) ----------
   Розмітку друкує myroslava_year_strip(); календар — єдине місце, де «пігулки» лишаються. */
.year-strip {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.25rem;
	font-family: var(--font-ui);
}

.year-strip-months {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	flex: 1;
}

.year-strip-months a,
.year-strip-months .is-empty span {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.28em 0.65em;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--ink-soft);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.year-strip-months .is-empty span {
	border-style: dashed;
	background: transparent;
	color: var(--muted);
	font-weight: 500;
}

.year-strip-months a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.year-strip-months .is-current a {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.year-strip-months .is-current .count {
	color: rgba(255, 255, 255, 0.75);
}

.year-strip .count {
	font-size: 0.72rem;
	font-weight: 400;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.year-strip-adj {
	flex: none;
	min-width: 4.5rem;
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
}

.year-strip-adj:last-child {
	text-align: right;
}

.year-strip-adj:hover {
	color: var(--ink);
}

@media (max-width: 600px) {
	.year-strip {
		flex-wrap: wrap;
	}

	.year-strip-adj {
		min-width: 0;
	}

	.year-strip-adj:last-child {
		margin-left: auto;
	}

	.year-strip-months {
		order: 3;
		flex-basis: 100%;
	}
}

/* ---------- Компактні рубрики ---------- */
.cats-compact {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.widget .cats-compact li {
	padding: 0;
	border: 0;
	margin: 0;
}

.cats-compact a {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.3em 0.8em;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--ink-soft);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.cats-compact .count {
	font-size: 0.72rem;
	font-weight: 400;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.cats-compact a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.cats-compact .is-current a {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.cats-compact .is-current .count {
	color: rgba(255, 255, 255, 0.75);
}

.site-footer .cats-compact a {
	background: transparent;
	border-color: rgba(212, 180, 119, 0.35);
	color: #f3ede6;
}

/* ---------- Мобільні уточнення ----------
   Усі правила для телефона — тут, наприкінці файлу, щоб при однаковій специфічності перекривати базові.
   Один власник на діапазон: hero 1001–1140 / 701–1000 / ≤700 — у «Вступному блоці». */

/* Бічна колонка ≤1000 — тепла «полиця-покажчик» (mobile-7): та сама поверхня, що й .entry-shelf */
@media (max-width: 1000px) {
	.layout-sidebar {
		margin-top: clamp(2rem, 6vw, 3rem);
		margin-inline: calc(-1 * var(--gutter));
		padding: clamp(1.5rem, 5vw, 2.5rem) var(--gutter);
		background: linear-gradient(180deg, var(--paper-warm), var(--paper-soft));
		box-shadow: inset 0 1px 0 var(--line);
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
		gap: 1.5rem 2.5rem;
	}

	.layout-sidebar .widget {
		margin-bottom: 0;
	}

	.layout-sidebar .widget_search {
		grid-column: 1 / -1;
	}

	.layout-sidebar .widget_block:has(.wp-block-search) { /* :has() окремо: браузер без :has() відкидає весь список */
		grid-column: 1 / -1;
	}

	.has-ornaments .layout-sidebar::before {
		content: "";
		grid-column: 1 / -1;
		height: 22px;
		background: var(--orn-star) center / 22px 22px no-repeat;
	}
}

/* Закладка-стрічка — лише на широких екранах (identity-5) */
@media (max-width: 640px) {
	body.has-ornaments.is-reading .site-main::before {
		display: none;
	}
}

/* Hero на телефоні — титульна сторінка збірки; «Вірш дня» — сливова смуга від краю до краю (mobile-1, hero-9) */
@media (max-width: 600px) {
	.hero {
		padding-block: 1.75rem 0;
		margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
	}

	.hero-inner {
		gap: 0;
	}

	.hero-text {
		text-align: center; /* титульна сторінка збірки */
	}

	.hero-portrait {
		margin-inline: auto;
	}

	.hero-text > .eyebrow {
		font-size: 0.7rem;
	}

	.hero-title {
		font-size: clamp(2.3rem, 11vw, 2.9rem);
		line-height: 1.02;
		letter-spacing: -0.015em;
		margin-bottom: 0.25em;
	}

	.hero-title--two {
		max-width: none;
	}

	.has-ornaments .hero-title::after {
		margin-inline: auto;
	}

	.hero-byline {
		font-size: var(--step-0);
		margin: 0 0 0.9em;
	}

	.hero-lead {
		font-size: var(--step-0);
		margin-inline: auto;
		max-width: 28rem;
	}

	.hero-actions {
		margin-top: 1.25rem;
	}

	.hero-links { /* розділи — один рядок, що прокручується; останній визирає з-за краю */
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		margin: 1.25rem calc(-1 * var(--gutter)) 0;
		padding: 1rem var(--gutter) 0.25rem;
		scroll-snap-type: x proximity;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}

	.hero-links::-webkit-scrollbar {
		display: none;
	}

	.hero-links::after { /* Safari губить кінцевий padding у скролері */
		content: "";
		flex: none;
		width: 1px;
	}

	.hero-links-label,
	.hero-links .pill {
		flex: none;
		white-space: nowrap;
		scroll-snap-align: start;
	}

	.hero-new {
		justify-content: center;
		margin-top: 1.25rem;
	}

	.hero-verse,
	.hero-latest { /* картка втрачає рамку: смуга від краю до краю, вишивка через увесь екран */
		max-width: none;
		margin: 1.75rem calc(-1 * var(--gutter)) 0;
		padding: 1.5rem var(--gutter) 1.75rem;
		border-radius: 0;
		border-inline: 0;
		box-shadow: none;
		text-align: left;
	}

	.has-ornaments .hero-verse::before,
	.has-ornaments .hero-latest::before {
		margin: -1.5rem calc(-1 * var(--gutter)) 1.25rem;
		border-radius: 0;
	}

	.hero-latest-media {
		margin: -1.5rem calc(-1 * var(--gutter)) 1.25rem;
		border-radius: 0;
	}

	.hero-latest-title {
		font-size: var(--step-1);
	}

	.hero-verse::after {
		right: var(--gutter);
		top: 1.4rem;
	}

	.has-ornaments .hero-verse::after {
		top: calc(10px + 1.25rem + 0.15rem);
		right: var(--gutter);
	}

	.hero-latest-excerpt,
	.hero-verse-text {
		display: -webkit-box;
		-webkit-line-clamp: 7;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.hero-latest-excerpt {
		-webkit-line-clamp: 3;
	}

	.hero-verse-actions {
		justify-content: space-between; /* дії — по двох кутах картки */
	}

	.hero-verse-random {
		margin-left: auto;
	}
}

/* Зовсім вузькі екрани: калина тіснить «ВІРШ ДНЯ» — ховаємо */
@media (max-width: 360px) {
	.has-ornaments .hero-verse::after {
		display: none;
	}
}

/* Колонка читання на телефоні */
@media (max-width: 600px) {
	:root {
		--gutter: clamp(1.25rem, 5.5vw, 2.5rem); /* книжкові поля 20–22px замість 16px; десктоп не змінюється */
	}

	.entry-header {
		padding-top: 1.75rem;
		margin-bottom: 1.25rem;
	}

	.entry-title {
		font-size: clamp(1.75rem, 1.35rem + 2.4vw, 2.3rem);
	}

	.entry-media {
		margin-bottom: 1.5rem;
	}

	/* Сторінка вірша на телефоні (mobile-5): більша назва, паспарту від краю до краю; кегль і інтерліньяж — з verse-3 */
	.entry--verse .entry-title {
		font-size: clamp(2rem, 9.5vw, 2.6rem);
		line-height: 1.08;
	}

	.entry--verse .entry-media { /* паспарту від краю до краю; колонка тексту лишається білою */
		width: auto;
		max-width: none;
		margin: 0 0 1.75rem; /* батько <article> уже на всю ширину (поля мають лише .entry-header/.entry-content) — від'ємні поля робили паспарту 416px на екрані 375px */
		padding: 1rem var(--gutter);
		border: 0;
		background: var(--paper-warm);
		box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line);
	}

	.entry--verse .entry-media img {
		max-height: 60vh;
		border-radius: var(--radius-sm);
		box-shadow: 0 1px 2px rgba(34, 28, 26, 0.08), 0 12px 24px -18px rgba(34, 28, 26, 0.35);
	}

	.verse-book .entry--verse .entry-content { /* verse-2 */
		width: 100%;
	}

	/* «Зміст» складається в одну колонку під перемикачем (prose-1) */
	.entry-toc-list {
		columns: 1;
	}

	.entry-toc-title {
		cursor: pointer;
	}

	.entry-toc-title::after {
		content: " ▾" / "";
		color: var(--muted);
		font-size: 0.8em;
	}

	.entry-toc-box[open] .entry-toc-title::after {
		content: " ▴" / "";
	}

	.entry-toc-box {
		padding-inline: 1.1rem;
	}

	.has-ornaments .entry-toc-box::before {
		margin-inline: -1.1rem;
	}

	/* Довгі URL і слова без пробілів не ламають ширину сторінки */
	.entry-content {
		word-wrap: break-word;
		overflow-wrap: anywhere;
	}

	.entry-content a {
		word-break: break-word;
	}

	.entry-content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.entry-content .alignleft,
	.entry-content .alignright {
		float: none;
		display: block;
		margin: 1.25em auto;
		max-width: 100%;
	}

	blockquote {
		padding-left: 1em;
	}

	/* Старі центровані вірші: білі «розпірки» (…… у color:#ffffff), що на вузькому екрані переносяться
	   й лишають порожні рядки. Ховаємо лише ті, що не єдиний вміст абзацу. */
	.entry-content p > span[style*="color: #ffffff"]:not(:only-child),
	.entry-content p > span[style*="color:#ffffff"]:not(:only-child),
	.entry-content div > span[style*="color: #ffffff"]:not(:only-child),
	.entry-content span > span[style*="color: #ffffff"]:not(:only-child) {
		display: none;
	}

	.entry-footer {
		gap: 1rem;
	}

	/* Стрічка на телефоні: фото-картки щоденника, прози й бібліотеки/відео — компактні рядки;
	   вірші й обкладинки-тексти лишаються «вклейками». «Читайте також» — без умови, у «Картках». */
	.layout-main .grid-2 > .card:is(.rubric-notes, .rubric-prose, .rubric-media):not(.card--text) {
		flex-direction: row;
		align-items: stretch;
	}

	.layout-main .grid-2 > .card:is(.rubric-notes, .rubric-prose, .rubric-media):not(.card--text) > .card-media {
		flex: 0 0 38%;
		aspect-ratio: auto;
		min-height: 10rem;
	}

	.layout-main .grid-2 > .card:is(.rubric-notes, .rubric-prose, .rubric-media):not(.card--text) > .card-body {
		--card-pad: 1rem; /* колофон (.card .card-more) підхоплює --card-pad */
		flex: 1 1 auto; /* базове тіло — flex: 0 0 auto; у рядку воно має стискатися до решти ширини */
		padding: 0.9rem var(--card-pad) 1rem;
		min-width: 0;
	}

	.layout-main .grid-2 > .card:is(.rubric-notes, .rubric-prose, .rubric-media):not(.card--text) .entry-meta {
		font-size: 0.74rem;
		margin-bottom: 0.4rem;
	}

	.layout-main .grid-2 > .card:is(.rubric-notes, .rubric-prose, .rubric-media):not(.card--text) .card-title {
		font-size: 1.08rem;
		line-height: 1.25;
		margin-bottom: 0.35em;
	}

	.layout-main .grid-2 > .card:is(.rubric-notes, .rubric-prose, .rubric-media):not(.card--text) .card-excerpt {
		-webkit-line-clamp: 3;
		font-size: 0.88rem;
		margin-bottom: 0.6em;
	}

	.pagination .page-label {
		display: none;
	}

	.pagination .nav-links::before,
	.pagination .nav-links::after { /* без розпірок — усе по центру (archive-6) */
		display: none;
	}

	.pagination .nav-links {
		justify-content: center;
	}

	.pagination .page-numbers.prev,
	.pagination .page-numbers.next {
		padding: 0 0.8rem;
	}

	/* Підвал: лок-ап по центру (footer-3), списки зберігають крапкові лінії (footer-4), рядок прощання менший (footer-2) */
	.site-footer .footer-brand {
		text-align: center;
	}

	.footer-brand-link {
		flex-direction: column;
		align-items: center;
		gap: 0.5rem;
	}

	.footer-brand-text {
		align-items: center;
	}

	.footer-tagline {
		margin-inline: auto;
	}

	.footer-brand .social {
		justify-content: center;
	}

	.footer-farewell-line {
		font-size: var(--step-1);
	}

	.footer-bottom {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 0.75rem;
	}

	.footer-menu {
		justify-content: center;
	}
}

/* Телефон: дрібні правки після перевірки (QA2) — після базових ≤600-блоків, щоб перекривати їх */
@media (max-width: 600px) {
	.hero--solo { /* без сливової смуги «Вірш дня» блок закриває рядок «Розділи» — потрібна нижня стопа */
		padding-bottom: 1.5rem;
	}

	/* Пагінація середніх сторінок: числа в один рядок, стрілки по краях другого (archive-6) */
	.pagination .nav-links {
		justify-content: center;
	}

	.pagination .nav-links::before {
		content: "";
		display: block;
		flex-basis: 100%;
		height: 0;
		order: 1;
	}

	.pagination .nav-links::after {
		content: "";
		display: block;
		flex: 1 1 0;
		order: 2;
	}

	.pagination .page-numbers.prev {
		order: 1;
		margin: 0;
	}

	.pagination .page-numbers.next {
		order: 3;
		margin: 0;
	}

	/* Згорнутий «Зміст» без порожнього паперу під перемикачем */
	.entry-toc-box:not([open]) {
		padding-bottom: 1rem;
	}

	.entry-toc-box:not([open]) .entry-toc-title {
		margin-bottom: 0;
	}
}

@media (max-width: 400px) {
	.section-head { /* «Давніші записи →» не вміщається поруч із назвою розділу на 320px */
		flex-wrap: wrap;
		row-gap: 0.35rem;
	}

	.section-head .section-link {
		flex-basis: 100%;
	}
}

/* Телефон: бренд в один рядок, кнопка меню без підпису. Блок стоїть після базових правил і блоку 1280px,
   інакше .brand-name{font-size:1.3rem} із блоку 1280px переб'є ці правила (однакова специфічність). */
@media (max-width: 480px) {
	.brand-link {
		gap: 0.6rem;
		max-width: 100%;
	}

	.brand-mark {
		width: 2.25rem;
		height: 2.25rem;
		font-size: 0.95rem;
	}

	.brand-kicker {
		font-size: 0.6rem;
		letter-spacing: 0.18em;
	}

	/* Назва в один рядок: масштабується від ширини екрана; кнопка меню без підпису звільняє місце */
	.brand-name {
		font-size: clamp(0.8rem, 4.05vw, 1.2rem); /* 320px: 12.96px — уся назва без трикрапки */
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.nav-toggle {
		width: 2.75rem;
		padding: 0;
		justify-content: center;
		gap: 0;
	}

	.nav-toggle-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.custom-logo {
		height: 34px;
	}

	/* Пагінація «← 1 2 3 4 … 12 →» в один рядок на 360–375px */
	.pagination .page-numbers {
		min-width: 2.25rem;
		height: 2.25rem;
		padding: 0 0.5rem;
	}

	.pagination .nav-links {
		gap: 0.25rem;
	}
}

/* Зони дотику ≥ 44px і відгук на дотик — лише сенсорні екрани */
@media (pointer: coarse) {
	.cat-chip,
	.tags a,
	.archives-months a,
	.year-strip-months a,
	.widget_archive li a,
	.card-more,
	.to-top,
	.footer-menu a,
	.reply a,
	.comment-metadata a {
		position: relative;
	}

	.cat-chip::after,
	.tags a::after,
	.archives-months a::after,
	.year-strip-months a::after,
	.widget_archive li a::after,
	.card-more::after,
	.to-top::after,
	.footer-menu a::after,
	.reply a::after,
	.comment-metadata a::after {
		content: "";
		position: absolute;
		top: -0.6rem;
		right: -0.35rem;
		bottom: -0.6rem;
		left: -0.35rem;
	}

	.entry-content .entry-toc-list a { /* пункти «Змісту» — вищі рядки (prose-1); специфічність як у базового правила */
		padding-block: 0.6rem;
	}

	.entry-content .entry-part-up a { /* «Зміст ↑» — зона дотику без зміни вигляду */
		display: inline-block;
		padding: 0.6rem 0.4rem;
		margin: -0.6rem -0.4rem;
	}

	.is-verse .share-link::after {
		inset: -0.25rem -0.6rem;
	}

	.pill,
	.share-link,
	.cats-compact a {
		display: inline-flex;
		align-items: center;
		min-height: 2.5rem;
		position: relative;
	}

	.pill::after,
	.share-link::after {
		content: "";
		position: absolute;
		inset: -0.25rem 0;
	}

	/* У «Розділах» ::after — крапка-розділювач (не зона дотику), тому зона дотику там — через ::before */
	.hero-links .pill::after {
		position: static;
		inset: auto;
		align-self: center;
	}

	.hero-links .pill:not(:last-child)::after {
		content: "·" / "";
	}

	.hero-links .pill::before {
		content: "";
		position: absolute;
		inset: -0.25rem 0;
	}

	.search-form .search-submit,
	.wp-block-search__button,
	.comment-form .button,
	input[type="submit"] {
		min-height: 2.75rem;
	}

	.pagination .page-numbers {
		min-width: 2.75rem;
		height: auto;
		min-height: 2.75rem;
	}

	.widget li {
		padding-block: 0.55rem;
	}

	.archives-year summary {
		padding-block: 0.6rem;
	}

	.archives-months a {
		padding: 0.3em 0.7em;
	}

	a,
	button {
		-webkit-tap-highlight-color: transparent;
	}

	.pill:active,
	.share-link:active,
	.tags a:active,
	.pagination a.page-numbers:active {
		background: rgba(var(--accent-rgb), 0.12);
		border-color: var(--accent);
	}

	.cat-chip:active {
		background: var(--accent);
		color: #fff;
	}

	.site-nav .menu a:active,
	.post-nav-link:active,
	.entry-toc-list a:active,
	.footer-list a:active,
	.section-link:active,
	.hero-new a:active,
	.card-title a:active {
		color: var(--accent); /* відгук на дотик там, де tap-highlight вимкнено */
	}

	.site-nav .menu > li > a:active,
	.post-nav-link:active {
		background: rgba(var(--accent-rgb), 0.06);
	}

	/* Уся картка hero — посилання: тап у будь-яке місце відкриває запис (звичайні картки — без умови, у «Картках») */
	.hero-latest,
	.hero-verse {
		position: relative;
	}

	.hero-latest-title a::after,
	.hero-verse-title a::after {
		content: "";
		position: absolute;
		inset: 0;
		z-index: 1;
	}

	.hero-latest .entry-meta,
	.hero-verse-actions {
		position: relative;
		z-index: 2;
	}

	.card:active,
	.hero-latest:active,
	.hero-verse:active {
		border-color: rgba(var(--accent-rgb), 0.45);
	}

	.card:active .card-title a,
	.card:active .card-more {
		color: var(--accent);
	}
}

/* На сенсорних екранах :hover «залипає» після дотику — повертаємо спокійний стан */
@media (hover: none) {
	.cat-chip:hover {
		background: rgba(var(--accent-rgb), 0.09);
		color: var(--accent);
	}

	.pill:hover,
	.share-link:hover,
	.tags a:hover,
	.archives-months a:hover,
	.cats-compact a:hover {
		border-color: var(--line);
		color: var(--ink-soft);
	}

	.card:hover {
		transform: none;
		box-shadow: none;
		border-color: var(--line);
	}

	.card:hover .card-media img {
		transform: none;
	}

	.card:hover .card-title a {
		text-decoration-color: transparent;
	}

	.card:hover .card-media--text::before {
		color: rgba(var(--accent-rgb), 0.22);
	}

	.card.rubric-notes:hover .card-media--text::before {
		color: rgba(176, 141, 87, 0.45);
	}

	.card.rubric-prose:hover .card-media--text::before {
		color: rgba(34, 28, 26, 0.16);
	}

	.card:hover .card-media--text::after {
		opacity: 0.55;
	}

	.layout .card:hover .card-media--text::after {
		opacity: 0.45;
	}

	.card:hover .card-more {
		color: var(--gold-ink);
	}

	.card:hover .card-more span {
		transform: none;
	}

	.hero-links .pill:hover {
		color: var(--ink);
		text-decoration-color: rgba(176, 141, 87, 0.55);
	}

	/* Стібок під пунктом меню не «залипає» після дотику (поточний розділ лишається підкресленим) */
	.site-nav .menu > li:not([class*="current"]) > a:hover {
		color: var(--ink-soft);
	}

	.site-nav .menu > li:not([class*="current"]) > a:hover::after {
		transform: scaleX(0);
	}

	.brand-link:hover .brand-mark {
		transform: none;
	}

	.search-toggle:hover:not([aria-expanded="true"]) {
		background: transparent;
		color: var(--ink-soft);
	}

	.nav-toggle:hover {
		background: transparent;
	}

	/* Сторінка вірша: текстові теги й «поділитися» не «залипають» (verse-8) */
	.is-verse .share-link:hover {
		border-color: transparent;
		color: var(--ink-soft);
	}

	.is-verse .tags a:hover {
		color: var(--muted);
	}

	.to-top:hover {
		border-color: rgba(212, 180, 119, 0.35);
		background: transparent;
	}

	.to-top:hover .to-top-arrow {
		transform: none;
	}
}

/* ---------- Друк ---------- */
@media print {
	.site-header,
	.site-footer,
	.post-nav,
	.related,
	.comments-area,
	.layout-sidebar,
	.card-more,
	.author-card,
	.ornament,
	.entry-reading,
	.tags,
	.edit-link,
	.series,
	.header-search {
		display: none !important;
	}
	.share > * {
		display: none !important;
	}
	.share::after {
		content: attr(data-share-url);
		display: block;
		margin-top: 2em;
		font-family: var(--font-ui);
		font-size: 9pt;
		color: #666;
		overflow-wrap: anywhere; /* кириличні адреси в percent-encoding довші за сторінку */
		word-break: break-all;
	}
	.entry-header {
		padding-top: 0;
	}
	.entry-media img {
		max-height: 40vh;
		width: auto;
		margin: 0 auto;
	}
	body {
		font-size: 11pt;
		background: #fff;
	}
	a {
		color: inherit;
		text-decoration: none;
	}
	.has-ornaments .entry-content hr {
		height: 0;
		background: none;
		border-top: 1px solid #999;
		max-width: 8rem;
	}
	.has-ornaments .entry-content hr::before,
	.has-ornaments .entry-content hr::after {
		display: none;
	}
	.video-wrap {
		display: none;
	}
	.entry--verse .entry-media { /* verse-7: без паспарту */
		padding: 0;
		border: 0;
		box-shadow: none;
		background: none;
	}
	.entry-shelf,
	.entry-part-up,
	.verse-aside,
	.ghost-number,
	.year-strip,
	.page-header::before,
	.site-main::before,
	.hero-verse::after {
		display: none !important;
	}
	.entry-toc-box {
		border: 0;
		background: none;
		padding: 0;
	}
	.entry-toc-list a {
		border-bottom-color: #ccc;
	}
	.entry-content a,
	.comment-content a { /* type-8 (0,1,1) інакше переб'є друковане `a` */
		color: inherit;
		text-decoration: none;
	}
}

/* Сенсорні екрани: у «Усі записи за рік» ::after — стрілка, а не зона дотику (та є в самого рядка) */
@media (pointer: coarse) {
	.archives-months .archives-all a::after {
		content: "→" / "";
		position: static;
		inset: auto;
		margin-left: 0.2em;
	}
}
