/*
Theme Name: Zhas Hub Messenger
Theme URI: https://zhashub.kz/
Author: Zhas Hub
Description: Тема zhashub.kz по схеме мессенджера в собственном стиле: рубрики-каналы на чёрной панели слева, рубрика открывается лентой постов-карточек, по клику открывается страница статьи. Светлая и тёмная тема, реакции, обсуждения. Совместима с Rank Math.
Version: 2.3.0
Requires at least: 6.3
Tested up to: 6.9
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: zhashub
*/

/* ---------- Токены ---------- */
:root {
	--side: #121212;
	--side-text: #f3f1ea;
	--side-muted: #8b8a84;
	--side-hover: #1f1f1f;
	--side-line: #262626;
	--paper: #f3f1ea;
	--card: #ffffff;
	--text: #121212;
	--muted: #6f6c64;
	--line: #e2ddd0;
	--hover: #ebe8df;
	--lime: #d7ff3f;
	--ink: #121212;
	--link: #121212;
	--dot: rgba(18, 18, 18, .09);
	--font: "Geologica", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--side-w: 372px;
	color-scheme: light;
}
[data-theme="dark"] {
	--paper: #0d0d0e;
	--card: #19191b;
	--text: #f1efe8;
	--muted: #8f8d86;
	--line: #29292c;
	--hover: #222225;
	--link: #f1efe8;
	--dot: rgba(255, 255, 255, .055);
	color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0; background: var(--paper); color: var(--text);
	font-family: var(--font); font-size: 16px; line-height: 1.45;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden;
}
a { color: var(--link); text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
[hidden] { display: none !important; }
.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 !important; width: 1px; word-wrap: normal !important;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--lime); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.icon { width: 22px; height: 22px; flex: none; }

.icon-btn {
	display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0;
	border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: inline-grid; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

/* ---------- Каркас ---------- */
.app { display: flex; height: 100vh; height: 100dvh; }
.side {
	width: var(--side-w); flex: none; display: flex; flex-direction: column; min-height: 0;
	background: var(--side); color: var(--side-text);
}
.pane {
	position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column;
	background-color: var(--paper);
	background-image: radial-gradient(circle at 1px 1px, var(--dot) 1.2px, transparent 0);
	background-size: 22px 22px;
}

/* ---------- Чёрная панель каналов ---------- */
.side .icon-btn { color: var(--side-muted); }
.side .icon-btn:hover { background: var(--side-hover); color: var(--side-text); }
.side__top { display: flex; align-items: center; gap: 6px; padding: 12px 12px 6px 8px; flex: none; }
.side__theme { margin-left: auto; }
.side .logo__link { color: var(--side-text); font-size: 25px; }
.side__search {
	display: flex; align-items: center; gap: 10px; height: 44px; margin: 6px 14px 4px; padding: 0 14px; flex: none;
	border-radius: 14px; background: var(--side-hover); color: var(--side-muted);
	border: 1.5px solid transparent; transition: border-color .15s ease;
}
.side__search:focus-within { border-color: var(--lime); color: var(--lime); }
.side__search .icon { width: 20px; height: 20px; }
.side__search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15.5px; color: var(--side-text); }
.side__search input::placeholder { color: var(--side-muted); }
.side__search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.side__label { margin: 14px 22px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); }

.chats { flex: 1; overflow-y: auto; padding: 0 10px 12px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.chats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chat {
	display: flex; align-items: center; gap: 13px; padding: 9px 10px; border-radius: 16px; color: var(--side-text);
	transition: background-color .12s ease;
}
.chat:hover { background: var(--side-hover); color: var(--side-text); }
.chat.is-active { background: var(--lime); color: var(--ink); }
.chat__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.chat__name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__time { flex: none; font-size: 12px; color: var(--side-muted); font-variant-numeric: tabular-nums; }
.chat__last { font-size: 14.5px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__badge {
	flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 7px;
	display: inline-grid; place-items: center; background: var(--lime); color: var(--ink); font-size: 12px; font-weight: 800;
}
.chat.is-active .chat__time, .chat.is-active .chat__last { color: rgba(18, 18, 18, .66); }
.chat.is-active .chat__badge { background: var(--ink); color: var(--lime); }

/* Аватарки — цветные квадраты с толстой буквой */
.ava {
	--c: #5b3df5;
	flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
	background: var(--c); color: #fff; font-weight: 900; font-size: 22px; letter-spacing: -.04em; line-height: 1;
}
.ava--icon svg { width: 54%; height: 54%; }
.ava--brand { background: var(--lime); color: var(--ink); font-size: 20px; letter-spacing: -.07em; }
.chat.is-active .ava--brand { background: var(--ink); color: var(--lime); }
.chat.is-active .ava { box-shadow: 0 0 0 2px var(--ink); }
.ava--sm { width: 42px; height: 42px; border-radius: 13px; font-size: 18px; }
.pane .ava--brand { background: var(--ink); color: var(--lime); }
[data-theme="dark"] .pane .ava--brand { background: var(--lime); color: var(--ink); }

/* ---------- Шапка канала ---------- */
.head {
	display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 12px 0 20px; flex: none;
	background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom: 1px solid var(--line);
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.head__back { display: none; margin-left: -8px; }
.head__text { min-width: 0; }
.head__name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head__actions { margin-left: auto; display: flex; gap: 2px; }

.pinned {
	display: flex; align-items: center; gap: 12px; margin: 10px 18px 0; padding: 10px 14px; flex: none;
	border-radius: 16px; background: var(--ink); color: #f3f1ea;
}
[data-theme="dark"] .pinned { background: var(--card); border: 1px solid var(--line); }
.pinned:hover { color: #f3f1ea; }
.pinned:hover .pinned__title { text-decoration: underline; text-decoration-color: var(--lime); text-underline-offset: 3px; }
.pinned__text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pinned__label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.pinned__title { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinned .icon { margin-left: auto; color: var(--lime); width: 20px; height: 20px; }

/* ---------- Лента ---------- */
.feed {
	flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.feed__list {
	display: flex; flex-direction: column; gap: 14px;
	width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 20px 20px;
}

.day { align-self: center; margin: 4px 0; position: sticky; top: 10px; z-index: 3; }
.feed--static .day { position: static; }
.day span {
	display: inline-block; padding: 5px 12px; border-radius: 8px;
	background: var(--ink); color: var(--lime);
	font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
[data-theme="dark"] .day span { background: var(--lime); color: var(--ink); }
.feed__older { align-self: center; margin: 4px 0 8px; }
.feed__older-link {
	display: inline-block; padding: 7px 14px; border-radius: 10px; border: 1.5px solid var(--text); color: var(--text);
	font-size: 13px; font-weight: 700;
}
.feed__older.is-loading .feed__older-link { opacity: .5; }

/* ---------- Пост-карточка ---------- */
.msg { display: flex; align-items: flex-end; gap: 10px; width: 100%; }
.bubble {
	position: relative; flex: 1; min-width: 0; background: var(--card); color: var(--text);
	border-radius: 22px; border: 1px solid var(--line);
	transition: box-shadow .2s ease, transform .2s ease;
}
.msg:not(.is-article):hover .bubble { box-shadow: 0 10px 28px rgba(18, 18, 18, .08); }
.bubble__media { display: block; margin: 8px 8px 0; overflow: hidden; border-radius: 16px; background: var(--hover); }
.bubble__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.msg:not(.is-article):hover .bubble__media img { transform: scale(1.02); }
.msg.is-article .bubble__media img { aspect-ratio: auto; max-height: 560px; }
.bubble__body { padding: 12px 16px 10px; }
.bubble__title { font-size: 19px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.bubble__title a { color: var(--text); }
.bubble__title a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.msg.is-article .bubble__title { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.1; font-weight: 900; letter-spacing: -.035em; margin: 6px 0 14px; }
.bubble__text p { font-size: 15.5px; line-height: 1.55; color: color-mix(in srgb, var(--text) 82%, transparent); margin-bottom: 8px; }
.bubble__more {
	font-weight: 700; color: var(--text); white-space: nowrap;
	background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%);
}
.bubble__more:hover { background: var(--lime); color: var(--ink); }

.bubble__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.react {
	display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px;
	border: 1.5px solid var(--line); border-radius: 11px; background: none; color: var(--text);
	font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.react:hover { border-color: var(--text); }
.react:active { transform: scale(.93); }
.react.is-on { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.react__n:empty { display: none; }
.bubble__meta { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bubble__views { display: inline-flex; align-items: center; gap: 4px; }
.bubble__views .icon { width: 16px; height: 16px; }

.bubble__comments {
	display: flex; align-items: center; gap: 10px; margin: 0 16px; padding: 11px 0 13px; border-top: 1px dashed var(--line);
	color: var(--text); font-size: 14.5px; font-weight: 700;
}
.bubble__comments .icon { width: 19px; height: 19px; color: var(--muted); }
.bubble__comments .icon--arrow { margin-left: auto; transition: transform .15s ease; }
.bubble__comments:hover { color: var(--text); }
.bubble__comments:hover .icon--arrow { transform: translateX(3px); color: var(--text); }

.msg__share {
	flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px;
	border: 1px solid var(--line); border-radius: 13px; background: var(--card); color: var(--text); cursor: pointer;
	opacity: 0; transition: opacity .15s ease, background-color .15s ease;
}
.msg:hover .msg__share, .msg__share:focus-visible { opacity: 1; }
.msg__share:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.msg__share .icon { width: 18px; height: 18px; }
@media (hover: none) { .msg__share { opacity: 1; } }

/* ---------- Текст статьи ---------- */
.entry { font-size: 16.5px; line-height: 1.65; overflow-wrap: break-word; }
.msg.is-article .entry { font-size: 17.5px; }
.entry > * + * { margin-top: .8em; }
.entry h2 { font-size: 1.3em; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; margin-top: 1.5em; scroll-margin-top: 90px; }
.entry h3 { font-size: 1.1em; line-height: 1.35; font-weight: 800; margin-top: 1.2em; }
.entry ul, .entry ol { padding-left: 1.3em; }
.entry ul { list-style: none; padding-left: 1.2em; }
.entry ul > li { position: relative; }
.entry ul > li::before { content: ""; position: absolute; left: -1.05em; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 1.5px var(--ink); }
[data-theme="dark"] .entry ul > li::before { box-shadow: none; }
.entry li + li { margin-top: .35em; }
.entry a { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.entry a:hover { background: var(--lime); color: var(--ink); }
.entry img, .entry figure img { display: block; border-radius: 14px; }
.entry figure { margin-inline: 0; }
.entry figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.entry blockquote { margin-inline: 0; padding: 12px 16px; border-radius: 14px; background: var(--paper); border-left: 4px solid var(--lime); }
.entry blockquote p { margin: 0; }
.entry mark { background: var(--lime); color: var(--ink); padding: 0 .15em; border-radius: 3px; }
.entry code { padding: .1em .35em; border-radius: 5px; background: var(--hover); font-size: .9em; }
.entry pre { overflow-x: auto; padding: 12px; border-radius: 10px; background: var(--hover); font-size: 14px; }
.entry hr { border: 0; border-top: 1px dashed var(--line); }
.entry .table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.entry table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.entry th, .entry td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry th { font-weight: 800; background: var(--paper); }
.entry iframe { max-width: 100%; border-radius: 12px; }
.entry .wp-block-button__link { display: inline-block; padding: 11px 20px; border-radius: 12px; background: var(--ink); color: var(--lime); text-decoration: none; font-weight: 800; }
.entry .zh-widget, .slot { text-align: center; }
.zh-widget__title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }

.toc { margin: 1em 0; padding: 10px 14px; border-radius: 14px; background: var(--paper); }
.toc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; font-weight: 800; padding: 4px 0; }
.toc__head::-webkit-details-marker { display: none; }
.toc__count { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.toc__list { list-style: none; margin: 4px 0; padding: 0; counter-reset: toc; }
.entry .toc__list > li::before { display: none; }
.toc__list li { counter-increment: toc; }
.entry .toc__list a { display: flex; gap: 10px; padding: 5px 0; color: var(--text); text-decoration: none; font-size: 15px; }
.entry .toc__list a:hover { background: none; text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.toc__list a::before { content: counter(toc, decimal-leading-zero); font-weight: 800; min-width: 1.6em; color: var(--muted); }

/* ---------- Нижняя кнопка канала ---------- */
.bar { flex: none; display: flex; justify-content: center; padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); }
.bar__btn {
	width: 100%; max-width: 680px; padding: 13px; border-radius: 14px; text-align: center;
	background: var(--ink); color: var(--lime); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
	transition: transform .15s ease;
}
[data-theme="dark"] .bar__btn { background: var(--lime); color: var(--ink); }
.bar__btn:hover { color: var(--lime); transform: translateY(-1px); }
[data-theme="dark"] .bar__btn:hover { color: var(--ink); }

/* ---------- Статья: крошки, метки, обсуждение ---------- */
.crumbs { align-self: center; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: inline-block; padding: 5px 11px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 600; }
.tags a:hover { background: var(--lime); border-color: var(--lime); color: var(--ink); }

.talk { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.talk__list, .talk__list .children { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.talk__list .children { padding-left: 28px; margin-top: 10px; }
.talk .comment-body {
	position: relative; margin-left: 50px; padding: 10px 14px 10px; max-width: 580px;
	background: var(--card); border: 1px solid var(--line); border-radius: 18px; font-size: 15px;
}
.talk .comment-author .avatar { position: absolute; left: -50px; top: 0; border-radius: 12px; width: 38px; height: 38px; }
.talk .comment-author { font-weight: 800; font-size: 14.5px; }
.talk .comment-author .says { display: none; }
.talk .comment-author a { color: var(--text); }
.talk .comment-metadata { font-size: 12px; }
.talk .comment-metadata a { color: var(--muted); }
.talk .comment-content p { margin: 4px 0 0; }
.talk .reply { font-size: 13.5px; font-weight: 700; margin-top: 6px; }
.talk .reply a { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; }
.comment-respond { padding: 14px 16px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.comment-reply-title { font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.comment-reply-title small { margin-left: 8px; font-size: 13px; font-weight: 500; }
.comment-form p { margin-bottom: 10px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--text); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { margin: 0; }
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
	border: 0; border-radius: 12px; background: var(--ink); color: var(--lime); font-weight: 800; cursor: pointer;
}
[data-theme="dark"] .btn { background: var(--lime); color: var(--ink); }
.btn:hover { color: var(--lime); }
[data-theme="dark"] .btn:hover { color: var(--ink); }

.search-form { position: relative; display: flex; margin-top: 12px; }
.search-form__input { width: 100%; height: 46px; padding: 0 54px 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); outline: none; }
.search-form__input:focus { border-color: var(--text); }
.search-form__btn { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--lime); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.search-form__btn .icon { width: 18px; height: 18px; }

/* ---------- Меню ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s ease; }
.drawer.is-open { opacity: 1; }
.drawer__panel {
	position: absolute; inset: 0 auto 0 0; width: min(320px, 86vw); overflow-y: auto;
	background: var(--side); color: var(--side-text); padding: 16px 10px 24px;
	transform: translateX(-100%); transition: transform .22s ease;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer .logo__link { color: var(--side-text); }
.drawer .icon-btn { color: var(--side-muted); }
.drawer .icon-btn:hover { background: var(--side-hover); color: var(--side-text); }
.drawer__top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 0 12px; margin-bottom: 14px; }
.drawer__label { margin: 18px 12px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--side-muted); }
.drawer__item {
	display: flex; align-items: center; gap: 14px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px;
	background: none; color: var(--side-text); font-size: 15.5px; font-weight: 600; text-align: left; cursor: pointer;
}
.drawer__item:hover { background: var(--side-hover); color: var(--side-text); }
.drawer__item .icon { color: var(--lime); }
.drawer__menu { list-style: none; margin: 0; padding: 0; }
.drawer__menu a { display: block; padding: 11px 12px; border-radius: 12px; color: var(--side-text); font-size: 15.5px; }
.drawer__menu a:hover { background: var(--side-hover); }
.drawer__socials { display: flex; gap: 6px; padding: 14px 8px 0; }

.logo { margin: 0; line-height: 1; }
.logo__link { display: inline-flex; align-items: center; font-weight: 900; font-size: 24px; letter-spacing: -.05em; color: var(--text); }
.logo__zhas { margin-right: 1px; }
.logo__hub {
	display: inline-block; padding: 2px 7px 4px 5px; border-radius: 6px; background: var(--lime); color: var(--ink);
	transform: rotate(-4deg); transform-origin: 30% 60%; animation: zhas-hub 7s ease-in-out 1.5s infinite;
}
@keyframes zhas-hub {
	0%, 82%, 100% { transform: rotate(-4deg); }
	86% { transform: rotate(5deg) scale(1.06); }
	90% { transform: rotate(-7deg); }
	94% { transform: rotate(2deg); }
}
.logo .custom-logo-link img { max-height: 34px; width: auto; }

/* ---------- Уведомление ---------- */
.toast {
	position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 200;
	padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--lime); font-size: 14.5px; font-weight: 700;
	transform: translate(-50%, 16px); opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Телефон: либо список, либо канал ---------- */
.head__theme { display: none; }
@media (max-width: 899px) {
	:root { --side-w: 100%; }
	.is-pane .side { display: none; }
	.is-list .pane { display: none; }
	.head__back, .head__theme { display: inline-grid; }
	.head { padding-left: 12px; height: 58px; }
	.pinned { margin: 8px 12px 0; }
	.feed__list { padding: 12px 12px 16px; gap: 12px; }
	.bubble__title { font-size: 18px; }
	.msg__share { width: 34px; height: 34px; border-radius: 11px; }
}
@media (min-width: 1200px) { :root { --side-w: 392px; } }

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

@media print {
	body { overflow: visible; }
	.side, .head, .pinned, .bar, .msg__share, .bubble__foot, .talk, .drawer { display: none !important; }
	.app, .pane, .feed { display: block; height: auto; overflow: visible; background: none; }
	.bubble { border: 0; }
}

/* Правки: ссылка «читать полностью» в тёмной теме, закреп по ширине ленты */
[data-theme="dark"] .bubble__more { color: var(--lime); background: none; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
[data-theme="dark"] .bubble__more:hover { background: var(--lime); color: var(--ink); text-decoration: none; }
.pinned { align-self: center; width: calc(100% - 40px); max-width: 680px; margin-inline: 0; }
@media (max-width: 899px) { .pinned { width: calc(100% - 24px); } }
