/* ═══════════════════════════════════════════════════════════════
   MangaNew — новий шаблон xoarinternational.com. Етап 1: головна сторінка.
   Тема: data-theme="dark" (за замовчуванням) | "light" на <html>.
═══════════════════════════════════════════════════════════════ */
/* ═══ Шрифти — з нашого сервера (раніше Google Fonts: окремий домен і блокуючий CSS). Змінні woff2: Golos Text 400–700, Rubik 500–800;
   набори: кирилиця (з Ґ ґ), латиниця, розширена латиниця — браузер вантажить лише потрібні за unicode-range ═══ */
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/golos-text-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/golos-text-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/golos-text-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(../fonts/rubik-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(../fonts/rubik-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 500 800; font-display: swap; src: url(../fonts/rubik-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --accent: #25aae1;
  --accent-ink: #fff;
  --accent-soft: rgba(37, 170, 225, .14);
  --hot: #f5ce62;
  --hot-ink: #1a1205;
  --danger: #e5484d;
  --danger-ink: #ff7b80;              /* червоний текст (видалити, виключити) */
  --danger-soft: rgba(229, 72, 77, .16);
  --ok: #3fb37f;                      /* успіх, «Триває», прочитано */
  --ok-soft: rgba(63, 179, 127, .16);
  --warn: #f5a524;                    /* очікує, увага */
  --warn-soft: rgba(245, 165, 36, .16);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-btn: 8px;               /* кнопки, вкладки, перемикачі — як на головній */
  --btn-shadow: 3px 3px 0 var(--accent); /* тінь-зсув активної вкладки */
  --wrap: 1320px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Rubik", "Golos Text", system-ui, sans-serif;
  /* Кольори списків користувача — ті самі, що в меню списків на сторінці тайтлу */
  --l-reading: #3fb37f;
  --l-readed: #25aae1;
  --l-planned: #f5a524;
  --l-reread: #8b7bff;
  --l-postponed: #9aa3b2;
  --l-abandoned: #e5484d;
  --l-favorite: #ff5c9a;
}
:root, [data-theme="dark"] {
  --bg: #0e1014;
  --surface: #161920;
  --surface-2: #1f232c;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --frame: #d4d0c4;
  --frame-soft: #6c7280;
  --frame-shade: rgba(212, 208, 196, .1);
  --text: #e3e5ea;
  --muted: #9aa3b2;
  --header: rgba(14, 16, 20, .86);
  --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
[data-theme="light"] {
  --ok: #23905f; --warn: #b8740a; --danger-ink: #d23b40;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --line: rgba(15, 23, 42, .10);
  --line-strong: rgba(15, 23, 42, .18);
  --frame: #14161b;
  --frame-soft: #3b4250;
  --frame-shade: #14161b;
  --text: #1b2230;
  --muted: #5b6576;
  --header: rgba(255, 255, 255, .9);
  --shadow: 0 10px 30px rgba(15, 23, 42, .12);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ico { width: 18px; height: 18px; flex: none; }

/* ── Кнопки ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: var(--radius-btn); background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { color: var(--text); filter: brightness(1.08); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { color: var(--accent-ink); }
.btn--block { width: 100%; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--radius-btn); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer; }
.icon-btn:hover { color: var(--accent); }
.dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--hot); color: var(--hot-ink); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

/* ── Смуга попереднього перегляду ── */
.preview-bar { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: 13px; }
.preview-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.preview-bar a { color: var(--accent); font-weight: 600; }

/* ── Шапка: чорнильна лінія знизу, активний пункт — скошена плашка, як заголовки секцій ── */
.header { position: sticky; top: 0; z-index: 50; background: var(--header); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 2px 0 var(--frame-soft); }
/* Шапка завжди темна — і у світлій темі: ті самі змінні, що в темній, лише в межах шапки (разом із її меню) */
[data-theme="light"] .header {
  --bg: #0e1014;
  --surface: #161920;
  --surface-2: #1f232c;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e3e5ea;
  --muted: #9aa3b2;
  --header: rgba(14, 16, 20, .95);
  --frame: #d4d0c4;
  --frame-soft: #14161b;
  --frame-shade: rgba(0, 0, 0, .25);
  --shadow: 0 10px 30px rgba(15, 23, 42, .3);
  color: var(--text);
  color-scheme: dark;
}
[data-theme="light"] .header .bell__menu, [data-theme="light"] .header .user__menu { border-color: #2a2f3a; }
.header__in { position: relative; display: flex; align-items: center; gap: 22px; height: 68px; }
.logo { flex: none; font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -.02em; white-space: nowrap; color: var(--text); }
.logo:hover { color: var(--text); }
.logo picture, .logo img { display: block; }
.logo img { height: 40px; width: auto; }
.logo--footer img { height: 32px; opacity: .9; }
@media (max-width: 760px) { .logo img { height: 36px; } }
.nav { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; }
.nav a { position: relative; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 4px; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a:hover::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--accent); }
.nav a.is-active { background: var(--frame); color: var(--bg); transform: skewX(-6deg); box-shadow: 3px 3px 0 var(--accent); }
.nav a.is-active::after { display: none; }
.nav__count { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 1px 6px; }
.header__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
.search { position: relative; flex: 0 1 360px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 6px; border: 2px solid var(--line-strong); background: transparent; color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--frame); box-shadow: 3px 3px 0 var(--accent); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); opacity: .6; }
.search__key { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 5px; font: 600 12px var(--font); color: var(--muted); }
.search:focus-within .search__key { display: none; }
.search.is-busy > .ico { animation: qs-pulse .8s ease-in-out infinite alternate; }
@keyframes qs-pulse { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .search.is-busy > .ico { animation: none; } }

/* Швидкий пошук: випадайка під полем */
.qs { position: absolute; left: -2px; right: -2px; top: calc(100% + 8px); min-width: 340px; max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border-radius: 10px; background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 6px 6px 0 var(--frame-shade), var(--shadow); z-index: 60; }
.qs__item { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 8px; color: var(--text); }
.qs__item:hover, .qs__item.is-active { background: var(--surface-2); color: var(--text); }
.qs__item.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.qs__cover { position: relative; flex: none; width: 40px; height: 56px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.qs__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qs__adult { position: absolute; left: 0; right: 0; bottom: 0; background: var(--danger); color: #fff; font-size: 9px; font-weight: 800; text-align: center; line-height: 13px; }
.qs__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.qs__name { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qs__alt { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs__meta { font-size: 12px; color: var(--muted); }
.qs mark { background: none; color: var(--accent); }
.qs__rate { flex: none; font-size: 12px; font-weight: 700; }
.qs__rate::before { content: "★ "; color: var(--hot); }
.qs__note { margin: 4px 8px 6px; font-size: 12px; color: var(--muted); }
.qs__empty { margin: 10px 10px 8px; font-size: 13px; color: var(--muted); }
.qs__all { display: block; width: 100%; margin-top: 4px; min-height: 38px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.qs__all:hover { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 760px) {
  .search__key { display: none; }
  .qs { position: fixed; left: 12px; right: 12px; top: 64px; min-width: 0; max-height: calc(100vh - 80px); }
}
.burger { display: none; }
.header .icon-btn { border-radius: 6px; border: 2px solid transparent; background: transparent; color: var(--muted); }
.header .icon-btn:hover, .header .icon-btn[aria-expanded="true"] { border-color: var(--line-strong); color: var(--text); }

/* ── Сповіщення ── */
.bell { position: relative; }
.bell .dot { top: 4px; right: 3px; }
.bell__menu { position: absolute; right: -52px; top: calc(100% + 10px); width: min(380px, calc(100vw - 24px)); border-radius: 10px; background: var(--surface); border: 2px solid var(--frame-soft); box-shadow: 6px 6px 0 var(--frame-shade); overflow: hidden; z-index: 60; }
.bell__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell__head b { font-family: var(--font-head); font-size: 16px; }
.bell__link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bell__list { list-style: none; margin: 0; padding: 4px 0; max-height: min(60vh, 440px); overflow-y: auto; }
.bell__item { position: relative; display: flex; gap: 10px; padding: 10px 14px; }
.bell__item + .bell__item { border-top: 1px solid var(--line); }
.bell__item.is-new { background: var(--accent-soft); }
.bell__item.is-new::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.bell__ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.bell__ico img { width: 100%; height: 100%; object-fit: cover; }
.bell__ico:empty::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.bell__ico--update { color: var(--accent); --m: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5V5a2 2 0 0 1 2-2h14v15H6a2 2 0 0 0-2 2zM20 18v3H6'/%3E%3C/svg%3E"); }
.bell__ico--comment { color: var(--ok); --m: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }
.bell__ico--heart { color: var(--l-favorite); --m: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 21s-8-5-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 6-8 11-8 11z'/%3E%3C/svg%3E"); }
.bell__body { min-width: 0; flex: 1; }
.bell__text { margin: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.bell__text a { color: var(--accent); font-weight: 600; }
.bell__date { font-size: 12px; color: var(--muted); }
/* Сповіщення: обкладинка-постер, мітка «Новий розділ N», назва, переклад; уся картка клікабельна */
.bell__item { align-items: flex-start; transition: background .15s ease; }
.bell__item.is-link { cursor: pointer; }
.bell__item.is-link:hover { background: var(--surface-2); }
.bell__item.is-new.is-link:hover { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.bell__ico--cover { width: 42px; height: 58px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line), 0 4px 10px -6px rgba(0, 0, 0, .5); }
.bell__body { display: flex; flex-direction: column; gap: 3px; }
.bell__kick { display: inline-block; margin-bottom: 3px; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 11.5px; font-weight: 700; line-height: 18px; }
.bell__text .bell__kick + .bell__title { display: block; }
.bell__text a.bell__title { color: var(--text); font-family: var(--font-head); font-size: 14px; font-weight: 700; line-height: 1.3; }
.bell__text a.bell__title:hover { color: var(--accent); }
.bell__subj { display: block; margin-bottom: 2px; font-family: var(--font-head); font-size: 14px; line-height: 1.3; }
.bell__sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.bell__del { flex: none; align-self: flex-start; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; opacity: 0; }
.bell__item:hover .bell__del, .bell__del:focus-visible { opacity: 1; }
.bell__del:hover { background: var(--surface-2); color: var(--danger); }
/* «✓ Позначити прочитаним» — лише в непрочитаних, видно завжди */
.bell__read { flex: none; align-self: flex-start; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--accent); font-size: 15px; line-height: 1; cursor: pointer; }
.bell__read:hover, .bell__read:focus-visible { background: var(--surface-2); }
.bell__empty { padding: 22px 16px; font-size: 13px; color: var(--muted); text-align: center; }
.bell__foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.bell__foot a { color: var(--accent); }
@media (hover: none) { .bell__del { opacity: 1; } }

/* ── Меню користувача ── */
.user { position: relative; }
.user__btn { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 4px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--surface-2); cursor: pointer; }
.user__ava { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.user__menu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; padding: 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
.user.is-open .user__menu { display: block; }
.user__menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.user__menu a:hover { background: var(--surface-2); color: var(--text); }
.user__menu hr { border: 0; height: 1px; margin: 6px 4px; background: var(--line); }
.user__name { padding: 6px 10px 8px; font-weight: 700; }
.login-form { display: flex; flex-direction: column; gap: 10px; padding: 8px; }
.login-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login-form input[type="text"], .login-form input[type="password"] { height: 42px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.login-form__links { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.login-form__links a { color: var(--accent); }
.user__menu .login-form__links a { padding: 0; display: inline; }

/* ── Головна: манґа-мова сторінки тайтлу — чорнильні рамки, жорстка тінь, скринтон, скошені плашки ── */
.main { padding: 28px 0 56px; overflow-x: clip; }
.stack { display: flex; flex-direction: column; gap: 44px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-title, .panel__title { display: inline-block; margin: 0; padding: 6px 14px; border-radius: 4px; background: var(--frame); color: var(--bg); font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.3; transform: skewX(-6deg); box-shadow: 4px 4px 0 var(--accent); }
.panel__title { font-size: 15px; padding: 5px 12px; box-shadow: 3px 3px 0 var(--accent); margin-bottom: 18px; }
.sec-link { font-size: 14px; font-weight: 600; color: var(--accent); }

/* ── Популярне: обкладинки в рамці + великий контурний номер місця ── */
.slider { position: relative; isolation: isolate; }
.slider::before { content: ""; position: absolute; z-index: -1; inset: -28px -24px -8px 35%; background: radial-gradient(circle, rgba(127, 127, 127, .22) 1.2px, transparent 1.6px) 0 0 / 9px 9px; -webkit-mask-image: radial-gradient(ellipse at 80% 30%, #000 10%, transparent 68%); mask-image: radial-gradient(ellipse at 80% 30%, #000 10%, transparent 68%); pointer-events: none; }
.slider__ctrl { display: flex; align-items: center; gap: 8px; }
.slider__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-btn); border: 2px solid var(--frame); background: var(--bg); color: var(--text); cursor: pointer; }
.slider__btn:hover { background: var(--frame); color: var(--bg); }
.slider__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 22px) / 6); gap: 22px; padding: 4px 10px 14px 2px; margin: -4px 0 -14px -2px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; counter-reset: slide; }
.slider__track::-webkit-scrollbar { display: none; }
.slide { counter-increment: slide; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--text); }
.slide:hover { color: var(--text); }
.slide__cover { position: relative; display: block; aspect-ratio: 2 / 3; border: 3px solid var(--frame); border-radius: 6px; overflow: hidden; background: var(--surface-2); box-shadow: 6px 6px 0 var(--frame-shade); transition: transform .15s ease, box-shadow .15s ease; }
.slide:hover .slide__cover, .slide:focus-visible .slide__cover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--accent); }
.slide__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__rate, .slide__chap { position: absolute; padding: 2px 7px; border-radius: 4px; font-size: 12px; font-weight: 700; line-height: 18px; }
.slide__rate { right: 6px; top: 6px; background: var(--hot); color: var(--hot-ink); }
.slide__rate::before { content: "★ "; }
.slide__chap { left: 6px; bottom: 6px; background: var(--frame); color: var(--bg); }
.slide__cap { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.slide__rank { flex: none; margin-top: -3px; font-family: var(--font-head); font-size: 44px; font-weight: 800; line-height: .9; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.6px var(--frame-soft); font-variant-numeric: tabular-nums; }
.slide__rank::before { content: counter(slide); }
.slide:nth-child(-n+3) .slide__rank { color: var(--hot); -webkit-text-stroke-color: var(--hot); }
.slide__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.slide__title { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide__type { font-size: 12px; color: var(--muted); }
.slider__dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.slider__dot { width: 9px; height: 9px; padding: 0; border: 2px solid var(--frame); border-radius: 2px; transform: rotate(45deg); background: transparent; cursor: pointer; transition: background .15s; }
.slider__dot.is-active { background: var(--accent); border-color: var(--accent); }

/* ── Дві колонки ── */
.cols { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.cols__main { flex: 999 1 640px; min-width: 0; }
.cols__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.panel { padding: 0; }

/* ── Вкладки типів ── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; padding: 0; list-style: none; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px; border-radius: var(--radius-btn); border: 2px solid var(--line-strong); font-size: 14px; font-weight: 600; color: var(--text); }
.tabs a:hover { border-color: var(--frame); color: var(--text); }
.tabs a.is-active { border-color: var(--frame); background: var(--frame); color: var(--bg); box-shadow: var(--btn-shadow); }
.tabs small { font-size: 12px; font-weight: 500; opacity: .65; }

/* ── Стрічка «Нові розділи»: сітка постерів — назва й останній розділ під обкладинкою ── */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 24px 18px; }
.feed > :not(.card):not(.day):not(.ci) { grid-column: 1 / -1; }
.feed--page:not(:has(> .card, > .ci)) { display: block; }   /* сторінки без карток — звичайний потік */
.day { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 10px 0 -6px; font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.day::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.feed > .day:first-child { margin-top: 0; }

.card { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card__cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--frame-soft); transition: transform var(--t, .38s) var(--ease, ease), box-shadow var(--t, .38s) var(--ease, ease), border-color var(--t-fast, .22s) ease; }
.card:hover .card__cover { transform: translate(-2px, -2px); border-color: var(--frame); box-shadow: 5px 5px 0 var(--accent); }
.card__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow, .7s) var(--ease, ease); }
.card:hover .card__cover img { transform: scale(1.05); }
.badge { position: absolute; z-index: 1; font-size: 11px; font-weight: 800; color: #fff; border-radius: 4px; padding: 1px 5px; }
.badge--adult { left: 6px; top: 6px; background: var(--danger); transform: rotate(-4deg); }
.card__rate { position: absolute; right: 6px; top: 6px; z-index: 1; padding: 1px 7px; border-radius: 4px; background: var(--hot); color: var(--hot-ink); font-size: 12px; font-weight: 800; }
.card__rate::before { content: "★ "; }
.card__type { position: absolute; left: 6px; bottom: 6px; z-index: 1; padding: 1px 7px; border-radius: 4px; background: rgba(12, 14, 18, .82); color: #e3e5ea; font-size: 11px; font-weight: 700; }
.card__type:empty { display: none; }
.card.in-list .card__type { bottom: 30px; }
.card__title { margin: 2px 0 0; min-height: calc(1.3em * 2); font-size: 14px; font-weight: 700; line-height: 1.3; }   /* два рядки під назву — кнопки розділів в одну лінію */
.card__title a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__title a:hover { color: var(--accent); }
.card__chap { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; padding: 0 10px; border-radius: 7px; background: var(--surface); color: var(--text); font-size: 13px; transition: background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.card__chap:hover { background: var(--accent); color: var(--accent-ink); }
.card__chap-name { min-width: 0; font-family: var(--font-head); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__time { flex: none; font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; }

/* Статус у списках користувача: смуга внизу обкладинки картки, ярлик угорі ліворуч на слайді */
.ulist { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 4px; background: var(--l, var(--accent)); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.slide__cover .ulist { right: auto; bottom: auto; left: 6px; top: 6px; padding: 2px 8px; border-radius: 4px; font-size: 12px; line-height: 18px; box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }
.ulist--reading { --l: var(--l-reading); }
.ulist--readed { --l: var(--l-readed); }
.ulist--planned { --l: var(--l-planned); color: #1a1205; text-shadow: none; }
.ulist--reread { --l: var(--l-reread); }
.ulist--postponed { --l: var(--l-postponed); color: #14161b; text-shadow: none; }
.ulist--abandoned { --l: var(--l-abandoned); }
.ulist--favorite { --l: var(--l-favorite); }
.progress { height: 4px; margin-top: 2px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 760px) { .feed { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 12px; } .card__chap { padding: 0 8px; font-size: 12px; } .card__time { display: none; } }

/* ── Сторінки (navigation.tpl) ── */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pager a, .pager span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.pager span { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pager .pager__gap { background: transparent; border: 0; color: var(--muted); }

/* ── Бічна колонка ── */
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.panel__head .panel__title { margin-bottom: 0; }
.panel__link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.panel__link:hover { color: var(--accent); }

/* Продовжити читання (історія з браузера) */
.continue__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.continue__item { position: relative; }
.continue__link { display: flex; align-items: center; gap: 12px; padding: 8px 36px 8px 8px; border-radius: 8px; background: var(--surface); color: var(--text); }
.continue__link:hover { color: var(--text); background: var(--surface-2); }
.continue__cover { flex: none; width: 42px; height: 58px; border-radius: 4px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--frame-soft); }
.continue__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.continue__text { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; flex: 1; }
.continue__name { grid-column: 1 / -1; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.continue__ch { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: var(--accent); }
.continue__when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.continue__del { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.continue__del:hover { background: var(--bg); color: var(--danger); }

/* Топ місяця: №1 — велика картка, далі список із контурними номерами */
.top { list-style: none; margin: 0; padding: 0; counter-reset: top; display: flex; flex-direction: column; gap: 4px; }
.top li { counter-increment: top; }
.top a { display: flex; align-items: center; gap: 12px; padding: 6px 0; color: var(--text); }
.top a::before { content: counter(top); flex: none; width: 30px; text-align: center; font-family: var(--font-head); font-weight: 800; font-size: 30px; line-height: 1; color: transparent; -webkit-text-stroke: 1.3px var(--frame-soft); }
.top li:nth-child(-n+3) a::before { color: var(--hot); -webkit-text-stroke-color: var(--hot); }
.top a:hover .top__name { color: var(--accent); }
.top__cover { flex: none; width: 40px; height: 56px; border: 2px solid var(--frame-soft); border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.top__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.top__text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.top__name { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__meta { display: block; font-size: 12px; color: var(--muted); }
.top__rate { display: none; font-size: 12px; font-weight: 700; }
.top__rate::before { content: "★ "; color: var(--hot); }

/* Обговорюють зараз: про що говорять → цитата → хто й коли. Уся картка веде в обговорення тайтлу */
.talk { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.talk__item { position: relative; display: flex; flex-direction: column; gap: 7px; padding: 11px 13px 11px 14px; border-radius: 8px; background: var(--surface); transition: background .15s; }
.talk__item:hover { background: var(--surface-2); }
.talk__news { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk__news::after { content: ""; position: absolute; inset: 0; border-radius: 8px; }
.talk__news:hover { color: var(--accent); }
.talk__news:focus-visible { outline: 0; }
.talk__news:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.talk__text { margin: 0; padding-left: 10px; border-left: 2px solid var(--line-strong); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.talk__item:hover .talk__text { border-left-color: var(--accent); }
.talk__text--spoiler { color: var(--muted); font-style: italic; }
.talk__by { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; color: var(--muted); }
.talk__ava { flex: none; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.talk__name { min-width: 0; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talk__name a { color: inherit; position: relative; z-index: 1; }
.talk__date { flex: none; margin-left: auto; font-size: 11px; }

/* ── Повідомлення DLE (info.tpl) ── */
.notice { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 0; }
.notice__title { margin: 0 0 4px; font-weight: 700; }

/* ── Футер ── */
.footer { position: relative; margin-top: 24px; background: var(--surface); box-shadow: 0 -2px 0 var(--frame-soft); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; padding-top: 40px; padding-bottom: 36px; }
.footer__about { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer__about p { margin: 0; max-width: 44ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer__top { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border: 2px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.footer__top svg { width: 16px; height: 16px; transition: transform var(--t, .38s) var(--ease, ease); }
.footer__top:hover { border-color: var(--accent); color: var(--accent); }
.footer__top:hover svg { transform: translateY(-2px); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.footer__col h2 { margin: 0 0 4px; font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text); }
.footer a { color: var(--muted); font-size: 14px; }
.footer__col a { position: relative; transition: color var(--t-fast, .22s) ease, transform var(--t, .38s) var(--ease, ease); }
.footer__col a:hover { color: var(--accent); transform: translateX(3px); }
.footer__bottom { border-top: 1px solid var(--line); }
.footer__bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 18px; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer__about { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; padding-top: 30px; } }

/* ── Адаптивність ── */
@media (max-width: 1100px) {
  .slider__track { grid-auto-columns: calc((100% - 3 * 22px) / 4); }
  .burger { display: grid; }
  .nav { display: none; }
  .nav a.is-active { transform: none; box-shadow: none; }
  .nav.is-open { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; padding: 10px 14px 14px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
}
@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .header__in { gap: 10px; height: 60px; }
  .logo { font-size: 16px; }
  .search { flex: 1 1 auto; }
  .header__tools { gap: 4px; }
  .header .icon-btn { width: 40px; height: 40px; }
  .bell__menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .slider__track { grid-auto-columns: calc((100% - 14px) / 2); gap: 14px; }
  .slide__rank { font-size: 36px; }
  .cols { gap: 32px; }
  .sec-title { font-size: 17px; }
}

/* ═══ Звичайні сторінки: статичні, пошук, форми ═══ */
.page { max-width: 860px; margin: 0 auto; }
.page--wide { max-width: none; }
.page__head { margin-bottom: 20px; }
.page__title { margin: 0; font-family: var(--font-head); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.page__lead { margin: 6px 0 0; color: var(--muted); }
.box { padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.prose { line-height: 1.7; }
.prose h2, .prose h3 { font-family: var(--font-head); line-height: 1.3; margin: 1.6em 0 .6em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose img { height: auto; border-radius: 10px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-radius: 10px; background: var(--surface-2); }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label { font-size: 14px; font-weight: 600; }
.field__hint { font-size: 12px; color: var(--muted); }
.field__row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.field__row > input { flex: 1 1 200px; }
.input, .form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="search"], .form select, .form textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit;
}
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--accent); }
.form input[type="file"] { font-size: 14px; color: var(--muted); }
.form__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.captcha { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.captcha img { border-radius: 8px; }

/* Результати пошуку DLE (таблиця параметрів і список) */
.search-box #searchtable { width: 100%; }
.search-box table { width: 100%; border-collapse: collapse; }
.search-box td { padding: 6px 4px; vertical-align: top; }
.search-box input[type="text"], .search-box select { min-height: 40px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.search-msg { margin: 0 0 16px; color: var(--muted); }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.results > :not(.card):not(.result-comment) { grid-column: 1 / -1; }
.result-comment { grid-column: 1 / -1; display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 860px) { .results { grid-template-columns: minmax(0, 1fr); } }

/* ═══ Рух: одна крива й тривалість на весь шаблон. Наведення — плавно, без різких стрибків ═══ */
:root { --ease: cubic-bezier(.22, .8, .24, 1); --t-fast: .22s; --t: .38s; --t-slow: .7s; }

a, .btn, .icon-btn, .tabs a, .nav a, .chap, .slider__btn, .panel__link, .sec-link, .qs__item, .bell__item, .bell__del, .continue__del, .qs__all, .mgr-pick, .mgr-quick__btn {
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t) var(--ease), filter var(--t-fast) ease, opacity var(--t-fast) ease;
}

/* Обкладинки слайдера: підйом із тінню, картинка трохи наближається */
.slide__cover { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.slide__cover img { transition: transform var(--t-slow) var(--ease); }
.slide:hover .slide__cover img, .slide:focus-visible .slide__cover img { transform: scale(1.06); }
.slide__title { transition: color var(--t-fast) ease; }
.slide:hover .slide__title { color: var(--accent); }
.slide__rank { transition: transform var(--t) var(--ease); }
.slide:hover .slide__rank { transform: translateY(-3px) rotate(-4deg); }

/* Картки стрічки */
.card { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.card__cover img { transition: transform var(--t-slow) var(--ease); }
.card:hover .card__cover img { transform: scale(1.06); }
.chap .chap__ico { transition: transform var(--t) var(--ease); }
.chap:hover .chap__ico { transform: translateX(2px) scale(1.15); }

/* Бічна колонка */
.continue__link, .talk__item { transition: background-color var(--t) ease, transform var(--t) var(--ease); }
.continue__link:hover, .talk__item:hover { transform: translateX(3px); }
.talk__text { transition: border-color var(--t) ease; }
.top a::before, .top__cover { transition: transform var(--t) var(--ease), color var(--t-fast) ease; }
.top a:hover::before { transform: scale(1.12) rotate(-6deg); }
.top a:hover .top__cover { transform: rotate(-2deg); }

/* Кнопки шапки */
.icon-btn .ico { transition: transform var(--t) var(--ease); }
.icon-btn:hover .ico { transform: scale(1.12); }
.slider__btn:active, .icon-btn:active, .chap:active { transform: scale(.94); }

/* Випадайки: плавна поява */
.qs:not([hidden]), .bell__menu:not([hidden]), .user.is-open .user__menu { animation: pop-in var(--t) var(--ease) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* Крапки слайдера: активна — смужка, що заповнюється до наступного гортання */
.slider__dots { align-items: center; min-height: 14px; }
.slider__dot { position: relative; overflow: hidden; flex: none; transition: width var(--t) var(--ease), border-radius var(--t) var(--ease), transform var(--t) var(--ease), background-color var(--t-fast) ease, border-color var(--t-fast) ease; }
.slider__dot:not(.is-active):hover { transform: rotate(45deg) scale(1.25); border-color: var(--accent); }
/* Активна: ромбик розгортається в смужку, що заповнюється до наступного гортання */
.slider__dot.is-active { width: 34px; border-radius: 3px; transform: none; background: transparent; border-color: var(--accent); }
.slider__dot.is-active::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left center; transform: scaleX(var(--auto, 1)); }
.slider.is-paused .slider__dot.is-active::after { opacity: .5; }

/* «Зменшити рух» у системі: лишаються плавні кольори й появи, без зсувів і наближень */
@media (prefers-reduced-motion: reduce) {
  .slide:hover .slide__cover, .slide:focus-visible .slide__cover, .card:hover, .continue__link:hover, .talk__item:hover { transform: none; }
  .slide:hover .slide__cover img, .card:hover .card__cover img, .slide:hover .slide__rank, .top a:hover::before, .top a:hover .top__cover, .icon-btn:hover .ico, .chap:hover .chap__ico { transform: none; }
  .icon-btn--random:hover .ico { transform: none; }
  @keyframes pop-in { from { opacity: 0; } to { opacity: 1; } }
}
.card__cover { overflow: hidden; }

/* ═══ Сторінка «Нові розділи» (/chapters/, chapters-short.tpl) ═══ */
.page-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 26px; padding: 6px 0 4px; }
.page-hero::before { content: ""; position: absolute; z-index: -1; inset: -28px -24px -10px 40%; background: radial-gradient(circle, rgba(127, 127, 127, .22) 1.2px, transparent 1.6px) 0 0 / 9px 9px; -webkit-mask-image: radial-gradient(ellipse at 80% 40%, #000 10%, transparent 68%); mask-image: radial-gradient(ellipse at 80% 40%, #000 10%, transparent 68%); pointer-events: none; }
.page-hero .sec-title { font-size: 22px; }
.page-hero__lead { margin: 0; max-width: 60ch; color: var(--muted); }

.chfeed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.chfeed > :not(.ch):not(.day) { grid-column: 1 / -1; }
.chfeed > .day:first-child { margin-top: 0; }

.ch {
  --c-bg: #161920; --c-bg-2: #232733; --c-text: #e3e5ea; --c-muted: #969fae; --c-line: rgba(255, 255, 255, .07);
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-width: 0; padding: 8px 14px 8px 8px; border-radius: 10px; background: var(--c-bg); color: var(--c-text);
  box-shadow: inset 0 0 0 1px var(--c-line);
  transition: transform var(--t, .38s) var(--ease, ease), box-shadow var(--t, .38s) var(--ease, ease), opacity var(--t-fast, .22s) ease;
}
[data-theme="light"] .ch { box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.ch:hover { transform: translate(-2px, -2px); box-shadow: inset 0 0 0 1px var(--c-line), 4px 4px 0 var(--accent); }
.ch__cover { position: relative; display: block; width: 54px; height: 76px; border-radius: 6px; overflow: hidden; background: var(--c-bg-2); }
.ch__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--t-slow, .7s) var(--ease, ease); }
.ch:hover .ch__cover img { transform: scale(1.08); }
.ch__cover .ulist { font-size: 9px; padding: 2px; }
.ch__ph { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--c-muted); }

.ch__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch__title { position: relative; z-index: 1; align-self: flex-start; max-width: 100%; font-size: 13px; font-weight: 600; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__title:hover { color: var(--c-text); }
.ch__chap { display: flex; align-items: baseline; gap: 8px; min-width: 0; color: var(--c-text); }
.ch__chap::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }   /* уся панель веде на розділ */
.ch__chap:hover { color: var(--c-text); }
.ch__chap b { font-family: var(--font-head); font-size: 17px; font-weight: 700; white-space: nowrap; transition: color var(--t-fast, .22s) ease; }
.ch:hover .ch__chap b { color: var(--accent); }
.ch__tom { font-size: 12px; color: var(--c-muted); white-space: nowrap; }
.ch__read { margin-left: auto; padding: 1px 7px; border-radius: 4px; background: var(--ok-soft); color: #5fd39e; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ch__read::before { content: "✓ "; }
.ch__name { font-size: 13px; color: var(--c-text); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__team { font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__team a { position: relative; z-index: 1; color: inherit; }

.ch__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--c-muted); }
.ch__time { font-weight: 600; color: var(--c-text); font-variant-numeric: tabular-nums; }
.ch__stats { display: flex; align-items: center; gap: 10px; }
.ch__rate { font-weight: 700; color: var(--c-text); }
.ch__rate::before { content: "★ "; color: var(--hot); }
.ch__comm { display: inline-flex; align-items: center; gap: 4px; }
.ch__comm svg { width: 13px; height: 13px; }

.ch.is-read { --c-text: #9aa1ae; --c-muted: #6f7787; }
.ch.is-read .ch__cover img { filter: grayscale(.7) brightness(.8); transition: filter var(--t, .38s) ease, transform var(--t-slow, .7s) var(--ease, ease); }
.ch.is-read:hover .ch__cover img { filter: none; }
.ch.is-read .ch__chap b { font-weight: 600; }

@media (max-width: 860px) { .chfeed { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .ch { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding-right: 10px; }
  .ch__cover { width: 46px; height: 64px; }
  .ch__chap b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .ch:hover { transform: none; } .ch:hover .ch__cover img { transform: none; } }

/* Світла тема: футер і бічні блоки — темні, як шапка й картки */
[data-theme="light"] .footer,
[data-theme="light"] .continue__item,
[data-theme="light"] .talk__item {
  --bg: #0e1014;
  --surface: #161920;
  --surface-2: #1f232c;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e3e5ea;
  --muted: #9aa3b2;
  --frame: #d4d0c4;
  --frame-soft: #6c7280;
  --frame-shade: rgba(0, 0, 0, .3);
  color: var(--text);
}
[data-theme="light"] .footer { border-top: 0; box-shadow: 0 -2px 0 #14161b; }
[data-theme="light"] .continue__link, [data-theme="light"] .talk__item { box-shadow: 0 1px 2px rgba(15, 23, 42, .14); }

/* Пагінація: «…» і неактивні «← Новіші / Старіші →» не виглядають як поточна сторінка */
.pager > span.nav_ext { min-width: 24px; padding: 0 2px; background: transparent; border-color: transparent; color: var(--muted); }
.pager > span:first-child, .pager > span:last-child { background: transparent; border-color: var(--line); color: var(--muted); opacity: .55; cursor: default; }

/* Пошук на телефоні: за кнопкою-лупою, відкривається на всю ширину шапки */
.search-open, .search__close { display: none; }
.search__close { flex: none; place-items: center; width: 32px; height: 32px; margin-right: -6px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.search__close:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 760px) {
  .search-open { display: grid; }
  .header .search { display: none; }
  .header.is-searching .search { display: flex; position: absolute; left: 0; right: 0; top: 50%; z-index: 5; height: 44px; margin-top: -22px; background: var(--surface); border-color: var(--frame); box-shadow: 3px 3px 0 var(--accent); animation: search-in var(--t, .38s) var(--ease, ease) both; }
  .header.is-searching .search__close { display: grid; }
  .header .search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
  .header.is-searching .search-open { visibility: hidden; }
}
@keyframes search-in { from { opacity: 0; transform: scaleX(.92); transform-origin: right center; } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { @keyframes search-in { from { opacity: 0; } to { opacity: 1; } } }

/* ═══ Менше шуму: «чорнильна» тінь і яскрава рамка — лише на наведенні; скринтон — лише в шапці слайдера й сторінки ═══ */
.slide__cover { border: 2px solid var(--frame-soft); box-shadow: none; }
.slide:hover .slide__cover, .slide:focus-visible .slide__cover { border-color: var(--frame); box-shadow: 6px 6px 0 var(--accent); }
.tabs a.is-active { box-shadow: none; }
.search:focus-within { box-shadow: none; border-color: var(--accent); }
.sec-title, .panel__title { box-shadow: 3px 3px 0 var(--accent); }
.day::after { height: 1px; background: var(--line-strong); opacity: 1; }
.bell .dot { background: var(--danger); color: #fff; }
.sec-title--sm { font-size: 16px; padding: 5px 12px; }

/* ═══ Для вас: персональні стрічки над «Новими розділами» ═══ */
.foryou { display: flex; flex-direction: column; gap: 28px; margin-bottom: 36px; }
.foryou[hidden], .foryou:empty { display: none; }
.fy-block__head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fy-block__hint { margin: 0; font-size: 13px; color: var(--muted); }
.fy-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 6px 8px 2px; margin: -2px -6px -8px -2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.fy-strip::-webkit-scrollbar { display: none; }
.fy { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--text); }
.fy:hover { color: var(--text); }
.fy__cover { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--surface-2); border: 2px solid var(--frame-soft); transition: transform var(--t, .38s) var(--ease, ease), box-shadow var(--t, .38s) var(--ease, ease), border-color var(--t-fast, .22s) ease; }
.fy:hover .fy__cover { transform: translate(-2px, -2px); border-color: var(--frame); box-shadow: 4px 4px 0 var(--accent); }
.fy__cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fy__badge { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; text-align: center; }
.fy__badge--done { background: rgba(14, 16, 20, .78); color: #cfd3da; font-weight: 700; }
.fy__rate { position: absolute; right: 5px; top: 5px; padding: 1px 6px; border-radius: 4px; background: var(--hot); color: var(--hot-ink); font-size: 11px; font-weight: 800; }
.fy__rate::before { content: "★ "; }
.fy__name { font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color var(--t-fast, .22s) ease; }
.fy:hover .fy__name { color: var(--accent); }
.fy__meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .fy-strip { grid-auto-columns: 112px; gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .fy:hover .fy__cover { transform: none; } }

/* ═══ Обкладинки: відблиск, поки вантажаться, і плавна поява ═══ */
.js :is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover, .qs__cover):not(.is-ready) {
  background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .07) 50%, transparent 70%);
  background-size: 220% 100%; background-repeat: no-repeat; animation: cover-shine 1.3s ease-in-out infinite;
}
@keyframes cover-shine { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.js :is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover, .qs__cover) img { opacity: 0; transition: opacity .45s ease, transform var(--t-slow, .7s) var(--ease, ease), filter var(--t, .38s) ease; }
.js :is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover, .qs__cover) img.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .js :is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover, .qs__cover):not(.is-ready) { animation: none; } }

/* ═══ Нижня панель на телефоні ═══ */
.tabbar { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); padding: 4px 4px env(safe-area-inset-bottom); background: rgba(14, 16, 20, .96); box-shadow: 0 -2px 0 #14161b; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border-radius: 8px; color: #8e97a6; font-size: 11px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  .tabbar__item svg { width: 22px; height: 22px; transition: transform var(--t, .38s) var(--ease, ease); }
  .tabbar__item:hover { color: #e3e5ea; }
  .tabbar__item.is-active { color: var(--accent); }
  .tabbar__item.is-active svg { transform: translateY(-1px) scale(1.08); }
  .tabbar__item:active svg { transform: scale(.9); }
}

/* ═══ Налаштування вигляду (кнопка-палітра в шапці) ═══ */
.look { position: relative; }
.look__menu { position: absolute; right: -8px; top: calc(100% + 10px); z-index: 60; width: 300px; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 6px 6px 0 var(--frame-shade), var(--shadow); animation: pop-in var(--t, .38s) var(--ease, ease) both; }
.look__menu[hidden] { display: none; }
.look__title { font-family: var(--font-head); font-size: 16px; }
.look__row { display: flex; flex-direction: column; gap: 6px; }
.look__label { font-size: 12px; font-weight: 700; color: var(--muted); }
.look__seg { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: var(--surface-2); }
.look__seg button { flex: 1; min-height: 32px; padding: 0 6px; border: 0; border-radius: var(--radius-btn); background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.look__seg button:hover { background: var(--surface); }
.look__seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.look__swatches { display: flex; gap: 10px; }
.look__sw { width: 30px; height: 30px; padding: 0; border: 3px solid var(--surface); border-radius: 50%; background: var(--sw); box-shadow: 0 0 0 2px transparent; cursor: pointer; transition: transform var(--t, .38s) var(--ease, ease), box-shadow var(--t-fast, .22s) ease; }
.look__sw:hover { transform: scale(1.1); }
.look__sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--sw); }
.look__check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.look__check input { width: 17px; height: 17px; accent-color: var(--accent); }
.look__reset { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.look__reset:hover { color: var(--accent); }
@media (max-width: 760px) {
  .look__menu { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
}

/* «Не показувати»: жанри, які користувач прибрав (cookie mg_hide, фільтрує сервер) */
.look__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.look__tags label { cursor: pointer; }
.look__tags input { position: absolute; opacity: 0; pointer-events: none; }
.look__tags span { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border-radius: 7px; background: var(--surface-2); font-size: 13px; font-weight: 600; transition: background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.look__tags label:hover span { background: var(--line-strong); }
.look__tags input:checked + span { background: var(--danger-soft); color: var(--danger-ink); text-decoration: line-through; }
.look__tags input:checked + span::before { content: "✕"; text-decoration: none; }
.look__tags input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.look__note { font-size: 11px; color: var(--muted); line-height: 1.4; }
.look__tags.is-busy { opacity: .5; pointer-events: none; }

/* Мінімум анімацій */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
html[data-motion="off"] .slide:hover .slide__cover, html[data-motion="off"] .card:hover, html[data-motion="off"] .fy:hover .fy__cover, html[data-motion="off"] .ch:hover { transform: none; }

/* Коротке спливаюче повідомлення (підписка тощо) */
.flash { position: fixed; left: 50%; bottom: 24px; z-index: 90; max-width: calc(100vw - 24px); padding: 11px 18px; border-radius: 10px; background: #161920; color: #e3e5ea; font-size: 14px; font-weight: 600; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7); transform: translateX(-50%); animation: flash-in .35s cubic-bezier(.22, .8, .24, 1) both; transition: opacity .35s ease, transform .35s ease; }
.flash.is-out { opacity: 0; transform: translate(-50%, 10px); }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }
@media (max-width: 760px) { .flash { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Особисті повідомлення (pm/mgpm.css має власні змінні кольорів) — зі змінних шаблону, для обох тем.
   .apm-pop — спливне меню «⋯»: скрипт вставляє його в <body>, поза .apm, тож змінні оголошуємо й на ньому (інакше меню без фону) */
html .apm, html .apm-pop {
  --a: var(--accent); --a-dim: var(--accent-soft); --a-on: var(--accent-ink);
  --bg: inherit; --s1: var(--surface); --s2: var(--surface-2);
  --s3: color-mix(in srgb, var(--surface-2) 93%, var(--text)); --s4: color-mix(in srgb, var(--surface-2) 85%, var(--text));
  --b1: var(--line); --b2: var(--line-strong);
  --t1: var(--text); --t2: color-mix(in srgb, var(--text) 78%, var(--muted)); --t3: var(--muted);
  --c-rose: var(--danger); --c-green: var(--ok); --c-amber: var(--warn);
  --shadow-pop: var(--shadow);
}
html[data-theme="dark"] .apm, html[data-theme="dark"] .apm-pop { color-scheme: dark; }

/* ═══ Діалоги DLE (jQuery UI: скарги, попередження, колекції) — у стилі шаблону ═══ */
.ui-helper-hidden-accessible { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ui-widget-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .6); }
.ui-dialog { position: absolute; z-index: 101; max-width: calc(100vw - 24px); padding: 0; border-radius: 14px; background: var(--surface); color: var(--text); border: 2px solid var(--line-strong); box-shadow: 6px 6px 0 var(--frame-shade), 0 30px 60px -20px rgba(0, 0, 0, .7); font-family: var(--font); outline: 0; }
.ui-dialog-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); cursor: move; }
.ui-dialog-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.ui-dialog-titlebar-close { position: relative; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: 0; cursor: pointer; }
.ui-dialog-titlebar-close::before { content: "×"; font-size: 20px; line-height: 32px; }
.ui-dialog-titlebar-close .ui-icon, .ui-dialog-titlebar-close .ui-button-icon { display: none; }
.ui-dialog-content { padding: 16px; font-size: 14px; line-height: 1.5; overflow: auto; }
.ui-dialog-content textarea, .ui-dialog-content input[type="text"] { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; }
.ui-dialog-buttonpane { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.ui-dialog-buttonset { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.ui-dialog-buttonset .ui-button { min-height: 38px; padding: 0 16px; border: 0; border-radius: var(--radius-btn); background: var(--surface-2); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ui-dialog-buttonset .ui-button:first-child { background: var(--accent); color: var(--accent-ink); }
.ui-dialog-buttonset .ui-button:hover { filter: brightness(1.1); }
.ui-resizable-handle { display: none !important; }

/* ═══ Головна в одну колонку: продовжити читання, стрічка, а внизу — топ і обговорення ═══ */
.continue .sec-head { margin-bottom: 14px; }
.continue__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.home-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; padding-top: 8px; border-top: 1px solid var(--line); }
.home-bottom .sec-head { margin: 22px 0 16px; }
.top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
.talk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (max-width: 860px) {
  .home-bottom { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .top { grid-template-columns: minmax(0, 1fr); } }

/* «Нове у ваших списках» — компактні рядки замість великих обкладинок */
.fy-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.fy-row { display: flex; align-items: center; gap: 12px; padding: 7px 12px 7px 7px; border-radius: 9px; background: var(--surface); color: var(--text); transition: background-color var(--t-fast, .22s) ease; }
.fy-row:hover { background: var(--surface-2); color: var(--text); }
.fy-row__cover { flex: none; width: 38px; height: 54px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.fy-row__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fy-row__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.fy-row__name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fy-row__meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fy-row__badge { flex: none; padding: 2px 8px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; }
.fy-row__badge--done { background: var(--surface-2); color: var(--muted); }

/* ═══ «Обговорюють зараз» — горизонтальна стрічка карток-цитат ═══ */
.talks { padding-top: 6px; }
.talks__ctrl { display: flex; align-items: center; gap: 8px; }
.talks__ctrl .sec-link { margin-right: 6px; }
.talk--row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); grid-template-columns: none; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 8px 10px 2px; margin: -4px -8px -10px -2px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.talk--row::-webkit-scrollbar { display: none; }
.talk--row .talk__item { position: relative; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px; min-height: 196px; padding: 16px 16px 14px; border-radius: 14px; background: var(--surface); overflow: hidden; transition: transform var(--t, .38s) var(--ease, ease), box-shadow var(--t, .38s) var(--ease, ease), background-color var(--t-fast, .22s) ease; }
.talk--row .talk__item:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--accent); background: var(--surface); }
/* великі лапки кольору акценту */
.talk--row .talk__item::before { content: "“"; position: absolute; right: 12px; top: -14px; font-family: Georgia, "Times New Roman", serif; font-size: 110px; line-height: 1; color: var(--accent); opacity: .22; pointer-events: none; }
.talk--row .talk__news { position: relative; z-index: 1; align-self: flex-start; max-width: 100%; padding: 3px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk--row .talk__text { flex: 1; padding: 0; border: 0; font-size: 15px; line-height: 1.5; -webkit-line-clamp: 4; }
.talk--row .talk__item:hover .talk__text { border: 0; }
.talk--row .talk__by { padding-top: 10px; border-top: 1px solid var(--line); }
.talk--row .talk__ava { width: 26px; height: 26px; }
@media (max-width: 760px) { .talk--row { grid-auto-columns: 82%; } .talks__ctrl .slider__btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .talk--row .talk__item:hover { transform: none; } }

/* ═══ Компактний футер: логотип, посилання в рядок, «Нагору»; під ними — один рядок копірайту ═══ */
.footer { margin-top: 20px; }
.ft { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 28px; padding-top: 18px; padding-bottom: 16px; }
.ft .logo img { height: 28px; }
.ft__nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.ft__nav a { color: var(--muted); font-size: 13px; font-weight: 600; transition: color var(--t-fast, .22s) ease; }
.ft__nav a:hover { color: var(--accent); }
.ft__top { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 2px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; transition: border-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.ft__top svg { width: 16px; height: 16px; transition: transform var(--t, .38s) var(--ease, ease); }
.ft__top:hover { border-color: var(--accent); color: var(--accent); }
.ft__top:hover svg { transform: translateY(-2px); }
.ft__copy { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .ft { grid-template-columns: minmax(0, 1fr) auto; }
  .ft__nav { grid-column: 1 / -1; grid-row: 2; gap: 6px 16px; }
}

/* ═══ Картки на телефоні: три колонки (на зовсім вузьких — дві), дрібніші підписи ═══ */
@media (max-width: 760px) {
  .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
  .card { gap: 5px; }
  .card__cover { border-radius: 6px; border-width: 1.5px; }
  .card__title { font-size: 13px; }
  .card__chap { min-height: 28px; padding: 0 7px; border-radius: 6px; font-size: 12px; }
  .card__type { font-size: 10px; padding: 1px 5px; left: 4px; bottom: 4px; }
  .card__rate, .badge--adult { font-size: 10px; }
  .card__rate { right: 4px; top: 4px; padding: 1px 5px; }
  .badge--adult { left: 4px; top: 4px; }
  .card.in-list .card__type { bottom: 24px; }
  .ulist { font-size: 10px; padding: 3px 2px; }
  .day { font-size: 15px; margin-top: 6px; }
  .fy-strip { grid-auto-columns: calc((100% - 20px) / 3); gap: 10px; }
}
@media (max-width: 359px) {
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fy-strip { grid-auto-columns: calc((100% - 10px) / 2); }
}
/* Вкладки типів на телефоні — один рядок, гортається вбік */
@media (max-width: 760px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; min-height: 34px; padding: 0 12px; font-size: 13px; }
}

/* ═══ Стрічка: два вигляди. «Сітка» (типово) — постери; «Список» — горизонтальні панелі (.feed--list) ═══ */
.card__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.card__top, .card__meta, .card__foot { display: none; }

/* Перемикач вигляду біля заголовка */
.view-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface); }
.view-toggle button { display: grid; place-items: center; width: 34px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-btn); background: transparent; color: var(--muted); cursor: pointer; transition: background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.view-toggle button svg { width: 17px; height: 17px; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.news .sec-head__tools { display: flex; align-items: center; gap: 14px; }

/* «Список»: темна панель (і у світлій темі), обкладинка на всю висоту */
.feed--list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feed--list .card {
  --c-bg: #161920; --c-bg-2: #232733; --c-text: #e3e5ea; --c-muted: #969fae; --c-line: rgba(255, 255, 255, .07);
  display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 0; min-height: 156px;
  border-radius: 10px; overflow: hidden; background: var(--c-bg); color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line);
  transition: transform var(--t, .38s) var(--ease, ease), box-shadow var(--t, .38s) var(--ease, ease);
}
.feed--list .card:hover { transform: translate(-2px, -2px); box-shadow: inset 0 0 0 1px var(--c-line), 5px 5px 0 var(--accent); }
.feed--list .card__cover { aspect-ratio: auto; height: 100%; border: 0; border-radius: 0; background: var(--c-bg-2); }
.feed--list .card:hover .card__cover { transform: none; box-shadow: none; }
.feed--list .card__cover::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 18px; background: linear-gradient(90deg, transparent, var(--c-bg)); opacity: .6; pointer-events: none; }
.feed--list .card__rate, .feed--list .card__type { display: none; }
.feed--list .card__info { gap: 4px; padding: 12px 14px 12px 12px; }
.feed--list .card__top { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--c-muted); }
.feed--list .card__top-type:empty { display: none; }
.feed--list .card__top-rate { margin-left: auto; flex: none; font-weight: 700; color: var(--c-text); }
.feed--list .card__top-rate::before { content: "★ "; color: var(--hot); }
.feed--list .card__title { min-height: 0; margin: 0; font-size: 16px; }
.feed--list .card__title a { color: var(--c-text); }
.feed--list .card__meta { display: block; font-size: 12px; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed--list .card__meta a { color: inherit; }
.feed--list .card__chap { align-self: flex-start; gap: 12px; min-height: 32px; margin-top: auto; padding: 0 12px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 14px; }
.feed--list .card__chap:hover { background: var(--accent); filter: brightness(1.1); }
.feed--list .card__time { display: inline; opacity: .8; }
.feed--list .card__foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.feed--list .card__prog { flex: 1; height: 4px; border-radius: 2px; background: var(--c-bg-2); overflow: hidden; }
.feed--list .card__prog > span { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--accent); }
.feed--list .card__count { flex: none; font-size: 11px; font-weight: 600; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.feed--list .card.in-list .card__type { bottom: auto; }

/* Статус перекладу — кольорова крапка */
.card__status { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card__status a { color: inherit; }
.card__status::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.card__status[data-status*="Трива"]::before { background: var(--ok); opacity: 1; }
.card__status[data-status*="Закінч"]::before, .card__status[data-status*="Заверш"]::before { background: var(--accent); opacity: 1; }
.card__status[data-status*="Замор"]::before { background: var(--l-planned); opacity: 1; }
.card__status[data-status*="Покин"]::before { background: var(--danger); opacity: 1; }

@media (max-width: 900px) { .feed--list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .feed.feed--list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .feed--list .card { grid-template-columns: 88px minmax(0, 1fr); min-height: 132px; }
  .feed--list .card__title { font-size: 15px; }
  .feed--list .card__chap { font-size: 13px; }
  .feed--list .card__time { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .feed--list .card:hover { transform: none; } }

/* ═══════════════════════════════════════════════════════════════
   М'якші кольори, менше акценту, прості заголовки, скелетони,
   порожні стани, шапка, що ховається (телефон)
═══════════════════════════════════════════════════════════════ */

/* 1. Темна тема: трохи світліша й тепліша, блоки відділяються тоном, а не рамкою */
:root, [data-theme="dark"] {
  --bg: #121318;
  --surface: #1a1c22;
  --surface-2: #23262e;
  --line: rgba(255, 255, 255, .07);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #e6e6e9;
  --muted: #9c9fab;
  --header: rgba(18, 19, 24, .88);
}
/* «Темні острівці» у світлій темі (шапка, футер, картки) — та сама палітра */
[data-theme="light"] .header,
[data-theme="light"] .footer,
[data-theme="light"] .continue__item,
[data-theme="light"] .talk__item {
  --bg: #121318; --surface: #1a1c22; --surface-2: #23262e;
  --text: #e6e6e9; --muted: #9c9fab;
}
[data-theme="light"] .header { --header: rgba(18, 19, 24, .96); }
.feed--list .card, .ch { --c-bg: #1a1c22; --c-bg-2: #262932; }
.flash { background: #1a1c22; }

/* 4. Світла тема: не чисто білий, а теплий папір — менше світить уночі */
[data-theme="light"] {
  --bg: #f4f2ed;
  --surface: #fbfaf7;
  --surface-2: #ebe8e1;
  --line: rgba(45, 38, 25, .10);
  --line-strong: rgba(45, 38, 25, .18);
  --text: #24262c;
  --muted: #62646e;
  --shadow: 0 10px 30px rgba(45, 38, 25, .12);
}

/* 2. Акцентний блакитний — лише для головних дій (кнопки, прогрес, активна точка слайдера) */
.sec-link { color: var(--muted); }
.sec-link:hover { color: var(--accent); }
.nav a.is-active { box-shadow: 3px 3px 0 var(--frame-soft); }
.nav__count { background: var(--line-strong); color: var(--text); }
.nav a:hover::after { background: var(--line-strong); }
.view-toggle button[aria-pressed="true"],
.look__seg button[aria-checked="true"] { background: var(--frame); color: var(--bg); }
.fy:hover .fy__cover { box-shadow: 4px 4px 0 var(--frame-soft); }
.fy:hover .fy__name { color: var(--text); text-decoration: none; }
.qs mark { color: var(--text); background: var(--accent-soft); border-radius: 3px; }
.qs__all { color: var(--text); }

/* 5. Заголовки секцій — простий жирний текст; плашка лишається лише в першого заголовка сторінки */
.sec-title, .panel__title {
  display: inline-block; margin: 0; padding: 0; border-radius: 0; background: none; color: var(--text);
  font-family: var(--font-head); font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em;
  transform: none; box-shadow: none;
}
.sec-title--sm { font-size: 18px; padding: 0; }
.panel__title { font-size: 17px; }
.slider .sec-title, .page-hero .sec-title {
  padding: 6px 14px; border-radius: 4px; background: var(--frame); color: var(--bg);
  font-size: 18px; transform: skewX(-6deg); box-shadow: 3px 3px 0 var(--accent);
}

/* 6. Скелетони: сірі заготовки, поки вантажиться вміст */
.sk { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 5px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: sk-wave 1.4s ease-in-out infinite; }
[data-theme="light"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); }
@keyframes sk-wave { to { transform: translateX(100%); } }
.sk-line { display: block; height: 12px; width: 90%; }
.sk-line--short { width: 55%; }
.ci--sk, .fy--sk { pointer-events: none; }
.ci--sk .ci__cover, .fy--sk .fy__cover { border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }
html[data-motion="off"] .sk::after { animation: none; }

/* 8. Порожні стани: маленька ілюстрація, пояснення і дія */
.empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 16px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty__art { width: 96px; height: 96px; color: var(--line-strong); }
.empty__art .acc { color: var(--accent); }
.empty b { color: var(--text); font-family: var(--font-head); font-size: 17px; }
.empty p { margin: 0; max-width: 380px; }
.empty .btn { margin-top: 6px; }
.empty--sm { padding: 18px 12px; gap: 6px; font-size: 13px; }
.empty--sm .empty__art { width: 56px; height: 56px; }
.empty--sm b { font-size: 15px; }
.bell__empty.empty { list-style: none; }

/* 7. Телефон: шапка ховається, коли гортаєте вниз, і повертається, коли вгору */
@media (max-width: 760px) {
  .header { transition: transform .3s cubic-bezier(.22, .8, .24, 1); will-change: transform; }
  .header.is-up { transform: translateY(-100%); }
}
.nav a.is-active .nav__count { background: rgba(0, 0, 0, .18); color: var(--bg); }
.foryou { margin-bottom: 0; }

/* ═══ Чекбокси — єдиний вигляд по всьому сайту (коментарі, спойлер, профіль, масові дії) ═══ */
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; display: inline-grid; place-content: center;
  width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 2px solid var(--line-strong); background: var(--surface-2);
  vertical-align: middle; cursor: pointer; transition: background-color var(--t-fast, .22s) ease, border-color var(--t-fast, .22s) ease;
}
input[type="checkbox"]::before { content: ""; width: 10px; height: 10px; background: var(--accent-ink); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%); transform: scale(0); transition: transform var(--t-fast, .22s) cubic-bezier(.3, 1.6, .5, 1); }
input[type="checkbox"]:hover { border-color: var(--frame-soft); }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }

/* Масовий вибір коментарів (модератори): ледь помітний, вибраний коментар підсвічується */
.cmt__mass { display: inline-flex; align-items: center; }
.cmt__mass input { opacity: .45; }
.cmt:hover .cmt__mass input, .cmt__mass input:checked, .cmt__mass input:focus-visible { opacity: 1; }
.cmt:has(.cmt__mass input:checked) { background: var(--accent-soft); }

/* Позначка «спойлер» у формах (своя форма й швидка відповідь DLE) */
.check, .form-checks-sp { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.form-checks-sp label { cursor: pointer; }

/* Меню адміністратора біля новини/коментаря (DLE #dropmenudiv) */
#dropmenudiv {
  width: 210px !important; padding: 6px; border-radius: 10px; opacity: 1 !important;
  background: var(--surface); border: 2px solid var(--line-strong); box-shadow: 6px 6px 0 var(--frame-shade), var(--shadow);
  font-size: 14px; animation: pop-in var(--t, .38s) var(--ease, ease) both;
}
#dropmenudiv a { display: block; padding: 8px 12px; border-radius: 7px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#dropmenudiv a:hover { background: var(--surface-2); color: var(--text); }
#dropmenudiv a[onclick*="delete"] { margin-top: 4px; color: var(--danger-ink); box-shadow: 0 -1px 0 var(--line); border-radius: 0 0 7px 7px; }
#dropmenudiv a[onclick*="delete"]:hover { background: rgba(229, 72, 77, .14); }

/* Швидка відповідь на коментар (DLE #dlefastreplycomments, зокрема в діалозі) */
#dlefastreplycomments { display: block; font-size: 14px; color: var(--muted); }
#dlefastreplycomments .bb-editor { margin: 10px 0; }
#dlefastreplycomments .form-checks-sp { display: flex; margin-bottom: 12px; }
#dlefastreplycomments > br { display: none; }
#dlefastreplycomments > b { color: var(--text); }
#dlefastreplycomments .bb-editor { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
#dlefastreplycomments textarea {
  display: block; width: 100% !important; height: 150px !important; min-height: 110px; padding: 11px 14px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; transition: border-color var(--t-fast, .22s) ease;
}
#dlefastreplycomments textarea:focus { outline: 0; border-color: var(--accent); }
.save-buttons { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
input.bbcodes, button.bbcodes {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: filter var(--t-fast, .22s) ease, background-color var(--t-fast, .22s) ease;
}
input.bbcodes:hover, button.bbcodes:hover { filter: brightness(1.12); }
input.bbcodes.applychanges, button.bbcodes.applychanges { background: var(--accent); color: var(--accent-ink); }
.ui-dialog #dlefastreplycomments textarea { height: 170px !important; }

/* ═══ Діалоги jQuery UI: рівний хрестик, без зайвої прокрутки, головна дія — остання кнопка («Так», «Відправити») ═══ */
.ui-dialog { height: auto !important; max-height: calc(100vh - 24px) !important; display: flex; flex-direction: column; }
.ui-dialog-titlebar { flex: none; }
.ui-dialog .ui-dialog-content { flex: 1 1 auto; height: auto !important; min-height: 0 !important; max-height: calc(100vh - 170px); overflow-y: auto; overflow-x: hidden; }
.ui-dialog-buttonpane { flex: none; }
.ui-dialog-titlebar-close { display: grid; place-items: center; flex: none; width: 32px; height: 32px; margin: -4px -6px -4px 0; color: var(--muted); text-decoration: none; transition: background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.ui-dialog-titlebar-close::before { content: ""; width: 14px; height: 14px; background: currentColor; line-height: 1; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E") center / contain no-repeat; }
.ui-dialog-titlebar-close:hover { background: var(--danger); color: #fff; }
.ui-dialog-titlebar-close > span, .ui-dialog-titlebar-close .ui-button-text { display: none; }
.ui-dialog-buttonset .ui-button:first-child { background: var(--surface-2); color: var(--text); }
.ui-dialog-buttonset .ui-button:last-child, .ui-dialog-buttonset .ui-button:only-child { background: var(--accent); color: var(--accent-ink); }
.dle-popup-confirm .ui-dialog-content { font-size: 15px; }

/* ═══ Масові дії з коментарями (модератори) ═══ */
.mass_comments_action { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--muted); }
.mass_comments_action select {
  min-width: 200px; height: 38px; padding: 0 34px 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b2' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
}
.mass_comments_action select:focus { outline: 0; border-color: var(--accent); }
.mass_comments_action select option { background: var(--surface); color: var(--text); }
.mass_comments_action .bbcodes { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 560px) { .mass_comments_action select { flex: 1 1 100%; } .mass_comments_action .bbcodes { flex: 1 1 auto; } }

/* ═══ Шапка v2: тонка лінія замість рамки, активний пункт — смужка знизу, «м'якші» пошук і кнопки ═══ */
.header { box-shadow: 0 1px 0 var(--line-strong); transition: box-shadow .25s ease, transform .3s cubic-bezier(.22, .8, .24, 1); }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(0, 0, 0, .28); }
.header__in { height: 64px; gap: 26px; }
.logo img { height: 36px; }
.logo { transition: opacity .2s ease; }
.logo:hover { opacity: .85; }

/* навігація: пункти на всю висоту шапки, активний — синя смужка внизу */
.nav { align-self: stretch; gap: 2px; font-size: 14.5px; }
.nav li { display: flex; }
.nav a { padding: 0 12px; border-radius: 0; color: var(--muted); transition: color .2s ease; }
.nav a:hover { color: var(--text); }
.nav a::after, .nav a:hover::after { content: ""; display: block; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); transition: transform .25s var(--ease, ease); }
.nav a:hover::after { transform: scaleX(.4); background: var(--line-strong); }
.nav a.is-active, .nav a.is-active:hover { background: none; color: var(--text); transform: none; box-shadow: none; }
.nav a.is-active::after { display: block; transform: none; background: var(--accent); }
.nav__count, .nav a.is-active .nav__count { padding: 0; background: none; color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .8; }
.nav__help .ico { width: 15px; height: 15px; color: #f06a8a; transition: transform .25s var(--ease, ease); }
.nav__help:hover .ico { transform: scale(1.18); }

/* пошук: заповнене поле без важкої рамки */
.search { height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.search:hover { border-color: var(--line-strong); }
.search:focus-within { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(37, 170, 225, .18); }
.search > .ico { color: var(--muted); }
.search input::placeholder { color: var(--muted); opacity: .85; }
.search__key { height: 20px; min-width: 20px; border-radius: 5px; border-color: var(--line-strong); background: var(--surface-2); font-size: 11px; }

/* кнопки-іконки: м'яка заливка на наведенні замість рамки */
.header .icon-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; }
.header .icon-btn:hover, .header .icon-btn[aria-expanded="true"] { border: 0; background: var(--surface-2); color: var(--text); }
.header__tools { gap: 6px; }
.header .user > .btn { min-height: 40px; padding: 0 18px; border-radius: var(--radius-btn); }
.user__btn { height: 40px; padding: 0 8px 0 3px; border-color: transparent; background: var(--surface); transition: background-color .2s ease; }
.user__btn:hover, .user.is-open .user__btn { background: var(--surface-2); }
.user__ava { width: 32px; height: 32px; }

/* меню на планшеті й телефоні (бургер) */
@media (max-width: 1100px) {
  .nav { align-self: auto; }
  .nav.is-open { gap: 2px; padding: 8px 10px 12px; }
  .nav.is-open a { min-height: 44px; padding: 0 12px; border-radius: 8px; }
  .nav.is-open a::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; border-radius: 0 3px 3px 0; transform: scaleY(0); }
  .nav.is-open a:hover::after { transform: scaleY(0); }
  .nav.is-open a.is-active { background: var(--surface-2); }
  .nav.is-open a.is-active::after { transform: none; }
}
@media (max-width: 760px) {
  .header__in { height: 58px; gap: 8px; }
  .logo img { height: 32px; }
  .header .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 760px) { .qs, .bell__menu { top: 62px; } }
@media (max-width: 760px) { .header .user > .btn { min-height: 36px; padding: 0 14px; font-size: 14px; } }

/* ═══ Форма входу (login.tpl, гість): соцмережі, показ пароля, «чужий пристрій» ═══ */
.user__menu--login { width: 340px; padding: 6px; }
.login-form { gap: 12px; padding: 12px; }
.login-form__head { display: flex; flex-direction: column; gap: 3px; }
.login-form__head b { font-family: var(--font-head); font-size: 20px; color: var(--text); }
.login-form__head span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.login-form__social { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.login-form__social:not(:has(a)) { display: none; }
.user__menu .soc, .soc { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 600; transition: border-color .2s ease, background-color .2s ease, transform .15s ease; }
.soc svg { width: 18px; height: 18px; flex: none; }
.user__menu .soc:hover, .soc:hover { border-color: var(--text); background: var(--surface-2); color: var(--text); }
.soc:active { transform: translateY(1px); }
.soc--facebook svg { color: #1877f2; }
.login-form__or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.login-form__or::before, .login-form__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-form__social:not(:has(a)) + .login-form__or { display: none; }
.login-form__field { display: flex; flex-direction: column; gap: 5px; }
.login-form__field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.login-form input[type="text"], .login-form input[type="password"] { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; transition: border-color .2s ease, box-shadow .2s ease; }
.login-form input[type="text"]:focus, .login-form input[type="password"]:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 170, 225, .18); }
.login-form__pass { position: relative; display: block; }
.login-form__pass input { padding-right: 46px !important; }
.login-form__eye { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.login-form__eye:hover { background: var(--surface-2); color: var(--text); }
.login-form__eye svg { width: 18px; height: 18px; }
.login-form__eye[aria-pressed="false"] .login-form__eye-off { display: none; }
.login-form__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.login-form__row .check { display: inline-flex; flex-direction: row; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.user__menu .login-form__row a, .user__menu .login-form__reg a { display: inline; padding: 0; color: var(--accent); }
.user__menu .login-form__row a:hover, .user__menu .login-form__reg a:hover { background: none; text-decoration: underline; }
.login-form .btn--block { min-height: 44px; border-radius: var(--radius-btn); font-size: 15px; }
.login-form.is-busy .btn--block { opacity: .7; pointer-events: none; }
.login-form__reg { margin: 0; font-size: 13px; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .user__menu--login { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; max-height: calc(100vh - 140px); overflow-y: auto; }
}

/* ═══ Розміри карток на різних екранах: постери ~145px на десктопі, ~130px на планшеті, 3 в ряд на телефоні ═══ */
.slider__track { grid-auto-columns: calc((100% - 6 * 22px) / 7); }
.feed { grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 22px 16px; }
@media (max-width: 1100px) {
  .slider__track { grid-auto-columns: calc((100% - 5 * 18px) / 6); gap: 18px; }
}
@media (max-width: 900px) {
  .slider__track { grid-auto-columns: calc((100% - 4 * 16px) / 5); gap: 16px; }
  .feed { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 18px 12px; }
  .card__time { display: none; }
}
@media (max-width: 760px) {
  /* видно 2,5 картки — зрозуміло, що стрічку можна гортати */
  .slider__track { grid-auto-columns: 40%; gap: 12px; }
  .slide__rank { font-size: 30px; }
  .feed { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
}

/* ═══ Сторінка пошуку (engine/modules/mgsearch/page.php, assets/search.js) ═══ */
.sp { display: flex; flex-direction: column; gap: 22px; }
.sp-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.sp-title { margin: 0; font-family: var(--font-head); font-size: 28px; font-weight: 800; line-height: 1.15; }
.sp-form { position: relative; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 6px 0 16px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); transition: border-color .2s ease, box-shadow .2s ease; }
.sp-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 170, 225, .18); }
.sp-form > .ico { flex: none; width: 20px; height: 20px; color: var(--muted); }
.sp-form input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; }
.sp-form input::placeholder { color: var(--muted); }
.sp-form .btn { flex: none; min-height: 42px; padding: 0 20px; border-radius: var(--radius-btn); }
.sp.is-busy .sp-form > .ico { animation: qs-pulse .8s ease-in-out infinite alternate; }
.sp-hint { margin: 0; font-size: 13px; color: var(--muted); }
.sp-results { display: flex; flex-direction: column; gap: 16px; min-height: 240px; transition: opacity .15s ease; }
.sp.is-busy .sp-results { opacity: .55; }
.sp-sub { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.sp-sum { margin: 0; font-size: 15px; color: var(--muted); }
.sp-sum b { color: var(--text); }
.sp-fixed { margin: -10px 0 0; font-size: 13px; color: var(--muted); }
.sp-types, .sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-types a, .sp-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: var(--radius-btn); background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--text); transition: background-color .2s ease, border-color .2s ease; }
.sp-types a:hover, .sp-chips a:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.sp-types a.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.sp-types small { font-size: 12px; font-weight: 600; opacity: .6; }
.sp-recent { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.sp-recent[hidden] { display: none; }
.sp-recent__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sp-recent__clear { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.sp-recent__clear:hover { color: var(--accent); }
.sp-grid .card__title { min-height: 0; }
.sp-alt { margin: -2px 0 0; overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
.sp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 12px; color: var(--muted); }
.sp-by { padding: 0 6px; border-radius: 4px; background: var(--accent-soft); color: var(--text); font-size: 11px; font-weight: 600; }
.sp .empty a { color: var(--accent); }
@media (max-width: 760px) {
  .sp { gap: 16px; }
  .sp-title { font-size: 23px; }
  .sp-form { height: 48px; padding-left: 12px; }
  .sp-form input { font-size: 16px; }
  .sp-form .btn { min-height: 38px; padding: 0 14px; }
  .sp-types { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
  .sp-types::-webkit-scrollbar { display: none; }
  .sp-types a { flex: none; }
}
.sp-by--descr { background: var(--surface-2); color: var(--muted); }

/* ── Меню акаунта (login.tpl, зареєстровані) ── */
.user__menu--acc { width: 290px; padding: 6px; border-radius: 14px; border-color: var(--line-strong, var(--line)); }
.user__menu--acc svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user__menu--acc a { justify-content: flex-start; transition: background-color .15s ease, color .15s ease; }
.user__menu--acc a > span { flex: 1; min-width: 0; }
.user__menu .um-head { gap: 12px; padding: 10px; margin-bottom: 4px; border-radius: 10px; background: var(--surface-2); }
.user__menu .um-head:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface-2)); }
.um-head__ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); }
.um-head__text { display: flex; flex-direction: column; gap: 2px; }
.um-head__text b { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-head__text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-head__go { flex: none !important; font-size: 12px; font-weight: 600; color: var(--accent); }
.um-list { display: flex; flex-direction: column; padding: 2px 0; }
.user__menu .um-list a { gap: 12px; padding: 9px 10px; font-size: 14px; }
.user__menu .um-list a svg { color: var(--muted); }
.user__menu .um-list a:hover svg { color: var(--accent); }
.um-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; line-height: 18px; font-style: normal; text-align: center; }
.um-count--new { background: var(--danger); color: #fff; }
.um-count[hidden] { display: none; }
.um-create { margin: 4px 0; padding: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.um-label { display: block; margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.um-create__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.user__menu .um-create__btns a { justify-content: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-btn); font-size: 13px; font-weight: 600; }
.user__menu .um-create__btns a:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); }
.user__menu .um-create__btns a svg { width: 16px; height: 16px; color: var(--accent); }
.um-foot { display: flex; flex-direction: column; padding-top: 2px; }
.user__menu .um-foot a { gap: 12px; padding: 9px 10px; font-size: 14px; color: var(--muted); }
.user__menu .um-foot a:hover { color: var(--text); }
.user__menu .um-foot .um-out:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
@media (max-width: 760px) {
  .user__menu--acc { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; max-height: calc(100vh - 140px); overflow-y: auto; }
  .user__menu .um-list a, .user__menu .um-foot a { padding: 11px 10px; }
}

/* ── Футер завжди внизу: на коротких сторінках (помилка, порожній пошук) main займає вільне місце ── */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > .main { flex: 1 0 auto; }


/* ── Футер v2: опис + три колонки, нижній рядок з © і «Нагору» ── */
.footer { margin-top: 40px; background: var(--surface); box-shadow: none; border-top: 1px solid var(--line); }
.fx { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 28px 40px; padding-top: 36px; padding-bottom: 30px; }
.fx__about { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.fx__about .logo img { height: 28px; width: auto; }
.fx__about p { margin: 0; max-width: 40ch; font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer .fx__help { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; background: color-mix(in srgb, #f06a8a 14%, transparent); color: #f58aa3; font-size: 14px; font-weight: 600; transition: background-color .2s ease, color .2s ease; }
.footer .fx__help:hover { background: color-mix(in srgb, #f06a8a 24%, transparent); color: #ffb3c4; }
.fx__help svg { width: 17px; height: 17px; fill: currentColor; }
.fx__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.fx__col h2 { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text); }
.footer .fx__col a { color: var(--muted); font-size: 14px; transition: color .15s ease; }
.footer .fx__col a:hover { color: var(--accent); }
.fx__bottom { border-top: 1px solid var(--line); }
.fx__bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.fx__bottom p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.fx__top { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 32px; padding: 0 12px 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.fx__top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.fx__top:hover { border-color: var(--accent); color: var(--accent); }
.fx__top:hover svg { transform: translateY(-2px); }
[data-theme="light"] .footer .fx__help { color: #d43a63; }
[data-theme="light"] .footer .fx__help:hover { color: #b8264d; }
@media (max-width: 900px) {
  .fx { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fx__about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .fx { grid-template-columns: 1fr 1fr; gap: 24px 20px; padding-top: 28px; }
  .fx__col:last-child { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .fx__col:last-child h2 { width: 100%; }
  .fx__bottom-in { align-items: flex-start; }
}


/* ── Футер v3 (компактний): короткий логотип, посилання в рядок, «Підтримати» й «Нагору»; нижче © ── */
.footer { margin-top: 32px; }
.fz { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 24px; padding-top: 16px; padding-bottom: 14px; }
.fz__logo { display: block; line-height: 0; }
.fz__logo img { width: auto; height: 26px; }
.fz__nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer .fz__nav a { color: var(--muted); font-size: 13px; font-weight: 600; transition: color .15s ease; }
.footer .fz__nav a:hover { color: var(--accent); }
.fz__act { display: flex; align-items: center; gap: 8px; }
.footer .fz__help { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; background: color-mix(in srgb, #f06a8a 14%, transparent); color: #f58aa3; font-size: 13px; font-weight: 600; transition: background-color .2s ease, color .2s ease; }
.footer .fz__help:hover { background: color-mix(in srgb, #f06a8a 24%, transparent); color: #ffb3c4; }
.fz__help svg { width: 15px; height: 15px; fill: currentColor; }
.fz__top { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.fz__top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.fz__top:hover { border-color: var(--accent); color: var(--accent); }
.fz__top:hover svg { transform: translateY(-2px); }
.footer .fz__soc { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--muted); transition: background-color .2s ease, color .2s ease; }
.fz__soc svg { width: 17px; height: 17px; fill: currentColor; }
.footer .fz__soc--tg:hover { background: #27a6e5; color: #fff; }
.footer .fz__soc--fb:hover { background: #1877f2; color: #fff; }
.fz__copy { grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; color: var(--muted); }
[data-theme="light"] .footer .fz__help { color: #d43a63; }
@media (max-width: 760px) {
  .fz { grid-template-columns: auto minmax(0, 1fr); }
  .fz__act { justify-self: end; }
  .fz__nav { grid-column: 1 / -1; grid-row: 2; gap: 6px 16px; }
}

/* ── Стрічка без пропусків: 42 новини на сторінку діляться на 7, 6, 3 і 2 колонки ── */
.feed--fit:not(.feed--list) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1100px) { .feed--fit:not(.feed--list) { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 12px; } }
@media (max-width: 760px) { .feed--fit:not(.feed--list) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; } }
@media (max-width: 359px) { .feed--fit:not(.feed--list) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Вигляд «Список»: широкі панелі (раніше їх перебивала сітка постерів) — 3 / 2 / 1 у ряд ── */
.feed.feed--list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .feed.feed--list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .feed.feed--list { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* ── Сторінки на всю ширину сітки (раніше .page/.mf/.mgt були обмежені 860–980px) ── */
.page, .mf, .mf-closed, .mgt { max-width: none; }

/* ── Завантаження в пошуку й каталозі: тонка смужка під полем, приглушені результати.
      is-busy — запит у дорозі; is-loading — триває довше 150 мс (лише тоді показуємо анімацію) ── */
@keyframes mg-loadbar { from { background-position: -60% 0; } to { background-position: 160% 0; } }
@keyframes mg-spin { to { transform: rotate(360deg); } }
.cat-bar { position: relative; }
.sp-form::after, .cat-bar::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -9px; height: 3px; border-radius: 2px; pointer-events: none; opacity: 0;
  background: var(--accent-soft) linear-gradient(90deg, transparent, var(--accent), transparent) no-repeat;
  background-size: 35% 100%; transition: opacity .2s ease;
}
.cat-bar::after { left: 0; right: 0; bottom: -8px; }
.sp.is-loading .sp-form::after, .cat.is-loading:not(.is-more) .cat-bar::after { opacity: 1; animation: mg-loadbar 1.1s ease-in-out infinite; }
.sp.is-busy .sp-results, .cat.is-busy .cat-grid { opacity: 1; }
.sp.is-loading .sp-results, .cat.is-loading:not(.is-more) .cat-grid { opacity: .45; pointer-events: none; transition: opacity .25s ease; }
.sp.is-typing .sp-form > .ico { color: var(--accent); }
.cat.is-loading.is-more .cat-more { position: relative; color: transparent; }
.cat.is-loading.is-more .cat-more::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: mg-spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .sp.is-loading .sp-form::after, .cat.is-loading .cat-bar::after { animation-duration: 3s; }
}


/* ── Сторінки xfsearch (тип, команда, статус, рік): заголовок і вкладки типів ── */
.xf-hero { margin-bottom: 18px; }
.xf-hero .page-hero__lead { max-width: 70ch; }
.xf-hero__n { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.xf-hero__more { display: inline-block; margin-top: 8px; }
.xf-tabs { margin-bottom: 20px; }
.xf-cap { display: inline-block; }
.xf-cap::first-letter { text-transform: uppercase; }
.flash--error { background: #3a1517; color: #ffd6d8; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(229, 72, 77, .45); }

/* Повідомлення після додавання розділу / манґи (msgbox, плагін #35): текст і кнопки дій */
.mg-addmsg__text { margin: 2px 0 14px; font-size: 15px; line-height: 1.55; }
.mg-addmsg__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mg-addmsg__links .btn { min-height: 38px; }
.mg-addmsg__home { margin-left: 4px; color: var(--muted); font-size: 14px; }

/* ═══ Меню акаунта: групи «швидко» / «Моє» / «Перекладачам» / налаштування ═══ */
.um-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.user__menu .um-quick a { position: relative; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 6px; border-radius: 10px; background: var(--surface-2); font-size: 12px; font-weight: 700; text-align: center; }
.user__menu .um-quick a svg { width: 20px; height: 20px; color: var(--accent); }
.user__menu .um-quick a:hover { background: var(--accent-soft); color: var(--text); }
.um-quick .um-count { position: absolute; top: 6px; right: 8px; }
.um-sec { display: flex; flex-direction: column; padding: 8px 0 4px; border-bottom: 1px solid var(--line); }
.um-sec .um-label { margin: 2px 10px 4px; }
.user__menu .um-sec > a { gap: 12px; padding: 8px 10px; font-size: 14px; }
.user__menu .um-sec > a svg { color: var(--muted); }
.user__menu .um-sec > a:hover svg { color: var(--accent); }
.um-sec .um-create__btns { margin: 6px 10px 6px; }
/* «Перекладачам» — згортається (login.tpl, <details>): розгорнуто, якщо користувач уже публікував або в команді */
.um-tr__sum { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; border-radius: 6px; user-select: none; }
.um-tr__sum::-webkit-details-marker { display: none; }
.um-tr__sum::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; opacity: .7; }
.um-tr[open] > .um-tr__sum::after { transform: rotate(45deg); }
.um-tr__sum:hover { color: var(--text); }
.um-tr:not([open]) > .um-tr__sum { margin-bottom: 2px; }
.um-tr__body { display: flex; flex-direction: column; }
.user__menu .um-tr__body > a { gap: 12px; padding: 8px 10px; font-size: 14px; }
.user__menu .um-tr__body > a svg { color: var(--muted); }
.user__menu .um-tr__body > a:hover svg { color: var(--accent); }
.um-tr__body .um-create__btns { margin: 6px 10px 6px; }
.user__menu .um-foot a { gap: 12px; }

/* лічильник у пункті «Каталог» — пігулка */
.nav__count, .nav a.is-active .nav__count { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .02em; opacity: 1; box-shadow: inset 0 0 0 1px var(--line); }
.nav a:hover .nav__count { color: var(--text); }
.nav a.is-active .nav__count { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

/* ── Лоадер DLE (#loading-layer): замість стандартного SVG — свій ── */
#loading-layer { font-size: 0 !important; color: transparent !important; width: 56px !important; height: 56px !important; margin: 0 !important; padding: 0 !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); border-radius: 16px; background: var(--surface, #1b1d23) !important; box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line, rgba(127,127,127,.2)); display: grid !important; place-items: center; opacity: 1 !important; }
#loading-layer svg, #loading-layer > *:not(.mg-ld) { display: none !important; }
#loading-layer::before { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--accent-soft, rgba(37,170,225,.2)); border-top-color: var(--accent, var(--accent)); animation: mg-ld .7s linear infinite; }
@keyframes mg-ld { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #loading-layer::before { animation-duration: 1.6s; } }

/* ═══ Телефон: «Оновлення релізів» — 2 колонки; слайдер «Популярне» — рівно 3 картки в кадрі ═══ */
@media (max-width: 760px) {
  .feed:not(.feed--list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .feed:not(.feed--list) .card__title { font-size: 14px; }
  .slider__track { grid-auto-columns: calc((100% - 2 * 10px) / 3); gap: 10px; padding-right: 0; margin-right: 0; }
  .slide__rank { font-size: 26px; }
  .slide__title, .slide__name { font-size: 13px; }
}

/* ═══ Обкладинка не завантажилась — заглушка з першою літерою (клас is-broken ставить app.js) ═══ */
:is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover).is-broken { position: relative; background: linear-gradient(150deg, var(--accent-soft), var(--surface-2) 70%); }
:is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover).is-broken::after { content: attr(data-letter); position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-size: 40px; font-weight: 800; color: var(--accent); opacity: .55; pointer-events: none; }
:is(.slide__cover, .card__cover, .fy__cover, .ch__cover, .top__cover, .continue__cover).is-broken img { visibility: hidden; }

/* ═══ ПК: «Оновлення релізів» — 8 у ряд (як і решта блоків, нижчі картки) ═══ */
@media (min-width: 1200px) {
  .feed:not(.feed--list) { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 22px 16px; }
}
/* Плашка розділу в сітці: «Розділ N» не обрізається, обрізається дата */
.feed:not(.feed--list) .card__chap { padding: 0 8px; gap: 6px; }
.feed:not(.feed--list) .card__chap-name { flex: none; }
.feed:not(.feed--list) .card__time { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }

/* ═══ Телефон: лише сітка (без перемикача вигляду) і більші бейджі на обкладинках ═══ */
@media (max-width: 760px) {
  .view-toggle, [data-view-toggle] { display: none !important; }
  .card__rate, .badge--adult { font-size: 12px; line-height: 1.35; padding: 2px 7px; border-radius: 5px; }
  .card__rate { right: 6px; top: 6px; }
  .badge--adult { left: 6px; top: 6px; }
  .card__type { font-size: 11px; line-height: 1.35; padding: 2px 7px; left: 6px; bottom: 6px; border-radius: 5px; }
  .card.in-list .card__type { bottom: 28px; }
}

/* ═══ Сітка «Оновлення релізів»: фіксована кількість колонок — дільники 48 (6 / 4 / 2), останній ряд завжди повний.
   Було 8 у ряд — на ширині сторінки 1320 px картки ~147 px виглядали задрібними; 6 у ряд — ~200 px ═══ */
.feed:not(.feed--list) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 899px)  { .feed:not(.feed--list) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .feed:not(.feed--list) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ═══ Лічильник у меню (Каталог 4521) — як плашка «Популярне цього тижня»: нахилена, світла, з тінню акценту ═══ */
.nav__count, .nav a.is-active .nav__count, .nav a:hover .nav__count {
  display: inline-flex; align-items: center; height: auto; margin-left: 4px; padding: 1px 6px; border-radius: 3px;
  background: var(--frame); color: var(--bg); font-family: var(--font-head); font-size: 11px; font-weight: 700; line-height: 1.35; letter-spacing: 0;
  transform: skewX(-6deg); box-shadow: 2px 2px 0 var(--accent); opacity: 1;
}

/* ═══ Спливаюча картка користувача (profile_popup.tpl, вікно ShowProfile) ═══ */
#dleprofilepopup { padding: 0 !important; }
.upp { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: min(340px, 80vw); color: var(--text); }
.upp__head { display: flex; align-items: center; gap: 14px; }
.upp__ava { position: relative; flex: none; }
.upp__ava img { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-soft); }
.upp__dot { position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--surface); }
.upp__who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.upp__name { font-family: var(--font-head); font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.upp__group { align-self: flex-start; display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.upp__group * { color: inherit !important; }
.upp__land { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.upp__land svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.upp__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.upp__stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.upp__stat b { font-family: var(--font-head); font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.upp__stat span { color: var(--muted); font-size: 12px; }
.upp__stat small { margin-top: 4px; font-size: 12px; }
.upp__stat small a { color: var(--accent); font-weight: 700; }
.upp__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.upp__facts div { min-width: 0; }
.upp__facts dt { color: var(--muted); font-size: 12px; }
.upp__facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.upp__info { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; max-height: 7.5em; overflow: auto; }

/* Швидкий пошук: сторінка команди перекладачів над тайтлами */
.qs__team { --tm: #2fa8e0; background: color-mix(in srgb, var(--tm) 10%, transparent); }
.qs__tlogo { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: var(--tm); color: #fff; font-family: var(--font-head); font-size: 18px; font-weight: 800; }
.qs__tlogo img { width: 100%; height: 100%; object-fit: cover; }
.qs__kicker { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.qs__go { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 18px; }
.qs__team:hover .qs__go, .qs__team.is-active .qs__go { color: var(--tm); }

/* ═══ Кнопка закриття діалогу (jQuery UI 1.12+ / jQuery 3): всередині значок і текст «Close» — показуємо лише свій хрестик ═══ */
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close {
  position: relative; inset: auto; display: grid; place-items: center; flex: none; align-self: center; width: 32px; height: 32px; min-width: 0; margin: 0 -6px 0 0; padding: 0; transform: none;
  border: 0; border-radius: 8px; background: var(--surface-2); color: var(--muted); box-shadow: none;
  font-size: 0; line-height: 0; text-indent: 0; white-space: nowrap; overflow: hidden; cursor: pointer;
}
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:focus-visible { background: var(--danger); color: #fff; outline: 0; }
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close > span { display: none !important; }
/* хрестик — абсолютно по центру (текстовий вузол «Close» інакше займає місце в сітці кнопки і зсуває його) */
.ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close::before { position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; }

/* ═══ Єдиний стиль вкладок і перемикачів (як .tabs на головній): контур 2px, активна — залита рамковим кольором + тінь-зсув ═══ */
.acc-tabs a.active, .acc-tabs a.is-active, .acc-tabs a[aria-current="page"],
.tdir-sort__b.is-on, .sp-types a.is-active, .mgt-tabs a.is-active { box-shadow: var(--btn-shadow); }
.acc-tabs a:hover, .colx-tabs a:hover, .colx-sort__b:hover, .tdir-sort__b:hover { border-color: var(--frame); }
.sp-types a.is-active { background: var(--frame); border-color: var(--frame); color: var(--bg); }

/* ═══ Стрічки .fy-strip: стрілки (ПК) і затухання країв за станом прокрутки (app.js → .fy-wrap) ═══ */
.fy-wrap { position: relative; }
.fy-wrap .fy-strip { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.fy-wrap.is-start .fy-strip { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.fy-wrap.is-end .fy-strip { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
.fy-wrap.is-start.is-end .fy-strip { -webkit-mask-image: none; mask-image: none; }
.fy-arrow { position: absolute; top: 76px; z-index: 2; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .6); transition: opacity var(--t-fast, .22s) ease, background-color var(--t-fast, .22s) ease, color var(--t-fast, .22s) ease; }
.fy-arrow--prev { left: -12px; }
.fy-arrow--next { right: -12px; }
.fy-wrap.is-start .fy-arrow--prev, .fy-wrap.is-end .fy-arrow--next { opacity: 0; pointer-events: none; }
@media (hover: none), (max-width: 760px) { .fy-arrow { display: none; } }

/* ═══ Сторінка «Допомога проєкту» (статична dopomoga-proektu): картки способів підтримки й гаманці USDT з QR ═══ */
.donate { display: flex; flex-direction: column; gap: 22px; }
.donate__lead { margin: 0; font-size: 16px; line-height: 1.6; }
.donate__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.donate-card, .donate-wallet { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.donate-card__logo { display: flex; align-items: center; justify-content: center; height: 96px; padding: 14px 20px; border-radius: 12px; background: #fff; transition: transform .15s ease, box-shadow .15s ease; }   /* логотипи розраховані на світле тло — біла підкладка в обох темах */
.donate-card__logo:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .6); }
.prose .donate-card__logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; }
.prose .donate-card__title, .prose .donate-crypto__title { margin: 0; font-size: 19px; }
.donate-card p { margin: 0; color: var(--muted); flex: 1; }
.donate-card__btn { align-self: flex-start; text-decoration: none; }
.prose .donate-card__btn, .prose .donate-card__btn:hover { color: var(--accent-ink); text-decoration: none; }
.donate-crypto { display: flex; flex-direction: column; gap: 12px; }
.donate-warn { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: 14px; }
.donate-wallet { align-items: center; text-align: center; }
.donate-wallet__head { display: flex; flex-direction: column; gap: 2px; }
.donate-wallet__head b { font-family: var(--font-head); font-size: 17px; }
.donate-wallet__head small { color: var(--muted); font-size: 13px; }
.donate-qr { width: 168px; padding: 8px; border-radius: 12px; background: #fff; line-height: 0; }   /* QR — завжди на білому, щоб зчитувався в обох темах */
.donate-qr svg { width: 100%; height: auto; shape-rendering: crispEdges; }
.prose .donate-addr { display: block; width: 100%; padding: 8px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.4; word-break: break-all; user-select: all; }
.donate-copy { background: var(--surface); border: 1px solid var(--line-strong); }
.donate-copy:hover { border-color: var(--accent); color: var(--accent); }
.donate-copy.is-done, .donate-copy.is-done:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.donate__thanks { margin: 0; text-align: center; font-weight: 600; }
@media (max-width: 760px) { .donate__grid { grid-template-columns: minmax(0, 1fr); } }

/* ═══ Нижню панель (.tabbar) тимчасово приховано. Щоб повернути — видаліть увесь цей блок.
   Разом з нею прибрано відступ під неї та опущено елементи, що стояли над нею (сповіщення, «Зберегти» в профілі, вікно запиту на тайтлі).
   html … — щоб перебити account.css / title.css, які підключаються після style.css ═══ */
@media (max-width: 760px) {
  html .tabbar { display: none; }
  html body { padding-bottom: env(safe-area-inset-bottom); }
  html .flash { bottom: calc(24px + env(safe-area-inset-bottom)); }
  html .pf-edit .pf-submit { bottom: calc(12px + env(safe-area-inset-bottom)); }
  html .mt-req__pop { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}

/* ═══ Що нового (/changes.html, engine/modules/mgchanges/page.php) ═══ */
.chg { max-width: none; }
.chg-month { margin: 26px 0 12px; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.chg-month:first-of-type { margin-top: 4px; }
.chg-list { display: flex; flex-direction: column; gap: 12px; }
.chg-item { position: relative; padding: 16px 18px 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--chg, var(--accent)); }
.chg-item--new { --chg: var(--accent); }
.chg-item--better { --chg: #8b6cf0; }
.chg-item--fix { --chg: #e3a33b; }
.chg-item__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.chg-kind { padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--chg) 16%, transparent); color: var(--chg); font-size: 12px; font-weight: 700; line-height: 20px; }
.chg-date { color: var(--muted); font-size: 12.5px; }
.chg-title { margin: 0; font-family: var(--font-head); font-size: 17px; line-height: 1.35; }
.chg-body { margin-top: 6px; color: var(--text); font-size: 14.5px; line-height: 1.6; }
.chg-body p { margin: 0 0 8px; }
.chg-body ul { margin: 0 0 8px; padding-left: 20px; }
.chg-body li { margin: 2px 0; }
.chg-body > :last-child { margin-bottom: 0; }
.chg-body a, .chg .page-hero__lead a { color: var(--accent); }
.chg .page-hero__lead { max-width: 70ch; }
.chg-lead-link { white-space: nowrap; font-weight: 600; }
.chg-empty { padding: 40px 16px; border-radius: 12px; background: var(--surface); text-align: center; color: var(--muted); }
.chg-empty b { display: block; color: var(--text); font-size: 16px; }
.chg-pages { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .chg-item { padding: 14px 14px 12px; } .chg-title { font-size: 16px; } }

/* ═══ Часті питання (/faq.html, engine/modules/mgfaq/page.php) ═══ */
.faq .page-hero__lead { max-width: 70ch; }
.faq .page-hero__lead a, .faq-none a { color: var(--accent); }
.faq-lead-link { white-space: nowrap; font-weight: 600; }
.faq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.faq-find { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px; height: 42px; padding: 0 12px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.faq-find:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.faq-find svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.faq-find input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.faq-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.faq-cats a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; }
.faq-cats a:hover { background: var(--accent-soft); color: var(--text); }
.faq-cats small { color: var(--muted); font-weight: 600; }
.faq-none { padding: 24px 0; color: var(--muted); }
.faq-sec[hidden], .faq-item[hidden] { display: none; }
.faq-cat { margin: 26px 0 12px; font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; scroll-margin-top: 80px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 80px; transition: box-shadow .15s ease; }
.faq-item[open] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--line)), inset 3px 0 0 var(--accent); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; font-family: var(--font-head); font-size: 15.5px; font-weight: 600; line-height: 1.4; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.faq-item[open] .faq-chev { transform: rotate(180deg); stroke: var(--accent); }
.faq-a { padding: 0 16px 14px; color: var(--text); font-size: 14.5px; line-height: 1.65; }
.faq-a p { margin: 0 0 10px; }
.faq-a ul, .faq-a ol { margin: 0 0 10px; padding-left: 20px; }
.faq-a li { margin: 3px 0; }
.faq-a a { color: var(--accent); }
.faq-a .faq-link { display: inline-block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.faq-a .faq-link:hover { color: var(--accent); }
@media (max-width: 560px) { .faq-item summary { padding: 13px 14px; font-size: 15px; } .faq-a { padding: 0 14px 12px; } .faq-find { max-width: none; } }

/* ═══ Власне контекстне меню (app.js) ═══ */
.ctxm { position: fixed; z-index: 1000; min-width: 220px; max-width: 280px; padding: 6px; border-radius: 12px; background: var(--surface); border: 2px solid var(--frame-soft); box-shadow: 6px 6px 0 var(--frame-shade), 0 18px 40px -16px rgba(0, 0, 0, .6); animation: pop-in .14s var(--ease, ease) both; }
.ctxm button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; }
.ctxm button:hover, .ctxm button:focus-visible { outline: 0; background: var(--accent-soft); color: var(--text); }
.ctxm svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctxm button:hover svg, .ctxm button:focus-visible svg { stroke: var(--accent); }
.ctxm hr { margin: 5px 6px; border: 0; border-top: 1px solid var(--line); }
.ctxm small { display: block; padding: 6px 10px 3px; color: var(--muted); font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .ctxm { animation: none; } }
.ctxm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1001; transform: translateX(-50%); padding: 9px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); transition: opacity .3s ease; }
.ctxm-toast.is-out { opacity: 0; }

/* ═══ Збір на сервер (engine/modules/mgdonate/bar.php) — сторінка «Допомога проєкту» ═══ */
.don { margin: 0 0 18px; padding: 18px 20px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.don__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.don__head b { font-family: var(--font-head); font-size: 17px; }
.don__pct { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.don__bar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.don__bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0057b8, var(--accent) 55%, #ffd500); transition: width .8s ease; }
.don__sum { margin: 10px 0 0; font-size: 15px; }
.don__sum b { font-size: 18px; font-variant-numeric: tabular-nums; }
.don__src { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.don__src span { display: inline-flex; align-items: center; gap: 6px; }
.don__src i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.don__note { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }

/* Патрони Patreon (app.js): тонке тепле кільце навколо аватарки й маленьке приглушене сердечко біля ніку */
.cmt__ava.is-patron { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #f0a35c; }
.pf-ava.is-patron img { box-shadow: 6px 6px 0 #f0a35c; }
.mg-patron { display: inline-flex; align-items: center; margin-left: 5px; vertical-align: -1px; color: #e3955a; opacity: .85; cursor: help; }
.mg-patron svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.pf-name .mg-patron { margin-left: 8px; vertical-align: 0; }
.pf-name .mg-patron svg { width: 26px; height: 26px; stroke-width: 2; }
