/*
Theme Name: Plain Blog
Theme URI: https://example.com/
Author: —
Description: Лёгкая тема для личного блога: крупный заголовок, строка меню с линией и лупой, читаемый текст 19px, теги в строке под заметкой. Без плагинов и фреймворков.
Version: 1.9.4
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plainblog
Tags: blog, one-column, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, editor-style
*/

:root {
  --bg: #fff;
  --fg: #000;
  --muted: #7a7a7a;
  --rule: rgba(0, 0, 0, .15);
  --link: #37609c;
  --link-rule: rgba(55, 96, 156, .22);
  --hover: #b03000;
  --hover-rule: rgba(176, 48, 0, .25);
  --tag: #556677;
  --accent: #ec5734;
  --active: #ff4820;
  --soft: #f0f0f0;
  --note-bg: #fffdee;
  --image-border: #e8e8e8;
  --radius: 6px;
  --max: 1280px;
  --pad-x: 9%;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 19px;
  line-height: 28px;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe, embed { max-width: 100%; }
img { height: auto; }

a { color: var(--link); text-decoration: none; border-bottom: 1px solid var(--link-rule); }
a:hover, a:focus { color: var(--hover); border-bottom-color: var(--hover-rule); }
a.plain, .plain a, .site-title a { border-bottom-color: transparent; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- layout ---------- */
.site { max-width: var(--max); margin: 0 auto; padding: 48px var(--pad-x) 80px; }
@media (max-width: 760px) { .site { padding: 16px 4% 56px; } body { font-size: 18px; line-height: 27px; } }

/* ---------- header ---------- */
.site-header { margin-bottom: 20px; }
.title-inner { position: relative; }
/* аватарка: на широком экране — в левом поле рядом с названием, на узком — над названием */
.avatar-image, .avatar-placeholder { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: 50%; }
.site-title { margin: 0; font-size: 30px; line-height: 34px; font-weight: 700; }
.site-title a { color: var(--fg); border-bottom: 1px solid var(--rule); }
.site-title a:hover { color: var(--hover); }
.header-links { margin: 6px 0 0; padding: 0; list-style: none; font-size: 17px; line-height: 24px; }
.header-links li { display: inline; }
.header-links li + li::before { content: "•"; margin: 0 .55em; color: var(--fg); }
.site-description { margin: 4px 0 0; color: var(--muted); font-size: 16px; line-height: 22px; }

/* ---------- полоса меню (band) ---------- */
.band { position: relative; display: flex; align-items: flex-end; gap: 12px; padding-bottom: 1px; }
.band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); pointer-events: none; }
.band-main { margin: 22px 0 56px; }
.band-scrollable { flex: 1 1 auto; min-width: 0; position: relative; }
.band-scrollable + .band-scrollable { margin-top: 12px; }
.js-band-scrollable-inner { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 1px; }
.js-band-scrollable-inner::-webkit-scrollbar { display: none; }
.js-band-scrollable nav { display: flex; flex-wrap: nowrap; white-space: nowrap; }
/* затухание по краям, когда есть что прокручивать */
.js-band-scrollable.has-start-hide { -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.25) 14px, #000 28px); mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.25) 14px, #000 28px); }
.js-band-scrollable.has-end-hide { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0,0,0,.25) calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), rgba(0,0,0,.25) calc(100% - 14px), transparent); }
.js-band-scrollable.has-start-hide.has-end-hide { -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.25) 14px, #000 28px, #000 calc(100% - 28px), rgba(0,0,0,.25) calc(100% - 14px), transparent); mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.25) 14px, #000 28px, #000 calc(100% - 28px), rgba(0,0,0,.25) calc(100% - 14px), transparent); }

.band-item-inner { display: block; position: relative; padding: 0 6px; font-size: 19px; line-height: 28px; color: var(--fg); border-bottom: 0; white-space: nowrap; touch-action: manipulation; }
a.band-item-inner:hover { color: var(--hover); }
.band-item-current > .band-item-inner,
.band-item-parent > .band-item-inner { color: var(--active); font-weight: 600; }
.band-item-parent > .band-item-inner::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; background: var(--active); z-index: 1; }
.band-item-disabled > .band-item-inner { color: #ccc; pointer-events: none; }
.band-icon { display: inline-block; vertical-align: -2px; margin-right: 2px; }
.band-icon svg { fill: currentColor; }
.band-icon svg { display: block; }

/* правая «липкая» часть полосы: поиск и подписка не уезжают при прокрутке меню */
.band-sticky { display: flex; align-items: baseline; flex: 0 0 auto; background: var(--bg); padding-left: 6px; position: relative; }

.search-box { display: flex; align-items: center; margin: 0; }
.search-box .search-field { font: inherit; font-size: 17px; line-height: 24px; color: var(--fg); border: 0; background: var(--soft); border-radius: var(--radius); padding: 2px 10px; width: 200px; }
.search-box .search-field:focus { outline: 0; box-shadow: 0 0 0 1px var(--rule); }
.search-toggle { display: none; }
.search-toggle .band-icon { margin: 0; }
.js .band-sticky .search-box .search-field { display: none; width: 200px; }
.js .band-sticky .search-box.is-open .search-field { display: block; }
.js .band-sticky .search-toggle { display: block; width: 30px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--fg); }
.js .band-sticky .search-toggle:hover { color: var(--hover); }
.js .band-sticky .search-box.is-open .search-toggle { display: none; }
.search-submit-visually-hidden { position: absolute; left: -9999px; }
.page-search .search-box .search-field { width: 100%; max-width: 420px; font-size: 19px; padding: 6px 12px; }
.page-search .search-submit-visually-hidden { position: static; margin-left: 8px; font: inherit; font-size: 16px; padding: 6px 14px; border: 1px solid var(--rule); background: #fff; border-radius: var(--radius); cursor: pointer; }
@media (max-width: 560px) { .js .band-sticky .search-box .search-field { width: 150px; } }

/* календарные полосы на страницах года / месяца / дня */
.page-head .band-scrollable { margin: 14px 0 0; }
.page-head .band-scrollable .band-item-inner { font-size: 17px; }
.page-head .band-scrollable + .band-scrollable { margin-top: 4px; }

/* подсказки клавиш — только там, где есть клавиатура */
.keyboard-shortcut { display: none; padding: 0 .5em 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.shortcuts-on .keyboard-shortcut { display: inline-block; }

/* ---------- list of posts ---------- */
.snippet { margin: 0 0 40px; }
.snippet:last-child { margin-bottom: 0; }
.snippet-title { margin: 0; max-width: 960px; padding-right: 25px; font-size: 34px; line-height: 40px; letter-spacing: -.2px; font-weight: 700; word-break: break-word; }
.snippet-title a { color: var(--fg); border-bottom: 1px solid var(--rule); }
.snippet-title a:hover { color: var(--hover); border-bottom-color: var(--hover-rule); }
.snippet .entry-content { margin-top: 16px; }
.snippet .meta { margin-top: 10px; }
.snippet .snippet-thumb { margin: 10px 0 0; max-width: 850px; }
.snippet .snippet-content > :last-child { margin-bottom: 0; }
.snippet .more { margin: 6px 0 0; font-size: 16px; }
.snippet .more + .meta { margin-top: 18px; }
.snippet .more a { color: var(--link); }

.meta { font-size: 14px; line-height: 20px; color: var(--muted); }
.meta .tag { color: var(--tag); border-bottom-color: rgba(0,0,0,.15); margin-right: .55em; }
.meta .tag:hover { color: var(--hover); border-bottom-color: var(--hover-rule); }
.meta time { margin-right: .75em; }

/* ---------- single post ---------- */
.entry-title { margin: 0 0 10px; font-size: 34px; line-height: 40px; letter-spacing: -.2px; font-weight: 700; max-width: 960px; word-break: break-word; }
.entry-title .star { color: var(--fg); }
.entry .meta { margin: 0 0 28px; }
.entry-content > * { max-width: 850px; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content dl { margin: 0 0 1.25em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content h2 { margin: 1.6em 0 .5em; font-size: 24px; line-height: 28px; font-weight: 700; color: var(--accent); }
.entry-content h3 { margin: 1.4em 0 .4em; font-size: 20px; line-height: 26px; font-weight: 700; }
.entry-content b, .entry-content strong { font-weight: 700; }
.entry-content hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.entry-content blockquote { margin: 0 0 1.25em; padding: 0 0 0 1.1em; border-left: 3px solid var(--rule); color: #333; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content figure, .entry-content .wp-block-image { margin: 0 0 1.5em; max-width: 850px; }
.entry-content img { display: block; }
.entry-content figcaption, .wp-caption-text { margin: 6px 0 12px; font-size: 15px; line-height: 18px; color: inherit; }
.entry-content .alignwide { max-width: none; }
.entry-content .alignleft { float: left; margin: 0 1.2em 1em 0; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.2em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content iframe { width: 100%; max-width: 850px; border: 0; }
.entry-content pre, .entry-content code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; }
.entry-content pre { overflow: auto; background: var(--soft); padding: 12px 14px; border-radius: var(--radius); }
.entry-content table { border-collapse: collapse; max-width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--rule); padding: 6px 10px; }
.entry-content .wp-audio-shortcode, .entry-content audio { width: 100%; max-width: 850px; }
/* необязательные классы для блоков */
.entry-content .quote { padding: 20px 0 20px 40px; font-weight: 500; font-size: 28px; line-height: 38px; text-transform: uppercase; letter-spacing: .5px; border: 0; color: inherit; }
.entry-content .quote::before { content: "\201C"; color: var(--accent); font-size: 250%; line-height: .5; margin-left: -32px; vertical-align: bottom; font-family: Georgia, serif; }
.entry-content .aside { font-size: .7em; line-height: 1.4; color: #4a4a4a; }
@media (min-width: 1050px) { .entry-content .aside { float: right; clear: right; max-width: 200px; margin: .15em 0 0 4%; } }
.entry-content .question { background: var(--note-bg); color: #202020; padding: 1.2em 1.5em 1.4em 1.3em; margin-left: -1.3em; border-radius: 5px; }
/* сворачиваемый блок «Подробности» (спойлер внутри записи) */
.entry-content details { margin: 0 0 1.25em; padding: .6em 1em; background: var(--soft); border-radius: var(--radius); }
.entry-content details > summary { cursor: pointer; font-weight: 600; }
.entry-content details[open] > summary { margin-bottom: .6em; }

/* размеры картинок по ориентации */
.entry-content img.is-landscape { width: 100%; height: auto; }
.entry-content img.is-portrait  { max-width: min(500px, 100%); height: auto; }
.entry-content img.is-square    { max-width: min(500px, 100%); height: auto; }
.entry-content figure.wp-block-image:has(img.is-portrait), .entry-content figure.wp-block-image:has(img.is-square) { max-width: 500px; }
.entry-content .wp-block-image .aligncenter img { margin-left: auto; margin-right: auto; }

/* галереи и видео (блоки «Галерея» и «Видео» редактора) */
.entry-content .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0 0 1.5em; padding: 0; list-style: none; max-width: 850px; }
.entry-content .wp-block-gallery figure, .entry-content .wp-block-gallery .wp-block-image { margin: 0; }
.entry-content .wp-block-gallery img, .entry-content .wp-block-gallery img.is-portrait, .entry-content .wp-block-gallery img.is-square, .entry-content .wp-block-gallery img.is-landscape { width: 100%; max-width: none; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
/* видео: горизонтальное — на ширину записи, вертикальное (Shorts) — до 400 px */
.entry-content .wp-block-embed { margin: 0 0 1.5em; max-width: 850px; }
.wp-embed-responsive .entry-content .wp-block-embed .wp-block-embed__wrapper::before, .entry-content .wp-block-embed .wp-block-embed__wrapper::before { content: none; display: none; padding: 0; }
.entry-content .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.entry-content .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.entry-content .wp-block-embed__wrapper:has(.pb-video) { aspect-ratio: auto; }
.entry-content .pb-video { position: relative; width: 100%; max-width: 850px; aspect-ratio: 16 / 9; margin: 0 0 1.5em; background: #000; }
.entry-content .wp-block-embed .pb-video { margin: 0; }
.entry-content .pb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; border: 0; }
.entry-content .pb-video.is-vertical-video { max-width: min(400px, 100%); aspect-ratio: 9 / 16; }
.entry-content .wp-block-embed.is-vertical-embed, .entry-content .wp-block-embed.vertical { max-width: min(400px, 100%); }
.entry-content .wp-block-embed.vertical .pb-video { max-width: none; aspect-ratio: 9 / 16; }
/* свои загруженные видео (блок «Видео») */
.entry-content video { display: block; width: 100%; max-width: 850px; height: auto; }
.entry-content video.is-portrait { max-width: min(400px, 100%); }
.entry-content .wp-block-video:has(video.is-portrait) { max-width: min(400px, 100%); }
.page-links { margin: 1em 0; font-size: 16px; }

.entry-footer { margin: 40px 0 0; }
.entry-footer .tags { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 16px; line-height: 28px; }
.entry-footer .tags a { color: var(--tag); border-bottom-color: rgba(0,0,0,.15); }
.entry-footer .tags a:hover { color: var(--hover); }



/* ---------- «Ранее / Позднее» ---------- */
.pages { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 48px 0 40px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 16px; line-height: 24px; }
.pages .pages-earlier { margin-left: auto; text-align: right; }
.pages a { color: var(--link); }

/* ---------- соседние записи ---------- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; margin: 48px 0 40px; padding: 8px 0 0; border-top: 1px solid var(--rule); font-size: 16px; line-height: 24px; }
.post-nav .keyboard-shortcut { display: none; padding: 0; }
.shortcuts-on .post-nav .keyboard-shortcut { display: block; }
.post-nav-older { text-align: right; }
.post-nav a { color: var(--link); border-bottom-color: var(--link-rule); }
.post-nav a:hover { color: var(--hover); }

/* ---------- «Дальше» ---------- */
.next-section { margin: 56px 0 0; }
.section-heading { margin: 0 0 12px; font-size: 20px; line-height: 28px; font-weight: 700; }
.next-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; align-items: start; }
.next-gallery .next-item:nth-child(odd):not(:last-child) { padding-right: 20px; border-right: 1px solid var(--rule); }
.next-item { display: grid; grid-template-columns: minmax(0, 38%) 1fr; gap: 0 18px; align-items: start; }
.next-item.no-cover { grid-template-columns: 1fr; }
.next-cover { display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 0; background: var(--soft); }
.next-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.next-title { margin: 0 0 6px; font-size: 22px; line-height: 27px; font-weight: 700; }
.next-title a { color: var(--fg); border-bottom-color: var(--rule); }
.next-title a:hover { color: var(--hover); }
.next-summary { margin: 0 0 6px; font-size: 16px; line-height: 23px; color: #222; }
@media (max-width: 735px) { .next-gallery { display: block; } .next-gallery .next-item { padding: 0 0 22px; border: 0 !important; } }

/* ---------- archive heads ---------- */
.page-head { margin: 0 0 32px; }
.page-title { margin: 0; font-size: 36px; line-height: 40px; font-weight: 700; }
.page-head .description { margin: 6px 0 0; color: var(--muted); font-size: 17px; line-height: 24px; max-width: 720px; }
.empty { color: var(--muted); }


/* ---------- tags / archive templates ---------- */
.tag-list { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 32px; font-size: 18px; }
.tag-list li { break-inside: avoid; margin: 0 0 6px; }
.tag-list .count { color: var(--muted); font-size: 14px; margin-left: .35em; }
.year-block { margin: 0 0 32px; }
.year-block h2 { margin: 0 0 8px; font-size: 26px; line-height: 32px; }
.year-block ul { list-style: none; padding: 0; margin: 0; font-size: 18px; line-height: 26px; }
.year-block li { margin: 3px 0; }
.year-block .d { color: var(--muted); font-size: 14px; margin-right: .6em; display: inline-block; min-width: 3.4em; }

/* ---------- comments ---------- */
.comments { margin: 64px 0 0; max-width: 850px; }
.comments-title { font-size: 22px; line-height: 28px; margin: 0 0 20px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { margin-left: 28px; }
.comment-body { background: #f7f7f7; border-radius: var(--radius); padding: 14px 18px; margin: 0 0 12px; font-size: 17px; line-height: 25px; }
.comment-meta { font-size: 14px; line-height: 20px; color: var(--muted); margin-bottom: 6px; }
.comment-author .fn { font-weight: 700; color: var(--fg); font-style: normal; }
.comment-author .avatar { width: 40px; height: 40px; border-radius: 50%; vertical-align: middle; margin-right: 10px; }
.comment-body p { margin: 0 0 .7em; }
.reply a { font-size: 14px; color: var(--muted); }
.comment-respond { margin-top: 32px; }
.comment-form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 8px 10px; background: var(--soft); border: 0; border-radius: var(--radius);
}
.comment-form .submit, .button { font: inherit; font-size: 16px; padding: 8px 18px; border: 0; border-radius: var(--radius); background: var(--fg); color: #fff; cursor: pointer; }
.comment-form .submit:hover { background: var(--hover); }
.comment-form p { margin: 0 0 14px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 20px; color: var(--muted); }
.site-footer a { color: var(--muted); border-bottom-color: var(--rule); }

/* WordPress core classes */
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.sticky, .bypostauthor, .gallery-caption { display: block; }
.wp-caption { max-width: 100%; }

/* ---------- просмотры, избранное ---------- */
.meta .views { margin-right: .75em; white-space: nowrap; }
.e2-svgi { display: inline-block; width: 16px; height: 16px; vertical-align: middle; position: relative; top: -1px; line-height: 0; font-size: 0; }
.e2-svgi svg { fill: currentColor; display: block; }
.favourite-title::after { content: "★"; position: absolute; display: inline-block; margin-left: .33em; margin-top: .07em; font-size: 80%; }

/* ---------- облако тегов ---------- */

/* ---------- вход и комментарии ---------- */
.muted { color: var(--muted); }
.comment-login { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; font-size: 16px; line-height: 24px; }
.link-button { font: inherit; padding: 0; border: 0; border-bottom: 1px solid var(--link-rule); background: none; color: var(--link); cursor: pointer; }
.link-button:hover { color: var(--hover); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.comment-meta .avatar { width: 32px; height: 32px; border-radius: 50%; }
.comment-date { color: var(--muted); border-bottom: 0; }
.tg-badge { display: inline-block; margin-left: 5px; color: #2a9fd6; vertical-align: -2px; }
.comment-form-comment textarea { resize: vertical; }
.comment-form-author, .comment-form-email { max-width: 380px; }
.comment-form .check { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--fg); }
.comment-form .check input { width: auto; }
.form-submit { display: flex; align-items: center; gap: 12px; }

/* ---------- окно увеличения картинки ---------- */

/* Аватарка на две строки (название + ссылки) */
.site-avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; margin: 0 0 10px; line-height: 0; color: #000; }
@media (min-width: 1024px) { .site-avatar { position: absolute; left: -84px; top: 0; width: 64px; height: 64px; margin: 0; } }
@media (max-width: 1023px) { .site-avatar { width: 64px; height: 64px; } }
/* Страница тегов: обычный перечень в строку */
.tag-index { margin: 0; padding: 4px 0 24px; font-size: 18px; line-height: 2.1; }
.tag-index a { display: inline-block; margin: 0 1.6em 0 0; color: var(--tag); border-bottom: 1px solid var(--link-rule); }
.tag-index a:hover { color: var(--hover); border-bottom-color: var(--hover-rule); }

/* ---------- живой поиск ---------- */
#content.is-loading { opacity: .55; transition: opacity .15s; }

/* ---------- ракета «наверх» ---------- */
.rocket { position: fixed; right: 28px; bottom: 24px; z-index: 60; padding: 4px; border: 0; background: none; cursor: pointer; line-height: 0; opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .25s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rocket[hidden] { display: none; }
.rocket.is-visible { opacity: 1; transform: none; }
.rocket svg { display: block; overflow: visible; }
/* пламя горит всегда; при наведении — разгорается, ракета дрожит */
.rocket-flame { transform-origin: 20px 45px; animation: rocket-flame-small .18s infinite alternate; }
@media (hover: hover) {
  .rocket:hover .rocket-flame { animation-name: rocket-flame-big; animation-duration: .1s; }
  .rocket:hover svg { animation: rocket-shake .1s infinite alternate; }
}
.rocket:focus-visible .rocket-flame { animation-name: rocket-flame-big; animation-duration: .1s; }
.rocket:focus-visible { outline: 2px solid var(--link-rule); outline-offset: 2px; border-radius: 8px; }
.rocket.is-flying .rocket-flame { animation: rocket-flame-big .08s infinite alternate; }
.rocket.no-anim, .rocket.no-anim .rocket-flame { transition: none !important; }
.rocket.is-flying { opacity: 1; transform: translateY(-110vh); transition: transform .7s cubic-bezier(.5,0,.9,.4); }
@keyframes rocket-flame-small { from { transform: scaleY(.5); } to { transform: scaleY(.62); } }
@keyframes rocket-flame-big { from { transform: scaleY(1); } to { transform: scaleY(1.3); } }
@keyframes rocket-shake { from { transform: translateX(-.7px); } to { transform: translateX(.7px); } }
@media (max-width: 760px) { .rocket { right: 14px; bottom: 14px; } .rocket svg { width: 32px; height: 51px; } }
@media (prefers-reduced-motion: reduce) { .rocket, .rocket.is-flying { transition: opacity .2s; } .rocket.is-flying { transform: none; } .rocket-flame, .rocket svg { animation: none !important; } .rocket-flame { transform: scaleY(.6); } }

/* ---------- шапка на телефоне и планшете: аватарка слева от названия ---------- */
@media (max-width: 1023px) {
  .site-header { position: relative; padding-left: 76px; min-height: 64px; }
  .title-inner { position: static; }
  .site-avatar { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: 0; }
}
@media (max-width: 600px) {
  .site-header { padding-left: 70px; min-height: 60px; }
  .site-avatar { width: 60px; height: 60px; }
  .site-title { font-size: 26px; line-height: 30px; }
}
@media (max-width: 380px) {
  .site-header { padding-left: 64px; min-height: 54px; }
  .site-avatar { width: 54px; height: 54px; }
  .site-title { font-size: 23px; line-height: 27px; }
  .header-links { font-size: 16px; line-height: 21px; }
}

/* ---------- Shorts на телефоне — на 30 % уже ---------- */
@media (max-width: 760px) {
  .entry-content .pb-video.is-vertical-video, .entry-content .wp-block-embed.is-vertical-embed, .entry-content .wp-block-embed.vertical { max-width: min(400px, 70%); }
  .entry-content .wp-block-embed .pb-video.is-vertical-video { max-width: none; }
}

/* ---------- карусель фотографий ---------- */
.entry-content .pb-gallery { margin: 0 0 1.5em; max-width: 850px; }
.entry-content .pb-gallery.is-portrait, .entry-content .pb-gallery.is-square { max-width: min(500px, 100%); }
.entry-content .pb-gallery.is-video-vertical { max-width: min(400px, 100%); }
@media (max-width: 760px) { .entry-content .pb-gallery.is-video-vertical { max-width: min(400px, 70%); } }
.entry-content .pb-slide .wp-block-embed, .entry-content .pb-slide .pb-video { margin: 0 !important; max-width: none !important; }
.pb-gallery.is-video .pb-arrow { opacity: 1; }
.pb-carousel { position: relative; outline: 0; }
.pb-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.pb-track::-webkit-scrollbar { display: none; }
.pb-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.entry-content .pb-slide figure { margin: 0 !important; max-width: none !important; width: 100% !important; }
.entry-content .pb-slide img, .entry-content .pb-slide img.is-portrait, .entry-content .pb-slide img.is-square, .entry-content .pb-slide img.is-landscape { display: block; width: 100%; max-width: none; height: auto; aspect-ratio: var(--pb-ratio, 3 / 2); object-fit: contain; margin: 0; }
.pb-slide figcaption { margin: 6px 0 0; font-size: 15px; line-height: 18px; }
.pb-arrow { position: absolute; top: calc(var(--pb-img-h, 50%) / 2); transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--fg); box-shadow: 0 1px 4px rgba(0,0,0,.18); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; padding: 0; }
.pb-arrow svg { width: 16px; height: 16px; fill: currentColor; }
.pb-prev { left: 10px; } .pb-next { right: 10px; }
.pb-arrow[disabled] { display: none; }
@media (hover: hover) { .pb-carousel:hover .pb-arrow, .pb-carousel:focus-within .pb-arrow { opacity: 1; } .pb-arrow:hover { color: var(--hover); } }
.pb-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.pb-dots { display: flex; gap: 6px; }
.pb-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #d4d4d4; cursor: pointer; }
.pb-dots button.is-active { background: var(--fg); }
.pb-gallery > figcaption, .pb-gallery .blocks-gallery-caption { margin: 6px 0 0; font-size: 15px; line-height: 18px; text-align: center; }

/* ---------- плеер музыки ---------- */
.entry-content .wp-block-audio { margin: 0 0 1.5em; max-width: 850px; }
.entry-content .wp-block-audio figcaption.is-player-title { display: none; }
.pb-audio { display: flex; align-items: center; gap: 14px; max-width: 850px; margin: 0 0 1.5em; padding: 12px 16px 12px 12px; border: 1px solid var(--rule); border-radius: var(--radius); }
.wp-block-audio .pb-audio { margin: 0; }
.pb-audio audio { display: none; }
.pb-audio-play { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--fg); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.pb-audio-play:hover { background: var(--hover); }
.pb-audio-play svg { width: 14px; height: 14px; fill: currentColor; }
.pb-audio-play .i-pause, .pb-audio.is-playing .pb-audio-play .i-play { display: none; }
.pb-audio.is-playing .pb-audio-play .i-pause { display: block; }
.pb-audio-body { flex: 1 1 auto; min-width: 0; }
.pb-audio-title { font-size: 16px; line-height: 22px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0 0 7px; }
.pb-audio-bar { position: relative; height: 14px; cursor: pointer; touch-action: none; outline: 0; }
.pb-audio-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--rule); border-radius: 1px; }
.pb-audio-fill { position: absolute; left: 0; top: 6px; height: 2px; width: 0; background: var(--accent); border-radius: 1px; }
.pb-audio-fill::after { content: ""; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); opacity: 0; transition: opacity .15s; }
.pb-audio-bar:hover .pb-audio-fill::after, .pb-audio-bar:focus-visible .pb-audio-fill::after, .pb-audio.is-playing .pb-audio-fill::after { opacity: 1; }
.pb-audio-time { flex: 0 0 auto; font-size: 14px; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .pb-audio { gap: 10px; padding: 10px 12px 10px 10px; } .pb-audio-time { font-size: 13px; } }

/* ---------- обложки на странице метки ---------- */
.tag-covers { display: grid; grid-template-columns: repeat(auto-fill, 96px); gap: 18px 16px; margin: 22px 0 8px; }
.tag-cover-year { display: block; height: 20px; margin: 0 0 4px; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--fg); }
.tag-cover { display: block; border: 0; color: var(--fg); }
.tag-cover img { display: block; width: 96px; height: 96px; object-fit: cover; background: var(--soft); border-radius: 2px; transition: opacity .15s; }
.tag-cover .tag-cover-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px; font-size: 13px; line-height: 16px; }
.tag-cover:hover { color: var(--hover); }
.tag-cover:hover img { opacity: .85; }
@media (max-width: 600px) { .tag-covers { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 12px; } .tag-cover img { width: 100%; height: auto; aspect-ratio: 1; } }

/* ---------- подзаголовок записи ---------- */
.entry-subtitle { margin: -4px 0 16px; max-width: 960px; font-size: 20px; line-height: 27px; font-weight: 500; color: var(--accent); word-break: break-word; }
.snippet .snippet-subtitle { margin: 6px 0 0; max-width: 960px; font-size: 20px; line-height: 27px; }
.next-subtitle { margin: -2px 0 6px; font-size: 15px; line-height: 21px; font-weight: 500; color: var(--accent); }
@media (max-width: 760px) { .entry-title, .snippet-title { font-size: 28px; line-height: 34px; letter-spacing: 0; } .entry-subtitle, .snippet .snippet-subtitle { font-size: 18px; line-height: 25px; } }
@media (max-width: 400px) { .entry-title, .snippet-title { font-size: 26px; line-height: 31px; } .entry-subtitle, .snippet .snippet-subtitle { font-size: 17px; line-height: 24px; } }

/* аватарка — ссылка на главную */
.site-avatar a { display: block; width: 100%; height: 100%; border: 0; }
.site-avatar a:hover .avatar-image { opacity: .9; }
